prime-ui-kit 0.14.0 → 0.16.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 (1276) hide show
  1. package/README.md +79 -71
  2. package/dist/chunks/{chunk-WXKRUVSE.js → chunk-4PSQ64S4.js} +3145 -1800
  3. package/dist/chunks/{chunk-SYEX7OVT.js → chunk-6TPHKCUJ.js} +9424 -9244
  4. package/dist/chunks/{chunk-6TI4DSM5.js → chunk-A7OQWH6R.js} +1 -1
  5. package/dist/chunks/{chunk-P6ZO37JM.js → chunk-HDBQICPW.js} +170 -138
  6. package/dist/chunks/{chunk-Q3BFRQHZ.js → chunk-U3Q2I3MY.js} +169 -10
  7. package/dist/color-picker.js +3 -3
  8. package/dist/components/accordion/Accordion.d.ts +52 -5
  9. package/dist/components/avatar/Avatar.d.ts +31 -8
  10. package/dist/components/badge/Badge.d.ts +93 -25
  11. package/dist/components/banner/Banner.d.ts +17 -10
  12. package/dist/components/breadcrumb/Breadcrumb.d.ts +18 -5
  13. package/dist/components/button/Button.d.ts +102 -43
  14. package/dist/components/button-group/ButtonGroup.d.ts +32 -8
  15. package/dist/components/card/Card.d.ts +15 -9
  16. package/dist/components/chart-frame/ChartFrame.d.ts +58 -51
  17. package/dist/components/chat/Chat.d.ts +77 -38
  18. package/dist/components/chat/ChatPinned.d.ts +20 -8
  19. package/dist/components/chat/ChatRows.d.ts +3 -0
  20. package/dist/components/chat/MessageList.d.ts +14 -19
  21. package/dist/components/chat/chatContext.d.ts +3 -3
  22. package/dist/components/chat/messageFlow.d.ts +1 -1
  23. package/dist/components/chat-list/ChatList.d.ts +88 -34
  24. package/dist/components/checkbox/Checkbox.d.ts +61 -12
  25. package/dist/components/code-block/CodeBlock.d.ts +11 -5
  26. package/dist/components/color-field/ColorField.d.ts +54 -14
  27. package/dist/components/color-picker/ColorPicker.d.ts +64 -30
  28. package/dist/components/color-picker/ColorPresets.d.ts +68 -13
  29. package/dist/components/color-swatches/ColorSwatches.d.ts +90 -18
  30. package/dist/components/command-menu/CommandMenu.d.ts +86 -27
  31. package/dist/components/composer/Composer.d.ts +82 -41
  32. package/dist/components/composer/useRecorder.d.ts +0 -2
  33. package/dist/components/confirm-dialog/ConfirmDialog.d.ts +40 -16
  34. package/dist/components/crossfade/Crossfade.d.ts +5 -8
  35. package/dist/components/data-table/ColumnsMenu.d.ts +6 -2
  36. package/dist/components/data-table/DataTable.d.ts +157 -58
  37. package/dist/components/data-table/Footer.d.ts +2 -4
  38. package/dist/components/data-table/Row.d.ts +1 -1
  39. package/dist/components/data-table/StateRows.d.ts +2 -2
  40. package/dist/components/data-table/reorder.d.ts +10 -10
  41. package/dist/components/data-table/types.d.ts +5 -0
  42. package/dist/components/data-table/useInfiniteRows.d.ts +3 -3
  43. package/dist/components/datepicker/Datepicker.d.ts +61 -12
  44. package/dist/components/datepicker/DatepickerPanel.d.ts +76 -16
  45. package/dist/components/datepicker/panelLayout.d.ts +6 -11
  46. package/dist/components/description-list/DescriptionList.d.ts +40 -11
  47. package/dist/components/digit-input/DigitInput.d.ts +50 -19
  48. package/dist/components/divider/Divider.d.ts +15 -5
  49. package/dist/components/dnd/Dnd.d.ts +153 -42
  50. package/dist/components/dnd/geometry.d.ts +0 -8
  51. package/dist/components/dnd/labels.d.ts +1 -1
  52. package/dist/components/dnd/useDropTarget.d.ts +0 -2
  53. package/dist/components/dnd/useSortableList.d.ts +6 -1
  54. package/dist/components/drawer/Drawer.d.ts +39 -18
  55. package/dist/components/dropdown/Dropdown.d.ts +90 -19
  56. package/dist/components/empty-page/EmptyPage.d.ts +14 -15
  57. package/dist/components/example-frame/ExampleFrame.d.ts +38 -8
  58. package/dist/components/field-list/FieldList.d.ts +57 -19
  59. package/dist/components/fieldset/Fieldset.d.ts +12 -7
  60. package/dist/components/file-upload/FileUpload.d.ts +119 -42
  61. package/dist/components/gallery/Gallery.d.ts +44 -16
  62. package/dist/components/gallery/layout.d.ts +4 -1
  63. package/dist/components/gantt/Gantt.d.ts +69 -34
  64. package/dist/components/gantt/GanttRow.d.ts +2 -2
  65. package/dist/components/hint/Hint.d.ts +10 -4
  66. package/dist/components/index.d.ts +19 -18
  67. package/dist/components/input/Input.d.ts +78 -25
  68. package/dist/components/kanban/Kanban.d.ts +64 -36
  69. package/dist/components/kbd/Kbd.d.ts +3 -1
  70. package/dist/components/label/Label.d.ts +33 -4
  71. package/dist/components/link-button/LinkButton.d.ts +40 -10
  72. package/dist/components/list/List.d.ts +48 -26
  73. package/dist/components/login-form/LoginForm.d.ts +71 -8
  74. package/dist/components/media-viewer/MediaViewer.d.ts +46 -18
  75. package/dist/components/media-viewer/physics.d.ts +0 -2
  76. package/dist/components/media-viewer/viewerEngine.d.ts +0 -1
  77. package/dist/components/message/Message.d.ts +27 -16
  78. package/dist/components/message/MessageCards.d.ts +49 -10
  79. package/dist/components/message/MessageFile.d.ts +19 -5
  80. package/dist/components/message/MessageParts.d.ts +44 -18
  81. package/dist/components/message/MessageReactionBar.d.ts +3 -1
  82. package/dist/components/message/MessageTyping.d.ts +10 -6
  83. package/dist/components/message/bubbleMorph.d.ts +2 -0
  84. package/dist/components/modal/Modal.d.ts +6 -6
  85. package/dist/components/native-select/NativeSelect.d.ts +22 -7
  86. package/dist/components/notification/Notification.d.ts +35 -11
  87. package/dist/components/notification/NotificationStore.d.ts +12 -3
  88. package/dist/components/page-content/PageContent.d.ts +56 -37
  89. package/dist/components/page-toolbar/PageToolbar.d.ts +7 -6
  90. package/dist/components/pagination/Pagination.d.ts +25 -6
  91. package/dist/components/popover/Popover.d.ts +54 -31
  92. package/dist/components/progress-bar/ProgressBar.d.ts +37 -12
  93. package/dist/components/progress-circle/ProgressCircle.d.ts +32 -13
  94. package/dist/components/radio/Radio.d.ts +58 -15
  95. package/dist/components/scroll-container/ScrollContainer.d.ts +28 -14
  96. package/dist/components/scroll-container/useScrollEdges.d.ts +1 -24
  97. package/dist/components/segmented-control/SegmentedControl.d.ts +73 -15
  98. package/dist/components/select/Select.d.ts +104 -30
  99. package/dist/components/select/SelectItem.d.ts +35 -8
  100. package/dist/components/select/selectContext.d.ts +7 -19
  101. package/dist/components/sheet/Sheet.d.ts +32 -15
  102. package/dist/components/skeleton/Skeleton.d.ts +9 -3
  103. package/dist/components/slider/Slider.d.ts +55 -15
  104. package/dist/components/smart-filter/SmartFilter.d.ts +39 -12
  105. package/dist/components/sparkline/Sparkline.d.ts +42 -19
  106. package/dist/components/spinner/Spinner.d.ts +11 -5
  107. package/dist/components/stepper/Stepper.d.ts +41 -19
  108. package/dist/components/switch/Switch.d.ts +37 -12
  109. package/dist/components/tabs/Tabs.d.ts +61 -18
  110. package/dist/components/tag-select/TagSelect.d.ts +74 -20
  111. package/dist/components/textarea/Textarea.d.ts +52 -25
  112. package/dist/components/thumbnail/Thumbnail.d.ts +50 -20
  113. package/dist/components/timeline/Timeline.d.ts +85 -66
  114. package/dist/components/tooltip/Tooltip.d.ts +47 -17
  115. package/dist/components/typography/Typography.d.ts +32 -6
  116. package/dist/components/video-note/VideoNote.d.ts +7 -1
  117. package/dist/{internal → components/visually-hidden}/VisuallyHidden.d.ts +5 -5
  118. package/dist/components/voice-player/VoicePlayer.d.ts +16 -3
  119. package/dist/hooks/breakpoints.d.ts +10 -0
  120. package/dist/hooks/floatingPosition.d.ts +42 -0
  121. package/dist/hooks/useDraft.d.ts +12 -0
  122. package/dist/hooks/useEdgeOverflow.d.ts +5 -3
  123. package/dist/hooks/useElementSize.d.ts +31 -0
  124. package/dist/hooks/useEnterConfirm.d.ts +2 -1
  125. package/dist/hooks/useImageStatus.d.ts +12 -5
  126. package/dist/hooks/useLoadMore.d.ts +28 -0
  127. package/dist/hooks/useMediaQuery.d.ts +1 -3
  128. package/dist/hooks/useMergedRefs.d.ts +10 -4
  129. package/dist/hooks/useModalLayer.d.ts +13 -7
  130. package/dist/hooks/usePosition.d.ts +4 -42
  131. package/dist/hooks/usePresence.d.ts +4 -7
  132. package/dist/hooks/useScrollRegion.d.ts +28 -0
  133. package/dist/hooks/useStableValue.d.ts +6 -0
  134. package/dist/hooks/useSwipeDismiss.d.ts +38 -17
  135. package/dist/hooks/useVirtualRows.d.ts +9 -3
  136. package/dist/icon-set.js +2 -2
  137. package/dist/icons/Icon.d.ts +1 -1
  138. package/dist/icons/glyph.d.ts +9 -2
  139. package/dist/index.css +1 -1
  140. package/dist/index.js +13 -3
  141. package/dist/internal/AnchorRectContext.d.ts +2 -1
  142. package/dist/internal/ChartTooltip.d.ts +1 -1
  143. package/dist/internal/CheckMark.d.ts +2 -2
  144. package/dist/internal/ChoiceField.d.ts +29 -10
  145. package/dist/internal/ControlSizeContext.d.ts +16 -0
  146. package/dist/internal/Disclosure.d.ts +38 -9
  147. package/dist/internal/FieldAction.d.ts +20 -12
  148. package/dist/internal/FieldCommit.d.ts +8 -11
  149. package/dist/internal/FieldFrame.d.ts +100 -21
  150. package/dist/internal/MenuGroup.d.ts +3 -1
  151. package/dist/internal/MorphText.d.ts +2 -1
  152. package/dist/internal/ProgressLegend.d.ts +3 -2
  153. package/dist/internal/RegionSwap.d.ts +41 -0
  154. package/dist/internal/RollingNumber.d.ts +10 -1
  155. package/dist/internal/RowAction.d.ts +26 -0
  156. package/dist/internal/SwitcherScroller.d.ts +11 -0
  157. package/dist/internal/attachmentTile.d.ts +1 -1
  158. package/dist/internal/audio.d.ts +13 -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 +29 -5
  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 +53 -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 +63 -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-header/AppHeader.d.ts +34 -44
  223. package/dist/layout/app-shell/AppShell.d.ts +72 -8
  224. package/dist/layout/bottom-nav/BottomNav.d.ts +58 -22
  225. package/dist/layout/index.d.ts +3 -3
  226. package/dist/layout/sidebar/Sidebar.d.ts +232 -101
  227. package/dist/skill/SKILL.md +17 -15
  228. package/dist/skill/anti-slop.md +105 -24
  229. package/dist/skill/api-contract.md +117 -37
  230. package/dist/skill/cheatsheet.md +45 -38
  231. package/dist/skill/checklist.md +57 -85
  232. package/dist/skill/choosing.md +24 -28
  233. package/dist/skill/components.md +52 -57
  234. package/dist/skill/composition.md +321 -84
  235. package/dist/skill/foundations.md +32 -25
  236. package/dist/skill/layouts.md +104 -73
  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 +23 -16
  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 +6 -6
  250. package/dist/skill/reference/components/avatar/examples/team-group.tsx +2 -2
  251. package/dist/skill/reference/components/badge/COMPONENT.md +66 -34
  252. package/dist/skill/reference/components/badge/examples/applied-filters.tsx +13 -19
  253. package/dist/skill/reference/components/badge/examples/controlled.tsx +32 -0
  254. package/dist/skill/reference/components/badge/examples/examples.module.css +3 -10
  255. package/dist/skill/reference/components/badge/examples/filter-values.tsx +4 -6
  256. package/dist/skill/reference/components/badge/examples/in-controls.tsx +1 -1
  257. package/dist/skill/reference/components/badge/examples/overview.tsx +6 -5
  258. package/dist/skill/reference/components/badge/examples/server-tags.tsx +2 -6
  259. package/dist/skill/reference/components/badge/examples/square.tsx +21 -0
  260. package/dist/skill/reference/components/badge/examples/states.tsx +4 -4
  261. package/dist/skill/reference/components/badge/examples/with-icon.tsx +10 -1
  262. package/dist/skill/reference/components/banner/COMPONENT.md +9 -5
  263. package/dist/skill/reference/components/banner/examples/dismissible.tsx +3 -19
  264. package/dist/skill/reference/components/banner/examples/examples.module.css +1 -5
  265. package/dist/skill/reference/components/banner/examples/overview.tsx +1 -1
  266. package/dist/skill/reference/components/banner/examples/page-strip.tsx +16 -22
  267. package/dist/skill/reference/components/breadcrumb/COMPONENT.md +21 -14
  268. package/dist/skill/reference/components/breadcrumb/examples/ellipsis.tsx +2 -2
  269. package/dist/skill/reference/components/breadcrumb/examples/examples.module.css +1 -1
  270. package/dist/skill/reference/components/breadcrumb/examples/overflow.tsx +1 -1
  271. package/dist/skill/reference/components/breadcrumb/examples/sizes.tsx +6 -8
  272. package/dist/skill/reference/components/breadcrumb/examples/with-icon.tsx +15 -8
  273. package/dist/skill/reference/components/button/COMPONENT.md +66 -30
  274. package/dist/skill/reference/components/button/examples/align.tsx +25 -0
  275. package/dist/skill/reference/components/button/examples/controlled.tsx +21 -0
  276. package/dist/skill/reference/components/button/examples/density.tsx +45 -0
  277. package/dist/skill/reference/components/button/examples/examples.module.css +14 -25
  278. package/dist/skill/reference/components/button/examples/label-morph.tsx +1 -1
  279. package/dist/skill/reference/components/button/examples/on-colored-host.tsx +19 -19
  280. package/dist/skill/reference/components/button/examples/over-media.tsx +7 -1
  281. package/dist/skill/reference/components/button/examples/toggle.tsx +2 -10
  282. package/dist/skill/reference/components/button-group/COMPONENT.md +23 -17
  283. package/dist/skill/reference/components/button-group/examples/controlled.tsx +1 -1
  284. package/dist/skill/reference/components/button-group/examples/in-form.tsx +22 -2
  285. package/dist/skill/reference/components/button-group/examples/states.tsx +10 -1
  286. package/dist/skill/reference/components/card/COMPONENT.md +18 -6
  287. package/dist/skill/reference/components/card/examples/content-templates.tsx +8 -2
  288. package/dist/skill/reference/components/card/examples/examples.module.css +4 -16
  289. package/dist/skill/reference/components/card/examples/overview.tsx +11 -11
  290. package/dist/skill/reference/components/card/examples/screen.tsx +363 -0
  291. package/dist/skill/reference/components/card/examples/variants.tsx +75 -34
  292. package/dist/skill/reference/components/chart-frame/COMPONENT.md +25 -28
  293. package/dist/skill/reference/components/chart-frame/examples/controlled.tsx +9 -7
  294. package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +117 -0
  295. package/dist/skill/reference/components/chart-frame/examples/narrow.tsx +24 -5
  296. package/dist/skill/reference/components/chart-frame/examples/overview.tsx +5 -2
  297. package/dist/skill/reference/components/chart-frame/examples/states.tsx +72 -62
  298. package/dist/skill/reference/components/chart-frame/examples/tooltip.tsx +27 -26
  299. package/dist/skill/reference/components/chat/COMPONENT.md +37 -22
  300. package/dist/skill/reference/components/chat/examples/group-chat.tsx +16 -3
  301. package/dist/skill/reference/components/chat/examples/overview.tsx +119 -130
  302. package/dist/skill/reference/components/chat/examples/reactions.tsx +116 -0
  303. package/dist/skill/reference/components/chat/examples/screen.module.css +9 -0
  304. package/dist/skill/reference/components/chat/examples/screen.tsx +695 -0
  305. package/dist/skill/reference/components/chat/examples/states.tsx +23 -22
  306. package/dist/skill/reference/components/chat-list/COMPONENT.md +11 -5
  307. package/dist/skill/reference/components/chat-list/examples/examples.module.css +0 -8
  308. package/dist/skill/reference/components/chat-list/examples/links.tsx +72 -0
  309. package/dist/skill/reference/components/chat-list/examples/live.tsx +29 -22
  310. package/dist/skill/reference/components/chat-list/examples/sizes.tsx +6 -8
  311. package/dist/skill/reference/components/chat-list/examples/states.tsx +42 -38
  312. package/dist/skill/reference/components/checkbox/COMPONENT.md +27 -14
  313. package/dist/skill/reference/components/checkbox/examples/controlled.tsx +18 -16
  314. package/dist/skill/reference/components/checkbox/examples/examples.module.css +14 -52
  315. package/dist/skill/reference/components/checkbox/examples/in-form.tsx +16 -16
  316. package/dist/skill/reference/components/checkbox/examples/indicator.tsx +17 -56
  317. package/dist/skill/reference/components/checkbox/examples/overview.tsx +1 -1
  318. package/dist/skill/reference/components/checkbox/examples/states.tsx +6 -1
  319. package/dist/skill/reference/components/checkbox/examples/without-label.tsx +1 -1
  320. package/dist/skill/reference/components/code-block/COMPONENT.md +16 -12
  321. package/dist/skill/reference/components/code-block/examples/examples.module.css +5 -2
  322. package/dist/skill/reference/components/code-block/examples/narrow.tsx +1 -1
  323. package/dist/skill/reference/components/color-field/COMPONENT.md +16 -10
  324. package/dist/skill/reference/components/color-field/examples/examples.module.css +4 -5
  325. package/dist/skill/reference/components/color-field/examples/in-form.tsx +15 -13
  326. package/dist/skill/reference/components/color-field/examples/sizes.tsx +5 -1
  327. package/dist/skill/reference/components/color-field/examples/states.tsx +15 -3
  328. package/dist/skill/reference/components/color-picker/COMPONENT.md +58 -21
  329. package/dist/skill/reference/components/color-picker/examples/controlled-open.tsx +37 -0
  330. package/dist/skill/reference/components/color-picker/examples/controlled.tsx +16 -5
  331. package/dist/skill/reference/components/color-picker/examples/examples.module.css +6 -7
  332. package/dist/skill/reference/components/color-picker/examples/in-form.tsx +24 -22
  333. package/dist/skill/reference/components/color-picker/examples/overview.tsx +1 -1
  334. package/dist/skill/reference/components/color-picker/examples/panel.tsx +1 -1
  335. package/dist/skill/reference/components/color-picker/examples/presets.tsx +2 -2
  336. package/dist/skill/reference/components/color-picker/examples/sizes.tsx +9 -11
  337. package/dist/skill/reference/components/color-picker/examples/states.tsx +30 -16
  338. package/dist/skill/reference/components/color-swatches/COMPONENT.md +22 -8
  339. package/dist/skill/reference/components/color-swatches/examples/examples.module.css +3 -4
  340. package/dist/skill/reference/components/color-swatches/examples/in-form.tsx +19 -17
  341. package/dist/skill/reference/components/color-swatches/examples/palette.tsx +24 -0
  342. package/dist/skill/reference/components/color-swatches/examples/wrapping.tsx +17 -2
  343. package/dist/skill/reference/components/command-menu/COMPONENT.md +60 -20
  344. package/dist/skill/reference/components/command-menu/examples/sizes.tsx +20 -15
  345. package/dist/skill/reference/components/command-menu/examples/states.tsx +46 -24
  346. package/dist/skill/reference/components/composer/COMPONENT.md +44 -25
  347. package/dist/skill/reference/components/composer/examples/attach-menu.tsx +78 -0
  348. package/dist/skill/reference/components/composer/examples/attachments.tsx +2 -2
  349. package/dist/skill/reference/components/composer/examples/examples.module.css +0 -9
  350. package/dist/skill/reference/components/composer/examples/narrow.tsx +1 -1
  351. package/dist/skill/reference/components/composer/examples/reply-edit.tsx +3 -3
  352. package/dist/skill/reference/components/composer/examples/sizes.tsx +3 -5
  353. package/dist/skill/reference/components/composer/examples/states.tsx +4 -6
  354. package/dist/skill/reference/components/confirm-dialog/COMPONENT.md +26 -13
  355. package/dist/skill/reference/components/confirm-dialog/examples/dismiss.tsx +27 -0
  356. package/dist/skill/reference/components/confirm-dialog/examples/failure.tsx +9 -16
  357. package/dist/skill/reference/components/crossfade/COMPONENT.md +12 -5
  358. package/dist/skill/reference/components/crossfade/examples/examples.module.css +1 -40
  359. package/dist/skill/reference/components/crossfade/examples/fill.tsx +16 -19
  360. package/dist/skill/reference/components/crossfade/examples/overview.tsx +14 -16
  361. package/dist/skill/reference/components/crossfade/examples/record-switch.tsx +6 -11
  362. package/dist/skill/{patterns/screen-states.module.css → reference/components/crossfade/examples/screen.module.css} +1 -24
  363. package/dist/skill/reference/components/crossfade/examples/screen.tsx +186 -0
  364. package/dist/skill/reference/components/data-table/COMPONENT.md +34 -23
  365. package/dist/skill/reference/components/data-table/examples/controlled.tsx +14 -2
  366. package/dist/skill/reference/components/data-table/examples/detail-panel.tsx +36 -37
  367. package/dist/skill/reference/components/data-table/examples/examples.module.css +1 -21
  368. package/dist/skill/reference/components/data-table/examples/narrow.tsx +5 -1
  369. package/dist/skill/reference/components/data-table/examples/numeric.tsx +36 -4
  370. package/dist/skill/reference/components/data-table/examples/overview.tsx +1 -0
  371. package/dist/skill/reference/components/data-table/examples/row-link.tsx +2 -1
  372. package/dist/skill/reference/components/data-table/examples/row-open.tsx +7 -36
  373. package/dist/skill/reference/components/data-table/examples/screen.module.css +13 -0
  374. package/dist/skill/{patterns/list-page.tsx → reference/components/data-table/examples/screen.tsx} +95 -74
  375. package/dist/skill/reference/components/data-table/examples/sizes.tsx +17 -17
  376. package/dist/skill/reference/components/data-table/examples/states.tsx +37 -29
  377. package/dist/skill/reference/components/datepicker/COMPONENT.md +57 -25
  378. package/dist/skill/reference/components/datepicker/examples/dismiss.tsx +15 -0
  379. package/dist/skill/reference/components/datepicker/examples/examples.module.css +4 -7
  380. package/dist/skill/reference/components/datepicker/examples/in-form.tsx +29 -29
  381. package/dist/skill/reference/components/datepicker/examples/locale.tsx +35 -0
  382. package/dist/skill/reference/components/datepicker/examples/range-presets.tsx +11 -2
  383. package/dist/skill/reference/components/datepicker/examples/sizes.tsx +2 -2
  384. package/dist/skill/reference/components/datepicker/examples/states.tsx +11 -3
  385. package/dist/skill/reference/components/datepicker/examples/validation.tsx +3 -3
  386. package/dist/skill/reference/components/description-list/COMPONENT.md +24 -8
  387. package/dist/skill/reference/components/description-list/examples/examples.module.css +4 -24
  388. package/dist/skill/reference/components/description-list/examples/narrow.tsx +1 -1
  389. package/dist/skill/{patterns/detail-page.module.css → reference/components/description-list/examples/screen.module.css} +2 -27
  390. package/dist/skill/reference/components/description-list/examples/screen.tsx +206 -0
  391. package/dist/skill/reference/components/description-list/examples/sizes.tsx +2 -4
  392. package/dist/skill/reference/components/description-list/examples/structure.tsx +7 -8
  393. package/dist/skill/reference/components/description-list/examples/totals.tsx +40 -0
  394. package/dist/skill/reference/components/digit-input/COMPONENT.md +15 -7
  395. package/dist/skill/reference/components/digit-input/examples/examples.module.css +2 -2
  396. package/dist/skill/reference/components/digit-input/examples/in-form.tsx +1 -1
  397. package/dist/skill/reference/components/digit-input/examples/sizes.tsx +5 -3
  398. package/dist/skill/reference/components/digit-input/examples/states.tsx +15 -5
  399. package/dist/skill/reference/components/digit-input/examples/without-focus-ring.tsx +13 -0
  400. package/dist/skill/reference/components/divider/COMPONENT.md +26 -12
  401. package/dist/skill/reference/components/divider/examples/align.tsx +2 -4
  402. package/dist/skill/reference/components/divider/examples/examples.module.css +13 -17
  403. package/dist/skill/reference/components/divider/examples/or-separator.tsx +3 -5
  404. package/dist/skill/reference/components/divider/examples/overview.tsx +18 -16
  405. package/dist/skill/reference/components/divider/examples/vertical.tsx +5 -1
  406. package/dist/skill/reference/components/divider/examples/with-icon.tsx +3 -3
  407. package/dist/skill/reference/components/dnd/COMPONENT.md +56 -36
  408. package/dist/skill/reference/components/dnd/examples/drop-zones.tsx +82 -49
  409. package/dist/skill/reference/components/dnd/examples/examples.module.css +54 -6
  410. package/dist/skill/reference/components/dnd/examples/states.tsx +60 -0
  411. package/dist/skill/reference/components/dnd/examples/table.tsx +113 -0
  412. package/dist/skill/reference/components/drawer/COMPONENT.md +38 -14
  413. package/dist/skill/reference/components/drawer/examples/dismiss.tsx +5 -3
  414. package/dist/skill/reference/components/drawer/examples/guard.tsx +1 -3
  415. package/dist/skill/reference/components/drawer/examples/header-actions.tsx +6 -10
  416. package/dist/skill/reference/components/drawer/examples/in-form.tsx +31 -31
  417. package/dist/skill/reference/components/drawer/examples/overview.tsx +6 -18
  418. package/dist/skill/reference/components/drawer/examples/placement.tsx +31 -26
  419. package/dist/skill/reference/components/drawer/examples/screen.tsx +298 -0
  420. package/dist/skill/reference/components/drawer/examples/sizes.tsx +32 -27
  421. package/dist/skill/reference/components/dropdown/COMPONENT.md +58 -23
  422. package/dist/skill/reference/components/dropdown/examples/context-menu.tsx +75 -0
  423. package/dist/skill/reference/components/dropdown/examples/examples.module.css +2 -6
  424. package/dist/skill/reference/components/dropdown/examples/sizes.tsx +39 -34
  425. package/dist/skill/reference/components/dropdown/examples/states.tsx +37 -29
  426. package/dist/skill/reference/components/empty-page/COMPONENT.md +21 -10
  427. package/dist/skill/reference/components/empty-page/examples/compact.tsx +28 -18
  428. package/dist/skill/reference/components/empty-page/examples/examples.module.css +0 -43
  429. package/dist/skill/reference/components/empty-page/examples/narrow.tsx +3 -3
  430. package/dist/skill/reference/components/empty-page/examples/region-error.tsx +14 -13
  431. package/dist/skill/reference/components/empty-page/examples/sizes.tsx +13 -13
  432. package/dist/skill/reference/components/empty-page/examples/variants.tsx +34 -30
  433. package/dist/skill/reference/components/example-frame/COMPONENT.md +23 -10
  434. package/dist/skill/reference/components/example-frame/examples/controlled.tsx +3 -3
  435. package/dist/skill/reference/components/example-frame/examples/initial-view.tsx +44 -0
  436. package/dist/skill/reference/components/field-list/COMPONENT.md +16 -9
  437. package/dist/skill/reference/components/field-list/examples/errors.tsx +5 -2
  438. package/dist/skill/{patterns/record-editor.tsx → reference/components/field-list/examples/screen.tsx} +3 -43
  439. package/dist/skill/reference/components/field-list/examples/sizes.tsx +32 -26
  440. package/dist/skill/reference/components/field-list/examples/states.tsx +37 -31
  441. package/dist/skill/reference/components/fieldset/COMPONENT.md +10 -5
  442. package/dist/skill/reference/components/fieldset/examples/examples.module.css +1 -1
  443. package/dist/skill/reference/components/file-upload/COMPONENT.md +73 -34
  444. package/dist/skill/reference/components/file-upload/examples/avatar-upload.tsx +5 -5
  445. package/dist/skill/reference/components/file-upload/examples/custom-body.tsx +13 -7
  446. package/dist/skill/reference/components/file-upload/examples/examples.module.css +5 -11
  447. package/dist/skill/reference/components/file-upload/examples/file-cards.tsx +10 -1
  448. package/dist/skill/reference/components/file-upload/examples/gallery.tsx +2 -2
  449. package/dist/skill/reference/components/file-upload/examples/in-form.tsx +4 -9
  450. package/dist/skill/reference/components/file-upload/examples/narrow.tsx +1 -1
  451. package/dist/skill/reference/components/file-upload/examples/overview.tsx +5 -1
  452. package/dist/skill/reference/components/file-upload/examples/row-parts.tsx +27 -4
  453. package/dist/skill/{patterns/media-library.module.css → reference/components/file-upload/examples/screen.module.css} +4 -3
  454. package/dist/skill/reference/components/file-upload/examples/screen.tsx +648 -0
  455. package/dist/skill/reference/components/file-upload/examples/sizes.tsx +1 -3
  456. package/dist/skill/reference/components/file-upload/examples/states.tsx +6 -4
  457. package/dist/skill/reference/components/file-upload/examples/validation.tsx +11 -2
  458. package/dist/skill/reference/components/file-upload/examples/variants.tsx +15 -26
  459. package/dist/skill/reference/components/gallery/COMPONENT.md +16 -7
  460. package/dist/skill/reference/components/gallery/examples/album-sizes.tsx +52 -0
  461. package/dist/skill/reference/components/gallery/examples/controlled.tsx +40 -0
  462. package/dist/skill/reference/components/gallery/examples/examples.module.css +1 -1
  463. package/dist/skill/reference/components/gallery/examples/overview.tsx +15 -43
  464. package/dist/skill/reference/components/gallery/examples/transfer.tsx +22 -13
  465. package/dist/skill/reference/components/gantt/COMPONENT.md +22 -15
  466. package/dist/skill/reference/components/gantt/examples/examples.module.css +0 -16
  467. package/dist/skill/reference/components/gantt/examples/occupancy.tsx +2 -2
  468. package/dist/skill/reference/components/gantt/examples/screen.module.css +14 -0
  469. package/dist/skill/{patterns/schedule.tsx → reference/components/gantt/examples/screen.tsx} +175 -171
  470. package/dist/skill/reference/components/gantt/examples/sizes.tsx +16 -16
  471. package/dist/skill/reference/components/gantt/examples/states.tsx +38 -30
  472. package/dist/skill/reference/components/gantt/examples/variants.tsx +27 -25
  473. package/dist/skill/reference/components/hint/COMPONENT.md +24 -14
  474. package/dist/skill/reference/components/hint/examples/examples.module.css +1 -1
  475. package/dist/skill/reference/components/hint/examples/hint-or-error.tsx +2 -2
  476. package/dist/skill/reference/components/hint/examples/overview.tsx +9 -10
  477. package/dist/skill/reference/components/hint/examples/sizes.tsx +1 -1
  478. package/dist/skill/reference/components/input/COMPONENT.md +12 -8
  479. package/dist/skill/reference/components/input/examples/affixes.tsx +2 -2
  480. package/dist/skill/reference/components/input/examples/examples.module.css +1 -7
  481. package/dist/skill/reference/components/input/examples/in-form.tsx +1 -9
  482. package/dist/skill/reference/components/input/examples/password-strength.tsx +34 -8
  483. package/dist/skill/reference/components/input/examples/sizes.tsx +9 -5
  484. package/dist/skill/reference/components/input/examples/states.tsx +40 -19
  485. package/dist/skill/reference/components/input/examples/with-icon.tsx +24 -16
  486. package/dist/skill/reference/components/kanban/COMPONENT.md +31 -24
  487. package/dist/skill/reference/components/kanban/examples/columns.tsx +22 -24
  488. package/dist/skill/reference/components/kanban/examples/item-link.tsx +2 -2
  489. package/dist/skill/reference/components/kanban/examples/limits.tsx +1 -1
  490. package/dist/skill/reference/components/kanban/examples/narrow.tsx +1 -1
  491. package/dist/skill/reference/components/kanban/examples/screen.module.css +15 -0
  492. package/dist/skill/{patterns/kanban-board.tsx → reference/components/kanban/examples/screen.tsx} +133 -173
  493. package/dist/skill/reference/components/kanban/examples/states.tsx +46 -56
  494. package/dist/skill/reference/components/kanban/examples/variants.tsx +0 -3
  495. package/dist/skill/reference/components/kbd/COMPONENT.md +10 -6
  496. package/dist/skill/reference/components/kbd/examples/examples.module.css +1 -20
  497. package/dist/skill/reference/components/kbd/examples/in-controls.tsx +2 -2
  498. package/dist/skill/reference/components/kbd/examples/shortcut-list.tsx +14 -26
  499. package/dist/skill/reference/components/label/COMPONENT.md +26 -11
  500. package/dist/skill/reference/components/label/examples/examples.module.css +3 -11
  501. package/dist/skill/reference/components/label/examples/overview.tsx +5 -9
  502. package/dist/skill/reference/components/label/examples/structure.tsx +2 -2
  503. package/dist/skill/reference/components/link-button/COMPONENT.md +33 -20
  504. package/dist/skill/reference/components/link-button/examples/as-child.tsx +1 -1
  505. package/dist/skill/reference/components/link-button/examples/external-link.tsx +1 -1
  506. package/dist/skill/reference/components/link-button/examples/overview.tsx +4 -2
  507. package/dist/skill/reference/components/link-button/examples/variants.tsx +2 -2
  508. package/dist/skill/reference/components/list/COMPONENT.md +24 -16
  509. package/dist/skill/reference/components/list/examples/examples.module.css +0 -8
  510. package/dist/skill/reference/components/list/examples/overflow.tsx +1 -1
  511. package/dist/skill/reference/components/list/examples/overview.tsx +31 -30
  512. package/dist/skill/reference/components/list/examples/sizes.tsx +23 -23
  513. package/dist/skill/reference/components/list/examples/states.tsx +38 -21
  514. package/dist/skill/reference/components/list/examples/with-icon.tsx +16 -14
  515. package/dist/skill/reference/components/login-form/COMPONENT.md +74 -20
  516. package/dist/skill/reference/components/login-form/examples/examples.module.css +2 -21
  517. package/dist/skill/reference/components/login-form/examples/forgot-password.tsx +28 -32
  518. package/dist/skill/reference/components/login-form/examples/narrow.tsx +2 -2
  519. package/dist/skill/reference/components/login-form/examples/overview.tsx +45 -47
  520. package/dist/skill/reference/components/login-form/examples/register.tsx +65 -69
  521. package/dist/skill/reference/components/login-form/examples/reset-password.tsx +50 -47
  522. package/dist/skill/reference/components/login-form/examples/sizes.tsx +4 -6
  523. package/dist/skill/reference/components/login-form/examples/states.tsx +53 -57
  524. package/dist/skill/reference/components/login-form/examples/structure.tsx +18 -22
  525. package/dist/skill/reference/components/login-form/examples/verification-code.tsx +41 -45
  526. package/dist/skill/reference/components/media-viewer/COMPONENT.md +13 -9
  527. package/dist/skill/reference/components/media-viewer/examples/dismiss.tsx +5 -1
  528. package/dist/skill/reference/components/media-viewer/examples/examples.module.css +2 -2
  529. package/dist/skill/reference/components/media-viewer/examples/video.tsx +1 -1
  530. package/dist/skill/reference/components/message/COMPONENT.md +106 -49
  531. package/dist/skill/reference/components/message/examples/file.tsx +5 -1
  532. package/dist/skill/reference/components/message/examples/media-open.tsx +48 -0
  533. package/dist/skill/reference/components/message/examples/status.tsx +21 -3
  534. package/dist/skill/reference/components/message/examples/text-formatting.tsx +7 -1
  535. package/dist/skill/reference/components/message/examples/typing.tsx +5 -5
  536. package/dist/skill/reference/components/modal/COMPONENT.md +71 -36
  537. package/dist/skill/reference/components/modal/examples/custom-container.tsx +20 -20
  538. package/dist/skill/reference/components/modal/examples/dismiss.tsx +38 -28
  539. package/dist/skill/reference/components/modal/examples/enter-key.tsx +113 -0
  540. package/dist/skill/reference/components/modal/examples/examples.module.css +4 -17
  541. package/dist/skill/reference/components/modal/examples/guard.tsx +2 -4
  542. package/dist/skill/reference/components/modal/examples/in-form.tsx +28 -28
  543. package/dist/skill/reference/components/modal/examples/long-content.tsx +6 -4
  544. package/dist/skill/reference/components/modal/examples/sizes.tsx +36 -31
  545. package/dist/skill/reference/components/modal/examples/structure.tsx +5 -2
  546. package/dist/skill/reference/components/native-select/COMPONENT.md +8 -4
  547. package/dist/skill/reference/components/native-select/examples/examples.module.css +3 -3
  548. package/dist/skill/reference/components/native-select/examples/in-form.tsx +28 -29
  549. package/dist/skill/reference/components/native-select/examples/sizes.tsx +2 -2
  550. package/dist/skill/reference/components/native-select/examples/states.tsx +7 -3
  551. package/dist/skill/reference/components/notification/COMPONENT.md +37 -32
  552. package/dist/skill/reference/components/notification/examples/dismiss.tsx +2 -2
  553. package/dist/skill/reference/components/notification/examples/examples.module.css +1 -2
  554. package/dist/skill/reference/components/notification/examples/in-form.tsx +28 -20
  555. package/dist/skill/reference/components/notification/examples/sizes.tsx +16 -12
  556. package/dist/skill/reference/components/notification/examples/undo.tsx +7 -15
  557. package/dist/skill/reference/components/page-content/COMPONENT.md +22 -29
  558. package/dist/skill/reference/components/page-content/examples/examples.module.css +3 -16
  559. package/dist/skill/reference/components/page-content/examples/grid.tsx +3 -1
  560. package/dist/skill/reference/components/page-content/examples/list-detail.tsx +55 -52
  561. package/dist/skill/reference/components/page-content/examples/narrow.tsx +1 -1
  562. package/dist/skill/reference/components/page-content/examples/overview.tsx +2 -2
  563. package/dist/skill/{patterns/settings-page.tsx → reference/components/page-content/examples/screen.tsx} +3 -3
  564. package/dist/skill/reference/components/page-content/examples/variants.tsx +10 -17
  565. package/dist/skill/reference/components/page-toolbar/COMPONENT.md +27 -21
  566. package/dist/skill/reference/components/page-toolbar/examples/narrow.tsx +6 -3
  567. package/dist/skill/reference/components/page-toolbar/examples/overview.tsx +1 -1
  568. package/dist/skill/reference/components/page-toolbar/examples/save-changes.tsx +25 -22
  569. package/dist/skill/reference/components/pagination/COMPONENT.md +20 -17
  570. package/dist/skill/reference/components/pagination/examples/controlled.tsx +29 -29
  571. package/dist/skill/reference/components/pagination/examples/examples.module.css +0 -2
  572. package/dist/skill/reference/components/pagination/examples/narrow.tsx +5 -5
  573. package/dist/skill/reference/components/popover/COMPONENT.md +43 -20
  574. package/dist/skill/reference/components/popover/examples/controlled-open.tsx +6 -4
  575. package/dist/skill/reference/components/popover/examples/dismiss.tsx +37 -28
  576. package/dist/skill/reference/components/popover/examples/examples.module.css +2 -2
  577. package/dist/skill/reference/components/popover/examples/sizes.tsx +32 -27
  578. package/dist/skill/reference/components/popover/examples/width.tsx +45 -0
  579. package/dist/skill/reference/components/progress-bar/COMPONENT.md +22 -30
  580. package/dist/skill/reference/components/progress-bar/examples/examples.module.css +1 -1
  581. package/dist/skill/reference/components/progress-bar/examples/segments.tsx +2 -2
  582. package/dist/skill/reference/components/progress-circle/COMPONENT.md +22 -30
  583. package/dist/skill/reference/components/progress-circle/examples/examples.module.css +1 -1
  584. package/dist/skill/reference/components/progress-circle/examples/on-color.tsx +16 -0
  585. package/dist/skill/reference/components/progress-circle/examples/segments.tsx +8 -3
  586. package/dist/skill/reference/components/progress-circle/examples/variants.tsx +1 -0
  587. package/dist/skill/reference/components/radio/COMPONENT.md +14 -4
  588. package/dist/skill/reference/components/radio/examples/examples.module.css +14 -0
  589. package/dist/skill/reference/components/radio/examples/in-form.tsx +45 -0
  590. package/dist/skill/reference/components/scroll-container/COMPONENT.md +19 -12
  591. package/dist/skill/reference/components/scroll-container/examples/auto-scroll.tsx +11 -7
  592. package/dist/skill/reference/components/scroll-container/examples/edges.tsx +10 -7
  593. package/dist/skill/reference/components/scroll-container/examples/examples.module.css +10 -67
  594. package/dist/skill/reference/components/scroll-container/examples/load-more.tsx +51 -0
  595. package/dist/skill/reference/components/scroll-container/examples/lock.tsx +7 -9
  596. package/dist/skill/reference/components/scroll-container/examples/log.tsx +97 -0
  597. package/dist/skill/reference/components/scroll-container/examples/overscroll.tsx +7 -7
  598. package/dist/skill/reference/components/scroll-container/examples/overview.tsx +8 -8
  599. package/dist/skill/reference/components/scroll-container/examples/scrollbar.tsx +17 -11
  600. package/dist/skill/reference/components/scroll-container/examples/snap.tsx +2 -2
  601. package/dist/skill/reference/components/scroll-container/examples/variants.tsx +14 -7
  602. package/dist/skill/reference/components/segmented-control/COMPONENT.md +26 -14
  603. package/dist/skill/reference/components/segmented-control/examples/controlled.tsx +2 -4
  604. package/dist/skill/reference/components/segmented-control/examples/examples.module.css +0 -8
  605. package/dist/skill/reference/components/segmented-control/examples/in-form.tsx +5 -1
  606. package/dist/skill/reference/components/segmented-control/examples/scroll.tsx +1 -1
  607. package/dist/skill/reference/components/segmented-control/examples/states.tsx +10 -1
  608. package/dist/skill/reference/components/select/COMPONENT.md +34 -10
  609. package/dist/skill/reference/components/select/examples/dismiss.tsx +26 -0
  610. package/dist/skill/reference/components/select/examples/examples.module.css +3 -8
  611. package/dist/skill/reference/components/select/examples/server-search.tsx +6 -2
  612. package/dist/skill/reference/components/select/examples/sizes.tsx +2 -2
  613. package/dist/skill/reference/components/select/examples/states.tsx +15 -3
  614. package/dist/skill/reference/components/select/examples/with-icon.tsx +20 -18
  615. package/dist/skill/reference/components/sheet/COMPONENT.md +46 -21
  616. package/dist/skill/reference/components/sheet/examples/guard.tsx +72 -0
  617. package/dist/skill/reference/components/sheet/examples/header-actions.tsx +75 -0
  618. package/dist/skill/reference/components/sheet/examples/overview.tsx +25 -10
  619. package/dist/skill/reference/components/skeleton/COMPONENT.md +8 -4
  620. package/dist/skill/reference/components/skeleton/examples/examples.module.css +1 -13
  621. package/dist/skill/reference/components/skeleton/examples/with-crossfade.tsx +7 -7
  622. package/dist/skill/reference/components/slider/COMPONENT.md +12 -6
  623. package/dist/skill/reference/components/slider/examples/examples.module.css +14 -7
  624. package/dist/skill/reference/components/slider/examples/hint-and-error.tsx +3 -5
  625. package/dist/skill/reference/components/slider/examples/in-form.tsx +49 -0
  626. package/dist/skill/reference/components/slider/examples/states.tsx +4 -1
  627. package/dist/skill/reference/components/smart-filter/COMPONENT.md +33 -13
  628. package/dist/skill/reference/components/smart-filter/examples/controlled.tsx +3 -3
  629. package/dist/skill/reference/components/smart-filter/examples/examples.module.css +0 -21
  630. package/dist/skill/reference/components/smart-filter/examples/ranges.tsx +45 -10
  631. package/dist/skill/reference/components/smart-filter/examples/sizes.tsx +2 -4
  632. package/dist/skill/reference/components/sparkline/COMPONENT.md +8 -4
  633. package/dist/skill/reference/components/sparkline/examples/examples.module.css +1 -1
  634. package/dist/skill/reference/components/sparkline/examples/reference.tsx +2 -1
  635. package/dist/skill/reference/components/sparkline/examples/signed-bars.tsx +2 -2
  636. package/dist/skill/reference/components/spinner/COMPONENT.md +15 -9
  637. package/dist/skill/reference/components/spinner/examples/examples.module.css +2 -14
  638. package/dist/skill/reference/components/spinner/examples/overview.tsx +1 -1
  639. package/dist/skill/reference/components/stepper/COMPONENT.md +50 -41
  640. package/dist/skill/reference/components/stepper/examples/examples.module.css +1 -6
  641. package/dist/skill/reference/components/stepper/examples/narrow.tsx +1 -1
  642. package/dist/skill/reference/components/stepper/examples/sizes.tsx +6 -8
  643. package/dist/skill/reference/components/stepper/examples/states.tsx +44 -43
  644. package/dist/skill/reference/components/stepper/examples/with-icon.tsx +19 -17
  645. package/dist/skill/reference/components/switch/COMPONENT.md +21 -8
  646. package/dist/skill/reference/components/switch/examples/examples.module.css +2 -2
  647. package/dist/skill/reference/components/switch/examples/states.tsx +3 -3
  648. package/dist/skill/reference/components/tabs/COMPONENT.md +22 -17
  649. package/dist/skill/reference/components/tabs/examples/in-drawer.tsx +1 -1
  650. package/dist/skill/reference/components/tabs/examples/sizes.tsx +6 -11
  651. package/dist/skill/reference/components/tabs/examples/variants.tsx +19 -23
  652. package/dist/skill/reference/components/tag-select/COMPONENT.md +20 -7
  653. package/dist/skill/reference/components/tag-select/examples/creatable.tsx +2 -2
  654. package/dist/skill/reference/components/tag-select/examples/dismiss.tsx +23 -0
  655. package/dist/skill/reference/components/tag-select/examples/examples.module.css +3 -3
  656. package/dist/skill/reference/components/tag-select/examples/in-form.tsx +31 -32
  657. package/dist/skill/reference/components/tag-select/examples/sizes.tsx +2 -2
  658. package/dist/skill/reference/components/tag-select/examples/states.tsx +10 -3
  659. package/dist/skill/reference/components/textarea/COMPONENT.md +11 -7
  660. package/dist/skill/reference/components/textarea/examples/examples.module.css +3 -16
  661. package/dist/skill/reference/components/textarea/examples/in-form.tsx +3 -11
  662. package/dist/skill/reference/components/textarea/examples/sizes.tsx +10 -7
  663. package/dist/skill/reference/components/textarea/examples/states.tsx +30 -13
  664. package/dist/skill/reference/components/textarea/examples/validation.tsx +45 -36
  665. package/dist/skill/reference/components/thumbnail/COMPONENT.md +19 -14
  666. package/dist/skill/reference/components/thumbnail/examples/examples.module.css +2 -2
  667. package/dist/skill/reference/components/thumbnail/examples/fit.tsx +24 -0
  668. package/dist/skill/reference/components/thumbnail/examples/states.tsx +1 -1
  669. package/dist/skill/reference/components/thumbnail/examples/variants.tsx +12 -1
  670. package/dist/skill/reference/components/thumbnail/examples/video.tsx +20 -1
  671. package/dist/skill/reference/components/timeline/COMPONENT.md +52 -36
  672. package/dist/skill/reference/components/timeline/examples/links.tsx +57 -16
  673. package/dist/skill/reference/components/timeline/examples/narrow.tsx +6 -6
  674. package/dist/skill/reference/components/timeline/examples/overview.tsx +6 -6
  675. package/dist/skill/reference/components/timeline/examples/sizes.tsx +28 -23
  676. package/dist/skill/reference/components/timeline/examples/structure.tsx +30 -30
  677. package/dist/skill/reference/components/timeline/examples/variants.tsx +40 -28
  678. package/dist/skill/reference/components/tooltip/COMPONENT.md +11 -7
  679. package/dist/skill/reference/components/tooltip/examples/examples.module.css +1 -5
  680. package/dist/skill/reference/components/tooltip/examples/non-interactive-trigger.tsx +1 -1
  681. package/dist/skill/reference/components/tooltip/examples/sizes.tsx +17 -10
  682. package/dist/skill/reference/components/tooltip/examples/toolbar.tsx +2 -2
  683. package/dist/skill/reference/components/typography/COMPONENT.md +17 -2
  684. package/dist/skill/reference/components/typography/examples/examples.module.css +3 -6
  685. package/dist/skill/reference/components/typography/examples/numeric.tsx +16 -0
  686. package/dist/skill/reference/components/typography/examples/weights.tsx +3 -0
  687. package/dist/skill/reference/components/video-note/COMPONENT.md +13 -9
  688. package/dist/skill/reference/components/video-note/examples/controlled.tsx +19 -2
  689. package/dist/skill/reference/components/video-note/examples/in-message.tsx +5 -2
  690. package/dist/skill/reference/components/visually-hidden/COMPONENT.md +10 -5
  691. package/dist/skill/reference/components/visually-hidden/examples/assertive.tsx +39 -0
  692. package/dist/skill/reference/components/visually-hidden/examples/overview.tsx +17 -7
  693. package/dist/skill/reference/components/voice-player/COMPONENT.md +17 -9
  694. package/dist/skill/reference/components/voice-player/examples/call-recording.tsx +19 -9
  695. package/dist/skill/reference/components/voice-player/examples/controlled.tsx +20 -3
  696. package/dist/skill/reference/foundation.md +564 -0
  697. package/dist/skill/reference/layout/app-header/COMPONENT.md +65 -81
  698. package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +10 -9
  699. package/dist/skill/reference/layout/app-header/examples/examples.module.css +4 -23
  700. package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +3 -6
  701. package/dist/skill/reference/layout/app-header/examples/narrow.tsx +58 -21
  702. package/dist/skill/reference/layout/app-header/examples/overview.tsx +8 -10
  703. package/dist/skill/reference/layout/app-header/examples/page-title.tsx +3 -10
  704. package/dist/skill/reference/layout/app-shell/COMPONENT.md +41 -10
  705. package/dist/skill/reference/layout/app-shell/examples/examples.module.css +2 -22
  706. package/dist/skill/reference/layout/app-shell/examples/footer.tsx +2 -2
  707. package/dist/skill/reference/layout/app-shell/examples/overview.tsx +18 -35
  708. package/dist/skill/reference/layout/app-shell/examples/screen.tsx +268 -0
  709. package/dist/skill/reference/layout/app-shell/examples/template.tsx +32 -12
  710. package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +27 -17
  711. package/dist/skill/reference/layout/bottom-nav/examples/examples.module.css +2 -7
  712. package/dist/skill/reference/layout/bottom-nav/examples/floating-action.tsx +2 -2
  713. package/dist/skill/reference/layout/bottom-nav/examples/floating.tsx +2 -2
  714. package/dist/skill/reference/layout/bottom-nav/examples/in-app-shell.tsx +2 -2
  715. package/dist/skill/reference/layout/bottom-nav/examples/router.tsx +6 -5
  716. package/dist/skill/reference/layout/sidebar/COMPONENT.md +55 -42
  717. package/dist/skill/reference/layout/sidebar/examples/account.tsx +3 -5
  718. package/dist/skill/reference/layout/sidebar/examples/brand-header.tsx +1 -3
  719. package/dist/skill/reference/layout/sidebar/examples/collapsible-groups.tsx +13 -7
  720. package/dist/skill/reference/layout/sidebar/examples/controlled-open.tsx +1 -3
  721. package/dist/skill/reference/layout/sidebar/examples/controlled.tsx +1 -3
  722. package/dist/skill/reference/layout/sidebar/examples/custom-part.tsx +51 -0
  723. package/dist/skill/reference/layout/sidebar/examples/dismiss.tsx +47 -0
  724. package/dist/skill/reference/layout/sidebar/examples/examples.module.css +10 -30
  725. package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +55 -0
  726. package/dist/skill/reference/layout/sidebar/examples/nested-items.tsx +1 -3
  727. package/dist/skill/reference/layout/sidebar/examples/overview.tsx +1 -3
  728. package/dist/skill/reference/layout/sidebar/examples/persist.tsx +55 -0
  729. package/dist/skill/reference/layout/sidebar/examples/router.tsx +20 -9
  730. package/dist/skill/reference/layout/sidebar/examples/sizes.tsx +6 -6
  731. package/dist/skill/reference/layout/sidebar/examples/structure.tsx +7 -2
  732. package/dist/skill/responsive.md +49 -52
  733. package/dist/skill/ux.md +21 -9
  734. package/dist/theme/applyTheme.d.ts +7 -6
  735. package/dist/tokens/hues.d.ts +8 -0
  736. package/dist/tokens/layers.d.ts +3 -16
  737. package/dist/tokens/offGrid.d.ts +7 -0
  738. package/dist/tokens/primitives.d.ts +22 -7
  739. package/dist/tokens/semantic.d.ts +201 -51
  740. package/dist/tokens/themes/dark.d.ts +32 -31
  741. package/package.json +5 -3
  742. package/src/components/accordion/COMPONENT.md +16 -9
  743. package/src/components/accordion/examples/overview.tsx +2 -2
  744. package/src/components/accordion/examples/sizes.tsx +6 -8
  745. package/src/components/accordion/examples/states.tsx +27 -24
  746. package/src/components/accordion/examples/variants.tsx +6 -8
  747. package/src/components/accordion/examples/with-icon.tsx +22 -19
  748. package/src/components/avatar/COMPONENT.md +23 -16
  749. package/src/components/avatar/examples/examples.module.css +1 -4
  750. package/src/components/avatar/examples/overview.tsx +3 -3
  751. package/src/components/avatar/examples/presence.tsx +4 -4
  752. package/src/components/avatar/examples/src-from-state.tsx +3 -3
  753. package/src/components/avatar/examples/states.tsx +6 -6
  754. package/src/components/avatar/examples/team-group.tsx +2 -2
  755. package/src/components/badge/COMPONENT.md +66 -34
  756. package/src/components/badge/examples/applied-filters.tsx +13 -19
  757. package/src/components/badge/examples/controlled.tsx +32 -0
  758. package/src/components/badge/examples/examples.module.css +3 -10
  759. package/src/components/badge/examples/filter-values.tsx +4 -6
  760. package/src/components/badge/examples/in-controls.tsx +1 -1
  761. package/src/components/badge/examples/overview.tsx +6 -5
  762. package/src/components/badge/examples/server-tags.tsx +2 -6
  763. package/src/components/badge/examples/square.tsx +21 -0
  764. package/src/components/badge/examples/states.tsx +4 -4
  765. package/src/components/badge/examples/with-icon.tsx +10 -1
  766. package/src/components/banner/COMPONENT.md +9 -5
  767. package/src/components/banner/examples/dismissible.tsx +3 -19
  768. package/src/components/banner/examples/examples.module.css +1 -5
  769. package/src/components/banner/examples/overview.tsx +1 -1
  770. package/src/components/banner/examples/page-strip.tsx +16 -22
  771. package/src/components/breadcrumb/COMPONENT.md +21 -14
  772. package/src/components/breadcrumb/examples/ellipsis.tsx +2 -2
  773. package/src/components/breadcrumb/examples/examples.module.css +1 -1
  774. package/src/components/breadcrumb/examples/overflow.tsx +1 -1
  775. package/src/components/breadcrumb/examples/sizes.tsx +6 -8
  776. package/src/components/breadcrumb/examples/with-icon.tsx +15 -8
  777. package/src/components/button/COMPONENT.md +66 -30
  778. package/src/components/button/examples/align.tsx +25 -0
  779. package/src/components/button/examples/controlled.tsx +21 -0
  780. package/src/components/button/examples/density.tsx +45 -0
  781. package/src/components/button/examples/examples.module.css +14 -25
  782. package/src/components/button/examples/label-morph.tsx +1 -1
  783. package/src/components/button/examples/on-colored-host.tsx +19 -19
  784. package/src/components/button/examples/over-media.tsx +7 -1
  785. package/src/components/button/examples/toggle.tsx +2 -10
  786. package/src/components/button-group/COMPONENT.md +23 -17
  787. package/src/components/button-group/examples/controlled.tsx +1 -1
  788. package/src/components/button-group/examples/in-form.tsx +22 -2
  789. package/src/components/button-group/examples/states.tsx +10 -1
  790. package/src/components/card/COMPONENT.md +18 -6
  791. package/src/components/card/examples/content-templates.tsx +8 -2
  792. package/src/components/card/examples/examples.module.css +4 -16
  793. package/src/components/card/examples/overview.tsx +11 -11
  794. package/src/components/card/examples/screen.module.css +14 -0
  795. package/src/components/card/examples/screen.tsx +363 -0
  796. package/src/components/card/examples/variants.tsx +75 -34
  797. package/src/components/chart-frame/COMPONENT.md +25 -28
  798. package/src/components/chart-frame/examples/controlled.tsx +9 -7
  799. package/src/components/chart-frame/examples/fill-height.tsx +117 -0
  800. package/src/components/chart-frame/examples/narrow.tsx +24 -5
  801. package/src/components/chart-frame/examples/overview.tsx +5 -2
  802. package/src/components/chart-frame/examples/states.tsx +72 -62
  803. package/src/components/chart-frame/examples/tooltip.tsx +27 -26
  804. package/src/components/chat/COMPONENT.md +37 -22
  805. package/src/components/chat/examples/group-chat.tsx +16 -3
  806. package/src/components/chat/examples/overview.tsx +119 -130
  807. package/src/components/chat/examples/reactions.tsx +116 -0
  808. package/src/components/chat/examples/screen.module.css +9 -0
  809. package/src/components/chat/examples/screen.tsx +695 -0
  810. package/src/components/chat/examples/states.tsx +23 -22
  811. package/src/components/chat-list/COMPONENT.md +11 -5
  812. package/src/components/chat-list/examples/examples.module.css +0 -8
  813. package/src/components/chat-list/examples/links.tsx +72 -0
  814. package/src/components/chat-list/examples/live.tsx +29 -22
  815. package/src/components/chat-list/examples/sizes.tsx +6 -8
  816. package/src/components/chat-list/examples/states.tsx +42 -38
  817. package/src/components/checkbox/COMPONENT.md +27 -14
  818. package/src/components/checkbox/examples/controlled.tsx +18 -16
  819. package/src/components/checkbox/examples/examples.module.css +14 -52
  820. package/src/components/checkbox/examples/in-form.tsx +16 -16
  821. package/src/components/checkbox/examples/indicator.tsx +17 -56
  822. package/src/components/checkbox/examples/overview.tsx +1 -1
  823. package/src/components/checkbox/examples/states.tsx +6 -1
  824. package/src/components/checkbox/examples/without-label.tsx +1 -1
  825. package/src/components/code-block/COMPONENT.md +16 -12
  826. package/src/components/code-block/examples/examples.module.css +5 -2
  827. package/src/components/code-block/examples/narrow.tsx +1 -1
  828. package/src/components/color-field/COMPONENT.md +16 -10
  829. package/src/components/color-field/examples/examples.module.css +4 -5
  830. package/src/components/color-field/examples/in-form.tsx +15 -13
  831. package/src/components/color-field/examples/sizes.tsx +5 -1
  832. package/src/components/color-field/examples/states.tsx +15 -3
  833. package/src/components/color-picker/COMPONENT.md +58 -21
  834. package/src/components/color-picker/examples/controlled-open.tsx +37 -0
  835. package/src/components/color-picker/examples/controlled.tsx +16 -5
  836. package/src/components/color-picker/examples/examples.module.css +6 -7
  837. package/src/components/color-picker/examples/in-form.tsx +24 -22
  838. package/src/components/color-picker/examples/overview.tsx +1 -1
  839. package/src/components/color-picker/examples/panel.tsx +1 -1
  840. package/src/components/color-picker/examples/presets.tsx +2 -2
  841. package/src/components/color-picker/examples/sizes.tsx +9 -11
  842. package/src/components/color-picker/examples/states.tsx +30 -16
  843. package/src/components/color-swatches/COMPONENT.md +22 -8
  844. package/src/components/color-swatches/examples/examples.module.css +3 -4
  845. package/src/components/color-swatches/examples/in-form.tsx +19 -17
  846. package/src/components/color-swatches/examples/palette.tsx +24 -0
  847. package/src/components/color-swatches/examples/wrapping.tsx +17 -2
  848. package/src/components/command-menu/COMPONENT.md +60 -20
  849. package/src/components/command-menu/examples/sizes.tsx +20 -15
  850. package/src/components/command-menu/examples/states.tsx +46 -24
  851. package/src/components/composer/COMPONENT.md +44 -25
  852. package/src/components/composer/examples/attach-menu.tsx +78 -0
  853. package/src/components/composer/examples/attachments.tsx +2 -2
  854. package/src/components/composer/examples/examples.module.css +0 -9
  855. package/src/components/composer/examples/narrow.tsx +1 -1
  856. package/src/components/composer/examples/reply-edit.tsx +3 -3
  857. package/src/components/composer/examples/sizes.tsx +3 -5
  858. package/src/components/composer/examples/states.tsx +4 -6
  859. package/src/components/confirm-dialog/COMPONENT.md +26 -13
  860. package/src/components/confirm-dialog/examples/dismiss.tsx +27 -0
  861. package/src/components/confirm-dialog/examples/failure.tsx +9 -16
  862. package/src/components/crossfade/COMPONENT.md +12 -5
  863. package/src/components/crossfade/examples/examples.module.css +1 -40
  864. package/src/components/crossfade/examples/fill.tsx +16 -19
  865. package/src/components/crossfade/examples/overview.tsx +14 -16
  866. package/src/components/crossfade/examples/record-switch.tsx +6 -11
  867. package/src/components/crossfade/examples/screen.module.css +17 -0
  868. package/src/components/crossfade/examples/screen.tsx +186 -0
  869. package/src/components/data-table/COMPONENT.md +34 -23
  870. package/src/components/data-table/examples/controlled.tsx +14 -2
  871. package/src/components/data-table/examples/detail-panel.tsx +36 -37
  872. package/src/components/data-table/examples/examples.module.css +1 -21
  873. package/src/components/data-table/examples/narrow.tsx +5 -1
  874. package/src/components/data-table/examples/numeric.tsx +36 -4
  875. package/src/components/data-table/examples/overview.tsx +1 -0
  876. package/src/components/data-table/examples/row-link.tsx +2 -1
  877. package/src/components/data-table/examples/row-open.tsx +7 -36
  878. package/src/components/data-table/examples/screen.module.css +13 -0
  879. package/src/components/data-table/examples/screen.tsx +355 -0
  880. package/src/components/data-table/examples/sizes.tsx +17 -17
  881. package/src/components/data-table/examples/states.tsx +37 -29
  882. package/src/components/datepicker/COMPONENT.md +57 -25
  883. package/src/components/datepicker/examples/dismiss.tsx +15 -0
  884. package/src/components/datepicker/examples/examples.module.css +4 -7
  885. package/src/components/datepicker/examples/in-form.tsx +29 -29
  886. package/src/components/datepicker/examples/locale.tsx +35 -0
  887. package/src/components/datepicker/examples/range-presets.tsx +11 -2
  888. package/src/components/datepicker/examples/sizes.tsx +2 -2
  889. package/src/components/datepicker/examples/states.tsx +11 -3
  890. package/src/components/datepicker/examples/validation.tsx +3 -3
  891. package/src/components/description-list/COMPONENT.md +24 -8
  892. package/src/components/description-list/examples/examples.module.css +4 -24
  893. package/src/components/description-list/examples/narrow.tsx +1 -1
  894. package/src/components/description-list/examples/screen.module.css +46 -0
  895. package/src/components/description-list/examples/screen.tsx +206 -0
  896. package/src/components/description-list/examples/sizes.tsx +2 -4
  897. package/src/components/description-list/examples/structure.tsx +7 -8
  898. package/src/components/description-list/examples/totals.tsx +40 -0
  899. package/src/components/digit-input/COMPONENT.md +15 -7
  900. package/src/components/digit-input/examples/examples.module.css +2 -2
  901. package/src/components/digit-input/examples/in-form.tsx +1 -1
  902. package/src/components/digit-input/examples/sizes.tsx +5 -3
  903. package/src/components/digit-input/examples/states.tsx +15 -5
  904. package/src/components/digit-input/examples/without-focus-ring.tsx +13 -0
  905. package/src/components/divider/COMPONENT.md +26 -12
  906. package/src/components/divider/examples/align.tsx +2 -4
  907. package/src/components/divider/examples/examples.module.css +13 -17
  908. package/src/components/divider/examples/or-separator.tsx +3 -5
  909. package/src/components/divider/examples/overview.tsx +18 -16
  910. package/src/components/divider/examples/vertical.tsx +5 -1
  911. package/src/components/divider/examples/with-icon.tsx +3 -3
  912. package/src/components/dnd/COMPONENT.md +56 -36
  913. package/src/components/dnd/examples/drop-zones.tsx +82 -49
  914. package/src/components/dnd/examples/examples.module.css +54 -6
  915. package/src/components/dnd/examples/states.tsx +60 -0
  916. package/src/components/dnd/examples/table.tsx +113 -0
  917. package/src/components/drawer/COMPONENT.md +38 -14
  918. package/src/components/drawer/examples/dismiss.tsx +5 -3
  919. package/src/components/drawer/examples/guard.tsx +1 -3
  920. package/src/components/drawer/examples/header-actions.tsx +6 -10
  921. package/src/components/drawer/examples/in-form.tsx +31 -31
  922. package/src/components/drawer/examples/overview.tsx +6 -18
  923. package/src/components/drawer/examples/placement.tsx +31 -26
  924. package/src/components/drawer/examples/screen.module.css +14 -0
  925. package/src/components/drawer/examples/screen.tsx +298 -0
  926. package/src/components/drawer/examples/sizes.tsx +32 -27
  927. package/src/components/dropdown/COMPONENT.md +58 -23
  928. package/src/components/dropdown/examples/context-menu.tsx +75 -0
  929. package/src/components/dropdown/examples/examples.module.css +2 -6
  930. package/src/components/dropdown/examples/sizes.tsx +39 -34
  931. package/src/components/dropdown/examples/states.tsx +37 -29
  932. package/src/components/empty-page/COMPONENT.md +21 -10
  933. package/src/components/empty-page/examples/compact.tsx +28 -18
  934. package/src/components/empty-page/examples/examples.module.css +0 -43
  935. package/src/components/empty-page/examples/narrow.tsx +3 -3
  936. package/src/components/empty-page/examples/region-error.tsx +14 -13
  937. package/src/components/empty-page/examples/sizes.tsx +13 -13
  938. package/src/components/empty-page/examples/variants.tsx +34 -30
  939. package/src/components/example-frame/COMPONENT.md +23 -10
  940. package/src/components/example-frame/examples/controlled.tsx +3 -3
  941. package/src/components/example-frame/examples/initial-view.tsx +44 -0
  942. package/src/components/field-list/COMPONENT.md +16 -9
  943. package/src/components/field-list/examples/errors.tsx +5 -2
  944. package/src/components/field-list/examples/screen.module.css +18 -0
  945. package/src/components/field-list/examples/screen.tsx +316 -0
  946. package/src/components/field-list/examples/sizes.tsx +32 -26
  947. package/src/components/field-list/examples/states.tsx +37 -31
  948. package/src/components/fieldset/COMPONENT.md +10 -5
  949. package/src/components/fieldset/examples/examples.module.css +1 -1
  950. package/src/components/file-upload/COMPONENT.md +73 -34
  951. package/src/components/file-upload/examples/avatar-upload.tsx +5 -5
  952. package/src/components/file-upload/examples/custom-body.tsx +13 -7
  953. package/src/components/file-upload/examples/examples.module.css +5 -11
  954. package/src/components/file-upload/examples/file-cards.tsx +10 -1
  955. package/src/components/file-upload/examples/gallery.tsx +2 -2
  956. package/src/components/file-upload/examples/in-form.tsx +4 -9
  957. package/src/components/file-upload/examples/narrow.tsx +1 -1
  958. package/src/components/file-upload/examples/overview.tsx +5 -1
  959. package/src/components/file-upload/examples/row-parts.tsx +27 -4
  960. package/src/components/file-upload/examples/screen.module.css +45 -0
  961. package/src/components/file-upload/examples/screen.tsx +648 -0
  962. package/src/components/file-upload/examples/sizes.tsx +1 -3
  963. package/src/components/file-upload/examples/states.tsx +6 -4
  964. package/src/components/file-upload/examples/validation.tsx +11 -2
  965. package/src/components/file-upload/examples/variants.tsx +15 -26
  966. package/src/components/gallery/COMPONENT.md +16 -7
  967. package/src/components/gallery/examples/album-sizes.tsx +52 -0
  968. package/src/components/gallery/examples/controlled.tsx +40 -0
  969. package/src/components/gallery/examples/examples.module.css +1 -1
  970. package/src/components/gallery/examples/overview.tsx +15 -43
  971. package/src/components/gallery/examples/transfer.tsx +22 -13
  972. package/src/components/gantt/COMPONENT.md +22 -15
  973. package/src/components/gantt/examples/examples.module.css +0 -16
  974. package/src/components/gantt/examples/occupancy.tsx +2 -2
  975. package/src/components/gantt/examples/screen.module.css +14 -0
  976. package/src/components/gantt/examples/screen.tsx +726 -0
  977. package/src/components/gantt/examples/sizes.tsx +16 -16
  978. package/src/components/gantt/examples/states.tsx +38 -30
  979. package/src/components/gantt/examples/variants.tsx +27 -25
  980. package/src/components/hint/COMPONENT.md +24 -14
  981. package/src/components/hint/examples/examples.module.css +1 -1
  982. package/src/components/hint/examples/hint-or-error.tsx +2 -2
  983. package/src/components/hint/examples/overview.tsx +9 -10
  984. package/src/components/hint/examples/sizes.tsx +1 -1
  985. package/src/components/input/COMPONENT.md +12 -8
  986. package/src/components/input/examples/affixes.tsx +2 -2
  987. package/src/components/input/examples/examples.module.css +1 -7
  988. package/src/components/input/examples/in-form.tsx +1 -9
  989. package/src/components/input/examples/password-strength.tsx +34 -8
  990. package/src/components/input/examples/sizes.tsx +9 -5
  991. package/src/components/input/examples/states.tsx +40 -19
  992. package/src/components/input/examples/with-icon.tsx +24 -16
  993. package/src/components/kanban/COMPONENT.md +31 -24
  994. package/src/components/kanban/examples/columns.tsx +22 -24
  995. package/src/components/kanban/examples/item-link.tsx +2 -2
  996. package/src/components/kanban/examples/limits.tsx +1 -1
  997. package/src/components/kanban/examples/narrow.tsx +1 -1
  998. package/src/components/kanban/examples/screen.module.css +15 -0
  999. package/src/components/kanban/examples/screen.tsx +574 -0
  1000. package/src/components/kanban/examples/states.tsx +46 -56
  1001. package/src/components/kanban/examples/variants.tsx +0 -3
  1002. package/src/components/kbd/COMPONENT.md +10 -6
  1003. package/src/components/kbd/examples/examples.module.css +1 -20
  1004. package/src/components/kbd/examples/in-controls.tsx +2 -2
  1005. package/src/components/kbd/examples/shortcut-list.tsx +14 -26
  1006. package/src/components/label/COMPONENT.md +26 -11
  1007. package/src/components/label/examples/examples.module.css +3 -11
  1008. package/src/components/label/examples/overview.tsx +5 -9
  1009. package/src/components/label/examples/structure.tsx +2 -2
  1010. package/src/components/link-button/COMPONENT.md +33 -20
  1011. package/src/components/link-button/examples/as-child.tsx +1 -1
  1012. package/src/components/link-button/examples/external-link.tsx +1 -1
  1013. package/src/components/link-button/examples/overview.tsx +4 -2
  1014. package/src/components/link-button/examples/variants.tsx +2 -2
  1015. package/src/components/list/COMPONENT.md +24 -16
  1016. package/src/components/list/examples/examples.module.css +0 -8
  1017. package/src/components/list/examples/overflow.tsx +1 -1
  1018. package/src/components/list/examples/overview.tsx +31 -30
  1019. package/src/components/list/examples/sizes.tsx +23 -23
  1020. package/src/components/list/examples/states.tsx +38 -21
  1021. package/src/components/list/examples/with-icon.tsx +16 -14
  1022. package/src/components/login-form/COMPONENT.md +74 -20
  1023. package/src/components/login-form/examples/examples.module.css +2 -21
  1024. package/src/components/login-form/examples/forgot-password.tsx +28 -32
  1025. package/src/components/login-form/examples/narrow.tsx +2 -2
  1026. package/src/components/login-form/examples/overview.tsx +45 -47
  1027. package/src/components/login-form/examples/register.tsx +65 -69
  1028. package/src/components/login-form/examples/reset-password.tsx +50 -47
  1029. package/src/components/login-form/examples/sizes.tsx +4 -6
  1030. package/src/components/login-form/examples/states.tsx +53 -57
  1031. package/src/components/login-form/examples/structure.tsx +18 -22
  1032. package/src/components/login-form/examples/verification-code.tsx +41 -45
  1033. package/src/components/media-viewer/COMPONENT.md +13 -9
  1034. package/src/components/media-viewer/examples/dismiss.tsx +5 -1
  1035. package/src/components/media-viewer/examples/examples.module.css +2 -2
  1036. package/src/components/media-viewer/examples/video.tsx +1 -1
  1037. package/src/components/message/COMPONENT.md +106 -49
  1038. package/src/components/message/examples/file.tsx +5 -1
  1039. package/src/components/message/examples/media-open.tsx +48 -0
  1040. package/src/components/message/examples/status.tsx +21 -3
  1041. package/src/components/message/examples/text-formatting.tsx +7 -1
  1042. package/src/components/message/examples/typing.tsx +5 -5
  1043. package/src/components/modal/COMPONENT.md +71 -36
  1044. package/src/components/modal/examples/custom-container.tsx +20 -20
  1045. package/src/components/modal/examples/dismiss.tsx +38 -28
  1046. package/src/components/modal/examples/enter-key.tsx +113 -0
  1047. package/src/components/modal/examples/examples.module.css +4 -17
  1048. package/src/components/modal/examples/guard.tsx +2 -4
  1049. package/src/components/modal/examples/in-form.tsx +28 -28
  1050. package/src/components/modal/examples/long-content.tsx +6 -4
  1051. package/src/components/modal/examples/sizes.tsx +36 -31
  1052. package/src/components/modal/examples/structure.tsx +5 -2
  1053. package/src/components/native-select/COMPONENT.md +8 -4
  1054. package/src/components/native-select/examples/examples.module.css +3 -3
  1055. package/src/components/native-select/examples/in-form.tsx +28 -29
  1056. package/src/components/native-select/examples/sizes.tsx +2 -2
  1057. package/src/components/native-select/examples/states.tsx +7 -3
  1058. package/src/components/notification/COMPONENT.md +37 -32
  1059. package/src/components/notification/examples/dismiss.tsx +2 -2
  1060. package/src/components/notification/examples/examples.module.css +1 -2
  1061. package/src/components/notification/examples/in-form.tsx +28 -20
  1062. package/src/components/notification/examples/sizes.tsx +16 -12
  1063. package/src/components/notification/examples/undo.tsx +7 -15
  1064. package/src/components/page-content/COMPONENT.md +22 -29
  1065. package/src/components/page-content/examples/examples.module.css +3 -16
  1066. package/src/components/page-content/examples/grid.tsx +3 -1
  1067. package/src/components/page-content/examples/list-detail.tsx +55 -52
  1068. package/src/components/page-content/examples/narrow.tsx +1 -1
  1069. package/src/components/page-content/examples/overview.tsx +2 -2
  1070. package/src/components/page-content/examples/screen.module.css +27 -0
  1071. package/src/components/page-content/examples/screen.tsx +196 -0
  1072. package/src/components/page-content/examples/variants.tsx +10 -17
  1073. package/src/components/page-toolbar/COMPONENT.md +27 -21
  1074. package/src/components/page-toolbar/examples/narrow.tsx +6 -3
  1075. package/src/components/page-toolbar/examples/overview.tsx +1 -1
  1076. package/src/components/page-toolbar/examples/save-changes.tsx +25 -22
  1077. package/src/components/pagination/COMPONENT.md +20 -17
  1078. package/src/components/pagination/examples/controlled.tsx +29 -29
  1079. package/src/components/pagination/examples/examples.module.css +0 -2
  1080. package/src/components/pagination/examples/narrow.tsx +5 -5
  1081. package/src/components/popover/COMPONENT.md +43 -20
  1082. package/src/components/popover/examples/controlled-open.tsx +6 -4
  1083. package/src/components/popover/examples/dismiss.tsx +37 -28
  1084. package/src/components/popover/examples/examples.module.css +2 -2
  1085. package/src/components/popover/examples/sizes.tsx +32 -27
  1086. package/src/components/popover/examples/width.tsx +45 -0
  1087. package/src/components/progress-bar/COMPONENT.md +22 -30
  1088. package/src/components/progress-bar/examples/examples.module.css +1 -1
  1089. package/src/components/progress-bar/examples/segments.tsx +2 -2
  1090. package/src/components/progress-circle/COMPONENT.md +22 -30
  1091. package/src/components/progress-circle/examples/examples.module.css +1 -1
  1092. package/src/components/progress-circle/examples/on-color.tsx +16 -0
  1093. package/src/components/progress-circle/examples/segments.tsx +8 -3
  1094. package/src/components/progress-circle/examples/variants.tsx +1 -0
  1095. package/src/components/radio/COMPONENT.md +14 -4
  1096. package/src/components/radio/examples/examples.module.css +14 -0
  1097. package/src/components/radio/examples/in-form.tsx +45 -0
  1098. package/src/components/scroll-container/COMPONENT.md +19 -12
  1099. package/src/components/scroll-container/examples/auto-scroll.tsx +11 -7
  1100. package/src/components/scroll-container/examples/edges.tsx +10 -7
  1101. package/src/components/scroll-container/examples/examples.module.css +10 -67
  1102. package/src/components/scroll-container/examples/load-more.tsx +51 -0
  1103. package/src/components/scroll-container/examples/lock.tsx +7 -9
  1104. package/src/components/scroll-container/examples/log.tsx +97 -0
  1105. package/src/components/scroll-container/examples/overscroll.tsx +7 -7
  1106. package/src/components/scroll-container/examples/overview.tsx +8 -8
  1107. package/src/components/scroll-container/examples/scrollbar.tsx +17 -11
  1108. package/src/components/scroll-container/examples/snap.tsx +2 -2
  1109. package/src/components/scroll-container/examples/variants.tsx +14 -7
  1110. package/src/components/segmented-control/COMPONENT.md +26 -14
  1111. package/src/components/segmented-control/examples/controlled.tsx +2 -4
  1112. package/src/components/segmented-control/examples/examples.module.css +0 -8
  1113. package/src/components/segmented-control/examples/in-form.tsx +5 -1
  1114. package/src/components/segmented-control/examples/scroll.tsx +1 -1
  1115. package/src/components/segmented-control/examples/states.tsx +10 -1
  1116. package/src/components/select/COMPONENT.md +34 -10
  1117. package/src/components/select/examples/dismiss.tsx +26 -0
  1118. package/src/components/select/examples/examples.module.css +3 -8
  1119. package/src/components/select/examples/server-search.tsx +6 -2
  1120. package/src/components/select/examples/sizes.tsx +2 -2
  1121. package/src/components/select/examples/states.tsx +15 -3
  1122. package/src/components/select/examples/with-icon.tsx +20 -18
  1123. package/src/components/sheet/COMPONENT.md +46 -21
  1124. package/src/components/sheet/examples/guard.tsx +72 -0
  1125. package/src/components/sheet/examples/header-actions.tsx +75 -0
  1126. package/src/components/sheet/examples/overview.tsx +25 -10
  1127. package/src/components/skeleton/COMPONENT.md +8 -4
  1128. package/src/components/skeleton/examples/examples.module.css +1 -13
  1129. package/src/components/skeleton/examples/with-crossfade.tsx +7 -7
  1130. package/src/components/slider/COMPONENT.md +12 -6
  1131. package/src/components/slider/examples/examples.module.css +14 -7
  1132. package/src/components/slider/examples/hint-and-error.tsx +3 -5
  1133. package/src/components/slider/examples/in-form.tsx +49 -0
  1134. package/src/components/slider/examples/states.tsx +4 -1
  1135. package/src/components/smart-filter/COMPONENT.md +33 -13
  1136. package/src/components/smart-filter/examples/controlled.tsx +3 -3
  1137. package/src/components/smart-filter/examples/examples.module.css +0 -21
  1138. package/src/components/smart-filter/examples/ranges.tsx +45 -10
  1139. package/src/components/smart-filter/examples/sizes.tsx +2 -4
  1140. package/src/components/sparkline/COMPONENT.md +8 -4
  1141. package/src/components/sparkline/examples/examples.module.css +1 -1
  1142. package/src/components/sparkline/examples/reference.tsx +2 -1
  1143. package/src/components/sparkline/examples/signed-bars.tsx +2 -2
  1144. package/src/components/spinner/COMPONENT.md +15 -9
  1145. package/src/components/spinner/examples/examples.module.css +2 -14
  1146. package/src/components/spinner/examples/overview.tsx +1 -1
  1147. package/src/components/stepper/COMPONENT.md +50 -41
  1148. package/src/components/stepper/examples/examples.module.css +1 -6
  1149. package/src/components/stepper/examples/narrow.tsx +1 -1
  1150. package/src/components/stepper/examples/sizes.tsx +6 -8
  1151. package/src/components/stepper/examples/states.tsx +44 -43
  1152. package/src/components/stepper/examples/with-icon.tsx +19 -17
  1153. package/src/components/switch/COMPONENT.md +21 -8
  1154. package/src/components/switch/examples/examples.module.css +2 -2
  1155. package/src/components/switch/examples/states.tsx +3 -3
  1156. package/src/components/tabs/COMPONENT.md +22 -17
  1157. package/src/components/tabs/examples/in-drawer.tsx +1 -1
  1158. package/src/components/tabs/examples/sizes.tsx +6 -11
  1159. package/src/components/tabs/examples/variants.tsx +19 -23
  1160. package/src/components/tag-select/COMPONENT.md +20 -7
  1161. package/src/components/tag-select/examples/creatable.tsx +2 -2
  1162. package/src/components/tag-select/examples/dismiss.tsx +23 -0
  1163. package/src/components/tag-select/examples/examples.module.css +3 -3
  1164. package/src/components/tag-select/examples/in-form.tsx +31 -32
  1165. package/src/components/tag-select/examples/sizes.tsx +2 -2
  1166. package/src/components/tag-select/examples/states.tsx +10 -3
  1167. package/src/components/textarea/COMPONENT.md +11 -7
  1168. package/src/components/textarea/examples/examples.module.css +3 -16
  1169. package/src/components/textarea/examples/in-form.tsx +3 -11
  1170. package/src/components/textarea/examples/sizes.tsx +10 -7
  1171. package/src/components/textarea/examples/states.tsx +30 -13
  1172. package/src/components/textarea/examples/validation.tsx +45 -36
  1173. package/src/components/thumbnail/COMPONENT.md +19 -14
  1174. package/src/components/thumbnail/examples/examples.module.css +2 -2
  1175. package/src/components/thumbnail/examples/fit.tsx +24 -0
  1176. package/src/components/thumbnail/examples/states.tsx +1 -1
  1177. package/src/components/thumbnail/examples/variants.tsx +12 -1
  1178. package/src/components/thumbnail/examples/video.tsx +20 -1
  1179. package/src/components/timeline/COMPONENT.md +52 -36
  1180. package/src/components/timeline/examples/links.tsx +57 -16
  1181. package/src/components/timeline/examples/narrow.tsx +6 -6
  1182. package/src/components/timeline/examples/overview.tsx +6 -6
  1183. package/src/components/timeline/examples/sizes.tsx +28 -23
  1184. package/src/components/timeline/examples/structure.tsx +30 -30
  1185. package/src/components/timeline/examples/variants.tsx +40 -28
  1186. package/src/components/tooltip/COMPONENT.md +11 -7
  1187. package/src/components/tooltip/examples/examples.module.css +1 -5
  1188. package/src/components/tooltip/examples/non-interactive-trigger.tsx +1 -1
  1189. package/src/components/tooltip/examples/sizes.tsx +17 -10
  1190. package/src/components/tooltip/examples/toolbar.tsx +2 -2
  1191. package/src/components/typography/COMPONENT.md +17 -2
  1192. package/src/components/typography/examples/examples.module.css +3 -6
  1193. package/src/components/typography/examples/numeric.tsx +16 -0
  1194. package/src/components/typography/examples/weights.tsx +3 -0
  1195. package/src/components/video-note/COMPONENT.md +13 -9
  1196. package/src/components/video-note/examples/controlled.tsx +19 -2
  1197. package/src/components/video-note/examples/in-message.tsx +5 -2
  1198. package/src/components/visually-hidden/COMPONENT.md +10 -5
  1199. package/src/components/visually-hidden/examples/assertive.tsx +39 -0
  1200. package/src/components/visually-hidden/examples/overview.tsx +17 -7
  1201. package/src/components/voice-player/COMPONENT.md +17 -9
  1202. package/src/components/voice-player/examples/call-recording.tsx +19 -9
  1203. package/src/components/voice-player/examples/controlled.tsx +20 -3
  1204. package/src/layout/app-header/COMPONENT.md +65 -81
  1205. package/src/layout/app-header/examples/breadcrumbs.tsx +10 -9
  1206. package/src/layout/app-header/examples/examples.module.css +4 -23
  1207. package/src/layout/app-header/examples/in-app-shell.tsx +3 -6
  1208. package/src/layout/app-header/examples/narrow.tsx +58 -21
  1209. package/src/layout/app-header/examples/overview.tsx +8 -10
  1210. package/src/layout/app-header/examples/page-title.tsx +3 -10
  1211. package/src/layout/app-shell/COMPONENT.md +41 -10
  1212. package/src/layout/app-shell/examples/examples.module.css +2 -22
  1213. package/src/layout/app-shell/examples/footer.tsx +2 -2
  1214. package/src/layout/app-shell/examples/overview.tsx +18 -35
  1215. package/src/layout/app-shell/examples/screen.module.css +11 -0
  1216. package/src/layout/app-shell/examples/screen.tsx +268 -0
  1217. package/src/layout/app-shell/examples/template.tsx +32 -12
  1218. package/src/layout/bottom-nav/COMPONENT.md +27 -17
  1219. package/src/layout/bottom-nav/examples/examples.module.css +2 -7
  1220. package/src/layout/bottom-nav/examples/floating-action.tsx +2 -2
  1221. package/src/layout/bottom-nav/examples/floating.tsx +2 -2
  1222. package/src/layout/bottom-nav/examples/in-app-shell.tsx +2 -2
  1223. package/src/layout/bottom-nav/examples/router.tsx +6 -5
  1224. package/src/layout/sidebar/COMPONENT.md +55 -42
  1225. package/src/layout/sidebar/examples/account.tsx +3 -5
  1226. package/src/layout/sidebar/examples/brand-header.tsx +1 -3
  1227. package/src/layout/sidebar/examples/collapsible-groups.tsx +13 -7
  1228. package/src/layout/sidebar/examples/controlled-open.tsx +1 -3
  1229. package/src/layout/sidebar/examples/controlled.tsx +1 -3
  1230. package/src/layout/sidebar/examples/custom-part.tsx +51 -0
  1231. package/src/layout/sidebar/examples/dismiss.tsx +47 -0
  1232. package/src/layout/sidebar/examples/examples.module.css +10 -30
  1233. package/src/layout/sidebar/examples/narrow.tsx +55 -0
  1234. package/src/layout/sidebar/examples/nested-items.tsx +1 -3
  1235. package/src/layout/sidebar/examples/overview.tsx +1 -3
  1236. package/src/layout/sidebar/examples/persist.tsx +55 -0
  1237. package/src/layout/sidebar/examples/router.tsx +20 -9
  1238. package/src/layout/sidebar/examples/sizes.tsx +6 -6
  1239. package/src/layout/sidebar/examples/structure.tsx +7 -2
  1240. package/src/styles/controls.css +2 -2
  1241. package/src/styles/fonts.css +22 -0
  1242. package/src/styles/globals.css +89 -12
  1243. package/src/styles/theme-dark.css +13 -14
  1244. package/src/styles/theme-light.css +67 -23
  1245. package/src/styles/tokens.css +14 -4
  1246. package/dist/components/dnd/useFlipList.d.ts +0 -17
  1247. package/dist/components/gantt/useEdgeAutoScroll.d.ts +0 -12
  1248. package/dist/components/modal/ModalDialog.d.ts +0 -46
  1249. package/dist/hooks/useStateSwap.d.ts +0 -8
  1250. package/dist/internal/highlightTsxHtml.d.ts +0 -2
  1251. package/dist/internal/layoutPxFromPrimitives.d.ts +0 -6
  1252. package/dist/internal/mergeRefs.d.ts +0 -6
  1253. package/dist/skill/patterns/app-shell.tsx +0 -303
  1254. package/dist/skill/patterns/chat.module.css +0 -8
  1255. package/dist/skill/patterns/chat.tsx +0 -899
  1256. package/dist/skill/patterns/dashboard.tsx +0 -340
  1257. package/dist/skill/patterns/detail-page.tsx +0 -206
  1258. package/dist/skill/patterns/form-drawer.tsx +0 -240
  1259. package/dist/skill/patterns/kanban-board.module.css +0 -28
  1260. package/dist/skill/patterns/list-page.module.css +0 -19
  1261. package/dist/skill/patterns/media-library.tsx +0 -637
  1262. package/dist/skill/patterns/schedule.module.css +0 -22
  1263. package/dist/skill/patterns/screen-states.tsx +0 -187
  1264. package/dist/skill/reference/components/drawer/examples/examples.module.css +0 -21
  1265. package/dist/skill/reference/components/popover/examples/match-trigger-width.tsx +0 -23
  1266. package/dist/skill/reference/components/scroll-container/examples/chat.tsx +0 -101
  1267. package/dist/skill/reference/components/spinner/examples/loading-region.tsx +0 -22
  1268. package/src/components/drawer/examples/examples.module.css +0 -21
  1269. package/src/components/popover/examples/match-trigger-width.tsx +0 -23
  1270. package/src/components/scroll-container/examples/chat.tsx +0 -101
  1271. package/src/components/spinner/examples/loading-region.tsx +0 -22
  1272. /package/dist/skill/{patterns/dashboard.module.css → reference/components/card/examples/screen.module.css} +0 -0
  1273. /package/dist/skill/{patterns/form-drawer.module.css → reference/components/drawer/examples/screen.module.css} +0 -0
  1274. /package/dist/skill/{patterns/record-editor.module.css → reference/components/field-list/examples/screen.module.css} +0 -0
  1275. /package/dist/skill/{patterns/settings-page.module.css → reference/components/page-content/examples/screen.module.css} +0 -0
  1276. /package/dist/skill/{patterns/app-shell.module.css → reference/layout/app-shell/examples/screen.module.css} +0 -0
