prime-ui-kit 0.9.0 → 0.9.2

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 (982) hide show
  1. package/README.md +61 -47
  2. package/dist/chunks/chunk-IQELQNMR.js +379 -0
  3. package/dist/chunks/chunk-LXGRKN34.js +13260 -0
  4. package/dist/chunks/chunk-ZEFCDEEQ.js +3493 -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 +35 -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 +40 -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 +102 -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 +44 -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 +13 -21
  54. package/dist/components/dropdown/Dropdown.d.ts +78 -84
  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 +58 -42
  60. package/dist/components/input/Input.d.ts +35 -37
  61. package/dist/components/kanban/Kanban.d.ts +129 -0
  62. package/dist/components/kbd/Kbd.d.ts +6 -12
  63. package/dist/components/label/Label.d.ts +18 -15
  64. package/dist/components/link-button/LinkButton.d.ts +14 -15
  65. package/dist/components/login-form/LoginForm.d.ts +115 -0
  66. package/dist/components/modal/DialogParts.d.ts +57 -16
  67. package/dist/components/modal/Modal.d.ts +9 -20
  68. package/dist/components/native-select/NativeSelect.d.ts +28 -0
  69. package/dist/components/notification/Notification.d.ts +50 -16
  70. package/dist/components/notification/NotificationStore.d.ts +2 -6
  71. package/dist/components/page-content/PageContent.d.ts +43 -52
  72. package/dist/components/page-toolbar/PageToolbar.d.ts +53 -0
  73. package/dist/components/pagination/Pagination.d.ts +11 -23
  74. package/dist/components/popover/Popover.d.ts +62 -26
  75. package/dist/components/progress-bar/ProgressBar.d.ts +17 -13
  76. package/dist/components/progress-circle/ProgressCircle.d.ts +14 -15
  77. package/dist/components/radio/Radio.d.ts +46 -54
  78. package/dist/components/scroll-container/ScrollContainer.d.ts +10 -13
  79. package/dist/components/segmented-control/SegmentedControl.d.ts +20 -29
  80. package/dist/components/select/Select.d.ts +54 -135
  81. package/dist/components/select/SelectItem.d.ts +68 -0
  82. package/dist/components/select/selectContext.d.ts +61 -0
  83. package/dist/components/skeleton/Skeleton.d.ts +22 -0
  84. package/dist/components/slider/Slider.d.ts +24 -16
  85. package/dist/components/smart-filter/SmartFilter.d.ts +105 -0
  86. package/dist/components/smart-filter/model.d.ts +33 -0
  87. package/dist/components/spinner/Spinner.d.ts +22 -0
  88. package/dist/components/stepper/Stepper.d.ts +32 -42
  89. package/dist/components/switch/Switch.d.ts +19 -37
  90. package/dist/components/tabs/Tabs.d.ts +65 -38
  91. package/dist/components/tag-select/TagOptionMenu.d.ts +29 -0
  92. package/dist/components/tag-select/TagSelect.d.ts +15 -16
  93. package/dist/components/tag-select/useChipOverflow.d.ts +19 -0
  94. package/dist/components/textarea/Textarea.d.ts +16 -31
  95. package/dist/components/thumbnail/Thumbnail.d.ts +41 -0
  96. package/dist/components/timeline/Timeline.d.ts +46 -61
  97. package/dist/components/tooltip/Tooltip.d.ts +21 -17
  98. package/dist/components/typography/Typography.d.ts +5 -21
  99. package/dist/hooks/useControllableState.d.ts +0 -1
  100. package/dist/hooks/useEdgeOverflow.d.ts +12 -0
  101. package/dist/hooks/useEnterConfirm.d.ts +15 -0
  102. package/dist/hooks/useImageStatus.d.ts +19 -0
  103. package/dist/hooks/useInertSiblings.d.ts +9 -0
  104. package/dist/hooks/useMediaQuery.d.ts +7 -0
  105. package/dist/hooks/useMergedRefs.d.ts +6 -2
  106. package/dist/hooks/useModalLayer.d.ts +22 -0
  107. package/dist/hooks/usePosition.d.ts +46 -40
  108. package/dist/hooks/usePresence.d.ts +0 -1
  109. package/dist/hooks/useScrollLock.d.ts +3 -5
  110. package/dist/hooks/useStateSwap.d.ts +8 -0
  111. package/dist/hooks/useSwipeDismiss.d.ts +34 -0
  112. package/dist/icons/Icon.d.ts +24 -7
  113. package/dist/icons/index.d.ts +2 -44
  114. package/dist/icons/registry.d.ts +85 -0
  115. package/dist/index.css +7053 -6846
  116. package/dist/index.d.ts +0 -1
  117. package/dist/index.js +106 -13830
  118. package/dist/internal/AnchorRectContext.d.ts +12 -0
  119. package/dist/internal/ChoiceField.d.ts +34 -0
  120. package/dist/internal/ControlSizeContext.d.ts +6 -2
  121. package/dist/internal/FieldFrame.d.ts +47 -8
  122. package/dist/internal/HighlightMatch.d.ts +13 -0
  123. package/dist/internal/MenuGroup.d.ts +8 -0
  124. package/dist/internal/Portal.d.ts +0 -1
  125. package/dist/internal/VisuallyHidden.d.ts +11 -0
  126. package/dist/internal/context.d.ts +0 -1
  127. package/dist/internal/cx.d.ts +0 -1
  128. package/dist/internal/data-attributes.d.ts +0 -1
  129. package/dist/internal/fieldClasses.d.ts +9 -0
  130. package/dist/internal/formatLabel.d.ts +6 -0
  131. package/dist/internal/highlightTsxHtml.d.ts +1 -2
  132. package/dist/internal/iconBox.d.ts +9 -0
  133. package/dist/internal/iconLayout.d.ts +15 -0
  134. package/dist/internal/imageSlot.d.ts +29 -0
  135. package/dist/internal/layoutPxFromPrimitives.d.ts +2 -3
  136. package/dist/internal/listbox.d.ts +40 -0
  137. package/dist/internal/mergeRefs.d.ts +4 -2
  138. package/dist/internal/overlay/FloatingPanel.d.ts +36 -0
  139. package/dist/internal/overlay/focus.d.ts +14 -0
  140. package/dist/internal/overlay/layerStack.d.ts +41 -0
  141. package/dist/internal/overlay/useFloatingLayer.d.ts +70 -0
  142. package/dist/internal/polymorphic.d.ts +9 -0
  143. package/dist/internal/progressSegments.d.ts +63 -0
  144. package/dist/internal/rovingFocus.d.ts +18 -0
  145. package/dist/internal/scrollAncestors.d.ts +1 -2
  146. package/dist/internal/slot.d.ts +11 -5
  147. package/dist/internal/states.d.ts +3 -2
  148. package/dist/internal/swatch.d.ts +56 -0
  149. package/dist/internal/touchTarget.d.ts +4 -0
  150. package/dist/layout/app-header/AppHeader.d.ts +110 -0
  151. package/dist/layout/app-shell/AppShell.d.ts +47 -22
  152. package/dist/layout/bottom-nav/BottomNav.d.ts +80 -0
  153. package/dist/layout/index.d.ts +6 -3
  154. package/dist/layout/sidebar/Sidebar.d.ts +206 -35
  155. package/dist/theme/applyTheme.d.ts +0 -1
  156. package/dist/tokens/naming.d.ts +6 -0
  157. package/dist/tokens/primitives.d.ts +26 -80
  158. package/dist/tokens/semantic.d.ts +122 -25
  159. package/dist/tokens/themes/dark.d.ts +7 -1
  160. package/package.json +30 -24
  161. package/src/components/accordion/COMPONENT.md +91 -101
  162. package/src/components/accordion/examples/collapsible.tsx +27 -0
  163. package/src/components/accordion/examples/controlled.tsx +36 -0
  164. package/src/components/accordion/examples/examples.module.css +6 -39
  165. package/src/components/accordion/examples/multiple.tsx +31 -0
  166. package/src/components/accordion/examples/overview.tsx +39 -0
  167. package/src/components/accordion/examples/sizes.tsx +14 -25
  168. package/src/components/accordion/examples/states.tsx +23 -48
  169. package/src/components/accordion/examples/variants.tsx +35 -0
  170. package/src/components/accordion/examples/with-icon.tsx +47 -0
  171. package/src/components/avatar/COMPONENT.md +88 -153
  172. package/src/components/avatar/examples/examples.module.css +6 -44
  173. package/src/components/avatar/examples/overview.tsx +18 -0
  174. package/src/components/avatar/examples/presence.tsx +20 -17
  175. package/src/components/avatar/examples/sizes.tsx +8 -10
  176. package/src/components/avatar/examples/src-from-state.tsx +4 -5
  177. package/src/components/avatar/examples/states.tsx +17 -27
  178. package/src/components/avatar/examples/team-group.tsx +21 -0
  179. package/src/components/avatar/examples/variants.tsx +40 -0
  180. package/src/components/badge/COMPONENT.md +113 -122
  181. package/src/components/{tag → badge}/examples/applied-filters.tsx +10 -11
  182. package/src/components/badge/examples/examples.module.css +14 -59
  183. package/src/components/badge/examples/filter-values.tsx +39 -0
  184. package/src/components/badge/examples/in-controls.tsx +14 -26
  185. package/src/components/badge/examples/overview.tsx +13 -0
  186. package/src/components/badge/examples/sizes.tsx +8 -10
  187. package/src/components/badge/examples/states.tsx +35 -29
  188. package/src/components/badge/examples/variants.tsx +27 -36
  189. package/src/components/badge/examples/with-icon.tsx +50 -0
  190. package/src/components/banner/COMPONENT.md +89 -94
  191. package/src/components/banner/examples/dismissible.tsx +38 -0
  192. package/src/components/banner/examples/examples.module.css +6 -22
  193. package/src/components/banner/examples/narrow.tsx +23 -0
  194. package/src/components/banner/examples/overview.tsx +18 -0
  195. package/src/components/banner/examples/page-strip.tsx +53 -0
  196. package/src/components/banner/examples/sizes.tsx +22 -21
  197. package/src/components/banner/examples/structure.tsx +45 -0
  198. package/src/components/banner/examples/variants.tsx +28 -55
  199. package/src/components/breadcrumb/COMPONENT.md +55 -59
  200. package/src/components/breadcrumb/examples/ellipsis.tsx +12 -0
  201. package/src/components/breadcrumb/examples/examples.module.css +3 -52
  202. package/src/components/breadcrumb/examples/overflow.tsx +26 -0
  203. package/src/components/breadcrumb/examples/overview.tsx +12 -0
  204. package/src/components/breadcrumb/examples/sizes.tsx +11 -14
  205. package/src/components/breadcrumb/examples/with-icon.tsx +14 -0
  206. package/src/components/button/COMPONENT.md +65 -66
  207. package/src/components/button/examples/as-child.tsx +8 -32
  208. package/src/components/button/examples/examples.module.css +18 -76
  209. package/src/components/button/examples/in-form.tsx +20 -14
  210. package/src/components/button/examples/on-colored-host.tsx +29 -0
  211. package/src/components/button/examples/overview.tsx +13 -0
  212. package/src/components/button/examples/sizes.tsx +7 -9
  213. package/src/components/button/examples/states.tsx +18 -28
  214. package/src/components/button/examples/variants.tsx +31 -0
  215. package/src/components/button/examples/with-icon.tsx +35 -23
  216. package/src/components/button-group/COMPONENT.md +64 -55
  217. package/src/components/button-group/examples/controlled.tsx +3 -3
  218. package/src/components/button-group/examples/examples.module.css +4 -39
  219. package/src/components/button-group/examples/full-width.tsx +10 -14
  220. package/src/components/button-group/examples/in-form.tsx +3 -3
  221. package/src/components/button-group/examples/orientation.tsx +6 -8
  222. package/src/components/button-group/examples/overview.tsx +12 -0
  223. package/src/components/button-group/examples/sizes.tsx +8 -10
  224. package/src/components/button-group/examples/states.tsx +28 -7
  225. package/src/components/button-group/examples/with-icon.tsx +45 -0
  226. package/src/components/card/COMPONENT.md +99 -298
  227. package/src/components/card/examples/{content.tsx → content-templates.tsx} +23 -29
  228. package/src/components/card/examples/examples.module.css +0 -8
  229. package/src/components/card/examples/flat.tsx +9 -14
  230. package/src/components/card/examples/kpi-media.tsx +42 -0
  231. package/src/components/card/examples/narrow.tsx +47 -0
  232. package/src/components/card/examples/{settings.tsx → overview.tsx} +7 -8
  233. package/src/components/card/examples/panel-chart.tsx +26 -34
  234. package/src/components/card/examples/{metrics.tsx → variants.tsx} +12 -18
  235. package/src/components/checkbox/COMPONENT.md +92 -96
  236. package/src/components/checkbox/examples/controlled.tsx +41 -0
  237. package/src/components/checkbox/examples/examples.module.css +47 -43
  238. package/src/components/checkbox/examples/in-form.tsx +34 -0
  239. package/src/components/checkbox/examples/indicator.tsx +54 -0
  240. package/src/components/checkbox/examples/overview.tsx +10 -0
  241. package/src/components/checkbox/examples/sizes.tsx +5 -10
  242. package/src/components/checkbox/examples/states.tsx +42 -23
  243. package/src/components/checkbox/examples/without-label.tsx +3 -7
  244. package/src/components/code-block/COMPONENT.md +55 -57
  245. package/src/components/code-block/examples/color-scheme.tsx +4 -15
  246. package/src/components/code-block/examples/examples.module.css +9 -40
  247. package/src/components/code-block/examples/{long-lines.tsx → narrow.tsx} +3 -4
  248. package/src/components/code-block/examples/overview.tsx +19 -0
  249. package/src/components/code-block/examples/variants.tsx +12 -21
  250. package/src/components/color-picker/COMPONENT.md +196 -165
  251. package/src/components/color-picker/examples/controlled.tsx +37 -0
  252. package/src/components/color-picker/examples/examples.module.css +19 -88
  253. package/src/components/color-picker/examples/formats.tsx +13 -18
  254. package/src/components/color-picker/examples/in-form.tsx +44 -0
  255. package/src/components/color-picker/examples/overview.tsx +37 -0
  256. package/src/components/color-picker/examples/panel.tsx +12 -13
  257. package/src/components/color-picker/examples/presets-sizes.tsx +15 -20
  258. package/src/components/color-picker/examples/presets.tsx +33 -0
  259. package/src/components/color-picker/examples/sizes.tsx +26 -0
  260. package/src/components/color-picker/examples/states.tsx +4 -14
  261. package/src/components/color-picker/examples/validation.tsx +18 -0
  262. package/src/components/color-swatches/COMPONENT.md +145 -0
  263. package/src/components/color-swatches/examples/controlled.tsx +22 -0
  264. package/src/components/color-swatches/examples/examples.module.css +19 -0
  265. package/src/components/color-swatches/examples/in-form.tsx +35 -0
  266. package/src/components/color-swatches/examples/overview.tsx +6 -0
  267. package/src/components/color-swatches/examples/sizes.tsx +19 -0
  268. package/src/components/color-swatches/examples/states.tsx +20 -0
  269. package/src/components/color-swatches/examples/wrapping.tsx +12 -0
  270. package/src/components/command-menu/COMPONENT.md +117 -180
  271. package/src/components/command-menu/examples/controlled-open.tsx +29 -0
  272. package/src/components/command-menu/examples/controlled.tsx +19 -26
  273. package/src/components/command-menu/examples/dismiss.tsx +39 -0
  274. package/src/components/command-menu/examples/overview.tsx +61 -0
  275. package/src/components/command-menu/examples/sizes.tsx +30 -51
  276. package/src/components/command-menu/examples/states.tsx +6 -16
  277. package/src/components/command-menu/examples/structure.tsx +54 -0
  278. package/src/components/crossfade/COMPONENT.md +104 -0
  279. package/src/components/crossfade/examples/examples.module.css +65 -0
  280. package/src/components/crossfade/examples/overview.tsx +102 -0
  281. package/src/components/crossfade/examples/record-switch.tsx +67 -0
  282. package/src/components/data-table/COMPONENT.md +181 -182
  283. package/src/components/data-table/examples/appearance.tsx +31 -34
  284. package/src/components/data-table/examples/columns-visibility.tsx +167 -0
  285. package/src/components/data-table/examples/content-width.tsx +46 -26
  286. package/src/components/data-table/examples/controlled.tsx +56 -0
  287. package/src/components/data-table/examples/detail-panel.tsx +23 -28
  288. package/src/components/data-table/examples/examples.module.css +20 -91
  289. package/src/components/data-table/examples/infinite-scroll.tsx +17 -18
  290. package/src/components/data-table/examples/narrow.tsx +28 -38
  291. package/src/components/data-table/examples/nested-rows.tsx +32 -54
  292. package/src/components/data-table/examples/numeric.tsx +10 -19
  293. package/src/components/data-table/examples/overview.tsx +54 -0
  294. package/src/components/data-table/examples/selection.tsx +11 -15
  295. package/src/components/data-table/examples/sizes.tsx +22 -33
  296. package/src/components/data-table/examples/states.tsx +23 -24
  297. package/src/components/data-table/examples/sticky.tsx +17 -24
  298. package/src/components/data-table/examples/toolbar.tsx +21 -23
  299. package/src/components/datepicker/COMPONENT.md +152 -164
  300. package/src/components/datepicker/examples/controlled-open.tsx +32 -0
  301. package/src/components/datepicker/examples/controlled.tsx +39 -0
  302. package/src/components/datepicker/examples/examples.module.css +9 -23
  303. package/src/components/datepicker/examples/in-form.tsx +32 -45
  304. package/src/components/datepicker/examples/inline-panel.tsx +3 -3
  305. package/src/components/datepicker/examples/narrow.tsx +1 -1
  306. package/src/components/datepicker/examples/overview.tsx +6 -0
  307. package/src/components/datepicker/examples/range-presets.tsx +6 -5
  308. package/src/components/datepicker/examples/sizes.tsx +7 -10
  309. package/src/components/datepicker/examples/states.tsx +9 -30
  310. package/src/components/datepicker/examples/validation.tsx +26 -0
  311. package/src/components/datepicker/examples/yearless.tsx +9 -8
  312. package/src/components/digit-input/COMPONENT.md +96 -58
  313. package/src/components/digit-input/examples/controlled.tsx +6 -15
  314. package/src/components/digit-input/examples/examples.module.css +13 -38
  315. package/src/components/digit-input/examples/full-width.tsx +13 -0
  316. package/src/components/digit-input/examples/grouped.tsx +11 -0
  317. package/src/components/digit-input/examples/in-form.tsx +32 -0
  318. package/src/components/digit-input/examples/on-complete.tsx +20 -0
  319. package/src/components/digit-input/examples/overview.tsx +6 -0
  320. package/src/components/digit-input/examples/sizes.tsx +5 -17
  321. package/src/components/digit-input/examples/states.tsx +6 -50
  322. package/src/components/digit-input/examples/validation.tsx +17 -0
  323. package/src/components/divider/COMPONENT.md +62 -53
  324. package/src/components/divider/examples/align.tsx +14 -0
  325. package/src/components/divider/examples/examples.module.css +6 -20
  326. package/src/components/divider/examples/or-separator.tsx +19 -0
  327. package/src/components/divider/examples/overview.tsx +30 -0
  328. package/src/components/divider/examples/sizes.tsx +11 -10
  329. package/src/components/divider/examples/vertical.tsx +21 -0
  330. package/src/components/divider/examples/with-icon.tsx +26 -0
  331. package/src/components/dnd/COMPONENT.md +197 -0
  332. package/src/components/dnd/examples/board.tsx +83 -0
  333. package/src/components/dnd/examples/drop-zones.tsx +82 -0
  334. package/src/components/dnd/examples/examples.module.css +89 -0
  335. package/src/components/dnd/examples/handle.tsx +53 -0
  336. package/src/components/dnd/examples/narrow.tsx +42 -0
  337. package/src/components/dnd/examples/overview.tsx +45 -0
  338. package/src/components/drawer/COMPONENT.md +114 -105
  339. package/src/components/drawer/examples/controlled-open.tsx +33 -0
  340. package/src/components/drawer/examples/date-sheet.tsx +41 -0
  341. package/src/components/drawer/examples/dismiss.tsx +55 -0
  342. package/src/components/drawer/examples/examples.module.css +8 -24
  343. package/src/components/drawer/examples/in-form.tsx +82 -0
  344. package/src/components/drawer/examples/long-content.tsx +40 -0
  345. package/src/components/drawer/examples/overview.tsx +48 -0
  346. package/src/components/drawer/examples/{variants-sides.tsx → placement.tsx} +13 -14
  347. package/src/components/drawer/examples/sizes.tsx +9 -15
  348. package/src/components/drawer/examples/structure.tsx +35 -0
  349. package/src/components/dropdown/COMPONENT.md +119 -148
  350. package/src/components/dropdown/examples/checkbox-items.tsx +48 -0
  351. package/src/components/dropdown/examples/controlled-open.tsx +32 -0
  352. package/src/components/dropdown/examples/dismiss.tsx +17 -0
  353. package/src/components/dropdown/examples/examples.module.css +11 -45
  354. package/src/components/dropdown/examples/long-list.tsx +42 -0
  355. package/src/components/dropdown/examples/{full-width.tsx → match-trigger-width.tsx} +5 -4
  356. package/src/components/dropdown/examples/overview.tsx +41 -0
  357. package/src/components/dropdown/examples/placement.tsx +16 -13
  358. package/src/components/dropdown/examples/sizes.tsx +18 -15
  359. package/src/components/dropdown/examples/states.tsx +21 -29
  360. package/src/components/dropdown/examples/structure.tsx +56 -0
  361. package/src/components/empty-page/COMPONENT.md +72 -76
  362. package/src/components/empty-page/examples/compact.tsx +23 -0
  363. package/src/components/empty-page/examples/data-region.tsx +8 -11
  364. package/src/components/empty-page/examples/examples.module.css +22 -25
  365. package/src/components/empty-page/examples/icon-tones.tsx +5 -6
  366. package/src/components/empty-page/examples/narrow.tsx +26 -0
  367. package/src/components/empty-page/examples/{no-results.tsx → overview.tsx} +4 -5
  368. package/src/components/empty-page/examples/sizes.tsx +14 -20
  369. package/src/components/example-frame/COMPONENT.md +64 -66
  370. package/src/components/example-frame/examples/controlled.tsx +42 -0
  371. package/src/components/example-frame/examples/overview.tsx +16 -0
  372. package/src/components/file-upload/COMPONENT.md +128 -186
  373. package/src/components/file-upload/examples/avatar-upload.tsx +7 -12
  374. package/src/components/file-upload/examples/custom-body.tsx +44 -0
  375. package/src/components/file-upload/examples/examples.module.css +46 -64
  376. package/src/components/file-upload/examples/in-form.tsx +76 -0
  377. package/src/components/file-upload/examples/narrow.tsx +17 -0
  378. package/src/components/file-upload/examples/overview.tsx +52 -0
  379. package/src/components/file-upload/examples/sizes.tsx +16 -37
  380. package/src/components/file-upload/examples/states.tsx +6 -98
  381. package/src/components/file-upload/examples/upload-progress.tsx +39 -0
  382. package/src/components/file-upload/examples/validation.tsx +19 -0
  383. package/src/components/file-upload/examples/variants.tsx +5 -18
  384. package/src/components/hint/COMPONENT.md +42 -48
  385. package/src/components/hint/examples/examples.module.css +3 -45
  386. package/src/components/hint/examples/hint-or-error.tsx +5 -5
  387. package/src/components/hint/examples/overview.tsx +34 -0
  388. package/src/components/hint/examples/sizes.tsx +8 -10
  389. package/src/components/hint/examples/states.tsx +21 -14
  390. package/src/components/hint/examples/with-icon.tsx +31 -0
  391. package/src/components/input/COMPONENT.md +70 -88
  392. package/src/components/input/examples/affixes.tsx +22 -0
  393. package/src/components/input/examples/controlled.tsx +9 -10
  394. package/src/components/input/examples/examples.module.css +3 -116
  395. package/src/components/input/examples/in-form.tsx +35 -14
  396. package/src/components/input/examples/overview.tsx +12 -0
  397. package/src/components/input/examples/sizes.tsx +6 -11
  398. package/src/components/input/examples/states.tsx +6 -23
  399. package/src/components/input/examples/validation.tsx +35 -0
  400. package/src/components/input/examples/with-icon.tsx +25 -0
  401. package/src/components/input/examples/{search-without-focus-ring.tsx → without-focus-ring.tsx} +5 -5
  402. package/src/components/kanban/COMPONENT.md +181 -0
  403. package/src/components/kanban/examples/controlled.tsx +78 -0
  404. package/src/components/kanban/examples/examples.module.css +31 -0
  405. package/src/components/kanban/examples/limits.tsx +58 -0
  406. package/src/components/kanban/examples/narrow.tsx +76 -0
  407. package/src/components/kanban/examples/overview.tsx +130 -0
  408. package/src/components/kanban/examples/states.tsx +75 -0
  409. package/src/components/kanban/examples/structure.tsx +76 -0
  410. package/src/components/kbd/COMPONENT.md +50 -65
  411. package/src/components/kbd/examples/examples.module.css +11 -41
  412. package/src/components/kbd/examples/in-controls.tsx +25 -31
  413. package/src/components/kbd/examples/overview.tsx +24 -0
  414. package/src/components/kbd/examples/shortcut-list.tsx +12 -12
  415. package/src/components/kbd/examples/sizes.tsx +8 -13
  416. package/src/components/label/COMPONENT.md +45 -44
  417. package/src/components/label/examples/examples.module.css +8 -29
  418. package/src/components/label/examples/overview.tsx +17 -0
  419. package/src/components/label/examples/sizes.tsx +9 -13
  420. package/src/components/label/examples/states.tsx +17 -14
  421. package/src/components/label/examples/structure.tsx +32 -0
  422. package/src/components/label/examples/with-icon.tsx +25 -17
  423. package/src/components/link-button/COMPONENT.md +56 -39
  424. package/src/components/link-button/examples/as-child.tsx +18 -0
  425. package/src/components/link-button/examples/external-link.tsx +6 -6
  426. package/src/components/link-button/examples/overview.tsx +11 -0
  427. package/src/components/link-button/examples/sizes.tsx +9 -11
  428. package/src/components/link-button/examples/states.tsx +25 -12
  429. package/src/components/link-button/examples/variants.tsx +21 -0
  430. package/src/components/link-button/examples/with-icon.tsx +21 -13
  431. package/src/components/login-form/COMPONENT.md +162 -0
  432. package/src/components/login-form/examples/examples.module.css +39 -0
  433. package/src/components/login-form/examples/forgot-password.tsx +39 -0
  434. package/src/components/login-form/examples/narrow.tsx +32 -0
  435. package/src/components/login-form/examples/overview.tsx +58 -0
  436. package/src/components/login-form/examples/register.tsx +85 -0
  437. package/src/components/login-form/examples/reset-password.tsx +60 -0
  438. package/src/components/login-form/examples/sizes.tsx +38 -0
  439. package/src/components/login-form/examples/states.tsx +75 -0
  440. package/src/components/login-form/examples/structure.tsx +28 -0
  441. package/src/components/login-form/examples/verification-code.tsx +57 -0
  442. package/src/components/modal/COMPONENT.md +71 -88
  443. package/src/components/modal/examples/{controlled.tsx → controlled-open.tsx} +6 -12
  444. package/src/components/modal/examples/custom-container.tsx +29 -0
  445. package/src/components/modal/examples/dismiss.tsx +54 -0
  446. package/src/components/modal/examples/examples.module.css +4 -20
  447. package/src/components/modal/examples/in-form.tsx +78 -0
  448. package/src/components/modal/examples/long-content.tsx +52 -0
  449. package/src/components/modal/examples/overview.tsx +35 -0
  450. package/src/components/modal/examples/sizes.tsx +7 -9
  451. package/src/components/modal/examples/structure.tsx +53 -0
  452. package/src/components/native-select/COMPONENT.md +132 -0
  453. package/src/components/native-select/examples/controlled.tsx +26 -0
  454. package/src/components/native-select/examples/examples.module.css +14 -0
  455. package/src/components/native-select/examples/in-form.tsx +43 -0
  456. package/src/components/native-select/examples/option-groups.tsx +17 -0
  457. package/src/components/native-select/examples/overview.tsx +16 -0
  458. package/src/components/native-select/examples/sizes.tsx +18 -0
  459. package/src/components/native-select/examples/states.tsx +21 -0
  460. package/src/components/native-select/examples/validation.tsx +26 -0
  461. package/src/components/notification/COMPONENT.md +108 -122
  462. package/src/components/notification/examples/dismiss.tsx +50 -0
  463. package/src/components/notification/examples/examples.module.css +10 -23
  464. package/src/components/notification/examples/in-form.tsx +64 -0
  465. package/src/components/notification/examples/overview.tsx +24 -0
  466. package/src/components/notification/examples/placement.tsx +66 -0
  467. package/src/components/notification/examples/sizes.tsx +11 -18
  468. package/src/components/notification/examples/stacking.tsx +45 -0
  469. package/src/components/notification/examples/structure.tsx +20 -0
  470. package/src/components/notification/examples/tones.tsx +14 -26
  471. package/src/components/page-content/COMPONENT.md +50 -75
  472. package/src/components/page-content/examples/examples.module.css +4 -8
  473. package/src/components/page-content/examples/narrow.tsx +25 -0
  474. package/src/components/page-content/examples/overview.tsx +41 -0
  475. package/src/components/page-content/examples/variants.tsx +39 -0
  476. package/src/components/page-toolbar/COMPONENT.md +142 -0
  477. package/src/components/page-toolbar/examples/examples.module.css +16 -0
  478. package/src/components/page-toolbar/examples/narrow.tsx +103 -0
  479. package/src/components/page-toolbar/examples/overview.tsx +113 -0
  480. package/src/components/page-toolbar/examples/save-changes.tsx +40 -0
  481. package/src/components/page-toolbar/examples/without-search.tsx +60 -0
  482. package/src/components/pagination/COMPONENT.md +73 -64
  483. package/src/components/pagination/examples/controlled.tsx +51 -0
  484. package/src/components/pagination/examples/examples.module.css +6 -55
  485. package/src/components/pagination/examples/narrow.tsx +25 -0
  486. package/src/components/pagination/examples/overflow.tsx +23 -0
  487. package/src/components/pagination/examples/overview.tsx +6 -0
  488. package/src/components/pagination/examples/sizes.tsx +10 -18
  489. package/src/components/popover/COMPONENT.md +89 -99
  490. package/src/components/popover/examples/controlled-open.tsx +32 -0
  491. package/src/components/popover/examples/dismiss.tsx +49 -0
  492. package/src/components/popover/examples/examples.module.css +21 -41
  493. package/src/components/popover/examples/flush.tsx +47 -0
  494. package/src/components/popover/examples/in-form.tsx +54 -0
  495. package/src/components/popover/examples/{full-width.tsx → match-trigger-width.tsx} +7 -7
  496. package/src/components/popover/examples/overview.tsx +43 -0
  497. package/src/components/popover/examples/placement.tsx +17 -15
  498. package/src/components/popover/examples/sizes.tsx +12 -9
  499. package/src/components/popover/examples/structure.tsx +50 -0
  500. package/src/components/progress-bar/COMPONENT.md +103 -62
  501. package/src/components/progress-bar/examples/custom-max.tsx +12 -0
  502. package/src/components/progress-bar/examples/examples.module.css +4 -34
  503. package/src/components/progress-bar/examples/overview.tsx +12 -0
  504. package/src/components/progress-bar/examples/segments.tsx +32 -0
  505. package/src/components/progress-bar/examples/sizes.tsx +11 -8
  506. package/src/components/progress-bar/examples/variants.tsx +34 -0
  507. package/src/components/progress-circle/COMPONENT.md +102 -61
  508. package/src/components/progress-circle/examples/examples.module.css +2 -39
  509. package/src/components/progress-circle/examples/inner-content.tsx +35 -0
  510. package/src/components/progress-circle/examples/overview.tsx +10 -0
  511. package/src/components/progress-circle/examples/segments.tsx +64 -0
  512. package/src/components/progress-circle/examples/sizes.tsx +10 -12
  513. package/src/components/progress-circle/examples/variants.tsx +28 -0
  514. package/src/components/radio/COMPONENT.md +93 -114
  515. package/src/components/radio/examples/controlled.tsx +30 -0
  516. package/src/components/radio/examples/group.tsx +23 -0
  517. package/src/components/radio/examples/orientation.tsx +34 -0
  518. package/src/components/radio/examples/overview.tsx +18 -0
  519. package/src/components/radio/examples/sizes.tsx +7 -12
  520. package/src/components/radio/examples/states.tsx +42 -30
  521. package/src/components/scroll-container/COMPONENT.md +57 -29
  522. package/src/components/scroll-container/examples/edge-fade.tsx +53 -0
  523. package/src/components/scroll-container/examples/examples.module.css +7 -7
  524. package/src/components/scroll-container/examples/overscroll.tsx +27 -0
  525. package/src/components/scroll-container/examples/overview.tsx +27 -0
  526. package/src/components/scroll-container/examples/variants.tsx +54 -0
  527. package/src/components/segmented-control/COMPONENT.md +93 -107
  528. package/src/components/segmented-control/examples/colors.tsx +8 -13
  529. package/src/components/segmented-control/examples/controlled.tsx +10 -6
  530. package/src/components/segmented-control/examples/examples.module.css +2 -88
  531. package/src/components/segmented-control/examples/full-width.tsx +7 -44
  532. package/src/components/segmented-control/examples/overview.tsx +12 -0
  533. package/src/components/segmented-control/examples/scroll.tsx +16 -0
  534. package/src/components/segmented-control/examples/sizes.tsx +8 -20
  535. package/src/components/segmented-control/examples/states.tsx +28 -34
  536. package/src/components/segmented-control/examples/two-line.tsx +17 -104
  537. package/src/components/segmented-control/examples/with-icon.tsx +52 -0
  538. package/src/components/select/COMPONENT.md +155 -208
  539. package/src/components/select/examples/clearable.tsx +23 -0
  540. package/src/components/select/examples/controlled-open.tsx +30 -0
  541. package/src/components/select/examples/controlled.tsx +17 -10
  542. package/src/components/select/examples/examples.module.css +18 -38
  543. package/src/components/select/examples/in-form.tsx +59 -70
  544. package/src/components/select/examples/multiple.tsx +21 -33
  545. package/src/components/select/examples/overview.tsx +17 -0
  546. package/src/components/select/examples/rich-options.tsx +43 -69
  547. package/src/components/select/examples/searchable.tsx +42 -0
  548. package/src/components/select/examples/sizes.tsx +13 -17
  549. package/src/components/select/examples/states.tsx +34 -48
  550. package/src/components/select/examples/validation.tsx +41 -0
  551. package/src/components/select/examples/with-icon.tsx +35 -0
  552. package/src/components/skeleton/COMPONENT.md +104 -0
  553. package/src/components/skeleton/examples/examples.module.css +89 -0
  554. package/src/components/skeleton/examples/form.tsx +20 -0
  555. package/src/components/skeleton/examples/overview.tsx +21 -0
  556. package/src/components/skeleton/examples/sizes.tsx +24 -0
  557. package/src/components/skeleton/examples/with-crossfade.tsx +68 -0
  558. package/src/components/slider/COMPONENT.md +105 -68
  559. package/src/components/slider/examples/controlled.tsx +26 -30
  560. package/src/components/slider/examples/examples.module.css +8 -32
  561. package/src/components/slider/examples/hint-and-error.tsx +33 -0
  562. package/src/components/slider/examples/overview.tsx +6 -0
  563. package/src/components/slider/examples/range-step.tsx +7 -17
  564. package/src/components/slider/examples/sizes.tsx +8 -6
  565. package/src/components/slider/examples/states.tsx +11 -8
  566. package/src/components/slider/examples/value-format.tsx +13 -25
  567. package/src/components/slider/examples/variants.tsx +23 -0
  568. package/src/components/smart-filter/COMPONENT.md +184 -0
  569. package/src/components/smart-filter/examples/controlled.tsx +48 -0
  570. package/src/components/smart-filter/examples/examples.module.css +56 -0
  571. package/src/components/smart-filter/examples/many-values.tsx +53 -0
  572. package/src/components/smart-filter/examples/narrow.tsx +38 -0
  573. package/src/components/smart-filter/examples/overview.tsx +109 -0
  574. package/src/components/smart-filter/examples/sizes.tsx +33 -0
  575. package/src/components/spinner/COMPONENT.md +112 -0
  576. package/src/components/spinner/examples/examples.module.css +20 -0
  577. package/src/components/spinner/examples/loading-region.tsx +22 -0
  578. package/src/components/spinner/examples/overview.tsx +15 -0
  579. package/src/components/spinner/examples/sizes.tsx +19 -0
  580. package/src/components/spinner/examples/variants.tsx +19 -0
  581. package/src/components/stepper/COMPONENT.md +83 -78
  582. package/src/components/stepper/examples/controlled.tsx +46 -0
  583. package/src/components/stepper/examples/examples.module.css +9 -40
  584. package/src/components/stepper/examples/narrow.tsx +11 -19
  585. package/src/components/stepper/examples/orientation.tsx +21 -59
  586. package/src/components/stepper/examples/overview.tsx +28 -0
  587. package/src/components/stepper/examples/sizes.tsx +19 -28
  588. package/src/components/stepper/examples/states.tsx +20 -21
  589. package/src/components/stepper/examples/with-icon.tsx +29 -0
  590. package/src/components/switch/COMPONENT.md +75 -94
  591. package/src/components/switch/examples/controlled.tsx +8 -6
  592. package/src/components/switch/examples/examples.module.css +13 -45
  593. package/src/components/switch/examples/in-form.tsx +20 -24
  594. package/src/components/switch/examples/overview.tsx +10 -0
  595. package/src/components/switch/examples/settings-row.tsx +14 -22
  596. package/src/components/switch/examples/sizes.tsx +5 -10
  597. package/src/components/switch/examples/states.tsx +37 -25
  598. package/src/components/tabs/COMPONENT.md +156 -86
  599. package/src/components/tabs/examples/closable.tsx +48 -0
  600. package/src/components/tabs/examples/controlled.tsx +14 -20
  601. package/src/components/tabs/examples/examples.module.css +13 -93
  602. package/src/components/tabs/examples/orientation.tsx +40 -0
  603. package/src/components/tabs/examples/overflow.tsx +60 -0
  604. package/src/components/tabs/examples/overview.tsx +30 -0
  605. package/src/components/tabs/examples/sizes.tsx +19 -19
  606. package/src/components/tabs/examples/states.tsx +20 -55
  607. package/src/components/tabs/examples/two-line.tsx +22 -29
  608. package/src/components/tabs/examples/variants.tsx +40 -0
  609. package/src/components/tabs/examples/with-icon.tsx +44 -0
  610. package/src/components/tag-select/COMPONENT.md +119 -122
  611. package/src/components/tag-select/examples/controlled-open.tsx +29 -0
  612. package/src/components/tag-select/examples/controlled.tsx +26 -0
  613. package/src/components/tag-select/examples/creatable.tsx +28 -0
  614. package/src/components/tag-select/examples/examples.module.css +3 -22
  615. package/src/components/tag-select/examples/in-form.tsx +44 -41
  616. package/src/components/tag-select/examples/manage-tags.tsx +20 -39
  617. package/src/components/tag-select/examples/many-tags.tsx +20 -0
  618. package/src/components/tag-select/examples/overview.tsx +21 -0
  619. package/src/components/tag-select/examples/sizes.tsx +7 -10
  620. package/src/components/tag-select/examples/states.tsx +11 -36
  621. package/src/components/tag-select/examples/validation.tsx +35 -0
  622. package/src/components/textarea/COMPONENT.md +50 -50
  623. package/src/components/textarea/examples/auto-resize.tsx +21 -0
  624. package/src/components/textarea/examples/controlled.tsx +12 -16
  625. package/src/components/textarea/examples/examples.module.css +15 -48
  626. package/src/components/textarea/examples/in-form.tsx +52 -48
  627. package/src/components/textarea/examples/overview.tsx +12 -0
  628. package/src/components/textarea/examples/sizes.tsx +6 -7
  629. package/src/components/textarea/examples/states.tsx +9 -13
  630. package/src/components/textarea/examples/validation.tsx +34 -0
  631. package/src/components/textarea/examples/without-focus-ring.tsx +12 -0
  632. package/src/components/thumbnail/COMPONENT.md +150 -0
  633. package/src/components/thumbnail/examples/examples.module.css +45 -0
  634. package/src/components/thumbnail/examples/full-width.tsx +48 -0
  635. package/src/components/thumbnail/examples/overview.tsx +31 -0
  636. package/src/components/thumbnail/examples/ratios.tsx +25 -0
  637. package/src/components/thumbnail/examples/ring.tsx +29 -0
  638. package/src/components/thumbnail/examples/sizes.tsx +23 -0
  639. package/src/components/thumbnail/examples/states.tsx +38 -0
  640. package/src/components/thumbnail/examples/variants.tsx +28 -0
  641. package/src/components/timeline/COMPONENT.md +92 -203
  642. package/src/components/timeline/examples/examples.module.css +5 -20
  643. package/src/components/timeline/examples/links.tsx +28 -0
  644. package/src/components/timeline/examples/narrow.tsx +30 -38
  645. package/src/components/timeline/examples/{activity-feed.tsx → overview.tsx} +9 -17
  646. package/src/components/timeline/examples/sizes.tsx +22 -28
  647. package/src/components/timeline/examples/{service-history.tsx → structure.tsx} +10 -8
  648. package/src/components/timeline/examples/{colors-and-tones.tsx → variants.tsx} +11 -16
  649. package/src/components/tooltip/COMPONENT.md +74 -62
  650. package/src/components/tooltip/examples/{controlled.tsx → controlled-open.tsx} +5 -7
  651. package/src/components/tooltip/examples/delay.tsx +19 -28
  652. package/src/components/tooltip/examples/disabled-trigger.tsx +18 -0
  653. package/src/components/tooltip/examples/examples.module.css +3 -33
  654. package/src/components/tooltip/examples/long-content.tsx +12 -15
  655. package/src/components/tooltip/examples/overview.tsx +17 -0
  656. package/src/components/tooltip/examples/placement.tsx +30 -0
  657. package/src/components/tooltip/examples/sizes.tsx +12 -15
  658. package/src/components/tooltip/examples/toolbar.tsx +35 -0
  659. package/src/components/typography/COMPONENT.md +68 -99
  660. package/src/components/typography/examples/article.tsx +23 -36
  661. package/src/components/typography/examples/examples.module.css +20 -54
  662. package/src/components/typography/examples/inline-emphasis.tsx +20 -0
  663. package/src/components/typography/examples/overview.tsx +20 -0
  664. package/src/components/typography/examples/semantic-tag.tsx +17 -0
  665. package/src/components/typography/examples/truncate.tsx +7 -7
  666. package/src/components/typography/examples/variants.tsx +43 -42
  667. package/src/components/typography/examples/weights.tsx +31 -0
  668. package/src/layout/app-header/COMPONENT.md +178 -0
  669. package/src/layout/app-header/examples/breadcrumbs.tsx +36 -0
  670. package/src/layout/app-header/examples/examples.module.css +47 -0
  671. package/src/layout/app-header/examples/in-app-shell.tsx +70 -0
  672. package/src/layout/app-header/examples/narrow.tsx +29 -0
  673. package/src/layout/app-header/examples/overview.tsx +36 -0
  674. package/src/layout/app-shell/COMPONENT.md +63 -63
  675. package/src/layout/app-shell/examples/contained.tsx +5 -5
  676. package/src/layout/app-shell/examples/examples.module.css +24 -0
  677. package/src/layout/app-shell/examples/footer.tsx +59 -0
  678. package/src/layout/app-shell/examples/overview.tsx +83 -0
  679. package/src/layout/app-shell/examples/template.tsx +54 -0
  680. package/src/layout/bottom-nav/COMPONENT.md +153 -0
  681. package/src/layout/bottom-nav/examples/examples.module.css +39 -0
  682. package/src/layout/bottom-nav/examples/floating.tsx +89 -0
  683. package/src/layout/bottom-nav/examples/icon-only.tsx +41 -0
  684. package/src/layout/bottom-nav/examples/in-app-shell.tsx +64 -0
  685. package/src/layout/bottom-nav/examples/overview.tsx +44 -0
  686. package/src/layout/bottom-nav/examples/router.tsx +31 -0
  687. package/src/layout/bottom-nav/examples/structure.tsx +47 -0
  688. package/src/layout/sidebar/COMPONENT.md +304 -111
  689. package/src/layout/sidebar/examples/account.tsx +88 -0
  690. package/src/layout/sidebar/examples/brand-header.tsx +45 -0
  691. package/src/layout/sidebar/examples/collapsible-groups.tsx +77 -0
  692. package/src/layout/sidebar/examples/controlled-open.tsx +55 -0
  693. package/src/layout/sidebar/examples/controlled.tsx +68 -0
  694. package/src/layout/sidebar/examples/examples.module.css +17 -3
  695. package/src/layout/sidebar/examples/nested-items.tsx +74 -0
  696. package/src/layout/sidebar/examples/overview.tsx +126 -0
  697. package/src/layout/sidebar/examples/router.tsx +19 -13
  698. package/src/layout/sidebar/examples/sizes.tsx +17 -12
  699. package/src/layout/sidebar/examples/structure.tsx +81 -0
  700. package/src/styles/fonts.css +4 -0
  701. package/src/styles/globals.css +18 -29
  702. package/src/styles/reset.css +2 -0
  703. package/src/styles/theme-dark.css +6 -0
  704. package/src/styles/theme-light.css +58 -23
  705. package/src/styles/tokens.css +11 -77
  706. package/dist/components/accordion/Accordion.d.ts.map +0 -1
  707. package/dist/components/avatar/Avatar.d.ts.map +0 -1
  708. package/dist/components/badge/Badge.d.ts.map +0 -1
  709. package/dist/components/badge/tier.d.ts.map +0 -1
  710. package/dist/components/banner/Banner.d.ts.map +0 -1
  711. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +0 -1
  712. package/dist/components/button/Button.d.ts.map +0 -1
  713. package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
  714. package/dist/components/card/Card.d.ts.map +0 -1
  715. package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
  716. package/dist/components/code-block/CodeBlock.d.ts.map +0 -1
  717. package/dist/components/color-picker/ColorPicker.d.ts.map +0 -1
  718. package/dist/components/color-picker/ColorPresets.d.ts.map +0 -1
  719. package/dist/components/command-menu/CommandMenu.d.ts.map +0 -1
  720. package/dist/components/data-table/DataTable.d.ts.map +0 -1
  721. package/dist/components/datepicker/Datepicker.d.ts.map +0 -1
  722. package/dist/components/datepicker/datepickerModel.d.ts.map +0 -1
  723. package/dist/components/digit-input/DigitInput.d.ts.map +0 -1
  724. package/dist/components/divider/Divider.d.ts.map +0 -1
  725. package/dist/components/drawer/Drawer.d.ts.map +0 -1
  726. package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
  727. package/dist/components/dropdown/dropdownGeometry.d.ts +0 -10
  728. package/dist/components/dropdown/dropdownGeometry.d.ts.map +0 -1
  729. package/dist/components/dropdown/menuKeyboard.d.ts +0 -4
  730. package/dist/components/dropdown/menuKeyboard.d.ts.map +0 -1
  731. package/dist/components/dropdown/useDropdownPosition.d.ts +0 -18
  732. package/dist/components/dropdown/useDropdownPosition.d.ts.map +0 -1
  733. package/dist/components/empty-page/EmptyPage.d.ts.map +0 -1
  734. package/dist/components/example-frame/ExampleFrame.d.ts.map +0 -1
  735. package/dist/components/file-upload/FileUpload.d.ts.map +0 -1
  736. package/dist/components/hint/Hint.d.ts.map +0 -1
  737. package/dist/components/index.css +0 -11181
  738. package/dist/components/index.css.map +0 -7
  739. package/dist/components/index.d.ts.map +0 -1
  740. package/dist/components/index.js +0 -13833
  741. package/dist/components/index.js.map +0 -7
  742. package/dist/components/input/Input.d.ts.map +0 -1
  743. package/dist/components/kbd/Kbd.d.ts.map +0 -1
  744. package/dist/components/label/Label.d.ts.map +0 -1
  745. package/dist/components/link-button/LinkButton.d.ts.map +0 -1
  746. package/dist/components/modal/DialogParts.d.ts.map +0 -1
  747. package/dist/components/modal/Modal.d.ts.map +0 -1
  748. package/dist/components/modal/useInertSiblings.d.ts +0 -7
  749. package/dist/components/modal/useInertSiblings.d.ts.map +0 -1
  750. package/dist/components/notification/Notification.d.ts.map +0 -1
  751. package/dist/components/notification/NotificationStore.d.ts.map +0 -1
  752. package/dist/components/page-content/PageContent.d.ts.map +0 -1
  753. package/dist/components/pagination/Pagination.d.ts.map +0 -1
  754. package/dist/components/popover/Popover.d.ts.map +0 -1
  755. package/dist/components/popover/popoverGeometry.d.ts +0 -6
  756. package/dist/components/popover/popoverGeometry.d.ts.map +0 -1
  757. package/dist/components/popover/usePopoverPosition.d.ts +0 -18
  758. package/dist/components/popover/usePopoverPosition.d.ts.map +0 -1
  759. package/dist/components/progress-bar/ProgressBar.d.ts.map +0 -1
  760. package/dist/components/progress-circle/ProgressCircle.d.ts.map +0 -1
  761. package/dist/components/radio/Radio.d.ts.map +0 -1
  762. package/dist/components/scroll-container/ScrollContainer.d.ts.map +0 -1
  763. package/dist/components/segmented-control/SegmentedControl.d.ts.map +0 -1
  764. package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +0 -29
  765. package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts.map +0 -1
  766. package/dist/components/select/Select.d.ts.map +0 -1
  767. package/dist/components/select/selectIcons.d.ts +0 -15
  768. package/dist/components/select/selectIcons.d.ts.map +0 -1
  769. package/dist/components/select/selectListbox.d.ts +0 -13
  770. package/dist/components/select/selectListbox.d.ts.map +0 -1
  771. package/dist/components/slider/Slider.d.ts.map +0 -1
  772. package/dist/components/stepper/Stepper.d.ts.map +0 -1
  773. package/dist/components/switch/Switch.d.ts.map +0 -1
  774. package/dist/components/tabs/Tabs.d.ts.map +0 -1
  775. package/dist/components/tag/Tag.d.ts +0 -47
  776. package/dist/components/tag/Tag.d.ts.map +0 -1
  777. package/dist/components/tag-select/TagSelect.d.ts.map +0 -1
  778. package/dist/components/textarea/Textarea.d.ts.map +0 -1
  779. package/dist/components/timeline/Timeline.d.ts.map +0 -1
  780. package/dist/components/tooltip/Tooltip.d.ts.map +0 -1
  781. package/dist/components/typography/Typography.d.ts.map +0 -1
  782. package/dist/hooks/useControllableState.d.ts.map +0 -1
  783. package/dist/hooks/useEscapeKey.d.ts +0 -7
  784. package/dist/hooks/useEscapeKey.d.ts.map +0 -1
  785. package/dist/hooks/useFieldIds.d.ts +0 -17
  786. package/dist/hooks/useFieldIds.d.ts.map +0 -1
  787. package/dist/hooks/useFocusTrap.d.ts +0 -20
  788. package/dist/hooks/useFocusTrap.d.ts.map +0 -1
  789. package/dist/hooks/useMergedRefs.d.ts.map +0 -1
  790. package/dist/hooks/useModalKeyboard.d.ts +0 -14
  791. package/dist/hooks/useModalKeyboard.d.ts.map +0 -1
  792. package/dist/hooks/useOutsideClick.d.ts +0 -26
  793. package/dist/hooks/useOutsideClick.d.ts.map +0 -1
  794. package/dist/hooks/useOverlayModal.d.ts +0 -7
  795. package/dist/hooks/useOverlayModal.d.ts.map +0 -1
  796. package/dist/hooks/usePosition.d.ts.map +0 -1
  797. package/dist/hooks/usePresence.d.ts.map +0 -1
  798. package/dist/hooks/useResponsiveMonths.d.ts +0 -18
  799. package/dist/hooks/useResponsiveMonths.d.ts.map +0 -1
  800. package/dist/hooks/useScrollLock.d.ts.map +0 -1
  801. package/dist/icons/Icon.d.ts.map +0 -1
  802. package/dist/icons/index.d.ts.map +0 -1
  803. package/dist/index.css.map +0 -7
  804. package/dist/index.d.ts.map +0 -1
  805. package/dist/index.js.map +0 -7
  806. package/dist/internal/ControlSizeContext.d.ts.map +0 -1
  807. package/dist/internal/DividerContentContext.d.ts +0 -4
  808. package/dist/internal/DividerContentContext.d.ts.map +0 -1
  809. package/dist/internal/FieldFrame.d.ts.map +0 -1
  810. package/dist/internal/OverlayPortalLayerContext.d.ts +0 -13
  811. package/dist/internal/OverlayPortalLayerContext.d.ts.map +0 -1
  812. package/dist/internal/Portal.d.ts.map +0 -1
  813. package/dist/internal/context.d.ts.map +0 -1
  814. package/dist/internal/cx.d.ts.map +0 -1
  815. package/dist/internal/data-attributes.d.ts.map +0 -1
  816. package/dist/internal/highlightTsxHtml.d.ts.map +0 -1
  817. package/dist/internal/layoutPxFromPrimitives.d.ts.map +0 -1
  818. package/dist/internal/mergeRefs.d.ts.map +0 -1
  819. package/dist/internal/runtimeUnits.d.ts +0 -3
  820. package/dist/internal/runtimeUnits.d.ts.map +0 -1
  821. package/dist/internal/scrollAncestors.d.ts.map +0 -1
  822. package/dist/internal/slot.d.ts.map +0 -1
  823. package/dist/internal/states.d.ts.map +0 -1
  824. package/dist/internal/useFieldDescriptions.d.ts +0 -18
  825. package/dist/internal/useFieldDescriptions.d.ts.map +0 -1
  826. package/dist/layout/app-shell/AppShell.d.ts.map +0 -1
  827. package/dist/layout/index.d.ts.map +0 -1
  828. package/dist/layout/sidebar/Sidebar.d.ts.map +0 -1
  829. package/dist/theme/applyTheme.d.ts.map +0 -1
  830. package/dist/tokens/primitives.d.ts.map +0 -1
  831. package/dist/tokens/semantic.d.ts.map +0 -1
  832. package/dist/tokens/themes/dark.d.ts.map +0 -1
  833. package/dist/tokens/themes/light.d.ts +0 -3
  834. package/dist/tokens/themes/light.d.ts.map +0 -1
  835. package/src/components/accordion/examples/checkout.tsx +0 -73
  836. package/src/components/accordion/examples/layouts.tsx +0 -58
  837. package/src/components/avatar/examples/colors.tsx +0 -29
  838. package/src/components/avatar/examples/group.tsx +0 -35
  839. package/src/components/avatar/examples/team-card.tsx +0 -70
  840. package/src/components/badge/examples/icons.tsx +0 -37
  841. package/src/components/badge/examples/order-list.tsx +0 -48
  842. package/src/components/badge/examples/palette.tsx +0 -44
  843. package/src/components/badge/examples/surfaces.tsx +0 -21
  844. package/src/components/banner/examples/dismiss.tsx +0 -48
  845. package/src/components/banner/examples/placement.tsx +0 -92
  846. package/src/components/breadcrumb/examples/collapse.tsx +0 -56
  847. package/src/components/breadcrumb/examples/page-header.tsx +0 -31
  848. package/src/components/button/examples/composition.tsx +0 -46
  849. package/src/components/button/examples/controlled.tsx +0 -18
  850. package/src/components/button/examples/full-width.tsx +0 -15
  851. package/src/components/button/examples/icon-only.tsx +0 -42
  852. package/src/components/button/examples/surfaces.tsx +0 -18
  853. package/src/components/button/examples/variants-tones.tsx +0 -39
  854. package/src/components/button-group/examples/composition.tsx +0 -99
  855. package/src/components/card/examples/mini-media.tsx +0 -55
  856. package/src/components/card/examples/responsive.tsx +0 -72
  857. package/src/components/checkbox/examples/hint-error.tsx +0 -22
  858. package/src/components/checkbox/examples/select-all.tsx +0 -40
  859. package/src/components/checkbox/examples/settings-card.tsx +0 -76
  860. package/src/components/code-block/examples/api-docs.tsx +0 -31
  861. package/src/components/code-block/examples/controlled.tsx +0 -38
  862. package/src/components/code-block/examples/surfaces.tsx +0 -7
  863. package/src/components/color-picker/examples/brand-color.tsx +0 -73
  864. package/src/components/color-picker/examples/hex-input-sizes.tsx +0 -54
  865. package/src/components/color-picker/examples/presets-quick.tsx +0 -57
  866. package/src/components/color-picker/examples/presets-tags.tsx +0 -52
  867. package/src/components/command-menu/examples/composition.tsx +0 -91
  868. package/src/components/command-menu/examples/examples.module.css +0 -9
  869. package/src/components/command-menu/examples/keyboard-search.tsx +0 -94
  870. package/src/components/data-table/examples/dashboard.tsx +0 -205
  871. package/src/components/data-table/examples/sorting-pagination.tsx +0 -66
  872. package/src/components/datepicker/examples/badge.tsx +0 -19
  873. package/src/components/datepicker/examples/single.tsx +0 -16
  874. package/src/components/digit-input/examples/length-and-complete.tsx +0 -30
  875. package/src/components/digit-input/examples/surfaces.tsx +0 -6
  876. package/src/components/digit-input/examples/verification-step.tsx +0 -62
  877. package/src/components/divider/examples/composition.tsx +0 -49
  878. package/src/components/divider/examples/variants.tsx +0 -62
  879. package/src/components/drawer/examples/composition.tsx +0 -94
  880. package/src/components/drawer/examples/controlled.tsx +0 -42
  881. package/src/components/drawer/examples/features.tsx +0 -48
  882. package/src/components/drawer/examples/states.tsx +0 -54
  883. package/src/components/dropdown/examples/as-child.tsx +0 -23
  884. package/src/components/dropdown/examples/composition.tsx +0 -91
  885. package/src/components/dropdown/examples/controlled.tsx +0 -32
  886. package/src/components/dropdown/examples/row-actions.tsx +0 -56
  887. package/src/components/dropdown/examples/variants.tsx +0 -52
  888. package/src/components/example-frame/examples/basic.tsx +0 -18
  889. package/src/components/file-upload/examples/file-list.tsx +0 -67
  890. package/src/components/file-upload/examples/in-card.tsx +0 -84
  891. package/src/components/hint/examples/field-states.tsx +0 -60
  892. package/src/components/hint/examples/in-form.tsx +0 -45
  893. package/src/components/input/examples/anatomy.tsx +0 -70
  894. package/src/components/input/examples/control-alignment.tsx +0 -57
  895. package/src/components/input/examples/full-width.tsx +0 -23
  896. package/src/components/input/examples/icons-and-affixes.tsx +0 -32
  897. package/src/components/input/examples/reserved-support-row.tsx +0 -33
  898. package/src/components/input/examples/surfaces.tsx +0 -12
  899. package/src/components/input/examples/with-badge.tsx +0 -40
  900. package/src/components/kbd/examples/modifier-keys.tsx +0 -24
  901. package/src/components/label/examples/in-form.tsx +0 -39
  902. package/src/components/label/examples/markers.tsx +0 -27
  903. package/src/components/link-button/examples/composition.tsx +0 -30
  904. package/src/components/link-button/examples/examples.module.css +0 -46
  905. package/src/components/link-button/examples/tones.tsx +0 -15
  906. package/src/components/modal/examples/composition.tsx +0 -87
  907. package/src/components/modal/examples/features.tsx +0 -68
  908. package/src/components/modal/examples/link.tsx +0 -79
  909. package/src/components/modal/examples/states.tsx +0 -73
  910. package/src/components/notification/examples/features.tsx +0 -42
  911. package/src/components/notification/examples/live.tsx +0 -128
  912. package/src/components/notification/examples/save-form.tsx +0 -59
  913. package/src/components/page-content/examples/readable.tsx +0 -24
  914. package/src/components/page-content/examples/settings-page.tsx +0 -49
  915. package/src/components/page-content/examples/widths.tsx +0 -39
  916. package/src/components/pagination/examples/compact.tsx +0 -36
  917. package/src/components/pagination/examples/list-footer.tsx +0 -50
  918. package/src/components/pagination/examples/states.tsx +0 -44
  919. package/src/components/popover/examples/as-child.tsx +0 -29
  920. package/src/components/popover/examples/composition.tsx +0 -45
  921. package/src/components/popover/examples/controlled.tsx +0 -39
  922. package/src/components/popover/examples/features.tsx +0 -56
  923. package/src/components/popover/examples/inset-variants.tsx +0 -58
  924. package/src/components/popover/examples/states.tsx +0 -48
  925. package/src/components/progress-bar/examples/file-upload.tsx +0 -52
  926. package/src/components/progress-bar/examples/values-and-tones.tsx +0 -17
  927. package/src/components/progress-circle/examples/goals-card.tsx +0 -37
  928. package/src/components/progress-circle/examples/values-and-tones.tsx +0 -56
  929. package/src/components/radio/examples/examples.module.css +0 -43
  930. package/src/components/radio/examples/hint-error.tsx +0 -28
  931. package/src/components/radio/examples/horizontal.tsx +0 -33
  932. package/src/components/radio/examples/plan-picker.tsx +0 -55
  933. package/src/components/scroll-container/examples/both-axes.tsx +0 -57
  934. package/src/components/scroll-container/examples/list.tsx +0 -44
  935. package/src/components/segmented-control/examples/item-content.tsx +0 -78
  936. package/src/components/segmented-control/examples/surfaces.tsx +0 -82
  937. package/src/components/segmented-control/examples/toolbar.tsx +0 -56
  938. package/src/components/segmented-progress-bar/COMPONENT.md +0 -128
  939. package/src/components/segmented-progress-bar/examples/examples.module.css +0 -68
  940. package/src/components/segmented-progress-bar/examples/segment-gap.tsx +0 -24
  941. package/src/components/segmented-progress-bar/examples/sizes.tsx +0 -31
  942. package/src/components/segmented-progress-bar/examples/storage-distribution.tsx +0 -41
  943. package/src/components/select/examples/native.tsx +0 -21
  944. package/src/components/select/examples/search-groups.tsx +0 -61
  945. package/src/components/select/examples/with-badge.tsx +0 -47
  946. package/src/components/slider/examples/basic.tsx +0 -6
  947. package/src/components/slider/examples/display-settings.tsx +0 -41
  948. package/src/components/stepper/examples/wizard.tsx +0 -62
  949. package/src/components/switch/examples/notification-settings.tsx +0 -37
  950. package/src/components/switch/examples/on-off.tsx +0 -15
  951. package/src/components/switch/examples/validation.tsx +0 -19
  952. package/src/components/tabs/examples/horizontal.tsx +0 -30
  953. package/src/components/tabs/examples/vertical.tsx +0 -101
  954. package/src/components/tag/COMPONENT.md +0 -179
  955. package/src/components/tag/examples/colors.tsx +0 -49
  956. package/src/components/tag/examples/examples.module.css +0 -47
  957. package/src/components/tag/examples/sizes.tsx +0 -23
  958. package/src/components/tag/examples/states.tsx +0 -19
  959. package/src/components/tag/examples/surfaces.tsx +0 -16
  960. package/src/components/tag/examples/with-icon.tsx +0 -29
  961. package/src/components/textarea/examples/height-and-limits.tsx +0 -45
  962. package/src/components/textarea/examples/hint-and-error.tsx +0 -21
  963. package/src/components/textarea/examples/reserved-support-row.tsx +0 -37
  964. package/src/components/textarea/examples/surfaces.tsx +0 -11
  965. package/src/components/textarea/examples/with-label.tsx +0 -22
  966. package/src/components/timeline/examples/hover-highlight.tsx +0 -48
  967. package/src/components/timeline/examples/in-card.tsx +0 -48
  968. package/src/components/timeline/examples/selectable.tsx +0 -58
  969. package/src/components/tooltip/examples/composition.tsx +0 -37
  970. package/src/components/tooltip/examples/side.tsx +0 -29
  971. package/src/components/tooltip/examples/states.tsx +0 -45
  972. package/src/components/typography/examples/as-prop.tsx +0 -25
  973. package/src/components/typography/examples/composition.tsx +0 -23
  974. package/src/components/typography/examples/full-width.tsx +0 -29
  975. package/src/components/typography/examples/reading-and-form.tsx +0 -35
  976. package/src/components/typography/examples/states.tsx +0 -23
  977. package/src/components/typography/examples/tones.tsx +0 -34
  978. package/src/components/typography/examples/variant-catalog.tsx +0 -41
  979. package/src/layout/app-shell/examples/with-sidebar.tsx +0 -63
  980. package/src/layout/sidebar/examples/modes.tsx +0 -55
  981. package/src/layout/sidebar/examples/responsive.tsx +0 -44
  982. package/src/layout/sidebar/examples/states.tsx +0 -34
