velvetkit 0.2.1 → 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 -70
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A row of buttons where one is chosen (like radios) or several are
4
+ # (`multiple: true`, like checkboxes). Each item is a real radio or checkbox
5
+ # input inside its label, so it posts with the form under `name`, resets with
6
+ # it, and needs no JavaScript: arrow keys move between radios and Space ticks a
7
+ # checkbox. Bind it to a form builder with `form:` and `field:`.
8
+ #
9
+ # A multiple group also posts an empty `name[]` value, so unticking every item
10
+ # still sends the field, the way Rails' collection_check_boxes does.
11
+ #
12
+ # `variant: :default` is a segmented control on a muted track; `:outline`
13
+ # joins bordered buttons. Give the group a `label:` (its accessible name), and
14
+ # give an icon-only item a `label:` too, which becomes its hidden text and
15
+ # tooltip. Listen for `change` on the group to act as soon as the choice changes.
16
+ class UI::ToggleGroup < UI::Base
17
+ variants(
18
+ base: "inline-flex w-fit items-center",
19
+ variants: {
20
+ variant: {
21
+ default: "gap-1 rounded-lg bg-muted p-1 text-muted-foreground",
22
+ outline: "rounded-md border border-input bg-background shadow-xs " \
23
+ "divide-x divide-input overflow-hidden"
24
+ }
25
+ },
26
+ defaults: { variant: :default }
27
+ )
28
+
29
+ renders_many :items, ->(value:, **opts) {
30
+ UI::ToggleGroup::Item.new(value: value, **opts).tap { |item| item.set_group_context(self) }
31
+ }
32
+
33
+ def initialize(name: nil, value: nil, multiple: false, variant: :default, size: :default,
34
+ label: nil, form: nil, field: nil, required: false, disabled: false,
35
+ class: nil, **html_attrs)
36
+ @name = name
37
+ @value = value
38
+ @multiple = multiple
39
+ @variant = variant
40
+ @size = size
41
+ @label = label
42
+ @form = form
43
+ @field = field
44
+ @required = required
45
+ @disabled = disabled
46
+ @user_class = binding.local_variable_get(:class)
47
+ @html_attrs = html_attrs
48
+ end
49
+
50
+ attr_reader :variant, :size
51
+
52
+ def multiple? = @multiple
53
+ def disabled? = @disabled
54
+ def required? = @required && !multiple?
55
+
56
+ def form_field? = @form.present? && @field.present?
57
+
58
+ def input_name
59
+ base = form_field? ? "#{@form.object_name}[#{@field}]" : @name
60
+ return if base.blank?
61
+
62
+ multiple? ? "#{base}[]" : base
63
+ end
64
+
65
+ def selected
66
+ value = @value
67
+ value = @form.object.public_send(@field) if value.nil? && form_field? && @form.object.respond_to?(@field)
68
+ Array(value).map(&:to_s)
69
+ end
70
+
71
+ def root_attrs
72
+ attrs = @html_attrs.except(:data, :aria)
73
+ attrs[:role] = multiple? ? "group" : "radiogroup"
74
+ attrs[:class] = cn(variant_classes(variant: @variant), @user_class)
75
+ attrs[:data] = { slot: "toggle-group", variant: @variant }.merge(@html_attrs[:data] || {})
76
+ attrs[:aria] = { label: @label.presence }.compact.merge(@html_attrs[:aria] || {})
77
+ attrs
78
+ end
79
+ end
@@ -0,0 +1,110 @@
1
+ import { Controller } from '@hotwired/stimulus';
2
+
3
+ type ConfirmMethod = (message: string, element: HTMLFormElement, submitter?: HTMLElement | null) => Promise<boolean>;
4
+
5
+ interface TurboGlobal {
6
+ config?: { forms?: { confirm?: ConfirmMethod } };
7
+ setConfirmMethod?: (method: ConfirmMethod) => void;
8
+ }
9
+
10
+ /**
11
+ * UI::ConfirmDialog controller — answers Turbo's data-turbo-confirm with a
12
+ * native <dialog> instead of window.confirm().
13
+ *
14
+ * The confirm and cancel buttons submit a method="dialog" form, so the
15
+ * browser closes the dialog and sets its returnValue; Escape closes it with
16
+ * an empty one. Either way the `close` event resolves Turbo's promise.
17
+ *
18
+ * Turbo copies only data-turbo-confirm when it turns a data-turbo-method link
19
+ * into a form, so the other data-confirm-* options are also looked up on the
20
+ * element that was last clicked.
21
+ */
22
+ export default class extends Controller<HTMLDialogElement> {
23
+ static targets = ['panel', 'title', 'description', 'cancel', 'confirm', 'destructive'];
24
+ static values = { confirmLabel: String, cancelLabel: String };
25
+
26
+ declare readonly panelTarget: HTMLElement;
27
+ declare readonly titleTarget: HTMLElement;
28
+ declare readonly descriptionTarget: HTMLElement;
29
+ declare readonly cancelTarget: HTMLButtonElement;
30
+ declare readonly confirmTarget: HTMLButtonElement;
31
+ declare readonly destructiveTarget: HTMLButtonElement;
32
+ declare confirmLabelValue: string;
33
+ declare cancelLabelValue: string;
34
+
35
+ private previous?: ConfirmMethod;
36
+ private clicked: Element | null = null;
37
+ private resolve?: (answer: boolean) => void;
38
+
39
+ connect() {
40
+ document.addEventListener('click', this.remember, true);
41
+ this.element.addEventListener('close', this.closed);
42
+ this.element.addEventListener('click', this.backdropClick);
43
+
44
+ const turbo = (window as unknown as { Turbo?: TurboGlobal }).Turbo;
45
+ if (turbo?.config?.forms) {
46
+ this.previous = turbo.config.forms.confirm;
47
+ turbo.config.forms.confirm = this.confirm;
48
+ } else {
49
+ turbo?.setConfirmMethod?.(this.confirm);
50
+ }
51
+ }
52
+
53
+ disconnect() {
54
+ document.removeEventListener('click', this.remember, true);
55
+ this.element.removeEventListener('close', this.closed);
56
+ this.element.removeEventListener('click', this.backdropClick);
57
+
58
+ const turbo = (window as unknown as { Turbo?: TurboGlobal }).Turbo;
59
+ if (turbo?.config?.forms && turbo.config.forms.confirm === this.confirm) {
60
+ turbo.config.forms.confirm = this.previous;
61
+ }
62
+ this.answer(false);
63
+ if (this.element.open) this.element.close();
64
+ }
65
+
66
+ confirm = (message: string, form: HTMLFormElement, submitter?: HTMLElement | null): Promise<boolean> => {
67
+ this.answer(false);
68
+ const sources = [submitter, form, this.clicked?.getAttribute('data-turbo-confirm') === message ? this.clicked : null];
69
+ const option = (name: string) =>
70
+ sources.find((el) => el?.hasAttribute(`data-confirm-${name}`))?.getAttribute(`data-confirm-${name}`) ?? null;
71
+
72
+ this.titleTarget.textContent = message;
73
+ const description = option('description');
74
+ this.descriptionTarget.textContent = description ?? '';
75
+ this.descriptionTarget.hidden = !description;
76
+
77
+ const destructive = option('variant') === 'destructive';
78
+ const label = option('button') ?? this.confirmLabelValue;
79
+ this.confirmTarget.hidden = destructive;
80
+ this.destructiveTarget.hidden = !destructive;
81
+ this.confirmTarget.textContent = label;
82
+ this.destructiveTarget.textContent = label;
83
+ this.cancelTarget.textContent = option('cancel') ?? this.cancelLabelValue;
84
+
85
+ this.element.returnValue = '';
86
+ this.element.showModal();
87
+ this.panelTarget.dataset.state = 'open';
88
+ this.cancelTarget.focus();
89
+
90
+ return new Promise((resolve) => (this.resolve = resolve));
91
+ };
92
+
93
+ private remember = (event: Event) => {
94
+ this.clicked = (event.target as Element | null)?.closest?.('[data-turbo-confirm]') ?? null;
95
+ };
96
+
97
+ private backdropClick = (event: MouseEvent) => {
98
+ if (event.target === this.element) this.element.close('cancel');
99
+ };
100
+
101
+ private closed = () => {
102
+ this.panelTarget.dataset.state = 'closed';
103
+ this.answer(this.element.returnValue === 'confirm');
104
+ };
105
+
106
+ private answer(value: boolean) {
107
+ this.resolve?.(value);
108
+ this.resolve = undefined;
109
+ }
110
+ }
@@ -0,0 +1,187 @@
1
+ import { Controller } from '@hotwired/stimulus';
2
+
3
+ type Status = 'complete' | 'current' | 'upcoming' | 'error' | 'loading';
4
+
5
+ // Moves a UI::Stepper between its steps in the browser. Every step's look hangs
6
+ // off its data-status, so this sets that, aria-current, and which panel shows.
7
+ // Moving on checks the current panel's fields first; an invalid one keeps
8
+ // someone on the step and marks it as an error until it's fixed. Going back
9
+ // keeps the steps after it done, so a click on one returns there, checking
10
+ // each panel on the way.
11
+ export default class extends Controller<HTMLElement> {
12
+ static targets = ['step', 'panel', 'completion', 'previous', 'next', 'submit', 'summary'];
13
+ static values = { current: { type: Number, default: 1 }, summary: String };
14
+
15
+ declare readonly stepTargets: HTMLElement[];
16
+ declare readonly panelTargets: HTMLElement[];
17
+ declare readonly completionTargets: HTMLElement[];
18
+ declare readonly previousTargets: HTMLButtonElement[];
19
+ declare readonly nextTargets: HTMLElement[];
20
+ declare readonly submitTargets: HTMLElement[];
21
+ declare readonly summaryTargets: HTMLElement[];
22
+ declare currentValue: number;
23
+ declare summaryValue: string;
24
+
25
+ // The furthest step reached; the ones before it stay done while someone
26
+ // goes back to change an answer.
27
+ private furthest = 1;
28
+
29
+ connect() {
30
+ // The server drew the steps as they are; only the buttons need setting.
31
+ this.furthest = this.currentValue;
32
+ this.syncButtons();
33
+ }
34
+
35
+ next() {
36
+ if (this.currentValue > this.total) return;
37
+ if (!this.validate()) return;
38
+ this.go(this.currentValue + 1);
39
+ }
40
+
41
+ previous() {
42
+ if (this.currentValue > 1) this.go(this.currentValue - 1);
43
+ }
44
+
45
+ reset() {
46
+ this.furthest = 1;
47
+ this.go(1);
48
+ }
49
+
50
+ // A done step's title (or indicator) was clicked: go to it.
51
+ select(event: Event) {
52
+ const step = (event.currentTarget as HTMLElement).closest<HTMLElement>('[data-ui--stepper-target~="step"]');
53
+ const index = step ? this.stepTargets.indexOf(step) : -1;
54
+ if (index >= 0 && step?.dataset.status === 'complete') this.travel(index + 1);
55
+ }
56
+
57
+ // data-action="ui--stepper#goTo" data-ui--stepper-step-param="2".
58
+ goTo(event: Event & { params: { step?: number | string } }) {
59
+ const step = Number(event.params.step);
60
+ if (step >= 1 && step <= this.total + 1) this.travel(step);
61
+ }
62
+
63
+ // Enter in a field moves on, rather than submitting the form underneath from
64
+ // the first step. On the last step it submits as usual.
65
+ keydown(event: KeyboardEvent) {
66
+ const field = event.target as HTMLElement;
67
+ if (event.key !== 'Enter' || !(field instanceof HTMLInputElement)) return;
68
+ if (!this.panelTargets.length || this.currentValue >= this.total) return;
69
+ if (!this.currentPanel?.contains(field)) return;
70
+ event.preventDefault();
71
+ this.next();
72
+ }
73
+
74
+ // Back to plain "current" once an invalid panel's fields are all valid.
75
+ revalidate() {
76
+ const step = this.currentStep;
77
+ if (step?.dataset.status !== 'error' || !this.currentPanel) return;
78
+ if (this.fields(this.currentPanel).every((field) => field.checkValidity())) this.setStatus(step, 'current');
79
+ }
80
+
81
+ // A form inside the stepper being checked on the server: a spinner on the
82
+ // step until the answer comes back and replaces the stepper, or fails.
83
+ submitting() {
84
+ const step = this.currentStep;
85
+ if (step) this.setStatus(step, 'loading');
86
+ }
87
+
88
+ submitted(event: CustomEvent<{ success: boolean }>) {
89
+ const step = this.currentStep;
90
+ if (step?.dataset.status === 'loading') this.setStatus(step, event.detail.success ? 'current' : 'error');
91
+ }
92
+
93
+ private get total() {
94
+ return this.stepTargets.length;
95
+ }
96
+
97
+ private get currentStep(): HTMLElement | undefined {
98
+ return this.stepTargets[this.currentValue - 1];
99
+ }
100
+
101
+ private get currentPanel(): HTMLElement | undefined {
102
+ return this.panelTargets.find((panel) => Number(panel.dataset.step) === this.currentValue);
103
+ }
104
+
105
+ private fields(panel: HTMLElement) {
106
+ return Array.from(panel.querySelectorAll<HTMLInputElement>('input, select, textarea')).filter(
107
+ (field) => !field.disabled && field.willValidate,
108
+ );
109
+ }
110
+
111
+ // Straight back; forward a step at a time, stopping at a panel that's wrong.
112
+ private travel(step: number) {
113
+ if (step < this.currentValue) return this.go(step);
114
+ while (this.currentValue < step) {
115
+ if (!this.validate()) return;
116
+ this.go(this.currentValue + 1);
117
+ }
118
+ }
119
+
120
+ private validate() {
121
+ const panel = this.currentPanel;
122
+ const step = this.currentStep;
123
+ if (!panel || !step) return true;
124
+ const invalid = this.fields(panel).find((field) => !field.checkValidity());
125
+ if (!invalid) return true;
126
+ this.setStatus(step, 'error');
127
+ invalid.reportValidity();
128
+ invalid.focus();
129
+ return false;
130
+ }
131
+
132
+ private go(step: number) {
133
+ const back = step < this.currentValue;
134
+ // Turns on the enter animations, which a page load shouldn't play.
135
+ this.element.dataset.moved = '';
136
+ this.element.dataset.direction = back ? 'back' : 'forward';
137
+ this.currentValue = step;
138
+ this.furthest = Math.max(this.furthest, step);
139
+ this.sync();
140
+ }
141
+
142
+ private setStatus(step: HTMLElement, status: Status) {
143
+ step.dataset.status = status;
144
+ step.querySelectorAll<HTMLButtonElement>('button[data-action~="ui--stepper#select"]').forEach((button) => {
145
+ button.disabled = status !== 'complete';
146
+ });
147
+ if (status === 'current' || status === 'loading') step.setAttribute('aria-current', 'step');
148
+ else step.removeAttribute('aria-current');
149
+ }
150
+
151
+ private sync() {
152
+ const current = this.currentValue;
153
+ const finished = current > this.total;
154
+
155
+ this.stepTargets.forEach((step, index) => {
156
+ const number = index + 1;
157
+ this.setStatus(step, number === current ? 'current' : number < this.furthest ? 'complete' : 'upcoming');
158
+ });
159
+ this.panelTargets.forEach((panel) => (panel.hidden = Number(panel.dataset.step) !== current));
160
+ this.completionTargets.forEach((el) => (el.hidden = !finished));
161
+ this.syncButtons();
162
+
163
+ const title = this.currentStep?.querySelector('[id$="-step-' + current + '"]')?.textContent ?? '';
164
+ this.summaryTargets.forEach((el) => {
165
+ if (finished) el.hidden = true;
166
+ else {
167
+ el.hidden = false;
168
+ el.textContent = `${this.summaryValue.replace('%{current}', String(current)).replace('%{total}', String(this.total))}: ${title}`;
169
+ }
170
+ });
171
+
172
+ const shown = finished ? this.completionTargets[0] : this.currentPanel;
173
+ shown?.focus({ preventScroll: true });
174
+ this.dispatch('change', { detail: { current, total: this.total } });
175
+ }
176
+
177
+ private syncButtons() {
178
+ const current = this.currentValue;
179
+ const finished = current > this.total;
180
+ const last = current === this.total;
181
+ this.previousTargets.forEach((button) => {
182
+ button.hidden = finished || current <= 1;
183
+ });
184
+ this.nextTargets.forEach((el) => (el.hidden = finished || (last && this.submitTargets.length > 0)));
185
+ this.submitTargets.forEach((el) => (el.hidden = !last));
186
+ }
187
+ }
@@ -11,7 +11,6 @@ packages:
11
11
  "@hotwired/stimulus": "^3.2.2"
