velvetkit 0.2.2 → 0.3.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 (292) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -7
  3. data/lib/generators/velvetkit/add/add_generator.rb +19 -0
  4. data/lib/generators/velvetkit/helpers.rb +29 -2
  5. data/lib/generators/velvetkit/icons/icons_generator.rb +71 -0
  6. data/lib/generators/velvetkit/install/install_generator.rb +9 -12
  7. data/lib/velvetkit/icons.rb +148 -0
  8. data/lib/velvetkit/registry.rb +5 -2
  9. data/lib/velvetkit/version.rb +1 -1
  10. data/lib/velvetkit.rb +1 -0
  11. data/registry/app/components/ui/alert.rb +1 -1
  12. data/registry/app/components/ui/confirm_dialog.html.erb +13 -0
  13. data/registry/app/components/ui/confirm_dialog.rb +55 -0
  14. data/registry/app/components/ui/empty_state.html.erb +20 -0
  15. data/registry/app/components/ui/empty_state.rb +46 -0
  16. data/registry/app/components/ui/icon.html.erb +1 -1
  17. data/registry/app/components/ui/icon.rb +80 -8
  18. data/registry/app/components/ui/password_input.html.erb +1 -1
  19. data/registry/app/components/ui/stepper/step.html.erb +27 -0
  20. data/registry/app/components/ui/stepper/step.rb +213 -0
  21. data/registry/app/components/ui/stepper.html.erb +19 -0
  22. data/registry/app/components/ui/stepper.rb +145 -0
  23. data/registry/app/components/ui/theme_toggle.rb +2 -4
  24. data/registry/app/components/ui/toast.rb +6 -6
  25. data/registry/app/components/ui/toggle_group/item.html.erb +1 -0
  26. data/registry/app/components/ui/toggle_group/item.rb +85 -0
  27. data/registry/app/components/ui/toggle_group.html.erb +1 -0
  28. data/registry/app/components/ui/toggle_group.rb +79 -0
  29. data/registry/app/javascript/controllers/ui/confirm_dialog_controller.ts +110 -0
  30. data/registry/app/javascript/controllers/ui/stepper_controller.ts +187 -0
  31. data/registry/components.yml +9 -2
  32. data/registry/config/locales/velvetkit.en.yml +11 -0
  33. data/registry/docs/agents.md +7 -4
  34. data/registry/icons/lucide/LICENSE +39 -0
  35. data/registry/icons/lucide/align-center.svg +17 -0
  36. data/registry/icons/lucide/align-left.svg +17 -0
  37. data/registry/icons/lucide/align-right.svg +17 -0
  38. data/registry/icons/lucide/arrow-left.svg +16 -0
  39. data/registry/icons/lucide/arrow-right.svg +16 -0
  40. data/registry/icons/lucide/badge-check.svg +16 -0
  41. data/registry/icons/lucide/bar-chart-3.svg +18 -0
  42. data/registry/icons/lucide/bell.svg +16 -0
  43. data/registry/icons/lucide/bold.svg +15 -0
  44. data/registry/icons/lucide/book-open.svg +16 -0
  45. data/registry/icons/lucide/calendar.svg +18 -0
  46. data/registry/icons/lucide/chart-column.svg +18 -0
  47. data/registry/icons/lucide/check.svg +15 -0
  48. data/registry/icons/lucide/chevron-down.svg +15 -0
  49. data/registry/icons/lucide/chevron-left.svg +15 -0
  50. data/registry/icons/lucide/chevron-right.svg +15 -0
  51. data/registry/icons/lucide/chevrons-up-down.svg +16 -0
  52. data/registry/icons/lucide/circle-alert.svg +17 -0
  53. data/registry/icons/lucide/circle-check.svg +16 -0
  54. data/registry/icons/lucide/cloud.svg +15 -0
  55. data/registry/icons/lucide/credit-card.svg +16 -0
  56. data/registry/icons/lucide/ellipsis-vertical.svg +17 -0
  57. data/registry/icons/lucide/ellipsis.svg +17 -0
  58. data/registry/icons/lucide/eye-off.svg +18 -0
  59. data/registry/icons/lucide/eye.svg +16 -0
  60. data/registry/icons/lucide/file-text.svg +19 -0
  61. data/registry/icons/lucide/folder-kanban.svg +18 -0
  62. data/registry/icons/lucide/git-branch.svg +18 -0
  63. data/registry/icons/lucide/globe.svg +17 -0
  64. data/registry/icons/lucide/graduation-cap.svg +17 -0
  65. data/registry/icons/lucide/grip-vertical.svg +20 -0
  66. data/registry/icons/lucide/home.svg +16 -0
  67. data/registry/icons/lucide/inbox.svg +16 -0
  68. data/registry/icons/lucide/info.svg +17 -0
  69. data/registry/icons/lucide/italic.svg +17 -0
  70. data/registry/icons/lucide/layout-dashboard.svg +18 -0
  71. data/registry/icons/lucide/layout-grid.svg +18 -0
  72. data/registry/icons/lucide/life-buoy.svg +20 -0
  73. data/registry/icons/lucide/list.svg +20 -0
  74. data/registry/icons/lucide/loader.svg +22 -0
  75. data/registry/icons/lucide/lock.svg +16 -0
  76. data/registry/icons/lucide/log-out.svg +17 -0
  77. data/registry/icons/lucide/mail.svg +16 -0
  78. data/registry/icons/lucide/menu.svg +17 -0
  79. data/registry/icons/lucide/message-circle.svg +15 -0
  80. data/registry/icons/lucide/monitor.svg +17 -0
  81. data/registry/icons/lucide/moon.svg +15 -0
  82. data/registry/icons/lucide/newspaper.svg +18 -0
  83. data/registry/icons/lucide/panel-left.svg +16 -0
  84. data/registry/icons/lucide/plus.svg +16 -0
  85. data/registry/icons/lucide/qr-code.svg +26 -0
  86. data/registry/icons/lucide/rocket.svg +18 -0
  87. data/registry/icons/lucide/rotate-cw.svg +16 -0
  88. data/registry/icons/lucide/search.svg +16 -0
  89. data/registry/icons/lucide/settings.svg +16 -0
  90. data/registry/icons/lucide/shield-check.svg +16 -0
  91. data/registry/icons/lucide/shield.svg +15 -0
  92. data/registry/icons/lucide/store.svg +17 -0
  93. data/registry/icons/lucide/sun.svg +23 -0
  94. data/registry/icons/lucide/trash-2.svg +19 -0
  95. data/registry/icons/lucide/underline.svg +16 -0
  96. data/registry/icons/lucide/upload.svg +17 -0
  97. data/registry/icons/lucide/user.svg +16 -0
  98. data/registry/icons/lucide/users.svg +18 -0
  99. data/registry/icons/lucide/workflow.svg +17 -0
  100. data/registry/icons/lucide/x.svg +16 -0
  101. data/registry/icons/phosphor/LICENSE +21 -0
  102. data/registry/icons/phosphor/arrow-clockwise.svg +2 -0
  103. data/registry/icons/phosphor/arrow-left.svg +2 -0
  104. data/registry/icons/phosphor/arrow-right.svg +2 -0
  105. data/registry/icons/phosphor/bell.svg +2 -0
  106. data/registry/icons/phosphor/book-open.svg +2 -0
  107. data/registry/icons/phosphor/calendar-blank.svg +2 -0
  108. data/registry/icons/phosphor/caret-down.svg +2 -0
  109. data/registry/icons/phosphor/caret-left.svg +2 -0
  110. data/registry/icons/phosphor/caret-right.svg +2 -0
  111. data/registry/icons/phosphor/caret-up-down.svg +2 -0
  112. data/registry/icons/phosphor/chart-bar.svg +2 -0
  113. data/registry/icons/phosphor/chat-circle.svg +2 -0
  114. data/registry/icons/phosphor/check-circle.svg +2 -0
  115. data/registry/icons/phosphor/check.svg +2 -0
  116. data/registry/icons/phosphor/cloud.svg +2 -0
  117. data/registry/icons/phosphor/credit-card.svg +2 -0
  118. data/registry/icons/phosphor/desktop.svg +2 -0
  119. data/registry/icons/phosphor/dots-six-vertical.svg +2 -0
  120. data/registry/icons/phosphor/dots-three-vertical.svg +2 -0
  121. data/registry/icons/phosphor/dots-three.svg +2 -0
  122. data/registry/icons/phosphor/envelope.svg +2 -0
  123. data/registry/icons/phosphor/eye-slash.svg +2 -0
  124. data/registry/icons/phosphor/eye.svg +2 -0
  125. data/registry/icons/phosphor/file-text.svg +2 -0
  126. data/registry/icons/phosphor/flow-arrow.svg +2 -0
  127. data/registry/icons/phosphor/gear.svg +2 -0
  128. data/registry/icons/phosphor/git-branch.svg +2 -0
  129. data/registry/icons/phosphor/globe.svg +2 -0
  130. data/registry/icons/phosphor/graduation-cap.svg +2 -0
  131. data/registry/icons/phosphor/grid-four.svg +2 -0
  132. data/registry/icons/phosphor/house.svg +2 -0
  133. data/registry/icons/phosphor/info.svg +2 -0
  134. data/registry/icons/phosphor/kanban.svg +2 -0
  135. data/registry/icons/phosphor/lifebuoy.svg +2 -0
  136. data/registry/icons/phosphor/list.svg +2 -0
  137. data/registry/icons/phosphor/lock.svg +2 -0
  138. data/registry/icons/phosphor/magnifying-glass.svg +2 -0
  139. data/registry/icons/phosphor/moon.svg +2 -0
  140. data/registry/icons/phosphor/newspaper.svg +2 -0
  141. data/registry/icons/phosphor/plus.svg +2 -0
  142. data/registry/icons/phosphor/qr-code.svg +2 -0
  143. data/registry/icons/phosphor/rocket.svg +2 -0
  144. data/registry/icons/phosphor/seal-check.svg +2 -0
  145. data/registry/icons/phosphor/shield-check.svg +2 -0
  146. data/registry/icons/phosphor/shield.svg +2 -0
  147. data/registry/icons/phosphor/sidebar.svg +2 -0
  148. data/registry/icons/phosphor/sign-out.svg +2 -0
  149. data/registry/icons/phosphor/spinner.svg +2 -0
  150. data/registry/icons/phosphor/squares-four.svg +2 -0
  151. data/registry/icons/phosphor/storefront.svg +2 -0
  152. data/registry/icons/phosphor/sun.svg +2 -0
  153. data/registry/icons/phosphor/text-align-center.svg +2 -0
  154. data/registry/icons/phosphor/text-align-left.svg +2 -0
  155. data/registry/icons/phosphor/text-align-right.svg +2 -0
  156. data/registry/icons/phosphor/text-b.svg +2 -0
  157. data/registry/icons/phosphor/text-italic.svg +2 -0
  158. data/registry/icons/phosphor/text-underline.svg +2 -0
  159. data/registry/icons/phosphor/trash.svg +2 -0
  160. data/registry/icons/phosphor/tray.svg +2 -0
  161. data/registry/icons/phosphor/upload-simple.svg +2 -0
  162. data/registry/icons/phosphor/user.svg +2 -0
  163. data/registry/icons/phosphor/users.svg +2 -0
  164. data/registry/icons/phosphor/warning-circle.svg +2 -0
  165. data/registry/icons/phosphor/x.svg +2 -0
  166. data/registry/icons/tabler/LICENSE +21 -0
  167. data/registry/icons/tabler/alert-circle.svg +18 -0
  168. data/registry/icons/tabler/align-center.svg +18 -0
  169. data/registry/icons/tabler/align-left.svg +18 -0
  170. data/registry/icons/tabler/align-right.svg +18 -0
  171. data/registry/icons/tabler/arrow-left.svg +18 -0
  172. data/registry/icons/tabler/arrow-right.svg +18 -0
  173. data/registry/icons/tabler/bell.svg +17 -0
  174. data/registry/icons/tabler/bold.svg +17 -0
  175. data/registry/icons/tabler/book.svg +20 -0
  176. data/registry/icons/tabler/building-store.svg +20 -0
  177. data/registry/icons/tabler/calendar.svg +21 -0
  178. data/registry/icons/tabler/chart-bar.svg +19 -0
  179. data/registry/icons/tabler/check.svg +16 -0
  180. data/registry/icons/tabler/chevron-down.svg +16 -0
  181. data/registry/icons/tabler/chevron-left.svg +16 -0
  182. data/registry/icons/tabler/chevron-right.svg +16 -0
  183. data/registry/icons/tabler/circle-check.svg +17 -0
  184. data/registry/icons/tabler/cloud.svg +16 -0
  185. data/registry/icons/tabler/credit-card.svg +19 -0
  186. data/registry/icons/tabler/device-desktop.svg +19 -0
  187. data/registry/icons/tabler/dots-vertical.svg +18 -0
  188. data/registry/icons/tabler/dots.svg +18 -0
  189. data/registry/icons/tabler/eye-off.svg +18 -0
  190. data/registry/icons/tabler/eye.svg +17 -0
  191. data/registry/icons/tabler/file-text.svg +20 -0
  192. data/registry/icons/tabler/git-branch.svg +21 -0
  193. data/registry/icons/tabler/grip-vertical.svg +21 -0
  194. data/registry/icons/tabler/home.svg +18 -0
  195. data/registry/icons/tabler/inbox.svg +17 -0
  196. data/registry/icons/tabler/info-circle.svg +18 -0
  197. data/registry/icons/tabler/italic.svg +18 -0
  198. data/registry/icons/tabler/layout-dashboard.svg +19 -0
  199. data/registry/icons/tabler/layout-grid.svg +19 -0
  200. data/registry/icons/tabler/layout-kanban.svg +19 -0
  201. data/registry/icons/tabler/layout-sidebar.svg +17 -0
  202. data/registry/icons/tabler/lifebuoy.svg +21 -0
  203. data/registry/icons/tabler/list.svg +21 -0
  204. data/registry/icons/tabler/loader.svg +23 -0
  205. data/registry/icons/tabler/lock.svg +18 -0
  206. data/registry/icons/tabler/logout.svg +18 -0
  207. data/registry/icons/tabler/mail.svg +17 -0
  208. data/registry/icons/tabler/menu-2.svg +18 -0
  209. data/registry/icons/tabler/message-circle.svg +16 -0
  210. data/registry/icons/tabler/moon.svg +16 -0
  211. data/registry/icons/tabler/news.svg +19 -0
  212. data/registry/icons/tabler/plus.svg +17 -0
  213. data/registry/icons/tabler/qrcode.svg +27 -0
  214. data/registry/icons/tabler/rocket.svg +18 -0
  215. data/registry/icons/tabler/rosette-discount-check.svg +17 -0
  216. data/registry/icons/tabler/rotate-clockwise.svg +16 -0
  217. data/registry/icons/tabler/school.svg +17 -0
  218. data/registry/icons/tabler/search.svg +17 -0
  219. data/registry/icons/tabler/selector.svg +17 -0
  220. data/registry/icons/tabler/settings.svg +17 -0
  221. data/registry/icons/tabler/shield-check.svg +17 -0
  222. data/registry/icons/tabler/shield.svg +16 -0
  223. data/registry/icons/tabler/sitemap.svg +20 -0
  224. data/registry/icons/tabler/sun.svg +17 -0
  225. data/registry/icons/tabler/trash.svg +20 -0
  226. data/registry/icons/tabler/underline.svg +17 -0
  227. data/registry/icons/tabler/upload.svg +18 -0
  228. data/registry/icons/tabler/user.svg +17 -0
  229. data/registry/icons/tabler/users.svg +19 -0
  230. data/registry/icons/tabler/world.svg +20 -0
  231. data/registry/icons/tabler/x.svg +17 -0
  232. data/registry/icons.yml +74 -0
  233. data/registry/test/components/previews/ui/confirm_dialog_preview/destructive.html.erb +7 -0
  234. data/registry/test/components/previews/ui/confirm_dialog_preview/in_form.html.erb +6 -0
  235. data/registry/test/components/previews/ui/confirm_dialog_preview/on_link.html.erb +5 -0
  236. data/registry/test/components/previews/ui/confirm_dialog_preview/plain.html.erb +3 -0
  237. data/registry/test/components/previews/ui/confirm_dialog_preview/with_description.html.erb +4 -0
  238. data/registry/test/components/previews/ui/confirm_dialog_preview.rb +20 -0
  239. data/registry/test/components/previews/ui/empty_state_preview/in_card.html.erb +7 -0
  240. data/registry/test/components/previews/ui/empty_state_preview/no_results.html.erb +3 -0
  241. data/registry/test/components/previews/ui/empty_state_preview/outline.html.erb +3 -0
  242. data/registry/test/components/previews/ui/empty_state_preview/with_actions.html.erb +4 -0
  243. data/registry/test/components/previews/ui/empty_state_preview/with_media.html.erb +8 -0
  244. data/registry/test/components/previews/ui/empty_state_preview.rb +26 -0
  245. data/registry/test/components/previews/ui/icon_preview/common.html.erb +19 -3
  246. data/registry/test/components/previews/ui/icon_preview/labelled.html.erb +4 -0
  247. data/registry/test/components/previews/ui/icon_preview/missing.html.erb +3 -0
  248. data/registry/test/components/previews/ui/icon_preview.rb +18 -3
  249. data/registry/test/components/previews/ui/input_group_preview/playground.html.erb +2 -2
  250. data/registry/test/components/previews/ui/input_group_preview.rb +3 -3
  251. data/registry/test/components/previews/ui/stepper_preview/approvals.html.erb +9 -0
  252. data/registry/test/components/previews/ui/stepper_preview/checklist.html.erb +12 -0
  253. data/registry/test/components/previews/ui/stepper_preview/dot_wizard.html.erb +41 -0
  254. data/registry/test/components/previews/ui/stepper_preview/failed_deploy.html.erb +13 -0
  255. data/registry/test/components/previews/ui/stepper_preview/inline.html.erb +31 -0
  256. data/registry/test/components/previews/ui/stepper_preview/onboarding.html.erb +12 -0
  257. data/registry/test/components/previews/ui/stepper_preview/order_tracking.html.erb +10 -0
  258. data/registry/test/components/previews/ui/stepper_preview/price_calculator.html.erb +14 -0
  259. data/registry/test/components/previews/ui/stepper_preview/server_driven.html.erb +20 -0
  260. data/registry/test/components/previews/ui/stepper_preview/sidebar.html.erb +43 -0
  261. data/registry/test/components/previews/ui/stepper_preview/wizard.html.erb +55 -0
  262. data/registry/test/components/previews/ui/stepper_preview.rb +57 -0
  263. data/registry/test/components/previews/ui/toggle_group_preview/icon_only.html.erb +5 -0
  264. data/registry/test/components/previews/ui/toggle_group_preview/in_form.html.erb +11 -0
  265. data/registry/test/components/previews/ui/toggle_group_preview/multiple.html.erb +5 -0
  266. data/registry/test/components/previews/ui/toggle_group_preview/outline.html.erb +5 -0
  267. data/registry/test/components/previews/ui/toggle_group_preview/sizes.html.erb +9 -0
  268. data/registry/test/components/previews/ui/toggle_group_preview/with_icons.html.erb +5 -0
  269. data/registry/test/components/previews/ui/toggle_group_preview.rb +36 -0
  270. data/registry/test/components/ui/accordion/trigger_test.rb +1 -1
  271. data/registry/test/components/ui/alert_test.rb +10 -10
  272. data/registry/test/components/ui/badge_test.rb +3 -3
  273. data/registry/test/components/ui/banner_test.rb +3 -3
  274. data/registry/test/components/ui/breadcrumb/ellipsis_test.rb +2 -2
  275. data/registry/test/components/ui/button_test.rb +17 -14
  276. data/registry/test/components/ui/button_to_test.rb +2 -2
  277. data/registry/test/components/ui/checkbox_test.rb +2 -2
  278. data/registry/test/components/ui/confirm_dialog_test.rb +68 -0
  279. data/registry/test/components/ui/empty_state_test.rb +87 -0
  280. data/registry/test/components/ui/icon_test.rb +60 -20
  281. data/registry/test/components/ui/input_group_test.rb +1 -1
  282. data/registry/test/components/ui/link_test.rb +3 -3
  283. data/registry/test/components/ui/navigation_menu_test.rb +2 -2
  284. data/registry/test/components/ui/session_tabs_test.rb +3 -3
  285. data/registry/test/components/ui/spinner_test.rb +9 -9
  286. data/registry/test/components/ui/stepper_test.rb +239 -0
  287. data/registry/test/components/ui/tabs/trigger_test.rb +2 -2
  288. data/registry/test/components/ui/theme_toggle_test.rb +6 -8
  289. data/registry/test/components/ui/toast_test.rb +11 -10
  290. data/registry/test/components/ui/toggle_group_test.rb +162 -0
  291. metadata +253 -2
  292. data/registry/app/javascript/velvetkit_icons.ts +0 -78