@@ -1,30 +1,21 @@
1
- /** `soft` (default) is a sunken panel with padding and the `code` text role; `ghost` is a bare `pre` that takes type and background from a host panel. Use `ghost` only inside your own panel. */
2
-
1
+ /** A sunken panel and a bare block that takes type and background from its host — `variant`. */
3
2
  import { CodeBlock, Typography } from "prime-ui-kit";
4
3
 
5
- import styles from "./examples.module.css";
4
+ const SAMPLE = `const total = formatPrice(14990);`;
6
5
 
7
- const SAMPLE = `export function formatPrice(value: number) {
8
- return new Intl.NumberFormat("ru-RU", { style: "currency", currency: "RUB" }).format(value);
9
- }`;
6
+ const VARIANTS = ["soft", "ghost"] as const;
10
7
 
11
8
  export default function CodeBlockVariantsExample() {
12
9
  return (
13
- <div className={styles.grid}>
14
- <div className={styles.cell}>
15
- <Typography.Root variant="caption" tone="muted">
16
- variant=&quot;soft&quot;
17
- </Typography.Root>
18
- <CodeBlock.Root code={SAMPLE} />
19
- </div>
20
- <div className={styles.cell}>
21
- <Typography.Root variant="caption" tone="muted">
22
- variant=&quot;ghost&quot; внутри своей панели
23
- </Typography.Root>
24
- <Typography.Root as="div" variant="caption" className={styles.host}>
25
- <CodeBlock.Root code={SAMPLE} variant="ghost" />
26
- </Typography.Root>
27
- </div>
10
+ <div>
11
+ {VARIANTS.map((variant) => (
12
+ <div key={variant}>
13
+ <CodeBlock code={SAMPLE} variant={variant} />
14
+ <Typography as="span" variant="caption" tone="muted">
15
+ {variant}
16
+ </Typography>
17
+ </div>
18
+ ))}
28
19
  </div>
29
20
  );
30
21
  }