12
12
  ag-grid-community: "^36.1.0"
13
13
  cally: "^0.9.2"
14
- lucide: "^0.545.0"
15
14
  tw-animate-css: "^1.4.0"
16
15
 
17
16
  # Versions of the gems a component needs beyond view_component and tailwind_merge.
@@ -45,6 +44,8 @@ components:
45
44
  description: A checkbox with label, standalone or bound to a form builder.
46
45
  collapsible:
47
46
  description: A section that opens and closes under its trigger, like a branch of a nav tree.
47
+ confirm_dialog:
48
+ description: A styled dialog that answers data-turbo-confirm, in place of the browser's confirm box.
48
49
  data_grid:
49
50
  description: A sortable, filterable, server-paged table on AG Grid.
50
51
  date_picker:
@@ -53,12 +54,14 @@ components:
53
54
  description: A modal dialog on the native <dialog> element.
54
55
  divider:
55
56
  description: A horizontal or vertical rule, optionally labelled.
57
+ empty_state:
58
+ description: What a page shows when it has nothing to list yet, with a way to add the first thing.
56
59
  file_field:
57
60
  description: A drag-and-drop file picker with a label, hint and error message, standalone or with a form builder.
58
61
  form_field:
59
62
  description: A label, hint and error message wired to any form control.
