@thalavaisankar/atoms 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (763) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +142 -2
  3. package/THIRD_PARTY_NOTICES.md +246 -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/toast/index.mjs +19 -0
  700. package/dist/components/ui/toast/index.mjs.map +1 -0
  701. package/dist/components/ui/toast/store.mjs +96 -0
  702. package/dist/components/ui/toast/store.mjs.map +1 -0
  703. package/dist/components/ui/toast/toast.mjs +395 -0
  704. package/dist/components/ui/toast/toast.mjs.map +1 -0
  705. package/dist/components/ui/toggle/index.mjs +13 -0
  706. package/dist/components/ui/toggle/index.mjs.map +1 -0
  707. package/dist/components/ui/toggle/toggle.mjs +123 -0
  708. package/dist/components/ui/toggle/toggle.mjs.map +1 -0
  709. package/dist/components/ui/toggle-group/index.mjs +11 -0
  710. package/dist/components/ui/toggle-group/index.mjs.map +1 -0
  711. package/dist/components/ui/toggle-group/toggle-group.mjs +243 -0
  712. package/dist/components/ui/toggle-group/toggle-group.mjs.map +1 -0
  713. package/dist/components/ui/toggletip/index.mjs +6 -0
  714. package/dist/components/ui/toggletip/index.mjs.map +1 -0
  715. package/dist/components/ui/toggletip/toggletip.mjs +95 -0
  716. package/dist/components/ui/toggletip/toggletip.mjs.map +1 -0
  717. package/dist/components/ui/toolbar/index.mjs +21 -0
  718. package/dist/components/ui/toolbar/index.mjs.map +1 -0
  719. package/dist/components/ui/toolbar/toolbar.mjs +130 -0
  720. package/dist/components/ui/toolbar/toolbar.mjs.map +1 -0
  721. package/dist/components/ui/tooltip/index.mjs +29 -0
  722. package/dist/components/ui/tooltip/index.mjs.map +1 -0
  723. package/dist/components/ui/tooltip/tooltip.mjs +640 -0
  724. package/dist/components/ui/tooltip/tooltip.mjs.map +1 -0
  725. package/dist/components/ui/tree/index.mjs +11 -0
  726. package/dist/components/ui/tree/index.mjs.map +1 -0
  727. package/dist/components/ui/tree/tree.mjs +450 -0
  728. package/dist/components/ui/tree/tree.mjs.map +1 -0
  729. package/dist/index.d.mts +19332 -0
  730. package/dist/index.mjs +155 -0
  731. package/dist/index.mjs.map +1 -0
  732. package/dist/lib/color.mjs +78 -0
  733. package/dist/lib/color.mjs.map +1 -0
  734. package/dist/lib/create-context.mjs +31 -0
  735. package/dist/lib/create-context.mjs.map +1 -0
  736. package/dist/lib/date.mjs +116 -0
  737. package/dist/lib/date.mjs.map +1 -0
  738. package/dist/lib/density.mjs +79 -0
  739. package/dist/lib/density.mjs.map +1 -0
  740. package/dist/lib/field-context.mjs +13 -0
  741. package/dist/lib/field-context.mjs.map +1 -0
  742. package/dist/lib/filter.mjs +28 -0
  743. package/dist/lib/filter.mjs.map +1 -0
  744. package/dist/lib/gesture.mjs +38 -0
  745. package/dist/lib/gesture.mjs.map +1 -0
  746. package/dist/lib/hit-area.mjs +14 -0
  747. package/dist/lib/hit-area.mjs.map +1 -0
  748. package/dist/lib/labels.mjs +27 -0
  749. package/dist/lib/labels.mjs.map +1 -0
  750. package/dist/lib/morph-box.mjs +56 -0
  751. package/dist/lib/morph-box.mjs.map +1 -0
  752. package/dist/lib/motion.mjs +70 -0
  753. package/dist/lib/motion.mjs.map +1 -0
  754. package/dist/lib/pulse.mjs +69 -0
  755. package/dist/lib/pulse.mjs.map +1 -0
  756. package/dist/lib/roving-focus.mjs +74 -0
  757. package/dist/lib/roving-focus.mjs.map +1 -0
  758. package/dist/lib/tv.mjs +11 -0
  759. package/dist/lib/tv.mjs.map +1 -0
  760. package/dist/lib/utils.mjs +82 -0
  761. package/dist/lib/utils.mjs.map +1 -0
  762. package/dist/styles.css +2 -0
  763. package/package.json +133 -4