@@ -1,189 +1,219 @@
1
1
  # ColorPicker
2
2
 
3
3
  **Category:** selection
4
+ **Kind:** field
4
5
 
5
- > Color selection: a full picker (area, channel sliders, hex and channel fields, eyedropper, swatches) and `ColorPresets` for a quick color from a fixed palette.
6
+ > Color selection: a full picker (hex field, area, channel sliders and fields, eyedropper, swatches) and `ColorPresets` for a quick color from a fixed palette.
6
7
 
7
8
  ## When to use
8
- - `ColorPicker` — any color is allowed: brand/theme color, chart series color, design tools. Usually opened from a Popover next to a hex field.
9
- - `ColorPresets` — a color from a fixed palette with an optional «no color»: tag, project or calendar colors.
9
+ - `ColorPicker` — any color is allowed: brand / theme color, chart series color, design tools. Usually a hex field with a swatch button that opens the panel in a Popover.
10
+ - `ColorPresets` — a color from a fixed palette with an optional «no color»: label, project or calendar colors, one trigger per row.
10
11
  - `parseColor` — turning a CSS string into a `Color` for a controlled `ColorPicker`.
11
12
 
12
13
  ## When not to use
13
- - Picking one of the kit palette hues for a Tag/Badge in TagSelect — the row menu of [TagSelect](../tag-select/COMPONENT.md) already does it.
14
+ - The color is a field of its own in a form or dialog (stage, label, project color) → use [ColorSwatches](../color-swatches/COMPONENT.md): the palette inline, no popover.
15
+ - Picking one of the kit palette hues for a Badge in TagSelect — the row menu of [TagSelect](../tag-select/COMPONENT.md) already does it.
14
16
  - Choosing between a few named themes or modes → use [SegmentedControl](../segmented-control/COMPONENT.md) or [Select](../select/COMPONENT.md) instead.