60
63
  icon:
61
- description: A Lucide icon.
64
+ description: An SVG icon from your chosen icon library, drawn inline on the server.
62
65
  image:
63
66
  description: An image with consistent sizing and corner radius.
64
67
  input:
@@ -96,6 +99,8 @@ components:
96
99
  description: A pulsing placeholder shown in a piece of content's shape while it loads.
97
100
  spinner:
98
101
  description: A loading indicator.
102
+ stepper:
103
+ description: The steps of a multi-step form, each one done, current or still to come.
99
104
  switch:
100
105
  description: An on/off toggle.
101
106
  table:
@@ -114,6 +119,8 @@ components:
114
119
  - app/views/layouts/_theme_script.html.erb
115
120
  toast:
116
121
  description: A stacked, auto-dismissing message, pushed from the client or a Turbo Stream.
122
+ toggle_group:
123
+ description: A row of buttons where one or several are chosen, posting like radios or checkboxes.
117
124
  tooltip:
118
125
  description: A hint shown on hover and focus.
119
126
  typography:
@@ -13,6 +13,9 @@ en:
13
13
  hint: 'Type the date as %{pattern}, or use the calendar'
14
14
  previous: 'Previous month'
15
15
  next: 'Next month'
16
+ confirm_dialog:
17
+ confirm: 'Confirm'
18
+ cancel: 'Cancel'
16
19
  data_grid:
