prime-ui-kit 0.9.0 → 0.9.1

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 (942) hide show
  1. package/README.md +41 -41
  2. package/dist/chunks/chunk-DB2Y3XXA.js +12437 -0
  3. package/dist/chunks/chunk-KCQFOORX.js +379 -0
  4. package/dist/chunks/chunk-NHOWNIAR.js +3239 -0
  5. package/dist/color-picker.d.ts +7 -0
  6. package/dist/color-picker.js +9 -0
  7. package/dist/components/accordion/Accordion.d.ts +44 -32
  8. package/dist/components/avatar/Avatar.d.ts +36 -53
  9. package/dist/components/badge/Badge.d.ts +50 -13
  10. package/dist/components/badge/edgeIcons.d.ts +13 -0
  11. package/dist/components/badge/tier.d.ts +0 -1
  12. package/dist/components/banner/Banner.d.ts +29 -60
  13. package/dist/components/breadcrumb/Breadcrumb.d.ts +11 -23
  14. package/dist/components/button/Button.d.ts +22 -36
  15. package/dist/components/button-group/ButtonGroup.d.ts +17 -17
  16. package/dist/components/card/Card.d.ts +75 -202
  17. package/dist/components/checkbox/Checkbox.d.ts +37 -38
  18. package/dist/components/code-block/CodeBlock.d.ts +5 -13
  19. package/dist/components/color-picker/ColorPicker.d.ts +76 -52
  20. package/dist/components/color-picker/ColorPresets.d.ts +18 -30
  21. package/dist/components/color-swatches/ColorSwatches.d.ts +40 -0
  22. package/dist/components/command-menu/CommandMenu.d.ts +138 -78
  23. package/dist/components/crossfade/Crossfade.d.ts +14 -0
  24. package/dist/components/data-table/DataTable.d.ts +30 -81
  25. package/dist/components/data-table/Footer.d.ts +16 -0
  26. package/dist/components/data-table/Head.d.ts +21 -0
  27. package/dist/components/data-table/Row.d.ts +56 -0
  28. package/dist/components/data-table/StateRows.d.ts +18 -0
  29. package/dist/components/data-table/rows.d.ts +60 -0
  30. package/dist/components/data-table/types.d.ts +35 -0
  31. package/dist/components/data-table/useColumnHover.d.ts +9 -0
  32. package/dist/components/data-table/useFrozenColumns.d.ts +16 -0
  33. package/dist/components/data-table/useInfiniteRows.d.ts +24 -0
  34. package/dist/components/data-table/useRowSelection.d.ts +35 -0
  35. package/dist/components/datepicker/Datepicker.d.ts +9 -126
  36. package/dist/components/datepicker/DatepickerPanel.d.ts +113 -0
  37. package/dist/components/datepicker/datepickerModel.d.ts +16 -22
  38. package/dist/components/datepicker/panelLayout.d.ts +50 -0
  39. package/dist/components/digit-input/DigitInput.d.ts +24 -19
  40. package/dist/components/divider/Divider.d.ts +7 -15
  41. package/dist/components/dnd/Dnd.d.ts +135 -0
  42. package/dist/components/dnd/DragOverlay.d.ts +6 -0
  43. package/dist/components/dnd/autoScroll.d.ts +5 -0
  44. package/dist/components/dnd/context.d.ts +5 -0
  45. package/dist/components/dnd/dragSession.d.ts +93 -0
  46. package/dist/components/dnd/geometry.d.ts +30 -0
  47. package/dist/components/dnd/labels.d.ts +18 -0
  48. package/dist/components/dnd/store.d.ts +9 -0
  49. package/dist/components/dnd/useDragSource.d.ts +36 -0
  50. package/dist/components/dnd/useDropTarget.d.ts +39 -0
  51. package/dist/components/dnd/useFlipList.d.ts +11 -0
  52. package/dist/components/dnd/useSortableList.d.ts +62 -0
  53. package/dist/components/drawer/Drawer.d.ts +8 -19
  54. package/dist/components/dropdown/Dropdown.d.ts +63 -86
  55. package/dist/components/empty-page/EmptyPage.d.ts +48 -48
  56. package/dist/components/example-frame/ExampleFrame.d.ts +20 -27
  57. package/dist/components/file-upload/FileUpload.d.ts +79 -134
  58. package/dist/components/hint/Hint.d.ts +10 -11
  59. package/dist/components/index.d.ts +54 -42
  60. package/dist/components/input/Input.d.ts +35 -37
  61. package/dist/components/kbd/Kbd.d.ts +6 -12
  62. package/dist/components/label/Label.d.ts +18 -15
  63. package/dist/components/link-button/LinkButton.d.ts +14 -15
  64. package/dist/components/login-form/LoginForm.d.ts +115 -0
  65. package/dist/components/modal/DialogParts.d.ts +57 -16
  66. package/dist/components/modal/Modal.d.ts +7 -21
  67. package/dist/components/native-select/NativeSelect.d.ts +28 -0
  68. package/dist/components/notification/Notification.d.ts +50 -16
  69. package/dist/components/notification/NotificationStore.d.ts +2 -6
  70. package/dist/components/page-content/PageContent.d.ts +43 -52
  71. package/dist/components/pagination/Pagination.d.ts +11 -23
  72. package/dist/components/popover/Popover.d.ts +62 -26
  73. package/dist/components/progress-bar/ProgressBar.d.ts +17 -13
  74. package/dist/components/progress-circle/ProgressCircle.d.ts +14 -15
  75. package/dist/components/radio/Radio.d.ts +46 -54
  76. package/dist/components/scroll-container/ScrollContainer.d.ts +10 -13
  77. package/dist/components/segmented-control/SegmentedControl.d.ts +15 -27
  78. package/dist/components/select/Select.d.ts +54 -135
  79. package/dist/components/select/SelectItem.d.ts +68 -0
  80. package/dist/components/select/selectContext.d.ts +61 -0
  81. package/dist/components/skeleton/Skeleton.d.ts +22 -0
  82. package/dist/components/slider/Slider.d.ts +24 -16
  83. package/dist/components/smart-filter/SmartFilter.d.ts +105 -0
  84. package/dist/components/smart-filter/model.d.ts +33 -0
  85. package/dist/components/spinner/Spinner.d.ts +22 -0
  86. package/dist/components/stepper/Stepper.d.ts +32 -42
  87. package/dist/components/switch/Switch.d.ts +19 -37
  88. package/dist/components/tabs/Tabs.d.ts +62 -38
  89. package/dist/components/tag-select/TagOptionMenu.d.ts +29 -0
  90. package/dist/components/tag-select/TagSelect.d.ts +15 -16
  91. package/dist/components/tag-select/useChipOverflow.d.ts +19 -0
  92. package/dist/components/textarea/Textarea.d.ts +16 -31
  93. package/dist/components/thumbnail/Thumbnail.d.ts +41 -0
  94. package/dist/components/timeline/Timeline.d.ts +46 -61
  95. package/dist/components/tooltip/Tooltip.d.ts +21 -17
  96. package/dist/components/typography/Typography.d.ts +5 -21
  97. package/dist/hooks/useControllableState.d.ts +0 -1
  98. package/dist/hooks/useEnterConfirm.d.ts +15 -0
  99. package/dist/hooks/useImageStatus.d.ts +19 -0
  100. package/dist/hooks/useInertSiblings.d.ts +9 -0
  101. package/dist/hooks/useMergedRefs.d.ts +6 -2
  102. package/dist/hooks/useModalLayer.d.ts +22 -0
  103. package/dist/hooks/usePosition.d.ts +46 -40
  104. package/dist/hooks/usePresence.d.ts +0 -1
  105. package/dist/hooks/useScrollLock.d.ts +3 -5
  106. package/dist/hooks/useStateSwap.d.ts +8 -0
  107. package/dist/icons/Icon.d.ts +24 -7
  108. package/dist/icons/index.d.ts +2 -44
  109. package/dist/icons/registry.d.ts +85 -0
  110. package/dist/index.css +5990 -6891
  111. package/dist/index.d.ts +0 -1
  112. package/dist/index.js +98 -13830
  113. package/dist/internal/AnchorRectContext.d.ts +12 -0
  114. package/dist/internal/ChoiceField.d.ts +34 -0
  115. package/dist/internal/ControlSizeContext.d.ts +6 -2
  116. package/dist/internal/FieldFrame.d.ts +47 -8
  117. package/dist/internal/HighlightMatch.d.ts +13 -0
  118. package/dist/internal/MenuGroup.d.ts +8 -0
  119. package/dist/internal/Portal.d.ts +0 -1
  120. package/dist/internal/VisuallyHidden.d.ts +11 -0
  121. package/dist/internal/context.d.ts +0 -1
  122. package/dist/internal/cx.d.ts +0 -1
  123. package/dist/internal/data-attributes.d.ts +0 -1
  124. package/dist/internal/fieldClasses.d.ts +9 -0
  125. package/dist/internal/formatLabel.d.ts +6 -0
  126. package/dist/internal/highlightTsxHtml.d.ts +1 -2
  127. package/dist/internal/iconBox.d.ts +9 -0
  128. package/dist/internal/iconLayout.d.ts +15 -0
  129. package/dist/internal/imageSlot.d.ts +29 -0
  130. package/dist/internal/layoutPxFromPrimitives.d.ts +2 -3
  131. package/dist/internal/listbox.d.ts +40 -0
  132. package/dist/internal/mergeRefs.d.ts +4 -2
  133. package/dist/internal/overlay/FloatingPanel.d.ts +34 -0
  134. package/dist/internal/overlay/focus.d.ts +14 -0
  135. package/dist/internal/overlay/layerStack.d.ts +41 -0
  136. package/dist/internal/overlay/useFloatingLayer.d.ts +60 -0
  137. package/dist/internal/polymorphic.d.ts +9 -0
  138. package/dist/internal/progressSegments.d.ts +63 -0
  139. package/dist/internal/rovingFocus.d.ts +18 -0
  140. package/dist/internal/scrollAncestors.d.ts +1 -2
  141. package/dist/internal/slot.d.ts +11 -5
  142. package/dist/internal/states.d.ts +3 -2
  143. package/dist/internal/swatch.d.ts +56 -0
  144. package/dist/layout/app-shell/AppShell.d.ts +41 -21
  145. package/dist/layout/index.d.ts +1 -2
  146. package/dist/layout/sidebar/Sidebar.d.ts +206 -35
  147. package/dist/theme/applyTheme.d.ts +0 -1
  148. package/dist/tokens/naming.d.ts +6 -0
  149. package/dist/tokens/primitives.d.ts +22 -80
  150. package/dist/tokens/semantic.d.ts +66 -25
  151. package/dist/tokens/themes/dark.d.ts +3 -1
  152. package/package.json +29 -24
  153. package/src/components/accordion/COMPONENT.md +90 -100
  154. package/src/components/accordion/examples/collapsible.tsx +27 -0
  155. package/src/components/accordion/examples/controlled.tsx +36 -0
  156. package/src/components/accordion/examples/examples.module.css +6 -39
  157. package/src/components/accordion/examples/multiple.tsx +31 -0
  158. package/src/components/accordion/examples/overview.tsx +39 -0
  159. package/src/components/accordion/examples/sizes.tsx +14 -25
  160. package/src/components/accordion/examples/states.tsx +23 -48
  161. package/src/components/accordion/examples/variants.tsx +35 -0
  162. package/src/components/accordion/examples/with-icon.tsx +47 -0
  163. package/src/components/avatar/COMPONENT.md +88 -153
  164. package/src/components/avatar/examples/examples.module.css +6 -44
  165. package/src/components/avatar/examples/overview.tsx +18 -0
  166. package/src/components/avatar/examples/presence.tsx +20 -17
  167. package/src/components/avatar/examples/sizes.tsx +8 -10
  168. package/src/components/avatar/examples/src-from-state.tsx +4 -5
  169. package/src/components/avatar/examples/states.tsx +17 -27
  170. package/src/components/avatar/examples/team-group.tsx +21 -0
  171. package/src/components/avatar/examples/variants.tsx +40 -0
  172. package/src/components/badge/COMPONENT.md +113 -122
  173. package/src/components/{tag → badge}/examples/applied-filters.tsx +10 -11
  174. package/src/components/badge/examples/examples.module.css +14 -59
  175. package/src/components/badge/examples/filter-values.tsx +39 -0
  176. package/src/components/badge/examples/in-controls.tsx +14 -26
  177. package/src/components/badge/examples/overview.tsx +13 -0
  178. package/src/components/badge/examples/sizes.tsx +8 -10
  179. package/src/components/badge/examples/states.tsx +35 -29
  180. package/src/components/badge/examples/variants.tsx +27 -36
  181. package/src/components/badge/examples/with-icon.tsx +50 -0
  182. package/src/components/banner/COMPONENT.md +88 -93
  183. package/src/components/banner/examples/dismissible.tsx +38 -0
  184. package/src/components/banner/examples/examples.module.css +6 -22
  185. package/src/components/banner/examples/narrow.tsx +23 -0
  186. package/src/components/banner/examples/overview.tsx +18 -0
  187. package/src/components/banner/examples/page-strip.tsx +53 -0
  188. package/src/components/banner/examples/sizes.tsx +22 -21
  189. package/src/components/banner/examples/structure.tsx +45 -0
  190. package/src/components/banner/examples/variants.tsx +28 -55
  191. package/src/components/breadcrumb/COMPONENT.md +55 -59
  192. package/src/components/breadcrumb/examples/ellipsis.tsx +12 -0
  193. package/src/components/breadcrumb/examples/examples.module.css +3 -52
  194. package/src/components/breadcrumb/examples/overflow.tsx +26 -0
  195. package/src/components/breadcrumb/examples/overview.tsx +12 -0
  196. package/src/components/breadcrumb/examples/sizes.tsx +11 -14
  197. package/src/components/breadcrumb/examples/with-icon.tsx +14 -0
  198. package/src/components/button/COMPONENT.md +65 -66
  199. package/src/components/button/examples/as-child.tsx +8 -32
  200. package/src/components/button/examples/examples.module.css +18 -76
  201. package/src/components/button/examples/in-form.tsx +20 -14
  202. package/src/components/button/examples/on-colored-host.tsx +29 -0
  203. package/src/components/button/examples/overview.tsx +13 -0
  204. package/src/components/button/examples/sizes.tsx +7 -9
  205. package/src/components/button/examples/states.tsx +18 -28
  206. package/src/components/button/examples/variants.tsx +31 -0
  207. package/src/components/button/examples/with-icon.tsx +35 -23
  208. package/src/components/button-group/COMPONENT.md +64 -55
  209. package/src/components/button-group/examples/controlled.tsx +3 -3
  210. package/src/components/button-group/examples/examples.module.css +4 -39
  211. package/src/components/button-group/examples/full-width.tsx +10 -14
  212. package/src/components/button-group/examples/in-form.tsx +3 -3
  213. package/src/components/button-group/examples/orientation.tsx +6 -8
  214. package/src/components/button-group/examples/overview.tsx +12 -0
  215. package/src/components/button-group/examples/sizes.tsx +8 -10
  216. package/src/components/button-group/examples/states.tsx +28 -7
  217. package/src/components/button-group/examples/with-icon.tsx +45 -0
  218. package/src/components/card/COMPONENT.md +99 -298
  219. package/src/components/card/examples/{content.tsx → content-templates.tsx} +23 -29
  220. package/src/components/card/examples/examples.module.css +0 -8
  221. package/src/components/card/examples/flat.tsx +9 -14
  222. package/src/components/card/examples/kpi-media.tsx +42 -0
  223. package/src/components/card/examples/narrow.tsx +47 -0
  224. package/src/components/card/examples/{settings.tsx → overview.tsx} +7 -8
  225. package/src/components/card/examples/panel-chart.tsx +26 -34
  226. package/src/components/card/examples/{metrics.tsx → variants.tsx} +12 -18
  227. package/src/components/checkbox/COMPONENT.md +92 -96
  228. package/src/components/checkbox/examples/controlled.tsx +41 -0
  229. package/src/components/checkbox/examples/examples.module.css +45 -43
  230. package/src/components/checkbox/examples/in-form.tsx +34 -0
  231. package/src/components/checkbox/examples/indicator.tsx +54 -0
  232. package/src/components/checkbox/examples/overview.tsx +10 -0
  233. package/src/components/checkbox/examples/sizes.tsx +5 -10
  234. package/src/components/checkbox/examples/states.tsx +42 -23
  235. package/src/components/checkbox/examples/without-label.tsx +3 -7
  236. package/src/components/code-block/COMPONENT.md +55 -57
  237. package/src/components/code-block/examples/color-scheme.tsx +4 -15
  238. package/src/components/code-block/examples/examples.module.css +9 -40
  239. package/src/components/code-block/examples/{long-lines.tsx → narrow.tsx} +3 -4
  240. package/src/components/code-block/examples/overview.tsx +19 -0
  241. package/src/components/code-block/examples/variants.tsx +12 -21
  242. package/src/components/color-picker/COMPONENT.md +196 -165
  243. package/src/components/color-picker/examples/controlled.tsx +37 -0
  244. package/src/components/color-picker/examples/examples.module.css +19 -88
  245. package/src/components/color-picker/examples/formats.tsx +13 -18
  246. package/src/components/color-picker/examples/in-form.tsx +44 -0
  247. package/src/components/color-picker/examples/overview.tsx +37 -0
  248. package/src/components/color-picker/examples/panel.tsx +12 -13
  249. package/src/components/color-picker/examples/presets-sizes.tsx +15 -20
  250. package/src/components/color-picker/examples/presets.tsx +33 -0
  251. package/src/components/color-picker/examples/sizes.tsx +26 -0
  252. package/src/components/color-picker/examples/states.tsx +4 -14
  253. package/src/components/color-picker/examples/validation.tsx +18 -0
  254. package/src/components/color-swatches/COMPONENT.md +145 -0
  255. package/src/components/color-swatches/examples/controlled.tsx +22 -0
  256. package/src/components/color-swatches/examples/examples.module.css +19 -0
  257. package/src/components/color-swatches/examples/in-form.tsx +35 -0
  258. package/src/components/color-swatches/examples/overview.tsx +6 -0
  259. package/src/components/color-swatches/examples/sizes.tsx +19 -0
  260. package/src/components/color-swatches/examples/states.tsx +20 -0
  261. package/src/components/color-swatches/examples/wrapping.tsx +12 -0
  262. package/src/components/command-menu/COMPONENT.md +117 -180
  263. package/src/components/command-menu/examples/controlled-open.tsx +29 -0
  264. package/src/components/command-menu/examples/controlled.tsx +19 -26
  265. package/src/components/command-menu/examples/dismiss.tsx +39 -0
  266. package/src/components/command-menu/examples/overview.tsx +61 -0
  267. package/src/components/command-menu/examples/sizes.tsx +30 -51
  268. package/src/components/command-menu/examples/states.tsx +6 -16
  269. package/src/components/command-menu/examples/structure.tsx +54 -0
  270. package/src/components/crossfade/COMPONENT.md +104 -0
  271. package/src/components/crossfade/examples/examples.module.css +65 -0
  272. package/src/components/crossfade/examples/overview.tsx +102 -0
  273. package/src/components/crossfade/examples/record-switch.tsx +67 -0
  274. package/src/components/data-table/COMPONENT.md +171 -185
  275. package/src/components/data-table/examples/appearance.tsx +31 -34
  276. package/src/components/data-table/examples/content-width.tsx +46 -26
  277. package/src/components/data-table/examples/controlled.tsx +56 -0
  278. package/src/components/data-table/examples/detail-panel.tsx +23 -28
  279. package/src/components/data-table/examples/examples.module.css +20 -91
  280. package/src/components/data-table/examples/infinite-scroll.tsx +17 -18
  281. package/src/components/data-table/examples/narrow.tsx +28 -38
  282. package/src/components/data-table/examples/nested-rows.tsx +32 -54
  283. package/src/components/data-table/examples/numeric.tsx +10 -19
  284. package/src/components/data-table/examples/overview.tsx +54 -0
  285. package/src/components/data-table/examples/selection.tsx +11 -15
  286. package/src/components/data-table/examples/sizes.tsx +22 -33
  287. package/src/components/data-table/examples/states.tsx +23 -24
  288. package/src/components/data-table/examples/sticky.tsx +17 -24
  289. package/src/components/data-table/examples/toolbar.tsx +21 -23
  290. package/src/components/datepicker/COMPONENT.md +152 -164
  291. package/src/components/datepicker/examples/controlled-open.tsx +32 -0
  292. package/src/components/datepicker/examples/controlled.tsx +39 -0
  293. package/src/components/datepicker/examples/examples.module.css +9 -23
  294. package/src/components/datepicker/examples/in-form.tsx +32 -45
  295. package/src/components/datepicker/examples/inline-panel.tsx +3 -3
  296. package/src/components/datepicker/examples/narrow.tsx +1 -1
  297. package/src/components/datepicker/examples/overview.tsx +6 -0
  298. package/src/components/datepicker/examples/range-presets.tsx +6 -5
  299. package/src/components/datepicker/examples/sizes.tsx +7 -10
  300. package/src/components/datepicker/examples/states.tsx +9 -30
  301. package/src/components/datepicker/examples/validation.tsx +26 -0
  302. package/src/components/datepicker/examples/yearless.tsx +9 -8
  303. package/src/components/digit-input/COMPONENT.md +91 -53
  304. package/src/components/digit-input/examples/controlled.tsx +6 -15
  305. package/src/components/digit-input/examples/examples.module.css +9 -42
  306. package/src/components/digit-input/examples/full-width.tsx +13 -0
  307. package/src/components/digit-input/examples/grouped.tsx +11 -0
  308. package/src/components/digit-input/examples/in-form.tsx +35 -0
  309. package/src/components/digit-input/examples/on-complete.tsx +20 -0
  310. package/src/components/digit-input/examples/overview.tsx +6 -0
  311. package/src/components/digit-input/examples/sizes.tsx +5 -17
  312. package/src/components/digit-input/examples/states.tsx +6 -50
  313. package/src/components/digit-input/examples/validation.tsx +17 -0
  314. package/src/components/divider/COMPONENT.md +61 -52
  315. package/src/components/divider/examples/align.tsx +14 -0
  316. package/src/components/divider/examples/examples.module.css +6 -20
  317. package/src/components/divider/examples/or-separator.tsx +19 -0
  318. package/src/components/divider/examples/overview.tsx +30 -0
  319. package/src/components/divider/examples/sizes.tsx +11 -10
  320. package/src/components/divider/examples/vertical.tsx +21 -0
  321. package/src/components/divider/examples/with-icon.tsx +26 -0
  322. package/src/components/dnd/COMPONENT.md +197 -0
  323. package/src/components/dnd/examples/board.tsx +83 -0
  324. package/src/components/dnd/examples/drop-zones.tsx +82 -0
  325. package/src/components/dnd/examples/examples.module.css +89 -0
  326. package/src/components/dnd/examples/handle.tsx +53 -0
  327. package/src/components/dnd/examples/narrow.tsx +42 -0
  328. package/src/components/dnd/examples/overview.tsx +45 -0
  329. package/src/components/drawer/COMPONENT.md +103 -102
  330. package/src/components/drawer/examples/controlled-open.tsx +33 -0
  331. package/src/components/drawer/examples/dismiss.tsx +55 -0
  332. package/src/components/drawer/examples/examples.module.css +3 -24
  333. package/src/components/drawer/examples/in-form.tsx +82 -0
  334. package/src/components/drawer/examples/long-content.tsx +40 -0
  335. package/src/components/drawer/examples/overview.tsx +48 -0
  336. package/src/components/drawer/examples/{variants-sides.tsx → placement.tsx} +10 -13
  337. package/src/components/drawer/examples/sizes.tsx +9 -15
  338. package/src/components/drawer/examples/structure.tsx +35 -0
  339. package/src/components/dropdown/COMPONENT.md +109 -152
  340. package/src/components/dropdown/examples/controlled-open.tsx +32 -0
  341. package/src/components/dropdown/examples/dismiss.tsx +17 -0
  342. package/src/components/dropdown/examples/examples.module.css +11 -45
  343. package/src/components/dropdown/examples/long-list.tsx +42 -0
  344. package/src/components/dropdown/examples/{full-width.tsx → match-trigger-width.tsx} +5 -4
  345. package/src/components/dropdown/examples/overview.tsx +41 -0
  346. package/src/components/dropdown/examples/placement.tsx +16 -13
  347. package/src/components/dropdown/examples/sizes.tsx +18 -15
  348. package/src/components/dropdown/examples/states.tsx +21 -29
  349. package/src/components/dropdown/examples/structure.tsx +56 -0
  350. package/src/components/empty-page/COMPONENT.md +71 -75
  351. package/src/components/empty-page/examples/compact.tsx +23 -0
  352. package/src/components/empty-page/examples/data-region.tsx +8 -11
  353. package/src/components/empty-page/examples/examples.module.css +22 -25
  354. package/src/components/empty-page/examples/icon-tones.tsx +5 -6
  355. package/src/components/empty-page/examples/narrow.tsx +26 -0
  356. package/src/components/empty-page/examples/{no-results.tsx → overview.tsx} +4 -5
  357. package/src/components/empty-page/examples/sizes.tsx +14 -20
  358. package/src/components/example-frame/COMPONENT.md +64 -66
  359. package/src/components/example-frame/examples/controlled.tsx +42 -0
  360. package/src/components/example-frame/examples/overview.tsx +16 -0
  361. package/src/components/file-upload/COMPONENT.md +128 -186
  362. package/src/components/file-upload/examples/avatar-upload.tsx +7 -12
  363. package/src/components/file-upload/examples/custom-body.tsx +44 -0
  364. package/src/components/file-upload/examples/examples.module.css +46 -64
  365. package/src/components/file-upload/examples/in-form.tsx +76 -0
  366. package/src/components/file-upload/examples/narrow.tsx +17 -0
  367. package/src/components/file-upload/examples/overview.tsx +52 -0
  368. package/src/components/file-upload/examples/sizes.tsx +16 -37
  369. package/src/components/file-upload/examples/states.tsx +6 -98
  370. package/src/components/file-upload/examples/upload-progress.tsx +39 -0
  371. package/src/components/file-upload/examples/validation.tsx +19 -0
  372. package/src/components/file-upload/examples/variants.tsx +5 -18
  373. package/src/components/hint/COMPONENT.md +42 -48
  374. package/src/components/hint/examples/examples.module.css +3 -45
  375. package/src/components/hint/examples/hint-or-error.tsx +5 -5
  376. package/src/components/hint/examples/overview.tsx +34 -0
  377. package/src/components/hint/examples/sizes.tsx +8 -10
  378. package/src/components/hint/examples/states.tsx +21 -14
  379. package/src/components/hint/examples/with-icon.tsx +31 -0
  380. package/src/components/input/COMPONENT.md +70 -88
  381. package/src/components/input/examples/affixes.tsx +22 -0
  382. package/src/components/input/examples/controlled.tsx +9 -10
  383. package/src/components/input/examples/examples.module.css +3 -116
  384. package/src/components/input/examples/in-form.tsx +35 -14
  385. package/src/components/input/examples/overview.tsx +12 -0
  386. package/src/components/input/examples/sizes.tsx +6 -11
  387. package/src/components/input/examples/states.tsx +6 -23
  388. package/src/components/input/examples/validation.tsx +35 -0
  389. package/src/components/input/examples/with-icon.tsx +25 -0
  390. package/src/components/input/examples/{search-without-focus-ring.tsx → without-focus-ring.tsx} +5 -5
  391. package/src/components/kbd/COMPONENT.md +50 -65
  392. package/src/components/kbd/examples/examples.module.css +11 -41
  393. package/src/components/kbd/examples/in-controls.tsx +25 -31
  394. package/src/components/kbd/examples/overview.tsx +24 -0
  395. package/src/components/kbd/examples/shortcut-list.tsx +12 -12
  396. package/src/components/kbd/examples/sizes.tsx +8 -13
  397. package/src/components/label/COMPONENT.md +45 -44
  398. package/src/components/label/examples/examples.module.css +8 -29
  399. package/src/components/label/examples/overview.tsx +17 -0
  400. package/src/components/label/examples/sizes.tsx +9 -13
  401. package/src/components/label/examples/states.tsx +17 -14
  402. package/src/components/label/examples/structure.tsx +32 -0
  403. package/src/components/label/examples/with-icon.tsx +25 -17
  404. package/src/components/link-button/COMPONENT.md +56 -39
  405. package/src/components/link-button/examples/as-child.tsx +18 -0
  406. package/src/components/link-button/examples/external-link.tsx +6 -6
  407. package/src/components/link-button/examples/overview.tsx +11 -0
  408. package/src/components/link-button/examples/sizes.tsx +9 -11
  409. package/src/components/link-button/examples/states.tsx +25 -12
  410. package/src/components/link-button/examples/variants.tsx +21 -0
  411. package/src/components/link-button/examples/with-icon.tsx +21 -13
  412. package/src/components/login-form/COMPONENT.md +162 -0
  413. package/src/components/login-form/examples/examples.module.css +39 -0
  414. package/src/components/login-form/examples/forgot-password.tsx +39 -0
  415. package/src/components/login-form/examples/narrow.tsx +32 -0
  416. package/src/components/login-form/examples/overview.tsx +58 -0
  417. package/src/components/login-form/examples/register.tsx +85 -0
  418. package/src/components/login-form/examples/reset-password.tsx +60 -0
  419. package/src/components/login-form/examples/sizes.tsx +38 -0
  420. package/src/components/login-form/examples/states.tsx +75 -0
  421. package/src/components/login-form/examples/structure.tsx +28 -0
  422. package/src/components/login-form/examples/verification-code.tsx +57 -0
  423. package/src/components/modal/COMPONENT.md +64 -84
  424. package/src/components/modal/examples/{controlled.tsx → controlled-open.tsx} +6 -12
  425. package/src/components/modal/examples/custom-container.tsx +29 -0
  426. package/src/components/modal/examples/dismiss.tsx +54 -0
  427. package/src/components/modal/examples/examples.module.css +4 -20
  428. package/src/components/modal/examples/in-form.tsx +78 -0
  429. package/src/components/modal/examples/long-content.tsx +52 -0
  430. package/src/components/modal/examples/overview.tsx +35 -0
  431. package/src/components/modal/examples/sizes.tsx +7 -9
  432. package/src/components/modal/examples/structure.tsx +53 -0
  433. package/src/components/native-select/COMPONENT.md +132 -0
  434. package/src/components/native-select/examples/controlled.tsx +26 -0
  435. package/src/components/native-select/examples/examples.module.css +14 -0
  436. package/src/components/native-select/examples/in-form.tsx +43 -0
  437. package/src/components/native-select/examples/option-groups.tsx +17 -0
  438. package/src/components/native-select/examples/overview.tsx +16 -0
  439. package/src/components/native-select/examples/sizes.tsx +18 -0
  440. package/src/components/native-select/examples/states.tsx +21 -0
  441. package/src/components/native-select/examples/validation.tsx +26 -0
  442. package/src/components/notification/COMPONENT.md +107 -121
  443. package/src/components/notification/examples/dismiss.tsx +50 -0
  444. package/src/components/notification/examples/examples.module.css +10 -23
  445. package/src/components/notification/examples/in-form.tsx +64 -0
  446. package/src/components/notification/examples/overview.tsx +24 -0
  447. package/src/components/notification/examples/placement.tsx +66 -0
  448. package/src/components/notification/examples/sizes.tsx +11 -18
  449. package/src/components/notification/examples/stacking.tsx +45 -0
  450. package/src/components/notification/examples/structure.tsx +20 -0
  451. package/src/components/notification/examples/tones.tsx +14 -26
  452. package/src/components/page-content/COMPONENT.md +49 -74
  453. package/src/components/page-content/examples/examples.module.css +4 -8
  454. package/src/components/page-content/examples/narrow.tsx +25 -0
  455. package/src/components/page-content/examples/overview.tsx +41 -0
  456. package/src/components/page-content/examples/variants.tsx +39 -0
  457. package/src/components/pagination/COMPONENT.md +73 -64
  458. package/src/components/pagination/examples/controlled.tsx +51 -0
  459. package/src/components/pagination/examples/examples.module.css +6 -55
  460. package/src/components/pagination/examples/narrow.tsx +25 -0
  461. package/src/components/pagination/examples/overflow.tsx +23 -0
  462. package/src/components/pagination/examples/overview.tsx +6 -0
  463. package/src/components/pagination/examples/sizes.tsx +10 -18
  464. package/src/components/popover/COMPONENT.md +88 -99
  465. package/src/components/popover/examples/controlled-open.tsx +32 -0
  466. package/src/components/popover/examples/dismiss.tsx +49 -0
  467. package/src/components/popover/examples/examples.module.css +21 -41
  468. package/src/components/popover/examples/flush.tsx +47 -0
  469. package/src/components/popover/examples/in-form.tsx +54 -0
  470. package/src/components/popover/examples/{full-width.tsx → match-trigger-width.tsx} +7 -7
  471. package/src/components/popover/examples/overview.tsx +43 -0
  472. package/src/components/popover/examples/placement.tsx +17 -15
  473. package/src/components/popover/examples/sizes.tsx +12 -9
  474. package/src/components/popover/examples/structure.tsx +50 -0
  475. package/src/components/progress-bar/COMPONENT.md +102 -61
  476. package/src/components/progress-bar/examples/custom-max.tsx +12 -0
  477. package/src/components/progress-bar/examples/examples.module.css +4 -34
  478. package/src/components/progress-bar/examples/overview.tsx +12 -0
  479. package/src/components/progress-bar/examples/segments.tsx +32 -0
  480. package/src/components/progress-bar/examples/sizes.tsx +11 -8
  481. package/src/components/progress-bar/examples/variants.tsx +34 -0
  482. package/src/components/progress-circle/COMPONENT.md +101 -60
  483. package/src/components/progress-circle/examples/examples.module.css +2 -39
  484. package/src/components/progress-circle/examples/inner-content.tsx +35 -0
  485. package/src/components/progress-circle/examples/overview.tsx +10 -0
  486. package/src/components/progress-circle/examples/segments.tsx +64 -0
  487. package/src/components/progress-circle/examples/sizes.tsx +10 -12
  488. package/src/components/progress-circle/examples/variants.tsx +28 -0
  489. package/src/components/radio/COMPONENT.md +93 -114
  490. package/src/components/radio/examples/controlled.tsx +30 -0
  491. package/src/components/radio/examples/group.tsx +23 -0
  492. package/src/components/radio/examples/orientation.tsx +34 -0
  493. package/src/components/radio/examples/overview.tsx +18 -0
  494. package/src/components/radio/examples/sizes.tsx +7 -12
  495. package/src/components/radio/examples/states.tsx +42 -30
  496. package/src/components/scroll-container/COMPONENT.md +56 -28
  497. package/src/components/scroll-container/examples/edge-fade.tsx +53 -0
  498. package/src/components/scroll-container/examples/examples.module.css +7 -7
  499. package/src/components/scroll-container/examples/overscroll.tsx +27 -0
  500. package/src/components/scroll-container/examples/overview.tsx +27 -0
  501. package/src/components/scroll-container/examples/variants.tsx +54 -0
  502. package/src/components/segmented-control/COMPONENT.md +91 -105
  503. package/src/components/segmented-control/examples/colors.tsx +8 -13
  504. package/src/components/segmented-control/examples/controlled.tsx +10 -6
  505. package/src/components/segmented-control/examples/examples.module.css +2 -88
  506. package/src/components/segmented-control/examples/full-width.tsx +7 -44
  507. package/src/components/segmented-control/examples/overview.tsx +12 -0
  508. package/src/components/segmented-control/examples/scroll.tsx +16 -0
  509. package/src/components/segmented-control/examples/sizes.tsx +8 -20
  510. package/src/components/segmented-control/examples/states.tsx +28 -34
  511. package/src/components/segmented-control/examples/two-line.tsx +17 -104
  512. package/src/components/segmented-control/examples/with-icon.tsx +52 -0
  513. package/src/components/select/COMPONENT.md +154 -208
  514. package/src/components/select/examples/clearable.tsx +23 -0
  515. package/src/components/select/examples/controlled-open.tsx +30 -0
  516. package/src/components/select/examples/controlled.tsx +17 -10
  517. package/src/components/select/examples/examples.module.css +18 -38
  518. package/src/components/select/examples/in-form.tsx +59 -70
  519. package/src/components/select/examples/multiple.tsx +21 -33
  520. package/src/components/select/examples/overview.tsx +17 -0
  521. package/src/components/select/examples/rich-options.tsx +43 -69
  522. package/src/components/select/examples/searchable.tsx +42 -0
  523. package/src/components/select/examples/sizes.tsx +13 -17
  524. package/src/components/select/examples/states.tsx +34 -48
  525. package/src/components/select/examples/validation.tsx +41 -0
  526. package/src/components/select/examples/with-icon.tsx +35 -0
  527. package/src/components/skeleton/COMPONENT.md +104 -0
  528. package/src/components/skeleton/examples/examples.module.css +89 -0
  529. package/src/components/skeleton/examples/form.tsx +20 -0
  530. package/src/components/skeleton/examples/overview.tsx +21 -0
  531. package/src/components/skeleton/examples/sizes.tsx +24 -0
  532. package/src/components/skeleton/examples/with-crossfade.tsx +68 -0
  533. package/src/components/slider/COMPONENT.md +105 -68
  534. package/src/components/slider/examples/controlled.tsx +26 -30
  535. package/src/components/slider/examples/examples.module.css +8 -32
  536. package/src/components/slider/examples/hint-and-error.tsx +33 -0
  537. package/src/components/slider/examples/overview.tsx +6 -0
  538. package/src/components/slider/examples/range-step.tsx +7 -17
  539. package/src/components/slider/examples/sizes.tsx +8 -6
  540. package/src/components/slider/examples/states.tsx +11 -8
  541. package/src/components/slider/examples/value-format.tsx +13 -25
  542. package/src/components/slider/examples/variants.tsx +23 -0
  543. package/src/components/smart-filter/COMPONENT.md +182 -0
  544. package/src/components/smart-filter/examples/controlled.tsx +48 -0
  545. package/src/components/smart-filter/examples/examples.module.css +56 -0
  546. package/src/components/smart-filter/examples/many-values.tsx +53 -0
  547. package/src/components/smart-filter/examples/narrow.tsx +38 -0
  548. package/src/components/smart-filter/examples/overview.tsx +109 -0
  549. package/src/components/smart-filter/examples/sizes.tsx +33 -0
  550. package/src/components/spinner/COMPONENT.md +112 -0
  551. package/src/components/spinner/examples/examples.module.css +20 -0
  552. package/src/components/spinner/examples/loading-region.tsx +22 -0
  553. package/src/components/spinner/examples/overview.tsx +15 -0
  554. package/src/components/spinner/examples/sizes.tsx +19 -0
  555. package/src/components/spinner/examples/variants.tsx +19 -0
  556. package/src/components/stepper/COMPONENT.md +83 -78
  557. package/src/components/stepper/examples/controlled.tsx +46 -0
  558. package/src/components/stepper/examples/examples.module.css +9 -40
  559. package/src/components/stepper/examples/narrow.tsx +11 -19
  560. package/src/components/stepper/examples/orientation.tsx +21 -59
  561. package/src/components/stepper/examples/overview.tsx +28 -0
  562. package/src/components/stepper/examples/sizes.tsx +19 -28
  563. package/src/components/stepper/examples/states.tsx +20 -21
  564. package/src/components/stepper/examples/with-icon.tsx +29 -0
  565. package/src/components/switch/COMPONENT.md +75 -94
  566. package/src/components/switch/examples/controlled.tsx +8 -6
  567. package/src/components/switch/examples/examples.module.css +13 -45
  568. package/src/components/switch/examples/in-form.tsx +20 -24
  569. package/src/components/switch/examples/overview.tsx +10 -0
  570. package/src/components/switch/examples/settings-row.tsx +14 -22
  571. package/src/components/switch/examples/sizes.tsx +5 -10
  572. package/src/components/switch/examples/states.tsx +37 -25
  573. package/src/components/tabs/COMPONENT.md +153 -86
  574. package/src/components/tabs/examples/closable.tsx +48 -0
  575. package/src/components/tabs/examples/controlled.tsx +14 -20
  576. package/src/components/tabs/examples/examples.module.css +13 -93
  577. package/src/components/tabs/examples/orientation.tsx +40 -0
  578. package/src/components/tabs/examples/overflow.tsx +60 -0
  579. package/src/components/tabs/examples/overview.tsx +30 -0
  580. package/src/components/tabs/examples/sizes.tsx +19 -19
  581. package/src/components/tabs/examples/states.tsx +20 -55
  582. package/src/components/tabs/examples/two-line.tsx +22 -29
  583. package/src/components/tabs/examples/variants.tsx +40 -0
  584. package/src/components/tabs/examples/with-icon.tsx +44 -0
  585. package/src/components/tag-select/COMPONENT.md +119 -122
  586. package/src/components/tag-select/examples/controlled-open.tsx +29 -0
  587. package/src/components/tag-select/examples/controlled.tsx +26 -0
  588. package/src/components/tag-select/examples/creatable.tsx +28 -0
  589. package/src/components/tag-select/examples/examples.module.css +3 -22
  590. package/src/components/tag-select/examples/in-form.tsx +44 -41
  591. package/src/components/tag-select/examples/manage-tags.tsx +20 -39
  592. package/src/components/tag-select/examples/many-tags.tsx +20 -0
  593. package/src/components/tag-select/examples/overview.tsx +21 -0
  594. package/src/components/tag-select/examples/sizes.tsx +7 -10
  595. package/src/components/tag-select/examples/states.tsx +11 -36
  596. package/src/components/tag-select/examples/validation.tsx +35 -0
  597. package/src/components/textarea/COMPONENT.md +50 -50
  598. package/src/components/textarea/examples/auto-resize.tsx +21 -0
  599. package/src/components/textarea/examples/controlled.tsx +12 -16
  600. package/src/components/textarea/examples/examples.module.css +15 -48
  601. package/src/components/textarea/examples/in-form.tsx +52 -48
  602. package/src/components/textarea/examples/overview.tsx +12 -0
  603. package/src/components/textarea/examples/sizes.tsx +6 -7
  604. package/src/components/textarea/examples/states.tsx +9 -13
  605. package/src/components/textarea/examples/validation.tsx +34 -0
  606. package/src/components/textarea/examples/without-focus-ring.tsx +12 -0
  607. package/src/components/thumbnail/COMPONENT.md +150 -0
  608. package/src/components/thumbnail/examples/examples.module.css +45 -0
  609. package/src/components/thumbnail/examples/full-width.tsx +48 -0
  610. package/src/components/thumbnail/examples/overview.tsx +31 -0
  611. package/src/components/thumbnail/examples/ratios.tsx +25 -0
  612. package/src/components/thumbnail/examples/ring.tsx +29 -0
  613. package/src/components/thumbnail/examples/sizes.tsx +23 -0
  614. package/src/components/thumbnail/examples/states.tsx +38 -0
  615. package/src/components/thumbnail/examples/variants.tsx +28 -0
  616. package/src/components/timeline/COMPONENT.md +92 -203
  617. package/src/components/timeline/examples/examples.module.css +5 -20
  618. package/src/components/timeline/examples/links.tsx +28 -0
  619. package/src/components/timeline/examples/narrow.tsx +30 -38
  620. package/src/components/timeline/examples/{activity-feed.tsx → overview.tsx} +9 -17
  621. package/src/components/timeline/examples/sizes.tsx +22 -28
  622. package/src/components/timeline/examples/{service-history.tsx → structure.tsx} +10 -8
  623. package/src/components/timeline/examples/{colors-and-tones.tsx → variants.tsx} +11 -16
  624. package/src/components/tooltip/COMPONENT.md +74 -62
  625. package/src/components/tooltip/examples/{controlled.tsx → controlled-open.tsx} +5 -7
  626. package/src/components/tooltip/examples/delay.tsx +19 -28
  627. package/src/components/tooltip/examples/disabled-trigger.tsx +18 -0
  628. package/src/components/tooltip/examples/examples.module.css +3 -33
  629. package/src/components/tooltip/examples/long-content.tsx +12 -15
  630. package/src/components/tooltip/examples/overview.tsx +17 -0
  631. package/src/components/tooltip/examples/placement.tsx +30 -0
  632. package/src/components/tooltip/examples/sizes.tsx +12 -15
  633. package/src/components/tooltip/examples/toolbar.tsx +35 -0
  634. package/src/components/typography/COMPONENT.md +68 -99
  635. package/src/components/typography/examples/article.tsx +23 -36
  636. package/src/components/typography/examples/examples.module.css +20 -54
  637. package/src/components/typography/examples/inline-emphasis.tsx +20 -0
  638. package/src/components/typography/examples/overview.tsx +20 -0
  639. package/src/components/typography/examples/semantic-tag.tsx +17 -0
  640. package/src/components/typography/examples/truncate.tsx +7 -7
  641. package/src/components/typography/examples/variants.tsx +43 -42
  642. package/src/components/typography/examples/weights.tsx +31 -0
  643. package/src/layout/app-shell/COMPONENT.md +48 -54
  644. package/src/layout/app-shell/examples/contained.tsx +5 -5
  645. package/src/layout/app-shell/examples/examples.module.css +9 -0
  646. package/src/layout/app-shell/examples/overview.tsx +72 -0
  647. package/src/layout/app-shell/examples/template.tsx +54 -0
  648. package/src/layout/sidebar/COMPONENT.md +302 -110
  649. package/src/layout/sidebar/examples/account.tsx +88 -0
  650. package/src/layout/sidebar/examples/brand-header.tsx +45 -0
  651. package/src/layout/sidebar/examples/collapsible-groups.tsx +77 -0
  652. package/src/layout/sidebar/examples/controlled-open.tsx +55 -0
  653. package/src/layout/sidebar/examples/controlled.tsx +68 -0
  654. package/src/layout/sidebar/examples/examples.module.css +17 -3
  655. package/src/layout/sidebar/examples/nested-items.tsx +74 -0
  656. package/src/layout/sidebar/examples/overview.tsx +126 -0
  657. package/src/layout/sidebar/examples/router.tsx +19 -13
  658. package/src/layout/sidebar/examples/sizes.tsx +17 -12
  659. package/src/layout/sidebar/examples/structure.tsx +81 -0
  660. package/src/styles/fonts.css +4 -0
  661. package/src/styles/globals.css +18 -29
  662. package/src/styles/reset.css +2 -0
  663. package/src/styles/theme-dark.css +3 -0
  664. package/src/styles/theme-light.css +34 -23
  665. package/src/styles/tokens.css +9 -77
  666. package/dist/components/accordion/Accordion.d.ts.map +0 -1
  667. package/dist/components/avatar/Avatar.d.ts.map +0 -1
  668. package/dist/components/badge/Badge.d.ts.map +0 -1
  669. package/dist/components/badge/tier.d.ts.map +0 -1
  670. package/dist/components/banner/Banner.d.ts.map +0 -1
  671. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +0 -1
  672. package/dist/components/button/Button.d.ts.map +0 -1
  673. package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
  674. package/dist/components/card/Card.d.ts.map +0 -1
  675. package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
  676. package/dist/components/code-block/CodeBlock.d.ts.map +0 -1
  677. package/dist/components/color-picker/ColorPicker.d.ts.map +0 -1
  678. package/dist/components/color-picker/ColorPresets.d.ts.map +0 -1
  679. package/dist/components/command-menu/CommandMenu.d.ts.map +0 -1
  680. package/dist/components/data-table/DataTable.d.ts.map +0 -1
  681. package/dist/components/datepicker/Datepicker.d.ts.map +0 -1
  682. package/dist/components/datepicker/datepickerModel.d.ts.map +0 -1
  683. package/dist/components/digit-input/DigitInput.d.ts.map +0 -1
  684. package/dist/components/divider/Divider.d.ts.map +0 -1
  685. package/dist/components/drawer/Drawer.d.ts.map +0 -1
  686. package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
  687. package/dist/components/dropdown/dropdownGeometry.d.ts +0 -10
  688. package/dist/components/dropdown/dropdownGeometry.d.ts.map +0 -1
  689. package/dist/components/dropdown/menuKeyboard.d.ts +0 -4
  690. package/dist/components/dropdown/menuKeyboard.d.ts.map +0 -1
  691. package/dist/components/dropdown/useDropdownPosition.d.ts +0 -18
  692. package/dist/components/dropdown/useDropdownPosition.d.ts.map +0 -1
  693. package/dist/components/empty-page/EmptyPage.d.ts.map +0 -1
  694. package/dist/components/example-frame/ExampleFrame.d.ts.map +0 -1
  695. package/dist/components/file-upload/FileUpload.d.ts.map +0 -1
  696. package/dist/components/hint/Hint.d.ts.map +0 -1
  697. package/dist/components/index.css +0 -11181
  698. package/dist/components/index.css.map +0 -7
  699. package/dist/components/index.d.ts.map +0 -1
  700. package/dist/components/index.js +0 -13833
  701. package/dist/components/index.js.map +0 -7
  702. package/dist/components/input/Input.d.ts.map +0 -1
  703. package/dist/components/kbd/Kbd.d.ts.map +0 -1
  704. package/dist/components/label/Label.d.ts.map +0 -1
  705. package/dist/components/link-button/LinkButton.d.ts.map +0 -1
  706. package/dist/components/modal/DialogParts.d.ts.map +0 -1
  707. package/dist/components/modal/Modal.d.ts.map +0 -1
  708. package/dist/components/modal/useInertSiblings.d.ts +0 -7
  709. package/dist/components/modal/useInertSiblings.d.ts.map +0 -1
  710. package/dist/components/notification/Notification.d.ts.map +0 -1
  711. package/dist/components/notification/NotificationStore.d.ts.map +0 -1
  712. package/dist/components/page-content/PageContent.d.ts.map +0 -1
  713. package/dist/components/pagination/Pagination.d.ts.map +0 -1
  714. package/dist/components/popover/Popover.d.ts.map +0 -1
  715. package/dist/components/popover/popoverGeometry.d.ts +0 -6
  716. package/dist/components/popover/popoverGeometry.d.ts.map +0 -1
  717. package/dist/components/popover/usePopoverPosition.d.ts +0 -18
  718. package/dist/components/popover/usePopoverPosition.d.ts.map +0 -1
  719. package/dist/components/progress-bar/ProgressBar.d.ts.map +0 -1
  720. package/dist/components/progress-circle/ProgressCircle.d.ts.map +0 -1
  721. package/dist/components/radio/Radio.d.ts.map +0 -1
  722. package/dist/components/scroll-container/ScrollContainer.d.ts.map +0 -1
  723. package/dist/components/segmented-control/SegmentedControl.d.ts.map +0 -1
  724. package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +0 -29
  725. package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts.map +0 -1
  726. package/dist/components/select/Select.d.ts.map +0 -1
  727. package/dist/components/select/selectIcons.d.ts +0 -15
  728. package/dist/components/select/selectIcons.d.ts.map +0 -1
  729. package/dist/components/select/selectListbox.d.ts +0 -13
  730. package/dist/components/select/selectListbox.d.ts.map +0 -1
  731. package/dist/components/slider/Slider.d.ts.map +0 -1
  732. package/dist/components/stepper/Stepper.d.ts.map +0 -1
  733. package/dist/components/switch/Switch.d.ts.map +0 -1
  734. package/dist/components/tabs/Tabs.d.ts.map +0 -1
  735. package/dist/components/tag/Tag.d.ts +0 -47
  736. package/dist/components/tag/Tag.d.ts.map +0 -1
  737. package/dist/components/tag-select/TagSelect.d.ts.map +0 -1
  738. package/dist/components/textarea/Textarea.d.ts.map +0 -1
  739. package/dist/components/timeline/Timeline.d.ts.map +0 -1
  740. package/dist/components/tooltip/Tooltip.d.ts.map +0 -1
  741. package/dist/components/typography/Typography.d.ts.map +0 -1
  742. package/dist/hooks/useControllableState.d.ts.map +0 -1
  743. package/dist/hooks/useEscapeKey.d.ts +0 -7
  744. package/dist/hooks/useEscapeKey.d.ts.map +0 -1
  745. package/dist/hooks/useFieldIds.d.ts +0 -17
  746. package/dist/hooks/useFieldIds.d.ts.map +0 -1
  747. package/dist/hooks/useFocusTrap.d.ts +0 -20
  748. package/dist/hooks/useFocusTrap.d.ts.map +0 -1
  749. package/dist/hooks/useMergedRefs.d.ts.map +0 -1
  750. package/dist/hooks/useModalKeyboard.d.ts +0 -14
  751. package/dist/hooks/useModalKeyboard.d.ts.map +0 -1
  752. package/dist/hooks/useOutsideClick.d.ts +0 -26
  753. package/dist/hooks/useOutsideClick.d.ts.map +0 -1
  754. package/dist/hooks/useOverlayModal.d.ts +0 -7
  755. package/dist/hooks/useOverlayModal.d.ts.map +0 -1
  756. package/dist/hooks/usePosition.d.ts.map +0 -1
  757. package/dist/hooks/usePresence.d.ts.map +0 -1
  758. package/dist/hooks/useResponsiveMonths.d.ts +0 -18
  759. package/dist/hooks/useResponsiveMonths.d.ts.map +0 -1
  760. package/dist/hooks/useScrollLock.d.ts.map +0 -1
  761. package/dist/icons/Icon.d.ts.map +0 -1
  762. package/dist/icons/index.d.ts.map +0 -1
  763. package/dist/index.css.map +0 -7
  764. package/dist/index.d.ts.map +0 -1
  765. package/dist/index.js.map +0 -7
  766. package/dist/internal/ControlSizeContext.d.ts.map +0 -1
  767. package/dist/internal/DividerContentContext.d.ts +0 -4
  768. package/dist/internal/DividerContentContext.d.ts.map +0 -1
  769. package/dist/internal/FieldFrame.d.ts.map +0 -1
  770. package/dist/internal/OverlayPortalLayerContext.d.ts +0 -13
  771. package/dist/internal/OverlayPortalLayerContext.d.ts.map +0 -1
  772. package/dist/internal/Portal.d.ts.map +0 -1
  773. package/dist/internal/context.d.ts.map +0 -1
  774. package/dist/internal/cx.d.ts.map +0 -1
  775. package/dist/internal/data-attributes.d.ts.map +0 -1
  776. package/dist/internal/highlightTsxHtml.d.ts.map +0 -1
  777. package/dist/internal/layoutPxFromPrimitives.d.ts.map +0 -1
  778. package/dist/internal/mergeRefs.d.ts.map +0 -1
  779. package/dist/internal/runtimeUnits.d.ts +0 -3
  780. package/dist/internal/runtimeUnits.d.ts.map +0 -1
  781. package/dist/internal/scrollAncestors.d.ts.map +0 -1
  782. package/dist/internal/slot.d.ts.map +0 -1
  783. package/dist/internal/states.d.ts.map +0 -1
  784. package/dist/internal/useFieldDescriptions.d.ts +0 -18
  785. package/dist/internal/useFieldDescriptions.d.ts.map +0 -1
  786. package/dist/layout/app-shell/AppShell.d.ts.map +0 -1
  787. package/dist/layout/index.d.ts.map +0 -1
  788. package/dist/layout/sidebar/Sidebar.d.ts.map +0 -1
  789. package/dist/theme/applyTheme.d.ts.map +0 -1
  790. package/dist/tokens/primitives.d.ts.map +0 -1
  791. package/dist/tokens/semantic.d.ts.map +0 -1
  792. package/dist/tokens/themes/dark.d.ts.map +0 -1
  793. package/dist/tokens/themes/light.d.ts +0 -3
  794. package/dist/tokens/themes/light.d.ts.map +0 -1
  795. package/src/components/accordion/examples/checkout.tsx +0 -73
  796. package/src/components/accordion/examples/layouts.tsx +0 -58
  797. package/src/components/avatar/examples/colors.tsx +0 -29
  798. package/src/components/avatar/examples/group.tsx +0 -35
  799. package/src/components/avatar/examples/team-card.tsx +0 -70
  800. package/src/components/badge/examples/icons.tsx +0 -37
  801. package/src/components/badge/examples/order-list.tsx +0 -48
  802. package/src/components/badge/examples/palette.tsx +0 -44
  803. package/src/components/badge/examples/surfaces.tsx +0 -21
  804. package/src/components/banner/examples/dismiss.tsx +0 -48
  805. package/src/components/banner/examples/placement.tsx +0 -92
  806. package/src/components/breadcrumb/examples/collapse.tsx +0 -56
  807. package/src/components/breadcrumb/examples/page-header.tsx +0 -31
  808. package/src/components/button/examples/composition.tsx +0 -46
  809. package/src/components/button/examples/controlled.tsx +0 -18
  810. package/src/components/button/examples/full-width.tsx +0 -15
  811. package/src/components/button/examples/icon-only.tsx +0 -42
  812. package/src/components/button/examples/surfaces.tsx +0 -18
  813. package/src/components/button/examples/variants-tones.tsx +0 -39
  814. package/src/components/button-group/examples/composition.tsx +0 -99
  815. package/src/components/card/examples/mini-media.tsx +0 -55
  816. package/src/components/card/examples/responsive.tsx +0 -72
  817. package/src/components/checkbox/examples/hint-error.tsx +0 -22
  818. package/src/components/checkbox/examples/select-all.tsx +0 -40
  819. package/src/components/checkbox/examples/settings-card.tsx +0 -76
  820. package/src/components/code-block/examples/api-docs.tsx +0 -31
  821. package/src/components/code-block/examples/controlled.tsx +0 -38
  822. package/src/components/code-block/examples/surfaces.tsx +0 -7
  823. package/src/components/color-picker/examples/brand-color.tsx +0 -73
  824. package/src/components/color-picker/examples/hex-input-sizes.tsx +0 -54
  825. package/src/components/color-picker/examples/presets-quick.tsx +0 -57
  826. package/src/components/color-picker/examples/presets-tags.tsx +0 -52
  827. package/src/components/command-menu/examples/composition.tsx +0 -91
  828. package/src/components/command-menu/examples/examples.module.css +0 -9
  829. package/src/components/command-menu/examples/keyboard-search.tsx +0 -94
  830. package/src/components/data-table/examples/dashboard.tsx +0 -205
  831. package/src/components/data-table/examples/sorting-pagination.tsx +0 -66
  832. package/src/components/datepicker/examples/badge.tsx +0 -19
  833. package/src/components/datepicker/examples/single.tsx +0 -16
  834. package/src/components/digit-input/examples/length-and-complete.tsx +0 -30
  835. package/src/components/digit-input/examples/surfaces.tsx +0 -6
  836. package/src/components/digit-input/examples/verification-step.tsx +0 -62
  837. package/src/components/divider/examples/composition.tsx +0 -49
  838. package/src/components/divider/examples/variants.tsx +0 -62
  839. package/src/components/drawer/examples/composition.tsx +0 -94
  840. package/src/components/drawer/examples/controlled.tsx +0 -42
  841. package/src/components/drawer/examples/features.tsx +0 -48
  842. package/src/components/drawer/examples/states.tsx +0 -54
  843. package/src/components/dropdown/examples/as-child.tsx +0 -23
  844. package/src/components/dropdown/examples/composition.tsx +0 -91
  845. package/src/components/dropdown/examples/controlled.tsx +0 -32
  846. package/src/components/dropdown/examples/row-actions.tsx +0 -56
  847. package/src/components/dropdown/examples/variants.tsx +0 -52
  848. package/src/components/example-frame/examples/basic.tsx +0 -18
  849. package/src/components/file-upload/examples/file-list.tsx +0 -67
  850. package/src/components/file-upload/examples/in-card.tsx +0 -84
  851. package/src/components/hint/examples/field-states.tsx +0 -60
  852. package/src/components/hint/examples/in-form.tsx +0 -45
  853. package/src/components/input/examples/anatomy.tsx +0 -70
  854. package/src/components/input/examples/control-alignment.tsx +0 -57
  855. package/src/components/input/examples/full-width.tsx +0 -23
  856. package/src/components/input/examples/icons-and-affixes.tsx +0 -32
  857. package/src/components/input/examples/reserved-support-row.tsx +0 -33
  858. package/src/components/input/examples/surfaces.tsx +0 -12
  859. package/src/components/input/examples/with-badge.tsx +0 -40
  860. package/src/components/kbd/examples/modifier-keys.tsx +0 -24
  861. package/src/components/label/examples/in-form.tsx +0 -39
  862. package/src/components/label/examples/markers.tsx +0 -27
  863. package/src/components/link-button/examples/composition.tsx +0 -30
  864. package/src/components/link-button/examples/examples.module.css +0 -46
  865. package/src/components/link-button/examples/tones.tsx +0 -15
  866. package/src/components/modal/examples/composition.tsx +0 -87
  867. package/src/components/modal/examples/features.tsx +0 -68
  868. package/src/components/modal/examples/link.tsx +0 -79
  869. package/src/components/modal/examples/states.tsx +0 -73
  870. package/src/components/notification/examples/features.tsx +0 -42
  871. package/src/components/notification/examples/live.tsx +0 -128
  872. package/src/components/notification/examples/save-form.tsx +0 -59
  873. package/src/components/page-content/examples/readable.tsx +0 -24
  874. package/src/components/page-content/examples/settings-page.tsx +0 -49
  875. package/src/components/page-content/examples/widths.tsx +0 -39
  876. package/src/components/pagination/examples/compact.tsx +0 -36
  877. package/src/components/pagination/examples/list-footer.tsx +0 -50
  878. package/src/components/pagination/examples/states.tsx +0 -44
  879. package/src/components/popover/examples/as-child.tsx +0 -29
  880. package/src/components/popover/examples/composition.tsx +0 -45
  881. package/src/components/popover/examples/controlled.tsx +0 -39
  882. package/src/components/popover/examples/features.tsx +0 -56
  883. package/src/components/popover/examples/inset-variants.tsx +0 -58
  884. package/src/components/popover/examples/states.tsx +0 -48
  885. package/src/components/progress-bar/examples/file-upload.tsx +0 -52
  886. package/src/components/progress-bar/examples/values-and-tones.tsx +0 -17
  887. package/src/components/progress-circle/examples/goals-card.tsx +0 -37
  888. package/src/components/progress-circle/examples/values-and-tones.tsx +0 -56
  889. package/src/components/radio/examples/examples.module.css +0 -43
  890. package/src/components/radio/examples/hint-error.tsx +0 -28
  891. package/src/components/radio/examples/horizontal.tsx +0 -33
  892. package/src/components/radio/examples/plan-picker.tsx +0 -55
  893. package/src/components/scroll-container/examples/both-axes.tsx +0 -57
  894. package/src/components/scroll-container/examples/list.tsx +0 -44
  895. package/src/components/segmented-control/examples/item-content.tsx +0 -78
  896. package/src/components/segmented-control/examples/surfaces.tsx +0 -82
  897. package/src/components/segmented-control/examples/toolbar.tsx +0 -56
  898. package/src/components/segmented-progress-bar/COMPONENT.md +0 -128
  899. package/src/components/segmented-progress-bar/examples/examples.module.css +0 -68
  900. package/src/components/segmented-progress-bar/examples/segment-gap.tsx +0 -24
  901. package/src/components/segmented-progress-bar/examples/sizes.tsx +0 -31
  902. package/src/components/segmented-progress-bar/examples/storage-distribution.tsx +0 -41
  903. package/src/components/select/examples/native.tsx +0 -21
  904. package/src/components/select/examples/search-groups.tsx +0 -61
  905. package/src/components/select/examples/with-badge.tsx +0 -47
  906. package/src/components/slider/examples/basic.tsx +0 -6
  907. package/src/components/slider/examples/display-settings.tsx +0 -41
  908. package/src/components/stepper/examples/wizard.tsx +0 -62
  909. package/src/components/switch/examples/notification-settings.tsx +0 -37
  910. package/src/components/switch/examples/on-off.tsx +0 -15
  911. package/src/components/switch/examples/validation.tsx +0 -19
  912. package/src/components/tabs/examples/horizontal.tsx +0 -30
  913. package/src/components/tabs/examples/vertical.tsx +0 -101
  914. package/src/components/tag/COMPONENT.md +0 -179
  915. package/src/components/tag/examples/colors.tsx +0 -49
  916. package/src/components/tag/examples/examples.module.css +0 -47
  917. package/src/components/tag/examples/sizes.tsx +0 -23
  918. package/src/components/tag/examples/states.tsx +0 -19
  919. package/src/components/tag/examples/surfaces.tsx +0 -16
  920. package/src/components/tag/examples/with-icon.tsx +0 -29
  921. package/src/components/textarea/examples/height-and-limits.tsx +0 -45
  922. package/src/components/textarea/examples/hint-and-error.tsx +0 -21
  923. package/src/components/textarea/examples/reserved-support-row.tsx +0 -37
  924. package/src/components/textarea/examples/surfaces.tsx +0 -11
  925. package/src/components/textarea/examples/with-label.tsx +0 -22
  926. package/src/components/timeline/examples/hover-highlight.tsx +0 -48
  927. package/src/components/timeline/examples/in-card.tsx +0 -48
  928. package/src/components/timeline/examples/selectable.tsx +0 -58
  929. package/src/components/tooltip/examples/composition.tsx +0 -37
  930. package/src/components/tooltip/examples/side.tsx +0 -29
  931. package/src/components/tooltip/examples/states.tsx +0 -45
  932. package/src/components/typography/examples/as-prop.tsx +0 -25
  933. package/src/components/typography/examples/composition.tsx +0 -23
  934. package/src/components/typography/examples/full-width.tsx +0 -29
  935. package/src/components/typography/examples/reading-and-form.tsx +0 -35
  936. package/src/components/typography/examples/states.tsx +0 -23
  937. package/src/components/typography/examples/tones.tsx +0 -34
  938. package/src/components/typography/examples/variant-catalog.tsx +0 -41
  939. package/src/layout/app-shell/examples/with-sidebar.tsx +0 -63
  940. package/src/layout/sidebar/examples/modes.tsx +0 -55
  941. package/src/layout/sidebar/examples/responsive.tsx +0 -44
  942. package/src/layout/sidebar/examples/states.tsx +0 -34