15
17
  - A plain text field for a hex code without a picker → use [Input](../input/COMPONENT.md) instead.
16
18
 
17
19
  ## Import
18
20
  ```tsx
19
- import { COLOR_PRESETS, ColorPicker, ColorPresets, parseColor } from "prime-ui-kit";
21
+ import { COLOR_PRESETS, ColorPresets } from "prime-ui-kit";
22
+ import { ColorPicker, parseColor } from "prime-ui-kit/color-picker";
20
23
  ```
21
24
 
25
+ `ColorPicker` has its own entry: it is the only part of the kit built on `react-aria-components`,
26
+ an optional peer dependency — install it only when you use `ColorPicker`. Its styles are already
27
+ in `prime-ui-kit/bundle.css`. `ColorPresets` stays in the main entry and needs no extra package.
28
+
22
29
  ## Anatomy
23
30
  ```
24
31
  ColorPicker.Root shared Color + value format (no DOM)
25
32
  ├─ ColorPicker.HexInput kit Input bound to the hex of the current color
26
33
  ├─ ColorPicker.TriggerSwatch square of the current color for a trigger button
27
- └─ ColorPicker.Panel vertical stack (12px gap), optional raised surface
34
+ └─ ColorPicker.Panel vertical stack, optional raised surface
28
35
  ├─ ColorPicker.FormatSelect kit Select: HSL / RGB / Hex
29
36
  ├─ ColorPicker.Area 2D area (4:3)
30
37
  │ └─ ColorPicker.AreaThumb
31
38
  ├─ ColorPicker.Slider one channel
32
- │ ├─ ColorPicker.SliderMeta label + value row (uses ColorPicker.Output)
39
+ │ ├─ ColorPicker.SliderMeta label + value row
33
40
  │ └─ ColorPicker.SliderTrack
34
41
  │ └─ ColorPicker.Thumb
35
42
  ├─ ColorPicker.ChannelStrip eyedropper + channel fields of the current format
36
- ├─ ColorPicker.Field RAC ColorField styled as a kit field (needs a RAC Input child)
37
43
  ├─ ColorPicker.EyeDropperButton
38
- └─ ColorPicker.SwatchPicker preset group
39
- └─ ColorPicker.SwatchPickerItem
40
- └─ ColorPicker.Swatch
41
-
42
- ColorPresets.Root value, open state, presets, size (Popover root)
43
- ├─ ColorPresets.Trigger square swatch button (or `asChild`)
44
- │ └─ ColorPresets.Swatch current color for a custom trigger
45
- └─ ColorPresets.Content popover with a role="listbox" swatch grid
44
+ └─ ColorPicker.Swatches kit ColorSwatches bound to the color
45
+
46
+ ColorPresets.Root value, open, presets (no DOM)
47
+ ├─ ColorPresets.Trigger square swatch button (or `asChild` with ColorPresets.Swatch)
48
+ └─ ColorPresets.Content popover with the swatch grid (listbox)
46
49
  ```
