@archytechtor/ui 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -2
  3. package/dist/components/accordion/accordion.d.ts +25 -0
  4. package/dist/components/accordion/accordion.js +88 -0
  5. package/dist/components/accordion/index.d.ts +3 -0
  6. package/dist/components/accordion/index.js +1 -0
  7. package/dist/components/accordion/types.d.ts +39 -0
  8. package/dist/components/alert/alert.d.ts +25 -0
  9. package/dist/components/alert/alert.js +59 -0
  10. package/dist/components/alert/index.d.ts +3 -0
  11. package/dist/components/alert/index.js +3 -0
  12. package/dist/components/alert/types.d.ts +32 -0
  13. package/dist/components/alert/types.js +19 -0
  14. package/dist/components/alert-dialog/alert-dialog.d.ts +73 -0
  15. package/dist/components/alert-dialog/alert-dialog.js +170 -0
  16. package/dist/components/alert-dialog/index.d.ts +3 -0
  17. package/dist/components/alert-dialog/index.js +1 -0
  18. package/dist/components/alert-dialog/types.d.ts +80 -0
  19. package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
  20. package/dist/components/aspect-ratio/aspect-ratio.js +20 -0
  21. package/dist/components/aspect-ratio/index.d.ts +3 -0
  22. package/dist/components/aspect-ratio/index.js +1 -0
  23. package/dist/components/aspect-ratio/types.d.ts +8 -0
  24. package/dist/components/attachment/attachment.d.ts +57 -0
  25. package/dist/components/attachment/attachment.js +139 -0
  26. package/dist/components/attachment/index.d.ts +3 -0
  27. package/dist/components/attachment/index.js +3 -0
  28. package/dist/components/attachment/types.d.ts +79 -0
  29. package/dist/components/attachment/types.js +43 -0
  30. package/dist/components/avatar/avatar.d.ts +39 -0
  31. package/dist/components/avatar/avatar.js +88 -0
  32. package/dist/components/avatar/index.d.ts +3 -0
  33. package/dist/components/avatar/index.js +3 -0
  34. package/dist/components/avatar/types.d.ts +54 -0
  35. package/dist/components/avatar/types.js +21 -0
  36. package/dist/components/badge/badge.d.ts +7 -0
  37. package/dist/components/badge/badge.js +23 -0
  38. package/dist/components/badge/index.d.ts +3 -0
  39. package/dist/components/badge/index.js +3 -0
  40. package/dist/components/badge/types.d.ts +21 -0
  41. package/dist/components/badge/types.js +26 -0
  42. package/dist/components/bottom-nav/bottom-nav.d.ts +19 -0
  43. package/dist/components/bottom-nav/bottom-nav.js +59 -0
  44. package/dist/components/bottom-nav/index.d.ts +3 -0
  45. package/dist/components/bottom-nav/index.js +3 -0
  46. package/dist/components/bottom-nav/types.d.ts +45 -0
  47. package/dist/components/bottom-nav/types.js +44 -0
  48. package/dist/components/box/box.d.ts +7 -0
  49. package/dist/components/box/box.js +26 -0
  50. package/dist/components/box/index.d.ts +3 -0
  51. package/dist/components/box/index.js +3 -0
  52. package/dist/components/box/types.d.ts +23 -0
  53. package/dist/components/box/types.js +27 -0
  54. package/dist/components/breadcrumb/breadcrumb.d.ts +43 -0
  55. package/dist/components/breadcrumb/breadcrumb.js +115 -0
  56. package/dist/components/breadcrumb/index.d.ts +3 -0
  57. package/dist/components/breadcrumb/index.js +1 -0
  58. package/dist/components/breadcrumb/types.d.ts +36 -0
  59. package/dist/components/bubble/bubble.d.ts +25 -0
  60. package/dist/components/bubble/bubble.js +69 -0
  61. package/dist/components/bubble/index.d.ts +3 -0
  62. package/dist/components/bubble/index.js +3 -0
  63. package/dist/components/bubble/types.d.ts +51 -0
  64. package/dist/components/bubble/types.js +60 -0
  65. package/dist/components/button/button.d.ts +7 -0
  66. package/dist/components/button/button.js +155 -0
  67. package/dist/components/button/index.d.ts +4 -0
  68. package/dist/components/button/index.js +4 -0
  69. package/dist/components/button/types.d.ts +80 -0
  70. package/dist/components/button/types.js +99 -0
  71. package/dist/components/button/use-hold-to-confirm.d.ts +25 -0
  72. package/dist/components/button/use-hold-to-confirm.js +161 -0
  73. package/dist/components/button-group/button-group.d.ts +20 -0
  74. package/dist/components/button-group/button-group.js +62 -0
  75. package/dist/components/button-group/index.d.ts +3 -0
  76. package/dist/components/button-group/index.js +3 -0
  77. package/dist/components/button-group/types.d.ts +30 -0
  78. package/dist/components/button-group/types.js +19 -0
  79. package/dist/components/calendar/calendar.d.ts +15 -0
  80. package/dist/components/calendar/calendar.js +157 -0
  81. package/dist/components/calendar/index.d.ts +3 -0
  82. package/dist/components/calendar/index.js +1 -0
  83. package/dist/components/calendar/types.d.ts +21 -0
  84. package/dist/components/card/card.d.ts +43 -0
  85. package/dist/components/card/card.js +97 -0
  86. package/dist/components/card/index.d.ts +3 -0
  87. package/dist/components/card/index.js +3 -0
  88. package/dist/components/card/types.d.ts +44 -0
  89. package/dist/components/card/types.js +19 -0
  90. package/dist/components/carousel/carousel.d.ts +36 -0
  91. package/dist/components/carousel/carousel.js +190 -0
  92. package/dist/components/carousel/index.d.ts +3 -0
  93. package/dist/components/carousel/index.js +1 -0
  94. package/dist/components/carousel/types.d.ts +79 -0
  95. package/dist/components/chart/chart.d.ts +35 -0
  96. package/dist/components/chart/chart.js +212 -0
  97. package/dist/components/chart/index.d.ts +3 -0
  98. package/dist/components/chart/index.js +1 -0
  99. package/dist/components/chart/types.d.ts +89 -0
  100. package/dist/components/chart/types.js +7 -0
  101. package/dist/components/checkbox/checkbox.d.ts +7 -0
  102. package/dist/components/checkbox/checkbox.js +31 -0
  103. package/dist/components/checkbox/index.d.ts +3 -0
  104. package/dist/components/checkbox/index.js +1 -0
  105. package/dist/components/checkbox/types.d.ts +25 -0
  106. package/dist/components/code-block/code-block.d.ts +49 -0
  107. package/dist/components/code-block/code-block.js +188 -0
  108. package/dist/components/code-block/highlighter.d.ts +15 -0
  109. package/dist/components/code-block/highlighter.js +123 -0
  110. package/dist/components/code-block/index.d.ts +5 -0
  111. package/dist/components/code-block/index.js +5 -0
  112. package/dist/components/code-block/types.d.ts +94 -0
  113. package/dist/components/code-block/types.js +38 -0
  114. package/dist/components/code-block/use-highlighted-code.d.ts +9 -0
  115. package/dist/components/code-block/use-highlighted-code.js +67 -0
  116. package/dist/components/collapsible/collapsible.d.ts +19 -0
  117. package/dist/components/collapsible/collapsible.js +44 -0
  118. package/dist/components/collapsible/index.d.ts +3 -0
  119. package/dist/components/collapsible/index.js +1 -0
  120. package/dist/components/collapsible/types.d.ts +26 -0
  121. package/dist/components/combobox/combobox.d.ts +104 -0
  122. package/dist/components/combobox/combobox.js +365 -0
  123. package/dist/components/combobox/index.d.ts +3 -0
  124. package/dist/components/combobox/index.js +1 -0
  125. package/dist/components/combobox/types.d.ts +229 -0
  126. package/dist/components/command/command.d.ts +55 -0
  127. package/dist/components/command/command.js +179 -0
  128. package/dist/components/command/index.d.ts +3 -0
  129. package/dist/components/command/index.js +1 -0
  130. package/dist/components/command/types.d.ts +69 -0
  131. package/dist/components/context-menu/context-menu.d.ts +92 -0
  132. package/dist/components/context-menu/context-menu.js +270 -0
  133. package/dist/components/context-menu/index.d.ts +3 -0
  134. package/dist/components/context-menu/index.js +1 -0
  135. package/dist/components/context-menu/types.d.ts +138 -0
  136. package/dist/components/data-table/data-table-features.d.ts +21 -0
  137. package/dist/components/data-table/data-table-features.js +22 -0
  138. package/dist/components/data-table/data-table.d.ts +69 -0
  139. package/dist/components/data-table/data-table.js +283 -0
  140. package/dist/components/data-table/index.d.ts +4 -0
  141. package/dist/components/data-table/index.js +3 -0
  142. package/dist/components/data-table/types.d.ts +63 -0
  143. package/dist/components/date-input/date-input.d.ts +7 -0
  144. package/dist/components/date-input/date-input.js +147 -0
  145. package/dist/components/date-input/index.d.ts +3 -0
  146. package/dist/components/date-input/index.js +1 -0
  147. package/dist/components/date-input/types.d.ts +27 -0
  148. package/dist/components/date-picker/date-picker.d.ts +7 -0
  149. package/dist/components/date-picker/date-picker.js +74 -0
  150. package/dist/components/date-picker/index.d.ts +3 -0
  151. package/dist/components/date-picker/index.js +1 -0
  152. package/dist/components/date-picker/types.d.ts +38 -0
  153. package/dist/components/date-range-picker/date-range-picker.d.ts +7 -0
  154. package/dist/components/date-range-picker/date-range-picker.js +89 -0
  155. package/dist/components/date-range-picker/index.d.ts +3 -0
  156. package/dist/components/date-range-picker/index.js +1 -0
  157. package/dist/components/date-range-picker/types.d.ts +43 -0
  158. package/dist/components/dialog/dialog.d.ts +61 -0
  159. package/dist/components/dialog/dialog.js +160 -0
  160. package/dist/components/dialog/index.d.ts +3 -0
  161. package/dist/components/dialog/index.js +1 -0
  162. package/dist/components/dialog/types.d.ts +68 -0
  163. package/dist/components/drawer/drawer.d.ts +69 -0
  164. package/dist/components/drawer/drawer.js +245 -0
  165. package/dist/components/drawer/index.d.ts +3 -0
  166. package/dist/components/drawer/index.js +1 -0
  167. package/dist/components/drawer/types.d.ts +93 -0
  168. package/dist/components/dropdown-menu/dropdown-menu.d.ts +92 -0
  169. package/dist/components/dropdown-menu/dropdown-menu.js +268 -0
  170. package/dist/components/dropdown-menu/index.d.ts +3 -0
  171. package/dist/components/dropdown-menu/index.js +1 -0
  172. package/dist/components/dropdown-menu/types.d.ts +143 -0
  173. package/dist/components/empty/empty.d.ts +37 -0
  174. package/dist/components/empty/empty.js +84 -0
  175. package/dist/components/empty/index.d.ts +3 -0
  176. package/dist/components/empty/index.js +3 -0
  177. package/dist/components/empty/types.d.ts +39 -0
  178. package/dist/components/empty/types.js +13 -0
  179. package/dist/components/expanded-card/expanded-card.d.ts +43 -0
  180. package/dist/components/expanded-card/expanded-card.js +352 -0
  181. package/dist/components/expanded-card/index.d.ts +3 -0
  182. package/dist/components/expanded-card/index.js +1 -0
  183. package/dist/components/expanded-card/types.d.ts +52 -0
  184. package/dist/components/field/field.d.ts +62 -0
  185. package/dist/components/field/field.js +173 -0
  186. package/dist/components/field/index.d.ts +3 -0
  187. package/dist/components/field/index.js +3 -0
  188. package/dist/components/field/types.d.ts +81 -0
  189. package/dist/components/field/types.js +21 -0
  190. package/dist/components/form/form.d.ts +49 -0
  191. package/dist/components/form/form.js +136 -0
  192. package/dist/components/form/index.d.ts +3 -0
  193. package/dist/components/form/index.js +1 -0
  194. package/dist/components/form/types.d.ts +59 -0
  195. package/dist/components/grid/grid.d.ts +7 -0
  196. package/dist/components/grid/grid.js +36 -0
  197. package/dist/components/grid/index.d.ts +3 -0
  198. package/dist/components/grid/index.js +3 -0
  199. package/dist/components/grid/types.d.ts +35 -0
  200. package/dist/components/grid/types.js +102 -0
  201. package/dist/components/hover-card/hover-card.d.ts +19 -0
  202. package/dist/components/hover-card/hover-card.js +63 -0
  203. package/dist/components/hover-card/index.d.ts +3 -0
  204. package/dist/components/hover-card/index.js +1 -0
  205. package/dist/components/hover-card/types.d.ts +27 -0
  206. package/dist/components/image-gallery/image-gallery.d.ts +8 -0
  207. package/dist/components/image-gallery/image-gallery.js +294 -0
  208. package/dist/components/image-gallery/index.d.ts +4 -0
  209. package/dist/components/image-gallery/index.js +3 -0
  210. package/dist/components/image-gallery/masonry.d.ts +11 -0
  211. package/dist/components/image-gallery/masonry.js +62 -0
  212. package/dist/components/image-gallery/types.d.ts +80 -0
  213. package/dist/components/input/index.d.ts +3 -0
  214. package/dist/components/input/index.js +1 -0
  215. package/dist/components/input/input.d.ts +7 -0
  216. package/dist/components/input/input.js +18 -0
  217. package/dist/components/input/types.d.ts +28 -0
  218. package/dist/components/input-group/index.d.ts +3 -0
  219. package/dist/components/input-group/index.js +3 -0
  220. package/dist/components/input-group/input-group.d.ts +37 -0
  221. package/dist/components/input-group/input-group.js +103 -0
  222. package/dist/components/input-group/types.d.ts +64 -0
  223. package/dist/components/input-group/types.js +31 -0
  224. package/dist/components/input-otp/index.d.ts +3 -0
  225. package/dist/components/input-otp/index.js +1 -0
  226. package/dist/components/input-otp/input-otp.d.ts +25 -0
  227. package/dist/components/input-otp/input-otp.js +76 -0
  228. package/dist/components/input-otp/types.d.ts +43 -0
  229. package/dist/components/item/index.d.ts +3 -0
  230. package/dist/components/item/index.js +3 -0
  231. package/dist/components/item/item.d.ts +61 -0
  232. package/dist/components/item/item.js +149 -0
  233. package/dist/components/item/types.d.ts +75 -0
  234. package/dist/components/item/types.js +48 -0
  235. package/dist/components/kbd/index.d.ts +3 -0
  236. package/dist/components/kbd/index.js +1 -0
  237. package/dist/components/kbd/kbd.d.ts +13 -0
  238. package/dist/components/kbd/kbd.js +30 -0
  239. package/dist/components/kbd/types.d.ts +9 -0
  240. package/dist/components/label/index.d.ts +3 -0
  241. package/dist/components/label/index.js +1 -0
  242. package/dist/components/label/label.d.ts +7 -0
  243. package/dist/components/label/label.js +17 -0
  244. package/dist/components/label/types.d.ts +8 -0
  245. package/dist/components/loader/index.d.ts +3 -0
  246. package/dist/components/loader/index.js +3 -0
  247. package/dist/components/loader/loader.d.ts +8 -0
  248. package/dist/components/loader/loader.js +386 -0
  249. package/dist/components/loader/types.d.ts +27 -0
  250. package/dist/components/loader/types.js +58 -0
  251. package/dist/components/marker/index.d.ts +3 -0
  252. package/dist/components/marker/index.js +3 -0
  253. package/dist/components/marker/marker.d.ts +19 -0
  254. package/dist/components/marker/marker.js +51 -0
  255. package/dist/components/marker/types.d.ts +30 -0
  256. package/dist/components/marker/types.js +16 -0
  257. package/dist/components/menubar/index.d.ts +3 -0
  258. package/dist/components/menubar/index.js +1 -0
  259. package/dist/components/menubar/menubar.d.ts +98 -0
  260. package/dist/components/menubar/menubar.js +284 -0
  261. package/dist/components/menubar/types.d.ts +146 -0
  262. package/dist/components/message/index.d.ts +3 -0
  263. package/dist/components/message/index.js +1 -0
  264. package/dist/components/message/message.d.ts +37 -0
  265. package/dist/components/message/message.js +83 -0
  266. package/dist/components/message/types.d.ts +32 -0
  267. package/dist/components/message-scroller/index.d.ts +4 -0
  268. package/dist/components/message-scroller/index.js +3 -0
  269. package/dist/components/message-scroller/message-scroller-primitive.d.ts +21 -0
  270. package/dist/components/message-scroller/message-scroller-primitive.js +1349 -0
  271. package/dist/components/message-scroller/message-scroller.d.ts +39 -0
  272. package/dist/components/message-scroller/message-scroller.js +103 -0
  273. package/dist/components/message-scroller/types.d.ts +107 -0
  274. package/dist/components/money-input/index.d.ts +3 -0
  275. package/dist/components/money-input/index.js +1 -0
  276. package/dist/components/money-input/money-input.d.ts +7 -0
  277. package/dist/components/money-input/money-input.js +143 -0
  278. package/dist/components/money-input/types.d.ts +20 -0
  279. package/dist/components/morph-image/index.d.ts +3 -0
  280. package/dist/components/morph-image/index.js +3 -0
  281. package/dist/components/morph-image/morph-image.d.ts +8 -0
  282. package/dist/components/morph-image/morph-image.js +155 -0
  283. package/dist/components/morph-image/types.d.ts +38 -0
  284. package/dist/components/morph-image/types.js +18 -0
  285. package/dist/components/native-select/index.d.ts +3 -0
  286. package/dist/components/native-select/index.js +3 -0
  287. package/dist/components/native-select/native-select.d.ts +20 -0
  288. package/dist/components/native-select/native-select.js +57 -0
  289. package/dist/components/native-select/types.d.ts +52 -0
  290. package/dist/components/native-select/types.js +23 -0
  291. package/dist/components/navigation-menu/index.d.ts +3 -0
  292. package/dist/components/navigation-menu/index.js +3 -0
  293. package/dist/components/navigation-menu/navigation-menu.d.ts +50 -0
  294. package/dist/components/navigation-menu/navigation-menu.js +145 -0
  295. package/dist/components/navigation-menu/types.d.ts +79 -0
  296. package/dist/components/navigation-menu/types.js +15 -0
  297. package/dist/components/number-stepper/index.d.ts +3 -0
  298. package/dist/components/number-stepper/index.js +3 -0
  299. package/dist/components/number-stepper/number-stepper.d.ts +9 -0
  300. package/dist/components/number-stepper/number-stepper.js +223 -0
  301. package/dist/components/number-stepper/types.d.ts +47 -0
  302. package/dist/components/number-stepper/types.js +174 -0
  303. package/dist/components/pagination/index.d.ts +3 -0
  304. package/dist/components/pagination/index.js +1 -0
  305. package/dist/components/pagination/pagination.d.ts +43 -0
  306. package/dist/components/pagination/pagination.js +121 -0
  307. package/dist/components/pagination/types.d.ts +37 -0
  308. package/dist/components/phone-input/index.d.ts +3 -0
  309. package/dist/components/phone-input/index.js +1 -0
  310. package/dist/components/phone-input/phone-input.d.ts +7 -0
  311. package/dist/components/phone-input/phone-input.js +54 -0
  312. package/dist/components/phone-input/types.d.ts +12 -0
  313. package/dist/components/popover/index.d.ts +3 -0
  314. package/dist/components/popover/index.js +1 -0
  315. package/dist/components/popover/popover.d.ts +37 -0
  316. package/dist/components/popover/popover.js +100 -0
  317. package/dist/components/popover/types.d.ts +51 -0
  318. package/dist/components/progress/index.d.ts +3 -0
  319. package/dist/components/progress/index.js +1 -0
  320. package/dist/components/progress/progress.d.ts +32 -0
  321. package/dist/components/progress/progress.js +100 -0
  322. package/dist/components/progress/types.d.ts +31 -0
  323. package/dist/components/questionnaire/index.d.ts +3 -0
  324. package/dist/components/questionnaire/index.js +1 -0
  325. package/dist/components/questionnaire/questionnaire-primitive.js +1563 -0
  326. package/dist/components/questionnaire/questionnaire.d.ts +91 -0
  327. package/dist/components/questionnaire/questionnaire.js +315 -0
  328. package/dist/components/questionnaire/types.d.ts +203 -0
  329. package/dist/components/radio-group/index.d.ts +3 -0
  330. package/dist/components/radio-group/index.js +1 -0
  331. package/dist/components/radio-group/radio-group.d.ts +13 -0
  332. package/dist/components/radio-group/radio-group.js +44 -0
  333. package/dist/components/radio-group/types.d.ts +33 -0
  334. package/dist/components/reorder-list/index.d.ts +3 -0
  335. package/dist/components/reorder-list/index.js +1 -0
  336. package/dist/components/reorder-list/reorder-list.d.ts +19 -0
  337. package/dist/components/reorder-list/reorder-list.js +279 -0
  338. package/dist/components/reorder-list/types.d.ts +65 -0
  339. package/dist/components/resizable/index.d.ts +3 -0
  340. package/dist/components/resizable/index.js +1 -0
  341. package/dist/components/resizable/resizable.d.ts +19 -0
  342. package/dist/components/resizable/resizable.js +44 -0
  343. package/dist/components/resizable/types.d.ts +89 -0
  344. package/dist/components/scroll-area/index.d.ts +3 -0
  345. package/dist/components/scroll-area/index.js +1 -0
  346. package/dist/components/scroll-area/scroll-area.d.ts +13 -0
  347. package/dist/components/scroll-area/scroll-area.js +47 -0
  348. package/dist/components/scroll-area/types.d.ts +19 -0
  349. package/dist/components/select/index.d.ts +3 -0
  350. package/dist/components/select/index.js +1 -0
  351. package/dist/components/select/select.d.ts +61 -0
  352. package/dist/components/select/select.js +183 -0
  353. package/dist/components/select/types.d.ts +100 -0
  354. package/dist/components/separator/index.d.ts +3 -0
  355. package/dist/components/separator/index.js +1 -0
  356. package/dist/components/separator/separator.d.ts +7 -0
  357. package/dist/components/separator/separator.js +20 -0
  358. package/dist/components/separator/types.d.ts +9 -0
  359. package/dist/components/sheet/index.d.ts +3 -0
  360. package/dist/components/sheet/index.js +1 -0
  361. package/dist/components/sheet/sheet.d.ts +61 -0
  362. package/dist/components/sheet/sheet.js +155 -0
  363. package/dist/components/sheet/types.d.ts +69 -0
  364. package/dist/components/sidebar/index.d.ts +3 -0
  365. package/dist/components/sidebar/index.js +3 -0
  366. package/dist/components/sidebar/sidebar.d.ts +145 -0
  367. package/dist/components/sidebar/sidebar.js +550 -0
  368. package/dist/components/sidebar/types.d.ts +186 -0
  369. package/dist/components/sidebar/types.js +42 -0
  370. package/dist/components/sidebar/use-mobile.js +21 -0
  371. package/dist/components/skeleton/index.d.ts +3 -0
  372. package/dist/components/skeleton/index.js +1 -0
  373. package/dist/components/skeleton/skeleton.d.ts +8 -0
  374. package/dist/components/skeleton/skeleton.js +18 -0
  375. package/dist/components/skeleton/types.d.ts +5 -0
  376. package/dist/components/slider/index.d.ts +3 -0
  377. package/dist/components/slider/index.js +1 -0
  378. package/dist/components/slider/slider.d.ts +7 -0
  379. package/dist/components/slider/slider.js +106 -0
  380. package/dist/components/slider/types.d.ts +39 -0
  381. package/dist/components/spinner/index.d.ts +3 -0
  382. package/dist/components/spinner/index.js +1 -0
  383. package/dist/components/spinner/spinner.d.ts +7 -0
  384. package/dist/components/spinner/spinner.js +21 -0
  385. package/dist/components/spinner/types.d.ts +8 -0
  386. package/dist/components/stack/index.d.ts +3 -0
  387. package/dist/components/stack/index.js +3 -0
  388. package/dist/components/stack/stack.d.ts +7 -0
  389. package/dist/components/stack/stack.js +29 -0
  390. package/dist/components/stack/types.d.ts +56 -0
  391. package/dist/components/stack/types.js +62 -0
  392. package/dist/components/statistics/index.d.ts +3 -0
  393. package/dist/components/statistics/index.js +3 -0
  394. package/dist/components/statistics/statistics.d.ts +31 -0
  395. package/dist/components/statistics/statistics.js +141 -0
  396. package/dist/components/statistics/types.d.ts +84 -0
  397. package/dist/components/statistics/types.js +27 -0
  398. package/dist/components/switch/index.d.ts +3 -0
  399. package/dist/components/switch/index.js +3 -0
  400. package/dist/components/switch/switch.d.ts +7 -0
  401. package/dist/components/switch/switch.js +32 -0
  402. package/dist/components/switch/types.d.ts +37 -0
  403. package/dist/components/switch/types.js +23 -0
  404. package/dist/components/table/index.d.ts +3 -0
  405. package/dist/components/table/index.js +1 -0
  406. package/dist/components/table/table.d.ts +49 -0
  407. package/dist/components/table/table.js +112 -0
  408. package/dist/components/table/types.d.ts +33 -0
  409. package/dist/components/tabs/index.d.ts +3 -0
  410. package/dist/components/tabs/index.js +3 -0
  411. package/dist/components/tabs/tabs.d.ts +25 -0
  412. package/dist/components/tabs/tabs.js +81 -0
  413. package/dist/components/tabs/types.d.ts +61 -0
  414. package/dist/components/tabs/types.js +18 -0
  415. package/dist/components/textarea/index.d.ts +3 -0
  416. package/dist/components/textarea/index.js +1 -0
  417. package/dist/components/textarea/textarea.d.ts +7 -0
  418. package/dist/components/textarea/textarea.js +17 -0
  419. package/dist/components/textarea/types.d.ts +26 -0
  420. package/dist/components/toast/index.d.ts +3 -0
  421. package/dist/components/toast/index.js +1 -0
  422. package/dist/components/toast/toast.d.ts +63 -0
  423. package/dist/components/toast/toast.js +321 -0
  424. package/dist/components/toast/types.d.ts +120 -0
  425. package/dist/components/toggle/index.d.ts +3 -0
  426. package/dist/components/toggle/index.js +3 -0
  427. package/dist/components/toggle/toggle.d.ts +7 -0
  428. package/dist/components/toggle/toggle.js +32 -0
  429. package/dist/components/toggle/types.d.ts +35 -0
  430. package/dist/components/toggle/types.js +37 -0
  431. package/dist/components/toggle-group/index.d.ts +3 -0
  432. package/dist/components/toggle-group/index.js +1 -0
  433. package/dist/components/toggle-group/toggle-group.d.ts +13 -0
  434. package/dist/components/toggle-group/toggle-group.js +88 -0
  435. package/dist/components/toggle-group/types.d.ts +52 -0
  436. package/dist/components/tooltip/index.d.ts +3 -0
  437. package/dist/components/tooltip/index.js +1 -0
  438. package/dist/components/tooltip/tooltip.d.ts +25 -0
  439. package/dist/components/tooltip/tooltip.js +79 -0
  440. package/dist/components/tooltip/types.d.ts +48 -0
  441. package/dist/components/trace/index.d.ts +3 -0
  442. package/dist/components/trace/index.js +1 -0
  443. package/dist/components/trace/trace.d.ts +52 -0
  444. package/dist/components/trace/trace.js +132 -0
  445. package/dist/components/trace/types.d.ts +54 -0
  446. package/dist/components/typography/index.d.ts +3 -0
  447. package/dist/components/typography/index.js +3 -0
  448. package/dist/components/typography/types.d.ts +29 -0
  449. package/dist/components/typography/types.js +25 -0
  450. package/dist/components/typography/typography.d.ts +7 -0
  451. package/dist/components/typography/typography.js +40 -0
  452. package/dist/components/video-player/index.d.ts +6 -0
  453. package/dist/components/video-player/index.js +5 -0
  454. package/dist/components/video-player/types.d.ts +143 -0
  455. package/dist/components/video-player/use-video-player.js +319 -0
  456. package/dist/components/video-player/video-player-context.d.ts +45 -0
  457. package/dist/components/video-player/video-player-context.js +15 -0
  458. package/dist/components/video-player/video-player-controls.d.ts +38 -0
  459. package/dist/components/video-player/video-player-controls.js +226 -0
  460. package/dist/components/video-player/video-player-overlay.d.ts +13 -0
  461. package/dist/components/video-player/video-player-overlay.js +113 -0
  462. package/dist/components/video-player/video-player.d.ts +8 -0
  463. package/dist/components/video-player/video-player.js +139 -0
  464. package/dist/index.d.ts +259 -0
  465. package/dist/index.js +124 -0
  466. package/dist/lib/floating.d.ts +44 -0
  467. package/dist/lib/focus-source.js +51 -0
  468. package/dist/lib/format.d.ts +67 -0
  469. package/dist/lib/format.js +130 -0
  470. package/dist/lib/locale.d.ts +104 -0
  471. package/dist/lib/locale.js +103 -0
  472. package/dist/lib/part-props.d.ts +15 -0
  473. package/dist/lib/use-controllable-state.js +22 -0
  474. package/dist/lib/utils.d.ts +9 -0
  475. package/dist/lib/utils.js +16 -0
  476. package/dist/styles/index.css +128 -0
  477. package/dist/styles/theme.css +84 -0
  478. package/dist/styles/utilities.css +553 -0
  479. package/package.json +89 -3