@@ -25,7 +25,7 @@ import { Composer, type ComposerActivity, type ComposerMessage, useUploadQueue }
25
25
  ## Anatomy
26
26
  ```
27
27
  Composer.Root <form>: the column below, one tier for every part
28
- ├─ (video preview) round camera preview (VideoNote geometry, Skeleton until the camera answers, progress ring to 60 s)
28
+ ├─ (video preview) round camera preview (VideoNote geometry, Skeleton until the camera answers, progress ring to 60 s, `weight="band"`)
29
29
  ├─ (tray) Crossfade of `queue`: opens and closes with a fade and a height glide
30
30
  │ ├─ (strip) FileUpload.Queue layout="strip": one row of tiles — photos, videos and
31
31
  │ │ files in tray order; format pill, remove ×, name · size band, upload disk + ring, reorder
@@ -53,10 +53,10 @@ Sending is an async event (`SKILL/api-contract.md`, Events):
53
53
  const queue = useUploadQueue({ upload: sendFile });
54
54
  <Composer.Root
55
55
  queue={queue}
56
- onSend={({ text, media, files }) =>
56
+ onSend={({ text, albums, files }) =>
57
57
  api.post(chatId, {
58
58
  text,
59
- album: media.map((item) => ({ type: item.type, id: item.result })),
59
+ albums: albums.map((album) => album.map((item) => ({ type: item.type, id: item.result }))),
60
60
  files: files.map((item) => item.result),
61
61
  })
62
62
  }
@@ -68,9 +68,9 @@ const queue = useUploadQueue({ upload: sendFile });
68
68
 
69
69
  `text` arrives trimmed. While the Promise runs the button is busy and the field read-only; resolve clears the field and the queue and closes the reply / edit bar (its `onDismiss`), reject leaves the text for another try.
70
70
 
71
- Every attachment is a tile of one strip, in the order attached and then reordered by the person. Photos and videos arrive as `media` in that order — send them as one album (`Message.Media`, up to ten per album, the text as its caption) — and the other files as `files` in that order, a `Message.File` each. Clearing the queue revokes its previews, so a sent album shows from `result` (the server's URL) or from your own `URL.createObjectURL(item.file)` — revoke it when its message is deleted or the chat unmounts.
71
+ Every attachment is a tile of one strip, in the order attached and then reordered by the person. Photos and videos arrive as `albums` in that order, a new album every ten (the most a `Gallery` lays out) — send each as one `Message.Media` message, the text as the caption of the first — and the other files as `files` in that order, a `Message.File` each. Clearing the queue revokes its previews, so a sent album shows from `result` (the server's URL) or from your own `URL.createObjectURL(item.file)` — revoke it when its message is deleted or the chat unmounts.
72
72
 
73
- In an optimistic chat the send returns at once: add the message to the list with `status="sending"` under a client id, then patch its status as the server answers — the row keeps its key, so it never enters twice. Give the reply / edit bar the message id (`Composer.Context value`) and the send says what it answers or edits:
73
+ In an optimistic chat the send returns at once: add the message to the list with `status="sending"` under a client id, then patch its status as the server answers — the row keeps its key, so it never enters twice. Give the reply / edit bar the message id (`Composer.Context messageId`) and the send says what it answers or edits:
74
74
 
75
75
  ```tsx partial
