@archytechtor/ui 0.0.0-stage → 0.1.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 (449) 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/breadcrumb/breadcrumb.d.ts +43 -0
  43. package/dist/components/breadcrumb/breadcrumb.js +115 -0
  44. package/dist/components/breadcrumb/index.d.ts +3 -0
  45. package/dist/components/breadcrumb/index.js +1 -0
  46. package/dist/components/breadcrumb/types.d.ts +36 -0
  47. package/dist/components/bubble/bubble.d.ts +25 -0
  48. package/dist/components/bubble/bubble.js +69 -0
  49. package/dist/components/bubble/index.d.ts +3 -0
  50. package/dist/components/bubble/index.js +3 -0
  51. package/dist/components/bubble/types.d.ts +51 -0
  52. package/dist/components/bubble/types.js +60 -0
  53. package/dist/components/button/button.d.ts +7 -0
  54. package/dist/components/button/button.js +155 -0
  55. package/dist/components/button/index.d.ts +4 -0
  56. package/dist/components/button/index.js +4 -0
  57. package/dist/components/button/types.d.ts +80 -0
  58. package/dist/components/button/types.js +99 -0
  59. package/dist/components/button/use-hold-to-confirm.d.ts +25 -0
  60. package/dist/components/button/use-hold-to-confirm.js +161 -0
  61. package/dist/components/button-group/button-group.d.ts +20 -0
  62. package/dist/components/button-group/button-group.js +62 -0
  63. package/dist/components/button-group/index.d.ts +3 -0
  64. package/dist/components/button-group/index.js +3 -0
  65. package/dist/components/button-group/types.d.ts +30 -0
  66. package/dist/components/button-group/types.js +19 -0
  67. package/dist/components/calendar/calendar.d.ts +15 -0
  68. package/dist/components/calendar/calendar.js +157 -0
  69. package/dist/components/calendar/index.d.ts +3 -0
  70. package/dist/components/calendar/index.js +1 -0
  71. package/dist/components/calendar/types.d.ts +21 -0
  72. package/dist/components/card/card.d.ts +43 -0
  73. package/dist/components/card/card.js +97 -0
  74. package/dist/components/card/index.d.ts +3 -0
  75. package/dist/components/card/index.js +3 -0
  76. package/dist/components/card/types.d.ts +44 -0
  77. package/dist/components/card/types.js +19 -0
  78. package/dist/components/carousel/carousel.d.ts +36 -0
  79. package/dist/components/carousel/carousel.js +190 -0
  80. package/dist/components/carousel/index.d.ts +3 -0
  81. package/dist/components/carousel/index.js +1 -0
  82. package/dist/components/carousel/types.d.ts +79 -0
  83. package/dist/components/chart/chart.d.ts +35 -0
  84. package/dist/components/chart/chart.js +212 -0
  85. package/dist/components/chart/index.d.ts +3 -0
  86. package/dist/components/chart/index.js +1 -0
  87. package/dist/components/chart/types.d.ts +89 -0
  88. package/dist/components/chart/types.js +7 -0
  89. package/dist/components/checkbox/checkbox.d.ts +7 -0
  90. package/dist/components/checkbox/checkbox.js +31 -0
  91. package/dist/components/checkbox/index.d.ts +3 -0
  92. package/dist/components/checkbox/index.js +1 -0
  93. package/dist/components/checkbox/types.d.ts +25 -0
  94. package/dist/components/code-block/code-block.d.ts +49 -0
  95. package/dist/components/code-block/code-block.js +188 -0
  96. package/dist/components/code-block/highlighter.d.ts +15 -0
  97. package/dist/components/code-block/highlighter.js +123 -0
  98. package/dist/components/code-block/index.d.ts +5 -0
  99. package/dist/components/code-block/index.js +5 -0
  100. package/dist/components/code-block/types.d.ts +94 -0
  101. package/dist/components/code-block/types.js +38 -0
  102. package/dist/components/code-block/use-highlighted-code.d.ts +9 -0
  103. package/dist/components/code-block/use-highlighted-code.js +67 -0
  104. package/dist/components/collapsible/collapsible.d.ts +19 -0
  105. package/dist/components/collapsible/collapsible.js +44 -0
  106. package/dist/components/collapsible/index.d.ts +3 -0
  107. package/dist/components/collapsible/index.js +1 -0
  108. package/dist/components/collapsible/types.d.ts +26 -0
  109. package/dist/components/combobox/combobox.d.ts +104 -0
  110. package/dist/components/combobox/combobox.js +365 -0
  111. package/dist/components/combobox/index.d.ts +3 -0
  112. package/dist/components/combobox/index.js +1 -0
  113. package/dist/components/combobox/types.d.ts +229 -0
  114. package/dist/components/command/command.d.ts +55 -0
  115. package/dist/components/command/command.js +179 -0
  116. package/dist/components/command/index.d.ts +3 -0
  117. package/dist/components/command/index.js +1 -0
  118. package/dist/components/command/types.d.ts +69 -0
  119. package/dist/components/context-menu/context-menu.d.ts +92 -0
  120. package/dist/components/context-menu/context-menu.js +270 -0
  121. package/dist/components/context-menu/index.d.ts +3 -0
  122. package/dist/components/context-menu/index.js +1 -0
  123. package/dist/components/context-menu/types.d.ts +138 -0
  124. package/dist/components/data-table/data-table-features.d.ts +21 -0
  125. package/dist/components/data-table/data-table-features.js +22 -0
  126. package/dist/components/data-table/data-table.d.ts +69 -0
  127. package/dist/components/data-table/data-table.js +283 -0
  128. package/dist/components/data-table/index.d.ts +4 -0
  129. package/dist/components/data-table/index.js +3 -0
  130. package/dist/components/data-table/types.d.ts +63 -0
  131. package/dist/components/date-input/date-input.d.ts +7 -0
  132. package/dist/components/date-input/date-input.js +147 -0
  133. package/dist/components/date-input/index.d.ts +3 -0
  134. package/dist/components/date-input/index.js +1 -0
  135. package/dist/components/date-input/types.d.ts +27 -0
  136. package/dist/components/date-picker/date-picker.d.ts +7 -0
  137. package/dist/components/date-picker/date-picker.js +74 -0
  138. package/dist/components/date-picker/index.d.ts +3 -0
  139. package/dist/components/date-picker/index.js +1 -0
  140. package/dist/components/date-picker/types.d.ts +38 -0
  141. package/dist/components/date-range-picker/date-range-picker.d.ts +7 -0
  142. package/dist/components/date-range-picker/date-range-picker.js +89 -0
  143. package/dist/components/date-range-picker/index.d.ts +3 -0
  144. package/dist/components/date-range-picker/index.js +1 -0
  145. package/dist/components/date-range-picker/types.d.ts +43 -0
  146. package/dist/components/dialog/dialog.d.ts +61 -0
  147. package/dist/components/dialog/dialog.js +160 -0
  148. package/dist/components/dialog/index.d.ts +3 -0
  149. package/dist/components/dialog/index.js +1 -0
  150. package/dist/components/dialog/types.d.ts +68 -0
  151. package/dist/components/drawer/drawer.d.ts +69 -0
  152. package/dist/components/drawer/drawer.js +245 -0
  153. package/dist/components/drawer/index.d.ts +3 -0
  154. package/dist/components/drawer/index.js +1 -0
  155. package/dist/components/drawer/types.d.ts +93 -0
  156. package/dist/components/dropdown-menu/dropdown-menu.d.ts +92 -0
  157. package/dist/components/dropdown-menu/dropdown-menu.js +268 -0
  158. package/dist/components/dropdown-menu/index.d.ts +3 -0
  159. package/dist/components/dropdown-menu/index.js +1 -0
  160. package/dist/components/dropdown-menu/types.d.ts +143 -0
  161. package/dist/components/empty/empty.d.ts +37 -0
  162. package/dist/components/empty/empty.js +84 -0
  163. package/dist/components/empty/index.d.ts +3 -0
  164. package/dist/components/empty/index.js +3 -0
  165. package/dist/components/empty/types.d.ts +39 -0
  166. package/dist/components/empty/types.js +13 -0
  167. package/dist/components/expanded-card/expanded-card.d.ts +43 -0
  168. package/dist/components/expanded-card/expanded-card.js +352 -0
  169. package/dist/components/expanded-card/index.d.ts +3 -0
  170. package/dist/components/expanded-card/index.js +1 -0
  171. package/dist/components/expanded-card/types.d.ts +52 -0
  172. package/dist/components/field/field.d.ts +62 -0
  173. package/dist/components/field/field.js +173 -0
  174. package/dist/components/field/index.d.ts +3 -0
  175. package/dist/components/field/index.js +3 -0
  176. package/dist/components/field/types.d.ts +81 -0
  177. package/dist/components/field/types.js +21 -0
  178. package/dist/components/form/form.d.ts +49 -0
  179. package/dist/components/form/form.js +136 -0
  180. package/dist/components/form/index.d.ts +3 -0
  181. package/dist/components/form/index.js +1 -0
  182. package/dist/components/form/types.d.ts +59 -0
  183. package/dist/components/hover-card/hover-card.d.ts +19 -0
  184. package/dist/components/hover-card/hover-card.js +63 -0
  185. package/dist/components/hover-card/index.d.ts +3 -0
  186. package/dist/components/hover-card/index.js +1 -0
  187. package/dist/components/hover-card/types.d.ts +27 -0
  188. package/dist/components/image-gallery/image-gallery.d.ts +8 -0
  189. package/dist/components/image-gallery/image-gallery.js +294 -0
  190. package/dist/components/image-gallery/index.d.ts +4 -0
  191. package/dist/components/image-gallery/index.js +3 -0
  192. package/dist/components/image-gallery/masonry.d.ts +11 -0
  193. package/dist/components/image-gallery/masonry.js +62 -0
  194. package/dist/components/image-gallery/types.d.ts +80 -0
  195. package/dist/components/input/index.d.ts +3 -0
  196. package/dist/components/input/index.js +1 -0
  197. package/dist/components/input/input.d.ts +7 -0
  198. package/dist/components/input/input.js +18 -0
  199. package/dist/components/input/types.d.ts +28 -0
  200. package/dist/components/input-group/index.d.ts +3 -0
  201. package/dist/components/input-group/index.js +3 -0
  202. package/dist/components/input-group/input-group.d.ts +37 -0
  203. package/dist/components/input-group/input-group.js +103 -0
  204. package/dist/components/input-group/types.d.ts +64 -0
  205. package/dist/components/input-group/types.js +31 -0
  206. package/dist/components/input-otp/index.d.ts +3 -0
  207. package/dist/components/input-otp/index.js +1 -0
  208. package/dist/components/input-otp/input-otp.d.ts +25 -0
  209. package/dist/components/input-otp/input-otp.js +76 -0
  210. package/dist/components/input-otp/types.d.ts +43 -0
  211. package/dist/components/item/index.d.ts +3 -0
  212. package/dist/components/item/index.js +3 -0
  213. package/dist/components/item/item.d.ts +61 -0
  214. package/dist/components/item/item.js +149 -0
  215. package/dist/components/item/types.d.ts +75 -0
  216. package/dist/components/item/types.js +48 -0
  217. package/dist/components/kbd/index.d.ts +3 -0
  218. package/dist/components/kbd/index.js +1 -0
  219. package/dist/components/kbd/kbd.d.ts +13 -0
  220. package/dist/components/kbd/kbd.js +30 -0
  221. package/dist/components/kbd/types.d.ts +9 -0
  222. package/dist/components/label/index.d.ts +3 -0
  223. package/dist/components/label/index.js +1 -0
  224. package/dist/components/label/label.d.ts +7 -0
  225. package/dist/components/label/label.js +17 -0
  226. package/dist/components/label/types.d.ts +8 -0
  227. package/dist/components/loader/index.d.ts +3 -0
  228. package/dist/components/loader/index.js +3 -0
  229. package/dist/components/loader/loader.d.ts +8 -0
  230. package/dist/components/loader/loader.js +386 -0
  231. package/dist/components/loader/types.d.ts +27 -0
  232. package/dist/components/loader/types.js +58 -0
  233. package/dist/components/marker/index.d.ts +3 -0
  234. package/dist/components/marker/index.js +3 -0
  235. package/dist/components/marker/marker.d.ts +19 -0
  236. package/dist/components/marker/marker.js +51 -0
  237. package/dist/components/marker/types.d.ts +30 -0
  238. package/dist/components/marker/types.js +16 -0
  239. package/dist/components/menubar/index.d.ts +3 -0
  240. package/dist/components/menubar/index.js +1 -0
  241. package/dist/components/menubar/menubar.d.ts +98 -0
  242. package/dist/components/menubar/menubar.js +284 -0
  243. package/dist/components/menubar/types.d.ts +146 -0
  244. package/dist/components/message/index.d.ts +3 -0
  245. package/dist/components/message/index.js +1 -0
  246. package/dist/components/message/message.d.ts +37 -0
  247. package/dist/components/message/message.js +83 -0
  248. package/dist/components/message/types.d.ts +32 -0
  249. package/dist/components/message-scroller/index.d.ts +4 -0
  250. package/dist/components/message-scroller/index.js +3 -0
  251. package/dist/components/message-scroller/message-scroller-primitive.d.ts +21 -0
  252. package/dist/components/message-scroller/message-scroller-primitive.js +1349 -0
  253. package/dist/components/message-scroller/message-scroller.d.ts +39 -0
  254. package/dist/components/message-scroller/message-scroller.js +103 -0
  255. package/dist/components/message-scroller/types.d.ts +107 -0
  256. package/dist/components/money-input/index.d.ts +3 -0
  257. package/dist/components/money-input/index.js +1 -0
  258. package/dist/components/money-input/money-input.d.ts +7 -0
  259. package/dist/components/money-input/money-input.js +143 -0
  260. package/dist/components/money-input/types.d.ts +20 -0
  261. package/dist/components/morph-image/index.d.ts +3 -0
  262. package/dist/components/morph-image/index.js +3 -0
  263. package/dist/components/morph-image/morph-image.d.ts +8 -0
  264. package/dist/components/morph-image/morph-image.js +155 -0
  265. package/dist/components/morph-image/types.d.ts +38 -0
  266. package/dist/components/morph-image/types.js +18 -0
  267. package/dist/components/native-select/index.d.ts +3 -0
  268. package/dist/components/native-select/index.js +3 -0
  269. package/dist/components/native-select/native-select.d.ts +20 -0
  270. package/dist/components/native-select/native-select.js +57 -0
  271. package/dist/components/native-select/types.d.ts +52 -0
  272. package/dist/components/native-select/types.js +23 -0
  273. package/dist/components/navigation-menu/index.d.ts +3 -0
  274. package/dist/components/navigation-menu/index.js +3 -0
  275. package/dist/components/navigation-menu/navigation-menu.d.ts +50 -0
  276. package/dist/components/navigation-menu/navigation-menu.js +145 -0
  277. package/dist/components/navigation-menu/types.d.ts +79 -0
  278. package/dist/components/navigation-menu/types.js +15 -0
  279. package/dist/components/number-stepper/index.d.ts +3 -0
  280. package/dist/components/number-stepper/index.js +3 -0
  281. package/dist/components/number-stepper/number-stepper.d.ts +9 -0
  282. package/dist/components/number-stepper/number-stepper.js +223 -0
  283. package/dist/components/number-stepper/types.d.ts +47 -0
  284. package/dist/components/number-stepper/types.js +174 -0
  285. package/dist/components/pagination/index.d.ts +3 -0
  286. package/dist/components/pagination/index.js +1 -0
  287. package/dist/components/pagination/pagination.d.ts +43 -0
  288. package/dist/components/pagination/pagination.js +121 -0
  289. package/dist/components/pagination/types.d.ts +37 -0
  290. package/dist/components/phone-input/index.d.ts +3 -0
  291. package/dist/components/phone-input/index.js +1 -0
  292. package/dist/components/phone-input/phone-input.d.ts +7 -0
  293. package/dist/components/phone-input/phone-input.js +54 -0
  294. package/dist/components/phone-input/types.d.ts +12 -0
  295. package/dist/components/popover/index.d.ts +3 -0
  296. package/dist/components/popover/index.js +1 -0
  297. package/dist/components/popover/popover.d.ts +37 -0
  298. package/dist/components/popover/popover.js +100 -0
  299. package/dist/components/popover/types.d.ts +51 -0
  300. package/dist/components/progress/index.d.ts +3 -0
  301. package/dist/components/progress/index.js +1 -0
  302. package/dist/components/progress/progress.d.ts +32 -0
  303. package/dist/components/progress/progress.js +100 -0
  304. package/dist/components/progress/types.d.ts +31 -0
  305. package/dist/components/questionnaire/index.d.ts +3 -0
  306. package/dist/components/questionnaire/index.js +1 -0
  307. package/dist/components/questionnaire/questionnaire-primitive.js +1563 -0
  308. package/dist/components/questionnaire/questionnaire.d.ts +91 -0
  309. package/dist/components/questionnaire/questionnaire.js +315 -0
  310. package/dist/components/questionnaire/types.d.ts +203 -0
  311. package/dist/components/radio-group/index.d.ts +3 -0
  312. package/dist/components/radio-group/index.js +1 -0
  313. package/dist/components/radio-group/radio-group.d.ts +13 -0
  314. package/dist/components/radio-group/radio-group.js +44 -0
  315. package/dist/components/radio-group/types.d.ts +33 -0
  316. package/dist/components/reorder-list/index.d.ts +3 -0
  317. package/dist/components/reorder-list/index.js +1 -0
  318. package/dist/components/reorder-list/reorder-list.d.ts +19 -0
  319. package/dist/components/reorder-list/reorder-list.js +279 -0
  320. package/dist/components/reorder-list/types.d.ts +65 -0
  321. package/dist/components/resizable/index.d.ts +3 -0
  322. package/dist/components/resizable/index.js +1 -0
  323. package/dist/components/resizable/resizable.d.ts +19 -0
  324. package/dist/components/resizable/resizable.js +44 -0
  325. package/dist/components/resizable/types.d.ts +89 -0
  326. package/dist/components/scroll-area/index.d.ts +3 -0
  327. package/dist/components/scroll-area/index.js +1 -0
  328. package/dist/components/scroll-area/scroll-area.d.ts +13 -0
  329. package/dist/components/scroll-area/scroll-area.js +47 -0
  330. package/dist/components/scroll-area/types.d.ts +19 -0
  331. package/dist/components/select/index.d.ts +3 -0
  332. package/dist/components/select/index.js +1 -0
  333. package/dist/components/select/select.d.ts +61 -0
  334. package/dist/components/select/select.js +183 -0
  335. package/dist/components/select/types.d.ts +100 -0
  336. package/dist/components/separator/index.d.ts +3 -0
  337. package/dist/components/separator/index.js +1 -0
  338. package/dist/components/separator/separator.d.ts +7 -0
  339. package/dist/components/separator/separator.js +20 -0
  340. package/dist/components/separator/types.d.ts +9 -0
  341. package/dist/components/sheet/index.d.ts +3 -0
  342. package/dist/components/sheet/index.js +1 -0
  343. package/dist/components/sheet/sheet.d.ts +61 -0
  344. package/dist/components/sheet/sheet.js +155 -0
  345. package/dist/components/sheet/types.d.ts +69 -0
  346. package/dist/components/sidebar/index.d.ts +3 -0
  347. package/dist/components/sidebar/index.js +3 -0
  348. package/dist/components/sidebar/sidebar.d.ts +145 -0
  349. package/dist/components/sidebar/sidebar.js +550 -0
  350. package/dist/components/sidebar/types.d.ts +186 -0
  351. package/dist/components/sidebar/types.js +42 -0
  352. package/dist/components/sidebar/use-mobile.js +21 -0
  353. package/dist/components/skeleton/index.d.ts +3 -0
  354. package/dist/components/skeleton/index.js +1 -0
  355. package/dist/components/skeleton/skeleton.d.ts +8 -0
  356. package/dist/components/skeleton/skeleton.js +18 -0
  357. package/dist/components/skeleton/types.d.ts +5 -0
  358. package/dist/components/slider/index.d.ts +3 -0
  359. package/dist/components/slider/index.js +1 -0
  360. package/dist/components/slider/slider.d.ts +7 -0
  361. package/dist/components/slider/slider.js +106 -0
  362. package/dist/components/slider/types.d.ts +39 -0
  363. package/dist/components/spinner/index.d.ts +3 -0
  364. package/dist/components/spinner/index.js +1 -0
  365. package/dist/components/spinner/spinner.d.ts +7 -0
  366. package/dist/components/spinner/spinner.js +21 -0
  367. package/dist/components/spinner/types.d.ts +8 -0
  368. package/dist/components/switch/index.d.ts +3 -0
  369. package/dist/components/switch/index.js +3 -0
  370. package/dist/components/switch/switch.d.ts +7 -0
  371. package/dist/components/switch/switch.js +32 -0
  372. package/dist/components/switch/types.d.ts +37 -0
  373. package/dist/components/switch/types.js +23 -0
  374. package/dist/components/table/index.d.ts +3 -0
  375. package/dist/components/table/index.js +1 -0
  376. package/dist/components/table/table.d.ts +49 -0
  377. package/dist/components/table/table.js +112 -0
  378. package/dist/components/table/types.d.ts +33 -0
  379. package/dist/components/tabs/index.d.ts +3 -0
  380. package/dist/components/tabs/index.js +3 -0
  381. package/dist/components/tabs/tabs.d.ts +25 -0
  382. package/dist/components/tabs/tabs.js +81 -0
  383. package/dist/components/tabs/types.d.ts +61 -0
  384. package/dist/components/tabs/types.js +18 -0
  385. package/dist/components/textarea/index.d.ts +3 -0
  386. package/dist/components/textarea/index.js +1 -0
  387. package/dist/components/textarea/textarea.d.ts +7 -0
  388. package/dist/components/textarea/textarea.js +17 -0
  389. package/dist/components/textarea/types.d.ts +26 -0
  390. package/dist/components/toast/index.d.ts +3 -0
  391. package/dist/components/toast/index.js +1 -0
  392. package/dist/components/toast/toast.d.ts +63 -0
  393. package/dist/components/toast/toast.js +321 -0
  394. package/dist/components/toast/types.d.ts +120 -0
  395. package/dist/components/toggle/index.d.ts +3 -0
  396. package/dist/components/toggle/index.js +3 -0
  397. package/dist/components/toggle/toggle.d.ts +7 -0
  398. package/dist/components/toggle/toggle.js +32 -0
  399. package/dist/components/toggle/types.d.ts +35 -0
  400. package/dist/components/toggle/types.js +37 -0
  401. package/dist/components/toggle-group/index.d.ts +3 -0
  402. package/dist/components/toggle-group/index.js +1 -0
  403. package/dist/components/toggle-group/toggle-group.d.ts +13 -0
  404. package/dist/components/toggle-group/toggle-group.js +88 -0
  405. package/dist/components/toggle-group/types.d.ts +52 -0
  406. package/dist/components/tooltip/index.d.ts +3 -0
  407. package/dist/components/tooltip/index.js +1 -0
  408. package/dist/components/tooltip/tooltip.d.ts +25 -0
  409. package/dist/components/tooltip/tooltip.js +79 -0
  410. package/dist/components/tooltip/types.d.ts +48 -0
  411. package/dist/components/trace/index.d.ts +3 -0
  412. package/dist/components/trace/index.js +1 -0
  413. package/dist/components/trace/trace.d.ts +52 -0
  414. package/dist/components/trace/trace.js +132 -0
  415. package/dist/components/trace/types.d.ts +54 -0
  416. package/dist/components/typography/index.d.ts +3 -0
  417. package/dist/components/typography/index.js +3 -0
  418. package/dist/components/typography/types.d.ts +29 -0
  419. package/dist/components/typography/types.js +25 -0
  420. package/dist/components/typography/typography.d.ts +7 -0
  421. package/dist/components/typography/typography.js +40 -0
  422. package/dist/components/video-player/index.d.ts +6 -0
  423. package/dist/components/video-player/index.js +5 -0
  424. package/dist/components/video-player/types.d.ts +143 -0
  425. package/dist/components/video-player/use-video-player.js +319 -0
  426. package/dist/components/video-player/video-player-context.d.ts +45 -0
  427. package/dist/components/video-player/video-player-context.js +15 -0
  428. package/dist/components/video-player/video-player-controls.d.ts +38 -0
  429. package/dist/components/video-player/video-player-controls.js +226 -0
  430. package/dist/components/video-player/video-player-overlay.d.ts +13 -0
  431. package/dist/components/video-player/video-player-overlay.js +113 -0
  432. package/dist/components/video-player/video-player.d.ts +8 -0
  433. package/dist/components/video-player/video-player.js +139 -0
  434. package/dist/index.d.ts +244 -0
  435. package/dist/index.js +114 -0
  436. package/dist/lib/floating.d.ts +44 -0
  437. package/dist/lib/focus-source.js +51 -0
  438. package/dist/lib/format.d.ts +67 -0
  439. package/dist/lib/format.js +130 -0
  440. package/dist/lib/locale.d.ts +104 -0
  441. package/dist/lib/locale.js +103 -0
  442. package/dist/lib/part-props.d.ts +15 -0
  443. package/dist/lib/use-controllable-state.js +22 -0
  444. package/dist/lib/utils.d.ts +9 -0
  445. package/dist/lib/utils.js +16 -0
  446. package/dist/styles/index.css +126 -0
  447. package/dist/styles/theme.css +80 -0
  448. package/dist/styles/utilities.css +553 -0
  449. package/package.json +89 -3