@@ -0,0 +1,92 @@
1
+ import { DropdownMenuCheckboxItemPropsT, DropdownMenuContentPropsT, DropdownMenuGroupPropsT, DropdownMenuItemPropsT, DropdownMenuLabelPropsT, DropdownMenuPortalPropsT, DropdownMenuPropsT, DropdownMenuRadioGroupPropsT, DropdownMenuRadioItemPropsT, DropdownMenuSeparatorPropsT, DropdownMenuShortcutPropsT, DropdownMenuSubContentPropsT, DropdownMenuSubPropsT, DropdownMenuSubTriggerPropsT, DropdownMenuTriggerPropsT } from "./types.js";
2
+ /**
3
+ * Выпадающее меню: список действий по нажатию на кнопку
4
+ * @param props - пропсы меню
5
+ * @returns корень без своей разметки
6
+ */
7
+ export declare function DropdownMenu({ onOpenChange, ...props }: DropdownMenuPropsT): import("react").JSX.Element;
8
+ /**
9
+ * Портал: переносит меню в конец body. DropdownMenuContent рендерит его сам
10
+ * @param props - пропсы портала
11
+ * @returns портал
12
+ */
13
+ export declare function DropdownMenuPortal(props: DropdownMenuPortalPropsT): import("react").JSX.Element;
14
+ /**
15
+ * Кнопка открытия меню. Свою кнопку — через render={<Button />}
16
+ * @param props - пропсы кнопки
17
+ * @returns кнопка с aria-haspopup="menu"
18
+ */
19
+ export declare function DropdownMenuTrigger(props: DropdownMenuTriggerPropsT): import("react").JSX.Element;
20
+ /**
21
+ * Содержимое меню: рендерится в портале под кнопкой, шириной не меньше кнопки
22
+ * @param props - пропсы содержимого; по умолчанию align="start", sideOffset={4}
23
+ * @returns портал с меню
24
+ */
25
+ export declare function DropdownMenuContent({ className, side, sideOffset, align, alignOffset, collisionPadding, arrowPadding, sticky, ...props }: DropdownMenuContentPropsT): import("react").JSX.Element;
26
+ /**
27
+ * Группа пунктов: объединяет связанные действия; DropdownMenuLabel кладётся внутрь неё
28
+ * @param props - пропсы группы
29
+ * @returns div с role="group"
30
+ */
31
+ export declare function DropdownMenuGroup(props: DropdownMenuGroupPropsT): import("react").JSX.Element;
32
+ /**
33
+ * Пункт меню: действие. Ссылку рисуют через render={<a href />}
34
+ * @param props - пропсы пункта
35
+ * @returns div с role="menuitem"
36
+ */
37
+ export declare function DropdownMenuItem({ className, inset, variant, ...props }: DropdownMenuItemPropsT): import("react").JSX.Element;
38
+ /**
39
+ * Пункт-флажок: включает и выключает настройку, отмечен галочкой справа
40
+ * @param props - пропсы пункта
41
+ * @returns div с role="menuitemcheckbox"
42
+ */
43
+ export declare function DropdownMenuCheckboxItem({ className, children, inset, onCheckedChange, ...props }: DropdownMenuCheckboxItemPropsT): import("react").JSX.Element;
44
+ /**
45
+ * Группа радиокнопок: из пунктов внутри выбран один
46
+ * @param props - пропсы группы
47
+ * @returns div с role="group"
48
+ */
49
+ export declare function DropdownMenuRadioGroup({ onValueChange, ...props }: DropdownMenuRadioGroupPropsT): import("react").JSX.Element;
50
+ /**
51
+ * Пункт-радиокнопка: выбранный отмечен галочкой справа
52
+ * @param props - пропсы пункта
53
+ * @returns div с role="menuitemradio"
54
+ */
55
+ export declare function DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemPropsT): import("react").JSX.Element;
56
+ /**
57
+ * Подпись: заголовок группы пунктов, не выбирается. Кладётся внутрь DropdownMenuGroup
58
+ * или DropdownMenuRadioGroup
59
+ * @param props - пропсы подписи
60
+ * @returns div
61
+ */
62
+ export declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelPropsT): import("react").JSX.Element;
63
+ /**
64
+ * Разделитель: линия между группами пунктов
65
+ * @param props - пропсы разделителя
66
+ * @returns div с role="separator"
67
+ */
68
+ export declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorPropsT): import("react").JSX.Element;
69
+ /**
70
+ * Сочетание клавиш: подсказка справа в пункте. Само сочетание не обрабатывает
71
+ * @param props - пропсы сочетания
72
+ * @returns span
73
+ */
74
+ export declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutPropsT): import("react").JSX.Element;
75
+ /**
76
+ * Подменю: вложенный список, открывается из пункта
77
+ * @param props - пропсы подменю
78
+ * @returns корень без своей разметки
79
+ */
80
+ export declare function DropdownMenuSub({ onOpenChange, ...props }: DropdownMenuSubPropsT): import("react").JSX.Element;
81
+ /**
82
+ * Пункт, открывающий подменю: со стрелкой справа
83
+ * @param props - пропсы пункта
84
+ * @returns div с role="menuitem"
85
+ */
86
+ export declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerPropsT): import("react").JSX.Element;
87
+ /**
88
+ * Содержимое подменю: появляется сбоку от пункта
89
+ * @param props - пропсы содержимого; по умолчанию side="right", align="start"
90
+ * @returns портал с подменю
91
+ */
92
+ export declare function DropdownMenuSubContent({ className, side, sideOffset, align, alignOffset, ...props }: DropdownMenuSubContentPropsT): import("react").JSX.Element;
@@ -0,0 +1,268 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Menu } from "@base-ui/react/menu";
6
+ // src/components/dropdown-menu/dropdown-menu.tsx
7
+ /**
8
+ * Выпадающее меню: список действий по нажатию на кнопку
9
+ * @param props - пропсы меню
10
+ * @returns корень без своей разметки
11
+ */
12
+ function DropdownMenu({ onOpenChange, ...props }) {
13
+ /**
14
+ * Меню открыли или закрыли: наружу только флаг
15
+ * @param open - открыто ли
16
+ */
17
+ const handleOpenChange = (open) => onOpenChange?.(open);
18
+ return /* @__PURE__ */ jsx(Menu.Root, {
19
+ "data-slot": "dropdown-menu",
20
+ onOpenChange: handleOpenChange,
21
+ ...props
22
+ });
23
+ }
24
+ /**
25
+ * Портал: переносит меню в конец body. DropdownMenuContent рендерит его сам
26
+ * @param props - пропсы портала
27
+ * @returns портал
28
+ */
29
+ function DropdownMenuPortal(props) {
30
+ return /* @__PURE__ */ jsx(Menu.Portal, {
31
+ "data-slot": "dropdown-menu-portal",
32
+ ...props
33
+ });
34
+ }
35
+ /**
36
+ * Кнопка открытия меню. Свою кнопку — через render={<Button />}
37
+ * @param props - пропсы кнопки
38
+ * @returns кнопка с aria-haspopup="menu"
39
+ */
40
+ function DropdownMenuTrigger(props) {
41
+ return /* @__PURE__ */ jsx(Menu.Trigger, {
42
+ "data-slot": "dropdown-menu-trigger",
43
+ ...props
44
+ });
45
+ }
46
+ /** Классы окна меню */
47
+ const contentClasses = [
48
+ "z-50 max-h-(--available-height) w-max max-w-80 min-w-32 origin-(--transform-origin)",
49
+ "overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md",
50
+ "ring-1 ring-foreground/10 duration-100 outline-none data-closed:overflow-hidden",
51
+ "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
52
+ "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
53
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
54
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
55
+ ];
56
+ /**
57
+ * Содержимое меню: рендерится в портале под кнопкой, шириной не меньше кнопки
58
+ * @param props - пропсы содержимого; по умолчанию align="start", sideOffset={4}
59
+ * @returns портал с меню
60
+ */
61
+ function DropdownMenuContent({ className, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, collisionPadding, arrowPadding, sticky, ...props }) {
62
+ const classes = cn(contentClasses, className);
63
+ const positionerProps = {
64
+ side,
65
+ sideOffset,
66
+ align,
67
+ alignOffset,
68
+ collisionPadding,
69
+ arrowPadding,
70
+ sticky
71
+ };
72
+ return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
73
+ className: "isolate z-50 outline-none",
74
+ ...positionerProps,
75
+ children: /* @__PURE__ */ jsx(Menu.Popup, {
76
+ "data-slot": "dropdown-menu-content",
77
+ className: classes,
78
+ ...props
79
+ })
80
+ }) });
81
+ }
82
+ /**
83
+ * Группа пунктов: объединяет связанные действия; DropdownMenuLabel кладётся внутрь неё
84
+ * @param props - пропсы группы
85
+ * @returns div с role="group"
86
+ */
87
+ function DropdownMenuGroup(props) {
88
+ return /* @__PURE__ */ jsx(Menu.Group, {
89
+ "data-slot": "dropdown-menu-group",
90
+ ...props
91
+ });
92
+ }
93
+ /**
94
+ * Пункт меню: действие. Ссылку рисуют через render={<a href />}
95
+ * @param props - пропсы пункта
96
+ * @returns div с role="menuitem"
97
+ */
98
+ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
99
+ const classes = cn("group/dropdown-menu-item", "relative", "flex", "cursor-default", "items-center", "gap-1.5", "rounded-md", "px-1.5", "py-1", "text-sm", "outline-hidden", "select-none", "data-inset:pl-7", "focus:bg-accent", "focus:text-accent-foreground", "not-data-[variant=destructive]:focus:**:text-accent-foreground", "data-[variant=destructive]:text-destructive", "data-[variant=destructive]:focus:bg-destructive/10", "data-[variant=destructive]:focus:text-destructive", "dark:data-[variant=destructive]:focus:bg-destructive/20", "data-[variant=destructive]:*:[svg]:text-destructive", "data-disabled:pointer-events-none", "data-disabled:opacity-50", "[&_svg]:pointer-events-none", "[&_svg]:shrink-0", "[&_svg:not([class*=size-])]:size-4", className);
100
+ return /* @__PURE__ */ jsx(Menu.Item, {
101
+ "data-slot": "dropdown-menu-item",
102
+ "data-inset": inset,
103
+ "data-variant": variant,
104
+ className: classes,
105
+ ...props
106
+ });
107
+ }
108
+ /**
109
+ * Классы пунктов-переключателей: флажка и радиокнопки
110
+ */
111
+ const toggleItemClasses = [
112
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none",
113
+ "data-inset:pl-7 focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground",
114
+ "data-disabled:pointer-events-none data-disabled:opacity-50",
115
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4"
116
+ ];
117
+ /**
118
+ * Пункт-флажок: включает и выключает настройку, отмечен галочкой справа
119
+ * @param props - пропсы пункта
120
+ * @returns div с role="menuitemcheckbox"
121
+ */
122
+ function DropdownMenuCheckboxItem({ className, children, inset, onCheckedChange, ...props }) {
123
+ const classes = cn(toggleItemClasses, className);
124
+ /**
125
+ * Отметку переключили: наружу только состояние
126
+ * @param checked - отмечен ли
127
+ */
128
+ const handleCheckedChange = (checked) => onCheckedChange?.(checked);
129
+ return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
130
+ "data-slot": "dropdown-menu-checkbox-item",
131
+ "data-inset": inset,
132
+ className: classes,
133
+ onCheckedChange: handleCheckedChange,
134
+ ...props,
135
+ children: [/* @__PURE__ */ jsx("span", {
136
+ "data-slot": "dropdown-menu-checkbox-item-indicator",
137
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
138
+ children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
139
+ }), children]
140
+ });
141
+ }
142
+ /**
143
+ * Группа радиокнопок: из пунктов внутри выбран один
144
+ * @param props - пропсы группы
145
+ * @returns div с role="group"
146
+ */
147
+ function DropdownMenuRadioGroup({ onValueChange, ...props }) {
148
+ /**
149
+ * Выбран другой пункт: наружу только значение
150
+ * @param value - значение пункта
151
+ */
152
+ const handleValueChange = (value) => onValueChange?.(value);
153
+ return /* @__PURE__ */ jsx(Menu.RadioGroup, {
154
+ "data-slot": "dropdown-menu-radio-group",
155
+ onValueChange: handleValueChange,
156
+ ...props
157
+ });
158
+ }
159
+ /**
160
+ * Пункт-радиокнопка: выбранный отмечен галочкой справа
161
+ * @param props - пропсы пункта
162
+ * @returns div с role="menuitemradio"
163
+ */
164
+ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
165
+ const classes = cn(toggleItemClasses, className);
166
+ return /* @__PURE__ */ jsxs(Menu.RadioItem, {
167
+ "data-slot": "dropdown-menu-radio-item",
168
+ "data-inset": inset,
169
+ className: classes,
170
+ ...props,
171
+ children: [/* @__PURE__ */ jsx("span", {
172
+ "data-slot": "dropdown-menu-radio-item-indicator",
173
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
174
+ children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
175
+ }), children]
176
+ });
177
+ }
178
+ /**
179
+ * Подпись: заголовок группы пунктов, не выбирается. Кладётся внутрь DropdownMenuGroup
180
+ * или DropdownMenuRadioGroup
181
+ * @param props - пропсы подписи
182
+ * @returns div
183
+ */
184
+ function DropdownMenuLabel({ className, inset, ...props }) {
185
+ const classes = cn("px-1.5", "py-1", "text-xs", "font-medium", "text-muted-foreground", "data-inset:pl-7", className);
186
+ return /* @__PURE__ */ jsx(Menu.GroupLabel, {
187
+ "data-slot": "dropdown-menu-label",
188
+ "data-inset": inset,
189
+ className: classes,
190
+ ...props
191
+ });
192
+ }
193
+ /**
194
+ * Разделитель: линия между группами пунктов
195
+ * @param props - пропсы разделителя
196
+ * @returns div с role="separator"
197
+ */
198
+ function DropdownMenuSeparator({ className, ...props }) {
199
+ const classes = cn("-mx-1", "my-1", "h-px", "bg-border", className);
200
+ return /* @__PURE__ */ jsx(Menu.Separator, {
201
+ "data-slot": "dropdown-menu-separator",
202
+ className: classes,
203
+ ...props
204
+ });
205
+ }
206
+ /**
207
+ * Сочетание клавиш: подсказка справа в пункте. Само сочетание не обрабатывает
208
+ * @param props - пропсы сочетания
209
+ * @returns span
210
+ */
211
+ function DropdownMenuShortcut({ className, ...props }) {
212
+ const classes = cn("ml-auto", "text-xs", "tracking-widest", "text-muted-foreground", "group-focus/dropdown-menu-item:text-accent-foreground", className);
213
+ return /* @__PURE__ */ jsx("span", {
214
+ "data-slot": "dropdown-menu-shortcut",
215
+ className: classes,
216
+ ...props
217
+ });
218
+ }
219
+ /**
220
+ * Подменю: вложенный список, открывается из пункта
221
+ * @param props - пропсы подменю
222
+ * @returns корень без своей разметки
223
+ */
224
+ function DropdownMenuSub({ onOpenChange, ...props }) {
225
+ /**
226
+ * Подменю открыли или закрыли: наружу только флаг
227
+ * @param open - открыто ли
228
+ */
229
+ const handleOpenChange = (open) => onOpenChange?.(open);
230
+ return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
231
+ "data-slot": "dropdown-menu-sub",
232
+ onOpenChange: handleOpenChange,
233
+ ...props
234
+ });
235
+ }
236
+ /**
237
+ * Пункт, открывающий подменю: со стрелкой справа
238
+ * @param props - пропсы пункта
239
+ * @returns div с role="menuitem"
240
+ */
241
+ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
242
+ const classes = cn("flex", "cursor-default", "items-center", "gap-1.5", "rounded-md", "px-1.5", "py-1", "text-sm", "outline-hidden", "select-none", "data-inset:pl-7", "focus:bg-accent", "focus:text-accent-foreground", "not-data-[variant=destructive]:focus:**:text-accent-foreground", "data-popup-open:bg-accent", "data-popup-open:text-accent-foreground", "[&_svg]:pointer-events-none", "[&_svg]:shrink-0", "[&_svg:not([class*=size-])]:size-4", className);
243
+ return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
244
+ "data-slot": "dropdown-menu-sub-trigger",
245
+ "data-inset": inset,
246
+ className: classes,
247
+ ...props,
248
+ children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
249
+ });
250
+ }
251
+ /**
252
+ * Содержимое подменю: появляется сбоку от пункта
253
+ * @param props - пропсы содержимого; по умолчанию side="right", align="start"
254
+ * @returns портал с подменю
255
+ */
256
+ function DropdownMenuSubContent({ className, side = "right", sideOffset = 0, align = "start", alignOffset = -3, ...props }) {
257
+ const classes = cn("w-auto", "min-w-[96px]", "shadow-lg", className);
258
+ return /* @__PURE__ */ jsx(DropdownMenuContent, {
259
+ "data-slot": "dropdown-menu-sub-content",
260
+ side,
261
+ sideOffset,
262
+ align,
263
+ alignOffset,
264
+ className: classes,
265
+ ...props
266
+ });
267
+ }
268
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,3 @@
1
+ import { DropdownMenuCheckboxItemPropsT, DropdownMenuContentPropsT, DropdownMenuGroupPropsT, DropdownMenuItemPropsT, DropdownMenuItemVariantT, DropdownMenuLabelPropsT, DropdownMenuPortalPropsT, DropdownMenuPropsT, DropdownMenuRadioGroupPropsT, DropdownMenuRadioItemPropsT, DropdownMenuSeparatorPropsT, DropdownMenuShortcutPropsT, DropdownMenuSubContentPropsT, DropdownMenuSubPropsT, DropdownMenuSubTriggerPropsT, DropdownMenuTriggerPropsT } from "./types.js";
2
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
3
+ export { DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemPropsT, DropdownMenuContent, type DropdownMenuContentPropsT, DropdownMenuGroup, type DropdownMenuGroupPropsT, DropdownMenuItem, type DropdownMenuItemPropsT, type DropdownMenuItemVariantT, DropdownMenuLabel, type DropdownMenuLabelPropsT, DropdownMenuPortal, type DropdownMenuPortalPropsT, type DropdownMenuPropsT, DropdownMenuRadioGroup, type DropdownMenuRadioGroupPropsT, DropdownMenuRadioItem, type DropdownMenuRadioItemPropsT, DropdownMenuSeparator, type DropdownMenuSeparatorPropsT, DropdownMenuShortcut, type DropdownMenuShortcutPropsT, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentPropsT, type DropdownMenuSubPropsT, DropdownMenuSubTrigger, type DropdownMenuSubTriggerPropsT, DropdownMenuTrigger, type DropdownMenuTriggerPropsT };
@@ -0,0 +1 @@
1
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
@@ -0,0 +1,143 @@
1
+ import { PartPropsT } from "../../lib/part-props.js";
2
+ import { FloatingPropsT } from "../../lib/floating.js";
3
+ import { ComponentProps } from "react";
4
+ import { Menu } from "@base-ui/react/menu";
5
+ /**
6
+ * Пропсы выпадающего меню
7
+ */
8
+ export type DropdownMenuPropsT = Omit<Menu.Root.Props, 'onOpenChange'> & {
9
+ /** Меню открыто — контролируемый режим, вместе с onOpenChange */
10
+ open?: boolean;
11
+ /** Меню открыто при первом рендере — неконтролируемый режим */
12
+ defaultOpen?: boolean;
13
+ /** Меню открыли или закрыли: новое состояние */
14
+ onOpenChange?: (open: boolean) => void;
15
+ /** Модальный режим: страница под меню недоступна. По умолчанию true */
16
+ modal?: boolean;
17
+ /** Стрелки переходят с последнего пункта на первый и обратно. По умолчанию true */
18
+ loopFocus?: boolean;
19
+ };
20
+ /**
21
+ * Пропсы портала
22
+ */
23
+ export type DropdownMenuPortalPropsT = Menu.Portal.Props;
24
+ /**
25
+ * Пропсы кнопки открытия
26
+ */
27
+ export type DropdownMenuTriggerPropsT = PartPropsT<Menu.Trigger.Props> & {
28
+ /** Открывать меню и при наведении, а не только по нажатию */
29
+ openOnHover?: boolean;
30
+ };
31
+ /**
32
+ * Пропсы содержимого меню
33
+ */
34
+ export type DropdownMenuContentPropsT = PartPropsT<Menu.Popup.Props> & FloatingPropsT;
35
+ /**
36
+ * Пропсы группы пунктов
37
+ */
38
+ export type DropdownMenuGroupPropsT = PartPropsT<Menu.Group.Props>;
39
+ /**
40
+ * Вариант оформления пункта
41
+ */
42
+ export type DropdownMenuItemVariantT = 'default' | 'destructive';
43
+ /**
44
+ * Пропсы пункта меню
45
+ */
46
+ export type DropdownMenuItemPropsT = PartPropsT<Menu.Item.Props> & {
47
+ /** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
48
+ inset?: boolean;
49
+ /** Вариант оформления: destructive — красный, для опасных действий */
50
+ variant?: DropdownMenuItemVariantT;
51
+ /** Отключить пункт */
52
+ disabled?: boolean;
53
+ /** Закрывать меню после нажатия. По умолчанию true */
54
+ closeOnClick?: boolean;
55
+ /** Текст для поиска набором букв, если содержимое пункта — не просто текст */
56
+ label?: string;
57
+ };
58
+ /**
59
+ * Пропсы пункта-флажка
60
+ */
61
+ export type DropdownMenuCheckboxItemPropsT = PartPropsT<Omit<Menu.CheckboxItem.Props, 'onCheckedChange'>> & {
62
+ /** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
63
+ inset?: boolean;
64
+ /** Отмечен ли пункт — контролируемый режим, вместе с onCheckedChange */
65
+ checked?: boolean;
66
+ /** Отмечен ли пункт при первом рендере — неконтролируемый режим */
67
+ defaultChecked?: boolean;
68
+ /** Отметку переключили: новое состояние */
69
+ onCheckedChange?: (checked: boolean) => void;
70
+ /** Отключить пункт */
71
+ disabled?: boolean;
72
+ /** Закрывать меню после выбора. По умолчанию false — меню остаётся открытым, чтобы выбрать несколько */
73
+ closeOnClick?: boolean;
74
+ /** Текст для поиска набором букв, если содержимое пункта — не просто текст */
75
+ label?: string;
76
+ };
77
+ /**
78
+ * Пропсы группы радиокнопок
79
+ */
80
+ export type DropdownMenuRadioGroupPropsT = PartPropsT<Omit<Menu.RadioGroup.Props, 'value' | 'defaultValue' | 'onValueChange'>> & {
81
+ /** Значение выбранного пункта — контролируемый режим, вместе с onValueChange */
82
+ value?: string;
83
+ /** Значение выбранного пункта при первом рендере — неконтролируемый режим */
84
+ defaultValue?: string;
85
+ /** Выбран другой пункт: его значение */
86
+ onValueChange?: (value: string) => void;
87
+ };
88
+ /**
89
+ * Пропсы пункта-радиокнопки
90
+ */
91
+ export type DropdownMenuRadioItemPropsT = PartPropsT<Omit<Menu.RadioItem.Props, 'value'>> & {
92
+ /** Значение пункта: попадает в value группы при выборе */
93
+ value: string;
94
+ /** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
95
+ inset?: boolean;
96
+ /** Отключить пункт */
97
+ disabled?: boolean;
98
+ /** Закрывать меню после выбора. По умолчанию false — меню остаётся открытым */
99
+ closeOnClick?: boolean;
100
+ /** Текст для поиска набором букв, если содержимое пункта — не просто текст */
101
+ label?: string;
102
+ };
103
+ /**
104
+ * Пропсы подписи
105
+ */
106
+ export type DropdownMenuLabelPropsT = PartPropsT<Menu.GroupLabel.Props> & {
107
+ /** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
108
+ inset?: boolean;
109
+ };
110
+ /**
111
+ * Пропсы разделителя
112
+ */
113
+ export type DropdownMenuSeparatorPropsT = PartPropsT<Menu.Separator.Props>;
114
+ /**
115
+ * Пропсы сочетания клавиш
116
+ */
117
+ export type DropdownMenuShortcutPropsT = ComponentProps<'span'>;
118
+ /**
119
+ * Пропсы подменю
120
+ */
121
+ export type DropdownMenuSubPropsT = Omit<Menu.SubmenuRoot.Props, 'onOpenChange'> & {
122
+ /** Подменю открыто — контролируемый режим, вместе с onOpenChange */
123
+ open?: boolean;
124
+ /** Подменю открыто при первом рендере — неконтролируемый режим */
125
+ defaultOpen?: boolean;
126
+ /** Подменю открыли или закрыли: новое состояние */
127
+ onOpenChange?: (open: boolean) => void;
128
+ };
129
+ /**
130
+ * Пропсы пункта, открывающего подменю
131
+ */
132
+ export type DropdownMenuSubTriggerPropsT = PartPropsT<Menu.SubmenuTrigger.Props> & {
133
+ /** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
134
+ inset?: boolean;
135
+ /** Отключить пункт */
136
+ disabled?: boolean;
137
+ /** Текст для поиска набором букв, если содержимое пункта — не просто текст */
138
+ label?: string;
139
+ };
140
+ /**
141
+ * Пропсы содержимого подменю
142
+ */
143
+ export type DropdownMenuSubContentPropsT = DropdownMenuContentPropsT;
@@ -0,0 +1,37 @@
1
+ import { EmptyContentPropsT, EmptyDescriptionPropsT, EmptyHeaderPropsT, EmptyMediaPropsT, EmptyPropsT, EmptyTitlePropsT } from "./types.js";
2
+ /**
3
+ * Пустое состояние: сообщение, что данных нет, и действия, чтобы это исправить
4
+ * @param props - пропсы пустого состояния
5
+ * @returns блок пустого состояния
6
+ */
7
+ export declare function Empty({ className, ...props }: EmptyPropsT): import("react").JSX.Element;
8
+ /**
9
+ * Шапка пустого состояния: медиа, заголовок и описание
10
+ * @param props - пропсы шапки
11
+ * @returns шапка
12
+ */
13
+ export declare function EmptyHeader({ className, ...props }: EmptyHeaderPropsT): import("react").JSX.Element;
14
+ /**
15
+ * Медиа пустого состояния: иконка, изображение или аватар
16
+ * @param props - пропсы медиа
17
+ * @returns блок медиа
18
+ */
19
+ export declare function EmptyMedia({ className, variant, ...props }: EmptyMediaPropsT): import("react").JSX.Element;
20
+ /**
21
+ * Заголовок пустого состояния
22
+ * @param props - пропсы заголовка
23
+ * @returns заголовок
24
+ */
25
+ export declare function EmptyTitle({ className, ...props }: EmptyTitlePropsT): import("react").JSX.Element;
26
+ /**
27
+ * Описание пустого состояния: что произошло и что делать
28
+ * @param props - пропсы описания
29
+ * @returns описание
30
+ */
31
+ export declare function EmptyDescription({ className, ...props }: EmptyDescriptionPropsT): import("react").JSX.Element;
32
+ /**
33
+ * Содержимое пустого состояния: кнопки, поле поиска, ссылки
34
+ * @param props - пропсы содержимого
35
+ * @returns содержимое
36
+ */
37
+ export declare function EmptyContent({ className, ...props }: EmptyContentPropsT): import("react").JSX.Element;
@@ -0,0 +1,84 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { emptyMediaVariants } from "./types.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/empty/empty.tsx
5
+ /**
6
+ * Пустое состояние: сообщение, что данных нет, и действия, чтобы это исправить
7
+ * @param props - пропсы пустого состояния
8
+ * @returns блок пустого состояния
9
+ */
10
+ function Empty({ className, ...props }) {
11
+ const classes = cn("flex", "w-full", "min-w-0", "flex-1", "flex-col", "items-center", "justify-center", "gap-4", "rounded-xl", "border-dashed", "p-6", "text-center", "text-balance", className);
12
+ return /* @__PURE__ */ jsx("div", {
13
+ "data-slot": "empty",
14
+ className: classes,
15
+ ...props
16
+ });
17
+ }
18
+ /**
19
+ * Шапка пустого состояния: медиа, заголовок и описание
20
+ * @param props - пропсы шапки
21
+ * @returns шапка
22
+ */
23
+ function EmptyHeader({ className, ...props }) {
24
+ const classes = cn("flex", "max-w-sm", "flex-col", "items-center", "gap-2", className);
25
+ return /* @__PURE__ */ jsx("div", {
26
+ "data-slot": "empty-header",
27
+ className: classes,
28
+ ...props
29
+ });
30
+ }
31
+ /**
32
+ * Медиа пустого состояния: иконка, изображение или аватар
33
+ * @param props - пропсы медиа
34
+ * @returns блок медиа
35
+ */
36
+ function EmptyMedia({ className, variant = "default", ...props }) {
37
+ const classes = cn(emptyMediaVariants({ variant }), className);
38
+ return /* @__PURE__ */ jsx("div", {
39
+ "data-slot": "empty-icon",
40
+ "data-variant": variant,
41
+ className: classes,
42
+ ...props
43
+ });
44
+ }
45
+ /**
46
+ * Заголовок пустого состояния
47
+ * @param props - пропсы заголовка
48
+ * @returns заголовок
49
+ */
50
+ function EmptyTitle({ className, ...props }) {
51
+ const classes = cn("text-sm", "font-medium", "tracking-tight", className);
52
+ return /* @__PURE__ */ jsx("div", {
53
+ "data-slot": "empty-title",
54
+ className: classes,
55
+ ...props
56
+ });
57
+ }
58
+ /**
59
+ * Описание пустого состояния: что произошло и что делать
60
+ * @param props - пропсы описания
61
+ * @returns описание
62
+ */
63
+ function EmptyDescription({ className, ...props }) {
64
+ const classes = cn("text-sm/relaxed", "text-muted-foreground", "[&>a]:underline", "[&>a]:underline-offset-4", "[&>a:hover]:text-primary", className);
65
+ return /* @__PURE__ */ jsx("div", {
66
+ "data-slot": "empty-description",
67
+ className: classes,
68
+ ...props
69
+ });
70
+ }
71
+ /**
72
+ * Содержимое пустого состояния: кнопки, поле поиска, ссылки
73
+ * @param props - пропсы содержимого
74
+ * @returns содержимое
75
+ */
76
+ function EmptyContent({ className, ...props }) {
77
+ const classes = cn("flex", "w-full", "max-w-sm", "min-w-0", "flex-col", "items-center", "gap-2.5", "text-sm", "text-balance", className);
78
+ return /* @__PURE__ */ jsx("div", {
79
+ "data-slot": "empty-content",
80
+ className: classes,
81
+ ...props
82
+ });
83
+ }
84
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -0,0 +1,3 @@
1
+ import { EmptyContentPropsT, EmptyDescriptionPropsT, EmptyHeaderPropsT, EmptyMediaPropsT, EmptyPropsT, EmptyTitlePropsT, emptyMediaVariants } from "./types.js";
2
+ import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./empty.js";
3
+ export { Empty, EmptyContent, type EmptyContentPropsT, EmptyDescription, type EmptyDescriptionPropsT, EmptyHeader, type EmptyHeaderPropsT, EmptyMedia, type EmptyMediaPropsT, type EmptyPropsT, EmptyTitle, type EmptyTitlePropsT, emptyMediaVariants };
@@ -0,0 +1,3 @@
1
+ import { emptyMediaVariants } from "./types.js";
2
+ import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./empty.js";
3
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, emptyMediaVariants };