prime-ui-kit 0.15.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 (1190) hide show
  1. package/README.md +79 -74
  2. package/dist/chunks/{chunk-Q3BFRQHZ.js → chunk-2ODXLPW3.js} +169 -10
  3. package/dist/chunks/{chunk-XJAVS6FH.js → chunk-7WWZYGRC.js} +5482 -4179
  4. package/dist/chunks/{chunk-THFZIHKU.js → chunk-A4WE3UNC.js} +28219 -27605
  5. package/dist/chunks/{chunk-6TI4DSM5.js → chunk-PRP4B6OG.js} +1 -1
  6. package/dist/chunks/{chunk-2IKH55MI.js → chunk-SVFWPLNW.js} +215 -154
  7. package/dist/color-picker.d.ts +1 -1
  8. package/dist/color-picker.js +3 -3
  9. package/dist/components/accordion/Accordion.d.ts +52 -5
  10. package/dist/components/avatar/Avatar.d.ts +31 -8
  11. package/dist/components/badge/Badge.d.ts +93 -25
  12. package/dist/components/banner/Banner.d.ts +17 -10
  13. package/dist/components/breadcrumb/Breadcrumb.d.ts +18 -5
  14. package/dist/components/button/Button.d.ts +102 -43
  15. package/dist/components/button-group/ButtonGroup.d.ts +32 -8
  16. package/dist/components/card/Card.d.ts +15 -9
  17. package/dist/components/chart-frame/ChartFrame.d.ts +58 -51
  18. package/dist/components/chat/Chat.d.ts +77 -38
  19. package/dist/components/chat/ChatPinned.d.ts +20 -8
  20. package/dist/components/chat/ChatRows.d.ts +8 -1
  21. package/dist/components/chat/MessageList.d.ts +14 -19
  22. package/dist/components/chat/chatContext.d.ts +3 -3
  23. package/dist/components/chat/messageFlow.d.ts +1 -1
  24. package/dist/components/chat-list/ChatList.d.ts +88 -34
  25. package/dist/components/checkbox/Checkbox.d.ts +61 -12
  26. package/dist/components/code-block/CodeBlock.d.ts +11 -5
  27. package/dist/components/color-field/ColorField.d.ts +54 -14
  28. package/dist/components/color-picker/ColorPicker.d.ts +81 -30
  29. package/dist/components/color-picker/ColorPresets.d.ts +68 -13
  30. package/dist/components/color-swatches/ColorSwatches.d.ts +90 -18
  31. package/dist/components/command-menu/CommandMenu.d.ts +86 -27
  32. package/dist/components/composer/Composer.d.ts +82 -41
  33. package/dist/components/composer/useRecorder.d.ts +0 -2
  34. package/dist/components/confirm-dialog/ConfirmDialog.d.ts +40 -16
  35. package/dist/components/crossfade/Crossfade.d.ts +5 -8
  36. package/dist/components/data-table/ColumnsMenu.d.ts +6 -2
  37. package/dist/components/data-table/DataTable.d.ts +157 -58
  38. package/dist/components/data-table/Footer.d.ts +2 -4
  39. package/dist/components/data-table/Row.d.ts +1 -1
  40. package/dist/components/data-table/StateRows.d.ts +2 -2
  41. package/dist/components/data-table/reorder.d.ts +10 -10
  42. package/dist/components/data-table/types.d.ts +5 -0
  43. package/dist/components/data-table/useInfiniteRows.d.ts +3 -3
  44. package/dist/components/datepicker/Datepicker.d.ts +61 -12
  45. package/dist/components/datepicker/DatepickerPanel.d.ts +76 -16
  46. package/dist/components/datepicker/panelLayout.d.ts +6 -11
  47. package/dist/components/description-list/DescriptionList.d.ts +40 -11
  48. package/dist/components/digit-input/DigitInput.d.ts +50 -19
  49. package/dist/components/divider/Divider.d.ts +15 -5
  50. package/dist/components/dnd/Dnd.d.ts +152 -41
  51. package/dist/components/dnd/geometry.d.ts +0 -8
  52. package/dist/components/dnd/labels.d.ts +1 -1
  53. package/dist/components/dnd/useDropTarget.d.ts +0 -2
  54. package/dist/components/dnd/useSortableList.d.ts +6 -1
  55. package/dist/components/drawer/Drawer.d.ts +39 -18
  56. package/dist/components/dropdown/Dropdown.d.ts +90 -19
  57. package/dist/components/empty-page/EmptyPage.d.ts +14 -15
  58. package/dist/components/example-frame/ExampleFrame.d.ts +38 -8
  59. package/dist/components/field-list/FieldList.d.ts +57 -19
  60. package/dist/components/fieldset/Fieldset.d.ts +12 -7
  61. package/dist/components/file-upload/FileUpload.d.ts +119 -42
  62. package/dist/components/gallery/Gallery.d.ts +44 -16
  63. package/dist/components/gallery/layout.d.ts +4 -1
  64. package/dist/components/gantt/Gantt.d.ts +69 -34
  65. package/dist/components/gantt/GanttRow.d.ts +2 -2
  66. package/dist/components/hint/Hint.d.ts +10 -4
  67. package/dist/components/index.d.ts +18 -21
  68. package/dist/components/input/Input.d.ts +78 -25
  69. package/dist/components/kanban/Kanban.d.ts +64 -36
  70. package/dist/components/kbd/Kbd.d.ts +3 -1
  71. package/dist/components/label/Label.d.ts +33 -4
  72. package/dist/components/link-button/LinkButton.d.ts +40 -10
  73. package/dist/components/list/List.d.ts +48 -26
  74. package/dist/components/login-form/LoginForm.d.ts +66 -7
  75. package/dist/components/media-viewer/MediaViewer.d.ts +46 -18
  76. package/dist/components/media-viewer/physics.d.ts +0 -2
  77. package/dist/components/media-viewer/viewerEngine.d.ts +0 -1
  78. package/dist/components/message/Message.d.ts +27 -16
  79. package/dist/components/message/MessageCards.d.ts +49 -10
  80. package/dist/components/message/MessageFile.d.ts +19 -5
  81. package/dist/components/message/MessageParts.d.ts +44 -18
  82. package/dist/components/message/MessageReactionBar.d.ts +3 -1
  83. package/dist/components/message/MessageTyping.d.ts +10 -6
  84. package/dist/components/message/bubbleMorph.d.ts +2 -0
  85. package/dist/components/modal/Modal.d.ts +6 -6
  86. package/dist/components/native-select/NativeSelect.d.ts +22 -7
  87. package/dist/components/notification/Notification.d.ts +35 -11
  88. package/dist/components/notification/NotificationStore.d.ts +12 -3
  89. package/dist/components/pagination/Pagination.d.ts +29 -6
  90. package/dist/components/popover/Popover.d.ts +54 -31
  91. package/dist/components/progress-bar/ProgressBar.d.ts +37 -12
  92. package/dist/components/progress-circle/ProgressCircle.d.ts +32 -13
  93. package/dist/components/radio/Radio.d.ts +58 -15
  94. package/dist/components/scroll-container/ScrollContainer.d.ts +28 -14
  95. package/dist/components/scroll-container/useScrollEdges.d.ts +1 -24
  96. package/dist/components/segmented-control/SegmentedControl.d.ts +73 -15
  97. package/dist/components/select/Select.d.ts +104 -30
  98. package/dist/components/select/SelectItem.d.ts +35 -8
  99. package/dist/components/select/selectContext.d.ts +7 -19
  100. package/dist/components/sheet/Sheet.d.ts +32 -15
  101. package/dist/components/skeleton/Skeleton.d.ts +9 -3
  102. package/dist/components/slider/Slider.d.ts +55 -15
  103. package/dist/components/smart-filter/SmartFilter.d.ts +39 -13
  104. package/dist/components/sparkline/Sparkline.d.ts +42 -19
  105. package/dist/components/spinner/Spinner.d.ts +11 -5
  106. package/dist/components/stepper/Stepper.d.ts +41 -19
  107. package/dist/components/switch/Switch.d.ts +37 -12
  108. package/dist/components/tabs/Tabs.d.ts +61 -18
  109. package/dist/components/tag-select/TagSelect.d.ts +74 -20
  110. package/dist/components/textarea/Textarea.d.ts +52 -25
  111. package/dist/components/thumbnail/Thumbnail.d.ts +50 -20
  112. package/dist/components/timeline/Timeline.d.ts +85 -66
  113. package/dist/components/tooltip/Tooltip.d.ts +47 -17
  114. package/dist/components/typography/Typography.d.ts +32 -6
  115. package/dist/components/video-note/VideoNote.d.ts +7 -1
  116. package/dist/{internal → components/visually-hidden}/VisuallyHidden.d.ts +5 -5
  117. package/dist/components/voice-player/VoicePlayer.d.ts +16 -3
  118. package/dist/hooks/breakpoints.d.ts +10 -0
  119. package/dist/hooks/floatingPosition.d.ts +42 -0
  120. package/dist/hooks/useDraft.d.ts +12 -0
  121. package/dist/hooks/useEdgeOverflow.d.ts +5 -3
  122. package/dist/hooks/useElementSize.d.ts +31 -0
  123. package/dist/hooks/useEnterConfirm.d.ts +2 -1
  124. package/dist/hooks/useImageStatus.d.ts +12 -5
  125. package/dist/hooks/useLoadMore.d.ts +28 -0
  126. package/dist/hooks/useMediaQuery.d.ts +1 -3
  127. package/dist/hooks/useMergedRefs.d.ts +10 -4
  128. package/dist/hooks/useModalLayer.d.ts +13 -7
  129. package/dist/hooks/usePosition.d.ts +4 -42
  130. package/dist/hooks/usePresence.d.ts +4 -7
  131. package/dist/hooks/useScrollRegion.d.ts +28 -0
  132. package/dist/hooks/useStableValue.d.ts +6 -0
  133. package/dist/hooks/useSwipeDismiss.d.ts +38 -17
  134. package/dist/hooks/useVirtualRows.d.ts +9 -3
  135. package/dist/icon-set.js +2 -2
  136. package/dist/icons/Icon.d.ts +1 -1
  137. package/dist/icons/glyph.d.ts +9 -2
  138. package/dist/index.css +1 -1
  139. package/dist/index.js +15 -9
  140. package/dist/internal/AnchorRectContext.d.ts +2 -1
  141. package/dist/internal/ChartTooltip.d.ts +1 -1
  142. package/dist/internal/CheckMark.d.ts +2 -2
  143. package/dist/internal/ChoiceField.d.ts +29 -10
  144. package/dist/internal/ControlSizeContext.d.ts +16 -0
  145. package/dist/internal/Disclosure.d.ts +38 -9
  146. package/dist/internal/FieldAction.d.ts +20 -12
  147. package/dist/internal/FieldCommit.d.ts +8 -11
  148. package/dist/internal/FieldFrame.d.ts +100 -21
  149. package/dist/internal/MenuGroup.d.ts +3 -1
  150. package/dist/internal/MorphText.d.ts +2 -1
  151. package/dist/internal/ProgressLegend.d.ts +3 -2
  152. package/dist/internal/RegionSwap.d.ts +41 -0
  153. package/dist/internal/RollingNumber.d.ts +10 -1
  154. package/dist/internal/RowAction.d.ts +26 -0
  155. package/dist/internal/SwitcherScroller.d.ts +11 -0
  156. package/dist/internal/attachmentTile.d.ts +1 -1
  157. package/dist/internal/audio.d.ts +13 -0
  158. package/dist/internal/barPlan.d.ts +44 -0
  159. package/dist/{components/badge/tier.d.ts → internal/chipTier.d.ts} +7 -5
  160. package/dist/internal/context.d.ts +10 -1
  161. package/dist/internal/controlValue.d.ts +7 -0
  162. package/dist/internal/edgeAutoScroll.d.ts +43 -25
  163. package/dist/internal/fieldCell.d.ts +4 -3
  164. package/dist/internal/fieldClasses.d.ts +15 -2
  165. package/dist/internal/fileSize.d.ts +5 -1
  166. package/dist/internal/formatClock.d.ts +2 -0
  167. package/dist/internal/formatNumber.d.ts +6 -0
  168. package/dist/internal/glyphSwap.d.ts +5 -9
  169. package/dist/internal/hasContent.d.ts +6 -0
  170. package/dist/internal/highlightTsx.d.ts +12 -0
  171. package/dist/internal/iconBox.d.ts +6 -0
  172. package/dist/internal/iconLayout.d.ts +2 -1
  173. package/dist/internal/imageSlot.d.ts +6 -1
  174. package/dist/internal/interactiveElement.d.ts +41 -0
  175. package/dist/internal/labels.d.ts +6 -0
  176. package/dist/internal/leaveInPlace.d.ts +6 -5
  177. package/dist/internal/listPresence.d.ts +32 -0
  178. package/dist/internal/listbox.d.ts +71 -31
  179. package/dist/internal/longPress.d.ts +42 -0
  180. package/dist/internal/mediaDisk.d.ts +7 -4
  181. package/dist/internal/mediaPlayer.d.ts +91 -27
  182. package/dist/internal/mediaSession.d.ts +0 -6
  183. package/dist/internal/messageList.d.ts +4 -3
  184. package/dist/internal/motionTiming.d.ts +34 -0
  185. package/dist/internal/namedRole.d.ts +13 -0
  186. package/dist/internal/nodeText.d.ts +6 -0
  187. package/dist/{components/modal → internal/overlay}/DialogGuard.d.ts +3 -5
  188. package/dist/{components/modal → internal/overlay}/DialogParts.d.ts +86 -89
  189. package/dist/internal/overlay/FloatingPanel.d.ts +27 -5
  190. package/dist/internal/overlay/ModalDialog.d.ts +59 -0
  191. package/dist/internal/overlay/focus.d.ts +31 -6
  192. package/dist/internal/overlay/layerStack.d.ts +8 -5
  193. package/dist/internal/overlay/useAnchorName.d.ts +14 -0
  194. package/dist/internal/overlay/useContainScroll.d.ts +7 -0
  195. package/dist/internal/overlay/useFloatingLayer.d.ts +43 -14
  196. package/dist/internal/overlay/useOpenState.d.ts +22 -0
  197. package/dist/internal/partPresence.d.ts +31 -0
  198. package/dist/internal/parts.d.ts +39 -0
  199. package/dist/internal/progressSegments.d.ts +52 -12
  200. package/dist/internal/richText.d.ts +6 -34
  201. package/dist/internal/ring.d.ts +18 -8
  202. package/dist/internal/rovingFocus.d.ts +10 -5
  203. package/dist/{components/data-table/rowEvents.d.ts → internal/rowLink.d.ts} +0 -5
  204. package/dist/internal/scrollAncestors.d.ts +14 -0
  205. package/dist/internal/selectionIndicator.d.ts +27 -0
  206. package/dist/internal/slot.d.ts +23 -5
  207. package/dist/internal/states.d.ts +61 -0
  208. package/dist/internal/sticky.d.ts +5 -1
  209. package/dist/internal/swallowNextClick.d.ts +9 -0
  210. package/dist/internal/swatch.d.ts +59 -15
  211. package/dist/internal/textFormatting.d.ts +2 -1
  212. package/dist/internal/textFormattingToolbar.d.ts +3 -2
  213. package/dist/internal/tokenDefaults.d.ts +21 -0
  214. package/dist/internal/touchTarget.d.ts +5 -0
  215. package/dist/internal/transcript.d.ts +19 -18
  216. package/dist/internal/transfer.d.ts +22 -8
  217. package/dist/internal/transferDisk.d.ts +2 -3
  218. package/dist/internal/useFlipList.d.ts +44 -0
  219. package/dist/internal/useNearView.d.ts +4 -3
  220. package/dist/internal/usePendingChanges.d.ts +23 -0
  221. package/dist/internal/useRangeSelection.d.ts +2 -1
  222. package/dist/layout/app-shell/AppShell.d.ts +63 -18
  223. package/dist/layout/bottom-nav/BottomNav.d.ts +58 -22
  224. package/dist/layout/index.d.ts +4 -4
  225. package/dist/layout/page/Page.d.ts +263 -0
  226. package/dist/layout/sidebar/Sidebar.d.ts +232 -101
  227. package/dist/skill/SKILL.md +16 -16
  228. package/dist/skill/anti-slop.md +204 -27
  229. package/dist/skill/api-contract.md +115 -35
  230. package/dist/skill/cheatsheet.md +60 -55
  231. package/dist/skill/checklist.md +61 -89
  232. package/dist/skill/choosing.md +26 -27
  233. package/dist/skill/components.md +50 -50
  234. package/dist/skill/composition.md +220 -185
  235. package/dist/skill/foundations.md +39 -32
  236. package/dist/skill/layouts.md +82 -143
  237. package/dist/skill/motion.md +26 -31
  238. package/dist/skill/reference/components/accordion/COMPONENT.md +16 -9
  239. package/dist/skill/reference/components/accordion/examples/overview.tsx +2 -2
  240. package/dist/skill/reference/components/accordion/examples/sizes.tsx +6 -8
  241. package/dist/skill/reference/components/accordion/examples/states.tsx +27 -24
  242. package/dist/skill/reference/components/accordion/examples/variants.tsx +6 -8
  243. package/dist/skill/reference/components/accordion/examples/with-icon.tsx +22 -19
  244. package/dist/skill/reference/components/avatar/COMPONENT.md +24 -17
  245. package/dist/skill/reference/components/avatar/examples/examples.module.css +1 -4
  246. package/dist/skill/reference/components/avatar/examples/overview.tsx +3 -3
  247. package/dist/skill/reference/components/avatar/examples/presence.tsx +4 -4
  248. package/dist/skill/reference/components/avatar/examples/src-from-state.tsx +3 -3
  249. package/dist/skill/reference/components/avatar/examples/states.tsx +4 -4
  250. package/dist/skill/reference/components/avatar/examples/team-group.tsx +3 -3
  251. package/dist/skill/reference/components/badge/COMPONENT.md +66 -34
  252. package/dist/skill/reference/components/badge/examples/controlled.tsx +32 -0
  253. package/dist/skill/reference/components/badge/examples/examples.module.css +2 -2
  254. package/dist/skill/reference/components/badge/examples/filter-values.tsx +4 -6
  255. package/dist/skill/reference/components/badge/examples/in-controls.tsx +1 -1
  256. package/dist/skill/reference/components/badge/examples/overview.tsx +6 -5
  257. package/dist/skill/reference/components/badge/examples/square.tsx +21 -0
  258. package/dist/skill/reference/components/badge/examples/states.tsx +4 -4
  259. package/dist/skill/reference/components/badge/examples/with-icon.tsx +10 -1
  260. package/dist/skill/reference/components/banner/COMPONENT.md +13 -9
  261. package/dist/skill/reference/components/banner/examples/dismissible.tsx +3 -19
  262. package/dist/skill/reference/components/banner/examples/examples.module.css +6 -1
  263. package/dist/skill/reference/components/banner/examples/overview.tsx +1 -1
  264. package/dist/skill/reference/components/banner/examples/page-strip.tsx +24 -22
  265. package/dist/skill/reference/components/breadcrumb/COMPONENT.md +23 -16
  266. package/dist/skill/reference/components/breadcrumb/examples/examples.module.css +1 -1
  267. package/dist/skill/reference/components/breadcrumb/examples/overflow.tsx +1 -1
  268. package/dist/skill/reference/components/breadcrumb/examples/sizes.tsx +6 -8
  269. package/dist/skill/reference/components/breadcrumb/examples/with-icon.tsx +15 -8
  270. package/dist/skill/reference/components/button/COMPONENT.md +67 -30
  271. package/dist/skill/reference/components/button/examples/align.tsx +25 -0
  272. package/dist/skill/reference/components/button/examples/controlled.tsx +21 -0
  273. package/dist/skill/reference/components/button/examples/density.tsx +45 -0
  274. package/dist/skill/reference/components/button/examples/examples.module.css +14 -25
  275. package/dist/skill/reference/components/button/examples/hold-to-confirm.tsx +1 -1
  276. package/dist/skill/reference/components/button/examples/label-morph.tsx +1 -1
  277. package/dist/skill/reference/components/button/examples/on-colored-host.tsx +19 -19
  278. package/dist/skill/reference/components/button/examples/over-media.tsx +7 -1
  279. package/dist/skill/reference/components/button/examples/toggle.tsx +2 -10
  280. package/dist/skill/reference/components/button-group/COMPONENT.md +21 -15
  281. package/dist/skill/reference/components/button-group/examples/controlled.tsx +1 -1
  282. package/dist/skill/reference/components/card/COMPONENT.md +21 -10
  283. package/dist/skill/reference/components/card/examples/content-templates.tsx +8 -2
  284. package/dist/skill/reference/components/card/examples/examples.module.css +4 -16
  285. package/dist/skill/reference/components/card/examples/overview.tsx +11 -11
  286. package/dist/skill/reference/components/card/examples/screen.module.css +1 -1
  287. package/dist/skill/reference/components/card/examples/screen.tsx +185 -198
  288. package/dist/skill/reference/components/card/examples/variants.tsx +74 -47
  289. package/dist/skill/reference/components/chart-frame/COMPONENT.md +24 -28
  290. package/dist/skill/reference/components/chart-frame/examples/controlled.tsx +9 -7
  291. package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +13 -15
  292. package/dist/skill/reference/components/chart-frame/examples/narrow.tsx +24 -5
  293. package/dist/skill/reference/components/chart-frame/examples/overview.tsx +5 -2
  294. package/dist/skill/reference/components/chart-frame/examples/states.tsx +72 -64
  295. package/dist/skill/reference/components/chart-frame/examples/tooltip.tsx +27 -26
  296. package/dist/skill/reference/components/chat/COMPONENT.md +39 -26
  297. package/dist/skill/reference/components/chat/examples/group-chat.tsx +2 -2
  298. package/dist/skill/reference/components/chat/examples/overview.tsx +119 -130
  299. package/dist/skill/reference/components/chat/examples/reactions.tsx +18 -23
  300. package/dist/skill/reference/components/chat/examples/screen.module.css +1 -1
  301. package/dist/skill/reference/components/chat/examples/screen.tsx +212 -242
  302. package/dist/skill/reference/components/chat/examples/states.tsx +23 -22
  303. package/dist/skill/reference/components/chat-list/COMPONENT.md +11 -6
  304. package/dist/skill/reference/components/chat-list/examples/controlled.tsx +2 -2
  305. package/dist/skill/reference/components/chat-list/examples/examples.module.css +8 -8
  306. package/dist/skill/reference/components/chat-list/examples/live.tsx +29 -22
  307. package/dist/skill/reference/components/chat-list/examples/sizes.tsx +6 -8
  308. package/dist/skill/reference/components/chat-list/examples/states.tsx +42 -38
  309. package/dist/skill/reference/components/checkbox/COMPONENT.md +27 -14
  310. package/dist/skill/reference/components/checkbox/examples/controlled.tsx +18 -16
  311. package/dist/skill/reference/components/checkbox/examples/examples.module.css +15 -56
  312. package/dist/skill/reference/components/checkbox/examples/in-form.tsx +16 -16
  313. package/dist/skill/reference/components/checkbox/examples/indicator.tsx +19 -64
  314. package/dist/skill/reference/components/checkbox/examples/overview.tsx +1 -1
  315. package/dist/skill/reference/components/checkbox/examples/states.tsx +1 -1
  316. package/dist/skill/reference/components/checkbox/examples/without-label.tsx +1 -1
  317. package/dist/skill/reference/components/code-block/COMPONENT.md +16 -12
  318. package/dist/skill/reference/components/code-block/examples/color-scheme.tsx +2 -4
  319. package/dist/skill/reference/components/code-block/examples/examples.module.css +1 -9
  320. package/dist/skill/reference/components/code-block/examples/narrow.tsx +1 -1
  321. package/dist/skill/reference/components/color-field/COMPONENT.md +15 -9
  322. package/dist/skill/reference/components/color-field/examples/examples.module.css +4 -5
  323. package/dist/skill/reference/components/color-field/examples/in-form.tsx +15 -13
  324. package/dist/skill/reference/components/color-field/examples/sizes.tsx +5 -1
  325. package/dist/skill/reference/components/color-field/examples/states.tsx +15 -3
  326. package/dist/skill/reference/components/color-picker/COMPONENT.md +69 -22
  327. package/dist/skill/reference/components/color-picker/examples/controlled.tsx +16 -5
  328. package/dist/skill/reference/components/color-picker/examples/examples.module.css +8 -12
  329. package/dist/skill/reference/components/color-picker/examples/in-form.tsx +24 -22
  330. package/dist/skill/reference/components/color-picker/examples/overview.tsx +6 -11
  331. package/dist/skill/reference/components/color-picker/examples/panel.tsx +1 -1
  332. package/dist/skill/reference/components/color-picker/examples/sizes.tsx +10 -16
  333. package/dist/skill/reference/components/color-picker/examples/states.tsx +28 -23
  334. package/dist/skill/reference/components/color-swatches/COMPONENT.md +22 -8
  335. package/dist/skill/reference/components/color-swatches/examples/examples.module.css +3 -4
  336. package/dist/skill/reference/components/color-swatches/examples/in-form.tsx +19 -17
  337. package/dist/skill/reference/components/color-swatches/examples/palette.tsx +24 -0
  338. package/dist/skill/reference/components/color-swatches/examples/wrapping.tsx +17 -2
  339. package/dist/skill/reference/components/command-menu/COMPONENT.md +60 -20
  340. package/dist/skill/reference/components/command-menu/examples/sizes.tsx +20 -15
  341. package/dist/skill/reference/components/command-menu/examples/states.tsx +46 -24
  342. package/dist/skill/reference/components/composer/COMPONENT.md +42 -24
  343. package/dist/skill/reference/components/composer/examples/examples.module.css +0 -9
  344. package/dist/skill/reference/components/composer/examples/narrow.tsx +1 -1
  345. package/dist/skill/reference/components/composer/examples/reply-edit.tsx +3 -3
  346. package/dist/skill/reference/components/composer/examples/sizes.tsx +3 -5
  347. package/dist/skill/reference/components/composer/examples/states.tsx +4 -6
  348. package/dist/skill/reference/components/confirm-dialog/COMPONENT.md +26 -13
  349. package/dist/skill/reference/components/confirm-dialog/examples/dismiss.tsx +27 -0
  350. package/dist/skill/reference/components/confirm-dialog/examples/failure.tsx +9 -16
  351. package/dist/skill/reference/components/crossfade/COMPONENT.md +13 -7
  352. package/dist/skill/reference/components/crossfade/examples/examples.module.css +1 -40
  353. package/dist/skill/reference/components/crossfade/examples/fill.tsx +16 -19
  354. package/dist/skill/reference/components/crossfade/examples/overview.tsx +14 -16
  355. package/dist/skill/reference/components/crossfade/examples/record-switch.tsx +6 -11
  356. package/dist/skill/reference/components/crossfade/examples/screen.module.css +1 -24
  357. package/dist/skill/reference/components/crossfade/examples/screen.tsx +108 -124
  358. package/dist/skill/reference/components/data-table/COMPONENT.md +36 -26
  359. package/dist/skill/reference/components/data-table/examples/controlled.tsx +14 -2
  360. package/dist/skill/reference/components/data-table/examples/examples.module.css +10 -9
  361. package/dist/skill/reference/components/data-table/examples/narrow.tsx +5 -1
  362. package/dist/skill/reference/components/data-table/examples/row-link.tsx +2 -1
  363. package/dist/skill/reference/components/data-table/examples/screen.module.css +2 -2
  364. package/dist/skill/reference/components/data-table/examples/screen.tsx +53 -62
  365. package/dist/skill/reference/components/data-table/examples/server.tsx +6 -2
  366. package/dist/skill/reference/components/data-table/examples/sizes.tsx +17 -17
  367. package/dist/skill/reference/components/data-table/examples/states.tsx +37 -29
  368. package/dist/skill/reference/components/datepicker/COMPONENT.md +53 -22
  369. package/dist/skill/reference/components/datepicker/examples/dismiss.tsx +15 -0
  370. package/dist/skill/reference/components/datepicker/examples/examples.module.css +9 -2
  371. package/dist/skill/reference/components/datepicker/examples/in-form.tsx +33 -25
  372. package/dist/skill/reference/components/datepicker/examples/inline-panel.tsx +3 -1
  373. package/dist/skill/reference/components/datepicker/examples/sizes.tsx +2 -2
  374. package/dist/skill/reference/components/datepicker/examples/states.tsx +2 -2
  375. package/dist/skill/reference/components/datepicker/examples/validation.tsx +3 -3
  376. package/dist/skill/reference/components/description-list/COMPONENT.md +24 -9
  377. package/dist/skill/reference/components/description-list/examples/examples.module.css +4 -24
  378. package/dist/skill/reference/components/description-list/examples/narrow.tsx +1 -1
  379. package/dist/skill/reference/components/description-list/examples/screen.module.css +0 -18
  380. package/dist/skill/reference/components/description-list/examples/screen.tsx +119 -134
  381. package/dist/skill/reference/components/description-list/examples/sizes.tsx +2 -4
  382. package/dist/skill/reference/components/description-list/examples/structure.tsx +6 -7
  383. package/dist/skill/reference/components/description-list/examples/totals.tsx +40 -0
  384. package/dist/skill/reference/components/digit-input/COMPONENT.md +12 -6
  385. package/dist/skill/reference/components/digit-input/examples/examples.module.css +2 -2
  386. package/dist/skill/reference/components/digit-input/examples/grouped.tsx +4 -4
  387. package/dist/skill/reference/components/digit-input/examples/in-form.tsx +1 -1
  388. package/dist/skill/reference/components/digit-input/examples/sizes.tsx +5 -3
  389. package/dist/skill/reference/components/digit-input/examples/states.tsx +14 -6
  390. package/dist/skill/reference/components/digit-input/examples/validation.tsx +1 -1
  391. package/dist/skill/reference/components/divider/COMPONENT.md +28 -14
  392. package/dist/skill/reference/components/divider/examples/align.tsx +2 -4
  393. package/dist/skill/reference/components/divider/examples/examples.module.css +16 -17
  394. package/dist/skill/reference/components/divider/examples/or-separator.tsx +3 -5
  395. package/dist/skill/reference/components/divider/examples/overview.tsx +18 -16
  396. package/dist/skill/reference/components/divider/examples/vertical.tsx +25 -8
  397. package/dist/skill/reference/components/divider/examples/with-icon.tsx +1 -1
  398. package/dist/skill/reference/components/dnd/COMPONENT.md +52 -34
  399. package/dist/skill/reference/components/dnd/examples/drop-zones.tsx +1 -1
  400. package/dist/skill/reference/components/dnd/examples/examples.module.css +7 -7
  401. package/dist/skill/reference/components/dnd/examples/states.tsx +41 -35
  402. package/dist/skill/reference/components/drawer/COMPONENT.md +38 -15
  403. package/dist/skill/reference/components/drawer/examples/guard.tsx +1 -3
  404. package/dist/skill/reference/components/drawer/examples/header-actions.tsx +1 -1
  405. package/dist/skill/reference/components/drawer/examples/in-form.tsx +31 -31
  406. package/dist/skill/reference/components/drawer/examples/placement.tsx +1 -1
  407. package/dist/skill/reference/components/drawer/examples/screen.tsx +137 -160
  408. package/dist/skill/reference/components/drawer/examples/sizes.tsx +32 -27
  409. package/dist/skill/reference/components/dropdown/COMPONENT.md +59 -24
  410. package/dist/skill/reference/components/dropdown/examples/context-menu.tsx +75 -0
  411. package/dist/skill/reference/components/dropdown/examples/examples.module.css +1 -1
  412. package/dist/skill/reference/components/dropdown/examples/sizes.tsx +39 -34
  413. package/dist/skill/reference/components/dropdown/examples/states.tsx +37 -29
  414. package/dist/skill/reference/components/empty-page/COMPONENT.md +20 -9
  415. package/dist/skill/reference/components/empty-page/examples/compact.tsx +28 -18
  416. package/dist/skill/reference/components/empty-page/examples/examples.module.css +0 -43
  417. package/dist/skill/reference/components/empty-page/examples/narrow.tsx +3 -3
  418. package/dist/skill/reference/components/empty-page/examples/region-error.tsx +6 -11
  419. package/dist/skill/reference/components/empty-page/examples/sizes.tsx +13 -13
  420. package/dist/skill/reference/components/empty-page/examples/variants.tsx +34 -30
  421. package/dist/skill/reference/components/example-frame/COMPONENT.md +23 -11
  422. package/dist/skill/reference/components/example-frame/examples/controlled.tsx +3 -3
  423. package/dist/skill/reference/components/field-list/COMPONENT.md +14 -8
  424. package/dist/skill/reference/components/field-list/examples/screen.module.css +1 -1
  425. package/dist/skill/reference/components/field-list/examples/screen.tsx +19 -19
  426. package/dist/skill/reference/components/field-list/examples/sizes.tsx +32 -26
  427. package/dist/skill/reference/components/field-list/examples/states.tsx +37 -31
  428. package/dist/skill/reference/components/fieldset/COMPONENT.md +11 -6
  429. package/dist/skill/reference/components/fieldset/examples/examples.module.css +1 -1
  430. package/dist/skill/reference/components/fieldset/examples/states.tsx +1 -1
  431. package/dist/skill/reference/components/file-upload/COMPONENT.md +68 -30
  432. package/dist/skill/reference/components/file-upload/examples/avatar-upload.tsx +5 -5
  433. package/dist/skill/reference/components/file-upload/examples/custom-body.tsx +12 -7
  434. package/dist/skill/reference/components/file-upload/examples/examples.module.css +4 -4
  435. package/dist/skill/reference/components/file-upload/examples/narrow.tsx +1 -1
  436. package/dist/skill/reference/components/file-upload/examples/row-parts.tsx +4 -4
  437. package/dist/skill/reference/components/file-upload/examples/screen.module.css +4 -4
  438. package/dist/skill/reference/components/file-upload/examples/screen.tsx +70 -84
  439. package/dist/skill/reference/components/file-upload/examples/sizes.tsx +1 -3
  440. package/dist/skill/reference/components/file-upload/examples/states.tsx +1 -3
  441. package/dist/skill/reference/components/file-upload/examples/variants.tsx +13 -7
  442. package/dist/skill/reference/components/gallery/COMPONENT.md +17 -7
  443. package/dist/skill/reference/components/gallery/examples/album-sizes.tsx +52 -0
  444. package/dist/skill/reference/components/gallery/examples/controlled.tsx +40 -0
  445. package/dist/skill/reference/components/gallery/examples/examples.module.css +1 -1
  446. package/dist/skill/reference/components/gallery/examples/overview.tsx +15 -43
  447. package/dist/skill/reference/components/gallery/examples/transfer.tsx +22 -13
  448. package/dist/skill/reference/components/gantt/COMPONENT.md +21 -15
  449. package/dist/skill/reference/components/gantt/examples/examples.module.css +0 -16
  450. package/dist/skill/reference/components/gantt/examples/occupancy.tsx +2 -2
  451. package/dist/skill/reference/components/gantt/examples/screen.module.css +1 -1
  452. package/dist/skill/reference/components/gantt/examples/screen.tsx +56 -74
  453. package/dist/skill/reference/components/gantt/examples/sizes.tsx +16 -16
  454. package/dist/skill/reference/components/gantt/examples/states.tsx +34 -30
  455. package/dist/skill/reference/components/gantt/examples/variants.tsx +27 -25
  456. package/dist/skill/reference/components/hint/COMPONENT.md +24 -14
  457. package/dist/skill/reference/components/hint/examples/examples.module.css +10 -1
  458. package/dist/skill/reference/components/hint/examples/hint-or-error.tsx +2 -2
  459. package/dist/skill/reference/components/hint/examples/overview.tsx +10 -11
  460. package/dist/skill/reference/components/hint/examples/sizes.tsx +1 -1
  461. package/dist/skill/reference/components/input/COMPONENT.md +10 -6
  462. package/dist/skill/reference/components/input/examples/affixes.tsx +2 -2
  463. package/dist/skill/reference/components/input/examples/examples.module.css +1 -1
  464. package/dist/skill/reference/components/input/examples/sizes.tsx +9 -5
  465. package/dist/skill/reference/components/input/examples/states.tsx +39 -23
  466. package/dist/skill/reference/components/input/examples/with-icon.tsx +24 -16
  467. package/dist/skill/reference/components/kanban/COMPONENT.md +30 -24
  468. package/dist/skill/reference/components/kanban/examples/columns.tsx +14 -19
  469. package/dist/skill/reference/components/kanban/examples/item-link.tsx +2 -2
  470. package/dist/skill/reference/components/kanban/examples/limits.tsx +1 -1
  471. package/dist/skill/reference/components/kanban/examples/narrow.tsx +1 -1
  472. package/dist/skill/reference/components/kanban/examples/screen.module.css +2 -4
  473. package/dist/skill/reference/components/kanban/examples/screen.tsx +55 -68
  474. package/dist/skill/reference/components/kanban/examples/states.tsx +37 -58
  475. package/dist/skill/reference/components/kanban/examples/variants.tsx +0 -3
  476. package/dist/skill/reference/components/kbd/COMPONENT.md +11 -7
  477. package/dist/skill/reference/components/kbd/examples/examples.module.css +1 -20
  478. package/dist/skill/reference/components/kbd/examples/in-controls.tsx +2 -2
  479. package/dist/skill/reference/components/kbd/examples/shortcut-list.tsx +14 -26
  480. package/dist/skill/reference/components/label/COMPONENT.md +26 -11
  481. package/dist/skill/reference/components/label/examples/examples.module.css +12 -9
  482. package/dist/skill/reference/components/label/examples/overview.tsx +6 -10
  483. package/dist/skill/reference/components/label/examples/structure.tsx +2 -2
  484. package/dist/skill/reference/components/link-button/COMPONENT.md +33 -20
  485. package/dist/skill/reference/components/link-button/examples/as-child.tsx +1 -1
  486. package/dist/skill/reference/components/link-button/examples/external-link.tsx +1 -1
  487. package/dist/skill/reference/components/link-button/examples/overview.tsx +4 -2
  488. package/dist/skill/reference/components/link-button/examples/variants.tsx +2 -2
  489. package/dist/skill/reference/components/list/COMPONENT.md +24 -16
  490. package/dist/skill/reference/components/list/examples/examples.module.css +0 -8
  491. package/dist/skill/reference/components/list/examples/overflow.tsx +1 -1
  492. package/dist/skill/reference/components/list/examples/overview.tsx +31 -30
  493. package/dist/skill/reference/components/list/examples/sizes.tsx +23 -23
  494. package/dist/skill/reference/components/list/examples/states.tsx +38 -21
  495. package/dist/skill/reference/components/list/examples/with-icon.tsx +16 -14
  496. package/dist/skill/reference/components/login-form/COMPONENT.md +69 -16
  497. package/dist/skill/reference/components/login-form/examples/narrow.tsx +1 -1
  498. package/dist/skill/reference/components/login-form/examples/register.tsx +1 -1
  499. package/dist/skill/reference/components/media-viewer/COMPONENT.md +12 -8
  500. package/dist/skill/reference/components/media-viewer/examples/controlled.tsx +16 -16
  501. package/dist/skill/reference/components/media-viewer/examples/examples.module.css +3 -5
  502. package/dist/skill/reference/components/media-viewer/examples/video.tsx +1 -1
  503. package/dist/skill/reference/components/message/COMPONENT.md +102 -46
  504. package/dist/skill/reference/components/message/examples/typing.tsx +5 -5
  505. package/dist/skill/reference/components/modal/COMPONENT.md +71 -37
  506. package/dist/skill/reference/components/modal/examples/dismiss.tsx +35 -27
  507. package/dist/skill/reference/components/modal/examples/enter-key.tsx +22 -25
  508. package/dist/skill/reference/components/modal/examples/examples.module.css +0 -7
  509. package/dist/skill/reference/components/modal/examples/guard.tsx +2 -4
  510. package/dist/skill/reference/components/modal/examples/in-form.tsx +28 -28
  511. package/dist/skill/reference/components/modal/examples/long-content.tsx +6 -4
  512. package/dist/skill/reference/components/modal/examples/sizes.tsx +36 -31
  513. package/dist/skill/reference/components/modal/examples/structure.tsx +1 -1
  514. package/dist/skill/reference/components/native-select/COMPONENT.md +7 -3
  515. package/dist/skill/reference/components/native-select/examples/examples.module.css +3 -3
  516. package/dist/skill/reference/components/native-select/examples/in-form.tsx +28 -29
  517. package/dist/skill/reference/components/native-select/examples/sizes.tsx +2 -2
  518. package/dist/skill/reference/components/native-select/examples/states.tsx +2 -2
  519. package/dist/skill/reference/components/notification/COMPONENT.md +36 -31
  520. package/dist/skill/reference/components/notification/examples/examples.module.css +1 -2
  521. package/dist/skill/reference/components/notification/examples/in-form.tsx +28 -20
  522. package/dist/skill/reference/components/notification/examples/sizes.tsx +16 -12
  523. package/dist/skill/reference/components/notification/examples/undo.tsx +7 -15
  524. package/dist/skill/reference/components/pagination/COMPONENT.md +29 -18
  525. package/dist/skill/reference/components/pagination/examples/controlled.tsx +2 -1
  526. package/dist/skill/reference/components/pagination/examples/narrow.tsx +5 -5
  527. package/dist/skill/reference/components/popover/COMPONENT.md +44 -20
  528. package/dist/skill/reference/components/popover/examples/controlled-open.tsx +6 -4
  529. package/dist/skill/reference/components/popover/examples/dismiss.tsx +37 -28
  530. package/dist/skill/reference/components/popover/examples/examples.module.css +2 -2
  531. package/dist/skill/reference/components/popover/examples/sizes.tsx +32 -27
  532. package/dist/skill/reference/components/popover/examples/width.tsx +57 -0
  533. package/dist/skill/reference/components/progress-bar/COMPONENT.md +21 -29
  534. package/dist/skill/reference/components/progress-bar/examples/examples.module.css +1 -1
  535. package/dist/skill/reference/components/progress-circle/COMPONENT.md +21 -29
  536. package/dist/skill/reference/components/progress-circle/examples/examples.module.css +1 -1
  537. package/dist/skill/reference/components/progress-circle/examples/on-color.tsx +16 -0
  538. package/dist/skill/reference/components/progress-circle/examples/variants.tsx +1 -0
  539. package/dist/skill/reference/components/radio/COMPONENT.md +13 -4
  540. package/dist/skill/reference/components/radio/examples/examples.module.css +1 -1
  541. package/dist/skill/reference/components/scroll-container/COMPONENT.md +18 -12
  542. package/dist/skill/reference/components/scroll-container/examples/auto-scroll.tsx +8 -4
  543. package/dist/skill/reference/components/scroll-container/examples/edges.tsx +4 -4
  544. package/dist/skill/reference/components/scroll-container/examples/examples.module.css +7 -51
  545. package/dist/skill/reference/components/scroll-container/examples/load-more.tsx +4 -4
  546. package/dist/skill/reference/components/scroll-container/examples/lock.tsx +4 -4
  547. package/dist/skill/reference/components/scroll-container/examples/log.tsx +97 -0
  548. package/dist/skill/reference/components/scroll-container/examples/overscroll.tsx +4 -4
  549. package/dist/skill/reference/components/scroll-container/examples/overview.tsx +5 -5
  550. package/dist/skill/reference/components/scroll-container/examples/scrollbar.tsx +4 -4
  551. package/dist/skill/reference/components/scroll-container/examples/snap.tsx +2 -2
  552. package/dist/skill/reference/components/scroll-container/examples/variants.tsx +1 -0
  553. package/dist/skill/reference/components/segmented-control/COMPONENT.md +24 -12
  554. package/dist/skill/reference/components/segmented-control/examples/controlled.tsx +2 -4
  555. package/dist/skill/reference/components/segmented-control/examples/examples.module.css +0 -8
  556. package/dist/skill/reference/components/segmented-control/examples/scroll.tsx +1 -1
  557. package/dist/skill/reference/components/select/COMPONENT.md +33 -9
  558. package/dist/skill/reference/components/select/examples/dismiss.tsx +26 -0
  559. package/dist/skill/reference/components/select/examples/examples.module.css +1 -1
  560. package/dist/skill/reference/components/select/examples/server-search.tsx +6 -2
  561. package/dist/skill/reference/components/select/examples/sizes.tsx +2 -2
  562. package/dist/skill/reference/components/select/examples/states.tsx +2 -2
  563. package/dist/skill/reference/components/select/examples/with-icon.tsx +20 -18
  564. package/dist/skill/reference/components/sheet/COMPONENT.md +44 -21
  565. package/dist/skill/reference/components/sheet/examples/header-actions.tsx +23 -4
  566. package/dist/skill/reference/components/sheet/examples/overview.tsx +25 -10
  567. package/dist/skill/reference/components/skeleton/COMPONENT.md +8 -4
  568. package/dist/skill/reference/components/skeleton/examples/examples.module.css +1 -13
  569. package/dist/skill/reference/components/skeleton/examples/with-crossfade.tsx +7 -7
  570. package/dist/skill/reference/components/slider/COMPONENT.md +13 -8
  571. package/dist/skill/reference/components/slider/examples/examples.module.css +6 -7
  572. package/dist/skill/reference/components/slider/examples/hint-and-error.tsx +3 -5
  573. package/dist/skill/reference/components/slider/examples/in-form.tsx +21 -19
  574. package/dist/skill/reference/components/slider/examples/states.tsx +14 -10
  575. package/dist/skill/reference/components/smart-filter/COMPONENT.md +42 -22
  576. package/dist/skill/reference/components/smart-filter/examples/examples.module.css +3 -21
  577. package/dist/skill/reference/components/smart-filter/examples/many-values.tsx +12 -8
  578. package/dist/skill/reference/components/smart-filter/examples/ranges.tsx +2 -1
  579. package/dist/skill/reference/components/smart-filter/examples/sizes.tsx +9 -7
  580. package/dist/skill/reference/components/sparkline/COMPONENT.md +8 -3
  581. package/dist/skill/reference/components/sparkline/examples/curve.tsx +16 -11
  582. package/dist/skill/reference/components/sparkline/examples/examples.module.css +1 -1
  583. package/dist/skill/reference/components/sparkline/examples/signed-bars.tsx +2 -2
  584. package/dist/skill/reference/components/sparkline/examples/states.tsx +14 -10
  585. package/dist/skill/reference/components/spinner/COMPONENT.md +15 -9
  586. package/dist/skill/reference/components/spinner/examples/examples.module.css +2 -14
  587. package/dist/skill/reference/components/spinner/examples/overview.tsx +1 -1
  588. package/dist/skill/reference/components/stepper/COMPONENT.md +50 -41
  589. package/dist/skill/reference/components/stepper/examples/examples.module.css +1 -6
  590. package/dist/skill/reference/components/stepper/examples/narrow.tsx +1 -1
  591. package/dist/skill/reference/components/stepper/examples/sizes.tsx +6 -8
  592. package/dist/skill/reference/components/stepper/examples/states.tsx +44 -43
  593. package/dist/skill/reference/components/stepper/examples/with-icon.tsx +19 -17
  594. package/dist/skill/reference/components/switch/COMPONENT.md +22 -9
  595. package/dist/skill/reference/components/switch/examples/examples.module.css +2 -2
  596. package/dist/skill/reference/components/switch/examples/states.tsx +3 -3
  597. package/dist/skill/reference/components/tabs/COMPONENT.md +21 -16
  598. package/dist/skill/reference/components/tabs/examples/in-drawer.tsx +1 -1
  599. package/dist/skill/reference/components/tabs/examples/sizes.tsx +5 -10
  600. package/dist/skill/reference/components/tabs/examples/variants.tsx +19 -23
  601. package/dist/skill/reference/components/tag-select/COMPONENT.md +19 -6
  602. package/dist/skill/reference/components/tag-select/examples/creatable.tsx +2 -2
  603. package/dist/skill/reference/components/tag-select/examples/dismiss.tsx +23 -0
  604. package/dist/skill/reference/components/tag-select/examples/examples.module.css +3 -3
  605. package/dist/skill/reference/components/tag-select/examples/in-form.tsx +31 -32
  606. package/dist/skill/reference/components/tag-select/examples/sizes.tsx +2 -2
  607. package/dist/skill/reference/components/tag-select/examples/states.tsx +2 -2
  608. package/dist/skill/reference/components/textarea/COMPONENT.md +10 -6
  609. package/dist/skill/reference/components/textarea/examples/examples.module.css +3 -10
  610. package/dist/skill/reference/components/textarea/examples/in-form.tsx +3 -3
  611. package/dist/skill/reference/components/textarea/examples/sizes.tsx +10 -7
  612. package/dist/skill/reference/components/textarea/examples/states.tsx +29 -13
  613. package/dist/skill/reference/components/textarea/examples/validation.tsx +45 -36
  614. package/dist/skill/reference/components/thumbnail/COMPONENT.md +17 -13
  615. package/dist/skill/reference/components/thumbnail/examples/examples.module.css +1 -1
  616. package/dist/skill/reference/components/thumbnail/examples/states.tsx +1 -1
  617. package/dist/skill/reference/components/thumbnail/examples/variants.tsx +12 -1
  618. package/dist/skill/reference/components/timeline/COMPONENT.md +51 -35
  619. package/dist/skill/reference/components/timeline/examples/links.tsx +14 -14
  620. package/dist/skill/reference/components/timeline/examples/narrow.tsx +6 -6
  621. package/dist/skill/reference/components/timeline/examples/overview.tsx +6 -6
  622. package/dist/skill/reference/components/timeline/examples/sizes.tsx +28 -23
  623. package/dist/skill/reference/components/timeline/examples/structure.tsx +30 -30
  624. package/dist/skill/reference/components/timeline/examples/variants.tsx +40 -28
  625. package/dist/skill/reference/components/tooltip/COMPONENT.md +10 -6
  626. package/dist/skill/reference/components/tooltip/examples/examples.module.css +1 -5
  627. package/dist/skill/reference/components/tooltip/examples/non-interactive-trigger.tsx +1 -1
  628. package/dist/skill/reference/components/tooltip/examples/sizes.tsx +17 -10
  629. package/dist/skill/reference/components/typography/COMPONENT.md +18 -3
  630. package/dist/skill/reference/components/typography/examples/examples.module.css +3 -6
  631. package/dist/skill/reference/components/typography/examples/numeric.tsx +16 -0
  632. package/dist/skill/reference/components/video-note/COMPONENT.md +11 -7
  633. package/dist/skill/reference/components/visually-hidden/COMPONENT.md +8 -4
  634. package/dist/skill/reference/components/visually-hidden/examples/assertive.tsx +1 -1
  635. package/dist/skill/reference/components/visually-hidden/examples/overview.tsx +17 -7
  636. package/dist/skill/reference/components/voice-player/COMPONENT.md +15 -7
  637. package/dist/skill/reference/foundation.md +568 -0
  638. package/dist/skill/reference/layout/app-shell/COMPONENT.md +53 -36
  639. package/dist/skill/reference/layout/app-shell/examples/examples.module.css +2 -22
  640. package/dist/skill/reference/layout/app-shell/examples/footer.tsx +10 -10
  641. package/dist/skill/reference/layout/app-shell/examples/overview.tsx +21 -25
  642. package/dist/skill/reference/layout/app-shell/examples/screen.module.css +2 -2
  643. package/dist/skill/reference/layout/app-shell/examples/screen.tsx +48 -47
  644. package/dist/skill/reference/layout/app-shell/examples/template.tsx +13 -17
  645. package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +30 -20
  646. package/dist/skill/reference/layout/bottom-nav/examples/examples.module.css +2 -7
  647. package/dist/skill/reference/layout/bottom-nav/examples/floating-action.tsx +10 -19
  648. package/dist/skill/reference/layout/bottom-nav/examples/floating.tsx +10 -19
  649. package/dist/skill/reference/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
  650. package/dist/skill/reference/layout/bottom-nav/examples/router.tsx +6 -5
  651. package/dist/skill/reference/layout/page/COMPONENT.md +353 -0
  652. package/dist/skill/reference/layout/page/examples/actions-collapse.tsx +45 -0
  653. package/dist/skill/reference/layout/page/examples/collapse.tsx +68 -0
  654. package/dist/skill/reference/{components/page-content → layout/page}/examples/examples.module.css +32 -16
  655. package/{src/components/page-content → dist/skill/reference/layout/page}/examples/grid.tsx +18 -16
  656. package/dist/skill/reference/layout/page/examples/list-detail.tsx +112 -0
  657. package/dist/skill/reference/layout/page/examples/narrow.tsx +75 -0
  658. package/dist/skill/reference/layout/page/examples/overview.tsx +57 -0
  659. package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.module.css +1 -1
  660. package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx +29 -19
  661. package/{src/components/page-content → dist/skill/reference/layout/page}/examples/sections.tsx +17 -24
  662. package/dist/skill/reference/layout/page/examples/structure.tsx +41 -0
  663. package/dist/skill/reference/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
  664. package/dist/skill/reference/layout/page/examples/top-bar.tsx +85 -0
  665. package/dist/skill/reference/{components/page-content → layout/page}/examples/variants.tsx +13 -13
  666. package/dist/skill/reference/layout/sidebar/COMPONENT.md +51 -40
  667. package/dist/skill/reference/layout/sidebar/examples/account.tsx +1 -3
  668. package/dist/skill/reference/layout/sidebar/examples/brand-header.tsx +1 -3
  669. package/dist/skill/reference/layout/sidebar/examples/collapsible-groups.tsx +1 -3
  670. package/dist/skill/reference/layout/sidebar/examples/controlled-open.tsx +1 -3
  671. package/dist/skill/reference/layout/sidebar/examples/controlled.tsx +1 -3
  672. package/dist/skill/reference/layout/sidebar/examples/custom-part.tsx +1 -3
  673. package/dist/skill/reference/layout/sidebar/examples/dismiss.tsx +50 -0
  674. package/dist/skill/reference/layout/sidebar/examples/examples.module.css +7 -32
  675. package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +47 -42
  676. package/dist/skill/reference/layout/sidebar/examples/nested-items.tsx +1 -3
  677. package/dist/skill/reference/layout/sidebar/examples/overview.tsx +1 -3
  678. package/dist/skill/reference/layout/sidebar/examples/persist.tsx +1 -3
  679. package/dist/skill/reference/layout/sidebar/examples/router.tsx +12 -13
  680. package/dist/skill/reference/layout/sidebar/examples/sizes.tsx +6 -6
  681. package/dist/skill/responsive.md +116 -105
  682. package/dist/skill/ux.md +21 -9
  683. package/dist/theme/applyTheme.d.ts +7 -6
  684. package/dist/tokens/hues.d.ts +8 -0
  685. package/dist/tokens/layers.d.ts +5 -16
  686. package/dist/tokens/offGrid.d.ts +7 -0
  687. package/dist/tokens/primitives.d.ts +34 -9
  688. package/dist/tokens/semantic.d.ts +208 -51
  689. package/dist/tokens/themes/dark.d.ts +39 -33
  690. package/package.json +5 -3
  691. package/src/components/accordion/COMPONENT.md +16 -9
  692. package/src/components/accordion/examples/overview.tsx +2 -2
  693. package/src/components/accordion/examples/sizes.tsx +6 -8
  694. package/src/components/accordion/examples/states.tsx +27 -24
  695. package/src/components/accordion/examples/variants.tsx +6 -8
  696. package/src/components/accordion/examples/with-icon.tsx +22 -19
  697. package/src/components/avatar/COMPONENT.md +24 -17
  698. package/src/components/avatar/examples/examples.module.css +1 -4
  699. package/src/components/avatar/examples/overview.tsx +3 -3
  700. package/src/components/avatar/examples/presence.tsx +4 -4
  701. package/src/components/avatar/examples/src-from-state.tsx +3 -3
  702. package/src/components/avatar/examples/states.tsx +4 -4
  703. package/src/components/avatar/examples/team-group.tsx +3 -3
  704. package/src/components/badge/COMPONENT.md +66 -34
  705. package/src/components/badge/examples/controlled.tsx +32 -0
  706. package/src/components/badge/examples/examples.module.css +2 -2
  707. package/src/components/badge/examples/filter-values.tsx +4 -6
  708. package/src/components/badge/examples/in-controls.tsx +1 -1
  709. package/src/components/badge/examples/overview.tsx +6 -5
  710. package/src/components/badge/examples/square.tsx +21 -0
  711. package/src/components/badge/examples/states.tsx +4 -4
  712. package/src/components/badge/examples/with-icon.tsx +10 -1
  713. package/src/components/banner/COMPONENT.md +13 -9
  714. package/src/components/banner/examples/dismissible.tsx +3 -19
  715. package/src/components/banner/examples/examples.module.css +6 -1
  716. package/src/components/banner/examples/overview.tsx +1 -1
  717. package/src/components/banner/examples/page-strip.tsx +24 -22
  718. package/src/components/breadcrumb/COMPONENT.md +23 -16
  719. package/src/components/breadcrumb/examples/examples.module.css +1 -1
  720. package/src/components/breadcrumb/examples/overflow.tsx +1 -1
  721. package/src/components/breadcrumb/examples/sizes.tsx +6 -8
  722. package/src/components/breadcrumb/examples/with-icon.tsx +15 -8
  723. package/src/components/button/COMPONENT.md +67 -30
  724. package/src/components/button/examples/align.tsx +25 -0
  725. package/src/components/button/examples/controlled.tsx +21 -0
  726. package/src/components/button/examples/density.tsx +45 -0
  727. package/src/components/button/examples/examples.module.css +14 -25
  728. package/src/components/button/examples/hold-to-confirm.tsx +1 -1
  729. package/src/components/button/examples/label-morph.tsx +1 -1
  730. package/src/components/button/examples/on-colored-host.tsx +19 -19
  731. package/src/components/button/examples/over-media.tsx +7 -1
  732. package/src/components/button/examples/toggle.tsx +2 -10
  733. package/src/components/button-group/COMPONENT.md +21 -15
  734. package/src/components/button-group/examples/controlled.tsx +1 -1
  735. package/src/components/card/COMPONENT.md +21 -10
  736. package/src/components/card/examples/content-templates.tsx +8 -2
  737. package/src/components/card/examples/examples.module.css +4 -16
  738. package/src/components/card/examples/overview.tsx +11 -11
  739. package/src/components/card/examples/screen.module.css +1 -1
  740. package/src/components/card/examples/screen.tsx +185 -198
  741. package/src/components/card/examples/variants.tsx +74 -47
  742. package/src/components/chart-frame/COMPONENT.md +24 -28
  743. package/src/components/chart-frame/examples/controlled.tsx +9 -7
  744. package/src/components/chart-frame/examples/fill-height.tsx +13 -15
  745. package/src/components/chart-frame/examples/narrow.tsx +24 -5
  746. package/src/components/chart-frame/examples/overview.tsx +5 -2
  747. package/src/components/chart-frame/examples/states.tsx +72 -64
  748. package/src/components/chart-frame/examples/tooltip.tsx +27 -26
  749. package/src/components/chat/COMPONENT.md +39 -26
  750. package/src/components/chat/examples/group-chat.tsx +2 -2
  751. package/src/components/chat/examples/overview.tsx +119 -130
  752. package/src/components/chat/examples/reactions.tsx +18 -23
  753. package/src/components/chat/examples/screen.module.css +1 -1
  754. package/src/components/chat/examples/screen.tsx +212 -242
  755. package/src/components/chat/examples/states.tsx +23 -22
  756. package/src/components/chat-list/COMPONENT.md +11 -6
  757. package/src/components/chat-list/examples/controlled.tsx +2 -2
  758. package/src/components/chat-list/examples/examples.module.css +8 -8
  759. package/src/components/chat-list/examples/live.tsx +29 -22
  760. package/src/components/chat-list/examples/sizes.tsx +6 -8
  761. package/src/components/chat-list/examples/states.tsx +42 -38
  762. package/src/components/checkbox/COMPONENT.md +27 -14
  763. package/src/components/checkbox/examples/controlled.tsx +18 -16
  764. package/src/components/checkbox/examples/examples.module.css +15 -56
  765. package/src/components/checkbox/examples/in-form.tsx +16 -16
  766. package/src/components/checkbox/examples/indicator.tsx +19 -64
  767. package/src/components/checkbox/examples/overview.tsx +1 -1
  768. package/src/components/checkbox/examples/states.tsx +1 -1
  769. package/src/components/checkbox/examples/without-label.tsx +1 -1
  770. package/src/components/code-block/COMPONENT.md +16 -12
  771. package/src/components/code-block/examples/color-scheme.tsx +2 -4
  772. package/src/components/code-block/examples/examples.module.css +1 -9
  773. package/src/components/code-block/examples/narrow.tsx +1 -1
  774. package/src/components/color-field/COMPONENT.md +15 -9
  775. package/src/components/color-field/examples/examples.module.css +4 -5
  776. package/src/components/color-field/examples/in-form.tsx +15 -13
  777. package/src/components/color-field/examples/sizes.tsx +5 -1
  778. package/src/components/color-field/examples/states.tsx +15 -3
  779. package/src/components/color-picker/COMPONENT.md +69 -22
  780. package/src/components/color-picker/examples/controlled.tsx +16 -5
  781. package/src/components/color-picker/examples/examples.module.css +8 -12
  782. package/src/components/color-picker/examples/in-form.tsx +24 -22
  783. package/src/components/color-picker/examples/overview.tsx +6 -11
  784. package/src/components/color-picker/examples/panel.tsx +1 -1
  785. package/src/components/color-picker/examples/sizes.tsx +10 -16
  786. package/src/components/color-picker/examples/states.tsx +28 -23
  787. package/src/components/color-swatches/COMPONENT.md +22 -8
  788. package/src/components/color-swatches/examples/examples.module.css +3 -4
  789. package/src/components/color-swatches/examples/in-form.tsx +19 -17
  790. package/src/components/color-swatches/examples/palette.tsx +24 -0
  791. package/src/components/color-swatches/examples/wrapping.tsx +17 -2
  792. package/src/components/command-menu/COMPONENT.md +60 -20
  793. package/src/components/command-menu/examples/sizes.tsx +20 -15
  794. package/src/components/command-menu/examples/states.tsx +46 -24
  795. package/src/components/composer/COMPONENT.md +42 -24
  796. package/src/components/composer/examples/examples.module.css +0 -9
  797. package/src/components/composer/examples/narrow.tsx +1 -1
  798. package/src/components/composer/examples/reply-edit.tsx +3 -3
  799. package/src/components/composer/examples/sizes.tsx +3 -5
  800. package/src/components/composer/examples/states.tsx +4 -6
  801. package/src/components/confirm-dialog/COMPONENT.md +26 -13
  802. package/src/components/confirm-dialog/examples/dismiss.tsx +27 -0
  803. package/src/components/confirm-dialog/examples/failure.tsx +9 -16
  804. package/src/components/crossfade/COMPONENT.md +13 -7
  805. package/src/components/crossfade/examples/examples.module.css +1 -40
  806. package/src/components/crossfade/examples/fill.tsx +16 -19
  807. package/src/components/crossfade/examples/overview.tsx +14 -16
  808. package/src/components/crossfade/examples/record-switch.tsx +6 -11
  809. package/src/components/crossfade/examples/screen.module.css +1 -24
  810. package/src/components/crossfade/examples/screen.tsx +108 -124
  811. package/src/components/data-table/COMPONENT.md +36 -26
  812. package/src/components/data-table/examples/controlled.tsx +14 -2
  813. package/src/components/data-table/examples/examples.module.css +10 -9
  814. package/src/components/data-table/examples/narrow.tsx +5 -1
  815. package/src/components/data-table/examples/row-link.tsx +2 -1
  816. package/src/components/data-table/examples/screen.module.css +2 -2
  817. package/src/components/data-table/examples/screen.tsx +53 -62
  818. package/src/components/data-table/examples/server.tsx +6 -2
  819. package/src/components/data-table/examples/sizes.tsx +17 -17
  820. package/src/components/data-table/examples/states.tsx +37 -29
  821. package/src/components/datepicker/COMPONENT.md +53 -22
  822. package/src/components/datepicker/examples/dismiss.tsx +15 -0
  823. package/src/components/datepicker/examples/examples.module.css +9 -2
  824. package/src/components/datepicker/examples/in-form.tsx +33 -25
  825. package/src/components/datepicker/examples/inline-panel.tsx +3 -1
  826. package/src/components/datepicker/examples/sizes.tsx +2 -2
  827. package/src/components/datepicker/examples/states.tsx +2 -2
  828. package/src/components/datepicker/examples/validation.tsx +3 -3
  829. package/src/components/description-list/COMPONENT.md +24 -9
  830. package/src/components/description-list/examples/examples.module.css +4 -24
  831. package/src/components/description-list/examples/narrow.tsx +1 -1
  832. package/src/components/description-list/examples/screen.module.css +0 -18
  833. package/src/components/description-list/examples/screen.tsx +119 -134
  834. package/src/components/description-list/examples/sizes.tsx +2 -4
  835. package/src/components/description-list/examples/structure.tsx +6 -7
  836. package/src/components/description-list/examples/totals.tsx +40 -0
  837. package/src/components/digit-input/COMPONENT.md +12 -6
  838. package/src/components/digit-input/examples/examples.module.css +2 -2
  839. package/src/components/digit-input/examples/grouped.tsx +4 -4
  840. package/src/components/digit-input/examples/in-form.tsx +1 -1
  841. package/src/components/digit-input/examples/sizes.tsx +5 -3
  842. package/src/components/digit-input/examples/states.tsx +14 -6
  843. package/src/components/digit-input/examples/validation.tsx +1 -1
  844. package/src/components/divider/COMPONENT.md +28 -14
  845. package/src/components/divider/examples/align.tsx +2 -4
  846. package/src/components/divider/examples/examples.module.css +16 -17
  847. package/src/components/divider/examples/or-separator.tsx +3 -5
  848. package/src/components/divider/examples/overview.tsx +18 -16
  849. package/src/components/divider/examples/vertical.tsx +25 -8
  850. package/src/components/divider/examples/with-icon.tsx +1 -1
  851. package/src/components/dnd/COMPONENT.md +52 -34
  852. package/src/components/dnd/examples/drop-zones.tsx +1 -1
  853. package/src/components/dnd/examples/examples.module.css +7 -7
  854. package/src/components/dnd/examples/states.tsx +41 -35
  855. package/src/components/drawer/COMPONENT.md +38 -15
  856. package/src/components/drawer/examples/guard.tsx +1 -3
  857. package/src/components/drawer/examples/header-actions.tsx +1 -1
  858. package/src/components/drawer/examples/in-form.tsx +31 -31
  859. package/src/components/drawer/examples/placement.tsx +1 -1
  860. package/src/components/drawer/examples/screen.tsx +137 -160
  861. package/src/components/drawer/examples/sizes.tsx +32 -27
  862. package/src/components/dropdown/COMPONENT.md +59 -24
  863. package/src/components/dropdown/examples/context-menu.tsx +75 -0
  864. package/src/components/dropdown/examples/examples.module.css +1 -1
  865. package/src/components/dropdown/examples/sizes.tsx +39 -34
  866. package/src/components/dropdown/examples/states.tsx +37 -29
  867. package/src/components/empty-page/COMPONENT.md +20 -9
  868. package/src/components/empty-page/examples/compact.tsx +28 -18
  869. package/src/components/empty-page/examples/examples.module.css +0 -43
  870. package/src/components/empty-page/examples/narrow.tsx +3 -3
  871. package/src/components/empty-page/examples/region-error.tsx +6 -11
  872. package/src/components/empty-page/examples/sizes.tsx +13 -13
  873. package/src/components/empty-page/examples/variants.tsx +34 -30
  874. package/src/components/example-frame/COMPONENT.md +23 -11
  875. package/src/components/example-frame/examples/controlled.tsx +3 -3
  876. package/src/components/field-list/COMPONENT.md +14 -8
  877. package/src/components/field-list/examples/screen.module.css +1 -1
  878. package/src/components/field-list/examples/screen.tsx +19 -19
  879. package/src/components/field-list/examples/sizes.tsx +32 -26
  880. package/src/components/field-list/examples/states.tsx +37 -31
  881. package/src/components/fieldset/COMPONENT.md +11 -6
  882. package/src/components/fieldset/examples/examples.module.css +1 -1
  883. package/src/components/fieldset/examples/states.tsx +1 -1
  884. package/src/components/file-upload/COMPONENT.md +68 -30
  885. package/src/components/file-upload/examples/avatar-upload.tsx +5 -5
  886. package/src/components/file-upload/examples/custom-body.tsx +12 -7
  887. package/src/components/file-upload/examples/examples.module.css +4 -4
  888. package/src/components/file-upload/examples/narrow.tsx +1 -1
  889. package/src/components/file-upload/examples/row-parts.tsx +4 -4
  890. package/src/components/file-upload/examples/screen.module.css +4 -4
  891. package/src/components/file-upload/examples/screen.tsx +70 -84
  892. package/src/components/file-upload/examples/sizes.tsx +1 -3
  893. package/src/components/file-upload/examples/states.tsx +1 -3
  894. package/src/components/file-upload/examples/variants.tsx +13 -7
  895. package/src/components/gallery/COMPONENT.md +17 -7
  896. package/src/components/gallery/examples/album-sizes.tsx +52 -0
  897. package/src/components/gallery/examples/controlled.tsx +40 -0
  898. package/src/components/gallery/examples/examples.module.css +1 -1
  899. package/src/components/gallery/examples/overview.tsx +15 -43
  900. package/src/components/gallery/examples/transfer.tsx +22 -13
  901. package/src/components/gantt/COMPONENT.md +21 -15
  902. package/src/components/gantt/examples/examples.module.css +0 -16
  903. package/src/components/gantt/examples/occupancy.tsx +2 -2
  904. package/src/components/gantt/examples/screen.module.css +1 -1
  905. package/src/components/gantt/examples/screen.tsx +56 -74
  906. package/src/components/gantt/examples/sizes.tsx +16 -16
  907. package/src/components/gantt/examples/states.tsx +34 -30
  908. package/src/components/gantt/examples/variants.tsx +27 -25
  909. package/src/components/hint/COMPONENT.md +24 -14
  910. package/src/components/hint/examples/examples.module.css +10 -1
  911. package/src/components/hint/examples/hint-or-error.tsx +2 -2
  912. package/src/components/hint/examples/overview.tsx +10 -11
  913. package/src/components/hint/examples/sizes.tsx +1 -1
  914. package/src/components/input/COMPONENT.md +10 -6
  915. package/src/components/input/examples/affixes.tsx +2 -2
  916. package/src/components/input/examples/examples.module.css +1 -1
  917. package/src/components/input/examples/sizes.tsx +9 -5
  918. package/src/components/input/examples/states.tsx +39 -23
  919. package/src/components/input/examples/with-icon.tsx +24 -16
  920. package/src/components/kanban/COMPONENT.md +30 -24
  921. package/src/components/kanban/examples/columns.tsx +14 -19
  922. package/src/components/kanban/examples/item-link.tsx +2 -2
  923. package/src/components/kanban/examples/limits.tsx +1 -1
  924. package/src/components/kanban/examples/narrow.tsx +1 -1
  925. package/src/components/kanban/examples/screen.module.css +2 -4
  926. package/src/components/kanban/examples/screen.tsx +55 -68
  927. package/src/components/kanban/examples/states.tsx +37 -58
  928. package/src/components/kanban/examples/variants.tsx +0 -3
  929. package/src/components/kbd/COMPONENT.md +11 -7
  930. package/src/components/kbd/examples/examples.module.css +1 -20
  931. package/src/components/kbd/examples/in-controls.tsx +2 -2
  932. package/src/components/kbd/examples/shortcut-list.tsx +14 -26
  933. package/src/components/label/COMPONENT.md +26 -11
  934. package/src/components/label/examples/examples.module.css +12 -9
  935. package/src/components/label/examples/overview.tsx +6 -10
  936. package/src/components/label/examples/structure.tsx +2 -2
  937. package/src/components/link-button/COMPONENT.md +33 -20
  938. package/src/components/link-button/examples/as-child.tsx +1 -1
  939. package/src/components/link-button/examples/external-link.tsx +1 -1
  940. package/src/components/link-button/examples/overview.tsx +4 -2
  941. package/src/components/link-button/examples/variants.tsx +2 -2
  942. package/src/components/list/COMPONENT.md +24 -16
  943. package/src/components/list/examples/examples.module.css +0 -8
  944. package/src/components/list/examples/overflow.tsx +1 -1
  945. package/src/components/list/examples/overview.tsx +31 -30
  946. package/src/components/list/examples/sizes.tsx +23 -23
  947. package/src/components/list/examples/states.tsx +38 -21
  948. package/src/components/list/examples/with-icon.tsx +16 -14
  949. package/src/components/login-form/COMPONENT.md +69 -16
  950. package/src/components/login-form/examples/narrow.tsx +1 -1
  951. package/src/components/login-form/examples/register.tsx +1 -1
  952. package/src/components/media-viewer/COMPONENT.md +12 -8
  953. package/src/components/media-viewer/examples/controlled.tsx +16 -16
  954. package/src/components/media-viewer/examples/examples.module.css +3 -5
  955. package/src/components/media-viewer/examples/video.tsx +1 -1
  956. package/src/components/message/COMPONENT.md +102 -46
  957. package/src/components/message/examples/typing.tsx +5 -5
  958. package/src/components/modal/COMPONENT.md +71 -37
  959. package/src/components/modal/examples/dismiss.tsx +35 -27
  960. package/src/components/modal/examples/enter-key.tsx +22 -25
  961. package/src/components/modal/examples/examples.module.css +0 -7
  962. package/src/components/modal/examples/guard.tsx +2 -4
  963. package/src/components/modal/examples/in-form.tsx +28 -28
  964. package/src/components/modal/examples/long-content.tsx +6 -4
  965. package/src/components/modal/examples/sizes.tsx +36 -31
  966. package/src/components/modal/examples/structure.tsx +1 -1
  967. package/src/components/native-select/COMPONENT.md +7 -3
  968. package/src/components/native-select/examples/examples.module.css +3 -3
  969. package/src/components/native-select/examples/in-form.tsx +28 -29
  970. package/src/components/native-select/examples/sizes.tsx +2 -2
  971. package/src/components/native-select/examples/states.tsx +2 -2
  972. package/src/components/notification/COMPONENT.md +36 -31
  973. package/src/components/notification/examples/examples.module.css +1 -2
  974. package/src/components/notification/examples/in-form.tsx +28 -20
  975. package/src/components/notification/examples/sizes.tsx +16 -12
  976. package/src/components/notification/examples/undo.tsx +7 -15
  977. package/src/components/pagination/COMPONENT.md +29 -18
  978. package/src/components/pagination/examples/controlled.tsx +2 -1
  979. package/src/components/pagination/examples/narrow.tsx +5 -5
  980. package/src/components/popover/COMPONENT.md +44 -20
  981. package/src/components/popover/examples/controlled-open.tsx +6 -4
  982. package/src/components/popover/examples/dismiss.tsx +37 -28
  983. package/src/components/popover/examples/examples.module.css +2 -2
  984. package/src/components/popover/examples/sizes.tsx +32 -27
  985. package/src/components/popover/examples/width.tsx +57 -0
  986. package/src/components/progress-bar/COMPONENT.md +21 -29
  987. package/src/components/progress-bar/examples/examples.module.css +1 -1
  988. package/src/components/progress-circle/COMPONENT.md +21 -29
  989. package/src/components/progress-circle/examples/examples.module.css +1 -1
  990. package/src/components/progress-circle/examples/on-color.tsx +16 -0
  991. package/src/components/progress-circle/examples/variants.tsx +1 -0
  992. package/src/components/radio/COMPONENT.md +13 -4
  993. package/src/components/radio/examples/examples.module.css +1 -1
  994. package/src/components/scroll-container/COMPONENT.md +18 -12
  995. package/src/components/scroll-container/examples/auto-scroll.tsx +8 -4
  996. package/src/components/scroll-container/examples/edges.tsx +4 -4
  997. package/src/components/scroll-container/examples/examples.module.css +7 -51
  998. package/src/components/scroll-container/examples/load-more.tsx +4 -4
  999. package/src/components/scroll-container/examples/lock.tsx +4 -4
  1000. package/src/components/scroll-container/examples/log.tsx +97 -0
  1001. package/src/components/scroll-container/examples/overscroll.tsx +4 -4
  1002. package/src/components/scroll-container/examples/overview.tsx +5 -5
  1003. package/src/components/scroll-container/examples/scrollbar.tsx +4 -4
  1004. package/src/components/scroll-container/examples/snap.tsx +2 -2
  1005. package/src/components/scroll-container/examples/variants.tsx +1 -0
  1006. package/src/components/segmented-control/COMPONENT.md +24 -12
  1007. package/src/components/segmented-control/examples/controlled.tsx +2 -4
  1008. package/src/components/segmented-control/examples/examples.module.css +0 -8
  1009. package/src/components/segmented-control/examples/scroll.tsx +1 -1
  1010. package/src/components/select/COMPONENT.md +33 -9
  1011. package/src/components/select/examples/dismiss.tsx +26 -0
  1012. package/src/components/select/examples/examples.module.css +1 -1
  1013. package/src/components/select/examples/server-search.tsx +6 -2
  1014. package/src/components/select/examples/sizes.tsx +2 -2
  1015. package/src/components/select/examples/states.tsx +2 -2
  1016. package/src/components/select/examples/with-icon.tsx +20 -18
  1017. package/src/components/sheet/COMPONENT.md +44 -21
  1018. package/src/components/sheet/examples/header-actions.tsx +23 -4
  1019. package/src/components/sheet/examples/overview.tsx +25 -10
  1020. package/src/components/skeleton/COMPONENT.md +8 -4
  1021. package/src/components/skeleton/examples/examples.module.css +1 -13
  1022. package/src/components/skeleton/examples/with-crossfade.tsx +7 -7
  1023. package/src/components/slider/COMPONENT.md +13 -8
  1024. package/src/components/slider/examples/examples.module.css +6 -7
  1025. package/src/components/slider/examples/hint-and-error.tsx +3 -5
  1026. package/src/components/slider/examples/in-form.tsx +21 -19
  1027. package/src/components/slider/examples/states.tsx +14 -10
  1028. package/src/components/smart-filter/COMPONENT.md +42 -22
  1029. package/src/components/smart-filter/examples/examples.module.css +3 -21
  1030. package/src/components/smart-filter/examples/many-values.tsx +12 -8
  1031. package/src/components/smart-filter/examples/ranges.tsx +2 -1
  1032. package/src/components/smart-filter/examples/sizes.tsx +9 -7
  1033. package/src/components/sparkline/COMPONENT.md +8 -3
  1034. package/src/components/sparkline/examples/curve.tsx +16 -11
  1035. package/src/components/sparkline/examples/examples.module.css +1 -1
  1036. package/src/components/sparkline/examples/signed-bars.tsx +2 -2
  1037. package/src/components/sparkline/examples/states.tsx +14 -10
  1038. package/src/components/spinner/COMPONENT.md +15 -9
  1039. package/src/components/spinner/examples/examples.module.css +2 -14
  1040. package/src/components/spinner/examples/overview.tsx +1 -1
  1041. package/src/components/stepper/COMPONENT.md +50 -41
  1042. package/src/components/stepper/examples/examples.module.css +1 -6
  1043. package/src/components/stepper/examples/narrow.tsx +1 -1
  1044. package/src/components/stepper/examples/sizes.tsx +6 -8
  1045. package/src/components/stepper/examples/states.tsx +44 -43
  1046. package/src/components/stepper/examples/with-icon.tsx +19 -17
  1047. package/src/components/switch/COMPONENT.md +22 -9
  1048. package/src/components/switch/examples/examples.module.css +2 -2
  1049. package/src/components/switch/examples/states.tsx +3 -3
  1050. package/src/components/tabs/COMPONENT.md +21 -16
  1051. package/src/components/tabs/examples/in-drawer.tsx +1 -1
  1052. package/src/components/tabs/examples/sizes.tsx +5 -10
  1053. package/src/components/tabs/examples/variants.tsx +19 -23
  1054. package/src/components/tag-select/COMPONENT.md +19 -6
  1055. package/src/components/tag-select/examples/creatable.tsx +2 -2
  1056. package/src/components/tag-select/examples/dismiss.tsx +23 -0
  1057. package/src/components/tag-select/examples/examples.module.css +3 -3
  1058. package/src/components/tag-select/examples/in-form.tsx +31 -32
  1059. package/src/components/tag-select/examples/sizes.tsx +2 -2
  1060. package/src/components/tag-select/examples/states.tsx +2 -2
  1061. package/src/components/textarea/COMPONENT.md +10 -6
  1062. package/src/components/textarea/examples/examples.module.css +3 -10
  1063. package/src/components/textarea/examples/in-form.tsx +3 -3
  1064. package/src/components/textarea/examples/sizes.tsx +10 -7
  1065. package/src/components/textarea/examples/states.tsx +29 -13
  1066. package/src/components/textarea/examples/validation.tsx +45 -36
  1067. package/src/components/thumbnail/COMPONENT.md +17 -13
  1068. package/src/components/thumbnail/examples/examples.module.css +1 -1
  1069. package/src/components/thumbnail/examples/states.tsx +1 -1
  1070. package/src/components/thumbnail/examples/variants.tsx +12 -1
  1071. package/src/components/timeline/COMPONENT.md +51 -35
  1072. package/src/components/timeline/examples/links.tsx +14 -14
  1073. package/src/components/timeline/examples/narrow.tsx +6 -6
  1074. package/src/components/timeline/examples/overview.tsx +6 -6
  1075. package/src/components/timeline/examples/sizes.tsx +28 -23
  1076. package/src/components/timeline/examples/structure.tsx +30 -30
  1077. package/src/components/timeline/examples/variants.tsx +40 -28
  1078. package/src/components/tooltip/COMPONENT.md +10 -6
  1079. package/src/components/tooltip/examples/examples.module.css +1 -5
  1080. package/src/components/tooltip/examples/non-interactive-trigger.tsx +1 -1
  1081. package/src/components/tooltip/examples/sizes.tsx +17 -10
  1082. package/src/components/typography/COMPONENT.md +18 -3
  1083. package/src/components/typography/examples/examples.module.css +3 -6
  1084. package/src/components/typography/examples/numeric.tsx +16 -0
  1085. package/src/components/video-note/COMPONENT.md +11 -7
  1086. package/src/components/visually-hidden/COMPONENT.md +8 -4
  1087. package/src/components/visually-hidden/examples/assertive.tsx +1 -1
  1088. package/src/components/visually-hidden/examples/overview.tsx +17 -7
  1089. package/src/components/voice-player/COMPONENT.md +15 -7
  1090. package/src/layout/app-shell/COMPONENT.md +53 -36
  1091. package/src/layout/app-shell/examples/examples.module.css +2 -22
  1092. package/src/layout/app-shell/examples/footer.tsx +10 -10
  1093. package/src/layout/app-shell/examples/overview.tsx +21 -25
  1094. package/src/layout/app-shell/examples/screen.module.css +2 -2
  1095. package/src/layout/app-shell/examples/screen.tsx +48 -47
  1096. package/src/layout/app-shell/examples/template.tsx +13 -17
  1097. package/src/layout/bottom-nav/COMPONENT.md +30 -20
  1098. package/src/layout/bottom-nav/examples/examples.module.css +2 -7
  1099. package/src/layout/bottom-nav/examples/floating-action.tsx +10 -19
  1100. package/src/layout/bottom-nav/examples/floating.tsx +10 -19
  1101. package/src/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
  1102. package/src/layout/bottom-nav/examples/router.tsx +6 -5
  1103. package/src/layout/page/COMPONENT.md +353 -0
  1104. package/src/layout/page/examples/actions-collapse.tsx +45 -0
  1105. package/src/layout/page/examples/collapse.tsx +68 -0
  1106. package/src/{components/page-content → layout/page}/examples/examples.module.css +32 -16
  1107. package/{dist/skill/reference/components/page-content → src/layout/page}/examples/grid.tsx +18 -16
  1108. package/src/layout/page/examples/list-detail.tsx +112 -0
  1109. package/src/layout/page/examples/narrow.tsx +75 -0
  1110. package/src/layout/page/examples/overview.tsx +57 -0
  1111. package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.module.css +1 -1
  1112. package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.tsx +29 -19
  1113. package/{dist/skill/reference/components/page-content → src/layout/page}/examples/sections.tsx +17 -24
  1114. package/src/layout/page/examples/structure.tsx +41 -0
  1115. package/src/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
  1116. package/src/layout/page/examples/top-bar.tsx +85 -0
  1117. package/src/{components/page-content → layout/page}/examples/variants.tsx +13 -13
  1118. package/src/layout/sidebar/COMPONENT.md +51 -40
  1119. package/src/layout/sidebar/examples/account.tsx +1 -3
  1120. package/src/layout/sidebar/examples/brand-header.tsx +1 -3
  1121. package/src/layout/sidebar/examples/collapsible-groups.tsx +1 -3
  1122. package/src/layout/sidebar/examples/controlled-open.tsx +1 -3
  1123. package/src/layout/sidebar/examples/controlled.tsx +1 -3
  1124. package/src/layout/sidebar/examples/custom-part.tsx +1 -3
  1125. package/src/layout/sidebar/examples/dismiss.tsx +50 -0
  1126. package/src/layout/sidebar/examples/examples.module.css +7 -32
  1127. package/src/layout/sidebar/examples/narrow.tsx +47 -42
  1128. package/src/layout/sidebar/examples/nested-items.tsx +1 -3
  1129. package/src/layout/sidebar/examples/overview.tsx +1 -3
  1130. package/src/layout/sidebar/examples/persist.tsx +1 -3
  1131. package/src/layout/sidebar/examples/router.tsx +12 -13
  1132. package/src/layout/sidebar/examples/sizes.tsx +6 -6
  1133. package/src/styles/controls.css +2 -2
  1134. package/src/styles/fonts.css +22 -0
  1135. package/src/styles/globals.css +89 -12
  1136. package/src/styles/theme-dark.css +25 -24
  1137. package/src/styles/theme-light.css +70 -23
  1138. package/src/styles/tokens.css +17 -5
  1139. package/dist/components/dnd/useFlipList.d.ts +0 -17
  1140. package/dist/components/gantt/useEdgeAutoScroll.d.ts +0 -12
  1141. package/dist/components/modal/ModalDialog.d.ts +0 -46
  1142. package/dist/components/page-content/PageContent.d.ts +0 -173
  1143. package/dist/components/page-toolbar/PageToolbar.d.ts +0 -54
  1144. package/dist/hooks/useStateSwap.d.ts +0 -8
  1145. package/dist/internal/highlightTsxHtml.d.ts +0 -2
  1146. package/dist/internal/layoutPxFromPrimitives.d.ts +0 -6
  1147. package/dist/internal/mergeRefs.d.ts +0 -6
  1148. package/dist/layout/app-header/AppHeader.d.ts +0 -109
  1149. package/dist/skill/reference/components/drawer/examples/examples.module.css +0 -8
  1150. package/dist/skill/reference/components/page-content/COMPONENT.md +0 -272
  1151. package/dist/skill/reference/components/page-content/examples/list-detail.tsx +0 -106
  1152. package/dist/skill/reference/components/page-content/examples/narrow.tsx +0 -25
  1153. package/dist/skill/reference/components/page-content/examples/overview.tsx +0 -41
  1154. package/dist/skill/reference/components/page-toolbar/COMPONENT.md +0 -143
  1155. package/dist/skill/reference/components/page-toolbar/examples/examples.module.css +0 -16
  1156. package/dist/skill/reference/components/page-toolbar/examples/overview.tsx +0 -113
  1157. package/dist/skill/reference/components/page-toolbar/examples/save-changes.tsx +0 -40
  1158. package/dist/skill/reference/components/page-toolbar/examples/without-search.tsx +0 -60
  1159. package/dist/skill/reference/components/popover/examples/match-trigger-width.tsx +0 -23
  1160. package/dist/skill/reference/components/scroll-container/examples/chat.tsx +0 -101
  1161. package/dist/skill/reference/components/spinner/examples/loading-region.tsx +0 -22
  1162. package/dist/skill/reference/layout/app-header/COMPONENT.md +0 -186
  1163. package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +0 -37
  1164. package/dist/skill/reference/layout/app-header/examples/examples.module.css +0 -47
  1165. package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -69
  1166. package/dist/skill/reference/layout/app-header/examples/narrow.tsx +0 -28
  1167. package/dist/skill/reference/layout/app-header/examples/overview.tsx +0 -34
  1168. package/dist/skill/reference/layout/app-header/examples/page-title.tsx +0 -78
  1169. package/dist/skill/reference/layout/app-shell/examples/contained.tsx +0 -30
  1170. package/src/components/drawer/examples/examples.module.css +0 -8
  1171. package/src/components/page-content/COMPONENT.md +0 -272
  1172. package/src/components/page-content/examples/list-detail.tsx +0 -106
  1173. package/src/components/page-content/examples/narrow.tsx +0 -25
  1174. package/src/components/page-content/examples/overview.tsx +0 -41
  1175. package/src/components/page-toolbar/COMPONENT.md +0 -143
  1176. package/src/components/page-toolbar/examples/examples.module.css +0 -16
  1177. package/src/components/page-toolbar/examples/overview.tsx +0 -113
  1178. package/src/components/page-toolbar/examples/save-changes.tsx +0 -40
  1179. package/src/components/page-toolbar/examples/without-search.tsx +0 -60
  1180. package/src/components/popover/examples/match-trigger-width.tsx +0 -23
  1181. package/src/components/scroll-container/examples/chat.tsx +0 -101
  1182. package/src/components/spinner/examples/loading-region.tsx +0 -22
  1183. package/src/layout/app-header/COMPONENT.md +0 -186
  1184. package/src/layout/app-header/examples/breadcrumbs.tsx +0 -37
  1185. package/src/layout/app-header/examples/examples.module.css +0 -47
  1186. package/src/layout/app-header/examples/in-app-shell.tsx +0 -69
  1187. package/src/layout/app-header/examples/narrow.tsx +0 -28
  1188. package/src/layout/app-header/examples/overview.tsx +0 -34
  1189. package/src/layout/app-header/examples/page-title.tsx +0 -78
  1190. package/src/layout/app-shell/examples/contained.tsx +0 -30