47
- Trigger and panel of a `ColorPicker` must be under one `ColorPicker.Root`.
50
+ Helpers: `parseColor(value)` (throws on invalid input; back to text with `color.toString("hex" | "hexa" | "css")`), `COLOR_PRESETS` (16 colors: step 500 and step 700 of eight hues), types `ColorPickerColorValue`, `ColorValueFormat`, `ColorPreset`.
48
51
 
49
52
  ## API
50
53
 
54
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
55
+
51
56
  ### ColorPicker.Root
57
+ No DOM. Holds the color (React Aria `ColorPicker`) and the value format for every part inside.
58
+
52
59
  | Prop | Type | Default | Description |
53
60
  |---|---|---|---|
54
61
  | `value` | `string \| Color` | — | Controlled color: a CSS color string or a `Color` from `parseColor`. |
55
- | `defaultValue` | `string \| Color` | — | Initial color in uncontrolled mode. |
56
- | `onValueChange` | `(color: Color) => void` | — | Called on any change from a nested part. |
57
- | `defaultFormat` | `"hsl" \| "rgb" \| "hex"` | `"hsl"` | Initial format of `FormatSelect` / `ChannelStrip`. |
58
- | `labels` | `Partial<ColorPickerLabels>` | Russian defaults | System strings, see Accessibility. |
59
- | `children` | `ReactNode` | — (required) | Picker parts. |
60
-
61
- No DOM, no ref.
62
+ | `defaultValue` | `string \| Color` | — | Initial color when uncontrolled. |
63
+ | `onValueChange` | `(color: Color) => void` | — | Called with the new `Color` (`color.toString("hex")` for a string). |
64
+ | `defaultFormat` | `"hsl" \| "rgb" \| "hex"` | `"hsl"` | Initial value format of `FormatSelect` and `ChannelStrip`. |
65
+ | `labels` | `Partial<ColorPickerLabels>` | — | Built-in strings, see Labels. |
66
+ | `children` | `ReactNode` | — (required) | The parts. |
62
67
 