@@ -1,13 +1,42 @@
1
1
  # Sidebar
2
2
 
3
3
  **Category:** layout
4
+ **Kind:** layout
4
5
 
5
6
  > App side navigation in three modes — expanded, compact, hidden — and an off-canvas panel on narrow screens.
6
7
 
7
8
  ## When to use
8
9
  - The main navigation of an app, inside `AppShell.Nav`.
9
10
  - Navigation that users can collapse to an icon rail.
10
- - Router links (`asChild` + NavLink) with an active page.
11
+ - Sections with sub-pages (a parent item with child items), grouped and collapsible.
12
+ - Router links (`asChild` + NavLink) with a current page.
13
+
14
+ ### Building the navigation
15
+ The sidebar is the map of the product: people scan it, remember where things are and return to the
16
+ same place. Structure it by what people do, not by how the backend is split.
17
+
18
+ - **Top: the everyday places.** 2–4 items without a group label (Обзор, Входящие) — where people
19
+ start and come back. Never collapsible.
20
+ - **Groups are categories of work.** Sales, Support, Finance: 3–7 items each, ordered by how often
21
+ they are used. A group label is one short word — on the rail only its first letters show (with a
22
+ tooltip), so start sibling labels differently («Продажи» and «Проекты» both read «Про»).
23
+ - **Fold only what is secondary.** Make a group `collapsible` when the list is long (about 12+
24
+ items) or the group is used rarely; keep the main group open and fixed. `defaultOpen={false}`
25
+ only for rarely used groups — a group with the current page opens by itself.
26
+ - **One level of nesting.** `Sidebar.Sub` is one section with 2–6 views of the same objects
27
+ (Сделки → Новые · В работе · Закрытые). The parent only discloses; an overview page is the first
28
+ child («Все сделки»). Never a sub-list inside a sub-list — split the section or use page tabs.
29
+ - **Icons.** Every top-level item and every sub-list parent has a distinct icon (on the rail the
30
+ icon is all that is left); children of a sub-list have none.
31
+ - **Numbers and dots.** A plain `Sidebar.ItemCount` is information (12 new deals): it leaves the
32
+ row on the rail. A coloured count asks for action (3 unanswered tickets, 2 overdue invoices): it
33
+ becomes a dot on the rail and on any folded parent above it, so the signal is never hidden. Keep
34
+ colour rare — red for what is blocked or overdue, blue for new or unread; never for totals.
35
+ Several colours in one folded branch show the first one's dot.
36
+ - **Footer: the meta.** Help (external link with a trailing icon), settings, then the account last,
37
+ with its menu (profile, account settings, sign out).
38
+ - **Remember the user's layout.** Pass `persistKey`: the rail mode and folded groups and sub-lists
39
+ survive reloads. Give groups an `id` when their labels are translated.
11
40
 