@@ -0,0 +1,20 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-sitemap"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M3 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2" />
16
+ <path d="M15 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2" />
17
+ <path d="M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2" />
18
+ <path d="M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1" />
19
+ <path d="M12 9l0 3" />
20
+ </svg>
@@ -0,0 +1,17 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-sun"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" />
16
+ <path d="M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7" />
17
+ </svg>
@@ -0,0 +1,20 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-trash"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M4 7l16 0" />
16
+ <path d="M10 11l0 6" />
17
+ <path d="M14 11l0 6" />
18
+ <path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
19
+ <path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
20
+ </svg>
@@ -0,0 +1,17 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-underline"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M7 5v5a5 5 0 0 0 10 0v-5" />
16
+ <path d="M5 19h14" />
17
+ </svg>
@@ -0,0 +1,18 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-upload"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" />
16
+ <path d="M7 9l5 -5l5 5" />
17
+ <path d="M12 4l0 12" />
18
+ </svg>
@@ -0,0 +1,17 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-user"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0" />
16
+ <path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
17
+ </svg>
@@ -0,0 +1,19 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-users"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" />
16
+ <path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
17
+ <path d="M16 3.13a4 4 0 0 1 0 7.75" />
18
+ <path d="M21 21v-2a4 4 0 0 0 -3 -3.85" />
19
+ </svg>
@@ -0,0 +1,20 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-world"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />
16
+ <path d="M3.6 9h16.8" />
17
+ <path d="M3.6 15h16.8" />
18
+ <path d="M11.5 3a17 17 0 0 0 0 18" />
19
+ <path d="M12.5 3a17 17 0 0 1 0 18" />
20
+ </svg>
@@ -0,0 +1,17 @@
1
+ <!-- @license @tabler/icons v3.50.0 - MIT -->
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="24"
5
+ height="24"
6
+ viewBox="0 0 24 24"
7
+ fill="none"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ class="icon icon-tabler icons-tabler-outline icon-tabler-x"
13
+ >
14
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
15
+ <path d="M18 6l-12 12" />
16
+ <path d="M6 6l12 12" />
17
+ </svg>
@@ -0,0 +1,74 @@
1
+ # Every icon the components and their previews draw, by its Lucide name,
2
+ # with its name in each other library. `velvetkit:add` renames the icons in
3
+ # what it copies for the library in config/velvetkit.yml, and copies the
4
+ # SVGs from icons/<library>/. After changing this file run `rake icons:sync`.
5
+ #
6
+ # test/velvetkit/icons_test.rb fails when a component draws an icon that
7
+ # isn't listed here, or a listed icon has no SVG.
8
+
9
+ align-center: { tabler: align-center, phosphor: text-align-center }
10
+ align-left: { tabler: align-left, phosphor: text-align-left }
11
+ align-right: { tabler: align-right, phosphor: text-align-right }
12
+ arrow-left: { tabler: arrow-left, phosphor: arrow-left }
13
+ arrow-right: { tabler: arrow-right, phosphor: arrow-right }
14
+ badge-check: { tabler: rosette-discount-check, phosphor: seal-check }
15
+ bar-chart-3: { tabler: chart-bar, phosphor: chart-bar }
16
+ bell: { tabler: bell, phosphor: bell }
17
+ bold: { tabler: bold, phosphor: text-b }
18
+ book-open: { tabler: book, phosphor: book-open }
19
+ calendar: { tabler: calendar, phosphor: calendar-blank }
20
+ chart-column: { tabler: chart-bar, phosphor: chart-bar }
21
+ check: { tabler: check, phosphor: check }
22
+ chevron-down: { tabler: chevron-down, phosphor: caret-down }
23
+ chevron-left: { tabler: chevron-left, phosphor: caret-left }
24
+ chevron-right: { tabler: chevron-right, phosphor: caret-right }
25
+ chevrons-up-down: { tabler: selector, phosphor: caret-up-down }
26
+ circle-alert: { tabler: alert-circle, phosphor: warning-circle }
27
+ circle-check: { tabler: circle-check, phosphor: check-circle }
28
+ cloud: { tabler: cloud, phosphor: cloud }
29
+ credit-card: { tabler: credit-card, phosphor: credit-card }
30
+ ellipsis: { tabler: dots, phosphor: dots-three }
31
+ ellipsis-vertical: { tabler: dots-vertical, phosphor: dots-three-vertical }
32
+ eye: { tabler: eye, phosphor: eye }
33
+ eye-off: { tabler: eye-off, phosphor: eye-slash }
34
+ file-text: { tabler: file-text, phosphor: file-text }
35
+ folder-kanban: { tabler: layout-kanban, phosphor: kanban }
36
+ git-branch: { tabler: git-branch, phosphor: git-branch }
37
+ globe: { tabler: world, phosphor: globe }
38
+ graduation-cap: { tabler: school, phosphor: graduation-cap }
39
+ grip-vertical: { tabler: grip-vertical, phosphor: dots-six-vertical }
40
+ home: { tabler: home, phosphor: house }
41
+ inbox: { tabler: inbox, phosphor: tray }
42
+ info: { tabler: info-circle, phosphor: info }
43
+ italic: { tabler: italic, phosphor: text-italic }
44
+ layout-dashboard: { tabler: layout-dashboard, phosphor: squares-four }
45
+ layout-grid: { tabler: layout-grid, phosphor: grid-four }
46
+ life-buoy: { tabler: lifebuoy, phosphor: lifebuoy }
47
+ list: { tabler: list, phosphor: list }
48
+ loader: { tabler: loader, phosphor: spinner }
49
+ lock: { tabler: lock, phosphor: lock }
50
+ log-out: { tabler: logout, phosphor: sign-out }
51
+ mail: { tabler: mail, phosphor: envelope }
52
+ menu: { tabler: menu-2, phosphor: list }
53
+ message-circle: { tabler: message-circle, phosphor: chat-circle }
54
+ monitor: { tabler: device-desktop, phosphor: desktop }
55
+ moon: { tabler: moon, phosphor: moon }
56
+ newspaper: { tabler: news, phosphor: newspaper }
57
+ panel-left: { tabler: layout-sidebar, phosphor: sidebar }
58
+ plus: { tabler: plus, phosphor: plus }
59
+ qr-code: { tabler: qrcode, phosphor: qr-code }
60
+ rocket: { tabler: rocket, phosphor: rocket }
61
+ rotate-cw: { tabler: rotate-clockwise, phosphor: arrow-clockwise }
62
+ search: { tabler: search, phosphor: magnifying-glass }
63
+ settings: { tabler: settings, phosphor: gear }
64
+ shield: { tabler: shield, phosphor: shield }
65
+ shield-check: { tabler: shield-check, phosphor: shield-check }
66
+ store: { tabler: building-store, phosphor: storefront }
67
+ sun: { tabler: sun, phosphor: sun }
68
+ trash-2: { tabler: trash, phosphor: trash }
69
+ underline: { tabler: underline, phosphor: text-underline }
70
+ upload: { tabler: upload, phosphor: upload-simple }
71
+ user: { tabler: user, phosphor: user }
72
+ users: { tabler: users, phosphor: users }
73
+ workflow: { tabler: sitemap, phosphor: flow-arrow }
74
+ x: { tabler: x, phosphor: x }
@@ -0,0 +1,7 @@
1
+ <%# In your layout, once: render(UI::ConfirmDialog.new) %>
2
+ <%= render(UI::ButtonTo.new("/demo/projects/1", method: :delete, variant: :destructive,
3
+ data: { turbo_confirm: "Delete this project?",
4
+ confirm_description: "Its pages, files and history go too. This can't be undone.",
5
+ confirm_button: "Delete project", confirm_variant: "destructive" })) do |button| %>
6
+ <% button.with_leading_icon(name: "trash-2") %>Delete project
7
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <%# On a form, Turbo asks before submitting it. %>
2
+ <%= form_with url: "/demo/invoices", class: "flex w-full max-w-md flex-col gap-4",
3
+ data: { turbo_confirm: "Send this invoice to Acme Inc.?", confirm_button: "Send invoice" } do %>
4
+ <%= render(UI::Input.new(label: "Amount", name: "invoice[amount]", value: "1,200.00")) %>
5
+ <%= render(UI::Button.new(type: :submit, class: "self-start")) { "Send" } %>
6
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%# Turbo turns a data-turbo-method link into a form; the options still apply. %>
2
+ <%= link_to "Sign out of every device", "/demo/sessions", class: "text-sm font-medium text-primary underline-offset-4 hover:underline",
3
+ data: { turbo_method: :delete, turbo_confirm: "Sign out everywhere?",
4
+ confirm_description: "You'll need to sign in again on your phone and laptop.",
5
+ confirm_button: "Sign out" } %>
@@ -0,0 +1,3 @@
1
+ <%# Only data-turbo-confirm: the message is the title, with the default buttons. %>
2
+ <%= render(UI::ButtonTo.new("/demo/notifications/read", method: :patch, variant: :outline,
3
+ data: { turbo_confirm: "Mark every notification as read?" })) { "Mark all as read" } %>
@@ -0,0 +1,4 @@
1
+ <%= render(UI::ButtonTo.new("/demo/posts/1/publish", method: :patch,
2
+ data: { turbo_confirm: "Publish this post?",
3
+ confirm_description: "Subscribers get an email straight away.",
4
+ confirm_button: "Publish", confirm_cancel: "Not yet" })) { "Publish" } %>
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # These examples post to /demo/ paths; the docs site stops those requests and
4
+ # shows a toast instead, so confirming here changes nothing.
5
+ class UI::ConfirmDialogPreview < ViewComponent::Preview
6
+ # @label Destructive
7
+ def destructive; render_with_template; end
8
+
9
+ # @label With a Description
10
+ def with_description; render_with_template; end
11
+
12
+ # @label On a Link
13
+ def on_link; render_with_template; end
14
+
15
+ # @label In a Form
16
+ def in_form; render_with_template; end
17
+
18
+ # @label Plain
19
+ def plain; render_with_template; end
20
+ end
@@ -0,0 +1,7 @@
1
+ <div class="max-w-md">
2
+ <%= render(UI::Card.new) do |card| %>
3
+ <% card.with_content do %>
4
+ <%= render(UI::EmptyState.new(icon: "bell", heading_level: 4, class: "md:p-8", title: "No notifications", description: "We'll let you know when a build fails or someone mentions you.")) %>
5
+ <% end %>
6
+ <% end %>
7
+ </div>
@@ -0,0 +1,3 @@
1
+ <%= render(UI::EmptyState.new(icon: "search", title: "No results for “invoce”", description: "Check the spelling, or try a shorter search.")) do %>
2
+ <%= render(UI::Button.new(variant: :ghost, size: :sm)) { "Clear search" } %>
3
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <%= render(UI::EmptyState.new(icon: "upload", variant: :outline, title: "No files", description: "Upload a contract, invoice or receipt to keep it with this client.")) do %>
2
+ <%= render(UI::Button.new(variant: :outline, size: :sm)) { "Upload a file" } %>
3
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <%= render(UI::EmptyState.new(icon: "folder-kanban", title: "No projects yet", description: "You haven't created any projects. Start one from scratch or import an existing repository.")) do %>
2
+ <%= render(UI::Button.new) do |btn| %><% btn.with_leading_icon(name: "plus") %>Create project<% end %>
3
+ <%= render(UI::Button.new(variant: :outline)) { "Import" } %>
4
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%= render(UI::EmptyState.new(title: "Nobody else is here", description: "Invite your team to share projects and reply to customers together.")) do |empty| %>
2
+ <% empty.with_media do %>
3
+ <%= render(UI::AvatarGroup.new(size: :lg)) do |group| %>
4
+ <% %w[JD AS RM].each { |initials| group.with_avatar { initials } } %>
5
+ <% end %>
6
+ <% end %>
7
+ <%= render(UI::Button.new(size: :sm)) do |btn| %><% btn.with_leading_icon(name: "users") %>Invite people<% end %>
8
+ <% end %>
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ class UI::EmptyStatePreview < ViewComponent::Preview
4
+ # @label Playground
5
+ # @param title text
6
+ # @param description text
7
+ # @param variant select { choices: [default, outline] }
8
+ def playground(title: "No messages", description: "When someone writes to you, it will show up here.", variant: :default)
9
+ render(UI::EmptyState.new(icon: "inbox", title: title, description: description, variant: variant.to_sym))
10
+ end
11
+
12
+ # @label With Actions
13
+ def with_actions; render_with_template; end
14
+
15
+ # @label Outline
16
+ def outline; render_with_template; end
17
+
18
+ # @label No Search Results
19
+ def no_results; render_with_template; end
20
+
21
+ # @label With an Avatar
22
+ def with_media; render_with_template; end
23
+
24
+ # @label In a Card
25
+ def in_card; render_with_template; end
26
+ end
@@ -1,8 +1,24 @@
1
1
  <div class="grid grid-cols-6 gap-4">