@@ -0,0 +1,235 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Check } from "atoms-icons";
5
+ import { Slot } from "radix-ui";
6
+ import { useControllableState } from "../input/use-controllable-state.mjs";
7
+ import { Spinner } from "../spinner/index.mjs";
8
+ import { useDensity } from "../../../lib/density.mjs";
9
+ import { useMorphBox } from "../../../lib/morph-box.mjs";
10
+ import { tv } from "../../../lib/tv.mjs";
11
+ import { cn } from "../../../lib/utils.mjs";
12
+ const hit = "relative before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] before:size-10 pointer-coarse:before:size-11";
13
+ const stepperVariants = tv({
14
+ slots: {
15
+ root: "flex",
16
+ item: "group/step relative flex",
17
+ trigger: "group/trigger inline-flex outline-none cursor-pointer transition-transform duration-fast ease-out disabled:pointer-events-none disabled:cursor-not-allowed",
18
+ indicator: [
19
+ "z-10 inline-flex size-[var(--step-size)] shrink-0 items-center justify-center rounded-full font-medium text-muted-foreground transition duration-fast ease-out",
20
+ "group-focus-visible/trigger:outline-2 group-focus-visible/trigger:outline-focus",
21
+ "group-data-[state=active]/step:ring-primary/10 group-data-[state=completed]/step:text-primary-foreground group-data-[disabled]/step:opacity-50",
22
+ hit,
23
+ "[&_svg]:shrink-0"
24
+ ],
25
+ glyph: "grid place-items-center [&>*]:[grid-area:1/1]",
26
+ number: [
27
+ "tabular-nums transition-[opacity,scale,filter] duration-fast ease-out",
28
+ "group-data-[state=completed]/step:scale-[0.25] group-data-[state=completed]/step:opacity-0 group-data-[state=completed]/step:blur-[4px]"
29
+ ],
30
+ check: [
31
+ "scale-[0.25] opacity-0 blur-[4px] transition-[opacity,scale,filter] duration-fast ease-out",
32
+ "group-data-[state=completed]/step:scale-100 group-data-[state=completed]/step:opacity-100 group-data-[state=completed]/step:blur-none"
33
+ ],
34
+ title: "font-medium transition-colors duration-fast ease-out group-data-[state=active]/step:text-foreground",
35
+ description: "text-pretty text-muted-foreground text-xs",
36
+ separator: "absolute overflow-hidden rounded-full bg-border",
37
+ separatorFill: "block size-full bg-primary transition-transform duration-slow ease-drawer motion-reduce-fade"
38
+ },
39
+ variants: {
40
+ layout: {
41
+ bars: {
42
+ root: "gap-1.5",
43
+ item: "min-w-0 flex-1 flex-col items-stretch",
44
+ trigger: "w-full flex-col gap-2 items-stretch text-left",
45
+ title: "truncate text-muted-foreground/60 group-data-[state=completed]/step:text-muted-foreground"
46
+ },
47
+ row: {
48
+ item: "min-w-0 flex-1 flex-col items-center",
49
+ trigger: "flex-col items-center gap-2 text-center",
50
+ title: "text-muted-foreground group-data-[state=completed]/step:text-foreground",
51
+ separator: "top-[calc(var(--step-size)/2)] left-[calc(50%+var(--step-size)/2)] h-0.5 w-[calc(100%-var(--step-size))] -translate-y-1/2",
52
+ separatorFill: "origin-left scale-x-0 group-data-[state=completed]/step:scale-x-100"
53
+ },
54
+ column: {
55
+ root: "flex-col",
56
+ item: "flex-row items-start gap-3 [&:not(:last-child)]:min-h-[calc(var(--step-size)+2rem)]",
57
+ trigger: "flex-row items-start gap-3 text-left",
58
+ title: "pt-1 text-muted-foreground group-data-[state=completed]/step:text-foreground",
59
+ separator: "left-[calc(var(--step-size)/2)] top-[calc(var(--step-size)+0.25rem)] bottom-1 w-0.5 -translate-x-1/2",
60
+ separatorFill: "origin-top scale-y-0 group-data-[state=completed]/step:scale-y-100"
61
+ }
62
+ },
63
+ variant: {
64
+ // A progress bar over each label; the glyph is hidden and the fill sweeps in.
65
+ bars: {
66
+ indicator: [
67
+ "h-1 w-full overflow-hidden border-0 ring-0 bg-[color-mix(in_oklab,var(--foreground)_6%,transparent)] [&>*]:hidden",
68
+ "after:absolute after:inset-0 after:origin-left after:scale-x-0 after:rounded-full after:bg-foreground after:content-['']",
69
+ "after:transition-transform after:duration-slow after:ease-drawer",
70
+ "motion-reduce:after:transition-[opacity,color,background-color,border-color] motion-reduce:after:duration-reduced motion-reduce:after:ease-linear",
71
+ "group-data-[state=active]/step:after:scale-x-100 group-data-[state=completed]/step:after:scale-x-100",
72
+ "group-data-[loading]/step:after:animate-pulse group-focus-visible/trigger:outline-offset-4"
73
+ ]
74
+ },
75
+ // A ringed circle with a soft halo on the active step.
76
+ outline: {
77
+ indicator: [
78
+ "border-2 border-border bg-background group-focus-visible/trigger:outline-offset-2",
79
+ "group-data-[state=active]/step:border-primary group-data-[state=active]/step:text-primary group-data-[state=active]/step:ring-4",
80
+ "group-data-[state=completed]/step:border-primary group-data-[state=completed]/step:bg-primary"
81
+ ]
82
+ },
83
+ // Flat fills in every state.
84
+ solid: {
85
+ indicator: [
86
+ "bg-muted group-focus-visible/trigger:outline-offset-2",
87
+ "group-data-[state=active]/step:bg-primary group-data-[state=active]/step:text-primary-foreground",
88
+ "group-data-[state=completed]/step:bg-primary"
89
+ ]
90
+ }
91
+ },
92
+ density: {
93
+ comfortable: { root: "[--step-size:1.75rem]", indicator: "text-sm [&_svg]:size-4", title: "text-sm" },
94
+ compact: { root: "[--step-size:1.5rem]", indicator: "text-xs [&_svg]:size-3.5", title: "text-xs" }
95
+ }
96
+ },
97
+ defaultVariants: { layout: "bars", variant: "bars", density: "compact" }
98
+ });
99
+ const StepperContext = React.createContext(null);
100
+ const StepperItemContext = React.createContext(
101
+ null
102
+ );
103
+ function useStepper(consumer) {
104
+ const context = React.useContext(StepperContext);
105
+ if (!context) throw new Error(`\`${consumer}\` must be used within \`Stepper\``);
106
+ return context;
107
+ }
108
+ function useStepperItem(consumer) {
109
+ const context = React.useContext(StepperItemContext);
110
+ if (!context) throw new Error(`\`${consumer}\` must be used within \`StepperItem\``);
111
+ return context;
112
+ }
113
+ const useSlots = () => {
114
+ const { layout, variant, density } = useStepper("Stepper part");
115
+ return stepperVariants({ layout, variant, density });
116
+ };
117
+ function Stepper({
118
+ value,
119
+ defaultValue = 1,
120
+ onValueChange,
121
+ variant: variantProp = "bars",
122
+ orientation = "horizontal",
123
+ density: densityProp,
124
+ className,
125
+ ...props
126
+ }) {
127
+ const density = useDensity(densityProp);
128
+ const [active, setActive] = useControllableState({ prop: value, defaultProp: defaultValue, onChange: onValueChange });
129
+ const variant = variantProp === "bars" && orientation === "vertical" ? "outline" : variantProp;
130
+ const layout = variant === "bars" ? "bars" : orientation === "vertical" ? "column" : "row";
131
+ const slots = stepperVariants({ layout, variant, density });
132
+ return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { value: active, select: setActive, variant, layout, density }, children: /* @__PURE__ */ jsx(
133
+ "div",
134
+ {
135
+ role: "group",
136
+ "data-slot": "stepper",
137
+ "data-orientation": orientation,
138
+ "data-variant": variant,
139
+ className: slots.root({ className }),
140
+ ...props
141
+ }
142
+ ) });
143
+ }
144
+ function StepperItem({ step, completed, disabled = false, loading = false, className, ...props }) {
145
+ const ctx = useStepper("StepperItem");
146
+ const slots = useSlots();
147
+ const state = completed || step < ctx.value ? "completed" : step === ctx.value ? "active" : "inactive";
148
+ return /* @__PURE__ */ jsx(StepperItemContext.Provider, { value: { step, state, disabled, loading }, children: /* @__PURE__ */ jsx(
149
+ "div",
150
+ {
151
+ "data-slot": "stepper-item",
152
+ "data-state": state,
153
+ "data-disabled": disabled || void 0,
154
+ "data-loading": loading || void 0,
155
+ className: slots.item({ className }),
156
+ ...props
157
+ }
158
+ ) });
159
+ }
160
+ function StepperTrigger({ asChild = false, static: _static, className, onClick, disabled, ...props }) {
161
+ void _static;
162
+ const ctx = useStepper("StepperTrigger");
163
+ const item = useStepperItem("StepperTrigger");
164
+ const slots = useSlots();
165
+ const Comp = asChild ? Slot.Root : "button";
166
+ return /* @__PURE__ */ jsx(
167
+ Comp,
168
+ {
169
+ type: asChild ? void 0 : "button",
170
+ "data-slot": "stepper-trigger",
171
+ "aria-current": item.state === "active" ? "step" : void 0,
172
+ disabled: disabled ?? item.disabled,
173
+ className: slots.trigger({ className }),
174
+ onClick: (event) => {
175
+ onClick?.(event);
176
+ if (!event.defaultPrevented && !item.disabled) ctx.select(item.step);
177
+ },
178
+ ...props
179
+ }
180
+ );
181
+ }
182
+ function StepperIndicator({ className, children, ...props }) {
183
+ const item = useStepperItem("StepperIndicator");
184
+ const slots = useSlots();
185
+ return /* @__PURE__ */ jsx("span", { "data-slot": "stepper-indicator", className: slots.indicator({ className }), ...props, children: item.loading ? /* @__PURE__ */ jsx(Spinner, { "aria-hidden": true }) : /* @__PURE__ */ jsxs("span", { className: slots.glyph(), children: [
186
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: slots.number(), children: children ?? item.step }),
187
+ /* @__PURE__ */ jsx(Check, { weight: "bold", "aria-hidden": true, className: slots.check() })
188
+ ] }) });
189
+ }
190
+ function StepperTitle({ className, ...props }) {
191
+ return /* @__PURE__ */ jsx("span", { "data-slot": "stepper-title", className: useSlots().title({ className }), ...props });
192
+ }
193
+ function StepperDescription({ className, ...props }) {
194
+ return /* @__PURE__ */ jsx("span", { "data-slot": "stepper-description", className: useSlots().description({ className }), ...props });
195
+ }
196
+ function StepperSeparator({ className, ...props }) {
197
+ const slots = useSlots();
198
+ return /* @__PURE__ */ jsx("div", { "data-slot": "stepper-separator", "aria-hidden": true, className: slots.separator({ className }), ...props, children: /* @__PURE__ */ jsx("span", { className: slots.separatorFill() }) });
199
+ }
200
+ const StepperPanelsContext = React.createContext(null);
201
+ const FOCUSABLE = 'input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])';
202
+ function StepperPanels({ value, className, children, ...props }) {
203
+ const boxRef = React.useRef(null);
204
+ const contentRef = React.useRef(null);
205
+ useMorphBox({
206
+ box: boxRef,
207
+ content: contentRef,
208
+ key: value,
209
+ order: value,
210
+ onChange: () => {
211
+ const active = document.activeElement;
212
+ if (active && active !== document.body && document.contains(active)) return;
213
+ contentRef.current?.querySelector(FOCUSABLE)?.focus({ preventScroll: true });
214
+ }
215
+ });
216
+ return /* @__PURE__ */ jsx(StepperPanelsContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref: boxRef, "data-slot": "stepper-panels", className: cn("overflow-hidden", className), ...props, children: /* @__PURE__ */ jsx("div", { ref: contentRef, children }) }) });
217
+ }
218
+ function StepperPanel({ step, className, ...props }) {
219
+ const value = React.useContext(StepperPanelsContext);
220
+ if (value !== step) return null;
221
+ return /* @__PURE__ */ jsx("div", { "data-slot": "stepper-panel", className, ...props });
222
+ }
223
+ export {
224
+ Stepper,
225
+ StepperDescription,
226
+ StepperIndicator,
227
+ StepperItem,
228
+ StepperPanel,
229
+ StepperPanels,
230
+ StepperSeparator,
231
+ StepperTitle,
232
+ StepperTrigger,
233
+ stepperVariants
234
+ };
235
+ //# sourceMappingURL=stepper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/stepper/stepper.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Check } from \"atoms-icons\"\nimport { Slot } from \"radix-ui\"\n\nimport { useControllableState } from \"../input/use-controllable-state.mjs\"\nimport { Spinner } from \"../spinner/index.mjs\"\nimport { useDensity, type Density } from \"../../../lib/density.mjs\"\nimport { useMorphBox } from \"../../../lib/morph-box.mjs\"\nimport { tv } from \"../../../lib/tv.mjs\"\nimport { cn } from \"../../../lib/utils.mjs\"\n\n/*\n * A progress indicator for sequential flows: onboarding, checkout and multi-step dialogs. Each step\n * derives its state (completed, active, inactive) from one active value, and publishes it on\n * data-state so the indicator, title and separator restyle with no measuring.\n */\n\nexport type StepperVariant = \"bars\" | \"outline\" | \"solid\"\nexport type StepperOrientation = \"horizontal\" | \"vertical\"\n\n// The layout of an item and its trigger: bars, circles in a row, or circles in a column.\ntype Layout = \"bars\" | \"row\" | \"column\"\n\nconst hit = \"relative before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] before:size-10 pointer-coarse:before:size-11\"\n\nexport const stepperVariants = tv({\n slots: {\n root: \"flex\",\n item: \"group/step relative flex\",\n trigger:\n \"group/trigger inline-flex outline-none cursor-pointer transition-transform duration-fast ease-out disabled:pointer-events-none disabled:cursor-not-allowed\",\n indicator: [\n \"z-10 inline-flex size-[var(--step-size)] shrink-0 items-center justify-center rounded-full font-medium text-muted-foreground transition duration-fast ease-out\",\n \"group-focus-visible/trigger:outline-2 group-focus-visible/trigger:outline-focus\",\n \"group-data-[state=active]/step:ring-primary/10 group-data-[state=completed]/step:text-primary-foreground group-data-[disabled]/step:opacity-50\",\n hit,\n \"[&_svg]:shrink-0\",\n ],\n glyph: \"grid place-items-center [&>*]:[grid-area:1/1]\",\n number: [\n \"tabular-nums transition-[opacity,scale,filter] duration-fast ease-out\",\n \"group-data-[state=completed]/step:scale-[0.25] group-data-[state=completed]/step:opacity-0 group-data-[state=completed]/step:blur-[4px]\",\n ],\n check: [\n \"scale-[0.25] opacity-0 blur-[4px] transition-[opacity,scale,filter] duration-fast ease-out\",\n \"group-data-[state=completed]/step:scale-100 group-data-[state=completed]/step:opacity-100 group-data-[state=completed]/step:blur-none\",\n ],\n title: \"font-medium transition-colors duration-fast ease-out group-data-[state=active]/step:text-foreground\",\n description: \"text-pretty text-muted-foreground text-xs\",\n separator: \"absolute overflow-hidden rounded-full bg-border\",\n separatorFill: \"block size-full bg-primary transition-transform duration-slow ease-drawer motion-reduce-fade\",\n },\n variants: {\n layout: {\n bars: {\n root: \"gap-1.5\",\n item: \"min-w-0 flex-1 flex-col items-stretch\",\n trigger: \"w-full flex-col gap-2 items-stretch text-left\",\n title: \"truncate text-muted-foreground/60 group-data-[state=completed]/step:text-muted-foreground\",\n },\n row: {\n item: \"min-w-0 flex-1 flex-col items-center\",\n trigger: \"flex-col items-center gap-2 text-center\",\n title: \"text-muted-foreground group-data-[state=completed]/step:text-foreground\",\n separator: \"top-[calc(var(--step-size)/2)] left-[calc(50%+var(--step-size)/2)] h-0.5 w-[calc(100%-var(--step-size))] -translate-y-1/2\",\n separatorFill: \"origin-left scale-x-0 group-data-[state=completed]/step:scale-x-100\",\n },\n column: {\n root: \"flex-col\",\n item: \"flex-row items-start gap-3 [&:not(:last-child)]:min-h-[calc(var(--step-size)+2rem)]\",\n trigger: \"flex-row items-start gap-3 text-left\",\n title: \"pt-1 text-muted-foreground group-data-[state=completed]/step:text-foreground\",\n separator: \"left-[calc(var(--step-size)/2)] top-[calc(var(--step-size)+0.25rem)] bottom-1 w-0.5 -translate-x-1/2\",\n separatorFill: \"origin-top scale-y-0 group-data-[state=completed]/step:scale-y-100\",\n },\n },\n variant: {\n // A progress bar over each label; the glyph is hidden and the fill sweeps in.\n bars: {\n indicator: [\n \"h-1 w-full overflow-hidden border-0 ring-0 bg-[color-mix(in_oklab,var(--foreground)_6%,transparent)] [&>*]:hidden\",\n \"after:absolute after:inset-0 after:origin-left after:scale-x-0 after:rounded-full after:bg-foreground after:content-['']\",\n \"after:transition-transform after:duration-slow after:ease-drawer\",\n \"motion-reduce:after:transition-[opacity,color,background-color,border-color] motion-reduce:after:duration-reduced motion-reduce:after:ease-linear\",\n \"group-data-[state=active]/step:after:scale-x-100 group-data-[state=completed]/step:after:scale-x-100\",\n \"group-data-[loading]/step:after:animate-pulse group-focus-visible/trigger:outline-offset-4\",\n ],\n },\n // A ringed circle with a soft halo on the active step.\n outline: {\n indicator: [\n \"border-2 border-border bg-background group-focus-visible/trigger:outline-offset-2\",\n \"group-data-[state=active]/step:border-primary group-data-[state=active]/step:text-primary group-data-[state=active]/step:ring-4\",\n \"group-data-[state=completed]/step:border-primary group-data-[state=completed]/step:bg-primary\",\n ],\n },\n // Flat fills in every state.\n solid: {\n indicator: [\n \"bg-muted group-focus-visible/trigger:outline-offset-2\",\n \"group-data-[state=active]/step:bg-primary group-data-[state=active]/step:text-primary-foreground\",\n \"group-data-[state=completed]/step:bg-primary\",\n ],\n },\n },\n density: {\n comfortable: { root: \"[--step-size:1.75rem]\", indicator: \"text-sm [&_svg]:size-4\", title: \"text-sm\" },\n compact: { root: \"[--step-size:1.5rem]\", indicator: \"text-xs [&_svg]:size-3.5\", title: \"text-xs\" },\n },\n },\n defaultVariants: { layout: \"bars\", variant: \"bars\", density: \"compact\" },\n})\n\ninterface StepperContextValue {\n value: number\n select: (step: number) => void\n variant: StepperVariant\n layout: Layout\n density: Density\n}\n\nconst StepperContext = React.createContext<StepperContextValue | null>(null)\nconst StepperItemContext = React.createContext<{ step: number; state: \"completed\" | \"active\" | \"inactive\"; disabled: boolean; loading: boolean } | null>(\n null,\n)\n\nfunction useStepper(consumer: string) {\n const context = React.useContext(StepperContext)\n if (!context) throw new Error(`\\`${consumer}\\` must be used within \\`Stepper\\``)\n return context\n}\n\nfunction useStepperItem(consumer: string) {\n const context = React.useContext(StepperItemContext)\n if (!context) throw new Error(`\\`${consumer}\\` must be used within \\`StepperItem\\``)\n return context\n}\n\nconst useSlots = () => {\n const { layout, variant, density } = useStepper(\"Stepper part\")\n return stepperVariants({ layout, variant, density })\n}\n\nexport interface StepperProps extends Omit<React.ComponentProps<\"div\">, \"onChange\" | \"defaultValue\"> {\n /** The active step (1-based), controlled. */\n value?: number\n /** The initial active step (1-based), uncontrolled. */\n defaultValue?: number\n /** Fires when a StepperTrigger selects its step. */\n onValueChange?: (step: number) => void\n /** bars (horizontal only; a vertical stepper falls back to outline), outline or solid. */\n variant?: StepperVariant\n orientation?: StepperOrientation\n /** Indicator size (28 or 24px) and text tier. Inherits the nearest DensityProvider when omitted. */\n density?: Density\n}\n\n/** The root: holds the active step and renders a <div role=\"group\">. */\nexport function Stepper({\n value,\n defaultValue = 1,\n onValueChange,\n variant: variantProp = \"bars\",\n orientation = \"horizontal\",\n density: densityProp,\n className,\n ...props\n}: StepperProps) {\n const density = useDensity(densityProp)\n const [active, setActive] = useControllableState({ prop: value, defaultProp: defaultValue, onChange: onValueChange })\n const variant: StepperVariant = variantProp === \"bars\" && orientation === \"vertical\" ? \"outline\" : variantProp\n const layout: Layout = variant === \"bars\" ? \"bars\" : orientation === \"vertical\" ? \"column\" : \"row\"\n const slots = stepperVariants({ layout, variant, density })\n return (\n <StepperContext.Provider value={{ value: active, select: setActive, variant, layout, density }}>\n <div\n role=\"group\"\n data-slot=\"stepper\"\n data-orientation={orientation}\n data-variant={variant}\n className={slots.root({ className })}\n {...props}\n />\n </StepperContext.Provider>\n )\n}\n\nexport interface StepperItemProps extends React.ComponentProps<\"div\"> {\n /** This step's 1-based position. */\n step: number\n /** Forces the completed state regardless of the active step, for non-linear flows. */\n completed?: boolean\n /** Blocks selection through the trigger and mutes the step. */\n disabled?: boolean\n /** Swaps the indicator glyph for a Spinner (on bars, the fill pulses). */\n loading?: boolean\n}\n\n/** One step: completed before the active one, active when equal, inactive after. */\nexport function StepperItem({ step, completed, disabled = false, loading = false, className, ...props }: StepperItemProps) {\n const ctx = useStepper(\"StepperItem\")\n const slots = useSlots()\n const state = completed || step < ctx.value ? \"completed\" : step === ctx.value ? \"active\" : \"inactive\"\n return (\n <StepperItemContext.Provider value={{ step, state, disabled, loading }}>\n <div\n data-slot=\"stepper-item\"\n data-state={state}\n data-disabled={disabled || undefined}\n data-loading={loading || undefined}\n className={slots.item({ className })}\n {...props}\n />\n </StepperItemContext.Provider>\n )\n}\n\nexport interface StepperTriggerProps extends React.ComponentProps<\"button\"> {\n asChild?: boolean\n /** Kept for compatibility; controls no longer scale on press. */\n static?: boolean\n}\n\n/** The clickable region that selects its step; omit it for a read-only progress indicator. */\nexport function StepperTrigger({ asChild = false, static: _static, className, onClick, disabled, ...props }: StepperTriggerProps) {\n void _static\n const ctx = useStepper(\"StepperTrigger\")\n const item = useStepperItem(\"StepperTrigger\")\n const slots = useSlots()\n const Comp = asChild ? Slot.Root : \"button\"\n return (\n <Comp\n type={asChild ? undefined : \"button\"}\n data-slot=\"stepper-trigger\"\n aria-current={item.state === \"active\" ? \"step\" : undefined}\n disabled={disabled ?? item.disabled}\n className={slots.trigger({ className })}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (!event.defaultPrevented && !item.disabled) ctx.select(item.step)\n }}\n {...props}\n />\n )\n}\n\n/** The numbered circle; the number morphs into a check on completion, and a spinner shows while loading. */\nexport function StepperIndicator({ className, children, ...props }: React.ComponentProps<\"span\">) {\n const item = useStepperItem(\"StepperIndicator\")\n const slots = useSlots()\n return (\n <span data-slot=\"stepper-indicator\" className={slots.indicator({ className })} {...props}>\n {item.loading ? (\n <Spinner aria-hidden />\n ) : (\n <span className={slots.glyph()}>\n <span aria-hidden className={slots.number()}>\n {children ?? item.step}\n </span>\n <Check weight=\"bold\" aria-hidden className={slots.check()} />\n </span>\n )}\n </span>\n )\n}\n\n/** The step's label, which turns to full ink once active or completed. */\nexport function StepperTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"stepper-title\" className={useSlots().title({ className })} {...props} />\n}\n\n/** A muted secondary line under the title. */\nexport function StepperDescription({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"stepper-description\" className={useSlots().description({ className })} {...props} />\n}\n\n/** The connector to the next step, last in every item but the last; it fills when the step completes. */\nexport function StepperSeparator({ className, ...props }: React.ComponentProps<\"div\">) {\n const slots = useSlots()\n return (\n <div data-slot=\"stepper-separator\" aria-hidden className={slots.separator({ className })} {...props}>\n <span className={slots.separatorFill()} />\n </div>\n )\n}\n\nconst StepperPanelsContext = React.createContext<number | null>(null)\n\nexport interface StepperPanelsProps extends React.ComponentProps<\"div\"> {\n /** The step on show. Pass the same value as the Stepper. */\n value: number\n}\n\nconst FOCUSABLE = 'input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [href], [tabindex]:not([tabindex=\"-1\"])'\n\n/**\n * The viewport for the step bodies, a sibling of the Stepper. Its height tweens to the incoming step\n * and the new body slides in from the side you travelled; when the change drops focus, it lands on\n * the new step's first control.\n */\nexport function StepperPanels({ value, className, children, ...props }: StepperPanelsProps) {\n const boxRef = React.useRef<HTMLDivElement>(null)\n const contentRef = React.useRef<HTMLDivElement>(null)\n useMorphBox({\n box: boxRef,\n content: contentRef,\n key: value,\n order: value,\n onChange: () => {\n // Only when focus fell out with the old panel (to the body), never away from the stepper itself.\n const active = document.activeElement\n if (active && active !== document.body && document.contains(active)) return\n contentRef.current?.querySelector<HTMLElement>(FOCUSABLE)?.focus({ preventScroll: true })\n },\n })\n return (\n <StepperPanelsContext.Provider value={value}>\n <div ref={boxRef} data-slot=\"stepper-panels\" className={cn(\"overflow-hidden\", className)} {...props}>\n <div ref={contentRef}>{children}</div>\n </div>\n </StepperPanelsContext.Provider>\n )\n}\n\nexport interface StepperPanelProps extends React.ComponentProps<\"div\"> {\n /** The 1-based step this body belongs to. */\n step: number\n}\n\n/** One step's body, rendered only while its step is on show. Keep field values in your own state. */\nexport function StepperPanel({ step, className, ...props }: StepperPanelProps) {\n const value = React.useContext(StepperPanelsContext)\n if (value !== step) return null\n return <div data-slot=\"stepper-panel\" className={className} {...props} />\n}\n"],"mappings":";AAiLM,cAgFE,YAhFF;AA/KN,YAAY,WAAW;AACvB,SAAS,aAAa;AACtB,SAAS,YAAY;AAErB,SAAS,4BAA4B;AACrC,SAAS,eAAe;AACxB,SAAS,kBAAgC;AACzC,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB,SAAS,UAAU;AAcnB,MAAM,MAAM;AAEL,MAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,IACF,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,IACP,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,IACP,aAAa;AAAA,IACb,WAAW;AAAA,IACX,eAAe;AAAA,EACjB;AAAA,EACA,UAAU;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S,GAAI,GAAG,OAC5F,8BAAC,SAAI,KAAK,YAAa,UAAS,GAClC,GACF;AAEJ;AAQO,SAAS,aAAa,EAAE,MAAM,WAAW,GAAG,MAAM,GAAsB;AAC7E,QAAM,QAAQ,MAAM,WAAW,oBAAoB;AACnD,MAAI,UAAU,KAAM,QAAO;AAC3B,SAAO,oBAAC,SAAI,aAAU,iBAAgB,WAAuB,GAAG,OAAO;AACzE;","names":[]}
@@ -0,0 +1,9 @@
1
+ import { Steps, Step, StepTitle, StepContent, stepsVariants } from "./steps.mjs";
2
+ export {
3
+ Step,
4
+ StepContent,
5
+ StepTitle,
6
+ Steps,
7
+ stepsVariants
8
+ };
9
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/steps/index.ts"],"sourcesContent":["export { Steps, Step, StepTitle, StepContent, stepsVariants, type StepsProps, type StepTitleProps } from \"./steps.mjs\"\n"],"mappings":"AAAA,SAAS,OAAO,MAAM,WAAW,aAAa,qBAA2D;","names":[]}
@@ -0,0 +1,70 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { tv } from "../../../lib/tv.mjs";
3
+ const stepsVariants = tv({
4
+ slots: {
5
+ root: "flex min-w-0 list-none flex-col p-0 [counter-reset:atoms-step]",
6
+ step: [
7
+ "relative min-w-0 scroll-mt-24 pb-(--steps-gap) pl-[calc(var(--steps-marker)+--spacing(3))] last:pb-0 [counter-increment:atoms-step]",
8
+ // The rail, from under the marker down to the next step; the last step has none.
9
+ "before:absolute before:top-[calc(var(--steps-marker)+--spacing(1.5))] before:bottom-1.5 before:left-[calc(var(--steps-marker)/2)]",
10
+ "before:w-0.5 before:-translate-x-1/2 before:rounded-full before:bg-foreground/10 last:before:hidden"
11
+ ],
12
+ marker: [
13
+ "absolute top-0 left-0 inline-flex size-(--steps-marker) items-center justify-center rounded-full bg-foreground/8",
14
+ "text-xs leading-none font-medium text-foreground tabular-nums select-none before:content-[counter(atoms-step)]"
15
+ ],
16
+ title: "text-(length:--steps-title) leading-(--steps-title-lh) font-medium text-balance text-foreground",
17
+ content: "mt-2 flex min-w-0 flex-col gap-(--steps-stack) text-(length:--steps-text) leading-(--steps-leading) text-pretty text-body first:mt-0"
18
+ },
19
+ variants: {
20
+ size: {
21
+ md: {
22
+ root: [
23
+ "[--steps-gap:--spacing(8)] [--steps-marker:--spacing(6)] [--steps-stack:--spacing(4)] [--steps-title-lh:--spacing(6)]",
24
+ "[--steps-title:var(--text-base)] [--steps-text:initial] [--steps-leading:initial]"
25
+ ]
26
+ },
27
+ sm: {
28
+ root: [
29
+ "[--steps-gap:--spacing(6)] [--steps-marker:--spacing(5)] [--steps-stack:--spacing(3)] [--steps-title-lh:--spacing(5)]",
30
+ "[--steps-title:var(--text-sm)] [--steps-text:var(--text-sm)] [--steps-leading:--spacing(5)]"
31
+ ]
32
+ }
33
+ }
34
+ },
35
+ defaultVariants: { size: "md" }
36
+ });
37
+ const slots = stepsVariants();
38
+ function Steps({ size = "md", start, className, style, ...props }) {
39
+ return /* @__PURE__ */ jsx(
40
+ "ol",
41
+ {
42
+ "data-slot": "steps",
43
+ "data-size": size,
44
+ start,
45
+ className: stepsVariants({ size }).root({ className }),
46
+ style: start && start !== 1 ? { counterReset: `atoms-step ${start - 1}`, ...style } : style,
47
+ ...props
48
+ }
49
+ );
50
+ }
51
+ function Step({ className, children, ...props }) {
52
+ return /* @__PURE__ */ jsxs("li", { "data-slot": "step", className: slots.step({ className }), ...props, children: [
53
+ /* @__PURE__ */ jsx("span", { "data-slot": "step-marker", "aria-hidden": true, className: slots.marker() }),
54
+ children
55
+ ] });
56
+ }
57
+ function StepTitle({ as: Tag = "h3", className, ...props }) {
58
+ return /* @__PURE__ */ jsx(Tag, { "data-slot": "step-title", className: slots.title({ className }), ...props });
59
+ }
60
+ function StepContent({ className, ...props }) {
61
+ return /* @__PURE__ */ jsx("div", { "data-slot": "step-content", className: slots.content({ className }), ...props });
62
+ }
63
+ export {
64
+ Step,
65
+ StepContent,
66
+ StepTitle,
67
+ Steps,
68
+ stepsVariants
69
+ };
70
+ //# sourceMappingURL=steps.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/steps/steps.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { tv, type VariantProps } from \"../../../lib/tv.mjs\"\n\n/*\n * A numbered procedure for guides and docs: each step pairs a title with any content, threaded on\n * one quiet rail. The numbers come from a CSS counter on the list, so adding, removing or reordering\n * a step renumbers the rest. No state and no context: every part renders on the server.\n */\nexport const stepsVariants = tv({\n slots: {\n root: \"flex min-w-0 list-none flex-col p-0 [counter-reset:atoms-step]\",\n step: [\n \"relative min-w-0 scroll-mt-24 pb-(--steps-gap) pl-[calc(var(--steps-marker)+--spacing(3))] last:pb-0 [counter-increment:atoms-step]\",\n // The rail, from under the marker down to the next step; the last step has none.\n \"before:absolute before:top-[calc(var(--steps-marker)+--spacing(1.5))] before:bottom-1.5 before:left-[calc(var(--steps-marker)/2)]\",\n \"before:w-0.5 before:-translate-x-1/2 before:rounded-full before:bg-foreground/10 last:before:hidden\",\n ],\n marker: [\n \"absolute top-0 left-0 inline-flex size-(--steps-marker) items-center justify-center rounded-full bg-foreground/8\",\n \"text-xs leading-none font-medium text-foreground tabular-nums select-none before:content-[counter(atoms-step)]\",\n ],\n title: \"text-(length:--steps-title) leading-(--steps-title-lh) font-medium text-balance text-foreground\",\n content: \"mt-2 flex min-w-0 flex-col gap-(--steps-stack) text-(length:--steps-text) leading-(--steps-leading) text-pretty text-body first:mt-0\",\n },\n variants: {\n size: {\n md: {\n root: [\n \"[--steps-gap:--spacing(8)] [--steps-marker:--spacing(6)] [--steps-stack:--spacing(4)] [--steps-title-lh:--spacing(6)]\",\n \"[--steps-title:var(--text-base)] [--steps-text:initial] [--steps-leading:initial]\",\n ],\n },\n sm: {\n root: [\n \"[--steps-gap:--spacing(6)] [--steps-marker:--spacing(5)] [--steps-stack:--spacing(3)] [--steps-title-lh:--spacing(5)]\",\n \"[--steps-title:var(--text-sm)] [--steps-text:var(--text-sm)] [--steps-leading:--spacing(5)]\",\n ],\n },\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\nconst slots = stepsVariants()\n\nexport interface StepsProps extends React.ComponentProps<\"ol\">, VariantProps<typeof stepsVariants> {\n /** The number of the first step; applied to the list and to the markers. */\n start?: number\n}\n\n/** An <ol> that numbers its Step children with a CSS counter. */\nexport function Steps({ size = \"md\", start, className, style, ...props }: StepsProps) {\n return (\n <ol\n data-slot=\"steps\"\n data-size={size}\n start={start}\n className={stepsVariants({ size }).root({ className })}\n style={start && start !== 1 ? { counterReset: `atoms-step ${start - 1}`, ...style } : style}\n {...props}\n />\n )\n}\n\n/** An <li> with its number marker and the rail down to the next step. Give it an id to link to it. */\nexport function Step({ className, children, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li data-slot=\"step\" className={slots.step({ className })} {...props}>\n <span data-slot=\"step-marker\" aria-hidden className={slots.marker()} />\n {children}\n </li>\n )\n}\n\nexport interface StepTitleProps extends React.ComponentProps<\"h3\"> {\n /** The element to render, to fit the page outline. */\n as?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\"\n}\n\n/** The step's heading, on the marker's line. */\nexport function StepTitle({ as: Tag = \"h3\", className, ...props }: StepTitleProps) {\n return <Tag data-slot=\"step-title\" className={slots.title({ className })} {...props} />\n}\n\n/** A column for anything the step needs: paragraphs, lists, code, callouts, images. */\nexport function StepContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"step-content\" className={slots.content({ className })} {...props} />\n}\n"],"mappings":"AAsDI,cAcA,YAdA;AApDJ,SAAS,UAA6B;AAO/B,MAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,MACJ;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IAC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;","names":[]}
@@ -0,0 +1,7 @@
1
+ import { SwatchGrid, SwatchGridItem, swatchGridVariants } from "./swatch-grid.mjs";
2
+ export {
3
+ SwatchGrid,
4
+ SwatchGridItem,
5
+ swatchGridVariants
6
+ };
7
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/swatch-grid/index.ts"],"sourcesContent":["export { SwatchGrid, SwatchGridItem, swatchGridVariants, type SwatchGridProps, type SwatchGridItemProps } from \"./swatch-grid.mjs\"\n"],"mappings":"AAAA,SAAS,YAAY,gBAAgB,0BAA0E;","names":[]}
@@ -0,0 +1,110 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
5
+ import { tv } from "../../../lib/tv.mjs";
6
+ const swatchGridVariants = tv({
7
+ slots: {
8
+ root: "grid w-max gap-1.5 [--swatch:transparent]",
9
+ item: [
10
+ "relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full",
11
+ // The selection ring follows the swatch: darkened on light pages, lightened on dark ones.
12
+ "[--swatch-ring:oklch(from_var(--swatch)_min(l,0.62)_c_h_/_1)] dark:[--swatch-ring:oklch(from_var(--swatch)_max(l,0.62)_c_h_/_1)]",
13
+ "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:ring-media-edge",
14
+ "[--swatch-gap:var(--surface,var(--background))] transition-[box-shadow,scale] duration-fast ease-out motion-reduce-fade",
15
+ "data-[state=off]:hover:shadow-[inset_0_0_0_2px_oklch(from_var(--swatch-ring)_l_c_h_/_0.5)]",
16
+ "data-[state=on]:shadow-[inset_0_0_0_2px_var(--swatch-ring),inset_0_0_0_4px_var(--swatch-gap)]",
17
+ "outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-[0.3125rem] focus-visible:outline-focus",
18
+ "disabled:cursor-not-allowed disabled:opacity-40",
19
+ "[&>img]:pointer-events-none [&>img]:size-full [&>svg]:pointer-events-none [&>svg]:size-full"
20
+ ]
21
+ },
22
+ variants: {
23
+ size: {
24
+ sm: { item: "size-7 bg-[var(--swatch)]" },
25
+ md: { item: "size-8 p-[0.1875rem] bg-[var(--swatch)]" }
26
+ },
27
+ checkered: {
28
+ true: {
29
+ item: "[background-image:linear-gradient(var(--swatch),var(--swatch)),repeating-conic-gradient(var(--input)_0%_25%,transparent_0%_50%)] [background-size:auto,0.5rem_0.5rem]"
30
+ },
31
+ false: {}
32
+ }
33
+ },
34
+ defaultVariants: { size: "sm", checkered: false }
35
+ });
36
+ const SwatchGridContext = React.createContext("sm");
37
+ function rowNeighbour(root, current, direction) {
38
+ const cells = Array.from(root.querySelectorAll("[data-slot=swatch-grid-item]"));
39
+ const columns = getComputedStyle(root).gridTemplateColumns.split(" ").filter(Boolean).length || 1;
40
+ const index = cells.indexOf(current);
41
+ if (index === -1) return null;
42
+ const targetRow = Math.floor(index / columns) + direction;
43
+ const row = cells.slice(targetRow * columns, targetRow * columns + columns).filter((cell) => !cell.disabled);
44
+ if (!row.length) return null;
45
+ const x = current.getBoundingClientRect().left;
46
+ return row.reduce(
47
+ (best, cell) => Math.abs(cell.getBoundingClientRect().left - x) < Math.abs(best.getBoundingClientRect().left - x) ? cell : best
48
+ );
49
+ }
50
+ function SwatchGrid({
51
+ value,
52
+ defaultValue = "",
53
+ onValueChange,
54
+ size = "sm",
55
+ static: _static,
56
+ loop = true,
57
+ className,
58
+ onKeyDown,
59
+ ...props
60
+ }) {
61
+ void _static;
62
+ const [inner, setInner] = React.useState(defaultValue);
63
+ const current = value ?? inner;
64
+ return /* @__PURE__ */ jsx(SwatchGridContext.Provider, { value: size, children: /* @__PURE__ */ jsx(
65
+ ToggleGroupPrimitive.Root,
66
+ {
67
+ type: "single",
68
+ orientation: "horizontal",
69
+ loop,
70
+ value: current,
71
+ onValueChange: (next) => {
72
+ if (!next) return;
73
+ if (value === void 0) setInner(next);
74
+ onValueChange?.(next);
75
+ },
76
+ "data-slot": "swatch-grid",
77
+ className: swatchGridVariants().root({ className }),
78
+ onKeyDown: (event) => {
79
+ onKeyDown?.(event);
80
+ if (event.defaultPrevented || event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
81
+ const target = event.target;
82
+ if (!target.matches("[data-slot=swatch-grid-item]")) return;
83
+ const next = rowNeighbour(event.currentTarget, target, event.key === "ArrowDown" ? 1 : -1);
84
+ event.preventDefault();
85
+ next?.focus();
86
+ },
87
+ ...props
88
+ }
89
+ ) });
90
+ }
91
+ function SwatchGridItem({ label, color, checkered = false, static: _static, className, style, ...props }) {
92
+ void _static;
93
+ const size = React.useContext(SwatchGridContext);
94
+ return /* @__PURE__ */ jsx(
95
+ ToggleGroupPrimitive.Item,
96
+ {
97
+ "data-slot": "swatch-grid-item",
98
+ "aria-label": label,
99
+ className: swatchGridVariants({ size, checkered }).item({ className }),
100
+ style: color ? { "--swatch": color, ...style } : style,
101
+ ...props
102
+ }
103
+ );
104
+ }
105
+ export {
106
+ SwatchGrid,
107
+ SwatchGridItem,
108
+ swatchGridVariants
109
+ };
110
+ //# sourceMappingURL=swatch-grid.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/swatch-grid/swatch-grid.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { ToggleGroup as ToggleGroupPrimitive } from \"radix-ui\"\n\nimport { tv } from \"../../../lib/tv.mjs\"\n\n/*\n * A grid of pickable samples (a color, or a glyph over a color) of which at most one is chosen.\n * The arrows move through it in two dimensions and only a click, Enter or Space chooses, so a pick\n * with side effects never fires on a focus move.\n */\nexport const swatchGridVariants = tv({\n slots: {\n root: \"grid w-max gap-1.5 [--swatch:transparent]\",\n item: [\n \"relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full\",\n // The selection ring follows the swatch: darkened on light pages, lightened on dark ones.\n \"[--swatch-ring:oklch(from_var(--swatch)_min(l,0.62)_c_h_/_1)] dark:[--swatch-ring:oklch(from_var(--swatch)_max(l,0.62)_c_h_/_1)]\",\n \"after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:ring-media-edge\",\n \"[--swatch-gap:var(--surface,var(--background))] transition-[box-shadow,scale] duration-fast ease-out motion-reduce-fade\",\n \"data-[state=off]:hover:shadow-[inset_0_0_0_2px_oklch(from_var(--swatch-ring)_l_c_h_/_0.5)]\",\n \"data-[state=on]:shadow-[inset_0_0_0_2px_var(--swatch-ring),inset_0_0_0_4px_var(--swatch-gap)]\",\n \"outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-[0.3125rem] focus-visible:outline-focus\",\n \"disabled:cursor-not-allowed disabled:opacity-40\",\n \"[&>img]:pointer-events-none [&>img]:size-full [&>svg]:pointer-events-none [&>svg]:size-full\",\n ],\n },\n variants: {\n size: {\n sm: { item: \"size-7 bg-[var(--swatch)]\" },\n md: { item: \"size-8 p-[0.1875rem] bg-[var(--swatch)]\" },\n },\n checkered: {\n true: {\n item: \"[background-image:linear-gradient(var(--swatch),var(--swatch)),repeating-conic-gradient(var(--input)_0%_25%,transparent_0%_50%)] [background-size:auto,0.5rem_0.5rem]\",\n },\n false: {},\n },\n },\n defaultVariants: { size: \"sm\", checkered: false },\n})\n\nconst SwatchGridContext = React.createContext<\"sm\" | \"md\">(\"sm\")\n\nexport interface SwatchGridProps\n extends Omit<React.ComponentProps<typeof ToggleGroupPrimitive.Root>, \"type\" | \"value\" | \"defaultValue\" | \"onValueChange\" | \"orientation\"> {\n /** The chosen cell's value; \"\" for none. */\n value?: string\n /** The chosen cell when uncontrolled. */\n defaultValue?: string\n /** Called with the newly chosen cell, never with \"\": pressing the chosen cell again keeps it. */\n onValueChange?: (value: string) => void\n /** sm (1.75rem) for colors, md (2rem, the glyph inset 0.1875rem) for glyphs. */\n size?: \"sm\" | \"md\"\n /** Kept for compatibility; controls no longer scale on press. */\n static?: boolean\n}\n\n/** The cell in the row above or below the focused one, nearest by position, skipping disabled cells. */\nfunction rowNeighbour(root: HTMLElement, current: HTMLElement, direction: 1 | -1) {\n const cells = Array.from(root.querySelectorAll<HTMLButtonElement>(\"[data-slot=swatch-grid-item]\"))\n const columns = getComputedStyle(root).gridTemplateColumns.split(\" \").filter(Boolean).length || 1\n const index = cells.indexOf(current as HTMLButtonElement)\n if (index === -1) return null\n const targetRow = Math.floor(index / columns) + direction\n const row = cells.slice(targetRow * columns, targetRow * columns + columns).filter((cell) => !cell.disabled)\n if (!row.length) return null\n const x = current.getBoundingClientRect().left\n return row.reduce((best, cell) =>\n Math.abs(cell.getBoundingClientRect().left - x) < Math.abs(best.getBoundingClientRect().left - x) ? cell : best,\n )\n}\n\n/** Radix ToggleGroup (single), laid out as a CSS grid; set the columns with className (grid-cols-8). */\nexport function SwatchGrid({\n value,\n defaultValue = \"\",\n onValueChange,\n size = \"sm\",\n static: _static,\n loop = true,\n className,\n onKeyDown,\n ...props\n}: SwatchGridProps) {\n void _static // accepted for compatibility\n const [inner, setInner] = React.useState(defaultValue)\n const current = value ?? inner\n\n return (\n <SwatchGridContext.Provider value={size}>\n <ToggleGroupPrimitive.Root\n type=\"single\"\n orientation=\"horizontal\"\n loop={loop}\n value={current}\n onValueChange={(next) => {\n // Pressing the chosen cell again keeps it: the grid never empties by accident.\n if (!next) return\n if (value === undefined) setInner(next)\n onValueChange?.(next)\n }}\n data-slot=\"swatch-grid\"\n className={swatchGridVariants().root({ className })}\n onKeyDown={(event) => {\n onKeyDown?.(event)\n if (event.defaultPrevented || (event.key !== \"ArrowUp\" && event.key !== \"ArrowDown\")) return\n const target = event.target as HTMLElement\n if (!target.matches(\"[data-slot=swatch-grid-item]\")) return\n const next = rowNeighbour(event.currentTarget, target, event.key === \"ArrowDown\" ? 1 : -1)\n event.preventDefault()\n next?.focus()\n }}\n {...props}\n />\n </SwatchGridContext.Provider>\n )\n}\n\nexport interface SwatchGridItemProps extends Omit<React.ComponentProps<typeof ToggleGroupPrimitive.Item>, \"color\"> {\n /** The accessible name: a swatch carries no visible text. */\n label: string\n /** The fill: any CSS color, set as --swatch. Without it, no fill. */\n color?: string\n /** Lays a checkerboard under the color, so a translucent one reads as translucent, not dim. */\n checkered?: boolean\n /** Kept for compatibility; controls no longer scale on press. */\n static?: boolean\n}\n\n/** One cell: a Radix ToggleGroup.Item (role=\"radio\"); children are a glyph sized to the cell. */\nexport function SwatchGridItem({ label, color, checkered = false, static: _static, className, style, ...props }: SwatchGridItemProps) {\n void _static\n const size = React.useContext(SwatchGridContext)\n return (\n <ToggleGroupPrimitive.Item\n data-slot=\"swatch-grid-item\"\n aria-label={label}\n className={swatchGridVariants({ size, checkered }).item({ className })}\n style={color ? ({ \"--swatch\": color, ...style } as React.CSSProperties) : style}\n {...props}\n />\n )\n}\n"],"mappings":";AA4FM;AA1FN,YAAY,WAAW;AACvB,SAAS,eAAe,4BAA4B;AAEpD,SAAS,UAAU;AAOZ,MAAM,qBAAqB,GAAG;AAAA,EACnC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,MACJ;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI,EAAE,MAAM,4BAA4B;AAAA,MACxC,IAAI,EAAE,MAAM,0CAA0C;AAAA,IACxD;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,MACA,OAAO,CAAC;AAAA,IACV;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,MAAM,MAAM,WAAW,MAAM;AAClD,CAAC;AAED,MAAM,oBAAoB,MAAM,cAA2B,IAAI;AAiB/D,SAAS,aAAa,MAAmB,SAAsB,WAAmB;AAChF,QAAM,QAAQ,MAAM,KAAK,KAAK,iBAAoC,8BAA8B,CAAC;AACjG,QAAM,UAAU,iBAAiB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,QAAQ,YAAc;AACtF,cAAM,SAAS,MAAM;AACrB,YAAI,CAAC,OAAO,QAAQ,8BAA8B,EAAG;AACrD,cAAM,OAAO,aAAa,MAAM,eAAe,QAAQ,MAAM,QAAQ,cAAc,IAAI,EAAE;AACzF,cAAM,eAAe;AACrB,cAAM,MAAM;AAAA,MACd;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAcO,SAAS,eAAe,EAAE,OAAO,OAAO,YAAY,OAAO,QAAQ,SAAS,WAAW,OAAO,GAAG,MAAM,GAAwB;AACpI,OAAK;AACL,QAAM,OAAO,MAAM,WAAW,iBAAiB;AAC/C,SACE;AAAA,IAAC,qBAAqB;AAAA,IAArB;AAAA,MACC,aAAU;AAAA,MACV,cAAY;AAAA,MACZ,WAAW,mBAAmB,EAAE,MAAM,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC;AAAA,MACrE,OAAO,QAAS,EAAE,YAAY,OAAO,GAAG,MAAM,IAA4B;AAAA,MACzE,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,7 @@
1
+ import { Switch, SwitchIndicator, switchVariants } from "./switch.mjs";
2
+ export {
3
+ Switch,
4
+ SwitchIndicator,
5
+ switchVariants
6
+ };
7
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/switch/index.ts"],"sourcesContent":["export { Switch, SwitchIndicator, switchVariants, type SwitchProps, type SwitchIndicatorProps } from \"./switch.mjs\"\n"],"mappings":"AAAA,SAAS,QAAQ,iBAAiB,sBAAmE;","names":[]}
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Switch as SwitchPrimitive } from "radix-ui";
4
+ import { cn } from "../../../lib/utils.mjs";
5
+ import { tv } from "../../../lib/tv.mjs";
6
+ import { useFieldContext } from "../../../lib/field-context.mjs";
7
+ import { hitX } from "../../../lib/hit-area.mjs";
8
+ import { usePulse } from "../../../lib/pulse.mjs";
9
+ const switchVariants = tv({
10
+ slots: {
11
+ root: [
12
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full p-0.5",
13
+ "h-5 w-9",
14
+ hitX,
15
+ "transition-colors duration-fast ease-out",
16
+ "outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background",
17
+ "bg-input data-[state=checked]:bg-primary",
18
+ "disabled:cursor-not-allowed disabled:opacity-50"
19
+ ],
20
+ thumb: [
21
+ "pointer-events-none block size-4 rounded-full bg-background shadow-sm",
22
+ "transition-transform duration-fast ease-out",
23
+ "data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-4"
24
+ ]
25
+ }
26
+ });
27
+ function Switch({
28
+ className,
29
+ static: isStatic = false,
30
+ id,
31
+ disabled,
32
+ onCheckedChange,
33
+ "aria-describedby": ariaDescribedBy,
34
+ ...props
35
+ }) {
36
+ const { root, thumb } = switchVariants();
37
+ const field = useFieldContext();
38
+ const [pulse, firePulse] = usePulse({ slot: "switch-pulse", edge: "flush" });
39
+ return /* @__PURE__ */ jsxs(
40
+ SwitchPrimitive.Root,
41
+ {
42
+ "data-slot": "switch",
43
+ id: id ?? field?.id,
44
+ disabled: disabled ?? field?.disabled,
45
+ "aria-describedby": ariaDescribedBy ?? field?.describedBy,
46
+ className: root({ className: cn(isStatic && "active:scale-100", className) }),
47
+ onCheckedChange: (next) => {
48
+ if (next) firePulse();
49
+ onCheckedChange?.(next);
50
+ },
51
+ ...props,
52
+ children: [
53
+ /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: thumb() }),
54
+ pulse
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ function SwitchIndicator({ checked, className, ...props }) {
60
+ const { root, thumb } = switchVariants();
61
+ const state = checked ? "checked" : "unchecked";
62
+ return /* @__PURE__ */ jsx(
63
+ "span",
64
+ {
65
+ "aria-hidden": true,
66
+ "data-slot": "switch-indicator",
67
+ "data-state": state,
68
+ className: root({ className: cn("pointer-events-none active:scale-100", className) }),
69
+ ...props,
70
+ children: /* @__PURE__ */ jsx("span", { "data-state": state, className: thumb() })
71
+ }
72
+ );
73
+ }
74
+ export {
75
+ Switch,
76
+ SwitchIndicator,
77
+ switchVariants
78
+ };
79
+ //# sourceMappingURL=switch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/switch/switch.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Switch as SwitchPrimitive } from \"radix-ui\"\n\nimport { cn } from \"../../../lib/utils.mjs\"\nimport { tv } from \"../../../lib/tv.mjs\"\nimport { useFieldContext } from \"../../../lib/field-context.mjs\"\nimport { hitX } from \"../../../lib/hit-area.mjs\"\nimport { usePulse } from \"../../../lib/pulse.mjs\"\n\nexport const switchVariants = tv({\n slots: {\n root: [\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full p-0.5\",\n \"h-5 w-9\",\n hitX,\n \"transition-colors duration-fast ease-out\",\n \"outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"bg-input data-[state=checked]:bg-primary\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n ],\n thumb: [\n \"pointer-events-none block size-4 rounded-full bg-background shadow-sm\",\n \"transition-transform duration-fast ease-out\",\n \"data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-4\",\n ],\n },\n})\n\nexport interface SwitchProps extends React.ComponentProps<typeof SwitchPrimitive.Root> {\n static?: boolean\n}\n\nexport function Switch({\n className,\n static: isStatic = false,\n id,\n disabled,\n onCheckedChange,\n \"aria-describedby\": ariaDescribedBy,\n ...props\n}: SwitchProps) {\n const { root, thumb } = switchVariants()\n const field = useFieldContext()\n const [pulse, firePulse] = usePulse({ slot: \"switch-pulse\", edge: \"flush\" })\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n id={id ?? field?.id}\n disabled={disabled ?? field?.disabled}\n aria-describedby={ariaDescribedBy ?? field?.describedBy}\n className={root({ className: cn(isStatic && \"active:scale-100\", className) })}\n onCheckedChange={(next) => {\n if (next) firePulse()\n onCheckedChange?.(next)\n }}\n {...props}\n >\n <SwitchPrimitive.Thumb data-slot=\"switch-thumb\" className={thumb()} />\n {pulse}\n </SwitchPrimitive.Root>\n )\n}\n\nexport interface SwitchIndicatorProps extends React.ComponentProps<\"span\"> {\n checked: boolean\n}\n\nexport function SwitchIndicator({ checked, className, ...props }: SwitchIndicatorProps) {\n const { root, thumb } = switchVariants()\n const state = checked ? \"checked\" : \"unchecked\"\n return (\n <span\n aria-hidden\n data-slot=\"switch-indicator\"\n data-state={state}\n className={root({ className: cn(\"pointer-events-none active:scale-100\", className) })}\n {...props}\n >\n <span data-state={state} className={thumb()} />\n </span>\n )\n}\n"],"mappings":";AA+CI,SAYE,KAZF;AA5CJ,SAAS,UAAU,uBAAuB;AAE1C,SAAS,UAAU;AACnB,SAAS,UAAU;AACnB,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,gBAAgB;AAElB,MAAM,iBAAiB,GAAG;AAAA,EAC/B,OAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAMM,SAAS,OAAO;AAAA,EACrB;AAAA,EACA,QAAQ,WAAW;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB,GAAG;AACL,GAAgB;AACd,QAAM,EAAE,MAAM,MAAM,IAAI,eAAe;AACvC,QAAM,QAAQ,gBAAgB;AAC9B,QAAM,CAAC,OAAO,SAAS,IAAI,SAAS,EAAE,MAAM,gBAAgB,MAAM,QAAQ,CAAC;AAC3E,SACE;AAAA,IAAC,gBAAg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