12
41
  ## When not to use
13
42
  - A temporary panel with a form or details → use [Drawer](../../components/drawer/COMPONENT.md).
@@ -22,183 +51,346 @@ import { Sidebar, useSidebar } from "prime-ui-kit";
22
51
 
23
52
  ## Anatomy
24
53
  ```
25
- Sidebar.Root rail wrapper; renders <nav> inside
26
- ├── Sidebar.Header brand row
27
- ├── Sidebar.Content scrolling middle (soft fades at both ends)
28
- │ └── Sidebar.Group role="group" with optional label
29
- │ └── Sidebar.Item <button> / <a> / asChild element
30
- └── Sidebar.Footer bottom items
31
- └── Sidebar.Toggle item-shaped mode / panel toggle
32
- useSidebar() state hook for custom parts inside Root
54
+ Sidebar.Root rail wrapper; renders <nav> inside; size tier for items
55
+ ├─ Sidebar.Header one fixed-height row
56
+ │ ├─ Sidebar.Brand logo + name + muted line (link / div / asChild)
57
+ │ │ └─ Sidebar.BrandLogo the mark, on the icon axis
58
+ │ └─ Sidebar.Toggle variant="header" «‹‹» at the header end → round button on the rail edge
59
+ ├─ Sidebar.Content scrolling middle (ScrollContainer, edge fades, no scrollbar)
60
+ │ └─ Sidebar.Group role="group"; optional label, `collapsible` heading
61
+ │ ├─ Sidebar.Item <button> / <a> / asChild element
62
+ │ │ ├─ Sidebar.ItemIcon leading icon (before the label)
63
+ │ │ ├─ (label) the remaining children
64
+ │ │ ├─ Sidebar.ItemCount plain number, or a Badge with color / variant
65
+ │ │ ├─ Sidebar.ItemShortcut key hint
66
+ │ │ ├─ Sidebar.ItemIcon trailing icon (after the label)
67
+ │ │ └─ Sidebar.ItemAction row action button beside the item element
68
+ │ └─ Sidebar.Sub parent item with child items
69
+ │ ├─ Sidebar.SubTrigger disclosure row, chevron at the end
70
+ │ └─ Sidebar.SubContent child Items on a guide line (a flyout on the compact rail)
71
+ └─ Sidebar.Footer bottom items, the item Toggle, the account
72
+ └─ Sidebar.Account avatar + name + muted line; a Dropdown.Trigger child
73
+ useSidebar() state hook for custom parts inside Root
33
74
  ```