2
- <% %w[menu arrow-right globe badge-check circle-alert x circle-check eye eye-off lock chevrons-up-down layout-dashboard panel-left user loader].each do |name| %>
2
+ <% [
3
+ UI::Icon.new(name: "menu"),
4
+ UI::Icon.new(name: "arrow-right"),
5
+ UI::Icon.new(name: "globe"),
6
+ UI::Icon.new(name: "badge-check"),
7
+ UI::Icon.new(name: "circle-alert"),
8
+ UI::Icon.new(name: "x"),
9
+ UI::Icon.new(name: "circle-check"),
10
+ UI::Icon.new(name: "eye"),
11
+ UI::Icon.new(name: "eye-off"),
12
+ UI::Icon.new(name: "lock"),
13
+ UI::Icon.new(name: "chevrons-up-down"),
14
+ UI::Icon.new(name: "layout-dashboard"),
15
+ UI::Icon.new(name: "panel-left"),
16
+ UI::Icon.new(name: "user"),
17
+ UI::Icon.new(name: "loader"),
18
+ ].each do |icon| %>
3
19
  <div class="flex flex-col items-center gap-1 p-2 border rounded-md">
4
- <%= render(UI::Icon.new(name: name)) %>
5
- <span class="text-xs text-muted-foreground"><%= name %></span>
20
+ <%= render(icon) %>
21
+ <span class="text-xs text-muted-foreground"><%= icon.name %></span>
6
22
  </div>