17
20
  empty: 'Nothing to show'
18
21
  breadcrumb:
@@ -44,6 +47,14 @@ en:
44
47
  next: 'Go to next page'
45
48
  next_label: 'Next'
46
49
  more: 'More pages'
50
+ stepper:
51
+ label: 'Progress'
52
+ complete: 'Completed'
53
+ current: 'Current step'
54
+ upcoming: 'Not started'
55
+ error: 'Needs attention'
56
+ loading: 'Checking'
57
+ summary: 'Step %{current} of %{total}'
47
58
  select:
48
59
  placeholder: 'Choose…'
49
60
  search: 'Search'
@@ -15,7 +15,7 @@ component fits, and never build a second version of a component that exists.
15
15
  - Lookbook previews: `test/components/previews/ui/`
16
16
  - Design tokens: `app/assets/tailwind/velvetkit.css`
17
17
  - Strings: `config/locales/velvetkit.en.yml`, under `ui.`
18
- - Icons: `app/javascript/velvetkit_icons.ts`
18
+ - Icons: `app/assets/icons/`, one SVG per icon, from the library named in `config/velvetkit.yml`
19
19
 
20
20
  ## Rules
21
21
 
@@ -44,9 +44,12 @@ component fits, and never build a second version of a component that exists.
44
44
  component with everything it depends on, and refreshes this file.