34
75
 
35
76
  ## API
36
77
 
78
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
79
+
37
80
  ### Sidebar.Root
38
- `forwardRef` to the outer `<div>`.
81
+ `forwardRef` → `HTMLDivElement`. The rail wrapper with the `<nav>` inside; owns the mode and the off-canvas panel and passes the tier to items.
39
82
 
40
83
  | Prop | Type | Default | Description |
41
84
  |---|---|---|---|
42
- | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `"m"` | Item height, icon, text and badge tier. |
43
- | `mode` | `"expanded" \| "compact" \| "hidden"` | — | Controlled desktop mode. |
44
- | `defaultMode` | `"expanded" \| "compact" \| "hidden"` | `"expanded"` | Initial mode, uncontrolled. |
45
- | `onModeChange` | `(mode: SidebarMode) => void` | — | Called by Toggle and `setMode`. |
46
- | `open` | `boolean` | — | Controlled off-canvas panel (narrow viewports only). |
47
- | `defaultOpen` | `boolean` | `false` | Initial off-canvas state. |
48
- | `onOpenChange` | `(open: boolean) => void` | — | Off-canvas open / close (Toggle, scrim, Escape, navigation, leaving the narrow viewport). |
49
- | `responsive` | `boolean` | `true` | Below 768px the rail leaves the layout and becomes an off-canvas panel. |
50
- | `labels` | `Partial<SidebarLabels>` | see Accessibility | Built-in strings. |
51
- | `children` | `ReactNode` | — | Header, Content, Footer. |
52
-
53
- + native `<div>` props.
85
+ | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `"m"` | Item tier: height 28 · 32 · 36 · 40 · 48, text, icon; counters and row actions one tier down. The rail width does not change. |
86
+ | `mode` | `"expanded" \| "compact" \| "hidden"` | — | Desktop mode (controlled): full rail, icon rail with tooltips and flyouts, or hidden. |
87
+ | `defaultMode` | `"expanded" \| "compact" \| "hidden"` | `"expanded"` | Initial mode (uncontrolled). |
88
+ | `onModeChange` | `(mode: SidebarMode) => void` | — | Called with the new mode (Toggle, `useSidebar().setMode`). |
89
+ | `open` | `boolean` | — | Off-canvas panel on narrow viewports (controlled). |
90
+ | `defaultOpen` | `boolean` | `false` | Initial off-canvas state (uncontrolled). |
91
+ | `onOpenChange` | `(open: boolean) => void` | — | Off-canvas open / close: Toggle, scrim, Escape, navigation, leaving the narrow viewport. |
92
+ | `offCanvas` | `"auto" \| "always" \| "never"` | `"auto"` | When the rail leaves the layout and becomes an off-canvas panel with a scrim and a focus trap, opened by `open`: `auto` — below 768px (viewport); `always` — at any width (navigation behind a menu button); `never` — always a rail. |
93
+ | `persistKey` | `string` | — | Remembers the navigation across reloads in `localStorage` under this key: the mode and which collapsible groups and sub-lists are open, by their `id`, else their label text (give an `id` when labels are translated or change). The stored state wins over `defaultMode` / `defaultOpen`; controlled `mode` / `open` are not stored. Unavailable storage is ignored. |
94
+ | `labels` | `Partial<SidebarLabels>` | — | Built-in strings, see Labels. |
95
+ | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
54
96
 