63
68
  ### ColorPicker.Panel
69
+ `ref` → `HTMLDivElement`. Vertical stack of the parts with the standard gap; native `<div>` props.
70
+
64
71
  | Prop | Type | Default | Description |
65
72
  |---|---|---|---|
66
- | `surface` | `"none" \| "raised"` | `"none"` | `none` — layout only (inside Popover / Card); `raised` — standalone floating panel. |
67
-
68
- + native `<div>` props (`className`, …). Ref: `forwardRef` → `HTMLDivElement`.
73
+ | `surface` | `"none" \| "raised"` | `"none"` | `none` — layout only (inside a Popover or Card). `raised` — a standalone floating panel: raised background, panel radius and padding, overlay shadow. |
69
74
 
70
75
  ### ColorPicker.HexInput
76
+ `ref` → `HTMLDivElement` (the field frame). The hex value as a kit Input field (label, hint, error); commits on blur / Enter and reverts invalid text.
77
+
71
78
  | Prop | Type | Default | Description |
72
79
  |---|---|---|---|
73
- | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `"m"` | Tier of the kit Input. |
74
- | `label` | `ReactNode` | `labels.hex` | Field label. |
75
- | `focusRing` | `boolean` | `true` | `false` hides only the visual focus ring. |
76
- | `className` | `string` | — | Class on `Input.Root`. |
77
-
78
- Invalid hex reverts on blur / Enter.
80
+ | `label` | `ReactNode` | — | Field label; defaults to `labels.hex`. |
81
+ | `hint` | `ReactNode` | — | Help text under the field. Hidden while `error` is shown. |
82
+ | `error` | `ReactNode` | — | Error message in the hint slot; marks the field invalid. |
83
+ | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `host tier, else "m"` | Field tier. Without it the tier of its host (a panel, a popover), else `m`. |
84
+ | `focusRing` | `boolean` | `true` | `false` hides only the visual focus ring of the fields (`data-focus-ring="false"`); focus, keyboard and ARIA stay. |
85
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "id" \| "children" \| "defaultValue" \| "defaultChecked" \| "onChange">` | — | `className`, `data-*` and the other attributes of the field frame `<div>` (field-root rule: `className`, `ref` and the rest → frame, `id` → control). |
79
86
 
80
87
  ### ColorPicker.TriggerSwatch
88
+ `ref` → `HTMLSpanElement`. A square of the current color for a trigger button (`aria-hidden`); follows the host icon size, e.g. inside `Button.Icon`.
89
+
81
90
  | Prop | Type | Default | Description |
82
91
  |---|---|---|---|
83
- | `className` | `string` | — | Class on the square; sized from the host `--prime-icon-size` (fallback `--prime-control-m-icon`, 16px); `aria-hidden` — name the trigger button. |
92
+ | `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other attributes of the `<span>`. |
84
93
 
85
94
  ### ColorPicker.FormatSelect
95
+ `ref` → `HTMLDivElement` (the wrapper). A kit Select of the value format (HSL · RGB · Hex), named by `labels.format`.
96
+
86
97
  | Prop | Type | Default | Description |
87
98
  |---|---|---|---|
88
- | `className` | `string` | — | Class on the wrapper of the kit Select (size `m`, named by `labels.format`). |
99
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className` and the other attributes of the wrapper `<div>`. |
89
100
 
90
101
  ### ColorPicker.ChannelStrip
102
+ `ref` → `HTMLDivElement`. One row: the eyedropper, then a field per channel of the current format (or one hex field); each field commits on blur / Enter.
103
+
91
104
  | Prop | Type | Default | Description |
92
105
  |---|---|---|---|
93
- | `focusRing` | `boolean` | `true` | `false` hides only the visual focus ring of its fields. |
94
- | `className` | `string` | — | Class on the strip. |
106
+ | `focusRing` | `boolean` | `true` | `false` hides only the visual focus ring of the fields (`data-focus-ring="false"`); focus, keyboard and ARIA stay. |
107
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className` and the other attributes of the row `<div>`. |
95
108
 
96
- HSL: hue °, saturation %, lightness %, alpha %. RGB: red, green, blue, alpha %. Hex: one field. Leading `EyeDropperButton`.
109
+ ### ColorPicker.Area
110
+ `ref` → `HTMLDivElement`. React Aria `ColorArea`: a two-channel square (e.g. saturation × lightness). Holds `ColorPicker.AreaThumb`.
111
+
112
+ | Prop | Type | Default | Description |
113
+ |---|---|---|---|
114
+ | `disabled` | `boolean` | — | Shows the color but takes no input (grayscale). |
115
+ | `…rest` | `ColorAreaProps (react-aria-components)` | — | The other props of the React Aria `ColorArea` (`channel`, `colorSpace`, `aria-label`…). |
116
+
117
+ ### ColorPicker.AreaThumb · ColorPicker.Thumb
118
+ `ref` → `HTMLDivElement`. React Aria `ColorThumb` of the area / of a slider track: a thumb-colored ring with the overlay shadow and a focus ring.
119
+
120
+ | Prop | Type | Default | Description |
121
+ |---|---|---|---|
122
+ | `…rest` | `ColorThumbProps (react-aria-components)` | — | The other props of the React Aria `ColorThumb` (`channel`, `colorSpace`, `aria-label`…). |
123
+
124
+ ### ColorPicker.Slider
125
+ `ref` → `HTMLDivElement`. React Aria `ColorSlider` of one channel (hue, alpha…). Holds `SliderMeta` and `SliderTrack`.
126
+
127
+ | Prop | Type | Default | Description |
128
+ |---|---|---|---|
129
+ | `disabled` | `boolean` | — | Shows the color but takes no input (grayscale). |
130
+ | `…rest` | `ColorSliderProps (react-aria-components)` | — | The other props of the React Aria `ColorSlider` (`channel`, `colorSpace`, `aria-label`…). |
97
131
 
98
132
  ### ColorPicker.SliderMeta
133
+ `ref` → `HTMLDivElement`. The slider heading: a label and the current channel value.
134
+
99
135
  | Prop | Type | Default | Description |
100
136
  |---|---|---|---|
