@thalavaisankar/atoms 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 (769) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +196 -2
  3. package/THIRD_PARTY_NOTICES.md +275 -0
  4. package/dist/blocks/index.d.mts +2 -0
  5. package/dist/blocks/index.mjs +1 -0
  6. package/dist/blocks/index.mjs.map +1 -0
  7. package/dist/components/ui/accordion/accordion.mjs +194 -0
  8. package/dist/components/ui/accordion/accordion.mjs.map +1 -0
  9. package/dist/components/ui/accordion/index.mjs +15 -0
  10. package/dist/components/ui/accordion/index.mjs.map +1 -0
  11. package/dist/components/ui/activity-feed/activity-feed.mjs +287 -0
  12. package/dist/components/ui/activity-feed/activity-feed.mjs.map +1 -0
  13. package/dist/components/ui/activity-feed/index.mjs +39 -0
  14. package/dist/components/ui/activity-feed/index.mjs.map +1 -0
  15. package/dist/components/ui/alert/alert.mjs +128 -0
  16. package/dist/components/ui/alert/alert.mjs.map +1 -0
  17. package/dist/components/ui/alert/index.mjs +17 -0
  18. package/dist/components/ui/alert/index.mjs.map +1 -0
  19. package/dist/components/ui/animated-label/animated-label.mjs +89 -0
  20. package/dist/components/ui/animated-label/animated-label.mjs.map +1 -0
  21. package/dist/components/ui/animated-label/index.mjs +9 -0
  22. package/dist/components/ui/animated-label/index.mjs.map +1 -0
  23. package/dist/components/ui/animated-number/animated-number.mjs +101 -0
  24. package/dist/components/ui/animated-number/animated-number.mjs.map +1 -0
  25. package/dist/components/ui/animated-number/index.mjs +5 -0
  26. package/dist/components/ui/animated-number/index.mjs.map +1 -0
  27. package/dist/components/ui/avatar/avatar.mjs +130 -0
  28. package/dist/components/ui/avatar/avatar.mjs.map +1 -0
  29. package/dist/components/ui/avatar/index.mjs +17 -0
  30. package/dist/components/ui/avatar/index.mjs.map +1 -0
  31. package/dist/components/ui/avatar-group/avatar-group.mjs +49 -0
  32. package/dist/components/ui/avatar-group/avatar-group.mjs.map +1 -0
  33. package/dist/components/ui/avatar-group/index.mjs +5 -0
  34. package/dist/components/ui/avatar-group/index.mjs.map +1 -0
  35. package/dist/components/ui/badge/badge-motion.mjs +108 -0
  36. package/dist/components/ui/badge/badge-motion.mjs.map +1 -0
  37. package/dist/components/ui/badge/badge.mjs +314 -0
  38. package/dist/components/ui/badge/badge.mjs.map +1 -0
  39. package/dist/components/ui/badge/index.mjs +27 -0
  40. package/dist/components/ui/badge/index.mjs.map +1 -0
  41. package/dist/components/ui/badge/readable-ink.mjs +36 -0
  42. package/dist/components/ui/badge/readable-ink.mjs.map +1 -0
  43. package/dist/components/ui/badge-group/badge-group.mjs +132 -0
  44. package/dist/components/ui/badge-group/badge-group.mjs.map +1 -0
  45. package/dist/components/ui/badge-group/index.mjs +5 -0
  46. package/dist/components/ui/badge-group/index.mjs.map +1 -0
  47. package/dist/components/ui/breadcrumb/breadcrumb.mjs +108 -0
  48. package/dist/components/ui/breadcrumb/breadcrumb.mjs.map +1 -0
  49. package/dist/components/ui/breadcrumb/index.mjs +19 -0
  50. package/dist/components/ui/breadcrumb/index.mjs.map +1 -0
  51. package/dist/components/ui/button/button-variants.mjs +80 -0
  52. package/dist/components/ui/button/button-variants.mjs.map +1 -0
  53. package/dist/components/ui/button/button.mjs +74 -0
  54. package/dist/components/ui/button/button.mjs.map +1 -0
  55. package/dist/components/ui/button/index.mjs +17 -0
  56. package/dist/components/ui/button/index.mjs.map +1 -0
  57. package/dist/components/ui/button/social-button.mjs +45 -0
  58. package/dist/components/ui/button/social-button.mjs.map +1 -0
  59. package/dist/components/ui/button/social-logos.mjs +179 -0
  60. package/dist/components/ui/button/social-logos.mjs.map +1 -0
  61. package/dist/components/ui/button/split-button.mjs +72 -0
  62. package/dist/components/ui/button/split-button.mjs.map +1 -0
  63. package/dist/components/ui/button-group/button-group.mjs +58 -0
  64. package/dist/components/ui/button-group/button-group.mjs.map +1 -0
  65. package/dist/components/ui/button-group/index.mjs +11 -0
  66. package/dist/components/ui/button-group/index.mjs.map +1 -0
  67. package/dist/components/ui/card/card.mjs +131 -0
  68. package/dist/components/ui/card/card.mjs.map +1 -0
  69. package/dist/components/ui/card/index.mjs +23 -0
  70. package/dist/components/ui/card/index.mjs.map +1 -0
  71. package/dist/components/ui/chart/bar-list.mjs +87 -0
  72. package/dist/components/ui/chart/bar-list.mjs.map +1 -0
  73. package/dist/components/ui/chart/chart-colors.mjs +68 -0
  74. package/dist/components/ui/chart/chart-colors.mjs.map +1 -0
  75. package/dist/components/ui/chart/chart-geometry.mjs +152 -0
  76. package/dist/components/ui/chart/chart-geometry.mjs.map +1 -0
  77. package/dist/components/ui/chart/chart-specialized.mjs +194 -0
  78. package/dist/components/ui/chart/chart-specialized.mjs.map +1 -0
  79. package/dist/components/ui/chart/chart.mjs +648 -0
  80. package/dist/components/ui/chart/chart.mjs.map +1 -0
  81. package/dist/components/ui/chart/index.mjs +88 -0
  82. package/dist/components/ui/chart/index.mjs.map +1 -0
  83. package/dist/components/ui/chart/radial-meter.mjs +142 -0
  84. package/dist/components/ui/chart/radial-meter.mjs.map +1 -0
  85. package/dist/components/ui/chart/types.mjs +1 -0
  86. package/dist/components/ui/chart/types.mjs.map +1 -0
  87. package/dist/components/ui/checkbox/checkbox.mjs +183 -0
  88. package/dist/components/ui/checkbox/checkbox.mjs.map +1 -0
  89. package/dist/components/ui/checkbox/index.mjs +11 -0
  90. package/dist/components/ui/checkbox/index.mjs.map +1 -0
  91. package/dist/components/ui/checklist/checklist.mjs +353 -0
  92. package/dist/components/ui/checklist/checklist.mjs.map +1 -0
  93. package/dist/components/ui/checklist/index.mjs +33 -0
  94. package/dist/components/ui/checklist/index.mjs.map +1 -0
  95. package/dist/components/ui/chip/chip.mjs +202 -0
  96. package/dist/components/ui/chip/chip.mjs.map +1 -0
  97. package/dist/components/ui/chip/index.mjs +13 -0
  98. package/dist/components/ui/chip/index.mjs.map +1 -0
  99. package/dist/components/ui/chip-group/chip-group.mjs +204 -0
  100. package/dist/components/ui/chip-group/chip-group.mjs.map +1 -0
  101. package/dist/components/ui/chip-group/index.mjs +11 -0
  102. package/dist/components/ui/chip-group/index.mjs.map +1 -0
  103. package/dist/components/ui/code-snippet/code-highlighter.mjs +16 -0
  104. package/dist/components/ui/code-snippet/code-highlighter.mjs.map +1 -0
  105. package/dist/components/ui/code-snippet/code-snippet.mjs +437 -0
  106. package/dist/components/ui/code-snippet/code-snippet.mjs.map +1 -0
  107. package/dist/components/ui/code-snippet/index.mjs +17 -0
  108. package/dist/components/ui/code-snippet/index.mjs.map +1 -0
  109. package/dist/components/ui/code-snippet/labels.mjs +16 -0
  110. package/dist/components/ui/code-snippet/labels.mjs.map +1 -0
  111. package/dist/components/ui/code-snippet/tokenize.mjs +715 -0
  112. package/dist/components/ui/code-snippet/tokenize.mjs.map +1 -0
  113. package/dist/components/ui/code-snippet/types.mjs +1 -0
  114. package/dist/components/ui/code-snippet/types.mjs.map +1 -0
  115. package/dist/components/ui/collapsible/collapsible.mjs +85 -0
  116. package/dist/components/ui/collapsible/collapsible.mjs.map +1 -0
  117. package/dist/components/ui/collapsible/index.mjs +15 -0
  118. package/dist/components/ui/collapsible/index.mjs.map +1 -0
  119. package/dist/components/ui/color-picker/color-picker.mjs +852 -0
  120. package/dist/components/ui/color-picker/color-picker.mjs.map +1 -0
  121. package/dist/components/ui/color-picker/index.mjs +47 -0
  122. package/dist/components/ui/color-picker/index.mjs.map +1 -0
  123. package/dist/components/ui/combobox/combobox.mjs +745 -0
  124. package/dist/components/ui/combobox/combobox.mjs.map +1 -0
  125. package/dist/components/ui/combobox/index.mjs +27 -0
  126. package/dist/components/ui/combobox/index.mjs.map +1 -0
  127. package/dist/components/ui/command/command.mjs +439 -0
  128. package/dist/components/ui/command/command.mjs.map +1 -0
  129. package/dist/components/ui/command/index.mjs +31 -0
  130. package/dist/components/ui/command/index.mjs.map +1 -0
  131. package/dist/components/ui/compare-slider/compare-slider.mjs +335 -0
  132. package/dist/components/ui/compare-slider/compare-slider.mjs.map +1 -0
  133. package/dist/components/ui/compare-slider/index.mjs +17 -0
  134. package/dist/components/ui/compare-slider/index.mjs.map +1 -0
  135. package/dist/components/ui/context-menu/context-menu.mjs +184 -0
  136. package/dist/components/ui/context-menu/context-menu.mjs.map +1 -0
  137. package/dist/components/ui/context-menu/index.mjs +37 -0
  138. package/dist/components/ui/context-menu/index.mjs.map +1 -0
  139. package/dist/components/ui/data-table/active-filters.mjs +69 -0
  140. package/dist/components/ui/data-table/active-filters.mjs.map +1 -0
  141. package/dist/components/ui/data-table/body-row.mjs +118 -0
  142. package/dist/components/ui/data-table/body-row.mjs.map +1 -0
  143. package/dist/components/ui/data-table/cards.mjs +76 -0
  144. package/dist/components/ui/data-table/cards.mjs.map +1 -0
  145. package/dist/components/ui/data-table/data-table.mjs +680 -0
  146. package/dist/components/ui/data-table/data-table.mjs.map +1 -0
  147. package/dist/components/ui/data-table/empty.mjs +26 -0
  148. package/dist/components/ui/data-table/empty.mjs.map +1 -0
  149. package/dist/components/ui/data-table/expand.mjs +70 -0
  150. package/dist/components/ui/data-table/expand.mjs.map +1 -0
  151. package/dist/components/ui/data-table/faceted-filter.mjs +112 -0
  152. package/dist/components/ui/data-table/faceted-filter.mjs.map +1 -0
  153. package/dist/components/ui/data-table/features.mjs +96 -0
  154. package/dist/components/ui/data-table/features.mjs.map +1 -0
  155. package/dist/components/ui/data-table/grip.mjs +37 -0
  156. package/dist/components/ui/data-table/grip.mjs.map +1 -0
  157. package/dist/components/ui/data-table/header-cell.mjs +85 -0
  158. package/dist/components/ui/data-table/header-cell.mjs.map +1 -0
  159. package/dist/components/ui/data-table/index.mjs +55 -0
  160. package/dist/components/ui/data-table/index.mjs.map +1 -0
  161. package/dist/components/ui/data-table/labels.mjs +55 -0
  162. package/dist/components/ui/data-table/labels.mjs.map +1 -0
  163. package/dist/components/ui/data-table/load-more.mjs +56 -0
  164. package/dist/components/ui/data-table/load-more.mjs.map +1 -0
  165. package/dist/components/ui/data-table/move-item.mjs +11 -0
  166. package/dist/components/ui/data-table/move-item.mjs.map +1 -0
  167. package/dist/components/ui/data-table/persist.mjs +65 -0
  168. package/dist/components/ui/data-table/persist.mjs.map +1 -0
  169. package/dist/components/ui/data-table/selection-bar.mjs +51 -0
  170. package/dist/components/ui/data-table/selection-bar.mjs.map +1 -0
  171. package/dist/components/ui/data-table/tabs.mjs +48 -0
  172. package/dist/components/ui/data-table/tabs.mjs.map +1 -0
  173. package/dist/components/ui/data-table/toolbar.mjs +92 -0
  174. package/dist/components/ui/data-table/toolbar.mjs.map +1 -0
  175. package/dist/components/ui/data-table/use-reorder.mjs +239 -0
  176. package/dist/components/ui/data-table/use-reorder.mjs.map +1 -0
  177. package/dist/components/ui/data-table/use-reveal.mjs +24 -0
  178. package/dist/components/ui/data-table/use-reveal.mjs.map +1 -0
  179. package/dist/components/ui/data-table/use-table-state.mjs +38 -0
  180. package/dist/components/ui/data-table/use-table-state.mjs.map +1 -0
  181. package/dist/components/ui/data-table/view-options.mjs +66 -0
  182. package/dist/components/ui/data-table/view-options.mjs.map +1 -0
  183. package/dist/components/ui/date-picker/calendar.mjs +466 -0
  184. package/dist/components/ui/date-picker/calendar.mjs.map +1 -0
  185. package/dist/components/ui/date-picker/date-picker.mjs +366 -0
  186. package/dist/components/ui/date-picker/date-picker.mjs.map +1 -0
  187. package/dist/components/ui/date-picker/index.mjs +17 -0
  188. package/dist/components/ui/date-picker/index.mjs.map +1 -0
  189. package/dist/components/ui/date-picker/presets.mjs +49 -0
  190. package/dist/components/ui/date-picker/presets.mjs.map +1 -0
  191. package/dist/components/ui/description-list/description-list.mjs +40 -0
  192. package/dist/components/ui/description-list/description-list.mjs.map +1 -0
  193. package/dist/components/ui/description-list/index.mjs +15 -0
  194. package/dist/components/ui/description-list/index.mjs.map +1 -0
  195. package/dist/components/ui/dialog/dialog-stepper.mjs +23 -0
  196. package/dist/components/ui/dialog/dialog-stepper.mjs.map +1 -0
  197. package/dist/components/ui/dialog/dialog.mjs +343 -0
  198. package/dist/components/ui/dialog/dialog.mjs.map +1 -0
  199. package/dist/components/ui/dialog/focus-return.mjs +21 -0
  200. package/dist/components/ui/dialog/focus-return.mjs.map +1 -0
  201. package/dist/components/ui/dialog/index.mjs +33 -0
  202. package/dist/components/ui/dialog/index.mjs.map +1 -0
  203. package/dist/components/ui/divider/divider.mjs +130 -0
  204. package/dist/components/ui/divider/divider.mjs.map +1 -0
  205. package/dist/components/ui/divider/index.mjs +6 -0
  206. package/dist/components/ui/divider/index.mjs.map +1 -0
  207. package/dist/components/ui/dock/dock.mjs +444 -0
  208. package/dist/components/ui/dock/dock.mjs.map +1 -0
  209. package/dist/components/ui/dock/index.mjs +19 -0
  210. package/dist/components/ui/dock/index.mjs.map +1 -0
  211. package/dist/components/ui/document-editor/block-actions.mjs +118 -0
  212. package/dist/components/ui/document-editor/block-actions.mjs.map +1 -0
  213. package/dist/components/ui/document-editor/block-commands.mjs +182 -0
  214. package/dist/components/ui/document-editor/block-commands.mjs.map +1 -0
  215. package/dist/components/ui/document-editor/block-handle.mjs +387 -0
  216. package/dist/components/ui/document-editor/block-handle.mjs.map +1 -0
  217. package/dist/components/ui/document-editor/block-morph.mjs +95 -0
  218. package/dist/components/ui/document-editor/block-morph.mjs.map +1 -0
  219. package/dist/components/ui/document-editor/block-selection.mjs +81 -0
  220. package/dist/components/ui/document-editor/block-selection.mjs.map +1 -0
  221. package/dist/components/ui/document-editor/blocks.mjs +30 -0
  222. package/dist/components/ui/document-editor/blocks.mjs.map +1 -0
  223. package/dist/components/ui/document-editor/bubble-menu.mjs +120 -0
  224. package/dist/components/ui/document-editor/bubble-menu.mjs.map +1 -0
  225. package/dist/components/ui/document-editor/code-block.mjs +89 -0
  226. package/dist/components/ui/document-editor/code-block.mjs.map +1 -0
  227. package/dist/components/ui/document-editor/collaboration-types.mjs +9 -0
  228. package/dist/components/ui/document-editor/collaboration-types.mjs.map +1 -0
  229. package/dist/components/ui/document-editor/collaboration.mjs +198 -0
  230. package/dist/components/ui/document-editor/collaboration.mjs.map +1 -0
  231. package/dist/components/ui/document-editor/columns.mjs +52 -0
  232. package/dist/components/ui/document-editor/columns.mjs.map +1 -0
  233. package/dist/components/ui/document-editor/contents.mjs +60 -0
  234. package/dist/components/ui/document-editor/contents.mjs.map +1 -0
  235. package/dist/components/ui/document-editor/date-chip.mjs +115 -0
  236. package/dist/components/ui/document-editor/date-chip.mjs.map +1 -0
  237. package/dist/components/ui/document-editor/date-words.mjs +101 -0
  238. package/dist/components/ui/document-editor/date-words.mjs.map +1 -0
  239. package/dist/components/ui/document-editor/doc-labels.mjs +19 -0
  240. package/dist/components/ui/document-editor/doc-labels.mjs.map +1 -0
  241. package/dist/components/ui/document-editor/document-editor.mjs +496 -0
  242. package/dist/components/ui/document-editor/document-editor.mjs.map +1 -0
  243. package/dist/components/ui/document-editor/emoji-suggest.mjs +81 -0
  244. package/dist/components/ui/document-editor/emoji-suggest.mjs.map +1 -0
  245. package/dist/components/ui/document-editor/focus-mode.mjs +32 -0
  246. package/dist/components/ui/document-editor/focus-mode.mjs.map +1 -0
  247. package/dist/components/ui/document-editor/geometry.mjs +35 -0
  248. package/dist/components/ui/document-editor/geometry.mjs.map +1 -0
  249. package/dist/components/ui/document-editor/ghost-text.mjs +154 -0
  250. package/dist/components/ui/document-editor/ghost-text.mjs.map +1 -0
  251. package/dist/components/ui/document-editor/gliding-caret.mjs +118 -0
  252. package/dist/components/ui/document-editor/gliding-caret.mjs.map +1 -0
  253. package/dist/components/ui/document-editor/headings.mjs +64 -0
  254. package/dist/components/ui/document-editor/headings.mjs.map +1 -0
  255. package/dist/components/ui/document-editor/image.mjs +318 -0
  256. package/dist/components/ui/document-editor/image.mjs.map +1 -0
  257. package/dist/components/ui/document-editor/index.mjs +131 -0
  258. package/dist/components/ui/document-editor/index.mjs.map +1 -0
  259. package/dist/components/ui/document-editor/labels.mjs +96 -0
  260. package/dist/components/ui/document-editor/labels.mjs.map +1 -0
  261. package/dist/components/ui/document-editor/link-card.mjs +138 -0
  262. package/dist/components/ui/document-editor/link-card.mjs.map +1 -0
  263. package/dist/components/ui/document-editor/mentions.mjs +105 -0
  264. package/dist/components/ui/document-editor/mentions.mjs.map +1 -0
  265. package/dist/components/ui/document-editor/outline.mjs +138 -0
  266. package/dist/components/ui/document-editor/outline.mjs.map +1 -0
  267. package/dist/components/ui/document-editor/section-fold.mjs +124 -0
  268. package/dist/components/ui/document-editor/section-fold.mjs.map +1 -0
  269. package/dist/components/ui/document-editor/slash-command.mjs +210 -0
  270. package/dist/components/ui/document-editor/slash-command.mjs.map +1 -0
  271. package/dist/components/ui/document-editor/suggest-list.mjs +187 -0
  272. package/dist/components/ui/document-editor/suggest-list.mjs.map +1 -0
  273. package/dist/components/ui/document-editor/table.mjs +242 -0
  274. package/dist/components/ui/document-editor/table.mjs.map +1 -0
  275. package/dist/components/ui/document-editor/templates.mjs +66 -0
  276. package/dist/components/ui/document-editor/templates.mjs.map +1 -0
  277. package/dist/components/ui/document-editor/toggle.mjs +176 -0
  278. package/dist/components/ui/document-editor/toggle.mjs.map +1 -0
  279. package/dist/components/ui/document-editor/typography-rules.mjs +8 -0
  280. package/dist/components/ui/document-editor/typography-rules.mjs.map +1 -0
  281. package/dist/components/ui/document-editor/use-editor-value.mjs +34 -0
  282. package/dist/components/ui/document-editor/use-editor-value.mjs.map +1 -0
  283. package/dist/components/ui/drawer/drawer-nav.mjs +153 -0
  284. package/dist/components/ui/drawer/drawer-nav.mjs.map +1 -0
  285. package/dist/components/ui/drawer/drawer.mjs +334 -0
  286. package/dist/components/ui/drawer/drawer.mjs.map +1 -0
  287. package/dist/components/ui/drawer/index.mjs +37 -0
  288. package/dist/components/ui/drawer/index.mjs.map +1 -0
  289. package/dist/components/ui/drawer/use-swipe-to-close.mjs +77 -0
  290. package/dist/components/ui/drawer/use-swipe-to-close.mjs.map +1 -0
  291. package/dist/components/ui/dropdown-menu/dropdown-menu.mjs +567 -0
  292. package/dist/components/ui/dropdown-menu/dropdown-menu.mjs.map +1 -0
  293. package/dist/components/ui/dropdown-menu/index.mjs +43 -0
  294. package/dist/components/ui/dropdown-menu/index.mjs.map +1 -0
  295. package/dist/components/ui/editable-text/editable-text.mjs +148 -0
  296. package/dist/components/ui/editable-text/editable-text.mjs.map +1 -0
  297. package/dist/components/ui/editable-text/index.mjs +6 -0
  298. package/dist/components/ui/editable-text/index.mjs.map +1 -0
  299. package/dist/components/ui/emoji-picker/emoji-data.mjs +469 -0
  300. package/dist/components/ui/emoji-picker/emoji-data.mjs.map +1 -0
  301. package/dist/components/ui/emoji-picker/emoji-picker.mjs +464 -0
  302. package/dist/components/ui/emoji-picker/emoji-picker.mjs.map +1 -0
  303. package/dist/components/ui/emoji-picker/index.mjs +19 -0
  304. package/dist/components/ui/emoji-picker/index.mjs.map +1 -0
  305. package/dist/components/ui/empty-state/empty-state.mjs +110 -0
  306. package/dist/components/ui/empty-state/empty-state.mjs.map +1 -0
  307. package/dist/components/ui/empty-state/index.mjs +17 -0
  308. package/dist/components/ui/empty-state/index.mjs.map +1 -0
  309. package/dist/components/ui/event-calendar/calendar-math.mjs +256 -0
  310. package/dist/components/ui/event-calendar/calendar-math.mjs.map +1 -0
  311. package/dist/components/ui/event-calendar/context.mjs +51 -0
  312. package/dist/components/ui/event-calendar/context.mjs.map +1 -0
  313. package/dist/components/ui/event-calendar/editor.mjs +292 -0
  314. package/dist/components/ui/event-calendar/editor.mjs.map +1 -0
  315. package/dist/components/ui/event-calendar/event-block.mjs +55 -0
  316. package/dist/components/ui/event-calendar/event-block.mjs.map +1 -0
  317. package/dist/components/ui/event-calendar/event-calendar.mjs +438 -0
  318. package/dist/components/ui/event-calendar/event-calendar.mjs.map +1 -0
  319. package/dist/components/ui/event-calendar/event-keys.mjs +41 -0
  320. package/dist/components/ui/event-calendar/event-keys.mjs.map +1 -0
  321. package/dist/components/ui/event-calendar/index.mjs +37 -0
  322. package/dist/components/ui/event-calendar/index.mjs.map +1 -0
  323. package/dist/components/ui/event-calendar/month-grid.mjs +207 -0
  324. package/dist/components/ui/event-calendar/month-grid.mjs.map +1 -0
  325. package/dist/components/ui/event-calendar/narrow.mjs +193 -0
  326. package/dist/components/ui/event-calendar/narrow.mjs.map +1 -0
  327. package/dist/components/ui/event-calendar/time-grid.mjs +534 -0
  328. package/dist/components/ui/event-calendar/time-grid.mjs.map +1 -0
  329. package/dist/components/ui/expandable-search/expandable-search.mjs +174 -0
  330. package/dist/components/ui/expandable-search/expandable-search.mjs.map +1 -0
  331. package/dist/components/ui/expandable-search/index.mjs +6 -0
  332. package/dist/components/ui/expandable-search/index.mjs.map +1 -0
  333. package/dist/components/ui/field/field.mjs +444 -0
  334. package/dist/components/ui/field/field.mjs.map +1 -0
  335. package/dist/components/ui/field/index.mjs +21 -0
  336. package/dist/components/ui/field/index.mjs.map +1 -0
  337. package/dist/components/ui/file-card/file-card.mjs +198 -0
  338. package/dist/components/ui/file-card/file-card.mjs.map +1 -0
  339. package/dist/components/ui/file-card/file-icon.mjs +66 -0
  340. package/dist/components/ui/file-card/file-icon.mjs.map +1 -0
  341. package/dist/components/ui/file-card/file-types.mjs +70 -0
  342. package/dist/components/ui/file-card/file-types.mjs.map +1 -0
  343. package/dist/components/ui/file-card/index.mjs +32 -0
  344. package/dist/components/ui/file-card/index.mjs.map +1 -0
  345. package/dist/components/ui/file-preview/context.mjs +77 -0
  346. package/dist/components/ui/file-preview/context.mjs.map +1 -0
  347. package/dist/components/ui/file-preview/file-preview.mjs +865 -0
  348. package/dist/components/ui/file-preview/file-preview.mjs.map +1 -0
  349. package/dist/components/ui/file-preview/index.mjs +56 -0
  350. package/dist/components/ui/file-preview/index.mjs.map +1 -0
  351. package/dist/components/ui/file-preview/pdf.mjs +250 -0
  352. package/dist/components/ui/file-preview/pdf.mjs.map +1 -0
  353. package/dist/components/ui/file-preview/renderers.mjs +257 -0
  354. package/dist/components/ui/file-preview/renderers.mjs.map +1 -0
  355. package/dist/components/ui/file-upload/file-upload.mjs +633 -0
  356. package/dist/components/ui/file-upload/file-upload.mjs.map +1 -0
  357. package/dist/components/ui/file-upload/index.mjs +42 -0
  358. package/dist/components/ui/file-upload/index.mjs.map +1 -0
  359. package/dist/components/ui/file-upload/validate.mjs +111 -0
  360. package/dist/components/ui/file-upload/validate.mjs.map +1 -0
  361. package/dist/components/ui/flag/flag.mjs +39 -0
  362. package/dist/components/ui/flag/flag.mjs.map +1 -0
  363. package/dist/components/ui/flag/index.mjs +7 -0
  364. package/dist/components/ui/flag/index.mjs.map +1 -0
  365. package/dist/components/ui/floating-window/floating-window.mjs +255 -0
  366. package/dist/components/ui/floating-window/floating-window.mjs.map +1 -0
  367. package/dist/components/ui/floating-window/index.mjs +11 -0
  368. package/dist/components/ui/floating-window/index.mjs.map +1 -0
  369. package/dist/components/ui/form/form-section.mjs +87 -0
  370. package/dist/components/ui/form/form-section.mjs.map +1 -0
  371. package/dist/components/ui/form/form.mjs +205 -0
  372. package/dist/components/ui/form/form.mjs.map +1 -0
  373. package/dist/components/ui/form/index.mjs +29 -0
  374. package/dist/components/ui/form/index.mjs.map +1 -0
  375. package/dist/components/ui/globe/globe-data.mjs +9 -0
  376. package/dist/components/ui/globe/globe-data.mjs.map +1 -0
  377. package/dist/components/ui/globe/globe-math.mjs +269 -0
  378. package/dist/components/ui/globe/globe-math.mjs.map +1 -0
  379. package/dist/components/ui/globe/globe.mjs +719 -0
  380. package/dist/components/ui/globe/globe.mjs.map +1 -0
  381. package/dist/components/ui/globe/index.mjs +13 -0
  382. package/dist/components/ui/globe/index.mjs.map +1 -0
  383. package/dist/components/ui/highlight-match/highlight-children.mjs +13 -0
  384. package/dist/components/ui/highlight-match/highlight-children.mjs.map +1 -0
  385. package/dist/components/ui/highlight-match/highlight-match-variants.mjs +17 -0
  386. package/dist/components/ui/highlight-match/highlight-match-variants.mjs.map +1 -0
  387. package/dist/components/ui/highlight-match/highlight-match.mjs +37 -0
  388. package/dist/components/ui/highlight-match/highlight-match.mjs.map +1 -0
  389. package/dist/components/ui/highlight-match/index.mjs +15 -0
  390. package/dist/components/ui/highlight-match/index.mjs.map +1 -0
  391. package/dist/components/ui/highlight-match/match-ranges.mjs +50 -0
  392. package/dist/components/ui/highlight-match/match-ranges.mjs.map +1 -0
  393. package/dist/components/ui/histogram-slider/histogram-slider.mjs +83 -0
  394. package/dist/components/ui/histogram-slider/histogram-slider.mjs.map +1 -0
  395. package/dist/components/ui/histogram-slider/index.mjs +6 -0
  396. package/dist/components/ui/histogram-slider/index.mjs.map +1 -0
  397. package/dist/components/ui/hold-button/hold-button.mjs +258 -0
  398. package/dist/components/ui/hold-button/hold-button.mjs.map +1 -0
  399. package/dist/components/ui/hold-button/index.mjs +6 -0
  400. package/dist/components/ui/hold-button/index.mjs.map +1 -0
  401. package/dist/components/ui/hover-card/hover-card.mjs +111 -0
  402. package/dist/components/ui/hover-card/hover-card.mjs.map +1 -0
  403. package/dist/components/ui/hover-card/index.mjs +21 -0
  404. package/dist/components/ui/hover-card/index.mjs.map +1 -0
  405. package/dist/components/ui/ink-tray/index.mjs +29 -0
  406. package/dist/components/ui/ink-tray/index.mjs.map +1 -0
  407. package/dist/components/ui/ink-tray/ink-tray-art.mjs +68 -0
  408. package/dist/components/ui/ink-tray/ink-tray-art.mjs.map +1 -0
  409. package/dist/components/ui/ink-tray/ink-tray.mjs +350 -0
  410. package/dist/components/ui/ink-tray/ink-tray.mjs.map +1 -0
  411. package/dist/components/ui/input/index.mjs +41 -0
  412. package/dist/components/ui/input/index.mjs.map +1 -0
  413. package/dist/components/ui/input/input.mjs +268 -0
  414. package/dist/components/ui/input/input.mjs.map +1 -0
  415. package/dist/components/ui/input/number-input.mjs +272 -0
  416. package/dist/components/ui/input/number-input.mjs.map +1 -0
  417. package/dist/components/ui/input/password-input.mjs +49 -0
  418. package/dist/components/ui/input/password-input.mjs.map +1 -0
  419. package/dist/components/ui/input/phone-input-countries.mjs +216 -0
  420. package/dist/components/ui/input/phone-input-countries.mjs.map +1 -0
  421. package/dist/components/ui/input/phone-input.mjs +326 -0
  422. package/dist/components/ui/input/phone-input.mjs.map +1 -0
  423. package/dist/components/ui/input/use-controllable-state.mjs +24 -0
  424. package/dist/components/ui/input/use-controllable-state.mjs.map +1 -0
  425. package/dist/components/ui/input/use-hold-repeat.mjs +35 -0
  426. package/dist/components/ui/input/use-hold-repeat.mjs.map +1 -0
  427. package/dist/components/ui/input-group/index.mjs +11 -0
  428. package/dist/components/ui/input-group/index.mjs.map +1 -0
  429. package/dist/components/ui/input-group/input-group.mjs +78 -0
  430. package/dist/components/ui/input-group/input-group.mjs.map +1 -0
  431. package/dist/components/ui/island/index.mjs +23 -0
  432. package/dist/components/ui/island/index.mjs.map +1 -0
  433. package/dist/components/ui/island/island.mjs +328 -0
  434. package/dist/components/ui/island/island.mjs.map +1 -0
  435. package/dist/components/ui/kbd/index.mjs +6 -0
  436. package/dist/components/ui/kbd/index.mjs.map +1 -0
  437. package/dist/components/ui/kbd/kbd.mjs +73 -0
  438. package/dist/components/ui/kbd/kbd.mjs.map +1 -0
  439. package/dist/components/ui/keypad/index.mjs +23 -0
  440. package/dist/components/ui/keypad/index.mjs.map +1 -0
  441. package/dist/components/ui/keypad/keypad.mjs +345 -0
  442. package/dist/components/ui/keypad/keypad.mjs.map +1 -0
  443. package/dist/components/ui/label/index.mjs +7 -0
  444. package/dist/components/ui/label/index.mjs.map +1 -0
  445. package/dist/components/ui/label/label.mjs +117 -0
  446. package/dist/components/ui/label/label.mjs.map +1 -0
  447. package/dist/components/ui/lightbox/index.mjs +47 -0
  448. package/dist/components/ui/lightbox/index.mjs.map +1 -0
  449. package/dist/components/ui/lightbox/labels.mjs +23 -0
  450. package/dist/components/ui/lightbox/labels.mjs.map +1 -0
  451. package/dist/components/ui/lightbox/lightbox.mjs +1359 -0
  452. package/dist/components/ui/lightbox/lightbox.mjs.map +1 -0
  453. package/dist/components/ui/link/index.mjs +6 -0
  454. package/dist/components/ui/link/index.mjs.map +1 -0
  455. package/dist/components/ui/link/link.mjs +64 -0
  456. package/dist/components/ui/link/link.mjs.map +1 -0
  457. package/dist/components/ui/list/index.mjs +35 -0
  458. package/dist/components/ui/list/index.mjs.map +1 -0
  459. package/dist/components/ui/list/list.mjs +505 -0
  460. package/dist/components/ui/list/list.mjs.map +1 -0
  461. package/dist/components/ui/load-more/index.mjs +23 -0
  462. package/dist/components/ui/load-more/index.mjs.map +1 -0
  463. package/dist/components/ui/load-more/load-more.mjs +409 -0
  464. package/dist/components/ui/load-more/load-more.mjs.map +1 -0
  465. package/dist/components/ui/map/index.mjs +27 -0
  466. package/dist/components/ui/map/index.mjs.map +1 -0
  467. package/dist/components/ui/map/map-style.mjs +169 -0
  468. package/dist/components/ui/map/map-style.mjs.map +1 -0
  469. package/dist/components/ui/map/map.mjs +624 -0
  470. package/dist/components/ui/map/map.mjs.map +1 -0
  471. package/dist/components/ui/map-pin/index.mjs +6 -0
  472. package/dist/components/ui/map-pin/index.mjs.map +1 -0
  473. package/dist/components/ui/map-pin/map-pin.mjs +55 -0
  474. package/dist/components/ui/map-pin/map-pin.mjs.map +1 -0
  475. package/dist/components/ui/mention/index.mjs +29 -0
  476. package/dist/components/ui/mention/index.mjs.map +1 -0
  477. package/dist/components/ui/mention/mention.mjs +262 -0
  478. package/dist/components/ui/mention/mention.mjs.map +1 -0
  479. package/dist/components/ui/mention/split-mentions.mjs +24 -0
  480. package/dist/components/ui/mention/split-mentions.mjs.map +1 -0
  481. package/dist/components/ui/menubar/index.mjs +39 -0
  482. package/dist/components/ui/menubar/index.mjs.map +1 -0
  483. package/dist/components/ui/menubar/menubar.mjs +222 -0
  484. package/dist/components/ui/menubar/menubar.mjs.map +1 -0
  485. package/dist/components/ui/meter/index.mjs +21 -0
  486. package/dist/components/ui/meter/index.mjs.map +1 -0
  487. package/dist/components/ui/meter/meter.mjs +167 -0
  488. package/dist/components/ui/meter/meter.mjs.map +1 -0
  489. package/dist/components/ui/multi-select/index.mjs +25 -0
  490. package/dist/components/ui/multi-select/index.mjs.map +1 -0
  491. package/dist/components/ui/multi-select/multi-select.mjs +285 -0
  492. package/dist/components/ui/multi-select/multi-select.mjs.map +1 -0
  493. package/dist/components/ui/navigation-menu/index.mjs +41 -0
  494. package/dist/components/ui/navigation-menu/index.mjs.map +1 -0
  495. package/dist/components/ui/navigation-menu/navigation-menu.mjs +396 -0
  496. package/dist/components/ui/navigation-menu/navigation-menu.mjs.map +1 -0
  497. package/dist/components/ui/notebook-page/index.mjs +15 -0
  498. package/dist/components/ui/notebook-page/index.mjs.map +1 -0
  499. package/dist/components/ui/notebook-page/notebook-page.mjs +162 -0
  500. package/dist/components/ui/notebook-page/notebook-page.mjs.map +1 -0
  501. package/dist/components/ui/notification-inbox/index.mjs +47 -0
  502. package/dist/components/ui/notification-inbox/index.mjs.map +1 -0
  503. package/dist/components/ui/notification-inbox/notification-inbox.mjs +422 -0
  504. package/dist/components/ui/notification-inbox/notification-inbox.mjs.map +1 -0
  505. package/dist/components/ui/number-field/index.mjs +24 -0
  506. package/dist/components/ui/number-field/index.mjs.map +1 -0
  507. package/dist/components/ui/number-field/number-field.mjs +460 -0
  508. package/dist/components/ui/number-field/number-field.mjs.map +1 -0
  509. package/dist/components/ui/number-field/number-format.mjs +48 -0
  510. package/dist/components/ui/number-field/number-format.mjs.map +1 -0
  511. package/dist/components/ui/otp-input/index.mjs +9 -0
  512. package/dist/components/ui/otp-input/index.mjs.map +1 -0
  513. package/dist/components/ui/otp-input/otp-input.mjs +285 -0
  514. package/dist/components/ui/otp-input/otp-input.mjs.map +1 -0
  515. package/dist/components/ui/pager/index.mjs +7 -0
  516. package/dist/components/ui/pager/index.mjs.map +1 -0
  517. package/dist/components/ui/pager/pager.mjs +86 -0
  518. package/dist/components/ui/pager/pager.mjs.map +1 -0
  519. package/dist/components/ui/pagination/index.mjs +23 -0
  520. package/dist/components/ui/pagination/index.mjs.map +1 -0
  521. package/dist/components/ui/pagination/pagination.mjs +210 -0
  522. package/dist/components/ui/pagination/pagination.mjs.map +1 -0
  523. package/dist/components/ui/password-strength/index.mjs +21 -0
  524. package/dist/components/ui/password-strength/index.mjs.map +1 -0
  525. package/dist/components/ui/password-strength/password-rules.mjs +25 -0
  526. package/dist/components/ui/password-strength/password-rules.mjs.map +1 -0
  527. package/dist/components/ui/password-strength/password-strength.mjs +125 -0
  528. package/dist/components/ui/password-strength/password-strength.mjs.map +1 -0
  529. package/dist/components/ui/popover/index.mjs +31 -0
  530. package/dist/components/ui/popover/index.mjs.map +1 -0
  531. package/dist/components/ui/popover/popover.mjs +574 -0
  532. package/dist/components/ui/popover/popover.mjs.map +1 -0
  533. package/dist/components/ui/progress/index.mjs +15 -0
  534. package/dist/components/ui/progress/index.mjs.map +1 -0
  535. package/dist/components/ui/progress/progress.mjs +224 -0
  536. package/dist/components/ui/progress/progress.mjs.map +1 -0
  537. package/dist/components/ui/prose/index.mjs +6 -0
  538. package/dist/components/ui/prose/index.mjs.map +1 -0
  539. package/dist/components/ui/prose/prose.mjs +89 -0
  540. package/dist/components/ui/prose/prose.mjs.map +1 -0
  541. package/dist/components/ui/radio-group/index.mjs +15 -0
  542. package/dist/components/ui/radio-group/index.mjs.map +1 -0
  543. package/dist/components/ui/radio-group/radio-group.mjs +88 -0
  544. package/dist/components/ui/radio-group/radio-group.mjs.map +1 -0
  545. package/dist/components/ui/rating/index.mjs +6 -0
  546. package/dist/components/ui/rating/index.mjs.map +1 -0
  547. package/dist/components/ui/rating/rating.mjs +119 -0
  548. package/dist/components/ui/rating/rating.mjs.map +1 -0
  549. package/dist/components/ui/rich-text-editor/bubble-menu.mjs +120 -0
  550. package/dist/components/ui/rich-text-editor/bubble-menu.mjs.map +1 -0
  551. package/dist/components/ui/rich-text-editor/image-links.mjs +63 -0
  552. package/dist/components/ui/rich-text-editor/image-links.mjs.map +1 -0
  553. package/dist/components/ui/rich-text-editor/index.mjs +37 -0
  554. package/dist/components/ui/rich-text-editor/index.mjs.map +1 -0
  555. package/dist/components/ui/rich-text-editor/labels.mjs +27 -0
  556. package/dist/components/ui/rich-text-editor/labels.mjs.map +1 -0
  557. package/dist/components/ui/rich-text-editor/rich-text-editor.mjs +149 -0
  558. package/dist/components/ui/rich-text-editor/rich-text-editor.mjs.map +1 -0
  559. package/dist/components/ui/rich-text-editor/toolbar.mjs +325 -0
  560. package/dist/components/ui/rich-text-editor/toolbar.mjs.map +1 -0
  561. package/dist/components/ui/save-bar/index.mjs +13 -0
  562. package/dist/components/ui/save-bar/index.mjs.map +1 -0
  563. package/dist/components/ui/save-bar/save-bar.mjs +59 -0
  564. package/dist/components/ui/save-bar/save-bar.mjs.map +1 -0
  565. package/dist/components/ui/scroll-area/index.mjs +6 -0
  566. package/dist/components/ui/scroll-area/index.mjs.map +1 -0
  567. package/dist/components/ui/scroll-area/scroll-area.mjs +148 -0
  568. package/dist/components/ui/scroll-area/scroll-area.mjs.map +1 -0
  569. package/dist/components/ui/scroll-area/use-drag-scroll.mjs +134 -0
  570. package/dist/components/ui/scroll-area/use-drag-scroll.mjs.map +1 -0
  571. package/dist/components/ui/select/index.mjs +23 -0
  572. package/dist/components/ui/select/index.mjs.map +1 -0
  573. package/dist/components/ui/select/select.mjs +216 -0
  574. package/dist/components/ui/select/select.mjs.map +1 -0
  575. package/dist/components/ui/sheet/index.mjs +23 -0
  576. package/dist/components/ui/sheet/index.mjs.map +1 -0
  577. package/dist/components/ui/sheet/sheet.mjs +292 -0
  578. package/dist/components/ui/sheet/sheet.mjs.map +1 -0
  579. package/dist/components/ui/sidebar/index.mjs +122 -0
  580. package/dist/components/ui/sidebar/index.mjs.map +1 -0
  581. package/dist/components/ui/sidebar/sidebar-group.mjs +75 -0
  582. package/dist/components/ui/sidebar/sidebar-group.mjs.map +1 -0
  583. package/dist/components/ui/sidebar/sidebar-item.mjs +199 -0
  584. package/dist/components/ui/sidebar/sidebar-item.mjs.map +1 -0
  585. package/dist/components/ui/sidebar/sidebar-panels.mjs +182 -0
  586. package/dist/components/ui/sidebar/sidebar-panels.mjs.map +1 -0
  587. package/dist/components/ui/sidebar/sidebar-peek.mjs +324 -0
  588. package/dist/components/ui/sidebar/sidebar-peek.mjs.map +1 -0
  589. package/dist/components/ui/sidebar/sidebar-rich.mjs +65 -0
  590. package/dist/components/ui/sidebar/sidebar-rich.mjs.map +1 -0
  591. package/dist/components/ui/sidebar/sidebar-tree.mjs +224 -0
  592. package/dist/components/ui/sidebar/sidebar-tree.mjs.map +1 -0
  593. package/dist/components/ui/sidebar/sidebar.mjs +205 -0
  594. package/dist/components/ui/sidebar/sidebar.mjs.map +1 -0
  595. package/dist/components/ui/sidebar/variants.mjs +396 -0
  596. package/dist/components/ui/sidebar/variants.mjs.map +1 -0
  597. package/dist/components/ui/signature/index.mjs +6 -0
  598. package/dist/components/ui/signature/index.mjs.map +1 -0
  599. package/dist/components/ui/signature/signature.mjs +145 -0
  600. package/dist/components/ui/signature/signature.mjs.map +1 -0
  601. package/dist/components/ui/signature-pad/index.mjs +19 -0
  602. package/dist/components/ui/signature-pad/index.mjs.map +1 -0
  603. package/dist/components/ui/signature-pad/signature-pad.mjs +210 -0
  604. package/dist/components/ui/signature-pad/signature-pad.mjs.map +1 -0
  605. package/dist/components/ui/signature-pad/strokes.mjs +68 -0
  606. package/dist/components/ui/signature-pad/strokes.mjs.map +1 -0
  607. package/dist/components/ui/skeleton/index.mjs +9 -0
  608. package/dist/components/ui/skeleton/index.mjs.map +1 -0
  609. package/dist/components/ui/skeleton/skeleton.mjs +58 -0
  610. package/dist/components/ui/skeleton/skeleton.mjs.map +1 -0
  611. package/dist/components/ui/slide/index.mjs +25 -0
  612. package/dist/components/ui/slide/index.mjs.map +1 -0
  613. package/dist/components/ui/slide/slide.mjs +159 -0
  614. package/dist/components/ui/slide/slide.mjs.map +1 -0
  615. package/dist/components/ui/slider/index.mjs +21 -0
  616. package/dist/components/ui/slider/index.mjs.map +1 -0
  617. package/dist/components/ui/slider/slider-input.mjs +449 -0
  618. package/dist/components/ui/slider/slider-input.mjs.map +1 -0
  619. package/dist/components/ui/slider/slider.mjs +235 -0
  620. package/dist/components/ui/slider/slider.mjs.map +1 -0
  621. package/dist/components/ui/slides/index.mjs +31 -0
  622. package/dist/components/ui/slides/index.mjs.map +1 -0
  623. package/dist/components/ui/slides/slides.mjs +890 -0
  624. package/dist/components/ui/slides/slides.mjs.map +1 -0
  625. package/dist/components/ui/smooth-anchors/index.mjs +17 -0
  626. package/dist/components/ui/smooth-anchors/index.mjs.map +1 -0
  627. package/dist/components/ui/smooth-anchors/smooth-anchors.mjs +75 -0
  628. package/dist/components/ui/smooth-anchors/smooth-anchors.mjs.map +1 -0
  629. package/dist/components/ui/smooth-anchors/smooth-scroll.mjs +87 -0
  630. package/dist/components/ui/smooth-anchors/smooth-scroll.mjs.map +1 -0
  631. package/dist/components/ui/spinner/index.mjs +6 -0
  632. package/dist/components/ui/spinner/index.mjs.map +1 -0
  633. package/dist/components/ui/spinner/spinner.mjs +49 -0
  634. package/dist/components/ui/spinner/spinner.mjs.map +1 -0
  635. package/dist/components/ui/stat/index.mjs +29 -0
  636. package/dist/components/ui/stat/index.mjs.map +1 -0
  637. package/dist/components/ui/stat/stat.mjs +226 -0
  638. package/dist/components/ui/stat/stat.mjs.map +1 -0
  639. package/dist/components/ui/status-bar/index.mjs +17 -0
  640. package/dist/components/ui/status-bar/index.mjs.map +1 -0
  641. package/dist/components/ui/status-bar/status-bar.mjs +96 -0
  642. package/dist/components/ui/status-bar/status-bar.mjs.map +1 -0
  643. package/dist/components/ui/stepper/index.mjs +25 -0
  644. package/dist/components/ui/stepper/index.mjs.map +1 -0
  645. package/dist/components/ui/stepper/stepper.mjs +235 -0
  646. package/dist/components/ui/stepper/stepper.mjs.map +1 -0
  647. package/dist/components/ui/steps/index.mjs +9 -0
  648. package/dist/components/ui/steps/index.mjs.map +1 -0
  649. package/dist/components/ui/steps/steps.mjs +70 -0
  650. package/dist/components/ui/steps/steps.mjs.map +1 -0
  651. package/dist/components/ui/swatch-grid/index.mjs +7 -0
  652. package/dist/components/ui/swatch-grid/index.mjs.map +1 -0
  653. package/dist/components/ui/swatch-grid/swatch-grid.mjs +110 -0
  654. package/dist/components/ui/swatch-grid/swatch-grid.mjs.map +1 -0
  655. package/dist/components/ui/switch/index.mjs +7 -0
  656. package/dist/components/ui/switch/index.mjs.map +1 -0
  657. package/dist/components/ui/switch/switch.mjs +79 -0
  658. package/dist/components/ui/switch/switch.mjs.map +1 -0
  659. package/dist/components/ui/tab-strip/index.mjs +13 -0
  660. package/dist/components/ui/tab-strip/index.mjs.map +1 -0
  661. package/dist/components/ui/tab-strip/tab-strip.mjs +244 -0
  662. package/dist/components/ui/tab-strip/tab-strip.mjs.map +1 -0
  663. package/dist/components/ui/table/index.mjs +27 -0
  664. package/dist/components/ui/table/index.mjs.map +1 -0
  665. package/dist/components/ui/table/table.mjs +290 -0
  666. package/dist/components/ui/table/table.mjs.map +1 -0
  667. package/dist/components/ui/table-of-contents/index.mjs +20 -0
  668. package/dist/components/ui/table-of-contents/index.mjs.map +1 -0
  669. package/dist/components/ui/table-of-contents/scroll-spy.mjs +60 -0
  670. package/dist/components/ui/table-of-contents/scroll-spy.mjs.map +1 -0
  671. package/dist/components/ui/table-of-contents/table-of-contents.mjs +371 -0
  672. package/dist/components/ui/table-of-contents/table-of-contents.mjs.map +1 -0
  673. package/dist/components/ui/table-of-contents/use-headings.mjs +40 -0
  674. package/dist/components/ui/table-of-contents/use-headings.mjs.map +1 -0
  675. package/dist/components/ui/tablet-frame/index.mjs +7 -0
  676. package/dist/components/ui/tablet-frame/index.mjs.map +1 -0
  677. package/dist/components/ui/tablet-frame/tablet-frame.mjs +48 -0
  678. package/dist/components/ui/tablet-frame/tablet-frame.mjs.map +1 -0
  679. package/dist/components/ui/tabs/index.mjs +25 -0
  680. package/dist/components/ui/tabs/index.mjs.map +1 -0
  681. package/dist/components/ui/tabs/tabs.mjs +382 -0
  682. package/dist/components/ui/tabs/tabs.mjs.map +1 -0
  683. package/dist/components/ui/tabs/use-tabs-indicator.mjs +90 -0
  684. package/dist/components/ui/tabs/use-tabs-indicator.mjs.map +1 -0
  685. package/dist/components/ui/tags-input/index.mjs +9 -0
  686. package/dist/components/ui/tags-input/index.mjs.map +1 -0
  687. package/dist/components/ui/tags-input/split.mjs +38 -0
  688. package/dist/components/ui/tags-input/split.mjs.map +1 -0
  689. package/dist/components/ui/tags-input/tags-input.mjs +328 -0
  690. package/dist/components/ui/tags-input/tags-input.mjs.map +1 -0
  691. package/dist/components/ui/terminal/index.mjs +41 -0
  692. package/dist/components/ui/terminal/index.mjs.map +1 -0
  693. package/dist/components/ui/terminal/terminal.mjs +287 -0
  694. package/dist/components/ui/terminal/terminal.mjs.map +1 -0
  695. package/dist/components/ui/textarea/index.mjs +21 -0
  696. package/dist/components/ui/textarea/index.mjs.map +1 -0
  697. package/dist/components/ui/textarea/textarea.mjs +244 -0
  698. package/dist/components/ui/textarea/textarea.mjs.map +1 -0
  699. package/dist/components/ui/theme-provider/index.mjs +6 -0
  700. package/dist/components/ui/theme-provider/index.mjs.map +1 -0
  701. package/dist/components/ui/theme-provider/theme-provider.mjs +70 -0
  702. package/dist/components/ui/theme-provider/theme-provider.mjs.map +1 -0
  703. package/dist/components/ui/toast/index.mjs +19 -0
  704. package/dist/components/ui/toast/index.mjs.map +1 -0
  705. package/dist/components/ui/toast/store.mjs +96 -0
  706. package/dist/components/ui/toast/store.mjs.map +1 -0
  707. package/dist/components/ui/toast/toast.mjs +395 -0
  708. package/dist/components/ui/toast/toast.mjs.map +1 -0
  709. package/dist/components/ui/toggle/index.mjs +13 -0
  710. package/dist/components/ui/toggle/index.mjs.map +1 -0
  711. package/dist/components/ui/toggle/toggle.mjs +123 -0
  712. package/dist/components/ui/toggle/toggle.mjs.map +1 -0
  713. package/dist/components/ui/toggle-group/index.mjs +11 -0
  714. package/dist/components/ui/toggle-group/index.mjs.map +1 -0
  715. package/dist/components/ui/toggle-group/toggle-group.mjs +243 -0
  716. package/dist/components/ui/toggle-group/toggle-group.mjs.map +1 -0
  717. package/dist/components/ui/toggletip/index.mjs +6 -0
  718. package/dist/components/ui/toggletip/index.mjs.map +1 -0
  719. package/dist/components/ui/toggletip/toggletip.mjs +95 -0
  720. package/dist/components/ui/toggletip/toggletip.mjs.map +1 -0
  721. package/dist/components/ui/toolbar/index.mjs +21 -0
  722. package/dist/components/ui/toolbar/index.mjs.map +1 -0
  723. package/dist/components/ui/toolbar/toolbar.mjs +130 -0
  724. package/dist/components/ui/toolbar/toolbar.mjs.map +1 -0
  725. package/dist/components/ui/tooltip/index.mjs +29 -0
  726. package/dist/components/ui/tooltip/index.mjs.map +1 -0
  727. package/dist/components/ui/tooltip/tooltip.mjs +640 -0
  728. package/dist/components/ui/tooltip/tooltip.mjs.map +1 -0
  729. package/dist/components/ui/tree/index.mjs +11 -0
  730. package/dist/components/ui/tree/index.mjs.map +1 -0
  731. package/dist/components/ui/tree/tree.mjs +450 -0
  732. package/dist/components/ui/tree/tree.mjs.map +1 -0
  733. package/dist/index.d.mts +19397 -0
  734. package/dist/index.mjs +157 -0
  735. package/dist/index.mjs.map +1 -0
  736. package/dist/lib/color.mjs +78 -0
  737. package/dist/lib/color.mjs.map +1 -0
  738. package/dist/lib/create-context.mjs +31 -0
  739. package/dist/lib/create-context.mjs.map +1 -0
  740. package/dist/lib/date.mjs +116 -0
  741. package/dist/lib/date.mjs.map +1 -0
  742. package/dist/lib/density.mjs +79 -0
  743. package/dist/lib/density.mjs.map +1 -0
  744. package/dist/lib/field-context.mjs +13 -0
  745. package/dist/lib/field-context.mjs.map +1 -0
  746. package/dist/lib/filter.mjs +28 -0
  747. package/dist/lib/filter.mjs.map +1 -0
  748. package/dist/lib/gesture.mjs +38 -0
  749. package/dist/lib/gesture.mjs.map +1 -0
  750. package/dist/lib/hit-area.mjs +14 -0
  751. package/dist/lib/hit-area.mjs.map +1 -0
  752. package/dist/lib/labels.mjs +27 -0
  753. package/dist/lib/labels.mjs.map +1 -0
  754. package/dist/lib/morph-box.mjs +56 -0
  755. package/dist/lib/morph-box.mjs.map +1 -0
  756. package/dist/lib/motion.mjs +70 -0
  757. package/dist/lib/motion.mjs.map +1 -0
  758. package/dist/lib/pulse.mjs +69 -0
  759. package/dist/lib/pulse.mjs.map +1 -0
  760. package/dist/lib/roving-focus.mjs +74 -0
  761. package/dist/lib/roving-focus.mjs.map +1 -0
  762. package/dist/lib/theme.mjs +67 -0
  763. package/dist/lib/theme.mjs.map +1 -0
  764. package/dist/lib/tv.mjs +11 -0
  765. package/dist/lib/tv.mjs.map +1 -0
  766. package/dist/lib/utils.mjs +82 -0
  767. package/dist/lib/utils.mjs.map +1 -0
  768. package/dist/styles.css +2 -0
  769. package/package.json +133 -4