55
97
  ### Sidebar.Header · Sidebar.Footer
56
- No ref. + native `<div>` props.
98
+ `ref` → `HTMLDivElement`. Header: one fixed-height row for `Sidebar.Brand` and the header Toggle. Footer: items, the item Toggle and `Sidebar.Account` (set apart by air) at the bottom.
99
+
100
+ | Prop | Type | Default | Description |
101
+ |---|---|---|---|
102
+ | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
103
+
104
+ ### Sidebar.Brand
105
+ `forwardRef` → the rendered element. Product block: `Sidebar.BrandLogo`, the name and a muted line; an `<a>` with `href`, the single child with `asChild`, else a `<div>`. In compact mode only the logo stays, without a tooltip (it would cover the edge toggle); the faded name still names the link.
106
+
107
+ | Prop | Type | Default | Description |
108
+ |---|---|---|---|
109
+ | `description` | `ReactNode` | — | Muted second line under the name (workspace, plan). |
110
+ | `href` | `string` | — | Renders an `<a>` (usually home); navigating closes the off-canvas panel. |
111
+ | `asChild` | `boolean` | `false` | Renders the single child (e.g. a router `Link`) as the brand; its children are the logo and the name. |
112
+ | `children` | `ReactNode` | — | `Sidebar.BrandLogo` and the product name. |
113
+ | `…rest` | `HTMLAttributes<HTMLElement>` | — | `onClick`, `aria-*`, `className` and the other attributes. |
114
+
115
+ ### Sidebar.BrandLogo
116
+ `ref` → `HTMLSpanElement`. The product mark (`aria-hidden`): a square of the item height − 8 (at most 32) on the icon axis in every mode; its child fills it.
117
+
118
+ | Prop | Type | Default | Description |
119
+ |---|---|---|---|
120
+ | `children` | `ReactNode` | — (required) | The mark: `<img>`, `<svg>` or a styled element. |
121
+ | `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other span attributes. |
57
122
 
58
123
  ### Sidebar.Content
59
- `forwardRef` to `<div>`. Scrolls vertically without a visible scrollbar. + native `<div>` props.
124
+ `forwardRef` → `HTMLElement`. The scrolling middle: a `ScrollContainer` with edge fades and no scrollbar; rows scrolled into view stop clear of the fades.
125
+
126
+ | Prop | Type | Default | Description |
127
+ |---|---|---|---|
128
+ | `…rest` | `HTMLAttributes<HTMLElement>` | — | `children` (Groups, Items, Subs), `className` and the other attributes. |
60
129
 
61
130
  ### Sidebar.Group
62
- No ref. `<div role="group">`.
131
+ `ref` → `HTMLDivElement`. `<div role="group">` named by its label. With `collapsible` the heading is a disclosure button (`aria-expanded`, `aria-controls`) with a chevron at its end; the items fold away (inert). On the compact rail the heading keeps its height and layout: its text slides toward the edge, scales down and is cut by the rail with a fade, so the first letters still name the section. An open group keeps its items on the rail; a folded one stays folded and becomes one `…` row (named by the label, `aria-haspopup="dialog"`) whose items open in a flyout, like a sub-list. A folded group with a count that needs attention inside shows its dot (after the heading, or on the `…` row).
63
132
 
64
133
  | Prop | Type | Default | Description |
65
134
  |---|---|---|---|
66
- | `label` | `ReactNode` | — | Group heading (`aria-labelledby`); fades out in compact mode and keeps its space. |
67
-
68
- + native `<div>` props except `role`.
135
+ | `label` | `ReactNode` | — | Group heading (`aria-labelledby`). Keep it to one short word: on the compact rail only its first letters show. |
136
+ | `collapsible` | `boolean` | `false` | The heading shows and hides the items. Needs `label`. |
137
+ | `open` | `boolean` | — | Items shown (controlled). |
138
+ | `onOpenChange` | `(open: boolean) => void` | — | Called with the new open state (click, keyboard, a current page moving inside). |
139
+ | `defaultOpen` | `boolean` | `true` | Initial state (uncontrolled). A closed group opens by itself when the current page moves into it. |
140
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "role">` | — | `children` (Items, Subs), `className` and the other div attributes. |
69
141
 