76
76
  <Composer.Root
@@ -78,7 +78,7 @@ In an optimistic chat the send returns at once: add the message to the list with
78
78
  onActivityChange={(activity) => chat.signal(activity)}
79
79
  >
80
80
  {replyTo ? (
81
- <Composer.Context value={replyTo.id} onDismiss={() => setReplyTo(null)}>
81
+ <Composer.Context messageId={replyTo.id} onDismiss={() => setReplyTo(null)}>
82
82
  <Composer.Title>Ответ Анне</Composer.Title>
83
83
  <Composer.Description>{replyTo.text}</Composer.Description>
84
84
  </Composer.Context>
@@ -98,7 +98,7 @@ In an optimistic chat the send returns at once: add the message to the list with
98
98
  | `value` | `string` | — | The text of the message (controlled). |
99
99
  | `defaultValue` | `string` | `""` | Initial text, uncontrolled (a saved draft). |
100
100
  | `onValueChange` | `(value: string) => void` | — | Every change of the text: typing, formatting, the field cleared after a send. |
101
- | `onSend` | `(message: { text: string; media: readonly (UploadItem & { type: "image" \| "video" })[]; files: readonly UploadItem[]; replyTo?: string; editOf?: string }) => void \| Promise<unknown>` | — | Sends the message (Enter, Mod+Enter, the button): trimmed `text`, the uploaded `media` and `files` and `replyTo` / `editOf`. Return a Promise to keep the text until it resolves; reject leaves everything as it was. |
101
+ | `onSend` | `(message: { text: string; albums: readonly (readonly (UploadItem & { type: "image" \| "video" })[])[]; files: readonly UploadItem[]; replyTo?: string; editOf?: string }) => void \| Promise<unknown>` | — | Sends the message (Enter, Mod+Enter, the button): trimmed `text`, photos and videos as `albums` of up to 10, `files`, `replyTo` / `editOf`. A Promise keeps the text until it resolves; reject changes nothing. |
102
102
  | `onActivityChange` | `(activity: "typing" \| "voice" \| "video" \| null) => void` | — | What the person is doing changed, for the other side's «печатает…»: `typing`, `voice` / `video` while recording, or `null`. Fires on a change only. |
103
103
  | `onSendVoice` | `(recording: { blob: Blob; durationMs: number; waveform: number[] }) => void \| Promise<unknown>` | — | A voice message was recorded: the `MediaRecorder` blob, its length and 48 loudness values 0…1 for its waveform. With it an empty field shows the record button (where the browser can record). |
104
104
  | `onSendVideoNote` | `(recording: { blob: Blob; durationMs: number; waveform: number[] }) => void \| Promise<unknown>` | — | A round video message was recorded (front camera and microphone), at most 60 s. With both record handlers a double click or tap on the record button (or ↑ / ↓ on it) switches voice and video. |
@@ -108,7 +108,7 @@ In an optimistic chat the send returns at once: add the message to the list with
108
108
  | `onRecordModeChange` | `(mode: "voice" \| "video") => void` | — | A double click / double tap on the record button (or ↑ / ↓ on it) switched voice and video. |
109
109
  | `queue` | `Pick<UploadQueue, "items" \| "add" \| "retry" \| "remove" \| "clear" \| "move">` | — | Attachments, usually `useUploadQueue(…)`: the paperclip, a paste and a drop add to it, and a tray above the row shows them as one reorderable strip of tiles. Without `queue` paste and drop of files do nothing. |
110
110
  | `formatting` | `boolean` | `true` | Selecting text shows a floating toolbar of seven Markdown tools and enables their hotkeys; a tool wraps the selection, a second press unwraps it. `false` turns both off. |
111
- | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `host tier, else "m"` | Tier of the field, the buttons and the bar text. Without it the tier of its host, else `m`. |
111
+ | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | host tier, else `"m"` | Tier of the field, the buttons and the bar text. Without it the tier of its host, else `m`. |
112
112
  | `disabled` | `boolean` | `false` | A closed conversation: the field, the paperclip and the button are disabled; nothing is pasted or dropped. A disabled `Fieldset` around it sets it too (`data-disabled` included). |
113
113
  | `inputRef` | `Ref<HTMLTextAreaElement>` | — | The message `<textarea>`: focus it after «Ответить» in a message menu. |
114
114
  | `labels` | `Partial<ComposerLabels>` | — | Built-in strings, see Labels. |
@@ -116,26 +116,32 @@ In an optimistic chat the send returns at once: add the message to the list with
116
116
  | `…rest` | `Omit<FormHTMLAttributes<HTMLFormElement>, "children" \| "defaultValue" \| "onSubmit">` | — | `className`, `aria-*`, `onKeyDown` and the other attributes of the `<form>`. |
117
117
 
118
118
  ### Composer.Context
119
- `ref` → `HTMLDivElement`. The bar above the field: a reply or edit glyph, `Composer.Title` over `Composer.Description` behind an accent rule, and a close button; it describes the field; when it appears, the caret moves to the field. + native `<div>` props.
119
+ `ref` → `HTMLDivElement`. The bar above the field: a reply or edit glyph, `Composer.Title` over `Composer.Description` behind an accent rule, and a close button; it describes the field; when it appears, the caret moves to the field.
120
120
 
121
121
  | Prop | Type | Default | Description |
122
122
  |---|---|---|---|
123
123
  | `mode` | `"reply" \| "edit"` | `"reply"` | `reply` — a reply to a message; `edit` — your message is being edited: the send button turns into «Сохранить» and the record button is not offered. |
124
- | `value` | `string` | — | The id of the message answered or edited: `onSend` receives it as `replyTo` (`reply`) or `editOf` (`edit`). |
124
+ | `messageId` | `string` | — | The id of the message answered or edited: `onSend` receives it as `replyTo` (`reply`) or `editOf` (`edit`). |
125
125
  | `onDismiss` | `() => void` | — | Stop replying or editing: the close button, Escape in the field, and a send that went through. Without it the bar has no close button. |
126
126
  | `children` | `ReactNode` | — | `Composer.Title` and `Composer.Description`. |
127
+ | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `className` and the other div attributes. |
127
128
 
128
129
  ### Composer.Title · Composer.Description
129
- `ref` → `HTMLDivElement`. The first line of the bar in the accent text color, medium weight («Ответ Анне», «Редактирование») / the quoted message in the secondary color; both one line, cut with an ellipsis. + native `<div>` props.
130
+ `ref` → `HTMLDivElement`. The first line of the bar in the accent text color, medium weight («Ответ Анне», «Редактирование») / the quoted message in the secondary color; both one line, cut with an ellipsis.
131
+
132
+ | Prop | Type | Default | Description |
133
+ |---|---|---|---|
134
+ | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
130
135
 
131
136
  ### Composer.Attach
132
- `ref` → `HTMLDivElement`. The paperclip at the start of the row. Alone it opens the file picker (FileUpload `trigger="button"`); with `Composer.Item` children it opens a menu where every item picks its own file types. Files go to the root's `queue`. + native `<div>` props.
137
+ `ref` → `HTMLDivElement`. The paperclip at the start of the row. Alone it opens the file picker (FileUpload `trigger="button"`); with `Composer.Item` children it opens a menu where every item picks its own file types. Files go to the root's `queue`.
133
138
 
134
139
  | Prop | Type | Default | Description |
135
140
  |---|---|---|---|
136
141
  | `accept` | `string` | — | File types of the picker without a menu. |
137
142
  | `aria-label` | `string` | — | Name of the button. Default `labels.attach`. |
138
143
  | `children` | `ReactNode` | — | `Composer.Item` kinds of attachment. |
144
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className` and the other div attributes. |
139
145
 
140
146
  ### Composer.Item
141
147
  `ref` → `HTMLButtonElement`. A kind of attachment in the paperclip menu, a `Dropdown.Item` (`role="menuitem"`): `Composer.ItemIcon` and the label. + native button props.
@@ -145,9 +151,14 @@ In an optimistic chat the send returns at once: add the message to the list with
145
151
  | `accept` | `string` | — | File types this item picks (`"image/*,video/*"`; `""` for any file). Without it the item only runs `onSelect`. |
146
152
  | `onSelect` | `() => void` | — | The item's own action (a poll, a location); runs after the picker opens when `accept` is set. |
147
153
  | `disabled` | `boolean` | `false` | Muted and skipped by the arrow keys. |
154
+ | `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onSelect" \| "type">` | — | `children`, `className` and the other button attributes. |
148
155
 
149
156
  ### Composer.ItemIcon
150
- `ref` → `HTMLSpanElement`. The leading glyph of a menu item (`Dropdown.ItemIcon`, `aria-hidden`). + native `<span>` props.
157
+ `ref` → `HTMLSpanElement`. The leading glyph of a menu item (`Dropdown.ItemIcon`, `aria-hidden`).
158
+
159
+ | Prop | Type | Default | Description |
160
+ |---|---|---|---|
161
+ | `…rest` | `HTMLAttributes<HTMLSpanElement>` | — | `children` (the `Icon`), `className` and the other span attributes. |
151
162
 
152
163
  ## Variants
153
164
  Composer has no `variant`; what the row shows follows its state.
@@ -179,19 +190,19 @@ Composer has no `variant`; what the row shows follows its state.
179
190
  | State | Driven by | DOM |
180
191
  |---|---|---|
181
192
  | empty | no text, no attachments | with a record handler the button is the quiet ghost microphone (or camera), else a disabled send |
182
- | typing | text | the button turns into the accent send; the glyph turns and scales into the plane |
193
+ | typing | text | the button turns into the accent send; the glyph cross-fades into the plane (`Button.Icon`) |
183
194
  | attachments | `queue.items` | the tray above the row: one strip of tiles in the order attached — photos and videos (MIME type, else the name's extension) as the local preview or first frame, other files as the sheet glyph, each with the format pill and a name · size (duration) band; while a file goes up a disk with the progress ring along its edge stands in the middle of a picture (dimmed under it) or in place of a file's sheet (name and size stay readable) (pressing it cancels, a failure turns it into a danger retry, done fades it away), remove ×, reorder by drag or `Alt + ←` / `→`; send is disabled while any is `queued` / `uploading` |
184
- | as files | the «Отправить как файлы, без сжатия» checkbox (shown with photos or videos) | the view stays the same (the strip); `onSend` gets every file in `files` and `media` empty; reset after a send |
195
+ | as files | the «Отправить как файлы, без сжатия» checkbox (shown with photos or videos) | the view stays the same (the strip); `onSend` gets every file in `files` and `albums` empty; reset after a send |
185
196
  | sending | `onSend` returned a Promise | button `loading` (`aria-busy`), textarea `readonly`, text kept |
186
197
  | sent | the Promise resolved (or nothing returned) | field and queue cleared (the previews revoked, the tray fades and glides closed), the reply / edit bar's `onDismiss` called, focus stays in the field; `onActivityChange(null)` |
187
- | reply / edit | `Composer.Context` | bar above the field (enters with `enterMotion`); `mode="edit"` turns send into save; its `value` goes to `onSend` as `replyTo` / `editOf` |
198
+ | reply / edit | `Composer.Context` | bar above the field (enters with `enterMotion`); `mode="edit"` turns send into save; its `messageId` goes to `onSend` as `replyTo` / `editOf` |
188
199
  | activity | typing, recording | `onActivityChange`: `typing` from the first keystroke until the text is sent, emptied or rests for 3 s; `voice` / `video` while the recording bar shows; `null` after, and on unmount while active. It fires on a change only: a server that expires the signal wants it repeated on your side while the value is not `null` |
189
200
  | selection | a non-empty selection while the field has focus | the floating toolbar fades in from below (`overlayMotion` floating, `data-side="top"`); a tool wraps the selection in its Markdown, a second press removes it |
190
201
  | files over | a file drag over the composer (with `queue`) | `data-dropping="true"`: an accent ring over the field; a drop adds the files to the queue. A pasted file with no type (a screenshot from some apps) takes its clipboard item's type. Without `queue` paste and drop of files do nothing |
191
- | recording, held | `data-recording="hold"` (a finger on the button; with voice and video both offered, from 200 ms of holding) | recording bar over the paperclip and the field with «Влево — отмена» sliding and fading with the finger — a slide of `--prime-space-24` throws the recording away; lock pill above the button, a lift of `--prime-space-12` locks; release sends |
202
+ | recording, held | `data-recording="hold"` (a finger on the button; with voice and video both offered, from 200 ms of holding) | recording bar over the paperclip and the field with «Влево — отмена» sliding and fading with the finger — a slide of `--prime-space-24` throws the recording away; lock pill above the button (a floating surface, `data-depth="floating"`) rises in, a lift of `--prime-space-12` locks and it snaps away; release sends |
192
203
  | recording, locked | `data-recording="locked"` (a mouse click, Enter / Space, a tap shorter than 200 ms, or a slide up) | delete button · pause button · dot · timer · live waveform over the full free width; the button and Enter send; a video message sends itself at 60 s of recorded time |
193
- | recording, paused | Space or the pause button during a hands-free recording (`MediaRecorder.pause()`) | `data-paused` on the bar: the dot turns into a still pause glyph, the timer and the waveform stand, the video ring stops; Space or «Продолжить запись» resumes; a send hands over what was recorded, without the pause |
194
- | double-click window | with voice and video both offered, the 300 ms after a click or a tap | no `data-recording` yet: the button keeps its glyph and nothing is announced; with a granted microphone voice already records. A second press inside it discards that recording unseen and switches the mode (glyph swap, «Голосовое сообщение» / «Видеосообщение» announced); otherwise the bar cross-fades in with the timer counting from the first press |
204
+ | recording, paused | Space or the pause button during a hands-free recording (`MediaRecorder.pause()`) | `data-paused` on the bar: the dot cross-fades into a still pause glyph (`GlyphSwap`), the timer and the waveform stand, the video ring stops; Space or «Продолжить запись» resumes; a send hands over what was recorded, without the pause |
205
+ | double-click window | with voice and video both offered, the 300 ms after a click or a tap | no `data-recording` yet: the button keeps its glyph and nothing is announced; with a granted microphone voice already records. A second press inside it discards that recording unseen and switches the mode (glyph swap, «Голосовое сообщение» / «Видеосообщение» announced); otherwise the bar rises in over the field with the timer counting from the first press; when the recording ends it closes up in place |
195
206
  | starting | the press is answered, the device is not granted yet | already the recording bar with a running timer (it counts from the press) while the device is asked for in parallel; the waveform is a calm line of dots |
196
207
  | too short | a recording under 0.7 s | dropped: nothing is sent |
197
208
  | record error | the browser refused / found no device | the bar cross-fades back to the field; `Hint` with `role="alert"` above the row, cleared by typing or the next attempt |
@@ -203,7 +214,7 @@ Motion: the tray opens and closes as a Crossfade (fade and height glide, the row
203
214
  - The row stands on its bottom edge with `--prime-space-2` gaps: the paperclip and the button stay by the last line as the field grows. Field → bar / attachments above: `--prime-space-2`.
204
215
  - The tray is never in the row: the strip (`--prime-space-24` square tiles, one row scrolling sideways with faded edges, so its height is one tile at any count) and the «как файлы» checkbox stack with `--prime-space-2` gaps above it.
205
216
  - The field grows from one line to eight and then scrolls inside; its padding centres one line exactly like an Input of the tier.
206
- - The composer takes its container's width and works from 320 px; it is a size container, the round video preview is `--prime-message-video-note` wide, at most 70% of its width, and needs that room above the composer (a chat history gives it).
217
+ - The composer takes its container's width and works on the narrowest phone (320 px); it is a size container, the round video preview is `--prime-message-video-note` wide, at most 70% of its width, and needs that room above the composer (a chat history gives it).
207
218
  - The recording bar covers the paperclip and the field, so entering and leaving a recording never changes the row height; its waveform takes all the width between the timer and the send button, as tall as the button minus `--prime-space-2`, in VoicePlayer's bar geometry.
208
219
  - On touch the editable text is at least 16 px (no iOS zoom) and every button has the 44 px hit area.
209
220
  - The formatting toolbar floats above the field's start edge on the floating layer, over whatever is above the composer.
@@ -211,6 +222,8 @@ Motion: the tray opens and closes as a Crossfade (fade and height glide, the row
211
222
  ## Accessibility
212
223
 
213
224
  ### Keyboard
225
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
226
+
214
227
  | Key | Action |
215
228
  |---|---|
216
229
  | `Enter` | In the field sends the message; on a touch screen breaks the line. |
@@ -227,6 +240,8 @@ Motion: the tray opens and closes as a Crossfade (fade and height glide, the row
227
240
  | `Delete` · `Backspace` | On a tile of the tray: removes the attachment; focus moves to its neighbour. |
228
241
 
229
242
  ### ARIA
243
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
244
+
230
245
  - The composer is a `<form>` named «Новое сообщение»; the field is a `<textarea>` named «Сообщение» with `enterkeyhint="send"` (`enter` on touch).
231
246
  - A reply / edit bar describes the field (`aria-describedby`); when it appears after the first render the caret moves to the field. Its close button is «Отменить ответ» / «Отменить редактирование». A send that went through closes it.
232
247
  - The formatting toolbar is `role="toolbar"` with one Tab stop and arrow keys; every button has `aria-keyshortcuts` and a tooltip with its keys (`⌘B` on Apple systems, `Ctrl+B` elsewhere).
@@ -234,6 +249,8 @@ Motion: the tray opens and closes as a Crossfade (fade and height glide, the row
234
249
  - A live region (`role="status"`) announces a recording started, locked, deleted and sent, and the record mode after a switch («Голосовое сообщение» / «Видеосообщение»); a refused microphone is a `role="alert"` message that also describes the field, never a thrown error.
235
250
  - While recording the paperclip and the field are `inert` under the bar; the bar's buttons are «Удалить запись» and «Приостановить запись» / «Продолжить запись» (`aria-keyshortcuts="Space"`), the action button «Отправить запись». Deleting brings the focus back to the action button. Pause and resume are announced. The timer and the waveform are decorative. While a finger holds a recording only `Escape` works (it throws the recording away); the delete and pause buttons keep their own Enter and Space.
236
251
  - The attachments are one `<ul>` named «Вложения» (FileUpload.Queue `layout="strip"`): every tile is «Фото N: name» / «Видео N: name» / «Файл N: name» with its upload state, `aria-keyshortcuts` for `Alt + ←` / `→` and `Delete`, a remove button «Убрать name»; the upload disk is a `progressbar` while the file goes up. Moves are announced by Dnd's live region, finished and failed files by the queue's. «Отправить как файлы, без сжатия» is a labelled Checkbox.
252
+ - Touch: the buttons get a 44 px hit area; Enter breaks the line, the button sends.
253
+ - Voice and video together: a single press records without holding, a double press (within 300 ms) switches the mode. The first press records silently until the window ends, so a double press shows no recording and sends nothing.
237
254
 
238
255
  ### Labels
239
256
  <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
@@ -283,20 +300,22 @@ Motion: the tray opens and closes as a Crossfade (fade and height glide, the row
283
300
  |---|---|
284
301
  | [overview.tsx](examples/overview.tsx) | A reply to a client in a support chat: Enter sends, Shift+Enter breaks the line, the paperclip attaches files and an empty field records a voice message — `onSend`, `onSendVoice`, `queue`, `Composer.Attach`. |
285
302
  | [sizes.tsx](examples/sizes.tsx) | One composer in every tier: field, buttons and the paperclip follow it — `size`. |
286
- | [attachments.tsx](examples/attachments.tsx) | Warehouse photos and documents for a client go through an upload queue: the paperclip opens the file picker, a paste or a drop adds files too, every attachment is a tile of one strip that drags into its order, and send waits until the uploads finish — `queue`, `Composer.Attach`, `useUploadQueue`. |
287
- | [reply-edit.tsx](examples/reply-edit.tsx) | Answering a client's message and correcting your own: the bar above the field quotes the message, Escape or the cross cancels, ↑ in an empty field opens your last message, send becomes save and hands over the message id — `Composer.Context`, `mode`, `value`, `onDismiss`, `onEditLast`. |
303
+ | [attachments.tsx](examples/attachments.tsx) | Warehouse photos and documents for a client go through an upload queue: the paperclip opens the file picker for photos, videos and office documents, a paste or a drop adds files too, every attachment is a tile of one strip that drags into its order, and send waits until the uploads finish — `queue`, `Composer.Attach`, `accept`, `useUploadQueue`. |
304
+ | [attach-menu.tsx](examples/attach-menu.tsx) | The paperclip as a menu of attachment kinds: photos and videos, documents, any file, and an invoice from the system that puts its link into the message and returns the focus to the field — `Composer.Item`, `Composer.ItemIcon`, `accept`, `onSelect`, `inputRef`. |
305
+ | [reply-edit.tsx](examples/reply-edit.tsx) | Answering a client's message and correcting your own: the bar above the field quotes the message, Escape or the cross cancels, ↑ in an empty field opens your last message, send becomes save and hands over the message id — `Composer.Context`, `mode`, `messageId`, `onDismiss`, `onEditLast`. |
288
306
  | [typing.tsx](examples/typing.tsx) | The other side's status line follows what you do: typing, recording a voice or a video message, then nothing — `onActivityChange`. |
289
307
  | [formatting.tsx](examples/formatting.tsx) | Selected text gets a toolbar of bold, italic, strikethrough, code, spoiler, link and quote, each with its shortcut, written as Markdown around the selection — `formatting`. |
290
308
  | [voice.tsx](examples/voice.tsx) | Voice and round video messages: hold the button to record and release to send, slide left to cancel, slide up or tap to record hands-free; a double tap or double click switches voice and video — `onSendVoice`, `onSendVideoNote`, `recordMode`. |
291
309
  | [states.tsx](examples/states.tsx) | A closed conversation is disabled, a slow send keeps the text with a busy button until the server answers — `disabled`, `onSend`. |
292
310
  | [controlled.tsx](examples/controlled.tsx) | Every conversation keeps its own draft: switching the chat swaps the text, a template button fills it from outside — `value`, `onValueChange`. |
293
- | [narrow.tsx](examples/narrow.tsx) | On a phone-width chat the row keeps the paperclip, the field and the button; Enter makes a new line on touch screens and the button sends. |
311
+ | [narrow.tsx](examples/narrow.tsx) | On a phone-width chat the row keeps the paperclip, the field and the button; Enter makes a new line on touch screens and the button sends — `Composer.Attach`, `onSend`. |
294
312
 
295
313
  ## Mistakes
296
314
  - A `<Textarea>` with a hand-made send button and an Enter handler → `Composer.Root`: Enter / Shift+Enter / touch, the async send, the clearing and the focus are built in.
297
315
  - Clearing the field in `onSend` before the server answers → return the Promise; the composer clears on resolve and keeps the text on reject.
298
316
  - Rendering the attachment rows yourself → pass `queue`; the tray, paste and drop come with it.
299
- - Sending photos as file messages → send `media` as one `Message.Media` album (its order is the tray's), `files` as `Message.File`.
317
+ - Sending photos as file messages → send each of `albums` as one `Message.Media` message (its order is the tray's), `files` as `Message.File`.
318
+ - Cutting `media` into albums of ten by hand → `albums` comes split.
300
319
  - Showing a sent photo from `item.preview` → the queue revokes it after the send; use `result` or your own object URL of `item.file`, revoked with its message.
301
320
  - Expecting HTML from the formatting → the text is Markdown (`**…**`, `_…_`, `~~…~~`, `` `…` ``, `||…||`, Markdown links, `> `); render it with the message component, never as HTML.
302
321
  - Hiding the reply bar by CSS → unmount `Composer.Context` in `onDismiss`; Escape and a sent message call the same handler.
@@ -307,5 +326,5 @@ Motion: the tray opens and closes as a Crossfade (fade and height glide, the row
307
326
  - An `aria-label` on the root to rename the field → use `labels.placeholder` (the field) and `labels.region` (the form).
308
327
 
309
328
  ## Related
310
- - **Built from:** [Textarea](../textarea/COMPONENT.md), [Button](../button/COMPONENT.md), [FileUpload](../file-upload/COMPONENT.md) (the paperclip; `FileUpload.Queue layout="strip"`, the tray), [Crossfade](../crossfade/COMPONENT.md), [Checkbox](../checkbox/COMPONENT.md), [Dropdown](../dropdown/COMPONENT.md), [Tooltip](../tooltip/COMPONENT.md), [Kbd](../kbd/COMPONENT.md), [Hint](../hint/COMPONENT.md), [Skeleton](../skeleton/COMPONENT.md), Icon (`action.*`, `format.*`, `nav.chevronLeft`, `nav.chevronUp`, `status.locked`), `useUploadQueue` (the `queue`), `internal/ring` (the video preview's ring), `internal/textFormatting` + `internal/textFormattingToolbar` (the formatting shared with Textarea `formatting`)
329
+ - **Built from:** [Textarea](../textarea/COMPONENT.md), [Button](../button/COMPONENT.md), [FileUpload](../file-upload/COMPONENT.md) (the paperclip and the picker of the menu; `FileUpload.Queue layout="strip"`, the tray), [Gallery](../gallery/COMPONENT.md) (`GALLERY_MAX`, the size of an album in `albums`), [Crossfade](../crossfade/COMPONENT.md), [Checkbox](../checkbox/COMPONENT.md), [Dropdown](../dropdown/COMPONENT.md), [Tooltip](../tooltip/COMPONENT.md), [Kbd](../kbd/COMPONENT.md), [Hint](../hint/COMPONENT.md), [Skeleton](../skeleton/COMPONENT.md), Icon (`action.*`, `format.*`, `nav.chevronLeft`, `nav.chevronUp`, `status.locked`), `useUploadQueue` (the `queue`), `internal/ring` (the video preview's ring), `internal/textFormatting` + `internal/textFormattingToolbar` (the formatting shared with Textarea `formatting`), [VisuallyHidden](../visually-hidden/COMPONENT.md)
311
330
  - **See also:** [Message](../message/COMPONENT.md) — the bubbles the composer writes into; [VoicePlayer](../voice-player/COMPONENT.md) — plays a sent voice message; [Textarea](../textarea/COMPONENT.md), [Input](../input/COMPONENT.md)
@@ -0,0 +1,78 @@
1
+ /** The paperclip as a menu of attachment kinds: photos and videos, documents, any file, and an invoice from the system that puts its link into the message and returns the focus to the field — `Composer.Item`, `Composer.ItemIcon`, `accept`, `onSelect`, `inputRef`. */
2
+ import { Composer, Icon, type UploadContext, useUploadQueue } from "prime-ui-kit";
3
+ import * as React from "react";
4
+
5
+ import styles from "./examples.module.css";
6
+
7
+ const TICK_MS = 300;
8
+
9
+ const INVOICE_LINK = "Счёт INV-2051 на 184 000 ₽: https://prime.app/invoices/2051";
10
+
11
+ /** A stand-in for the file server: sends a file in a few steps. */
12
+ function sendFile(file: File, { signal, onProgress }: UploadContext): Promise<string> {
13
+ return new Promise((resolve, reject) => {
14
+ let sent = 0;
15
+ const timer = window.setInterval(() => {
16
+ sent = Math.min(1, sent + 0.25);
17
+ onProgress(sent);
18
+ if (sent < 1) return;
19
+ window.clearInterval(timer);
20
+ resolve(`https://files.example.com/chat/${encodeURIComponent(file.name)}`);
21
+ }, TICK_MS);
22
+ signal.addEventListener("abort", () => {
23
+ window.clearInterval(timer);
24
+ reject(signal.reason);
25
+ });
26
+ });
27
+ }
28
+
29
+ export default function ComposerAttachMenuExample() {
30
+ const queue = useUploadQueue({ upload: sendFile });
31
+ const [draft, setDraft] = React.useState("");
32
+ const inputRef = React.useRef<HTMLTextAreaElement>(null);
33
+
34
+ const attachInvoice = () => {
35
+ setDraft((current) => (current ? `${current}\n${INVOICE_LINK}` : INVOICE_LINK));
36
+ // The menu returns the focus to the paperclip; the reader goes on typing in the field.
37
+ window.requestAnimationFrame(() => inputRef.current?.focus());
38
+ };
39
+
40
+ return (
41
+ <div className={styles.chat}>
42
+ <Composer.Root
43
+ value={draft}
44
+ onValueChange={setDraft}
45
+ inputRef={inputRef}
46
+ queue={queue}
47
+ onSend={() => setDraft("")}
48
+ >
49
+ <Composer.Attach>
50
+ <Composer.Item accept="image/*,video/*">
51
+ <Composer.ItemIcon>
52
+ <Icon name="object.image" />
53
+ </Composer.ItemIcon>
54
+ Фото и видео
55
+ </Composer.Item>
56
+ <Composer.Item accept=".pdf,.docx,.xlsx">
57
+ <Composer.ItemIcon>
58
+ <Icon name="object.document" />
59
+ </Composer.ItemIcon>
60
+ Документ
61
+ </Composer.Item>
62
+ <Composer.Item accept="">
63
+ <Composer.ItemIcon>
64
+ <Icon name="object.file" />
65
+ </Composer.ItemIcon>
66
+ Любой файл
67
+ </Composer.Item>
68
+ <Composer.Item onSelect={attachInvoice}>
69
+ <Composer.ItemIcon>
70
+ <Icon name="object.receipt" />
71
+ </Composer.ItemIcon>
72
+ Счёт из системы
73
+ </Composer.Item>
74
+ </Composer.Attach>
75
+ </Composer.Root>
76
+ </div>
77
+ );
78
+ }
@@ -1,4 +1,4 @@
1
- /** Warehouse photos and documents for a client go through an upload queue: the paperclip opens the file picker, a paste or a drop adds files too, every attachment is a tile of one strip that drags into its order, and send waits until the uploads finish — `queue`, `Composer.Attach`, `useUploadQueue`. */
1
+ /** Warehouse photos and documents for a client go through an upload queue: the paperclip opens the file picker for photos, videos and office documents, a paste or a drop adds files too, every attachment is a tile of one strip that drags into its order, and send waits until the uploads finish — `queue`, `Composer.Attach`, `accept`, `useUploadQueue`. */
2
2
  import { Composer, type UploadContext, useUploadQueue } from "prime-ui-kit";
3
3
 
4
4
  import styles from "./examples.module.css";
@@ -29,7 +29,7 @@ export default function ComposerAttachmentsExample() {
29
29
  return (
30
30
  <div className={styles.chat}>
31
31
  <Composer.Root queue={queue} onSend={() => {}}>
32
- <Composer.Attach />
32
+ <Composer.Attach accept="image/*,video/*,.pdf,.docx,.xlsx" />
33
33
  </Composer.Root>
34
34
  </div>
35
35
  );
@@ -19,12 +19,3 @@
19
19
  width: min(100%, calc(var(--prime-space-20) * 4));
20
20
  margin-inline: auto;
21
21
  }
22
-
23
- /* sizes.tsx, states.tsx: one composer per row with its caption. */
24
- .cell {
25
- display: flex;
26
- flex-direction: column;
27
- gap: var(--prime-space-1);
28
- width: min(100%, calc(var(--prime-space-24) * 6));
29
- margin-inline: auto;
30
- }
@@ -1,4 +1,4 @@
1
- /** On a phone-width chat the row keeps the paperclip, the field and the button; Enter makes a new line on touch screens and the button sends. */
1
+ /** On a phone-width chat the row keeps the paperclip, the field and the button; Enter makes a new line on touch screens and the button sends — `Composer.Attach`, `onSend`. */
2
2
  import { Composer, useUploadQueue } from "prime-ui-kit";
3
3
 
4
4
  import styles from "./examples.module.css";
@@ -1,4 +1,4 @@
1
- /** Answering a client's message and correcting your own: the bar above the field quotes the message, Escape or the cross cancels, ↑ in an empty field opens your last message, send becomes save and hands over the message id — `Composer.Context`, `mode`, `value`, `onDismiss`, `onEditLast`. */
1
+ /** Answering a client's message and correcting your own: the bar above the field quotes the message, Escape or the cross cancels, ↑ in an empty field opens your last message, send becomes save and hands over the message id — `Composer.Context`, `mode`, `messageId`, `onDismiss`, `onEditLast`. */
2
2
  import { Button, Composer, type ComposerMessage, Typography } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
@@ -46,13 +46,13 @@ export default function ComposerReplyEditExample() {
46
46
  }}
47
47
  >
48
48
  {mode?.kind === "reply" ? (
49
- <Composer.Context value={CLIENT_MESSAGE_ID} onDismiss={dismiss}>
49
+ <Composer.Context messageId={CLIENT_MESSAGE_ID} onDismiss={dismiss}>
50
50
  <Composer.Title>Ответ Анне Соколовой</Composer.Title>
51
51
  <Composer.Description>{CLIENT_MESSAGE}</Composer.Description>
52
52
  </Composer.Context>
53
53
  ) : null}
54
54
  {mode?.kind === "edit" ? (
55
- <Composer.Context mode="edit" value={LAST_OWN_MESSAGE_ID} onDismiss={dismiss}>
55
+ <Composer.Context mode="edit" messageId={LAST_OWN_MESSAGE_ID} onDismiss={dismiss}>
56
56
  <Composer.Title>Редактирование</Composer.Title>
57
57
  <Composer.Description>{LAST_OWN_MESSAGE}</Composer.Description>
58
58
  </Composer.Context>
@@ -1,15 +1,13 @@
1
1
  /** One composer in every tier: field, buttons and the paperclip follow it — `size`. */
2
2
  import { Composer, Typography } from "prime-ui-kit";
3
3
 
4
- import styles from "./examples.module.css";
5
-
6
4
  const SIZES = ["xs", "s", "m", "l", "xl"] as const;
7
5
 
8
6
  export default function ComposerSizesExample() {
9
7
  return (
10
- <>
8
+ <div>
11
9
  {SIZES.map((size) => (
12
- <div key={size} className={styles.cell}>
10
+ <div key={size}>
13
11
  <Composer.Root size={size} defaultValue="Счёт № 2187 оплачен" onSend={() => {}}>
14
12
  <Composer.Attach />
15
13
  </Composer.Root>
@@ -18,6 +16,6 @@ export default function ComposerSizesExample() {
18
16
  </Typography>
19
17
  </div>
20
18
  ))}
21
- </>
19
+ </div>
22
20
  );
23
21
  }
@@ -1,16 +1,14 @@
1
1
  /** A closed conversation is disabled, a slow send keeps the text with a busy button until the server answers — `disabled`, `onSend`. */
2
2
  import { Composer, Typography } from "prime-ui-kit";
3
3
 
4
- import styles from "./examples.module.css";
5
-
6
4
  const SLOW_SEND_MS = 2500;
7
5
 
8
6
  const slowSend = () => new Promise<void>((resolve) => window.setTimeout(resolve, SLOW_SEND_MS));
9
7
 
10
8
  export default function ComposerStatesExample() {
11
9
  return (
12
- <>
13
- <div className={styles.cell}>
10
+ <div>
11
+ <div>
14
12
  <Composer.Root disabled defaultValue="Обращение закрыто">
15
13
  <Composer.Attach />
16
14
  </Composer.Root>
@@ -18,7 +16,7 @@ export default function ComposerStatesExample() {
18
16
  disabled
19
17
  </Typography>
20
18
  </div>
21
- <div className={styles.cell}>
19
+ <div>
22
20
  <Composer.Root defaultValue="Нажмите Enter — отправка займёт пару секунд" onSend={slowSend}>
23
21
  <Composer.Attach />
24
22
  </Composer.Root>
@@ -26,6 +24,6 @@ export default function ComposerStatesExample() {
26
24
  onSend → Promise
27
25
  </Typography>
28
26
  </div>
29
- </>
27
+ </div>
30
28
  );
31
29
  }
@@ -14,7 +14,7 @@
14
14
  - A form, a choice or more than one sentence of content → use [Modal](../modal/COMPONENT.md).
15
15
  - An action that can be undone → do it at once and offer «Отменить» in a [Notification](../notification/COMPONENT.md).
16
16
  - A hold-to-confirm right on the button (no dialog) → `holdToConfirm` on [Button](../button/COMPONENT.md).
17
- - Unsaved changes in a Modal or Drawer form → `Modal.Guard` / `Drawer.Guard dirty` (it opens this dialog itself).
17
+ - Unsaved changes in a Modal, Drawer or Sheet form → `Modal.Guard` / `Drawer.Guard` / `Sheet.Guard` with `dirty` (it opens this dialog itself).
18
18
  - A confirm that asks for input (a reason for a refusal, a comment) → [Modal](../modal/COMPONENT.md) `size="s"` with the field in `Modal.Body`, the action button in `Modal.Confirm`, and `Modal.Guard busy` while it is sent.
19
19
 
20
20
  ## Import
@@ -28,7 +28,7 @@ ConfirmDialog.Root state; renders the trigger and the dialog
28
28
  ├── ConfirmDialog.Trigger clones its child; opens on click
29
29
  └── (Modal s) portal + scrim + role="alertdialog"
30
30
  ├── header title (names it) · description (describes it) · close button
31
- ├── (message) a danger Banner with role="alert" after a failure
31
+ ├── (reason) a danger Banner with role="alert" after a failure: the rejection's message
32
32
  └── footer Cancel (focused first) · the confirm (solid, loading while it runs)
33
33
  ```
34
34
 
@@ -37,19 +37,20 @@ ConfirmDialog.Root state; renders the trigger and the dialog
37
37
  <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
38
38
 
39
39
  ### ConfirmDialog.Root
40
- No ref (state root). Renders its Trigger and a Modal `s` with `role="alertdialog"`: the title, the description, an inline danger message after a failure, Cancel (focused first) and the confirm. A press outside never closes it; while `onConfirm` runs nothing closes it.
40
+ No ref (state root). Renders its Trigger and a Modal `s` with `role="alertdialog"`: the question, the consequence, the reason after a failure, Cancel (focused first) and the confirm. While `onConfirm` runs nothing closes it.
41
41
 
42
42
  | Prop | Type | Default | Description |
43
43
  |---|---|---|---|
44
44
  | `open` | `boolean` | — | Controlled visibility; together with `onOpenChange`. |
45
45
  | `defaultOpen` | `boolean` | `false` | Initial visibility, uncontrolled. |
46
46
  | `onOpenChange` | `(open: boolean) => void` | — | Called on open and close: the Trigger, Cancel, the close button, Escape, a resolved `onConfirm`. |
47
+ | `closeOnEscape` | `boolean` | `true` | Escape closes the dialog, like Cancel. |
48
+ | `closeOnOutsideClick` | `boolean` | `false` | A click on the scrim (and on a phone a swipe down) closes the dialog. Off by default: a question about a weighty action is answered with a button, not by a stray click beside it. |
47
49
  | `title` | `ReactNode` | — (required) | The question as a heading («Удалить проект?»); names the dialog. |
48
50
  | `description` | `ReactNode` | — | What happens and what cannot be undone; describes the dialog. |
49
51
  | `confirmLabel` | `ReactNode` | — (required) | The confirm button: the action as a verb («Удалить»), never «Да» or «ОК». |
50
52
  | `tone` | `"danger" \| "accent"` | `"danger"` | `danger`: a destructive action, solid danger confirm. `accent`: a weighty but safe one (send, publish), solid accent confirm. |
51
- | `onConfirm` | `() => unknown` | — (required) | The action. A Promise keeps the dialog busy: the confirm shows `loading`, Cancel and the close button are disabled, Escape is ignored. Resolve closes the dialog; reject keeps it open with `error` (else `labels.error`). |
52
- | `error` | `ReactNode` | — | Why the action failed, from the owner; shown under the text while set. |
53
+ | `onConfirm` | `() => unknown` | — (required) | The action. A pending Promise keeps the dialog busy (`loading`, nothing closes it). Resolve closes it; reject keeps it open with the reason: the `Error.message` or string, else `labels.error`. |
53
54
  | `labels` | `Partial<ConfirmDialogLabels>` | — | Built-in strings, see Labels. |
54
55
  | `children` | `ReactNode` | — | `ConfirmDialog.Trigger`; nothing when `open` comes from code. |
55
56
 
@@ -69,32 +70,42 @@ The dialog is a Modal `s` with the floating surface, a header and a footer; ther
69
70
  | `danger` | solid danger confirm | Delete, revoke, cancel for good | yes |
70
71
  | `accent` | solid accent confirm | Send, publish, charge — weighty but safe | |
71
72
 
73
+ ### Flags
74
+ | Flag | Effect | Default |
75
+ |---|---|---|
76
+ | `closeOnEscape` | Escape closes the dialog like Cancel (never while the action runs) | `true` |
77
+ | `closeOnOutsideClick` | a click on the scrim (on a phone also a swipe down) closes it; turn on only for a safe confirm | `false` |
78
+
72
79
  ## States
73
80
  | State | Driven by | DOM |
74
81
  |---|---|---|
75
82
  | open / closed | `open` / `defaultOpen` / `onOpenChange` | `data-state` on the scrim and the dialog (closed while the exit motion plays) |
76
83
  | running | `onConfirm` returned a pending Promise | the confirm `data-loading="true"` and `aria-busy="true"`; Cancel and the close button `disabled` in place; Escape ignored |
77
- | failed | `onConfirm` rejected, or `error` set | a danger Banner with `role="alert"` drops in under the header; the confirm is ready again |
84
+ | failed | `onConfirm` rejected | a danger Banner with `role="alert"` drops in under the header with the rejection's `Error.message` (or string, else `labels.error`); the confirm is ready again; the next try or closing clears it, and the body closes up in place |
78
85
 
79
86
  ## Layout & spacing
80
- - Modal `s`: 440 wide, the footer fills with two equal buttons; a bottom sheet below 640px of viewport, buttons stacked full width.
87
+ - Modal `s`: 440 wide, the footer fills with two equal buttons; a bottom sheet on a phone, buttons stacked full width.
81
88
  - The failure message is the dialog body (20 around it); without it the header meets the footer.
82
89
  - Write the title as a question with the object («Удалить тег «VIP»?»), the description as the consequence in one or two sentences, the confirm as the verb.
83
90
 
84
91
  ## Accessibility
85
92
 
86
93
  ### Keyboard
94
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
95
+
87
96
  | Key | Action |
88
97
  |---|---|
89
98
  | `Tab` · `Shift+Tab` | Cycles focus inside the dialog; Cancel is focused first. |
90
99
  | `Enter` | On a button presses it; from the dialog itself presses the confirm. |
91
- | `Escape` | Closes the dialog unless the action runs; focus returns to the trigger. |
100
+ | `Escape` | Closes the dialog (`closeOnEscape`) unless the action runs; focus returns to the trigger. |
92
101
 
93
102
  ### ARIA
103
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
104
+
94
105
  - `role="alertdialog"`, `aria-modal="true"`, named by `title`, described by `description`.
95
106
  - Cancel takes focus first — the least destructive choice.
96
107
  - While the action runs the confirm has `aria-busy="true"`; Cancel and the close button are disabled.
97
- - The failure message is `role="alert"`, read at once.
108
+ - The reason of a failure is `role="alert"`, read at once.
98
109
 
99
110
  ### Labels
100
111
  <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
@@ -103,23 +114,25 @@ The dialog is a Modal `s` with the floating surface, a header and a footer; ther
103
114
  |---|---|---|
104
115
  | `cancel` | `"Отмена"` | The cancel button. |
105
116
  | `close` | `"Закрыть"` | `aria-label` of the header close button. |
106
- | `error` | `"Не получилось. Попробуйте ещё раз."` | The message after a rejected `onConfirm` when there is no `error`. |
117
+ | `error` | `"Не получилось. Попробуйте ещё раз."` | The message after a rejected `onConfirm` without a reason of its own. |
107
118
 
108
119
  ## Examples
109
120
  | Example | Shows |
110
121
  |---|---|
111
122
  | [overview.tsx](examples/overview.tsx) | Deleting a project: the danger confirm runs the request with a spinner and nothing closes the dialog until it ends — `ConfirmDialog.Trigger`, `onConfirm`. |
112
123
  | [variants.tsx](examples/variants.tsx) | A destructive action gets the danger confirm; a weighty but safe one, such as sending an invoice, the accent one — `tone`. |
113
- | [failure.tsx](examples/failure.tsx) | The server refuses: the dialog stays open with the owner's reason under the text and the confirm ready to try again — `error`, `onConfirm`. |
124
+ | [failure.tsx](examples/failure.tsx) | The server refuses: the dialog stays open with the reason of the rejection under the text and the confirm ready to try again — `onConfirm`. |
125
+ | [dismiss.tsx](examples/dismiss.tsx) | A reminder to the client is weighty but safe: a click beside the dialog closes it like Cancel, and Escape does too — `closeOnOutsideClick`, `closeOnEscape`. |
114
126
  | [controlled-open.tsx](examples/controlled-open.tsx) | A menu item opens the confirm from code: the dialog has no trigger of its own and the parent owns its state — `open`, `onOpenChange`. |
115
127
 
116
128
  ## Mistakes
117
129
  - A hand-built Modal with `closeOnOutsideClick={false}`, a loading flag and a disabled Cancel → ConfirmDialog does all of it.
118
- - `onConfirm` that catches its own error and resolves → the dialog closes as if it worked; rethrow (or reject) to keep it open.
130
+ - `onConfirm` that catches its own error and resolves → the dialog closes as if it worked; rethrow (or reject) to keep it open. Reject with an `Error` whose message a person can read («Тег используется в 12 сделках») — it is the text under the question.
131
+ - `closeOnOutsideClick` on a destructive confirm → a stray click beside it must not answer the question; keep it off for `danger`.
119
132
  - «Да» / «ОК» on the confirm → the verb of the action («Удалить», «Отправить»).
120
133
  - A success message inside the dialog → it closes on success; say «Удалено» with a Notification.
121
134
  - `tone="accent"` for a delete → destructive is always `danger`.
122
135
 
123
136
  ## Related
124
- - **Built from:** [Modal](../modal/COMPONENT.md) (`s`, the header and footer parts), [Button](../button/COMPONENT.md) (Cancel, the confirm with `loading`), [Banner](../banner/COMPONENT.md) (the failure message), `Icon` (`status.danger` in the Banner)
137
+ - **Built from:** the dialog Modal stands on (`internal/overlay/ModalDialog` at `s`, the header, body and footer of `internal/overlay/DialogParts`), [ScrollContainer](../scroll-container/COMPONENT.md) (the body), [Avatar](../avatar/COMPONENT.md) and [Thumbnail](../thumbnail/COMPONENT.md) (pictures the shared icon slot recognises), [Button](../button/COMPONENT.md) (Cancel, the confirm with `loading`), [Banner](../banner/COMPONENT.md) (the failure message), `Icon` (`status.danger` in the Banner)
125
138
  - **See also:** [Modal](../modal/COMPONENT.md), [Drawer](../drawer/COMPONENT.md), [Notification](../notification/COMPONENT.md)
@@ -0,0 +1,27 @@
1
+ /** A reminder to the client is weighty but safe: a click beside the dialog closes it like Cancel, and Escape does too — `closeOnOutsideClick`, `closeOnEscape`. */
2
+ import { Button, ConfirmDialog } from "prime-ui-kit";
3
+
4
+ /** Pretends to send the reminder. */
5
+ function sendReminder() {
6
+ return new Promise((resolve) => setTimeout(resolve, 900));
7
+ }
8
+
9
+ export default function ConfirmDialogDismissExample() {
10
+ return (
11
+ <ConfirmDialog.Root
12
+ tone="accent"
13
+ closeOnOutsideClick
14
+ closeOnEscape
15
+ title="Напомнить клиенту о счёте №318?"
16
+ description="ООО «Гранит» получит письмо со ссылкой на оплату."
17
+ confirmLabel="Напомнить"
18
+ onConfirm={sendReminder}
19
+ >
20
+ <ConfirmDialog.Trigger>
21
+ <Button.Root variant="soft" tone="neutral">
22
+ Напомнить об оплате
23
+ </Button.Root>
24
+ </ConfirmDialog.Trigger>
25
+ </ConfirmDialog.Root>
26
+ );
27
+ }