@@ -0,0 +1,15 @@
1
+ import {
2
+ Progress,
3
+ ProgressLabel,
4
+ ProgressValue,
5
+ progressVariants,
6
+ useScrollProgress
7
+ } from "./progress.mjs";
8
+ export {
9
+ Progress,
10
+ ProgressLabel,
11
+ ProgressValue,
12
+ progressVariants,
13
+ useScrollProgress
14
+ };
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/progress/index.ts"],"sourcesContent":["export {\r\n Progress,\r\n ProgressLabel,\r\n ProgressValue,\r\n progressVariants,\r\n useScrollProgress,\r\n type ProgressProps,\r\n type ProgressValueProps,\r\n type ProgressSize,\r\n type ProgressTone,\r\n} from \"./progress.mjs\"\r\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;","names":[]}
@@ -0,0 +1,224 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Progress as ProgressPrimitive } from "radix-ui";
5
+ import { createContext } from "../../../lib/create-context.mjs";
6
+ import { tv } from "../../../lib/tv.mjs";
7
+ const progressVariants = tv({
8
+ slots: {
9
+ root: "flex w-full flex-col",
10
+ header: "flex items-center justify-between gap-4",
11
+ label: "font-medium text-foreground truncate text-sm",
12
+ value: "tabular-nums text-muted-foreground text-sm",
13
+ track: [
14
+ "relative w-full overflow-hidden",
15
+ "[--progress-track:color-mix(in_oklab,var(--foreground)_4%,transparent)]",
16
+ "dark:[--progress-track:color-mix(in_oklab,var(--foreground)_6%,transparent)]"
17
+ ],
18
+ indicator: "h-full"
19
+ },
20
+ variants: {
21
+ size: {
22
+ xs: { track: "h-1" },
23
+ sm: { track: "h-1.5" },
24
+ md: { track: "h-2" },
25
+ lg: { track: "h-3" }
26
+ },
27
+ tone: {
28
+ foreground: { indicator: "bg-foreground" },
29
+ brand: { indicator: "bg-brand" },
30
+ success: { indicator: "bg-success" },
31
+ warning: { indicator: "bg-warning" },
32
+ destructive: { indicator: "bg-destructive" },
33
+ info: { indicator: "bg-info" }
34
+ },
35
+ variant: {
36
+ default: { track: "rounded-full bg-(--progress-track)", indicator: "rounded-full" },
37
+ chrome: { track: "rounded-none bg-transparent", indicator: "rounded-none" }
38
+ },
39
+ mode: {
40
+ measured: {
41
+ indicator: "transition-[width] duration-base ease-out motion-reduce:transition-none"
42
+ },
43
+ instant: { indicator: "transition-none" },
44
+ indeterminate: { indicator: "w-1/4 animate-progress-indeterminate motion-reduce:animate-none motion-reduce:w-full motion-reduce:opacity-40" },
45
+ timed: {
46
+ indicator: [
47
+ "transition-none data-[direction=drain]:[animation-direction:reverse] data-paused:[animation-play-state:paused]",
48
+ "motion-reduce:[animation-timing-function:steps(var(--progress-steps,4),end)]",
49
+ "w-full animate-progress-timer"
50
+ ]
51
+ }
52
+ },
53
+ header: {
54
+ true: { root: "gap-2" },
55
+ false: { root: "gap-0" }
56
+ },
57
+ // A vertical bar fills from the floor: size sets its width, the header stacks centred above it,
58
+ // and it is as tall as the root (128px unless the caller or a flex parent sizes it).
59
+ orientation: {
60
+ horizontal: {},
61
+ vertical: {
62
+ root: "h-32 w-fit items-center",
63
+ header: "flex-col justify-center gap-0.5 text-center",
64
+ track: "flex h-auto min-h-0 flex-1 flex-col justify-end",
65
+ indicator: "w-full shrink-0"
66
+ }
67
+ }
68
+ },
69
+ compoundVariants: [
70
+ { orientation: "vertical", size: "xs", class: { track: "h-auto w-1" } },
71
+ { orientation: "vertical", size: "sm", class: { track: "h-auto w-1.5" } },
72
+ { orientation: "vertical", size: "md", class: { track: "h-auto w-2" } },
73
+ { orientation: "vertical", size: "lg", class: { track: "h-auto w-3" } },
74
+ { orientation: "vertical", mode: "measured", class: { indicator: "transition-[height]" } },
75
+ {
76
+ orientation: "vertical",
77
+ mode: "indeterminate",
78
+ class: { indicator: "h-1/4 w-full animate-progress-indeterminate-y motion-reduce:h-full motion-reduce:w-full" }
79
+ },
80
+ { orientation: "vertical", mode: "timed", class: { indicator: "h-full animate-progress-timer-y" } }
81
+ ],
82
+ defaultVariants: {
83
+ size: "sm",
84
+ tone: "foreground",
85
+ variant: "default",
86
+ mode: "measured",
87
+ header: false,
88
+ orientation: "horizontal"
89
+ }
90
+ });
91
+ const [ProgressProvider, useProgressContext] = createContext("Progress");
92
+ function useRunTimer(duration, paused, run, onComplete) {
93
+ const [completedRun, setCompletedRun] = React.useState(null);
94
+ const complete = completedRun === run;
95
+ const remaining = React.useRef({ run, left: duration ?? 0 });
96
+ const completeRef = React.useRef(onComplete);
97
+ React.useEffect(() => {
98
+ completeRef.current = onComplete;
99
+ });
100
+ React.useEffect(() => {
101
+ if (duration === void 0 || paused || complete) return;
102
+ if (remaining.current.run !== run) remaining.current = { run, left: duration };
103
+ const started = performance.now();
104
+ const timer = setTimeout(() => {
105
+ remaining.current.left = 0;
106
+ setCompletedRun(run);
107
+ completeRef.current?.();
108
+ }, remaining.current.left);
109
+ return () => {
110
+ clearTimeout(timer);
111
+ remaining.current.left = Math.max(0, remaining.current.left - (performance.now() - started));
112
+ };
113
+ }, [duration, paused, complete, run]);
114
+ return complete;
115
+ }
116
+ function Progress({
117
+ className,
118
+ value = 0,
119
+ max = 100,
120
+ size = "sm",
121
+ tone = "foreground",
122
+ variant = "default",
123
+ transition = "smooth",
124
+ orientation = "horizontal",
125
+ duration,
126
+ direction = "drain",
127
+ paused = false,
128
+ runKey,
129
+ onComplete,
130
+ children,
131
+ style,
132
+ "aria-label": ariaLabel,
133
+ ...props
134
+ }) {
135
+ const labelId = React.useId();
136
+ const timed = duration !== void 0;
137
+ const clamped = value === null ? null : Math.min(max, Math.max(0, value));
138
+ const complete = useRunTimer(duration, paused, `${String(runKey ?? "")}|${direction}|${duration}`, onComplete);
139
+ const header = React.Children.count(children) > 0;
140
+ const mode = timed ? "timed" : clamped === null ? "indeterminate" : transition === "none" ? "instant" : "measured";
141
+ const slots = progressVariants({ size, tone, variant, mode, header, orientation });
142
+ const hasLabel = React.Children.toArray(children).some(
143
+ (child) => React.isValidElement(child) && child.type === ProgressLabel
144
+ );
145
+ return /* @__PURE__ */ jsx(ProgressProvider, { value: timed ? null : clamped, max, labelId, children: /* @__PURE__ */ jsxs(
146
+ ProgressPrimitive.Root,
147
+ {
148
+ "data-slot": "progress",
149
+ "data-orientation": orientation,
150
+ "data-timed": timed ? "" : void 0,
151
+ "data-paused": timed && paused ? "" : void 0,
152
+ "data-complete": timed && complete ? "" : void 0,
153
+ value: timed ? null : clamped,
154
+ max,
155
+ "aria-label": ariaLabel,
156
+ "aria-labelledby": !ariaLabel && hasLabel ? labelId : void 0,
157
+ className: slots.root({ className }),
158
+ style,
159
+ ...props,
160
+ children: [
161
+ header ? /* @__PURE__ */ jsx("div", { "data-slot": "progress-header", className: slots.header(), children }) : null,
162
+ /* @__PURE__ */ jsx("div", { "data-slot": "progress-track", className: slots.track(), children: /* @__PURE__ */ jsx(
163
+ ProgressPrimitive.Indicator,
164
+ {
165
+ "data-slot": "progress-indicator",
166
+ "data-direction": timed ? direction : void 0,
167
+ "data-paused": timed && paused ? "" : void 0,
168
+ className: slots.indicator(),
169
+ style: timed ? {
170
+ "--progress-duration": `${duration}ms`,
171
+ "--progress-steps": 4
172
+ } : clamped === null ? void 0 : orientation === "vertical" ? { height: `${clamped / max * 100}%` } : { width: `${clamped / max * 100}%` }
173
+ },
174
+ timed ? `${String(runKey ?? "")}|${direction}|${duration}` : void 0
175
+ ) })
176
+ ]
177
+ }
178
+ ) });
179
+ }
180
+ function ProgressLabel({ className, ...props }) {
181
+ const { labelId } = useProgressContext("ProgressLabel");
182
+ return /* @__PURE__ */ jsx("span", { id: labelId, "data-slot": "progress-label", className: progressVariants().label({ className }), ...props });
183
+ }
184
+ function ProgressValue({ className, children, ...props }) {
185
+ const { value, max } = useProgressContext("ProgressValue");
186
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, "data-slot": "progress-value", className: progressVariants().value({ className }), ...props, children: children ? children(value, max) : value === null ? null : `${Math.round(value / max * 100)}%` });
187
+ }
188
+ function useScrollProgress(ref) {
189
+ const [progress, setProgress] = React.useState(0);
190
+ React.useEffect(() => {
191
+ const element = ref?.current ?? null;
192
+ const target = element ?? window;
193
+ let frame = 0;
194
+ const read = () => {
195
+ frame = 0;
196
+ const scroller = element ?? document.documentElement;
197
+ const max = scroller.scrollHeight - scroller.clientHeight;
198
+ setProgress(max > 0 ? Math.min(100, Math.max(0, scroller.scrollTop / max * 100)) : 0);
199
+ };
200
+ const schedule = () => {
201
+ if (!frame) frame = requestAnimationFrame(read);
202
+ };
203
+ schedule();
204
+ target.addEventListener("scroll", schedule, { passive: true });
205
+ window.addEventListener("resize", schedule);
206
+ const observer = element ? new ResizeObserver(schedule) : null;
207
+ observer?.observe(element);
208
+ return () => {
209
+ cancelAnimationFrame(frame);
210
+ target.removeEventListener("scroll", schedule);
211
+ window.removeEventListener("resize", schedule);
212
+ observer?.disconnect();
213
+ };
214
+ }, [ref]);
215
+ return progress;
216
+ }
217
+ export {
218
+ Progress,
219
+ ProgressLabel,
220
+ ProgressValue,
221
+ progressVariants,
222
+ useScrollProgress
223
+ };
224
+ //# sourceMappingURL=progress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/progress/progress.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { Progress as ProgressPrimitive } from \"radix-ui\"\r\n\r\nimport { createContext } from \"../../../lib/create-context.mjs\"\r\nimport { tv } from \"../../../lib/tv.mjs\"\r\n\r\n/*\r\n * A bar that reports how far along something is. The track is a 4% foreground tint (6% in dark)\r\n * so it reads on any ground; the fill takes a semantic tone. A measured bar animates its width,\r\n * which keeps the pill caps honest at low values. A timed bar slides a full-length fill along the\r\n * track on `transform` instead (the `progress-timer` keyframes), so it runs on the compositor with\r\n * no re-render per frame, and ticks in steps under reduced motion.\r\n */\r\nexport const progressVariants = tv({\r\n slots: {\r\n root: \"flex w-full flex-col\",\r\n header: \"flex items-center justify-between gap-4\",\r\n label: \"font-medium text-foreground truncate text-sm\",\r\n value: \"tabular-nums text-muted-foreground text-sm\",\r\n track: [\r\n \"relative w-full overflow-hidden\",\r\n \"[--progress-track:color-mix(in_oklab,var(--foreground)_4%,transparent)]\",\r\n \"dark:[--progress-track:color-mix(in_oklab,var(--foreground)_6%,transparent)]\",\r\n ],\r\n indicator: \"h-full\",\r\n },\r\n variants: {\r\n size: {\r\n xs: { track: \"h-1\" },\r\n sm: { track: \"h-1.5\" },\r\n md: { track: \"h-2\" },\r\n lg: { track: \"h-3\" },\r\n },\r\n tone: {\r\n foreground: { indicator: \"bg-foreground\" },\r\n brand: { indicator: \"bg-brand\" },\r\n success: { indicator: \"bg-success\" },\r\n warning: { indicator: \"bg-warning\" },\r\n destructive: { indicator: \"bg-destructive\" },\r\n info: { indicator: \"bg-info\" },\r\n },\r\n variant: {\r\n default: { track: \"rounded-full bg-(--progress-track)\", indicator: \"rounded-full\" },\r\n chrome: { track: \"rounded-none bg-transparent\", indicator: \"rounded-none\" },\r\n },\r\n mode: {\r\n measured: {\r\n indicator: \"transition-[width] duration-base ease-out motion-reduce:transition-none\",\r\n },\r\n instant: { indicator: \"transition-none\" },\r\n indeterminate: { indicator: \"w-1/4 animate-progress-indeterminate motion-reduce:animate-none motion-reduce:w-full motion-reduce:opacity-40\" },\r\n timed: {\r\n indicator: [\r\n \"transition-none data-[direction=drain]:[animation-direction:reverse] data-paused:[animation-play-state:paused]\",\r\n \"motion-reduce:[animation-timing-function:steps(var(--progress-steps,4),end)]\",\r\n \"w-full animate-progress-timer\",\r\n ],\r\n },\r\n },\r\n header: {\r\n true: { root: \"gap-2\" },\r\n false: { root: \"gap-0\" },\r\n },\r\n // A vertical bar fills from the floor: size sets its width, the header stacks centred above it,\r\n // and it is as tall as the root (128px unless the caller or a flex parent sizes it).\r\n orientation: {\r\n horizontal: {},\r\n vertical: {\r\n root: \"h-32 w-fit items-center\",\r\n header: \"flex-col justify-center gap-0.5 text-center\",\r\n track: \"flex h-auto min-h-0 flex-1 flex-col justify-end\",\r\n indicator: \"w-full shrink-0\",\r\n },\r\n },\r\n },\r\n compoundVariants: [\r\n { orientation: \"vertical\", size: \"xs\", class: { track: \"h-auto w-1\" } },\r\n { orientation: \"vertical\", size: \"sm\", class: { track: \"h-auto w-1.5\" } },\r\n { orientation: \"vertical\", size: \"md\", class: { track: \"h-auto w-2\" } },\r\n { orientation: \"vertical\", size: \"lg\", class: { track: \"h-auto w-3\" } },\r\n { orientation: \"vertical\", mode: \"measured\", class: { indicator: \"transition-[height]\" } },\r\n {\r\n orientation: \"vertical\",\r\n mode: \"indeterminate\",\r\n class: { indicator: \"h-1/4 w-full animate-progress-indeterminate-y motion-reduce:h-full motion-reduce:w-full\" },\r\n },\r\n { orientation: \"vertical\", mode: \"timed\", class: { indicator: \"h-full animate-progress-timer-y\" } },\r\n ],\r\n defaultVariants: {\r\n size: \"sm\",\r\n tone: \"foreground\",\r\n variant: \"default\",\r\n mode: \"measured\",\r\n header: false,\r\n orientation: \"horizontal\",\r\n },\r\n})\r\n\r\nexport type ProgressSize = \"xs\" | \"sm\" | \"md\" | \"lg\"\r\nexport type ProgressTone = \"foreground\" | \"brand\" | \"success\" | \"warning\" | \"destructive\" | \"info\"\r\n\r\nconst [ProgressProvider, useProgressContext] = createContext<{\r\n value: number | null\r\n max: number\r\n labelId: string\r\n}>(\"Progress\")\r\n\r\nexport interface ProgressProps\r\n extends Omit<React.ComponentProps<typeof ProgressPrimitive.Root>, \"asChild\" | \"value\"> {\r\n /** 0 to `max`, clamped. `null` is indeterminate: the fill sweeps. */\r\n value?: number | null\r\n /** Track thickness: 4, 6, 8 or 12px. */\r\n size?: ProgressSize\r\n /** The fill's colour. */\r\n tone?: ProgressTone\r\n /** `chrome` drops the track and squares the ends, for a full-bleed reading or loading bar. */\r\n variant?: \"default\" | \"chrome\"\r\n /** `smooth` glides between steps; `none` welds the fill to a per-frame value. */\r\n transition?: \"smooth\" | \"none\"\r\n /** `vertical` stands the bar up, filling from the bottom; give it a height (128px otherwise). */\r\n orientation?: \"horizontal\" | \"vertical\"\r\n /** Timed mode, in ms: the bar runs itself over this long and `value` is ignored. */\r\n duration?: number\r\n /** Timed mode: empties from full (`drain`), or fills from empty (`fill`). */\r\n direction?: \"drain\" | \"fill\"\r\n /** Timed mode: holds the bar where it is; resuming carries on with the time left. */\r\n paused?: boolean\r\n /** Timed mode: change it to restart the run from the top. */\r\n runKey?: React.Key\r\n /** Timed mode: called when the run reaches its end. */\r\n onComplete?: () => void\r\n}\r\n\r\n/** Fires `onComplete` once per run, pausing and resuming with the bar. */\r\nfunction useRunTimer(\r\n duration: number | undefined,\r\n paused: boolean,\r\n run: string,\r\n onComplete: (() => void) | undefined,\r\n) {\r\n // The run that last reached its end; a new run key makes `complete` false again by itself.\r\n const [completedRun, setCompletedRun] = React.useState<string | null>(null)\r\n const complete = completedRun === run\r\n const remaining = React.useRef({ run, left: duration ?? 0 })\r\n const completeRef = React.useRef(onComplete)\r\n React.useEffect(() => {\r\n completeRef.current = onComplete\r\n })\r\n\r\n React.useEffect(() => {\r\n if (duration === undefined || paused || complete) return\r\n // A new run (or a new duration) starts with the full time.\r\n if (remaining.current.run !== run) remaining.current = { run, left: duration }\r\n const started = performance.now()\r\n const timer = setTimeout(() => {\r\n remaining.current.left = 0\r\n setCompletedRun(run)\r\n completeRef.current?.()\r\n }, remaining.current.left)\r\n return () => {\r\n clearTimeout(timer)\r\n remaining.current.left = Math.max(0, remaining.current.left - (performance.now() - started))\r\n }\r\n }, [duration, paused, complete, run])\r\n\r\n return complete\r\n}\r\n\r\nexport function Progress({\r\n className,\r\n value = 0,\r\n max = 100,\r\n size = \"sm\",\r\n tone = \"foreground\",\r\n variant = \"default\",\r\n transition = \"smooth\",\r\n orientation = \"horizontal\",\r\n duration,\r\n direction = \"drain\",\r\n paused = false,\r\n runKey,\r\n onComplete,\r\n children,\r\n style,\r\n \"aria-label\": ariaLabel,\r\n ...props\r\n}: ProgressProps) {\r\n const labelId = React.useId()\r\n const timed = duration !== undefined\r\n const clamped = value === null ? null : Math.min(max, Math.max(0, value))\r\n const complete = useRunTimer(duration, paused, `${String(runKey ?? \"\")}|${direction}|${duration}`, onComplete)\r\n const header = React.Children.count(children) > 0\r\n const mode = timed ? \"timed\" : clamped === null ? \"indeterminate\" : transition === \"none\" ? \"instant\" : \"measured\"\r\n const slots = progressVariants({ size, tone, variant, mode, header, orientation })\r\n const hasLabel = React.Children.toArray(children).some(\r\n (child) => React.isValidElement(child) && child.type === ProgressLabel,\r\n )\r\n\r\n return (\r\n <ProgressProvider value={timed ? null : clamped} max={max} labelId={labelId}>\r\n <ProgressPrimitive.Root\r\n data-slot=\"progress\"\r\n data-orientation={orientation}\r\n data-timed={timed ? \"\" : undefined}\r\n data-paused={timed && paused ? \"\" : undefined}\r\n data-complete={timed && complete ? \"\" : undefined}\r\n value={timed ? null : clamped}\r\n max={max}\r\n aria-label={ariaLabel}\r\n aria-labelledby={!ariaLabel && hasLabel ? labelId : undefined}\r\n className={slots.root({ className })}\r\n style={style}\r\n {...props}\r\n >\r\n {header ? (\r\n <div data-slot=\"progress-header\" className={slots.header()}>\r\n {children}\r\n </div>\r\n ) : null}\r\n <div data-slot=\"progress-track\" className={slots.track()}>\r\n <ProgressPrimitive.Indicator\r\n // A new run remounts the fill, which restarts its animation from the top.\r\n key={timed ? `${String(runKey ?? \"\")}|${direction}|${duration}` : undefined}\r\n data-slot=\"progress-indicator\"\r\n data-direction={timed ? direction : undefined}\r\n data-paused={timed && paused ? \"\" : undefined}\r\n className={slots.indicator()}\r\n style={\r\n timed\r\n ? ({\r\n \"--progress-duration\": `${duration}ms`,\r\n \"--progress-steps\": 4,\r\n } as React.CSSProperties)\r\n : clamped === null\r\n ? undefined\r\n : orientation === \"vertical\"\r\n ? { height: `${(clamped / max) * 100}%` }\r\n : { width: `${(clamped / max) * 100}%` }\r\n }\r\n />\r\n </div>\r\n </ProgressPrimitive.Root>\r\n </ProgressProvider>\r\n )\r\n}\r\n\r\n/** What is progressing. Names the bar unless the root has its own aria-label. */\r\nexport function ProgressLabel({ className, ...props }: React.ComponentProps<\"span\">) {\r\n const { labelId } = useProgressContext(\"ProgressLabel\")\r\n return <span id={labelId} data-slot=\"progress-label\" className={progressVariants().label({ className })} {...props} />\r\n}\r\n\r\nexport interface ProgressValueProps extends Omit<React.ComponentProps<\"span\">, \"children\"> {\r\n /** Phrases the readout yourself, e.g. `3 of 8`. `value` is null while indeterminate. */\r\n children?: (value: number | null, max: number) => React.ReactNode\r\n}\r\n\r\n/** The readout, a whole percentage by default. Hidden from assistive tech: the bar announces it. */\r\nexport function ProgressValue({ className, children, ...props }: ProgressValueProps) {\r\n const { value, max } = useProgressContext(\"ProgressValue\")\r\n return (\r\n <span aria-hidden data-slot=\"progress-value\" className={progressVariants().value({ className })} {...props}>\r\n {children ? children(value, max) : value === null ? null : `${Math.round((value / max) * 100)}%`}\r\n </span>\r\n )\r\n}\r\n\r\n/**\r\n * How far the document, or a scroll container, has been scrolled: 0 to 100. Feed it to a bar with\r\n * `transition=\"none\"` so the fill is welded to the scrollbar instead of trailing it. Updates are\r\n * coalesced into one per frame.\r\n */\r\nexport function useScrollProgress(ref?: React.RefObject<HTMLElement | null>) {\r\n const [progress, setProgress] = React.useState(0)\r\n React.useEffect(() => {\r\n const element = ref?.current ?? null\r\n const target: HTMLElement | Window = element ?? window\r\n let frame = 0\r\n const read = () => {\r\n frame = 0\r\n const scroller = element ?? document.documentElement\r\n const max = scroller.scrollHeight - scroller.clientHeight\r\n setProgress(max > 0 ? Math.min(100, Math.max(0, (scroller.scrollTop / max) * 100)) : 0)\r\n }\r\n const schedule = () => {\r\n if (!frame) frame = requestAnimationFrame(read)\r\n }\r\n schedule()\r\n target.addEventListener(\"scroll\", schedule, { passive: true })\r\n window.addEventListener(\"resize\", schedule)\r\n const observer = element ? new ResizeObserver(schedule) : null\r\n observer?.observe(element!)\r\n return () => {\r\n cancelAnimationFrame(frame)\r\n target.removeEventListener(\"scroll\", schedule)\r\n window.removeEventListener(\"resize\", schedule)\r\n observer?.disconnect()\r\n }\r\n }, [ref])\r\n return progress\r\n}\r\n"],"mappings":"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","names":[]}
@@ -0,0 +1,6 @@
1
+ import { Prose, proseVariants } from "./prose.mjs";
2
+ export {
3
+ Prose,
4
+ proseVariants
5
+ };
6
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/prose/index.ts"],"sourcesContent":["export { Prose, proseVariants, type ProseProps } from \"./prose.mjs\"\n"],"mappings":"AAAA,SAAS,OAAO,qBAAsC;","names":[]}
@@ -0,0 +1,89 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Slot } from "radix-ui";
3
+ import { tv } from "../../../lib/tv.mjs";
4
+ const proseVariants = tv({
5
+ base: [
6
+ "min-w-0 text-body [overflow-wrap:break-word]",
7
+ // Flow between top-level blocks.
8
+ "[&>*+*]:mt-(--prose-flow)",
9
+ "[&>:is(h1,h2):not(:first-child)]:mt-(--prose-h2)",
10
+ "[&>:is(h3,h4,h5,h6):not(:first-child)]:mt-(--prose-h3)",
11
+ "[&>:is(h1,h2,h3,h4,h5,h6)+*]:mt-(--prose-after-heading)",
12
+ "[&>:is(figure,pre,table,hr,blockquote,video,iframe):not(:first-child)]:mt-(--prose-media)",
13
+ "[&>:is(figure,pre,table,hr,blockquote,video,iframe)+*]:mt-(--prose-media)",
14
+ // Headings and emphasis.
15
+ "[&_:where(h1,h2,h3,h4,h5,h6)]:font-heading [&_:where(h1,h2,h3,h4,h5,h6)]:font-semibold [&_:where(h1,h2,h3,h4,h5,h6)]:text-foreground",
16
+ "[&_:where(h1,h2,h3,h4,h5,h6)]:text-balance [&_:where(h1,h2,h3)]:tracking-tight",
17
+ "[&_:where(strong,b)]:font-semibold [&_:where(strong,b)]:text-foreground",
18
+ "[&_:where(h1,h2,h3,h4,h5,h6)_code]:text-[0.875em]",
19
+ // Lists: muted markers, tabular numbers, item gaps.
20
+ "[&_:where(ul)]:list-disc [&_:where(ul)]:ps-6 [&_:where(ol)]:list-decimal [&_:where(ol)]:ps-6",
21
+ "[&_:where(li)]:ps-1 [&_:where(li)::marker]:text-muted-foreground [&_:where(ol>li)::marker]:tabular-nums",
22
+ "[&_:where(li+li)]:mt-(--prose-item) [&_:where(li>:is(ul,ol))]:mt-(--prose-item) [&_:where(li>p+p)]:mt-(--prose-item)",
23
+ // Quote.
24
+ "[&_:where(blockquote)]:border-s-2 [&_:where(blockquote)]:border-border [&_:where(blockquote)]:ps-4 [&_:where(blockquote)]:text-foreground",
25
+ // Code block: muted, scrolls on its own. Inline "code" keeps the global chip. Only a bare <pre>
26
+ // (no class), like links and images below, so a CodeSnippet's own <pre> keeps its frame.
27
+ "[&_:where(pre:not([class]))]:overflow-x-auto [&_:where(pre:not([class]))]:rounded-lg [&_:where(pre:not([class]))]:bg-muted [&_:where(pre:not([class]))]:p-4 [&_:where(pre:not([class]))]:font-mono [&_:where(pre:not([class]))]:text-sm [&_:where(pre:not([class]))]:leading-6 [&_:where(pre:not([class]))]:text-foreground",
28
+ // Table: scrolls inside the column instead of the page.
29
+ "[&_:where(table)]:block [&_:where(table)]:w-max [&_:where(table)]:max-w-full [&_:where(table)]:overflow-x-auto [&_:where(table)]:border-collapse [&_:where(table)]:text-sm",
30
+ "[&_:where(th)]:border-b [&_:where(th)]:border-border [&_:where(th)]:px-3 [&_:where(th)]:py-2 [&_:where(th)]:text-start [&_:where(th)]:font-medium [&_:where(th)]:text-foreground",
31
+ "[&_:where(td)]:border-b [&_:where(td)]:border-border [&_:where(td)]:px-3 [&_:where(td)]:py-2 [&_:where(td)]:tabular-nums",
32
+ "[&_:where(th,td):first-child]:ps-0",
33
+ // Rule.
34
+ "[&_:where(hr)]:border-border",
35
+ // Media: the corner radius and the image outline.
36
+ "[&_:where(img:not([class]))]:h-auto [&_:where(img:not([class]))]:max-w-full [&_:where(img:not([class]))]:rounded-lg",
37
+ "[&_:where(img:not([class]))]:outline [&_:where(img:not([class]))]:outline-1 [&_:where(img:not([class]))]:-outline-offset-1 [&_:where(img:not([class]))]:outline-media-edge",
38
+ "[&_:where(video,iframe)]:max-w-full [&_:where(video,iframe)]:rounded-lg",
39
+ "[&_:where(figcaption)]:mt-2 [&_:where(figcaption)]:text-sm [&_:where(figcaption)]:text-muted-foreground",
40
+ // The bare link: the same treatment as "<Link variant="prose">".
41
+ "[&_:where(a:not([class]))]:rounded-xs [&_:where(a:not([class]))]:underline [&_:where(a:not([class]))]:decoration-border [&_:where(a:not([class]))]:underline-offset-3 [&_:where(a:not([class]))]:outline-none",
42
+ "[&_:where(a:not([class]))]:transition-[color,text-decoration-color] [&_:where(a:not([class]))]:duration-fast [&_:where(a:not([class]))]:ease-out motion-reduce:[&_:where(a:not([class]))]:transition-none",
43
+ "[&_:where(a:not([class])):hover]:text-link [&_:where(a:not([class])):hover]:decoration-link",
44
+ "[&_:where(a:not([class])):focus-visible]:ring-2 [&_:where(a:not([class])):focus-visible]:ring-focus [&_:where(a:not([class])):focus-visible]:ring-offset-2 [&_:where(a:not([class])):focus-visible]:ring-offset-background"
45
+ ],
46
+ variants: {
47
+ size: {
48
+ sm: [
49
+ "text-sm leading-6",
50
+ "[--prose-flow:calc(var(--spacing)*4)] [--prose-h2:calc(var(--spacing)*7)] [--prose-h3:calc(var(--spacing)*6)]",
51
+ "[--prose-after-heading:calc(var(--spacing)*2)] [--prose-media:calc(var(--spacing)*6)] [--prose-item:calc(var(--spacing)*1)]",
52
+ "[&_:where(h1)]:text-xl [&_:where(h2)]:text-lg [&_:where(h3)]:text-base [&_:where(h4,h5,h6)]:text-sm"
53
+ ],
54
+ md: [
55
+ "text-base leading-7",
56
+ "[--prose-flow:calc(var(--spacing)*5)] [--prose-h2:calc(var(--spacing)*10)] [--prose-h3:calc(var(--spacing)*8)]",
57
+ "[--prose-after-heading:calc(var(--spacing)*3)] [--prose-media:calc(var(--spacing)*8)] [--prose-item:calc(var(--spacing)*2)]",
58
+ "[&_:where(h1)]:text-3xl [&_:where(h2)]:text-2xl [&_:where(h3)]:text-xl [&_:where(h4)]:text-lg [&_:where(h5,h6)]:text-base"
59
+ ],
60
+ lg: [
61
+ "text-[1.0625rem] leading-7",
62
+ "[--prose-flow:calc(var(--spacing)*6)] [--prose-h2:calc(var(--spacing)*12)] [--prose-h3:calc(var(--spacing)*10)]",
63
+ "[--prose-after-heading:calc(var(--spacing)*4)] [--prose-media:calc(var(--spacing)*10)] [--prose-item:calc(var(--spacing)*2.5)]",
64
+ "[&_:where(h1)]:text-4xl [&_:where(h2)]:text-3xl [&_:where(h3)]:text-2xl [&_:where(h4)]:text-xl [&_:where(h5,h6)]:text-lg"
65
+ ]
66
+ }
67
+ },
68
+ defaultVariants: {
69
+ size: "md"
70
+ }
71
+ });
72
+ function Prose({ className, size, asChild = false, ...props }) {
73
+ const Comp = asChild ? Slot.Root : "div";
74
+ const resolved = size ?? "md";
75
+ return /* @__PURE__ */ jsx(
76
+ Comp,
77
+ {
78
+ "data-slot": "prose",
79
+ "data-size": resolved,
80
+ className: proseVariants({ size: resolved, className }),
81
+ ...props
82
+ }
83
+ );
84
+ }
85
+ export {
86
+ Prose,
87
+ proseVariants
88
+ };
89
+ //# sourceMappingURL=prose.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/prose/prose.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"radix-ui\"\n\nimport { tv, type VariantProps } from \"../../../lib/tv.mjs\"\n\n/*\n * The reading type. One recipe of descendant selectors over BARE elements, on Atoms' tokens: the\n * body is the `--body` reading ink, headings and bold lift to `--foreground`, list markers step\n * down to `--muted-foreground`, links turn `--link` on hover.\n *\n * Rhythm is space BETWEEN top-level blocks only (never before the first or after the last), so the\n * wrapper adds no gap to whatever it sits in. Each step is a `--prose-*` variable the size sets.\n *\n * An anchor or image that carries a class is a component (a Link, a Button, an Avatar), so the\n * link and media rules only reach `:not([class])` and the component keeps its own look.\n */\nexport const proseVariants = tv({\n base: [\n \"min-w-0 text-body [overflow-wrap:break-word]\",\n\n // Flow between top-level blocks.\n \"[&>*+*]:mt-(--prose-flow)\",\n \"[&>:is(h1,h2):not(:first-child)]:mt-(--prose-h2)\",\n \"[&>:is(h3,h4,h5,h6):not(:first-child)]:mt-(--prose-h3)\",\n \"[&>:is(h1,h2,h3,h4,h5,h6)+*]:mt-(--prose-after-heading)\",\n \"[&>:is(figure,pre,table,hr,blockquote,video,iframe):not(:first-child)]:mt-(--prose-media)\",\n \"[&>:is(figure,pre,table,hr,blockquote,video,iframe)+*]:mt-(--prose-media)\",\n\n // Headings and emphasis.\n \"[&_:where(h1,h2,h3,h4,h5,h6)]:font-heading [&_:where(h1,h2,h3,h4,h5,h6)]:font-semibold [&_:where(h1,h2,h3,h4,h5,h6)]:text-foreground\",\n \"[&_:where(h1,h2,h3,h4,h5,h6)]:text-balance [&_:where(h1,h2,h3)]:tracking-tight\",\n \"[&_:where(strong,b)]:font-semibold [&_:where(strong,b)]:text-foreground\",\n \"[&_:where(h1,h2,h3,h4,h5,h6)_code]:text-[0.875em]\",\n\n // Lists: muted markers, tabular numbers, item gaps.\n \"[&_:where(ul)]:list-disc [&_:where(ul)]:ps-6 [&_:where(ol)]:list-decimal [&_:where(ol)]:ps-6\",\n \"[&_:where(li)]:ps-1 [&_:where(li)::marker]:text-muted-foreground [&_:where(ol>li)::marker]:tabular-nums\",\n \"[&_:where(li+li)]:mt-(--prose-item) [&_:where(li>:is(ul,ol))]:mt-(--prose-item) [&_:where(li>p+p)]:mt-(--prose-item)\",\n\n // Quote.\n \"[&_:where(blockquote)]:border-s-2 [&_:where(blockquote)]:border-border [&_:where(blockquote)]:ps-4 [&_:where(blockquote)]:text-foreground\",\n\n // Code block: muted, scrolls on its own. Inline \"code\" keeps the global chip. Only a bare <pre>\n // (no class), like links and images below, so a CodeSnippet's own <pre> keeps its frame.\n \"[&_:where(pre:not([class]))]:overflow-x-auto [&_:where(pre:not([class]))]:rounded-lg [&_:where(pre:not([class]))]:bg-muted [&_:where(pre:not([class]))]:p-4 [&_:where(pre:not([class]))]:font-mono [&_:where(pre:not([class]))]:text-sm [&_:where(pre:not([class]))]:leading-6 [&_:where(pre:not([class]))]:text-foreground\",\n\n // Table: scrolls inside the column instead of the page.\n \"[&_:where(table)]:block [&_:where(table)]:w-max [&_:where(table)]:max-w-full [&_:where(table)]:overflow-x-auto [&_:where(table)]:border-collapse [&_:where(table)]:text-sm\",\n \"[&_:where(th)]:border-b [&_:where(th)]:border-border [&_:where(th)]:px-3 [&_:where(th)]:py-2 [&_:where(th)]:text-start [&_:where(th)]:font-medium [&_:where(th)]:text-foreground\",\n \"[&_:where(td)]:border-b [&_:where(td)]:border-border [&_:where(td)]:px-3 [&_:where(td)]:py-2 [&_:where(td)]:tabular-nums\",\n \"[&_:where(th,td):first-child]:ps-0\",\n\n // Rule.\n \"[&_:where(hr)]:border-border\",\n\n // Media: the corner radius and the image outline.\n \"[&_:where(img:not([class]))]:h-auto [&_:where(img:not([class]))]:max-w-full [&_:where(img:not([class]))]:rounded-lg\",\n \"[&_:where(img:not([class]))]:outline [&_:where(img:not([class]))]:outline-1 [&_:where(img:not([class]))]:-outline-offset-1 [&_:where(img:not([class]))]:outline-media-edge\",\n \"[&_:where(video,iframe)]:max-w-full [&_:where(video,iframe)]:rounded-lg\",\n \"[&_:where(figcaption)]:mt-2 [&_:where(figcaption)]:text-sm [&_:where(figcaption)]:text-muted-foreground\",\n\n // The bare link: the same treatment as \"<Link variant=\"prose\">\".\n \"[&_:where(a:not([class]))]:rounded-xs [&_:where(a:not([class]))]:underline [&_:where(a:not([class]))]:decoration-border [&_:where(a:not([class]))]:underline-offset-3 [&_:where(a:not([class]))]:outline-none\",\n \"[&_:where(a:not([class]))]:transition-[color,text-decoration-color] [&_:where(a:not([class]))]:duration-fast [&_:where(a:not([class]))]:ease-out motion-reduce:[&_:where(a:not([class]))]:transition-none\",\n \"[&_:where(a:not([class])):hover]:text-link [&_:where(a:not([class])):hover]:decoration-link\",\n \"[&_:where(a:not([class])):focus-visible]:ring-2 [&_:where(a:not([class])):focus-visible]:ring-focus [&_:where(a:not([class])):focus-visible]:ring-offset-2 [&_:where(a:not([class])):focus-visible]:ring-offset-background\",\n ],\n variants: {\n size: {\n sm: [\n \"text-sm leading-6\",\n \"[--prose-flow:calc(var(--spacing)*4)] [--prose-h2:calc(var(--spacing)*7)] [--prose-h3:calc(var(--spacing)*6)]\",\n \"[--prose-after-heading:calc(var(--spacing)*2)] [--prose-media:calc(var(--spacing)*6)] [--prose-item:calc(var(--spacing)*1)]\",\n \"[&_:where(h1)]:text-xl [&_:where(h2)]:text-lg [&_:where(h3)]:text-base [&_:where(h4,h5,h6)]:text-sm\",\n ],\n md: [\n \"text-base leading-7\",\n \"[--prose-flow:calc(var(--spacing)*5)] [--prose-h2:calc(var(--spacing)*10)] [--prose-h3:calc(var(--spacing)*8)]\",\n \"[--prose-after-heading:calc(var(--spacing)*3)] [--prose-media:calc(var(--spacing)*8)] [--prose-item:calc(var(--spacing)*2)]\",\n \"[&_:where(h1)]:text-3xl [&_:where(h2)]:text-2xl [&_:where(h3)]:text-xl [&_:where(h4)]:text-lg [&_:where(h5,h6)]:text-base\",\n ],\n lg: [\n \"text-[1.0625rem] leading-7\",\n \"[--prose-flow:calc(var(--spacing)*6)] [--prose-h2:calc(var(--spacing)*12)] [--prose-h3:calc(var(--spacing)*10)]\",\n \"[--prose-after-heading:calc(var(--spacing)*4)] [--prose-media:calc(var(--spacing)*10)] [--prose-item:calc(var(--spacing)*2.5)]\",\n \"[&_:where(h1)]:text-4xl [&_:where(h2)]:text-3xl [&_:where(h3)]:text-2xl [&_:where(h4)]:text-xl [&_:where(h5,h6)]:text-lg\",\n ],\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\nexport interface ProseProps extends React.ComponentProps<\"div\">, VariantProps<typeof proseVariants> {\n /** Render the styling onto your own child element (\"<article>\", \"<section>\") instead of a \"div\". */\n asChild?: boolean\n}\n\nexport function Prose({ className, size, asChild = false, ...props }: ProseProps) {\n const Comp = asChild ? Slot.Root : \"div\"\n const resolved = size ?? \"md\"\n return (\n <Comp\n data-slot=\"prose\"\n data-size={resolved}\n className={proseVariants({ size: resolved, className })}\n {...props}\n />\n )\n}\n"],"mappings":"AAuGI;AAtGJ,SAAS,YAAY;AAErB,SAAS,UAA6B;AAa/B,MAAM,gBAAgB,GAAG;AAAA,EAC9B,MAAM;AAAA,IACJ;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,IAAI;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,IAAI;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAOM,SAAS,MAAM,EAAE,WAAW,MAAM,UAAU,OAAO,GAAG,MAAM,GAAe;AAChF,QAAM,OAAO,UAAU,KAAK,OAAO;AACnC,QAAM,WAAW,QAAQ;AACzB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,aAAW;AAAA,MACX,WAAW,cAAc,EAAE,MAAM,UAAU,UAAU,CAAC;AAAA,MACrD,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,15 @@
1
+ import {
2
+ RadioGroup,
3
+ RadioCard,
4
+ RadioCardTitle,
5
+ RadioCardDescription,
6
+ radioGroupVariants
7
+ } from "./radio-group.mjs";
8
+ export {
9
+ RadioCard,
10
+ RadioCardDescription,
11
+ RadioCardTitle,
12
+ RadioGroup,
13
+ radioGroupVariants
14
+ };
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/radio-group/index.ts"],"sourcesContent":["export {\n RadioGroup,\n RadioCard,\n RadioCardTitle,\n RadioCardDescription,\n radioGroupVariants,\n type RadioGroupProps,\n type RadioCardProps,\n} from \"./radio-group.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;","names":[]}
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
5
+ import { useFieldContext } from "../../../lib/field-context.mjs";
6
+ import { tv } from "../../../lib/tv.mjs";
7
+ const radioGroupVariants = tv({
8
+ slots: {
9
+ root: "grid gap-2.5",
10
+ card: [
11
+ "group relative flex w-full cursor-pointer border border-input bg-transparent text-left text-card-foreground shadow-xs",
12
+ "transition-[border-color,box-shadow] duration-fast ease-out outline-none",
13
+ "data-[state=unchecked]:hover:border-primary/25 data-[state=checked]:border-primary",
14
+ "focus-visible:focus-ring focus-visible:data-[state]:border-focus disabled:cursor-not-allowed disabled:opacity-50"
15
+ ],
16
+ control: [
17
+ "relative grid shrink-0 place-items-center rounded-full border border-input bg-[var(--surface,var(--background))]",
18
+ "transition-colors duration-fast ease-out group-data-[state=checked]:border-primary group-data-[state=checked]:bg-primary"
19
+ ],
20
+ dot: [
21
+ "rounded-full bg-primary-foreground scale-50 opacity-0 transition-[scale,opacity] duration-fast ease-out",
22
+ "group-data-[state=checked]:scale-100 group-data-[state=checked]:opacity-100"
23
+ ],
24
+ text: "flex min-w-0 flex-1 flex-col gap-1 break-words",
25
+ title: "block text-sm font-semibold leading-none text-foreground",
26
+ description: "block text-pretty text-sm leading-snug text-muted-foreground"
27
+ },
28
+ variants: {
29
+ size: {
30
+ md: { card: "items-start gap-3 rounded-xl p-4", control: "-mt-px self-start size-4", dot: "size-1.5" },
31
+ // A one-line choice: the circle centres on the title, which drops to medium weight.
32
+ sm: {
33
+ card: "items-center gap-2.5 rounded-lg p-3 [&_[data-slot=radio-card-title]]:font-medium",
34
+ control: "mt-0 size-3.5 self-center",
35
+ dot: "size-1.25"
36
+ }
37
+ }
38
+ },
39
+ defaultVariants: { size: "md" }
40
+ });
41
+ const RadioGroupSizeContext = React.createContext("md");
42
+ function RadioGroup({
43
+ className,
44
+ size = "md",
45
+ disabled,
46
+ required,
47
+ "aria-labelledby": ariaLabelledBy,
48
+ "aria-describedby": ariaDescribedBy,
49
+ "aria-invalid": ariaInvalid,
50
+ ...props
51
+ }) {
52
+ const field = useFieldContext();
53
+ return /* @__PURE__ */ jsx(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(
54
+ RadioGroupPrimitive.Root,
55
+ {
56
+ "data-slot": "radio-group",
57
+ disabled: disabled ?? field?.disabled,
58
+ required: required ?? (field?.required || void 0),
59
+ "aria-labelledby": ariaLabelledBy ?? field?.labelledBy,
60
+ "aria-describedby": ariaDescribedBy ?? field?.describedBy,
61
+ "aria-invalid": ariaInvalid ?? (field?.hasError || void 0),
62
+ className: radioGroupVariants().root({ className }),
63
+ ...props
64
+ }
65
+ ) });
66
+ }
67
+ function RadioCard({ className, size, children, ...props }) {
68
+ const groupSize = React.useContext(RadioGroupSizeContext);
69
+ const slots = radioGroupVariants({ size: size ?? groupSize });
70
+ return /* @__PURE__ */ jsxs(RadioGroupPrimitive.Item, { "data-slot": "radio-card", className: slots.card({ className }), ...props, children: [
71
+ /* @__PURE__ */ jsx("span", { className: slots.text(), children }),
72
+ /* @__PURE__ */ jsx("span", { "data-slot": "radio-card-control", "aria-hidden": true, className: slots.control(), children: /* @__PURE__ */ jsx("span", { className: slots.dot() }) })
73
+ ] });
74
+ }
75
+ function RadioCardTitle({ className, ...props }) {
76
+ return /* @__PURE__ */ jsx("span", { "data-slot": "radio-card-title", className: radioGroupVariants().title({ className }), ...props });
77
+ }
78
+ function RadioCardDescription({ className, ...props }) {
79
+ return /* @__PURE__ */ jsx("span", { "data-slot": "radio-card-description", className: radioGroupVariants().description({ className }), ...props });
80
+ }
81
+ export {
82
+ RadioCard,
83
+ RadioCardDescription,
84
+ RadioCardTitle,
85
+ RadioGroup,
86
+ radioGroupVariants
87
+ };
88
+ //# sourceMappingURL=radio-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/radio-group/radio-group.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\"\n\nimport { useFieldContext } from \"../../../lib/field-context.mjs\"\nimport { tv } from \"../../../lib/tv.mjs\"\n\n/*\n * A set of choices where exactly one is picked, shown as cards: a radio circle, a title and an\n * optional description, with the whole card as the hit area. Arrow keys move between cards (Radix\n * RadioGroup). Inside a Field it takes the label as its name through aria-labelledby, since a div\n * can't be named by htmlFor; inside a FieldGroup the legend names it, so it needs no label at all.\n */\n\nexport const radioGroupVariants = tv({\n slots: {\n root: \"grid gap-2.5\",\n card: [\n \"group relative flex w-full cursor-pointer border border-input bg-transparent text-left text-card-foreground shadow-xs\",\n \"transition-[border-color,box-shadow] duration-fast ease-out outline-none\",\n \"data-[state=unchecked]:hover:border-primary/25 data-[state=checked]:border-primary\",\n \"focus-visible:focus-ring focus-visible:data-[state]:border-focus disabled:cursor-not-allowed disabled:opacity-50\",\n ],\n control: [\n \"relative grid shrink-0 place-items-center rounded-full border border-input bg-[var(--surface,var(--background))]\",\n \"transition-colors duration-fast ease-out group-data-[state=checked]:border-primary group-data-[state=checked]:bg-primary\",\n ],\n dot: [\n \"rounded-full bg-primary-foreground scale-50 opacity-0 transition-[scale,opacity] duration-fast ease-out\",\n \"group-data-[state=checked]:scale-100 group-data-[state=checked]:opacity-100\",\n ],\n text: \"flex min-w-0 flex-1 flex-col gap-1 break-words\",\n title: \"block text-sm font-semibold leading-none text-foreground\",\n description: \"block text-pretty text-sm leading-snug text-muted-foreground\",\n },\n variants: {\n size: {\n md: { card: \"items-start gap-3 rounded-xl p-4\", control: \"-mt-px self-start size-4\", dot: \"size-1.5\" },\n // A one-line choice: the circle centres on the title, which drops to medium weight.\n sm: {\n card: \"items-center gap-2.5 rounded-lg p-3 [&_[data-slot=radio-card-title]]:font-medium\",\n control: \"mt-0 size-3.5 self-center\",\n dot: \"size-1.25\",\n },\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\ntype RadioCardSize = \"sm\" | \"md\"\n\nconst RadioGroupSizeContext = React.createContext<RadioCardSize>(\"md\")\n\n/* ─── RadioGroup ────────────────────────────────────────────────────────── */\n\nexport interface RadioGroupProps extends React.ComponentProps<typeof RadioGroupPrimitive.Root> {\n /** The card size every RadioCard inside takes. */\n size?: RadioCardSize\n}\n\nexport function RadioGroup({\n className,\n size = \"md\",\n disabled,\n required,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n ...props\n}: RadioGroupProps) {\n const field = useFieldContext()\n return (\n <RadioGroupSizeContext.Provider value={size}>\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n disabled={disabled ?? field?.disabled}\n required={required ?? (field?.required || undefined)}\n aria-labelledby={ariaLabelledBy ?? field?.labelledBy}\n aria-describedby={ariaDescribedBy ?? field?.describedBy}\n aria-invalid={ariaInvalid ?? (field?.hasError || undefined)}\n className={radioGroupVariants().root({ className })}\n {...props}\n />\n </RadioGroupSizeContext.Provider>\n )\n}\n\n/* ─── RadioCard ─────────────────────────────────────────────────────────── */\n\nexport interface RadioCardProps extends React.ComponentProps<typeof RadioGroupPrimitive.Item> {\n /** Overrides the group's size for this card. */\n size?: RadioCardSize\n}\n\n/** One choice. Put a RadioCardTitle and, optionally, a RadioCardDescription inside. */\nexport function RadioCard({ className, size, children, ...props }: RadioCardProps) {\n const groupSize = React.useContext(RadioGroupSizeContext)\n const slots = radioGroupVariants({ size: size ?? groupSize })\n return (\n <RadioGroupPrimitive.Item data-slot=\"radio-card\" className={slots.card({ className })} {...props}>\n <span className={slots.text()}>{children}</span>\n {/* The circle sits at the end, so the titles of a stack of cards line up on the left. */}\n <span data-slot=\"radio-card-control\" aria-hidden className={slots.control()}>\n <span className={slots.dot()} />\n </span>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport function RadioCardTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"radio-card-title\" className={radioGroupVariants().title({ className })} {...props} />\n}\n\nexport function RadioCardDescription({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span data-slot=\"radio-card-description\" className={radioGroupVariants().description({ className })} {...props} />\n )\n}\n"],"mappings":";AA0EM,cA0BF,YA1BE;AAxEN,YAAY,WAAW;AACvB,SAAS,cAAc,2BAA2B;AAElD,SAAS,uBAAuB;AAChC,SAAS,UAAU;AASZ,MAAM,qBAAqB,GAAG;AAAA,EACnC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,IACA,KAAK;AAAA,MACH;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI,EAAE,MAAM,oCAAoC,SAAS,4BAA4B,KAAK,WAAW;AAAA;AAAA,MAErG,IAAI;AAAA,QACF,MAAM;AAAA,QACN,SAAS;AAAA,QACT,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,MAAM,KAAK;AAChC,CAAC;AAID,MAAM,wBAAwB,MAAM,cAA6B,IAAI;AAS9D,SAAS,WAAW;AAAA,EACzB;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,GAAG;AACL,GAAoB;AAClB,QAAM,QAAQ,gBAAgB;AAC9B,SACE,oBAAC,sBAAsB,UAAtB,EAA+B,OAAO,MACrC;AAAA,IAAC,oBAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,UAAU,YAAY,OAAO;AAAA,MAC7B,UAAU,aAAa,OAAO,YAAY;AAAA,MAC1C,mBAAiB,kBAAkB,OAAO;AAAA,MAC1C,oBAAkB,mBAAmB,OAAO;AAAA,MAC5C,gBAAc,gBAAgB,OAAO,YAAY;AAAA,MACjD,WAAW,mBAAmB,EAAE,KAAK,EAAE,UAAU,CAAC;AAAA,MACjD,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAUO,SAAS,UAAU,EAAE,WAAW,MAAM,UAAU,GAAG,MAAM,GAAmB;AACjF,QAAM,YAAY,MAAM,WAAW,qBAAqB;AACxD,QAAM,QAAQ,mBAAmB,EAAE,MAAM,QAAQ,UAAU,CAAC;AAC5D,SACE,qBAAC,oBAAoB,MAApB,EAAyB,aAAU,cAAa,WAAW,MAAM,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACzF;AAAA,wBAAC,UAAK,WAAW,MAAM,KAAK,GAAI,UAAS;AAAA,IAEzC,oBAAC,UAAK,aAAU,sBAAqB,eAAW,MAAC,WAAW,MAAM,QAAQ,GACxE,8BAAC,UAAK,WAAW,MAAM,IAAI,GAAG,GAChC;AAAA,KACF;AAEJ;AAEO,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAAiC;AACpF,SAAO,oBAAC,UAAK,aAAU,oBAAmB,WAAW,mBAAmB,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC7G;AAEO,SAAS,qBAAqB,EAAE,WAAW,GAAG,MAAM,GAAiC;AAC1F,SACE,oBAAC,UAAK,aAAU,0BAAyB,WAAW,mBAAmB,EAAE,YAAY,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAEpH;","names":[]}
@@ -0,0 +1,6 @@
1
+ import { Rating, ratingVariants } from "./rating.mjs";
2
+ export {
3
+ Rating,
4
+ ratingVariants
5
+ };
6
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/rating/index.ts"],"sourcesContent":["export { Rating, ratingVariants, type RatingProps } from \"./rating.mjs\"\n"],"mappings":"AAAA,SAAS,QAAQ,sBAAwC;","names":[]}