70
142
  ### Sidebar.Item
71
- `forwardRef` to the rendered element. Renders `<button type="button">`, `<a>` with `href`, or the single child with `asChild`. In compact mode it gets a tooltip on the right with its text.
143
+ `forwardRef` → the rendered element. `<button type="button">`, `<a>` with `href`, or the single child with `asChild`; a tooltip with its label in compact mode. With `Sidebar.ItemAction` the element and the action sit side by side in a row `<div>`.
72
144
 
73
145
  | Prop | Type | Default | Description |
74
146
  |---|---|---|---|
75
- | `icon` | `ReactNode` | — | Leading icon; stays in place in every mode. |
76
- | `badge` | `ReactNode` | — | Counter / status; a dot on the icon in compact mode. |
77
- | `shortcut` | `ReactNode` | — | Key hint (e.g. Kbd); hidden in compact mode. |
78
- | `active` | `boolean` | `false` | Current page: `aria-current="page"`, `data-state="active"`. |
147
+ | `current` | `boolean` | `false` | Current page: `aria-current="page"`, `data-state="active"`; surface fill and a raised shadow (a deeper wash in a flyout). |
79
148
  | `disabled` | `boolean` | `false` | Not interactive: `disabled` / `aria-disabled`, `data-disabled`; a link loses its `href`. |
80
- | `href` | `string` | — | Render an `<a>`. |
81
- | `target` · `rel` | `string` | — | Link attributes with `href`. |
82
- | `asChild` | `boolean` | `false` | Render the single child (e.g. router `NavLink`) as the item; its children become the label. |
83
- | `children` | `ReactNode` | — | Label (also the compact tooltip text). |
149
+ | `href` | `string` | — | Renders an `<a>` (with `target`, `rel`). |
150
+ | `asChild` | `boolean` | `false` | Renders the single child (e.g. a router `NavLink`) as the item; its children are the label and parts. |
151
+ | `children` | `ReactNode` | — | Label (also the compact tooltip) and parts: `Sidebar.ItemIcon` (before the label — leading, after it — trailing), `Sidebar.ItemCount`, `Sidebar.ItemShortcut`, `Sidebar.ItemAction`. |
152
+ | `…rest` | `ButtonHTMLAttributes<HTMLButtonElement>` | — | `onClick`, `aria-*`, `className` and the other attributes. |
84
153
 
85
- + native `<button>` props.
154
+ ### Sidebar.ItemIcon
155
+ `ref` → `HTMLSpanElement`. An icon (`aria-hidden`). Before the label it leads and stays on the icon axis in every mode; after the label it is a quiet trailing glyph (`data-edge="end"`, 14, muted), e.g. ↗ for an external link, hidden in compact mode.
156
+
157
+ | Prop | Type | Default | Description |
158
+ |---|---|---|---|
159
+ | `children` | `ReactNode` | — (required) | The icon, e.g. `<Icon name="nav.home" />`; takes the item tier. |
160
+ | `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other span attributes. |
161
+
162
+ ### Sidebar.ItemCount
163
+ `ref` → `HTMLSpanElement` (the number or the Badge). A count after the label: a plain muted number by default; a `Badge` (one tier down) when `color` or `variant` is set. In compact mode the number leaves the row (still read by screen readers) and a badge leaves a dot of its hue on the icon; a folded sub-list or group shows the dot of a badge inside it.
164
+
165
+ | Prop | Type | Default | Description |
166
+ |---|---|---|---|
167
+ | `children` | `ReactNode` | — (required) | The number (or a short status such as «!»). |
168
+ | `color` | `"gray" \| "blue" \| "green" \| "orange" \| "red" \| "yellow" \| "purple" \| "sky" \| "pink" \| "teal"` | — | Badge hue: the count needs attention. |
169
+ | `variant` | `"solid" \| "soft" \| "outline"` | — | Badge treatment; `soft` once `color` is set. |
170
+ | `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children" \| "color">` | — | `className` and the other attributes of the number or the Badge. |
171
+
172
+ ### Sidebar.ItemShortcut
173
+ `ref` → `HTMLSpanElement`. Key hint at the end (`aria-hidden`); hidden in compact mode.
174
+
175
+ | Prop | Type | Default | Description |
176
+ |---|---|---|---|
177
+ | `children` | `ReactNode` | — (required) | A key hint, e.g. `<Kbd>⌘K</Kbd>`. |
178
+ | `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other span attributes. |
179
+
180
+ ### Sidebar.ItemAction
181
+ `ref` → `HTMLButtonElement`. A row action (create, add): a ghost icon `Button` one tier down with a tooltip, next to the item element — never inside it. It shows on hover and focus of the row while the trail (count, hint) steps aside; hidden on the compact rail.
182
+
183
+ | Prop | Type | Default | Description |
184
+ |---|---|---|---|
185
+ | `label` | `string` | — (required) | Accessible name and tooltip («Создать задачу»). |
186
+ | `onClick` | `(event: MouseEvent<HTMLButtonElement>) => void` | — (required) | The action. |
187
+ | `disabled` | `boolean` | — | Not available. |
188
+ | `children` | `ReactNode` | — | The glyph; `<Icon name="action.add" />` by default. |
189
+ | `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" \| "onClick" \| "aria-label">` | — | `className` and the other attributes of the Button. |
190
+
191
+ ### Sidebar.Sub
192
+ `ref` → `HTMLDivElement`. A parent item with child items: `Sidebar.SubTrigger` + `Sidebar.SubContent` in a `<div>`. Expanded, the children unfold under the parent on a guide line; on the compact rail they open in a flyout (the kit Popover to the right, with the rows and spacing of a kit menu). A current child opens the sub-list and marks the parent as on the active path (`data-active-path`). While folded (and always on the rail) the parent shows the dot of a count inside that needs attention.
193
+
194
+ | Prop | Type | Default | Description |
195
+ |---|---|---|---|
196
+ | `open` | `boolean` | — | Children shown (controlled). |
197
+ | `onOpenChange` | `(open: boolean) => void` | — | Called with the new open state (click, keyboard, a current page moving inside). |
198
+ | `defaultOpen` | `boolean` | `false` | Initial state (uncontrolled). Opens by itself when a child becomes the current page. |
199
+ | `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
200
+
201
+ ### Sidebar.SubTrigger
202
+ `forwardRef` → `HTMLButtonElement`. The parent row: a disclosure `<button>` (`aria-expanded`, `aria-controls`) with a chevron at the end of the row. Expanded: click, `→` / `←` open and close. Compact: hover (after a short intent delay), click, `Enter` · `Space` · `→` open the flyout (`aria-haspopup="dialog"`); on the active path it takes the current lift.
203
+
204
+ | Prop | Type | Default | Description |
205
+ |---|---|---|---|
206
+ | `children` | `ReactNode` | — | Label (it also names the flyout) and parts as in `Sidebar.Item`: `Sidebar.ItemIcon`, `Sidebar.ItemCount`. |
207
+ | `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-expanded" \| "aria-controls">` | — | `onClick` (runs first; `preventDefault()` stops the toggle), `disabled`, `className` and the other button attributes. |
208
+
209
+ ### Sidebar.SubContent
210
+ `ref` → `HTMLDivElement`. `<div role="group">` named by the trigger: the child `Sidebar.Item`s on a faint guide line under the parent icon, labels aligned with the parent label. Height animates; closed content is inert. On the compact rail the same children render in the flyout.
211
+
212
+ | Prop | Type | Default | Description |
213
+ |---|---|---|---|
214
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "role">` | — | `children` (Items), `className` (on the list) and the other div attributes. |
215
+
216
+ ### Sidebar.Account
217
+ `forwardRef` → `HTMLButtonElement`. The signed-in person at the bottom of `Sidebar.Footer`: avatar, name, a muted line and a ↕ chevron. A button, so it is a `Dropdown.Trigger` child; in compact mode only the avatar stays, with the name as a tooltip.
218
+
219
+ | Prop | Type | Default | Description |
220
+ |---|---|---|---|
221
+ | `description` | `ReactNode` | — | Muted second line under the name (email, role). |
222
+ | `children` | `ReactNode` | — | An `Avatar.Root` (sized to the tier by the slot, hidden from screen readers) and the person's name. |
223
+ | `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children">` | — | `onClick`, `aria-*`, `className` and the other button attributes. |
86
224
 