7
23
  <% end %>
8
24
  </div>
@@ -0,0 +1,4 @@
1
+ <div class="flex items-center gap-6 text-sm">
2
+ <%= render(UI::Icon.new(name: "circle-alert", label: "Warning", class: "text-destructive")) %>
3
+ <span class="inline-flex items-center gap-2"><%= render(UI::Icon.new(name: "mail", size: :sm)) %> Email us</span>
4
+ </div>
@@ -0,0 +1,3 @@
1
+ <%# No app/assets/icons/not-installed-yet.svg, so this draws a dashed square %>
2
+ <% name = "not-installed-yet" %>
3
+ <%= render(UI::Icon.new(name: name)) %>
@@ -2,10 +2,10 @@
2
2
 
3
3
  class UI::IconPreview < ViewComponent::Preview
4
4
  # @label Playground
5
- # @param name text "Lucide icon name (must be registered in app/javascript/lucide-icon.ts)"
5
+ # @param icon text "An SVG in app/assets/icons, without .svg"
6
6
  # @param size select { choices: [xs, sm, default, lg, xl] }
7
- def playground(name: "menu", size: :default)
8
- render(UI::Icon.new(name: name, size: size.to_sym))
7
+ def playground(icon: "menu", size: :default)
8
+ render(UI::Icon.new(name: icon, size: size.to_sym))
9
9
  end