45
45
  Available: {{available}}.
46
46
 
47
- 5. **Icons are Lucide names** (`UI::Icon.new(name: "calendar")`). An icon the
48
- app hasn't used before must be added to `app/javascript/velvetkit_icons.ts`,
49
- in both the import list and the `icons` object, or it renders empty.
47
+ 5. **Icons are SVG files** in `app/assets/icons`, named as the app's icon
48
+ library names them (`icons:` in `config/velvetkit.yml`: lucide, tabler or
49
+ phosphor). `UI::Icon.new(name: "calendar")` draws
50
+ `app/assets/icons/calendar.svg`. Before using an icon the app doesn't have
51
+ yet, run `bin/rails generate velvetkit:icons calendar`; one with no file
52
+ draws a dashed square.
50
53
 
51
54
  6. **User-facing text goes through I18n**, as the components' own strings do.
52
55
 
@@ -0,0 +1,39 @@
1
+ ISC License
2
+
3
+ Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ ---
18
+
19
+ The MIT License (MIT) (for portions derived from Feather)
20
+
21
+ Copyright (c) 2013-2023 Cole Bemis
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining a copy
24
+ of this software and associated documentation files (the "Software"), to deal
25
+ in the Software without restriction, including without limitation the rights
26
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
+ copies of the Software, and to permit persons to whom the Software is
28
+ furnished to do so, subject to the following conditions:
29
+
30
+ The above copyright notice and this permission notice shall be included in all
31
+ copies or substantial portions of the Software.
32
+
33
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ SOFTWARE.
@@ -0,0 +1,17 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-align-center"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M21 5H3" />
15
+ <path d="M17 12H7" />
16
+ <path d="M19 19H5" />
17
+ </svg>
@@ -0,0 +1,17 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-align-left"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M21 5H3" />
15
+ <path d="M15 12H3" />
16
+ <path d="M17 19H3" />
17
+ </svg>
@@ -0,0 +1,17 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-align-right"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M21 5H3" />
15
+ <path d="M21 12H9" />
16
+ <path d="M21 19H7" />
17
+ </svg>
@@ -0,0 +1,16 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-arrow-left"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="m12 19-7-7 7-7" />
15
+ <path d="M19 12H5" />
16
+ </svg>
@@ -0,0 +1,16 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-arrow-right"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M5 12h14" />
15
+ <path d="m12 5 7 7-7 7" />
16
+ </svg>
@@ -0,0 +1,16 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-badge-check"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" />
15
+ <path d="m9 12 2 2 4-4" />
16
+ </svg>
@@ -0,0 +1,18 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-bar-chart-3"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M3 3v16a2 2 0 0 0 2 2h16" />
15
+ <path d="M18 17V9" />
16
+ <path d="M13 17V5" />
17
+ <path d="M8 17v-3" />
18
+ </svg>
@@ -0,0 +1,16 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-bell"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M10.268 21a2 2 0 0 0 3.464 0" />
15
+ <path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" />
16
+ </svg>
@@ -0,0 +1,15 @@
1
+ <!-- @license lucide-static v0.545.0 - ISC -->
2
+ <svg
3
+ class="lucide lucide-bold"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ stroke="currentColor"
10
+ stroke-width="2"
11
+ stroke-linecap="round"
12
+ stroke-linejoin="round"
13
+ >
14
+ <path d="M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" />
15
+ </svg>