87
225
  ### Sidebar.Toggle
88
- `forwardRef` to `<button>`. Desktop: expanded ↔ compact (hidden → expanded); off-canvas: closes the panel. Label, icon, `aria-expanded` and `aria-controls` come from state and `labels`. + native `<button>` props except `children`, `aria-label`, `aria-expanded`, `aria-controls`.
226
+ `forwardRef` → `HTMLButtonElement`. Toggle: expanded ↔ compact on desktop (hidden → expanded), closes the off-canvas panel; label, icon, `aria-expanded` and `aria-controls` come from state and `labels`.
227
+
228
+ | Prop | Type | Default | Description |
229
+ |---|---|---|---|
230
+ | `variant` | `"item" \| "header"` | `"item"` | `item` — a row in the rail. `header` — an icon button «‹‹» at the end of `Sidebar.Header`; in compact mode the same button moves onto the rail's outer edge, shrinks and turns round, and its chevrons turn to point out. Off-canvas it stays in the header and closes the panel. |
231
+ | `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" \| "aria-label" \| "aria-expanded" \| "aria-controls">` | — | `onClick` (runs first; `preventDefault()` stops the toggle), `className` and the other button attributes. |
89
232
 
90
233
  ### useSidebar()
91
- Must be called inside Sidebar.Root. Returns:
234
+ Hook for custom parts inside `Sidebar.Root` (throws outside). Returns the fields below.
92
235
 
93
- | Field | Type | Description |
94
- |---|---|---|
95
- | `mode` / `setMode` | `SidebarMode` / `(mode) => void` | Desktop mode. |
96
- | `open` / `setOpen` | `boolean` / `(open) => void` | Off-canvas panel. |
97
- | `toggle` | `() => void` | Same action as Sidebar.Toggle. |
98
- | `isMobile` | `boolean` | The sidebar is off-canvas now (responsive and < 768px). |
99
- | `size` | `ControlSize` | Tier from Root. |
100
- | `navId` | `string` | Id of the `<nav>` (for `aria-controls` on your own menu button). |
101
- | `labels` | `SidebarLabels` | Resolved strings. |
236
+ | Prop | Type | Default | Description |
237
+ |---|---|---|---|
238
+ | `mode · setMode` | `SidebarMode · (mode: SidebarMode) => void` | — | Desktop mode. |
239
+ | `open · setOpen` | `boolean · (open: boolean) => void` | — | Off-canvas panel. |
240
+ | `toggle` | `() => void` | — | The action of `Sidebar.Toggle`. |
241
+ | `offCanvas` | `boolean` | — | The sidebar is an off-canvas panel now (`offCanvas="always"`, or `"auto"` under 768px). |
242
+ | `size · navId · labels` | `ControlSize · string · SidebarLabels` | — | Tier, id of the `<nav>` (for `aria-controls` on your own menu button), resolved strings. |
102
243
 
103
244
  ## Variants
104
- The rail sits on `bg-canvas` without a border or card; items are transparent rows with `text-secondary`, `fill-subtle` on hover; the active item is lifted to `bg-surface` + `shadow-raised` with primary text.
245
+ The rail sits on `bg-canvas` without a border or card; items are transparent rows with `text-secondary`, `fill-subtle` on hover; the current item is lifted to `bg-surface` + `shadow-raised` with primary text.
105
246
 
106
247
  ### mode (Root)
107
248
  | Value | Looks like | Use when | Default |
108
249
  |---|---|---|---|
109
250
  | `expanded` | `--prime-layout-sidebar-width` (248) with icons and labels | Default desktop navigation | yes |
110
- | `compact` | `--prime-layout-sidebar-collapsed-width` (56) icon rail; labels fade, tooltips on the right, badges become dots | Users want more content width | |
251
+ | `compact` | `--prime-layout-sidebar-collapsed-width` (56) icon rail; labels fade, tooltips on the right, coloured counts become dots, group headings keep their first letters (whole name in a tooltip), sub-lists and folded groups open as flyouts | Users want more content width | |
111
252
  | `hidden` | Width 0, panel clipped out and inert | Focus / full-screen views | |
112
253
 
113
- Only the rail width animates (`--prime-motion-duration-base`): icons never move, labels fade.
114
-
115
254
  ### size (Root)
116
255
  | Value | Looks like | Use when | Default |
117
256
  |---|---|---|---|
118
- | `xs` | item 28, text 12/16, icon 14, badge xs | Very dense tools | |
119
- | `s` | item 32, text 13/20, icon 16, badge xs | Dense apps | |
120
- | `m` | item 36, text 14/20, icon 16, badge s | Most apps | yes |
121
- | `l` | item 40, text 16/24, icon 20, badge m | Touch-friendly | |
122
- | `xl` | item 48, text 16/24, icon 20, badge m | Large screens | |
257
+ | `xs` | item 28, text 12/16, icon 14, counter xs | Very dense tools | |
258
+ | `s` | item 32, text 13/20, icon 16, counter xs | Dense apps | |
259
+ | `m` | item 36, text 14/20, icon 16, counter s | Most apps | yes |
260
+ | `l` | item 40, text 16/24, icon 20, counter m | Touch-friendly | |
261
+ | `xl` | item 48, text 16/24, icon 20, counter l | Large screens | |
123
262
 
124
263
  The rail width does not depend on `size`.
125
264
 
126
- ### responsive (Root)
265
+ ### variant (Toggle)
266
+ | Value | Looks like | Use when | Default |
267
+ |---|---|---|---|
268
+ | `item` | an item row with a panel icon and the label | a toggle in `Sidebar.Footer` | yes |
269
+ | `header` | a ghost «‹‹» icon button at the end of the header; on the compact rail a small round soft button across the outer edge, chevrons pointing out | a brand header (`Sidebar.Brand`) | |
270
+
271
+ ### ItemCount
272
+ | Value | Looks like | Use when | Default |
273
+ |---|---|---|---|
274
+ | no `color` / `variant` | a plain muted number | quantities (24 tasks) | yes |
275
+ | `color` | a soft Badge of that hue; on the rail and on folded parents a dot of that hue | the count needs attention (red «7») | |
276
+ | `variant` | a Badge of that treatment (gray unless `color`) | a stronger or outlined count | |
277
+
278
+ ### offCanvas
127
279
  | Value | Looks like | Use when | Default |
128
280
  |---|---|---|---|
129
- | `true` | Below 768px: zero-width in layout; opens as a fixed panel over a scrim with `shadow-modal` | Apps used on phones | yes |
130
- | `false` | Always the desktop rail | Previews, embedded frames | |
281
+ | `auto` | a rail; below 768px (viewport) zero-width in layout, opens as a fixed panel over a scrim with `shadow-modal` | apps used on phones | yes |
282
+ | `always` | zero-width in layout at any width; the panel opens over a scrim from a menu button (`open`) | full-screen tools and editors where navigation stays behind a button | |
283
+ | `never` | always a rail, whatever the viewport | a fixed frame, previews, desktop-only tools | |
131
284
 
132
- ### Item flags
285
+ ### Flags
133
286
  | Value | Looks like | Use when | Default |
134
287
  |---|---|---|---|
135
- | `active` | Surface fill + raised shadow, primary text and icon | Current page | `false` |
136
- | `disabled` | `text-disabled`, no hover, `cursor: not-allowed` | Unavailable section | `false` |
137
- | `badge` | Pill on `fill-muted` at the end; accent dot in compact | Counters | — |
138
- | `shortcut` | Key hint at the end; hidden in compact | Keyboard power users | — |
288
+ | `collapsible` (Group) | the heading is a button with a chevron at its end; items fold away; folded on the rail, one `…` row opens them in a flyout | long navigation with sections | off |
289
+ | `current` (Item) | surface fill + raised shadow, primary text and icon | the current page | off |
290
+ | `disabled` (Item) | `text-disabled`, no hover, `cursor: not-allowed` | an unavailable section | off |
139
291
 
140
- **Combinations** — `Sidebar.Toggle` in Footer for collapsible rails; `responsive` + a menu button in `AppShell.Header` with `open` / `onOpenChange` on phones. One `active` item at a time.
292
+ Put `<Sidebar.Toggle variant="header" />` next to `Sidebar.Brand` in the header, or `Sidebar.Toggle` in the footer for a rail without a brand; on phones (`offCanvas="auto"`) or always (`offCanvas="always"`) pair it with a menu button in `AppShell.Header` (`open` / `onOpenChange`). One current item at a time; give every top-level item an icon when the rail can go compact (child items need none).
141
293
 
142
294
  ## States
143
- - Root DOM: `data-size`, `data-mode`, `data-panel-mode` (the last visible mode while hidden), `data-mobile` (off-canvas), `data-state="open" | "closed"` (off-canvas only).
144
- - Item DOM: `data-state="active"`, `aria-current="page"`, `data-disabled`.
145
- - Mode: `mode` / `defaultMode` / `onModeChange`. Off-canvas: `open` / `defaultOpen` / `onOpenChange`; leaving the narrow viewport closes it; navigating from an `href` / `asChild` item closes it.
146
- - The `<nav>` is `inert` while hidden (desktop) or closed (off-canvas).
295
+ | State | Driven by | DOM |
296
+ |---|---|---|
297
+ | mode | `mode` / `defaultMode` | Root `data-mode`, `data-panel-mode` (the last visible mode while hidden); `<nav inert>` while hidden |
298
+ | off-canvas | `offCanvas="always"`, or `"auto"` + viewport < 768px | Root `data-off-canvas`, `data-state="open" \| "closed"`; `<nav inert>` while closed |
299
+ | current | `current` or a router's `aria-current` | Item `aria-current="page"`, `data-state="active"` |
300
+ | active path | a child of a Sub (or an item of a Group) is current | SubTrigger `data-active-path`; a closed Sub / Group opens |
301
+ | group open | Group `open` / `defaultOpen` (`collapsible`) | heading `aria-expanded`; region `data-state`, `inert` while closed |
302
+ | sub open | Sub `open` / `defaultOpen` | SubTrigger `aria-expanded`; SubContent `data-state`, `inert` while closed |
303
+ | flyout | hover / click / keyboard on a SubTrigger, or on the `…` row of a folded group, in compact mode | the row `aria-haspopup="dialog"`, `aria-expanded`; a Popover `role="dialog"` |
304
+ | attention dot | a coloured `Sidebar.ItemCount` inside a folded Sub (always on the rail) or a folded Group | `Badge.Dot` with `data-attention="shown" \| "hidden"` on the parent row / heading / `…` row |
305
+ | persisted | `persistKey` on Root | the mode and the open state of collapsible groups and sub-lists are read from and written to `localStorage` |
306
+ | disabled | `disabled` | Item `disabled` / `aria-disabled`, `data-disabled` |
307
+
308
+ Leaving the narrow viewport closes the off-canvas panel; navigating from an `href` / `asChild` item (or the brand) closes it too. Navigating from a flyout closes the flyout.
147
309
 
148
310
  ## Layout & spacing
149
311
  - Panel padding: `--prime-space-3` block, `--prime-space-2` inline; regions 8 apart; groups 16 apart, items 4 apart.
150
- - Item horizontal padding is derived from the compact width so icons sit in the same place in every mode.
312
+ - Item horizontal padding is derived from the compact width so icons and the brand logo sit on one axis in every mode (the account avatar joins that axis on the rail).
313
+ - Header is one row of the item height + 8. The header toggle (xs, 28) sits at its end, 8 from the rail edge; in compact mode it moves half past the edge, scales to 3/4, turns round and gets a canvas ring. The root clips with `clip-path`, reaching past the edge by the toggle's half-width and ring beside the header only; everywhere else the panel ends exactly at the spacer edge.
314
+ - Collapsible group: heading 28 high with the chevron (14) at its end, aligned with the item trail; items start 4 below. A folded group's attention dot sits before the chevron.
315
+ - On the rail a heading keeps its 28 and its layout: the text slides 8 toward the edge, scales to 0.85 and is cut at the rail box with a 12 fade into the canvas. A folded group adds one `…` row under its heading.
316
+ - Sub-list: a 1px `border-default` guide line on the parent icon's centre; every child branches off it with an 8 elbow and a 6 bend; child labels line up with the parent label.
317
+ - Trail (count, key hint, trailing icon) sits at the row end; a row action (one tier down) appears there on hover / focus and the trail moves aside.
318
+ - Footer: items 4 apart; the account is set 8 apart below them. It is its own card-like row: the
319
+ avatar of the tier (xs 20, s 24, m·l 32, xl 40) sits in an even frame — the inset before it, the
320
+ gap to the text and the air above and below are one value, the tier gap (xs 4, s·m·l 8, xl 12),
321
+ so the row is the avatar + 2 × gap high (48 at m). On the compact rail the start inset becomes the
322
+ one that centres the avatar on the icon axis, as part of the rail motion.
323
+ - Compact flyout: the kit Popover (flush) to the right, aligned with the parent row, with the metrics of a kit menu — rows of the tier's menu item height (32 at m), the panel padding, no title (the row names it), no guide line; current child is a `fill-subtle-active` wash.
324
+ - Motion: two layers on one clock. `Sidebar.Root` is the spacer: it reserves the rail width in the page, paints the canvas and clips the panel to its own box; its width is the only layout that moves (the page column follows). The `<nav>` panel inside is positioned at the expanded width in every mode and never lays out again, so nothing re-wraps and nothing switches at the end. Every part is a plain CSS transition over `base` with the `standard` (ease-in-out) easing, started by the same mode change and ending with the rail: text fades through its fill colour (paint-only, no compositor layer per label), chevrons through their stroke, trailing boxes (a coloured count, a key hint) through `opacity`; coloured counts turn into dots; the account avatar slides onto the icon axis; the header toggle rides the edge by `translate` / `scale`. Rows stay full width: a row with a fill or a ring (current, on the active path, hovered, open, focused) draws them on a pseudo-element whose end edge travels to the icon box and clips its content there, so it always ends rail padding before the moving edge and is a rounded square around the icon at rest. Group headings keep their height and layout: their text slides toward the edge and scales down by transform while the moving cut ends it with a fade; the text box narrows only once the rail has closed (under the cut, never seen), so the dot and the chevron after it stay in place and fade. The `…` row of a folded group grows in and out on the same clock (grid track height), as do the attention dots (opacity and scale). Hidden keeps the look of the last visible mode and is clipped as one piece; the header toggle stays at its place and fades, and coming back from hidden it fades in at its final place. Collapsible groups that open for the rail and sub-lists that close for it move on the same clock (grid track height); chevrons rotate (base). All durations are tokens: under reduced motion every mode change is instant.
325
+ - Layers of a row on the rail (compact tooltips, the sub-list flyout, a `Dropdown` around `Sidebar.Account`) anchor to the visible part of the row — the icon box — not to its full-width box. The brand has no compact tooltip: the logo speaks for itself and a tooltip would cover the edge toggle.
151
326
  - Off-canvas panel width: min(sidebar width, 100% − `--prime-space-12`).