10
10
 
11
11
  # @label All Sizes
@@ -17,4 +17,19 @@ class UI::IconPreview < ViewComponent::Preview
17
17
  def common
18
18
  render_with_template
19
19
  end
20
+
21
+ # A label makes the icon an image with that accessible name. Without one
22
+ # it is decorative and hidden from screen readers, which is right next to
23
+ # text that already says the same thing.
24
+ # @label With a Label
25
+ def labelled
26
+ render_with_template
27
+ end
28
+
29
+ # An icon with no SVG in app/assets/icons draws this dashed square, and
30
+ # the log names the file. Add it with `bin/rails generate velvetkit:icons`.
31
+ # @label Missing Icon
32
+ def missing
33
+ render_with_template
34
+ end
20
35
  end
@@ -2,11 +2,11 @@
2
2
  <div class="max-w-sm">
3
3
  <%= render(UI::InputGroup.new) do |g| %>
4
4
  <% if left_icon %>
5
- <%= g.with_addon(align: "inline-start") { render(UI::Icon.new(name: icon_name)) } %>
5
+ <%= g.with_addon(align: "inline-start") { render(UI::Icon.new(name: addon_icon)) } %>
6
6
  <% end %>
7
7
  <%= g.with_field(type: :email, placeholder: "you@example.com", error: error, disabled: disabled) %>