101
- | `label` | `ReactNode` | — (required) | Text on the left; the channel value (`Output`) on the right. |
137
+ | `label` | `ReactNode` | — (required) | Visible label of the slider. |
138
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className` and the other attributes of the heading `<div>`. |
139
+
140
+ ### ColorPicker.SliderTrack
141
+ `ref` → `HTMLDivElement`. React Aria `SliderTrack` with the channel gradient over a transparency checkerboard. Holds `ColorPicker.Thumb`.
102
142
 
103
- ### ColorPicker.EyeDropperButton
104
143
  | Prop | Type | Default | Description |
105
144
  |---|---|---|---|
106
- | `children` | `ReactNode` | pipette icon | Custom icon. |
107
- | `type` | `"button" \| "submit" \| "reset"` | `"button"` | Native button type. |
108
- | `onClick` | `MouseEventHandler` | — | Runs first; `preventDefault()` cancels the eyedropper. |
109
- | `className` | `string` | — | Extra class. |
145
+ | `…rest` | `SliderTrackProps (react-aria-components)` | — | The other props of the React Aria `SliderTrack` (`channel`, `colorSpace`, `aria-label`…). |
110
146
 
111
- + kit `Button.Root` props except `variant`, `tone`, `size`, `aria-label` (fixed: `soft` · `neutral`, name `labels.eyeDropper`). Ref: `forwardRef` → `HTMLButtonElement`. Without `window.EyeDropper` it renders disabled and `aria-hidden`.
147
+ ### ColorPicker.Swatches
148
+ `ref` → `HTMLDivElement` (the ColorSwatches field frame). The kit `ColorSwatches` bound to the picker color: a pick sets the color, editing the color moves the selection. Takes every ColorSwatches prop except the value ones, `allowEmpty` and `name`.
112
149
 
113
- ### React Aria wrappers
114
- These parts take the props of the matching `react-aria-components` primitive (`className` / `style` accept render functions):
150
+ | Prop | Type | Default | Description |
151
+ |---|---|---|---|
152
+ | `presets` | `readonly ColorPreset[]` | `COLOR_PRESETS` | Swatches `{ value, label }`; the label names the swatch. |
153
+ | `…rest` | `Omit<ColorSwatchesProps, "value" \| "defaultValue" \| "onValueChange" \| "allowEmpty" \| "name">` | — | `label`, `size`, `aria-label`, `disabled`… |
115
154
 
116
- | Part | Props | Notes |
117
- |---|---|---|
118
- | `ColorPicker.Area` | RAC `ColorAreaProps` without `isDisabled`, + `disabled?: boolean` | Key props: `colorSpace`, `xChannel`, `yChannel`. Child: `AreaThumb`. |
119
- | `ColorPicker.AreaThumb` | RAC `ColorThumbProps` | 20px marker. |
120
- | `ColorPicker.Slider` | RAC `ColorSliderProps` without `isDisabled`, + `disabled?: boolean` | Key props: `channel` (`hue`, `alpha`, `red`, …), `colorSpace`, `orientation`. Always tier `m`. |
121
- | `ColorPicker.SliderTrack` | RAC `SliderTrackProps` | Gradient track with a checkerboard under translucent colors. Child: `Thumb`. |
122
- | `ColorPicker.Thumb` | RAC `ColorThumbProps` | 18px thumb, `control-thumb` ring and shadow. |
123
- | `ColorPicker.Output` | RAC `SliderOutputProps` | Channel value. |
124
- | `ColorPicker.Field` | RAC `ColorFieldProps` + `focusRing?: boolean` (default `true`) | Hex without `channel`, one channel with `channel` + `colorSpace`; child: RAC `Input`; needs `aria-label`. |
125
- | `ColorPicker.SwatchPicker` | RAC `ColorSwatchPickerProps` without `onChange`, + `onValueChange?: (color: Color) => void` | Inside Root it follows the picker color; standalone it takes `value` / `defaultValue`. `layout`: `grid` \| `stack`. Needs `aria-label`. |
126
- | `ColorPicker.SwatchPickerItem` | RAC `ColorSwatchPickerItemProps` without `isDisabled`, + `disabled?: boolean` | `color` is required. Child: `Swatch`. |
127
- | `ColorPicker.Swatch` | RAC `ColorSwatchProps` | 24px circle with a checkerboard. |
155
+ ### ColorPicker.EyeDropperButton
156
+ `ref` → `HTMLButtonElement`. A square soft kit Button that opens the native EyeDropper, named by `labels.eyeDropper`; without browser support it is disabled and hidden from assistive tech.
157
+
158
+ | Prop | Type | Default | Description |
159
+ |---|---|---|---|
160
+ | `children` | `ReactNode` | — | Custom content; default is the pipette icon. |
161
+ | `…rest` | `Omit<ButtonRootProps, "variant" \| "tone" \| "size" \| "aria-label">` | — | The other Button props. |
128
162
 
129
163
  ### ColorPresets.Root
164
+ No DOM. A quick color from a fixed palette: a square trigger and a popover grid of presets (Popover overlay contract).
165
+
130
166
  | Prop | Type | Default | Description |
131
167
  |---|---|---|---|
132
- | `value` | `string \| null` | — | Controlled color (CSS string of a preset); `null` = no color. |
133
- | `defaultValue` | `string \| null` | `null` | Initial color. |
134
- | `onValueChange` | `(value: string \| null) => void` | — | Called on a pick; returns the preset `value` as is. |
135
- | `open` | `boolean` | — | Controlled panel state. |
136
- | `defaultOpen` | `boolean` | `false` | Initial panel state. |
168
+ | `value` | `string \| null` | — | Controlled color; `null` — no color. |
169
+ | `defaultValue` | `string \| null` | `null` | Initial color when uncontrolled. |
170
+ | `onValueChange` | `(value: string \| null) => void` | — | Called with the preset `value` or `null`. |
171
+ | `open` | `boolean` | — | Controlled open state of the panel. |
172
+ | `defaultOpen` | `boolean` | `false` | Initial open state. |
137
173
  | `onOpenChange` | `(open: boolean) => void` | — | Called when the panel opens or closes. |
138
- | `presets` | `readonly ColorPreset[]` | `COLOR_PRESETS` (16) | Swatches in order: `{ value: string; label: string }`. |
139
- | `columns` | `number` | one row for ≤ 8 presets (+ «no color»), else 8 | Grid columns; at `l` / `xl` below 480px the grid wraps to half. |
140
- | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `"m"` | Tier of trigger, swatches and panel. |
141
- | `disabled` | `boolean` | `false` | Trigger disabled, the panel cannot open. |
142
- | `allowEmpty` | `boolean` | `false` | Adds a «no color» swatch (value `null`) after the presets. |
143
- | `closeOnSelect` | `boolean` | `true` | Close after a pick and return focus to the trigger. |
144
- | `labels` | `Partial<ColorPresetsLabels>` | Russian defaults | See Accessibility. |
145
- | `children` | `ReactNode` | — (required) | `Trigger` and `Content`. |
174
+ | `presets` | `readonly ColorPreset[]` | `COLOR_PRESETS` | Swatches in panel order. |
175
+ | `columns` | `number` | — | Grid columns; default one row for up to 8 presets (+ «no color»), else 8. |
176
+ | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `host tier, else "m"` | Tier of the trigger, the swatches and the panel. Without it the tier of its host, else `m`. |
177
+ | `disabled` | `boolean` | `false` | The trigger does not open the panel. |
178
+ | `allowEmpty` | `boolean` | `false` | Adds the «no color» swatch after the presets (value `null`). |
179
+ | `closeOnSelect` | `boolean` | `true` | Close the panel after a pick (focus returns to the trigger). |
180
+ | `labels` | `Partial<ColorPresetsLabels>` | — | Built-in strings, see Labels. |
146
181
 
147
182
  ### ColorPresets.Trigger
183
+ `ref` → `HTMLButtonElement`. The kit square swatch button of the root tier, named «`labels.trigger`: <color name>»; ArrowDown / ArrowUp open the panel.
184
+
148
185
  | Prop | Type | Default | Description |
149
186
  |---|---|---|---|
150
- | `asChild` | `boolean` | `false` | `false` — kit square swatch button of the Root tier; `true` — the single child element (e.g. `Button.Root` with `ColorPresets.Swatch`) becomes the trigger. |
151
- | `children` | `ReactElement` | — | The custom trigger with `asChild`. |
152
- | `aria-label` | `string` | `"<labels.trigger>: <color name>"` | Accessible name. |
187
+ | `asChild` | `boolean` | `false` | Use the one child element (e.g. `Button.Root` with `ColorPresets.Swatch`) as the trigger. |
188
+ | `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" \| "disabled" \| "value">` | — | `aria-label`, `className` and the other button attributes. |
153
189
 