152
- - Inside `AppShell.Nav` the rail takes the full height.
327
+ - Inside `AppShell.Nav` the rail takes the full height. The root is `height: 100%` and the panel is
328
+ positioned inside it, so the rail never hugs its items: outside AppShell give the parent a height
329
+ (a `height: auto` parent collapses the rail to nothing).
153
330
 
154
331
  ## Accessibility
155
- - The panel is a `<nav>` named by `labels.navigation`.
156
- - Items are native buttons / links; focus ring is drawn inside the row (inset). Compact mode shows the label as a tooltip, so icon-only items keep a visible name on hover and focus.
332
+
333
+ ### Keyboard
334
+ | Key | Action |
335
+ |---|---|
336
+ | `Tab` | Moves focus through the items; a disabled or folded one is skipped. |
337
+ | `Enter` · `Space` | Opens the section, presses the item, opens or closes a group or a sub-list; on the compact rail opens the flyout (of a sub-list or a folded group) and focuses the first child. |
338
+ | `ArrowRight` · `ArrowLeft` | On a parent item opens / closes the sub-list; on the compact rail → opens the flyout, ← in it returns focus to the parent. |
339
+ | `ArrowDown` · `ArrowUp` · `Home` · `End` | Move focus between the items of a compact flyout. |
340
+ | `Escape` | Closes the flyout (focus returns to the parent) and the off-canvas panel on a narrow screen. |
341
+
342
+ ### ARIA
343
+ - The panel is a `<nav>` named by `labels.navigation`; groups are `role="group"` named by their label.
344
+ - The current item has `aria-current="page"`; in compact mode the label shows as a tooltip, so icon-only items keep a visible name.
345
+ - A collapsible group heading and a SubTrigger are buttons with `aria-expanded` and `aria-controls`; folded content is `inert`.
346
+ - On the compact rail a SubTrigger and the `…` row of a folded group have `aria-haspopup="dialog"`; the flyout is a non-modal dialog named by the parent (the `…` row by the group label).
347
+ - On the rail a group heading is out of the tab order and hidden from screen readers (the group keeps its name); hovering it shows the whole name in a tooltip.
348
+ - An attention dot is decorative: the count it stands for is read inside.
349
+ - A row action is its own button next to the item (never nested), named by `label` with a tooltip.
350
+ - The account avatar is hidden from screen readers; the name and the muted line name the button.
157
351
  - Off-canvas: scrim, focus trap and Escape; the scrim is a button labelled `labels.close`.
158
352
  - Toggle: `aria-expanded`, `aria-controls` → nav, label from `labels`.
159
- - `labels`:
353
+
354
+ ### Labels
355
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
160
356
 
161
357
  | Key | Default | Used for |
162
358
  |---|---|---|
163
- | `navigation` | `"Навигация"` | `aria-label` of the `<nav>` |
164
- | `collapse` | `"Свернуть панель"` | Toggle label while expanded |
165
- | `expand` | `"Развернуть панель"` | Toggle label while compact or hidden |
166
- | `close` | `"Закрыть навигацию"` | Toggle label off-canvas and the scrim label |
359
+ | `navigation` | `"Навигация"` | `aria-label` of the `<nav>`. |
360
+ | `collapse` | `"Свернуть панель"` | Toggle label while expanded. |
361
+ | `expand` | `"Развернуть панель"` | Toggle label while compact or hidden. |
362
+ | `close` | `"Закрыть навигацию"` | Toggle label off-canvas and the scrim label. |
167
363
 
168
364
  ## Examples
169
- | File | Scenario | When to use this pattern |
170
- |---|---|---|
171
- | [modes.tsx](examples/modes.tsx) | Controlled `mode` expanded · compact · hidden | Collapsible navigation |
172
- | [states.tsx](examples/states.tsx) | Active, badge, shortcut, disabled items in groups | Reference for items |
173
- | [sizes.tsx](examples/sizes.tsx) | `size` xs → xl | Matching the app density |
174
- | [router.tsx](examples/router.tsx) | `asChild` + `NavLink` with router active state | react-router apps |
175
- | [responsive.tsx](examples/responsive.tsx) | Off-canvas panel below 768px driven by a menu button | Phones |
176
-
177
- The full app frame with a Sidebar is in [AppShell with-sidebar.tsx](../app-shell/examples/with-sidebar.tsx).
178
-
179
- ```tsx
180
- import { Sidebar } from "prime-ui-kit";
181
-
182
- export function Example() {
183
- return (
184
- <Sidebar.Root>
185
- <Sidebar.Content>
186
- <Sidebar.Item active>Главная</Sidebar.Item>
187
- <Sidebar.Item badge={3}>Входящие</Sidebar.Item>
188
- </Sidebar.Content>
189
- <Sidebar.Footer>
190
- <Sidebar.Toggle />
191
- </Sidebar.Footer>
192
- </Sidebar.Root>
193
- );
194
- }
195
- ```
365
+ | Example | Shows |
366
+ |---|---|
367
+ | [overview.tsx](examples/overview.tsx) | Everything the app navigation holds: brand and collapse toggle, groups that fold, a nested list, counts, the footer and the account — `Sidebar.Brand`, `Sidebar.Group`, `Sidebar.Sub`, `Sidebar.ItemCount`, `Sidebar.Account`, `Sidebar.Toggle`. |
368
+ | [sizes.tsx](examples/sizes.tsx) | Every size tier: item height, text, icon and counter follow the tier; the rail width stays — `size`. |
369
+ | [structure.tsx](examples/structure.tsx) | Labelled groups and the optional item parts: a plain count, a coloured badge, a key hint, a trailing icon, a row action and a disabled section — `Sidebar.Group`, `Sidebar.ItemCount`, `color`, `Sidebar.ItemShortcut`, `Sidebar.ItemAction`, `disabled`. |
370
+ | [brand-header.tsx](examples/brand-header.tsx) | A brand block with the collapse toggle at the end of the header; in compact mode the logo stays and the toggle moves onto the rail edge — `Sidebar.Brand`, `Sidebar.BrandLogo`, `description`, `variant`. |
371
+ | [collapsible-groups.tsx](examples/collapsible-groups.tsx) | Group headings that fold their items away, with a chevron at the end of the heading; on the compact rail a folded group becomes one row whose items open in a flyout — `collapsible`, `defaultOpen`. |
372
+ | [nested-items.tsx](examples/nested-items.tsx) | A parent item with child items on a guide line: a current child opens it and marks the parent; on the compact rail the children open in a flyout — `Sidebar.Sub`, `Sidebar.SubTrigger`, `Sidebar.SubContent`. |
373
+ | [account.tsx](examples/account.tsx) | Footer items above the signed-in person: avatar, name and email open the account menu; collapse the rail and only the avatar stays, on the icon axis — `Sidebar.Footer`, `Sidebar.Account`, `description`, `Sidebar.Toggle`. |
374
+ | [router.tsx](examples/router.tsx) | A router link as the item: the router sets `aria-current` and the item shows as current; render it inside a router — `asChild`. |
375
+ | [controlled.tsx](examples/controlled.tsx) | The parent owns the rail mode: expanded, an icon rail with tooltips, or hidden; every switch is one synchronous movement — `mode`, `onModeChange`. |
376
+ | [controlled-open.tsx](examples/controlled-open.tsx) | Navigation behind a menu button at any width: the parent opens the off-canvas panel, the scrim, Escape, the header toggle or a navigation closes it — `offCanvas`, `open`, `onOpenChange`. |
196
377
 
197
378
  ## Mistakes
198
- - Items without `icon` in a rail that can go compact → compact shows only icons; give every item an icon.
379
+ - `icon={…}` / `badge={…}` props → use the `Sidebar.ItemIcon` and `Sidebar.ItemCount` parts.
380
+ - A Badge for every count → plain numbers by default; `color` only when the count needs attention.
381
+ - A `<button>` placed inside an item for a row action → use `Sidebar.ItemAction` (it sits beside the item).
382
+ - Hand-made brand markup with its own compact CSS → use `Sidebar.Brand` + `Sidebar.BrandLogo`.
383
+ - A parent that is also a link → a `Sidebar.SubTrigger` only discloses; put the overview page in the children.
384
+ - Items without an icon in a rail that can go compact → compact shows only icons.
199
385
  - Wrapping a router link in `Sidebar.Item` without `asChild` → nested interactive elements; use `asChild`.
200
- - Setting `active` and also relying on router `aria-current` → use one source.
386
+ - Setting `current` and also relying on the router's `aria-current` → use one source.
201
387
  - Placing the Sidebar outside `AppShell.Nav` → it will not take the rail position.
388
+ - Every group `collapsible` and folded by default → people hunt for pages; fold only long or rarely used groups.
389
+ - A sub-list inside a sub-list → one level only; split the section or use tabs on the page.
390
+ - Coloured counts on every item → colour only what needs action; the rest are plain numbers.
391
+ - Long group labels («Управление продажами и клиентами») → on the rail only the first letters show; one short word.
392
+ - Your own `localStorage` code for the rail mode → `persistKey` keeps the mode and the folded groups.
202
393
 
203
394
  ## Related
204
- [AppShell](../app-shell/COMPONENT.md) · [Drawer](../../components/drawer/COMPONENT.md) · [Tooltip](../../components/tooltip/COMPONENT.md) · [Kbd](../../components/kbd/COMPONENT.md)
395
+ - **Built from:** [ScrollContainer](../../components/scroll-container/COMPONENT.md), [Badge](../../components/badge/COMPONENT.md), [Tooltip](../../components/tooltip/COMPONENT.md), [Popover](../../components/popover/COMPONENT.md) (compact flyout), [Button](../../components/button/COMPONENT.md) (header toggle, row action), [Avatar](../../components/avatar/COMPONENT.md) slot, Icon (`nav.sidebarCollapse`, `nav.sidebarExpand`, `nav.chevronsLeft`, `nav.chevronDown`, `nav.chevronsUpDown`, `action.add`)
396
+ - **See also:** [AppShell](../app-shell/COMPONENT.md), [Dropdown](../../components/dropdown/COMPONENT.md) (account menu), [Drawer](../../components/drawer/COMPONENT.md), [Kbd](../../components/kbd/COMPONENT.md)
@@ -0,0 +1,88 @@
1
+ /** Footer items above the signed-in person: avatar, name and email open the account menu; collapse the rail and only the avatar stays, on the icon axis — `Sidebar.Footer`, `Sidebar.Account`, `description`, `Sidebar.Toggle`. */
2
+ import { Avatar, Dropdown, Icon, Sidebar } from "prime-ui-kit";
3
+
4
+ import styles from "./examples.module.css";
5
+
6
+ export default function SidebarAccountExample() {
7
+ return (
8
+ <div className={styles.stage}>
9
+ <Sidebar.Root offCanvas="never">
10
+ <Sidebar.Header>
11
+ <Sidebar.Brand href="#home" description="Отдел продаж">
12
+ <Sidebar.BrandLogo>
13
+ <span className={styles.logo}>
14
+ <Icon name="nav.layoutGrid" />
15
+ </span>
16
+ </Sidebar.BrandLogo>
17
+ Прайм CRM
18
+ </Sidebar.Brand>
19
+ <Sidebar.Toggle variant="header" />
20
+ </Sidebar.Header>
21
+ <Sidebar.Content>
22
+ <Sidebar.Item current>
23
+ <Sidebar.ItemIcon>
24
+ <Icon name="nav.home" />
25
+ </Sidebar.ItemIcon>
26
+ Обзор
27
+ </Sidebar.Item>
28
+ <Sidebar.Item>
29
+ <Sidebar.ItemIcon>
30
+ <Icon name="object.document" />
31
+ </Sidebar.ItemIcon>
32
+ Сделки
33
+ </Sidebar.Item>
34
+ </Sidebar.Content>
35
+ <Sidebar.Footer>
36
+ <Sidebar.Item href="#help" target="_blank" rel="noreferrer">
37
+ <Sidebar.ItemIcon>
38
+ <Icon name="status.info" />
39
+ </Sidebar.ItemIcon>
40
+ Справка
41
+ <Sidebar.ItemIcon>
42
+ <Icon name="action.externalLink" />
43
+ </Sidebar.ItemIcon>
44
+ </Sidebar.Item>
45
+ <Sidebar.Item>
46
+ <Sidebar.ItemIcon>
47
+ <Icon name="action.settings" />
48
+ </Sidebar.ItemIcon>
49
+ Настройки
50
+ </Sidebar.Item>
51
+ <Sidebar.Item>
52
+ <Sidebar.ItemIcon>
53
+ <Icon name="object.users" />
54
+ </Sidebar.ItemIcon>
55
+ Пригласить команду
56
+ </Sidebar.Item>
57
+ <Dropdown.Root>
58
+ <Dropdown.Trigger>
59
+ <Sidebar.Account description="anna@company.ru">
60
+ <Avatar.Root color="purple">
61
+ <Avatar.Fallback>АС</Avatar.Fallback>
62
+ </Avatar.Root>
63
+ Анна Смирнова
64
+ </Sidebar.Account>
65
+ </Dropdown.Trigger>
66
+ <Dropdown.Content side="right" align="end">
67
+ <Dropdown.Item>
68
+ <Dropdown.ItemIcon>
69
+ <Icon name="object.users" />
70
+ </Dropdown.ItemIcon>
71
+ Профиль
72
+ </Dropdown.Item>
73
+ <Dropdown.Item>
74
+ <Dropdown.ItemIcon>
75
+ <Icon name="action.settings" />
76
+ </Dropdown.ItemIcon>
77
+ Настройки аккаунта
78
+ </Dropdown.Item>
79
+ <Dropdown.Separator />
80
+ <Dropdown.Item>Выйти</Dropdown.Item>
81
+ </Dropdown.Content>
82
+ </Dropdown.Root>
83
+ </Sidebar.Footer>
84
+ </Sidebar.Root>
85
+ <div className={styles.content} />
86
+ </div>
87
+ );
88
+ }