8
8
  <% if right_icon %>
9
- <%= g.with_addon(align: "inline-end") { render(UI::Icon.new(name: icon_name)) } %>
9
+ <%= g.with_addon(align: "inline-end") { render(UI::Icon.new(name: addon_icon)) } %>
10
10
  <% end %>
11
11
  <% end %>
12
12
  </div>
@@ -4,12 +4,12 @@ class UI::InputGroupPreview < ViewComponent::Preview
4
4
  # @label Playground
5
5
  # @param left_icon toggle
6
6
  # @param right_icon toggle
7
- # @param icon_name text
7
+ # @param addon_icon text
8
8
  # @param align select { choices: [inline-start, inline-end] }
9
9
  # @param error toggle
10
10
  # @param disabled toggle
11
- def playground(left_icon: true, right_icon: false, icon_name: "mail", align: "inline-start", error: false, disabled: false)
12
- render_with_template(locals: { left_icon: left_icon, right_icon: right_icon, icon_name: icon_name, align: align, error: error, disabled: disabled })
11
+ def playground(left_icon: true, right_icon: false, addon_icon: "mail", align: "inline-start", error: false, disabled: false)
12
+ render_with_template(locals: { left_icon: left_icon, right_icon: right_icon, addon_icon: addon_icon, align: align, error: error, disabled: disabled })
13
13
  end