154
- + native `<button>` props except `children`, `disabled`, `value`. Ref: `forwardRef` → `HTMLButtonElement`. The default square trigger opens on ↑ / ↓ and calls your `onKeyDown` first; with `asChild` your `onKeyDown` passed to `Trigger` is dropped and there is no ↑ / ↓ handler (put key handlers on the child element itself). `id` is kept (the child's own `id` with `asChild`).
190
+ ### ColorPresets.Swatch
191
+ `ref` → `HTMLSpanElement`. The current color as a small square for a custom trigger; follows the host icon size, `aria-hidden`.
155
192
 
156
- ### ColorPresets.Content
157
193
  | Prop | Type | Default | Description |
158
194
  |---|---|---|---|
159
- | `label` | `ReactNode` | — | Heading above the grid and the list name (else `labels.list`). |
160
- | `align` | `"start" \| "center" \| "end"` | `"start"` | Panel alignment. |
161
- | `side` | `"bottom" \| "top"` | `"bottom"` | Preferred side. |
162
- | `className` | `string` | — | Class on the popover content. |
195
+ | `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other attributes of the `<span>`. |
196
+
197
+ ### ColorPresets.Content
198
+ `ref` → `HTMLDivElement` (the panel). The floating panel with the swatch grid (`role="listbox"`); focus moves to the selected swatch.
163
199
 
164
- ### ColorPresets.Swatch
165
200
  | Prop | Type | Default | Description |
166
201
  |---|---|---|---|
167
- | `className` | `string` | — | Class on the square; sized from the host `--prime-icon-size`, `aria-hidden`. |
168
-
169
- ### Helpers
170
- | Export | Type | Description |
171
- |---|---|---|
172
- | `parseColor(value)` | `(value: string) => Color` | Parses a CSS color (hex, «rgb(0 255 0)», «hsl(220, 90%, 56%)»); throws on invalid input. Back to text: `color.toString("hex" \| "hexa" \| "css")`. |
173
- | `COLOR_PRESETS` | `readonly ColorPreset[]` | 16 colors: step 500 (row 1) and step 700 (row 2) of eight hues; `COLOR_PRESETS.slice(0, 8)` = one row. |
174
- | `ColorPickerColorValue` | type | The `Color` object type. |
175
- | `ColorValueFormat` | `"hsl" \| "rgb" \| "hex"` | Format type. |
202
+ | `label` | `ReactNode` | — | Heading above the grid; also the list's accessible name (else `labels.list`). |
203
+ | `side` | `"top" \| "right" \| "bottom" \| "left"` | `"bottom"` | Side of the trigger. |
204
+ | `align` | `"start" \| "center" \| "end"` | `"start"` | Alignment along the trigger. |
205
+ | `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role">` | — | `className` and the other attributes of the panel. |
176
206
 
177
207
  ## Variants
178
- No `variant`/`tone`/`color`.
208
+ No `variant` / `tone` / `color`.
179
209
 
180
- ### ColorPicker.Panel surface
210
+ ### surface (ColorPicker.Panel)
181
211
  | Value | Looks like | Use when | Default |
182
212
  |---|---|---|---|
183
213
  | `none` | parts stacked with a 12px gap, no own background | inside a Popover or a Card | yes |
184
214
  | `raised` | `bg-raised`, panel radius and padding, `shadow-overlay`; fields switch to `field-bg-surface` | a standalone panel on the page | |
185
215
 
186
- ### ColorPicker.Root defaultFormat
216
+ ### defaultFormat (ColorPicker.Root)
187
217
  | Value | Looks like | Use when | Default |
188
218
  |---|---|---|---|
189
219
  | `hsl` | hue °, saturation %, lightness %, alpha % fields | designers tuning a hue | yes |
@@ -199,100 +229,101 @@ No `variant`/`tone`/`color`.
199
229
  | `l` | 40px, 28px swatches | spacious forms | |
200
230
  | `xl` | 48px, 32px swatches | touch-first screens | |
201
231
 
202
- Area, sliders and channel strip have no size axis (always tier `m`).
232
+ **Sizes:** the ColorPresets trigger is a square of the control height, so it lines up with an Input of the same size; HexInput + a square soft `Button.Root` of the same `size` with `TriggerSwatch` inside `Button.Icon` match too. Area, sliders and the channel strip have no size axis (always tier `m`).
203
233
 
204
- ### ColorPresets flags
234
+ ### Flags
205
235
  | Value | Looks like | Use when | Default |
206
236
  |---|---|---|---|
207
- | `allowEmpty` | checkerboard «Без цвета» swatch at the end | the color is optional | `false` |
208
- | `closeOnSelect={false}` | panel stays open after a pick | trying several colors in a row | `true` |
209
- | `Trigger asChild` | your element (e.g. soft Button with the swatch as its icon) | the trigger needs text | `false` |
237
+ | `allowEmpty` (ColorPresets) | checkerboard «Без цвета» swatch at the end | the color is optional | `false` |
238
+ | `closeOnSelect={false}` (ColorPresets) | panel stays open after a pick | trying several colors in a row | `true` |
239
+ | `asChild` (ColorPresets.Trigger) | your element (e.g. a soft Button with the swatch as its icon) | the trigger needs text | `false` |
240
+ | `disabled` (Area, Slider) | grayscale, no input | the part is locked | — |
210
241
 
211
242
  **Combinations**
212
- - HexInput + a square soft `Button.Root` of the same `size` with `TriggerSwatch` inside `Button.Icon` → field and trigger heights match (see [hex-input-sizes.tsx](examples/hex-input-sizes.tsx)).
213
243
  - `surface="raised"` inside a Popover → double surface; keep `none` there.
214
- - Several Roots with one controlled `value` → all parts edit the same color ([formats.tsx](examples/formats.tsx)).
215
-
216
- **Sizes** — ColorPresets trigger is a square of the control height (28 · 32 · 36 · 40 · 48), so it lines up with an Input of the same size.
217
-
218
- **Hierarchy** — prefer `ColorPresets` when a palette is enough; open the full `ColorPicker` only where any color is valid.
244
+ - Several Roots with one controlled `value` → all parts edit the same color.
245
+ - Prefer `ColorPresets` when a palette is enough; open the full `ColorPicker` only where any color is valid.
219
246
 
220
247
  ## States
221
- | State | Driven by | DOM | Looks like |
222
- |---|---|---|---|
223
- | disabled part | `disabled` on Area / Slider / SwatchPickerItem | RAC `data-disabled` | muted, not interactive |
224
- | focus-visible | keyboard | RAC `data-focus-visible`; `data-focus-ring="false"` on fields with `focusRing={false}` | focus ring on thumb / swatch / inset ring on fields |
225
- | invalid hex | typing | — | reverts to the current color on blur / Enter |
226
- | eyedropper unsupported | no `window.EyeDropper` | button `disabled`, `aria-hidden` | muted square button |
227
- | selected swatch | value | RAC `data-selected` | accent outline with a 2px offset |
228
- | ColorPresets open | `open` / click / ↑ ↓ on trigger | popover `data-state` | swatch grid, focus on the selected swatch |
229
- | ColorPresets empty | value `null` | trigger `data-empty` | checkerboard fill |
230
- | ColorPresets disabled | `disabled` | trigger `data-disabled`, native `disabled` | muted trigger |
231
- | ColorPresets selected | value | option `data-selected`, `aria-selected` | check mark in a contrasting color (`data-contrast="light" \| "dark"`) |
232
-
233
- There is no `disabled` on `ColorPicker.Root` — disable parts individually. ColorPresets panel follows the overlay contract; a nested ColorPresets inside a Popover closes first.
234
- Controlled: `value` + `onValueChange` (both components), `open` + `onOpenChange` (ColorPresets). Uncontrolled: `defaultValue`, `defaultOpen`.
248
+ | State | Driven by | DOM |
249
+ |---|---|---|
250
+ | disabled part | `disabled` on Area / Slider | React Aria `data-disabled`; muted, not interactive |
251
+ | focus-visible | keyboard | React Aria `data-focus-visible`; `data-focus-ring="false"` on fields with `focusRing={false}` |
252
+ | invalid hex | typing | reverts to the current color on blur / Enter |
253
+ | hex error | `error` on HexInput | `aria-invalid`, danger ring, the error replaces the hint |
254
+ | eyedropper unsupported | no `window.EyeDropper` | button `disabled`, `aria-hidden` |
255
+ | selected swatch | the color | `data-state="checked"`; accent ring with a 2px offset and a contrasting check |
256
+ | ColorPresets open | `open` / click / ArrowDown · ArrowUp on the trigger | popover `data-state`; focus on the selected swatch |
257
+ | ColorPresets empty | value `null` | trigger `data-empty`; checkerboard fill |
258
+
259
+ There is no `disabled` on `ColorPicker.Root` — disable parts individually. Controlled: `value` + `onValueChange` (both components), `open` + `onOpenChange` (ColorPresets). Uncontrolled: `defaultValue`, `defaultOpen`.
235
260
 
236
261
  ## Layout & spacing
237
262
  - Panel width comes from the layout (e.g. `calc(var(--prime-panel-min-width) * 1.5)` fits the area and four channel fields).
238
- - Field + trigger row: gap `--prime-space-2`, `align-items: flex-end` so the trigger aligns with the input box under a label.
263
+ - Field + trigger row: gap `--prime-space-2`, `align-items: flex-end` so the trigger aligns with the field box under a label.
239
264
  - Panel parts gap: 12px (`--prime-space-3`) from `ColorPicker.Panel`.
240
265
 
241
266
  ## Accessibility
242
- - Area, sliders and swatches are React Aria primitives (keyboard: arrows, Page Up / Down, Home / End on sliders and area).
243
- - `SwatchPicker` needs `aria-label`; `ColorPicker.Field` needs `aria-label`.
244
- - `TriggerSwatch` is `aria-hidden` — give the trigger button an `aria-label`.
245
- - ColorPresets: trigger name «Цвет: <имя>», ↑ / ↓ on the default trigger opens (not with `asChild`: Enter / Space on the child); the grid is `role="listbox"` with `role="option"` swatches (roving tabindex): arrows move, Home / End, Enter / Space pick (and close), Tab returns to the trigger and closes, Escape closes.
246
- - `ColorPicker` `labels` keys (defaults):
247
- - `format` — «Формат значений цвета»
248
- - `eyeDropper` — «Пипетка»
249
- - `hex` — «Hex»
250
- - `hue` — «Оттенок, градусы»
251
- - `saturation` — «Насыщенность, проценты»
252
- - `lightness` — «Яркость, проценты»
253
- - `alpha` — «Непрозрачность, проценты»
254
- - `red` — «Красный, 0–255»
255
- - `green` — «Зелёный, 0–255»
256
- - `blue` — «Синий, 0–255»
257
- - `ColorPresets` `labels` keys (defaults):
258
- - `trigger` — «Цвет» (name prefix: «Цвет: Синий»)
259
- - `list` — «Цвета» (list name without `Content label`)
260
- - `empty` — «Без цвета»
261
267
 
262
- ## Examples
263
- | File | Scenario | When to use this pattern |
268
+ ### Keyboard
269
+ | Key | Action |
270
+ |---|---|
271
+ | `ArrowLeft` · `ArrowRight` · `ArrowUp` · `ArrowDown` | Move the area thumb or a slider; in the ColorPresets grid, move between swatches. |
272
+ | `PageUp` · `PageDown` | Larger steps on the area and the sliders. |
273
+ | `Home` · `End` | Slider ends; the first / last swatch in the ColorPresets grid. |
274
+ | `Enter` · `Space` | Commit a field; pick the focused preset swatch and close. |
275
+ | `Tab` | Moves through the parts; inside the ColorPresets grid returns to the trigger and closes. |
276
+ | `Escape` | Closes the ColorPresets panel. |
277
+
278
+ ### ARIA
279
+ - Area and sliders are React Aria primitives with their own `role="slider"` names.
280
+ - `TriggerSwatch` and `ColorPresets.Swatch` are `aria-hidden` — give the trigger button an `aria-label` (ColorPresets.Trigger names itself «`labels.trigger`: <color name>»).
281
+ - `ColorPicker.Swatches` is a `role="radiogroup"` (ColorSwatches): name it with `label` or `aria-label`.
282
+ - The ColorPresets grid is `role="listbox"` with `role="option"` swatches (roving tabindex), named by the Content `label` or `labels.list`.
283
+ - Channel fields are named by `labels` (`hue`, `red`…); HexInput by its label (`labels.hex` by default).
284
+
285
+ ### Labels
286
+ <!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
287
+
288
+ | Key | Default | Used for |
264
289
  |---|---|---|
265
- | [panel.tsx](examples/panel.tsx) | Raised panel: FormatSelect, Area, hue + alpha sliders, ChannelStrip, swatches | Full picker layout |
266
- | [hex-input-sizes.tsx](examples/hex-input-sizes.tsx) | HexInput in all sizes + square trigger opening the panel in a Popover | Color field in forms |
267
- | [formats.tsx](examples/formats.tsx) | `defaultFormat` hsl / rgb / hex sharing one controlled value | Choosing the edit format |
268
- | [states.tsx](examples/states.tsx) | Disabled area, slider and swatch; HexInput | Part-level states |
269
- | [brand-color.tsx](examples/brand-color.tsx) | Controlled `Color` with `parseColor`, popover panel, brand swatches, preview, reset in a Card | Brand / theme settings |
270
- | [presets-quick.tsx](examples/presets-quick.tsx) | ColorPresets: one row + `allowEmpty`, default 8×2 with `label`, `Trigger asChild` | Quick color from a palette |
271
- | [presets-sizes.tsx](examples/presets-sizes.tsx) | ColorPresets in all sizes next to Input | Aligning with fields |
272
- | [presets-tags.tsx](examples/presets-tags.tsx) | Size `s` ColorPresets per row inside a Popover | Per-item colors in lists |
273
-
274
- ```tsx
275
- import { COLOR_PRESETS, ColorPresets } from "prime-ui-kit";
290
+ | `format` | `"Формат значений цвета"` | Name of `ColorPicker.FormatSelect`. |
291
+ | `eyeDropper` | `"Пипетка"` | Name of `ColorPicker.EyeDropperButton`. |
292
+ | `hex` | `"Hex"` | Hex field of `ChannelStrip` and the default `HexInput` label. |
293
+ | `hue` | `"Оттенок, градусы"` | Hue channel field. |
294
+ | `saturation` | `"Насыщенность, проценты"` | Saturation channel field. |
295
+ | `lightness` | `"Яркость, проценты"` | Lightness channel field. |
296
+ | `alpha` | `"Непрозрачность, проценты"` | Alpha channel field. |
297
+ | `red` | `"Красный, 0–255"` | Red channel field. |
298
+ | `green` | `"Зелёный, 0–255"` | Green channel field. |
299
+ | `blue` | `"Синий, 0–255"` | Blue channel field. |
300
+ | `trigger` | `"Цвет"` | ColorPresets trigger name prefix: «<trigger>: <color name>». |
301
+ | `list` | `"Цвета"` | ColorPresets swatch list name when `Content` has no `label`. |
302
+ | `empty` | `"Без цвета"` | ColorPresets «no color» swatch and the trigger name for an empty value. |
276
303
 
277
- export function TagColor() {
278
- return (
279
- <ColorPresets.Root defaultValue={COLOR_PRESETS[5]?.value} allowEmpty>
280
- <ColorPresets.Trigger />
281
- <ColorPresets.Content />
282
- </ColorPresets.Root>
283
- );
284
- }
285
- ```
304
+ ## Examples
305
+ | Example | Shows |
306
+ |---|---|
307
+ | [overview.tsx](examples/overview.tsx) | A color field: a hex value and a swatch button that opens the picker panel — `ColorPicker.HexInput`, `ColorPicker.TriggerSwatch`. |
308
+ | [sizes.tsx](examples/sizes.tsx) | Every size of the hex field with a swatch button of the same tier — `size`. |
309
+ | [states.tsx](examples/states.tsx) | A disabled area and hue slider keep showing the color but take no input — `disabled`. |
310
+ | [validation.tsx](examples/validation.tsx) | A hint under the hex field and an error that replaces it; invalid text reverts on blur — `hint`, `error`. |
311
+ | [panel.tsx](examples/panel.tsx) | The full raised panel and its part order: format, area, hue and alpha sliders, channels, brand swatches — `ColorPicker.Panel`, `surface`, `ColorPicker.Swatches`. |
312
+ | [formats.tsx](examples/formats.tsx) | The channel strip in each value format; three pickers edit one color — `defaultFormat`, `ColorPicker.ChannelStrip`. |
313
+ | [presets.tsx](examples/presets.tsx) | A quick color from the palette: a square trigger next to a field and a Button trigger; «no color» allowed — `ColorPresets`, `allowEmpty`, `asChild`. |
314
+ | [presets-sizes.tsx](examples/presets-sizes.tsx) | The preset trigger in every size, a square of the control height next to an input of the same tier — `ColorPresets`, `size`. |
315
+ | [controlled.tsx](examples/controlled.tsx) | The parent owns the color: brand swatches and the hex field edit it, a button resets it — `value`, `onValueChange`. |
316
+ | [in-form.tsx](examples/in-form.tsx) | Theme settings: the color goes with the form and a too light color fails on save — `value`, `error`. |
286
317
 
287
318
  ## Mistakes
288
319
  - Trigger in one `ColorPicker.Root` and panel in another → they will not share the color; wrap both in one Root.
289
- - `isDisabled` on Area / Slider / SwatchPickerItem → use `disabled`.
290
- - `onChange` on `ColorPicker.Root` or `SwatchPicker` → use `onValueChange`.
320
+ - `isDisabled` on Area / Slider → use `disabled`.
321
+ - `onChange` on `ColorPicker.Root` → use `onValueChange`.
291
322
  - `parseColor` on raw user input without try/catch → it throws on invalid strings.
292
323
  - `surface="raised"` inside a Popover → use the default `none`.
293
- - `SwatchPicker` without `aria-label` → the group has no name.
294
324
  - Expecting `ColorPresets` to return a `Color` → it returns the preset string (or `null`).
295
325
  - `<ColorPresets.Trigger asChild onKeyDown={…}>` → the handler is dropped; put it on the child element.
296
326
 
297
327
  ## Related
298
- [Popover](../popover/COMPONENT.md) · [Input](../input/COMPONENT.md) · [Select](../select/COMPONENT.md) · [TagSelect](../tag-select/COMPONENT.md) · [Button](../button/COMPONENT.md)
328
+ - **Built from:** [Input](../input/COMPONENT.md) (`HexInput`), [Select](../select/COMPONENT.md) (`FormatSelect`), [Button](../button/COMPONENT.md) (`EyeDropperButton`), [ColorSwatches](../color-swatches/COMPONENT.md) (`Swatches`), [Popover](../popover/COMPONENT.md) (`ColorPresets.Content`), `Icon` (check, pipette)
329
+ - **See also:** [ColorSwatches](../color-swatches/COMPONENT.md), [TagSelect](../tag-select/COMPONENT.md)
@@ -0,0 +1,37 @@
1
+ /** The parent owns the color: brand swatches and the hex field edit it, a button resets it — `value`, `onValueChange`. */
2
+ import { Button } from "prime-ui-kit";
3
+ import { ColorPicker, parseColor } from "prime-ui-kit/color-picker";
4
+ import * as React from "react";
5
+
6
+ import styles from "./examples.module.css";
7
+
8
+ const DEFAULT_COLOR = "#5b5bd6";
9
+ const BRAND_COLORS = [
10
+ { value: "#5b5bd6", label: "Индиго" },
11
+ { value: "#0090ff", label: "Синий" },
12
+ { value: "#12a594", label: "Бирюзовый" },
13
+ { value: "#f76b15", label: "Оранжевый" },
14
+ { value: "#e5484d", label: "Красный" },
15
+ ];
16
+
17
+ export default function ColorPickerControlledExample() {
18
+ const [color, setColor] = React.useState(() => parseColor(DEFAULT_COLOR));
19
+
20
+ return (
21
+ <div className={styles.panel}>
22
+ <ColorPicker.Root value={color} onValueChange={setColor}>
23
+ <ColorPicker.HexInput label="Цвет витрины" hint={`Сейчас: ${color.toString("hex")}`} />
24
+ <ColorPicker.Swatches aria-label="Цвета бренда" presets={BRAND_COLORS} />
25
+ </ColorPicker.Root>
26
+ <div>
27
+ <Button.Root
28
+ variant="soft"
29
+ tone="neutral"
30
+ onClick={() => setColor(parseColor(DEFAULT_COLOR))}
31
+ >
32
+ Сбросить
33
+ </Button.Root>
34
+ </div>
35
+ </div>
36
+ );
37
+ }