@@ -0,0 +1,20 @@
1
+ import { ButtonGroupPropsT, ButtonGroupSeparatorPropsT, ButtonGroupTextPropsT } from "./types.js";
2
+ /**
3
+ * Группа кнопок: связанные кнопки, поля и списки вплотную с общей рамкой
4
+ * @param props - пропсы группы
5
+ * @returns div с role="group"
6
+ */
7
+ export declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupPropsT): import("react").JSX.Element;
8
+ /**
9
+ * Текст в группе: подпись или префикс в серой плашке
10
+ * @param props - пропсы текста
11
+ * @returns div
12
+ */
13
+ export declare function ButtonGroupText({ className, render, ...props }: ButtonGroupTextPropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
14
+ /**
15
+ * Разделитель в группе: линия между кнопками без рамки (например, secondary).
16
+ * Без orientation идёт поперёк группы: в горизонтальной — вертикальная линия, в вертикальной — горизонтальная
17
+ * @param props - пропсы разделителя
18
+ * @returns div
19
+ */
20
+ export declare function ButtonGroupSeparator({ className, orientation, ...props }: ButtonGroupSeparatorPropsT): import("react").JSX.Element;
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Separator } from "../separator/separator.js";
4
+ import { buttonGroupVariants } from "./types.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { mergeProps } from "@base-ui/react/merge-props";
7
+ import { createContext, useContext } from "react";
8
+ import { useRender } from "@base-ui/react/use-render";
9
+ // src/components/button-group/button-group.tsx
10
+ /** Ориентация ближайшей группы: разделитель внутри поворачивается поперёк неё */
11
+ const OrientationContext = createContext("horizontal");
12
+ /**
13
+ * Группа кнопок: связанные кнопки, поля и списки вплотную с общей рамкой
14
+ * @param props - пропсы группы
15
+ * @returns div с role="group"
16
+ */
17
+ function ButtonGroup({ className, orientation, ...props }) {
18
+ const classes = cn(buttonGroupVariants({ orientation }), className);
19
+ return /* @__PURE__ */ jsx(OrientationContext, {
20
+ value: orientation ?? "horizontal",
21
+ children: /* @__PURE__ */ jsx("div", {
22
+ role: "group",
23
+ "data-slot": "button-group",
24
+ "data-orientation": orientation,
25
+ className: classes,
26
+ ...props
27
+ })
28
+ });
29
+ }
30
+ /**
31
+ * Текст в группе: подпись или префикс в серой плашке
32
+ * @param props - пропсы текста
33
+ * @returns div
34
+ */
35
+ function ButtonGroupText({ className, render, ...props }) {
36
+ const classes = cn("flex", "items-center", "gap-2", "rounded-lg", "border", "bg-muted", "px-2.5", "text-sm", "font-medium", "[&_svg]:pointer-events-none", "[&_svg:not([class*=size-])]:size-4", "group-data-[orientation=vertical]/button-group:min-h-8", "group-data-[orientation=vertical]/button-group:justify-center", className);
37
+ return useRender({
38
+ defaultTagName: "div",
39
+ render,
40
+ props: mergeProps({
41
+ "data-slot": "button-group-text",
42
+ className: classes
43
+ }, props)
44
+ });
45
+ }
46
+ /**
47
+ * Разделитель в группе: линия между кнопками без рамки (например, secondary).
48
+ * Без orientation идёт поперёк группы: в горизонтальной — вертикальная линия, в вертикальной — горизонтальная
49
+ * @param props - пропсы разделителя
50
+ * @returns div
51
+ */
52
+ function ButtonGroupSeparator({ className, orientation, ...props }) {
53
+ const acrossGroup = useContext(OrientationContext) === "vertical" ? "horizontal" : "vertical";
54
+ const classes = cn("relative", "self-stretch", "bg-input", "data-horizontal:mx-px", "data-horizontal:w-auto", "data-vertical:my-px", "data-vertical:h-auto", className);
55
+ return /* @__PURE__ */ jsx(Separator, {
56
+ "data-slot": "button-group-separator",
57
+ orientation: orientation ?? acrossGroup,
58
+ className: classes,
59
+ ...props
60
+ });
61
+ }
62
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText };
@@ -0,0 +1,3 @@
1
+ import { ButtonGroupPropsT, ButtonGroupSeparatorPropsT, ButtonGroupTextPropsT, buttonGroupVariants } from "./types.js";
2
+ import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from "./button-group.js";
3
+ export { ButtonGroup, type ButtonGroupPropsT, ButtonGroupSeparator, type ButtonGroupSeparatorPropsT, ButtonGroupText, type ButtonGroupTextPropsT, buttonGroupVariants };
@@ -0,0 +1,3 @@
1
+ import { buttonGroupVariants } from "./types.js";
2
+ import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from "./button-group.js";
3
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
@@ -0,0 +1,30 @@
1
+ import { SeparatorPropsT } from "../separator/types.js";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { ComponentProps } from "react";
4
+ import { useRender } from "@base-ui/react/use-render";
5
+ /**
6
+ * Стили группы кнопок: ориентация.
7
+ * Экспортируются, чтобы оформить группой другой элемент: buttonGroupVariants({ orientation: 'vertical' }).
8
+ */
9
+ export declare const buttonGroupVariants: (props?: ({
10
+ orientation?: "horizontal" | "vertical" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ /**
13
+ * Варианты стилей группы
14
+ */
15
+ export type ButtonGroupVariantsT = VariantProps<typeof buttonGroupVariants>;
16
+ /**
17
+ * Пропсы группы кнопок
18
+ */
19
+ export type ButtonGroupPropsT = ComponentProps<'div'> & {
20
+ /** Ориентация: horizontal — в ряд, vertical — столбиком */
21
+ orientation?: ButtonGroupVariantsT['orientation'];
22
+ };
23
+ /**
24
+ * Пропсы текста в группе
25
+ */
26
+ export type ButtonGroupTextPropsT = useRender.ComponentProps<'div'>;
27
+ /**
28
+ * Пропсы разделителя в группе
29
+ */
30
+ export type ButtonGroupSeparatorPropsT = SeparatorPropsT;
@@ -0,0 +1,19 @@
1
+ import { cva } from "class-variance-authority";
2
+ // src/components/button-group/types.ts
3
+ /**
4
+ * Стили группы кнопок: ориентация.
5
+ * Экспортируются, чтобы оформить группой другой элемент: buttonGroupVariants({ orientation: 'vertical' }).
6
+ */
7
+ const buttonGroupVariants = cva([
8
+ "group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10",
9
+ "[&>[data-slot=select-trigger]:not([class*=w-])]:w-fit [&>input]:flex-1",
10
+ "has-[>[data-slot=button-group]]:gap-2",
11
+ "has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg"
12
+ ], {
13
+ variants: { orientation: {
14
+ horizontal: ["[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0", "[&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!"],
15
+ vertical: ["flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0", "[&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!"]
16
+ } },
17
+ defaultVariants: { orientation: "horizontal" }
18
+ });
19
+ export { buttonGroupVariants };
@@ -0,0 +1,15 @@
1
+ import { CalendarDayButtonPropsT, CalendarPropsT } from "./types.js";
2
+ /**
3
+ * Календарь: выбор даты, нескольких дат или периода. Неделя начинается с понедельника,
4
+ * названия месяцев и дней — на русском
5
+ * @param props - пропсы DayPicker; mode — single, multiple или range
6
+ * @returns div
7
+ */
8
+ export declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, weekStartsOn, formatters, components, ...props }: CalendarPropsT): import("react").JSX.Element;
9
+ /**
10
+ * Кнопка дня: подсветка выбранного дня и периода. Используется в components.DayButton,
11
+ * чтобы дописать в день свой текст
12
+ * @param props - пропсы кнопки от DayPicker; day и modifiers — день и его состояния
13
+ * @returns кнопка
14
+ */
15
+ export declare function CalendarDayButton({ className, day, modifiers, locale, ...props }: CalendarDayButtonPropsT): import("react").JSX.Element;
@@ -0,0 +1,157 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import "../../lib/locale.js";
4
+ import { buttonVariants } from "../button/types.js";
5
+ import { Button } from "../button/button.js";
6
+ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { useEffect, useRef } from "react";
9
+ import { DayPicker, getDefaultClassNames, useDayPicker } from "react-day-picker";
10
+ import { ru } from "react-day-picker/locale/ru";
11
+ // src/components/calendar/calendar.tsx
12
+ /**
13
+ * Корень календаря с data-slot
14
+ * @param props - пропсы корня от DayPicker
15
+ * @returns div
16
+ */
17
+ function CalendarRoot({ className, rootRef, ...props }) {
18
+ const classes = cn(className);
19
+ return /* @__PURE__ */ jsx("div", {
20
+ "data-slot": "calendar",
21
+ ref: rootRef,
22
+ className: classes,
23
+ ...props
24
+ });
25
+ }
26
+ /**
27
+ * Стрелка навигации и выпадающих списков
28
+ * @param props - пропсы стрелки от DayPicker; orientation — направление
29
+ * @returns иконка
30
+ */
31
+ function CalendarChevron({ className, orientation, size: _size, ...props }) {
32
+ const classes = cn("size-4", className);
33
+ if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, {
34
+ className: classes,
35
+ ...props
36
+ });
37
+ if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, {
38
+ className: classes,
39
+ ...props
40
+ });
41
+ return /* @__PURE__ */ jsx(ChevronDownIcon, {
42
+ className: classes,
43
+ ...props
44
+ });
45
+ }
46
+ /**
47
+ * Ячейка с номером недели
48
+ * @param props - пропсы ячейки от DayPicker
49
+ * @returns td
50
+ */
51
+ function CalendarWeekNumber({ children, week: _week, ...props }) {
52
+ return /* @__PURE__ */ jsx("td", {
53
+ ...props,
54
+ children: /* @__PURE__ */ jsx("div", {
55
+ className: "flex size-(--cell-size) items-center justify-center text-center",
56
+ children
57
+ })
58
+ });
59
+ }
60
+ /**
61
+ * Календарь: выбор даты, нескольких дат или периода. Неделя начинается с понедельника,
62
+ * названия месяцев и дней — на русском
63
+ * @param props - пропсы DayPicker; mode — single, multiple или range
64
+ * @returns div
65
+ */
66
+ function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale = ru, weekStartsOn: weekStartsOn$1 = 1, formatters, components, ...props }) {
67
+ const defaultClassNames = getDefaultClassNames();
68
+ const classes = cn("group/calendar", "bg-background", "p-2", "[--cell-radius:var(--radius-md)]", "[--cell-size:--spacing(7)]", "in-data-[slot=card-content]:bg-transparent", "in-data-[slot=popover-content]:bg-transparent", className);
69
+ const captionLabelClasses = captionLayout === "label" ? "text-sm" : "flex h-6 items-center gap-1 rounded-(--cell-radius) pr-1 pl-1.5 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground";
70
+ const dayEdgeClasses = props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)";
71
+ const navButtonClasses = cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size)", "p-0", "select-none", "aria-disabled:opacity-50");
72
+ /**
73
+ * Короткое название месяца в выпадающем списке: «янв.»
74
+ * @param date - месяц
75
+ * @returns название
76
+ */
77
+ const formatMonthDropdown = (date) => date.toLocaleString(locale?.code, { month: "short" });
78
+ return /* @__PURE__ */ jsx(DayPicker, {
79
+ showOutsideDays,
80
+ className: classes,
81
+ captionLayout,
82
+ locale,
83
+ weekStartsOn: weekStartsOn$1,
84
+ formatters: {
85
+ formatMonthDropdown,
86
+ ...formatters
87
+ },
88
+ classNames: {
89
+ root: cn("w-fit", defaultClassNames.root),
90
+ months: cn("relative", "flex", "flex-col", "gap-4", "md:flex-row", defaultClassNames.months),
91
+ month: cn("flex", "w-full", "flex-col", "gap-4", defaultClassNames.month),
92
+ nav: cn("absolute", "inset-x-0", "top-0", "flex", "w-full", "items-center", "justify-between", "gap-1", defaultClassNames.nav),
93
+ button_previous: cn(navButtonClasses, defaultClassNames.button_previous),
94
+ button_next: cn(navButtonClasses, defaultClassNames.button_next),
95
+ month_caption: cn("flex", "h-(--cell-size)", "w-full", "items-center", "justify-center", "px-(--cell-size)", defaultClassNames.month_caption),
96
+ dropdowns: cn("flex", "h-(--cell-size)", "w-full", "items-center", "justify-center", "gap-1.5", "text-sm", "font-medium", defaultClassNames.dropdowns),
97
+ dropdown_root: cn("relative", "rounded-(--cell-radius)", "border", "border-input", "keyboard:has-focus:border-ring", "keyboard:has-focus:ring-3", "keyboard:has-focus:ring-ring/50", defaultClassNames.dropdown_root),
98
+ dropdown: cn("absolute", "inset-0", "bg-popover", "opacity-0", defaultClassNames.dropdown),
99
+ caption_label: cn("font-medium", "select-none", captionLabelClasses, defaultClassNames.caption_label),
100
+ month_grid: cn("w-full", "border-collapse", defaultClassNames.month_grid),
101
+ weekdays: cn("flex", defaultClassNames.weekdays),
102
+ weekday: cn("flex-1", "rounded-(--cell-radius)", "text-[0.8rem]", "font-normal", "text-muted-foreground", "select-none", defaultClassNames.weekday),
103
+ week: cn("mt-2", "flex", "w-full", defaultClassNames.week),
104
+ week_number_header: cn("w-(--cell-size)", "select-none", defaultClassNames.week_number_header),
105
+ week_number: cn("text-[0.8rem]", "text-muted-foreground", "select-none", defaultClassNames.week_number),
106
+ day: cn("group/day", "relative", "aspect-square", "h-full", "w-full", "rounded-(--cell-radius)", "p-0", "text-center", "select-none", "[&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", dayEdgeClasses, defaultClassNames.day),
107
+ range_start: cn("relative", "isolate", "z-0", "rounded-l-(--cell-radius)", "bg-muted", "after:absolute", "after:inset-y-0", "after:right-0", "after:w-4", "after:bg-muted", defaultClassNames.range_start),
108
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
109
+ range_end: cn("relative", "isolate", "z-0", "rounded-r-(--cell-radius)", "bg-muted", "after:absolute", "after:inset-y-0", "after:left-0", "after:w-4", "after:bg-muted", defaultClassNames.range_end),
110
+ today: cn("rounded-(--cell-radius)", "bg-muted", "text-foreground", "data-[selected=true]:rounded-none", defaultClassNames.today),
111
+ outside: cn("text-muted-foreground", "aria-selected:text-muted-foreground", defaultClassNames.outside),
112
+ disabled: cn("text-muted-foreground", "opacity-50", defaultClassNames.disabled),
113
+ hidden: cn("invisible", defaultClassNames.hidden),
114
+ ...classNames
115
+ },
116
+ components: {
117
+ Root: CalendarRoot,
118
+ Chevron: CalendarChevron,
119
+ DayButton: CalendarDayButton,
120
+ WeekNumber: CalendarWeekNumber,
121
+ ...components
122
+ },
123
+ ...props
124
+ });
125
+ }
126
+ /**
127
+ * Кнопка дня: подсветка выбранного дня и периода. Используется в components.DayButton,
128
+ * чтобы дописать в день свой текст
129
+ * @param props - пропсы кнопки от DayPicker; day и modifiers — день и его состояния
130
+ * @returns кнопка
131
+ */
132
+ function CalendarDayButton({ className, day, modifiers, locale, ...props }) {
133
+ const { dayPickerProps } = useDayPicker();
134
+ const dayLocale = locale ?? dayPickerProps.locale;
135
+ const defaultClassNames = getDefaultClassNames();
136
+ const ref = useRef(null);
137
+ const isRange = modifiers.range_start || modifiers.range_end || modifiers.range_middle;
138
+ const isSelectedSingle = modifiers.selected && !isRange;
139
+ const dayLabel = day.date.toLocaleDateString(dayLocale?.code);
140
+ const classes = cn("relative", "isolate", "z-10", "flex", "aspect-square", "size-auto", "w-full", "min-w-(--cell-size)", "flex-col", "gap-1", "border-0", "leading-none", "font-normal", "group-data-[focused=true]/day:relative", "group-data-[focused=true]/day:z-10", "keyboard:group-data-[focused=true]/day:border-ring", "keyboard:group-data-[focused=true]/day:ring-[3px]", "keyboard:group-data-[focused=true]/day:ring-ring/50", "data-[range-end=true]:rounded-(--cell-radius)", "data-[range-end=true]:rounded-r-(--cell-radius)", "data-[range-end=true]:bg-primary", "data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none", "data-[range-middle=true]:bg-muted", "data-[range-middle=true]:text-foreground", "data-[range-start=true]:rounded-(--cell-radius)", "data-[range-start=true]:rounded-l-(--cell-radius)", "data-[range-start=true]:bg-primary", "data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary", "data-[selected-single=true]:text-primary-foreground", "dark:hover:text-foreground", "[&>span]:text-xs", "[&>span]:opacity-70", defaultClassNames.day, className);
141
+ useEffect(() => {
142
+ if (modifiers.focused) ref.current?.focus();
143
+ }, [modifiers.focused]);
144
+ return /* @__PURE__ */ jsx(Button, {
145
+ ref,
146
+ variant: "ghost",
147
+ size: "icon",
148
+ "data-day": dayLabel,
149
+ "data-selected-single": isSelectedSingle,
150
+ "data-range-start": modifiers.range_start,
151
+ "data-range-end": modifiers.range_end,
152
+ "data-range-middle": modifiers.range_middle,
153
+ className: classes,
154
+ ...props
155
+ });
156
+ }
157
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,3 @@
1
+ import { CalendarDayButtonPropsT, CalendarPropsT, CalendarRangeT } from "./types.js";
2
+ import { Calendar, CalendarDayButton } from "./calendar.js";
3
+ export { Calendar, CalendarDayButton, type CalendarDayButtonPropsT, type CalendarPropsT, type CalendarRangeT };
@@ -0,0 +1 @@
1
+ export { Calendar, CalendarDayButton } from "./calendar.js";
@@ -0,0 +1,21 @@
1
+ import { ButtonPropsT } from "../button/types.js";
2
+ import { ComponentProps } from "react";
3
+ import { DateRange, DayButtonProps, DayPicker, DayPickerLocale } from "react-day-picker";
4
+ /**
5
+ * Выбранный период: from — начало, to — конец
6
+ */
7
+ export type CalendarRangeT = DateRange;
8
+ /**
9
+ * Пропсы календаря
10
+ */
11
+ export type CalendarPropsT = ComponentProps<typeof DayPicker> & {
12
+ /** Вариант кнопок «назад» и «вперёд». По умолчанию ghost */
13
+ buttonVariant?: ButtonPropsT['variant'];
14
+ };
15
+ /**
16
+ * Пропсы кнопки дня
17
+ */
18
+ export type CalendarDayButtonPropsT = DayButtonProps & {
19
+ /** Локаль для data-day. По умолчанию — локаль календаря */
20
+ locale?: Partial<DayPickerLocale>;
21
+ };
@@ -0,0 +1,43 @@
1
+ import { CardActionPropsT, CardContentPropsT, CardDescriptionPropsT, CardFooterPropsT, CardHeaderPropsT, CardPropsT, CardTitlePropsT } from "./types.js";
2
+ /**
3
+ * Карточка: контейнер с шапкой, содержимым и подвалом
4
+ * @param props - пропсы карточки
5
+ * @returns карточка
6
+ */
7
+ export declare function Card({ className, size, ...props }: CardPropsT): import("react").JSX.Element;
8
+ /**
9
+ * Шапка карточки: заголовок, описание и действие справа
10
+ * @param props - пропсы шапки
11
+ * @returns шапка
12
+ */
13
+ export declare function CardHeader({ className, ...props }: CardHeaderPropsT): import("react").JSX.Element;
14
+ /**
15
+ * Заголовок карточки
16
+ * @param props - пропсы заголовка
17
+ * @returns заголовок
18
+ */
19
+ export declare function CardTitle({ className, ...props }: CardTitlePropsT): import("react").JSX.Element;
20
+ /**
21
+ * Описание карточки: поясняющий текст под заголовком
22
+ * @param props - пропсы описания
23
+ * @returns описание
24
+ */
25
+ export declare function CardDescription({ className, ...props }: CardDescriptionPropsT): import("react").JSX.Element;
26
+ /**
27
+ * Действие в правом верхнем углу шапки: кнопка, бейдж
28
+ * @param props - пропсы действия
29
+ * @returns блок действия
30
+ */
31
+ export declare function CardAction({ className, ...props }: CardActionPropsT): import("react").JSX.Element;
32
+ /**
33
+ * Содержимое карточки
34
+ * @param props - пропсы содержимого
35
+ * @returns содержимое
36
+ */
37
+ export declare function CardContent({ className, ...props }: CardContentPropsT): import("react").JSX.Element;
38
+ /**
39
+ * Подвал карточки: действия и дополнительная информация
40
+ * @param props - пропсы подвала
41
+ * @returns подвал
42
+ */
43
+ export declare function CardFooter({ className, ...props }: CardFooterPropsT): import("react").JSX.Element;
@@ -0,0 +1,97 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { cardVariants } from "./types.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/card/card.tsx
5
+ /**
6
+ * Карточка: контейнер с шапкой, содержимым и подвалом
7
+ * @param props - пропсы карточки
8
+ * @returns карточка
9
+ */
10
+ function Card({ className, size = "default", ...props }) {
11
+ const classes = cn(cardVariants({ size }), className);
12
+ return /* @__PURE__ */ jsx("div", {
13
+ "data-slot": "card",
14
+ "data-size": size,
15
+ className: classes,
16
+ ...props
17
+ });
18
+ }
19
+ /**
20
+ * Шапка карточки: заголовок, описание и действие справа
21
+ * @param props - пропсы шапки
22
+ * @returns шапка
23
+ */
24
+ function CardHeader({ className, ...props }) {
25
+ const classes = cn("group/card-header", "@container/card-header", "grid", "auto-rows-min", "items-start", "gap-1", "rounded-t-xl", "px-(--card-spacing)", "has-data-[slot=card-action]:grid-cols-[1fr_auto]", "has-data-[slot=card-description]:grid-rows-[auto_auto]", "[.border-b]:pb-(--card-spacing)", className);
26
+ return /* @__PURE__ */ jsx("div", {
27
+ "data-slot": "card-header",
28
+ className: classes,
29
+ ...props
30
+ });
31
+ }
32
+ /**
33
+ * Заголовок карточки
34
+ * @param props - пропсы заголовка
35
+ * @returns заголовок
36
+ */
37
+ function CardTitle({ className, ...props }) {
38
+ const classes = cn("text-base", "leading-snug", "font-medium", "group-data-[size=sm]/card:text-sm", className);
39
+ return /* @__PURE__ */ jsx("div", {
40
+ "data-slot": "card-title",
41
+ className: classes,
42
+ ...props
43
+ });
44
+ }
45
+ /**
46
+ * Описание карточки: поясняющий текст под заголовком
47
+ * @param props - пропсы описания
48
+ * @returns описание
49
+ */
50
+ function CardDescription({ className, ...props }) {
51
+ const classes = cn("text-sm", "text-muted-foreground", className);
52
+ return /* @__PURE__ */ jsx("div", {
53
+ "data-slot": "card-description",
54
+ className: classes,
55
+ ...props
56
+ });
57
+ }
58
+ /**
59
+ * Действие в правом верхнем углу шапки: кнопка, бейдж
60
+ * @param props - пропсы действия
61
+ * @returns блок действия
62
+ */
63
+ function CardAction({ className, ...props }) {
64
+ const classes = cn("col-start-2", "row-span-2", "row-start-1", "self-start", "justify-self-end", className);
65
+ return /* @__PURE__ */ jsx("div", {
66
+ "data-slot": "card-action",
67
+ className: classes,
68
+ ...props
69
+ });
70
+ }
71
+ /**
72
+ * Содержимое карточки
73
+ * @param props - пропсы содержимого
74
+ * @returns содержимое
75
+ */
76
+ function CardContent({ className, ...props }) {
77
+ const classes = cn("px-(--card-spacing)", className);
78
+ return /* @__PURE__ */ jsx("div", {
79
+ "data-slot": "card-content",
80
+ className: classes,
81
+ ...props
82
+ });
83
+ }
84
+ /**
85
+ * Подвал карточки: действия и дополнительная информация
86
+ * @param props - пропсы подвала
87
+ * @returns подвал
88
+ */
89
+ function CardFooter({ className, ...props }) {
90
+ const classes = cn("flex", "items-center", "rounded-b-xl", "border-t", "bg-muted/50", "p-(--card-spacing)", className);
91
+ return /* @__PURE__ */ jsx("div", {
92
+ "data-slot": "card-footer",
93
+ className: classes,
94
+ ...props
95
+ });
96
+ }
97
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -0,0 +1,3 @@
1
+ import { CardActionPropsT, CardContentPropsT, CardDescriptionPropsT, CardFooterPropsT, CardHeaderPropsT, CardPropsT, CardTitlePropsT, cardVariants } from "./types.js";
2
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
3
+ export { Card, CardAction, type CardActionPropsT, CardContent, type CardContentPropsT, CardDescription, type CardDescriptionPropsT, CardFooter, type CardFooterPropsT, CardHeader, type CardHeaderPropsT, type CardPropsT, CardTitle, type CardTitlePropsT, cardVariants };
@@ -0,0 +1,3 @@
1
+ import { cardVariants } from "./types.js";
2
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
3
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants };
@@ -0,0 +1,44 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { ComponentProps } from "react";
3
+ /**
4
+ * Стили карточки: размер задаёт отступы через CSS-переменную --card-spacing.
5
+ * Свои отступы — классом: className={'[--card-spacing:--spacing(6)]'}.
6
+ */
7
+ export declare const cardVariants: (props?: ({
8
+ size?: "default" | "sm" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ /**
11
+ * Размеры карточки
12
+ */
13
+ export type CardVariantsT = VariantProps<typeof cardVariants>;
14
+ /**
15
+ * Пропсы карточки
16
+ */
17
+ export type CardPropsT = ComponentProps<'div'> & {
18
+ /** Размер: default — отступы 16px, sm — компактные отступы 12px */
19
+ size?: CardVariantsT['size'];
20
+ };
21
+ /**
22
+ * Пропсы шапки карточки
23
+ */
24
+ export type CardHeaderPropsT = ComponentProps<'div'>;
25
+ /**
26
+ * Пропсы заголовка карточки
27
+ */
28
+ export type CardTitlePropsT = ComponentProps<'div'>;
29
+ /**
30
+ * Пропсы описания карточки
31
+ */
32
+ export type CardDescriptionPropsT = ComponentProps<'div'>;
33
+ /**
34
+ * Пропсы действия в шапке карточки
35
+ */
36
+ export type CardActionPropsT = ComponentProps<'div'>;
37
+ /**
38
+ * Пропсы содержимого карточки
39
+ */
40
+ export type CardContentPropsT = ComponentProps<'div'>;
41
+ /**
42
+ * Пропсы подвала карточки
43
+ */
44
+ export type CardFooterPropsT = ComponentProps<'div'>;
@@ -0,0 +1,19 @@
1
+ import { cva } from "class-variance-authority";
2
+ // src/components/card/types.ts
3
+ /**
4
+ * Стили карточки: размер задаёт отступы через CSS-переменную --card-spacing.
5
+ * Свои отступы — классом: className={'[--card-spacing:--spacing(6)]'}.
6
+ */
7
+ const cardVariants = cva([
8
+ "group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing)",
9
+ "text-sm text-card-foreground ring-1 ring-foreground/10",
10
+ "has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0",
11
+ "*:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl"
12
+ ], {
13
+ variants: { size: {
14
+ default: "[--card-spacing:--spacing(4)]",
15
+ sm: "[--card-spacing:--spacing(3)]"
16
+ } },
17
+ defaultVariants: { size: "default" }
18
+ });
19
+ export { cardVariants };
@@ -0,0 +1,36 @@
1
+ import { CarouselContentPropsT, CarouselContextI, CarouselItemPropsT, CarouselNextPropsT, CarouselPreviousPropsT, CarouselPropsT } from "./types.js";
2
+ /**
3
+ * Состояние карусели: API, направление, функции прокрутки
4
+ * @returns состояние из Carousel
5
+ */
6
+ export declare function useCarousel(): CarouselContextI;
7
+ /**
8
+ * Карусель на Embla: слайды листаются свайпом, кнопками и стрелками клавиатуры
9
+ * @param props - пропсы карусели
10
+ * @returns div с role="region"
11
+ */
12
+ export declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: CarouselPropsT): import("react").JSX.Element;
13
+ /**
14
+ * Лента слайдов: область прокрутки с CarouselItem внутри
15
+ * @param props - пропсы ленты; className уходит на внутренний flex-контейнер
16
+ * @returns div
17
+ */
18
+ export declare function CarouselContent({ className, ...props }: CarouselContentPropsT): import("react").JSX.Element;
19
+ /**
20
+ * Слайд: по умолчанию во всю ширину; basis-1/2, basis-1/3 — несколько слайдов в ряд
21
+ * @param props - пропсы слайда
22
+ * @returns div с role="group"
23
+ */
24
+ export declare function CarouselItem({ className, ...props }: CarouselItemPropsT): import("react").JSX.Element;
25
+ /**
26
+ * Кнопка «назад»: круглая, слева от карусели, неактивна на первом слайде
27
+ * @param props - пропсы кнопки; по умолчанию variant="outline", size="icon-sm"
28
+ * @returns кнопка
29
+ */
30
+ export declare function CarouselPrevious({ className, variant, size, label, onClick, ...props }: CarouselPreviousPropsT): import("react").JSX.Element;
31
+ /**
32
+ * Кнопка «вперёд»: круглая, справа от карусели, неактивна на последнем слайде
33
+ * @param props - пропсы кнопки; по умолчанию variant="outline", size="icon-sm"
34
+ * @returns кнопка
35
+ */
36
+ export declare function CarouselNext({ className, variant, size, label, onClick, ...props }: CarouselNextPropsT): import("react").JSX.Element;