14
14
 
15
15
  # @label All Addons
@@ -0,0 +1,9 @@
1
+ <%# `status: :loading` for a step that's waiting on someone else. %>
2
+ <div class="w-full max-w-sm">
3
+ <%= render(UI::Stepper.new(orientation: :vertical, current: 3, label: "Leave request approvals")) do |stepper| %>
4
+ <% stepper.with_step(title: "Team lead", description: "Approved by Aditi Rao · 15 Jun 2026") %>
5
+ <% stepper.with_step(title: "Head of department", description: "Approved by Farhan Shah · 15 Jun 2026") %>
6
+ <% stepper.with_step(title: "VP, People", description: "Waiting since 16 Jun 2026", status: :loading) %>
7
+ <% stepper.with_step(title: "Payroll", description: "Updates your leave balance") %>
8
+ <% end %>
9
+ </div>
@@ -0,0 +1,12 @@
1
+ <%# `connector: false` for steps that can be done in any order. Done ones link
2
+ back, so people can change what they set. %>
3
+ <div class="w-full max-w-md rounded-xl border bg-card p-6">
4
+ <h3 class="font-semibold">Set up your store</h3>
5
+ <p class="mb-6 text-sm text-muted-foreground">2 of 4 done</p>
6
+ <%= render(UI::Stepper.new(orientation: :vertical, connector: false, label: "Store setup")) do |stepper| %>
7
+ <% stepper.with_step(title: "Add your first product", description: "Linen shirt, ₹2,400", status: :complete, href: "#") %>
8
+ <% stepper.with_step(title: "Choose a theme", description: "Using Coast", status: :complete, href: "#") %>
9
+ <% stepper.with_step(title: "Set up payments", description: "Connect UPI or a card processor", status: :current, icon: "credit-card") %>
10
+ <% stepper.with_step(title: "Pick a domain", description: "Or keep yourstore.example.com", status: :upcoming, icon: "globe") %>
11
+ <% end %>
12
+ </div>
@@ -0,0 +1,41 @@
1
+ <%# Dots, and `labels: false`: the heading on each panel says where you are. %>
2
+ <div class="w-full max-w-xl rounded-2xl border bg-card p-6 sm:p-8">
3
+ <%= render(UI::Stepper.new(variant: :dot, labels: false, label: "Form your LLC")) do |stepper| %>
4
+ <% stepper.with_step(title: "State") do %>
5
+ <h3 class="text-2xl font-semibold tracking-tight">Choose the state to incorporate your LLC</h3>
6
+ <p class="mt-6 mb-3 text-xs font-medium tracking-wide text-muted-foreground uppercase">Recommended</p>
7
+ <fieldset class="grid gap-3">
8
+ <legend class="sr-only">State</legend>
9
+ <% [["wyoming", "Wyoming", true, "Lower annual costs. No corporate income tax or franchise tax."],
10
+ ["delaware", "Delaware", false, "Strong legal protection for shareholders. Popular with C-corps."]].each do |value, name, recommended, detail| %>
11
+ <label class="flex cursor-pointer flex-col gap-1.5 rounded-lg border p-4 transition-colors hover:bg-accent/50 has-[:checked]:border-primary has-[:checked]:bg-primary/5 has-[:focus-visible]:ring-[3px] has-[:focus-visible]:ring-ring/40">
12
+ <input type="radio" name="llc[state]" value="<%= value %>" required class="sr-only">
13
+ <span class="flex items-center gap-2 font-medium"><%= name %><% if recommended %><%= render(UI::Badge.new(variant: :outline, size: :sm, class: "border-emerald-300 text-emerald-700 dark:border-emerald-800 dark:text-emerald-300")) { "Recommended" } %><% end %></span>
14
+ <span class="text-sm text-muted-foreground"><%= detail %></span>
15
+ </label>
16
+ <% end %>
17
+ </fieldset>
18
+ <% end %>
19
+ <% stepper.with_step(title: "Name") do %>
20
+ <h3 class="mb-6 text-2xl font-semibold tracking-tight">What's your company called?</h3>
21
+ <%= render(UI::Input.new(label: "Company name", name: "llc[name]", required: true, placeholder: "Northwind Studio", hint: "We'll add “LLC” to the end.")) %>
22
+ <% end %>
23
+ <% stepper.with_step(title: "Members") do %>
24
+ <h3 class="mb-6 text-2xl font-semibold tracking-tight">How many owners?</h3>
25
+ <%= render(UI::Input.new(type: :number, label: "Members", name: "llc[members]", required: true, min: 1, max: 50, value: 1, class: "w-28")) %>
26
+ <% end %>
27
+ <% stepper.with_step(title: "Review") do %>
28
+ <h3 class="mb-2 text-2xl font-semibold tracking-tight">Ready to file</h3>
29
+ <p class="text-sm text-muted-foreground">We'll file with the state today. Most states approve in 3 to 5 business days.</p>
30
+ <% end %>
31
+ <% stepper.with_completion do %>
32
+ <%= render(UI::EmptyState.new(icon: "circle-check", title: "Filed", description: "We'll email you when the state approves it.", class: "md:p-6")) do %>
33
+ <%= render(UI::Button.new(variant: :outline, data: { action: "ui--stepper#reset" })) { "Start over" } %>
34
+ <% end %>
35
+ <% end %>
36
+ <div class="mt-8 flex flex-col gap-2">
37
+ <%= render(UI::Button.new(size: :lg, full_width: true, data: { action: "ui--stepper#next", "ui--stepper-target": "next" })) { "Continue" } %>
38
+ <%= render(UI::Button.new(variant: :ghost, full_width: true, hidden: true, data: { action: "ui--stepper#previous", "ui--stepper-target": "previous" })) { "Back" } %>
39
+ </div>
40
+ <% end %>
41
+ </div>
@@ -0,0 +1,13 @@
1
+ <%# `status: :error` marks the step that failed; the description says why. %>
2
+ <div class="w-full max-w-md">
3
+ <%= render(UI::Stepper.new(orientation: :vertical, current: 2, label: "Deploy a1f9c3e")) do |stepper| %>
4
+ <% stepper.with_step(title: "Build", description: "Finished in 42s") %>
5
+ <% stepper.with_step(title: "Test", description: "3 of 214 tests failed in spec/billing", status: :error) %>
6
+ <% stepper.with_step(title: "Migrate database") %>
7
+ <% stepper.with_step(title: "Release", description: "To production") %>
8
+ <div class="flex gap-2 pl-11">
9
+ <%= render(UI::Button.new(size: :sm)) do |button| %><% button.with_leading_icon(name: "rotate-cw") %>Retry tests<% end %>
10
+ <%= render(UI::Button.new(variant: :outline, size: :sm)) { "View logs" } %>
11
+ </div>
12
+ <% end %>
13
+ </div>
@@ -0,0 +1,31 @@
1
+ <%# `layout: :inline`: each panel opens under its own step, with its own
2
+ button, like a checklist that walks you through. %>
3
+ <div class="w-full max-w-lg">
4
+ <%= render(UI::Stepper.new(orientation: :vertical, layout: :inline, label: "Turn on two-factor")) do |stepper| %>
5
+ <% stepper.with_step(title: "Install an authenticator app", description: "1Password, Authy or Google Authenticator") do %>
6
+ <p class="mb-3 text-sm text-muted-foreground">Any app that makes six-digit codes works.</p>
7
+ <%= render(UI::Button.new(size: :sm, data: { action: "ui--stepper#next" })) { "I have one" } %>
8
+ <% end %>
9
+ <% stepper.with_step(title: "Scan the code", description: "Or type the key by hand") do %>
10
+ <div class="mb-3 flex items-center gap-4">
11
+ <div class="grid size-24 shrink-0 place-items-center rounded-md border bg-muted text-muted-foreground"><%= render(UI::Icon.new(name: "qr-code", size: :xl)) %></div>
12
+ <code class="font-mono text-sm break-all">JBSW Y3DP EHPK 3PXP</code>
13
+ </div>
14
+ <%= render(UI::Button.new(size: :sm, data: { action: "ui--stepper#next" })) { "Next" } %>
15
+ <% end %>
16
+ <% stepper.with_step(title: "Enter a code", description: "To check it's set up") do %>
17
+ <div class="flex items-end gap-2">
18
+ <%= render(UI::Input.new(label: "Six-digit code", name: "otp", required: true, pattern: "[0-9]{6}", inputmode: "numeric",
19
+ autocomplete: "one-time-code", maxlength: 6, placeholder: "123456", class: "w-36 font-mono")) %>
20
+ <%= render(UI::Button.new(data: { action: "ui--stepper#next" })) { "Verify" } %>
21
+ </div>
22
+ <% end %>
23
+ <% stepper.with_completion do %>
24
+ <%= render(UI::Alert.new(variant: :success)) do |alert| %>
25
+ <% alert.with_icon(name: "shield-check") %>
26
+ <% alert.with_title { "Two-factor is on" } %>
27
+ <% alert.with_description { "You'll be asked for a code when you sign in on a new device." } %>
28
+ <% end %>
29
+ <% end %>
30
+ <% end %>
31
+ </div>
@@ -0,0 +1,12 @@
1
+ <div class="w-full max-w-4xl space-y-10">
2
+ <%= render(UI::Stepper.new(current: 3, variant: :dot, align: :center, label: "Contractor onboarding")) do |stepper| %>
3
+ <% ["General info", "Payment info", "Benefits and compliance", "Review and sign", "Contractor signs", "Activated"].each do |title| %>
4
+ <% stepper.with_step(title: title) %>
5
+ <% end %>
6
+ <% end %>
7
+ <%= render(UI::Stepper.new(current: 2, variant: :dot, label: "Checkout")) do |stepper| %>
8
+ <% stepper.with_step(title: "Cart") %>
9
+ <% stepper.with_step(title: "Shipping") %>
10
+ <% stepper.with_step(title: "Payment") %>
11
+ <% end %>
12
+ </div>
@@ -0,0 +1,10 @@
1
+ <%# A status the server knows: no panels, no buttons, just where the order is. %>
2
+ <div class="w-full max-w-3xl">
3
+ <%= render(UI::Stepper.new(current: 3, align: :center, label: "Order #4021")) do |stepper| %>
4
+ <% stepper.with_step(title: "Ordered", description: "Mon, 2 Nov") %>
5
+ <% stepper.with_step(title: "Packed", description: "Tue, 3 Nov") %>
6
+ <% stepper.with_step(title: "Shipped", description: "Left Mumbai hub") %>
7
+ <% stepper.with_step(title: "Out for delivery") %>
8
+ <% stepper.with_step(title: "Delivered", description: "By Fri, 6 Nov") %>
9
+ <% end %>
10
+ </div>