@@ -78,7 +78,7 @@ Chat.Root <div> column, fills its host; owns selection,
78
78
 
79
79
  - Send optimistically: add the message with `status="sending"` under a client id and return from `onSend`; patch the status as the server answers. Keep its key when the server id arrives — the row stays the same element, so it never enters twice and the ticks cross-fade.
80
80
  - The list needs nothing to animate: it decides itself which message is new at the end, scrolls to your own message, keeps the end, or counts new ones on the «к последним» button.
81
- - Keep `renderMessage` stable (`useCallback`): an item renders again only when it, its place or this function changes. Read lookups across messages (a reply's original) through a ref rather than listing the messages as a dependency — a function that changes with every message renders the whole history again, and a reaction's stroke then starts late.
81
+ - `renderMessage` may be an inline function: an item renders again only when it or its place changes, so whatever a row shows lives in its item (an edit, a reaction, a pin). Another message (a reply's original) comes from `entry.find(key)`.
82
82
  - `onRead` reports an incoming message once at least half of it, or half the view, has been on screen while the page is visible (`IntersectionObserver`); batched per frame, each `value` once per mount.
83
83
  - One sound at a time on the page: a `VoicePlayer`, a `VideoNote` and a video in `Message.Media` pause each other; nothing to wire.
84
84
 
@@ -97,9 +97,9 @@ Chat.Root <div> column, fills its host; owns selection,
97
97
  | `search` | `string \| null` | — | The search query (controlled); `null` — the search bar is closed. Matches in the messages' text and transcripts are marked; the newest is current. |
98
98
  | `defaultSearch` | `string \| null` | `null` | The initial search (uncontrolled). |
99
99
  | `onSearchChange` | `(search: string \| null) => void` | — | The search opened (`""`), changed its query or closed (`null`). |
100
- | `current` | `string \| null` | `null` | A message to bring into view (a link, a notification): on change the chat brings it to the middle and the message itself blinks. The focus stays where it is. |
100
+ | `jumpTo` | `string \| null` | `null` | A message to jump to (a link, a notification): on change the chat brings it to the middle and the message itself blinks. The focus stays where it is; while the search is open its current match takes this place. |
101
101
  | `typing` | `boolean` | `false` | The other side is typing: `Chat.Description` cross-fades into «печатает…» and the list ends with the typing bubble (`Message.Typing`), which gives way at once to the reply that ends it. |
102
- | `labels` | `Partial<ChatLabels>` | — | System strings, see Labels. |
102
+ | `labels` | `Partial<ChatLabels>` | — | Built-in strings, see Labels. |
103
103
  | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "defaultValue">` | — | `className` and the other attributes of the frame. |
104
104
 
105
105
  ### Chat.Header
@@ -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`).
@@ -152,11 +152,11 @@ Chat.Root <div> column, fills its host; owns selection,
152
152
  |---|---|---|---|
153
153
  | `items` | `readonly { value: string; text: string }[]` | — (required) | The pinned messages, oldest first: the `value` of each `Message.Root` and one line of it («Фото», «Голосовое сообщение» for media). |
154
154
  | `value` | `string` | — | The pinned message shown (controlled). |
155
- | `defaultValue` | `string` | `the last item` | The one shown first (uncontrolled): the newest. |
155
+ | `defaultValue` | `string` | the last item | The one shown first (uncontrolled): the newest. |
156
156
  | `onValueChange` | `(value: string) => void` | — | The shown message changed: a press stepped to the next older one (the oldest wraps to the newest). |
157
157
  | `onSelect` | `(value: string) => void` | — | A press on the bar, after the chat has jumped to the message: load it when it is not in the list yet. |
158
158
  | `onRemove` | `(value: string) => void` | — | Unpin the shown message: a ghost close button at the end. Without it no button. |
159
- | `labels` | `Partial<ChatPinnedLabels>` | — | System strings, see Labels. |
159
+ | `labels` | `Partial<ChatPinnedLabels>` | — | Built-in strings, see Labels. |
160
160
  | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "defaultValue" \| "onSelect">` | — | `className` and the other attributes. |
161
161
 
162
162
  ### Chat.Messages
@@ -164,22 +164,22 @@ Chat.Root <div> column, fills its host; owns selection,
164
164
 
165
165
  | Prop | Type | Default | Description |
166
166
  |---|---|---|---|
167
- | `type` | `"direct" \| "group"` | `"direct"` | `direct` — a conversation of two; `group` — many authors, with the author's header and avatar on each run. |
167
+ | `group` | `boolean` | `false` | A group chat of many authors: the first message of a run shows the author's header, the last one the avatar, and incoming messages keep the avatar's gutter. Without it a conversation of two. |
168
168
  | `items` | `readonly T[]` | — | Messages as application data, in time order: the list adds the dates, the runs and the unread band and sets each message's `value` and `position`. Without it, children are the rows. |
169
169
  | `getKey` | `(item: T) => string` | — | A stable key of an item (with `items`): also its message's `value`. Keep it when the server confirms a sent message. |
170
170
  | `getAuthor` | `(item: T) => string` | — | Who wrote an item (an id, with `items`): a change of author starts a new run. |
171
171
  | `getDate` | `(item: T) => Date` | — | When an item was sent (with `items`): a new day gets a date. |
172
- | `renderMessage` | `(item: T, entry: ChatMessageEntry) => ReactElement` | — | Renders an item (with `items`): a `Message.Root` (`value` and `position` set for you) or a `Chat.Service`; `entry` is `{ position, showAuthor, showAvatar }`. Keep it stable (`useCallback`). |
172
+ | `renderMessage` | `(item: T, entry: ChatMessageEntry<T>) => ReactElement` | — | Renders an item: a `Message.Root` or a `Chat.Service`; `entry` — `{ position, showAuthor, showAvatar, find }`, `find(key)` gives another item (a reply's original). Runs again only for an item whose data or place changed. |
173
173
  | `isService` | `(item: T) => boolean` | — | An event of the chat, not a message: it stands alone and breaks the runs around it. |
174
174
  | `unread` | `string` | — | The key of the first unread item: the «Непрочитанные сообщения» band stands above it. |
175
175
  | `groupWindow` | `number` | `5` | Messages of one author further apart than this many minutes start a new run. |
176
- | `now` | `Date` | `new Date()` | «Today» for the dates. |
176
+ | `now` | `Date` | today | «Today» for the dates. |
177
177
  | `formatDate` | `(date: Date, now: Date) => string` | `formatMessageDate` | The label of a date. |
178
178
  | `loading` | `boolean` | `false` | The first load: bubble-shaped `Skeleton`s on both sides stand in the list's place (`aria-busy`, `labels.loading` announced), then cross-fade into the messages; none of them counts as new. |
179
179
  | `hasOlder` | `boolean` | `false` | Older history exists: a bubble-shaped placeholder stands above the first message and `onLoadOlder` runs when the reader reaches the top. |
180
180
  | `onLoadOlder` | `() => void \| Promise<void>` | — | Load older messages and prepend them (while `hasOlder`); the reader's place is kept. |
181
- | `quickReaction` | `string \| false` | `«👍»` | The reaction of a double tap (and `L`) on a message: puts it or takes it back through `onReactionToggle`. `false` — off. |
182
- | `reactionOptions` | `readonly { emoji: string; label: string }[]` | `👍 🔥 🤣 👌 🤔 😢 😱, then 7 more` | The reactions of the bar above a message (long press, long hover or `R`): the first seven in a row, «⌄» opens the rest. `label` names each toggle button. |
181
+ | `quickReaction` | `string \| false` | `"👍"` | The reaction of a double tap (and `L`) on a message: puts it or takes it back through `onReactionToggle`. `false` — off. |
182
+ | `reactionOptions` | `readonly { emoji: string; label: string }[]` | 👍 🔥 🤣 👌 🤔 😢 😱, then 7 more | The reactions of the bar above a message (long press, long hover or `R`): the first seven in a row, «⌄» opens the rest. `label` names each toggle button. |
183
183
  | `reader` | `MessageUser` | — | The reader (`{ id, name: «Вы», src?, color? }`): a reaction they put shows them among the chip's avatars at once, before the data comes back; matched by `id`. |
184
184
  | `onNewMessage` | `(value: string, details: { direction: "incoming" \| "outgoing" }) => void` | — | A message was added at the end after mount, sent or received: for a sound, a counter, a title badge. Not called for the first render, history or a message put back in the middle. |
185
185
  | `onRead` | `(values: string[]) => void` | — | Incoming messages the reader has seen (at least half on screen while the page is visible); batched per frame, each `value` once per mount. Send read receipts from here. |
@@ -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
  |---|---|---|---|
@@ -248,11 +248,11 @@ Chat.Root <div> column, fills its host; owns selection,
248
248
  | away from the end | the reader scrolled up | a round soft «к последним» button at the bottom-end, rising in (`fast`); a `Badge` counts incoming messages that came meanwhile; a press glides to the end — from far away it lands one view before the end first — and stops when the reader scrolls; at the end it leaves and the count resets |
249
249
  | first load | `Chat.Messages loading` | the messages' region is `aria-busy`: six `Skeleton` bubbles in the message geometry (the bubble's radius, one or two lines of body text in its padding, widths within its cap), on alternating sides at the end of the list, a group chat's incoming ones beside a circle in the avatar's gutter; `labels.loading` is announced politely. When it ends they cross-fade into the list (`Crossfade`: the new state in `base`, the placeholders out in `fast`); the list mounts then, so what it shows is its first render — nothing enters, nothing is reported new |
250
250
  | older history | `hasOlder` | a bubble-shaped `Skeleton` above the first message; reaching it calls `onLoadOlder`; the rows that arrive above keep the reader's place |
251
- | jumped to | `Message.Reply target`, `Chat.Pinned`, `current` | the list brings the message to the middle (a near one glides, a far one lands at once — rendering it first — and settles once its neighbours have laid out); the message itself steps back and comes forward three times, the others stay still (opacity 1 → `--prime-message-dim-opacity` → 1, `base` each) — `data-pointing="a"` / `"b"` on the list, flipped on every jump so a repeated jump restarts it, and `data-pointed` on the message; a reply's target also takes the focus, a `current` change leaves it where it is. While the search is open its current match takes the place of `current`. Reduced motion: no blink, the others stand back for a moment |
251
+ | jumped to | `Message.Reply target`, `Chat.Pinned`, `jumpTo` | the list brings the message to the middle (a near one glides, a far one lands at once — rendering it first — and settles once its neighbours have laid out); the message itself steps back and comes forward three times, the others stay still (opacity 1 → the dimmed opacity of `Message` → 1, `base` each) — `data-pointing="a"` / `"b"` on the list, flipped on every jump so a repeated jump restarts it, and `data-pointed` with the same `data-blink` on the message; a reply's target also takes the focus, a `jumpTo` change leaves it where it is. While the search is open its current match takes the place of `jumpTo`. Reduced motion: no blink, the others stand back for a moment |
252
252
  | search | `search` (the bar open) | every case-insensitive match in the messages' text and transcripts under a soft accent wash (`<mark>`); the newest match is current: brought into view while the others stay back (`data-pointing="current"`); Enter and the older / newer buttons move the full strength to the older or newer match in one step; «2 из 5» or «Нет совпадений» beside the field |
253
253
  | typing | `typing` | the description cross-fades into «печатает…» in the accent (`Crossfade`); the typing bubble enters at the end of the list like an incoming message and leaves closing its height |
254
254
  | pinned | `Chat.Pinned items` | the rail's current segment in the accent; a press jumps to the message and steps the bar to the older one (the oldest wraps to the newest), its line entering; without items the bar renders nothing |
255
- | selection mode | `selected` (not `null`); any of `selected` / `defaultSelected` / `onSelectedChange` adds «Выбрать» to every `Message.Menu` | listbox / options with `aria-selected`; a check at the row start; a click toggles, Shift+click selects the range from the anchor, press-and-drag (or a finger slid from a check) paints the messages it passes with the first one's new state and scrolls the list at its edges; the unselected messages step back to `--prime-message-dim-opacity` with a slight desaturation (`fast`, both ways; `data-selecting` on the list, `data-selected` on the message); `Chat.SelectionBar` — the «к последним» button rises above it first (its height in `--message-bottom-bar` on the list, `fast`), then the bar fades in, so the two never overlap; outside selection the bar renders nothing |
255
+ | selection mode | `selected` (not `null`); any of `selected` / `defaultSelected` / `onSelectedChange` adds «Выбрать» to every `Message.Menu` | listbox / options with `aria-selected`; a check at the row start; a click toggles, Shift+click selects the range from the anchor, press-and-drag (or a finger slid from a check) paints the messages it passes with the first one's new state and scrolls the list at its edges; the unselected messages step back to the dimmed opacity of `Message` with a slight desaturation (`fast`, both ways; `data-selecting` on the list, `data-selected` on the message); `Chat.SelectionBar` — the «к последним» button rises above it first (its height upward in `--message-bottom-lift` on the list, `fast`), then the bar fades in, so the two never overlap; outside selection the bar renders nothing |
256
256
 
257
257
  ## Layout & spacing
258
258
  - `Chat.Root` is a column that fills its host's height (`block-size: 100%`, a flex item that grows): give the host a height — a `Card` sized by the page, a page pane, the viewport. Only `Chat.Messages` grows and scrolls; the header, the search, the pinned bar and the footer keep their height.
@@ -268,6 +268,8 @@ Chat.Root <div> column, fills its host; owns selection,
268
268
  ## Accessibility
269
269
 
270
270
  ### Keyboard
271
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
272
+
271
273
  | Key | Action |
272
274
  |---|---|
273
275
  | `Tab` | Enters the list on the last (or last focused) message, then its buttons and links |
@@ -280,12 +282,15 @@ Chat.Root <div> column, fills its host; owns selection,
280
282
  | `Escape` | In the search field closes the search and returns the focus to `Chat.SearchButton`; in the list leaves selection mode |
281
283
 
282
284
  ### ARIA
285
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
286
+
283
287
  - The list is `role="log"`: new messages are announced politely; its name is `Chat.Title` (`aria-labelledby`), else `labels.messages`, or your `aria-label`. It is one tab stop; the messages carry `aria-posinset` / `aria-setsize`, so the keyboard reaches rows the window does not render. In selection mode it is a `listbox` with `aria-multiselectable`, the messages `option`s with `aria-selected`.
284
288
  - `Chat.SearchButton` is a toggle (`aria-pressed`); the search field takes the focus as it opens and keeps it while the chat steps through matches; the place of the match («2 из 5», «Нет совпадений») is announced politely.
285
289
  - `Chat.Pinned` is a button named by its content, the title and the line («Закреплённое 2 из 3» + the text); the rail is decorative; «Открепить» is a separate button.
286
290
  - The «к последним» button is named «К последним сообщениям», with the count «Новых сообщений: N. …»; the badge is `aria-hidden`.
287
291
  - `Chat.SelectionBar` is a `toolbar` named by the count «Выбрано: N», which is announced politely as it changes.
288
292
  - The quick reaction (double tap, `L`) is announced politely.
293
+ - One sound at a time on the page: a voice message, a video note and a chat video pause each other.
289
294
  - «Печатает…» in the header is visible text; in the list the typing bubble is a polite `status` «Собеседник печатает».
290
295
  - While `loading` the messages' region is `aria-busy`, the placeholders are `aria-hidden`, and «Загрузка сообщений» (`labels.loading`) is announced politely.
291
296
  - A message reached by a jump or the current search match is not announced as such: a reply's target takes the focus, a search keeps it in its field; the others stepping back is visual only.
@@ -293,46 +298,54 @@ Chat.Root <div> column, fills its host; owns selection,
293
298
  ### Labels
294
299
  <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
295
300
 
301
+ #### Chat.Root
302
+
296
303
  | Key | Default | Used for |
297
304
  |---|---|---|
305
+ | `selectedCount` | `"Выбрано: {count}"` | The count of the selection bar. |
306
+ | `cancel` | `"Отмена"` | The selection bar's button that leaves selection. |
307
+ | `scrollToEnd` | `"К последним сообщениям"` | The name of the round button that goes to the newest message. |
308
+ | `newMessages` | `"Новых сообщений: {count}. К последним сообщениям"` | The name of that button while new messages wait below. |
298
309
  | `typing` | `"печатает…"` | The status line of the header while the other side types. |
299
310
  | `search` | `"Поиск по переписке"` | The search button and the name of the search field. |
300
- | `searchPlaceholder` | `"Поиск по сообщениям"` | The placeholder of the search field. |
311
+ | `searchPlaceholder` | `"Поиск"` | The placeholder of the search field. |
301
312
  | `matches` | `"{index} из {count}"` | The place of the current match, counted from the newest. |
302
313
  | `noMatches` | `"Нет совпадений"` | The search found nothing. |
303
314
  | `previousMatch` | `"Предыдущее совпадение"` | The button that goes to the older match. |
304
315
  | `nextMatch` | `"Следующее совпадение"` | The button that goes to the newer match. |
305
316
  | `messages` | `"Переписка"` | The name of the list when the header has no `Chat.Title`. |
306
- | `selectedCount` | `"Выбрано: {count}"` | The count of the selection bar. |
307
- | `cancel` | `"Отмена"` | The selection bar's button that leaves selection. |
308
- | `scrollToEnd` | `"К последним сообщениям"` | The name of the round button that goes to the newest message. |
309
- | `newMessages` | `"Новых сообщений: {count}. К последним сообщениям"` | The name of that button while new messages wait below. |
317
+ | `unread` | `"Непрочитанные сообщения"` | The text of the «unread» band: `Chat.Root labels` for rows from `items`, `Chat.Unread labels` for a hand-placed band. |
318
+ | `loading` | `"Загрузка сообщений"` | Announced politely while the conversation loads for the first time (`Chat.Messages loading`). |
319
+
320
+ #### Chat.Pinned
321
+
322
+ | Key | Default | Used for |
323
+ |---|---|---|
310
324
  | `pinned` | `"Закреплённое сообщение"` | `Chat.Pinned labels`: the title with one pinned message. |
311
325
  | `pinnedOf` | `"Закреплённое {index} из {count}"` | `Chat.Pinned labels`: the title with several, the newest last. |
312
326
  | `unpin` | `"Открепить"` | `Chat.Pinned labels`: the name of the unpin button. |
313
- | `unread` | `"Непрочитанные сообщения"` | The text of the «unread» band: `Chat.Root labels` for rows from `items`, `Chat.Unread labels` for a hand-placed band. |
314
- | `loading` | `"Загрузка сообщений"` | Announced politely while the conversation loads for the first time (`Chat.Messages loading`). |
315
327
 
316
328
  ## Examples
317
329
  | Example | Shows |
318
330
  |---|---|
319
- | [overview.tsx](examples/overview.tsx) | A complete team messenger over two thousand messages: the header whose status turns into typing, search with highlight, pinned messages, history that loads above, author headers with tags in a group chat, every kind of message, transcripts, reactions, the menu with reply, edit, pin and select, jumps, the new-messages button and the Composer whose messages rise into the list — `Chat.Root`, `Chat.Header`, `Chat.Search`, `Chat.Pinned`, `Chat.Messages`, `type`, `items`, `renderMessage`, `typing`, `selected`, `Chat.Footer`. |
331
+ | [overview.tsx](examples/overview.tsx) | A complete team messenger over two thousand messages: the header whose status turns into typing, search with highlight, pinned messages, history that loads above, author headers with tags in a group chat, every kind of message, transcripts, reactions, the menu with reply, edit, pin and select, jumps, the new-messages button and the Composer whose messages rise into the list — `Chat.Root`, `Chat.Header`, `Chat.Search`, `Chat.Pinned`, `Chat.Messages`, `group`, `items`, `renderMessage`, `typing`, `selected`, `Chat.Footer`. |
320
332
  | [structure.tsx](examples/structure.tsx) | The list alone, written as parts: `Chat.Root` with only `Chat.Messages`, a date that stays on top while its day scrolls, an event of the chat and the unread band — `Chat.Messages`, `Chat.Separator`, `Chat.Service`, `Chat.Unread`. |
321
- | [group-chat.tsx](examples/group-chat.tsx) | A team chat from data: the first message of an author's run opens with the name in the author's hue, a crown for the owner and the member's tag; the avatar — a photo, or initials — closes the run, which holds messages up to a quarter of an hour apart; the dates carry the weekday — `type`, `items`, `renderMessage`, `groupWindow`, `formatDate`, `Message.Author`, `tag`, `Message.AuthorIcon`, `hueOf`. |
333
+ | [group-chat.tsx](examples/group-chat.tsx) | A team chat from data: the first message of an author's run opens with the name in the author's hue, a crown for the owner and the member's tag; the avatar — a photo, or initials — closes the run, which holds messages up to a quarter of an hour apart; the dates carry the weekday — `group`, `items`, `renderMessage`, `groupWindow`, `formatDate`, `Message.Author`, `tag`, `Message.AuthorIcon`, `hueOf`. |
322
334
  | [reactions.tsx](examples/reactions.tsx) | A team's own reactions for approvals: a double tap or `L` puts the approval mark, a long press or `R` opens the team's set, and a chip toggles them back — `quickReaction`, `reactionOptions`, `onReactionToggle`. |
323
335
  | [live.tsx](examples/live.tsx) | A live support chat: the client types — the header and the end of the list say so — then answers; new messages enter at the end, read receipts come from what is on screen, and scrolled up the round button counts what arrived — `typing`, `onNewMessage`, `onRead`. |
324
336
  | [search.tsx](examples/search.tsx) | Search and pinned messages: the search bar marks every match in the texts and transcripts, counts them and steps between them while the others step back; a pinned message's press jumps to it and blinks it — `Chat.SearchButton`, `Chat.Search`, `defaultSearch`, `Chat.Pinned`. |
325
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`. |
326
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`. |
327
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`. |
328
- | [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`. |
329
341
 
330
342
  ## Mistakes
331
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.
332
344
  - A spinner or grey boxes of your own while a dialog loads → `Chat.Messages loading`: bubbles in the messages' geometry that cross-fade into the list.
333
345
  - A `ScrollContainer` or a virtualizing list of your own around messages → `Chat.Messages` scrolls itself and renders a window, keeping the reader's place.
334
346
  - Dates, runs and the unread band built by hand → `Chat.Messages items` with `getKey`, `getAuthor`, `getDate`; `groupMessages` if you build rows yourself.
335
- - An inline `renderMessage` in a long history → wrap it in `useCallback`: a new function renders every item again.
347
+ - A row that shows state kept outside its item (an edit, a pin held in a separate set) → put it into the item: rows render again only when their item or place changes.
348
+ - A ref mirror of the messages to find a reply's original → `entry.find(key)`.
336
349
  - `Message.Author` and `Message.Avatar` only on some messages → put them on every message of a group chat: the message shows the header on the first of a run and the avatar on the last.
337
350
  - An enter animation of your own, or `scrollTop = scrollHeight` after a send → the list enters new messages and keeps the end itself; a hand-made one also plays on history loads.
338
351
  - A new key for a message when the server confirms it → keep the client id: a re-keyed row is a new message, enters again and calls `onNewMessage` again.
@@ -343,5 +356,5 @@ Chat.Root <div> column, fills its host; owns selection,
343
356
  - Checkboxes and selection handling of your own → `Chat.Root selected` with `Chat.SelectionBar`: click, Shift range and drag like DataTable rows.
344
357
 
345
358
  ## Related
346
- - **Built from:** [Message](../message/COMPONENT.md) (`Message.Typing`, the rows), [ScrollContainer](../scroll-container/COMPONENT.md) (the scroller, `anchor="end"`), [Input](../input/COMPONENT.md) (the search field), [Button](../button/COMPONENT.md) (search, steps, unpin, «к последним», the selection bar), [Badge](../badge/COMPONENT.md), [Crossfade](../crossfade/COMPONENT.md) (the status line, the first load), [Skeleton](../skeleton/COMPONENT.md) (the first load, older history), `internal/VisuallyHidden` (the loading announcement), Icon (`action.search`, `nav.chevronUp`, `nav.chevronDown`, `action.pin`, `action.close`); `useVirtualRows` (the window), `internal/messageList` (the contract between the list and its messages), `internal/readReceipts`, `internal/useRangeSelection` (selection by click, Shift and drag), `internal/messagePart` (the search query its texts mark)
359
+ - **Built from:** [Message](../message/COMPONENT.md) (`Message.Typing`, the rows), [ScrollContainer](../scroll-container/COMPONENT.md) (the scroller, `anchor="end"`), [Input](../input/COMPONENT.md) (the search field), [Button](../button/COMPONENT.md) (search, steps, unpin, «к последним», the selection bar), [Badge](../badge/COMPONENT.md), [Crossfade](../crossfade/COMPONENT.md) (the status line, the first load), [Skeleton](../skeleton/COMPONENT.md) (the first load, older history), [VisuallyHidden](../visually-hidden/COMPONENT.md) (the loading announcement), Icon (`action.search`, `nav.chevronUp`, `nav.chevronDown`, `action.pin`, `action.close`); `useVirtualRows` (the window), `internal/messageList` (the contract between the list and its messages), `internal/readReceipts`, `internal/useRangeSelection` (selection by click, Shift and drag), `internal/messagePart` (the search query its texts mark)
347
360
  - **See also:** [Message](../message/COMPONENT.md) — one message and every content part; [Composer](../composer/COMPONENT.md) — the input in `Chat.Footer`; [Gallery](../gallery/COMPONENT.md), [VoicePlayer](../voice-player/COMPONENT.md), [VideoNote](../video-note/COMPONENT.md), [Timeline](../timeline/COMPONENT.md)
@@ -1,4 +1,4 @@
1
- /** A team chat from data: the first message of an author's run opens with the name in the author's hue, a crown for the owner and the member's tag; the avatar — a photo, or initials — closes the run, which holds messages up to a quarter of an hour apart; the dates carry the weekday — `type`, `items`, `renderMessage`, `groupWindow`, `formatDate`, `Message.Author`, `tag`, `Message.AuthorIcon`, `hueOf`. */
1
+ /** A team chat from data: the first message of an author's run opens with the name in the author's hue, a crown for the owner and the member's tag; the avatar — a photo, or initials — closes the run, which holds messages up to a quarter of an hour apart; the dates carry the weekday — `group`, `items`, `renderMessage`, `groupWindow`, `formatDate`, `Message.Author`, `tag`, `Message.AuthorIcon`, `hueOf`. */
2
2
  import { Avatar, Card, Chat, hueOf, Icon, Message } from "prime-ui-kit";
3
3
 
4
4
  import styles from "./examples.module.css";
@@ -126,7 +126,7 @@ export default function ChatGroupChatExample() {
126
126
  <Card.Root className={styles.short}>
127
127
  <Chat.Root>
128
128
  <Chat.Messages
129
- type="group"
129
+ group
130
130
  aria-label="Чат команды релиза"
131
131
  items={MESSAGES}
132
132
  getKey={(message) => message.id}
@@ -1,11 +1,11 @@
1
- /** A complete team messenger over two thousand messages: the header whose status turns into typing, search with highlight, pinned messages, history that loads above, author headers with tags in a group chat, every kind of message, transcripts, reactions, the menu with reply, edit, pin and select, jumps, the new-messages button and the Composer whose messages rise into the list — `Chat.Root`, `Chat.Header`, `Chat.Search`, `Chat.Pinned`, `Chat.Messages`, `type`, `items`, `renderMessage`, `typing`, `selected`, `Chat.Footer`. */
1
+ /** A complete team messenger over two thousand messages: the header whose status turns into typing, search with highlight, pinned messages, history that loads above, author headers with tags in a group chat, every kind of message, transcripts, reactions, the menu with reply, edit, pin and select, jumps, the new-messages button and the Composer whose messages rise into the list — `Chat.Root`, `Chat.Header`, `Chat.Search`, `Chat.Pinned`, `Chat.Messages`, `group`, `items`, `renderMessage`, `typing`, `selected`, `Chat.Footer`. */
2
2
  import {
3
3
  Avatar,
4
4
  Button,
5
5
  Card,
6
6
  Chat,
7
+ type ChatMessageEntry,
7
8
  Composer,
8
- type ComposerMediaItem,
9
9
  type ComposerMessage,
10
10
  type ComposerRecording,
11
11
  Dropdown,
@@ -47,6 +47,7 @@ type ChatMessage = Content & {
47
47
  forwardedFrom?: string;
48
48
  replyTo?: string;
49
49
  reactions?: MessageReaction[];
50
+ pinned?: boolean;
50
51
  };
51
52
 
52
53
  const NOW = new Date(2026, 9, 8, 15, 0);
@@ -315,8 +316,6 @@ const READ_MS = 1200;
315
316
  const TYPING_MS = 1800;
316
317
  const HISTORY_MS = 900;
317
318
  const TRANSCRIBE_MS = 1400;
318
- /** An album holds up to ten photos and videos: more go as the next album. */
319
- const ALBUM_MAX = 10;
320
319
 
321
320
  const wait = (ms: number) => new Promise<void>((resolve) => window.setTimeout(resolve, ms));
322
321
 
@@ -367,11 +366,6 @@ const transcribeVideoNote = () =>
367
366
  () => "Снимаю склад: стеллаж B, третий ряд. Коробки по заказу 4821 тут.",
368
367
  );
369
368
 
370
- const albumsOf = (media: readonly ComposerMediaItem[]) =>
371
- Array.from({ length: Math.ceil(media.length / ALBUM_MAX) }, (_, index) =>
372
- media.slice(index * ALBUM_MAX, (index + 1) * ALBUM_MAX),
373
- );
374
-
375
369
  /** The media URLs a message plays from. */
376
370
  const sourcesOf = (message: ChatMessage): string[] =>
377
371
  message.kind === "media"
@@ -478,20 +472,21 @@ const content = (message: ChatMessage, onCancel: () => void) => {
478
472
  };
479
473
 
480
474
  export default function ChatOverviewExample() {
481
- const [messages, setMessages] = React.useState(() => [...ARCHIVE, ...HISTORY]);
475
+ // Everything a row shows lives in its message (a pin too): a row renders again only when its
476
+ // message changes.
477
+ const [messages, setMessages] = React.useState(() =>
478
+ [...ARCHIVE, ...HISTORY].map((message) =>
479
+ PINNED_FIRST.includes(message.id) ? { ...message, pinned: true } : message,
480
+ ),
481
+ );
482
482
  const [hasOlder, setHasOlder] = React.useState(true);
483
483
  const [selected, setSelected] = React.useState<readonly string[] | null>(null);
484
- const [pinned, setPinned] = React.useState<readonly string[]>(PINNED_FIRST);
485
484
  const [typing, setTyping] = React.useState(false);
486
485
  const [replyTo, setReplyTo] = React.useState<ChatMessage | null>(null);
487
486
  const [editing, setEditing] = React.useState<ChatMessage | null>(null);
488
487
  const [draft, setDraft] = React.useState("");
489
488
  const replies = React.useRef(0);
490
489
  const queue = useUploadQueue({ upload: uploadFile });
491
- // The newest messages for what a row looks up (a reply's original, the files to let go), without
492
- // making every row render again when one message changes.
493
- const messagesRef = React.useRef(messages);
494
- messagesRef.current = messages;
495
490
 
496
491
  const patch = (id: string, next: Partial<ChatMessage>) =>
497
492
  setMessages((current) =>
@@ -549,15 +544,15 @@ export default function ChatOverviewExample() {
549
544
  };
550
545
  }, []);
551
546
 
552
- // Photos and videos go as albums in the order of the tray, the text as their caption; other
553
- // files as file messages.
554
- const send = ({ text, media, files, replyTo: reply, editOf }: ComposerMessage) => {
547
+ // Photos and videos go as albums in the order of the tray, the text as the first one's caption;
548
+ // other files as file messages.
549
+ const send = ({ text, albums, files, replyTo: reply, editOf }: ComposerMessage) => {
555
550
  if (editOf) {
556
551
  patch(editOf, { kind: "text", text, edited: true } as Partial<ChatMessage>);
557
552
  setDraft("");
558
553
  return;
559
554
  }
560
- albumsOf(media).forEach((album, index) => {
555
+ albums.forEach((album, index) => {
561
556
  post(
562
557
  {
563
558
  kind: "media",
@@ -573,7 +568,7 @@ export default function ChatOverviewExample() {
573
568
  });
574
569
  for (const item of files)
575
570
  post({ kind: "file", name: item.file.name, size: item.file.size }, reply);
576
- if (text && media.length === 0) post({ kind: "text", text }, reply);
571
+ if (text && albums.length === 0) post({ kind: "text", text }, reply);
577
572
  };
578
573
 
579
574
  const sendRecording =
@@ -607,129 +602,123 @@ export default function ChatOverviewExample() {
607
602
  setHasOlder(false);
608
603
  };
609
604
 
610
- const remove = (ids: readonly string[]) => {
611
- for (const message of messagesRef.current) {
612
- if (!ids.includes(message.id)) continue;
605
+ const remove = (removed: readonly ChatMessage[]) => {
606
+ for (const message of removed) {
613
607
  for (const url of sourcesOf(message)) {
614
608
  if (localUrls.current.delete(url)) URL.revokeObjectURL(url);
615
609
  }
616
610
  }
617
- setMessages((current) => current.filter((message) => !ids.includes(message.id)));
618
- setPinned((current) => current.filter((id) => !ids.includes(id)));
611
+ const ids = new Set(removed.map((message) => message.id));
612
+ setMessages((current) => current.filter((message) => !ids.has(message.id)));
619
613
  };
620
614
 
621
615
  const togglePin = (id: string) =>
622
- setPinned((current) =>
623
- current.includes(id) ? current.filter((item) => item !== id) : [...current, id],
616
+ setMessages((current) =>
617
+ current.map((message) =>
618
+ message.id === id ? { ...message, pinned: !message.pinned } : message,
619
+ ),
624
620
  );
625
621
 
626
- const pinnedItems = pinned.flatMap((id) => {
627
- const message = messages.find((item) => item.id === id);
628
- return message ? [{ value: id, text: excerpt(message) }] : [];
629
- });
622
+ const pinnedItems = messages.flatMap((message) =>
623
+ message.pinned ? [{ value: message.id, text: excerpt(message) }] : [],
624
+ );
630
625
 
631
- // Stable while the pins are: a reaction, a status or a keystroke in the composer renders again
632
- // only the row whose data changed.
633
- // biome-ignore lint/correctness/useExhaustiveDependencies: the handlers only call state setters
634
- const renderMessage = React.useCallback(
635
- (message: ChatMessage) => {
636
- if (message.kind === "service") return <Chat.Service>{message.text}</Chat.Service>;
637
- const own = message.from === "me";
638
- const author = MEMBERS[message.from];
639
- const original = message.replyTo
640
- ? messagesRef.current.find((item) => item.id === message.replyTo)
641
- : undefined;
642
- return (
643
- <Message.Root
644
- direction={own ? "outgoing" : "incoming"}
645
- time={message.sentAt}
646
- status={message.status}
647
- edited={message.edited}
648
- onRetry={
649
- message.status === "failed"
650
- ? () => wait(900).then(() => patch(message.id, { status: "read" }))
651
- : undefined
652
- }
653
- onReactionToggle={(emoji) =>
654
- patch(message.id, { reactions: toggleOwn(message.reactions ?? [], emoji) })
655
- }
656
- >
657
- {own ? null : (
658
- <Message.Avatar>
659
- <Avatar.Root color={hueOf(author.id)}>
660
- {author.src ? <Avatar.Image src={author.src} alt="" /> : null}
661
- <Avatar.Fallback>{initialsOf(author.name)}</Avatar.Fallback>
662
- </Avatar.Root>
663
- </Message.Avatar>
664
- )}
665
- {own ? null : (
666
- <Message.Author color={hueOf(author.id)} tag={author.tag}>
667
- {author.name}
668
- {author.owner ? (
669
- <Message.AuthorIcon>
670
- <Icon name="object.crown" />
671
- </Message.AuthorIcon>
672
- ) : null}
673
- </Message.Author>
674
- )}
675
- {message.forwardedFrom ? <Message.Forwarded from={message.forwardedFrom} /> : null}
676
- {original ? (
677
- <Message.Reply
678
- author={MEMBERS[original.from].name}
679
- color={hueOf(original.from)}
680
- target={original.id}
681
- >
682
- {excerpt(original)}
683
- </Message.Reply>
684
- ) : null}
685
- {content(message, () => remove([message.id]))}
686
- {message.reactions?.length ? <Message.Reactions items={message.reactions} /> : null}
687
- <Message.Menu>
688
- <Dropdown.Item
689
- onSelect={() => {
690
- setEditing(null);
691
- setReplyTo(message);
692
- }}
693
- >
694
- <Dropdown.ItemIcon>
695
- <Icon name="action.reply" />
696
- </Dropdown.ItemIcon>
697
- Ответить
698
- </Dropdown.Item>
699
- {own && message.kind === "text" ? (
700
- <Dropdown.Item onSelect={() => startEdit(message)}>
701
- <Dropdown.ItemIcon>
702
- <Icon name="action.edit" />
703
- </Dropdown.ItemIcon>
704
- Изменить
705
- </Dropdown.Item>
626
+ // A reaction, a status or a keystroke in the composer renders again only the row whose message
627
+ // changed; a reply's original comes from the list (`entry.find`).
628
+ const renderMessage = (message: ChatMessage, entry: ChatMessageEntry<ChatMessage>) => {
629
+ if (message.kind === "service") return <Chat.Service>{message.text}</Chat.Service>;
630
+ const own = message.from === "me";
631
+ const author = MEMBERS[message.from];
632
+ const original = message.replyTo ? entry.find(message.replyTo) : undefined;
633
+ return (
634
+ <Message.Root
635
+ direction={own ? "outgoing" : "incoming"}
636
+ time={message.sentAt}
637
+ status={message.status}
638
+ edited={message.edited}
639
+ onRetry={
640
+ message.status === "failed"
641
+ ? () => wait(900).then(() => patch(message.id, { status: "read" }))
642
+ : undefined
643
+ }
644
+ onReactionToggle={(emoji) =>
645
+ patch(message.id, { reactions: toggleOwn(message.reactions ?? [], emoji) })
646
+ }
647
+ >
648
+ {own ? null : (
649
+ <Message.Avatar>
650
+ <Avatar.Root color={hueOf(author.id)}>
651
+ {author.src ? <Avatar.Image src={author.src} alt="" /> : null}
652
+ <Avatar.Fallback>{initialsOf(author.name)}</Avatar.Fallback>
653
+ </Avatar.Root>
654
+ </Message.Avatar>
655
+ )}
656
+ {own ? null : (
657
+ <Message.Author color={hueOf(author.id)} tag={author.tag}>
658
+ {author.name}
659
+ {author.owner ? (
660
+ <Message.AuthorIcon>
661
+ <Icon name="object.crown" />
662
+ </Message.AuthorIcon>
706
663
  ) : null}
707
- <Dropdown.Item onSelect={() => navigator.clipboard?.writeText(excerpt(message))}>
664
+ </Message.Author>
665
+ )}
666
+ {message.forwardedFrom ? <Message.Forwarded from={message.forwardedFrom} /> : null}
667
+ {original ? (
668
+ <Message.Reply
669
+ author={MEMBERS[original.from].name}
670
+ color={hueOf(original.from)}
671
+ target={original.id}
672
+ >
673
+ {excerpt(original)}
674
+ </Message.Reply>
675
+ ) : null}
676
+ {content(message, () => remove([message]))}
677
+ {message.reactions?.length ? <Message.Reactions items={message.reactions} /> : null}
678
+ <Message.Menu>
679
+ <Dropdown.Item
680
+ onSelect={() => {
681
+ setEditing(null);
682
+ setReplyTo(message);
683
+ }}
684
+ >
685
+ <Dropdown.ItemIcon>
686
+ <Icon name="action.reply" />
687
+ </Dropdown.ItemIcon>
688
+ Ответить
689
+ </Dropdown.Item>
690
+ {own && message.kind === "text" ? (
691
+ <Dropdown.Item onSelect={() => startEdit(message)}>
708
692
  <Dropdown.ItemIcon>
709
- <Icon name="action.copy" />
693
+ <Icon name="action.edit" />
710
694
  </Dropdown.ItemIcon>
711
- Скопировать
695
+ Изменить
712
696
  </Dropdown.Item>
713
- <Dropdown.Item onSelect={() => togglePin(message.id)}>
697
+ ) : null}
698
+ <Dropdown.Item onSelect={() => navigator.clipboard?.writeText(excerpt(message))}>
699
+ <Dropdown.ItemIcon>
700
+ <Icon name="action.copy" />
701
+ </Dropdown.ItemIcon>
702
+ Скопировать
703
+ </Dropdown.Item>
704
+ <Dropdown.Item onSelect={() => togglePin(message.id)}>
705
+ <Dropdown.ItemIcon>
706
+ <Icon name="action.pin" />
707
+ </Dropdown.ItemIcon>
708
+ {message.pinned ? "Открепить" : "Закрепить"}
709
+ </Dropdown.Item>
710
+ {own ? (
711
+ <Dropdown.Item tone="danger" onSelect={() => remove([message])}>
714
712
  <Dropdown.ItemIcon>
715
- <Icon name="action.pin" />
713
+ <Icon name="action.delete" />
716
714
  </Dropdown.ItemIcon>
717
- {pinned.includes(message.id) ? "Открепить" : "Закрепить"}
715
+ Удалить
718
716
  </Dropdown.Item>
719
- {own ? (
720
- <Dropdown.Item tone="danger" onSelect={() => remove([message.id])}>
721
- <Dropdown.ItemIcon>
722
- <Icon name="action.delete" />
723
- </Dropdown.ItemIcon>
724
- Удалить
725
- </Dropdown.Item>
726
- ) : null}
727
- </Message.Menu>
728
- </Message.Root>
729
- );
730
- },
731
- [pinned],
732
- );
717
+ ) : null}
718
+ </Message.Menu>
719
+ </Message.Root>
720
+ );
721
+ };
733
722
 
734
723
  return (
735
724
  <Card.Root className={styles.messenger}>
@@ -770,7 +759,7 @@ export default function ChatOverviewExample() {
770
759
  <Chat.Search />
771
760
  <Chat.Pinned items={pinnedItems} onRemove={togglePin} />
772
761
  <Chat.Messages
773
- type="group"
762
+ group
774
763
  reader={ME}
775
764
  items={messages}
776
765
  getKey={(message) => message.id}
@@ -793,7 +782,7 @@ export default function ChatOverviewExample() {
793
782
  size="s"
794
783
  disabled={!selected?.length}
795
784
  onClick={() => {
796
- remove(selected ?? []);
785
+ remove(messages.filter((message) => selected?.includes(message.id)));
797
786
  setSelected(null);
798
787
  }}
799
788
  >
@@ -813,7 +802,7 @@ export default function ChatOverviewExample() {
813
802
  >
814
803
  <Composer.Attach />
815
804
  {replyTo ? (
816
- <Composer.Context value={replyTo.id} onDismiss={() => setReplyTo(null)}>
805
+ <Composer.Context messageId={replyTo.id} onDismiss={() => setReplyTo(null)}>
817
806
  <Composer.Title>Ответ {MEMBERS[replyTo.from].name}</Composer.Title>
818
807
  <Composer.Description>{excerpt(replyTo)}</Composer.Description>
819
808
  </Composer.Context>
@@ -821,7 +810,7 @@ export default function ChatOverviewExample() {
821
810
  {editing ? (
822
811
  <Composer.Context
823
812
  mode="edit"
824
- value={editing.id}
813
+ messageId={editing.id}
825
814
  onDismiss={() => {
826
815
  setEditing(null);
827
816
  setDraft("");