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.
- checksums.yaml +4 -4
- data/README.md +25 -7
- data/lib/generators/velvetkit/add/add_generator.rb +19 -0
- data/lib/generators/velvetkit/helpers.rb +29 -2
- data/lib/generators/velvetkit/icons/icons_generator.rb +71 -0
- data/lib/generators/velvetkit/install/install_generator.rb +9 -12
- data/lib/velvetkit/icons.rb +148 -0
- data/lib/velvetkit/registry.rb +5 -2
- data/lib/velvetkit/version.rb +1 -1
- data/lib/velvetkit.rb +1 -0
- data/registry/app/components/ui/alert.rb +1 -1
- data/registry/app/components/ui/confirm_dialog.html.erb +13 -0
- data/registry/app/components/ui/confirm_dialog.rb +55 -0
- data/registry/app/components/ui/empty_state.html.erb +20 -0
- data/registry/app/components/ui/empty_state.rb +46 -0
- data/registry/app/components/ui/icon.html.erb +1 -1
- data/registry/app/components/ui/icon.rb +80 -8
- data/registry/app/components/ui/password_input.html.erb +1 -1
- data/registry/app/components/ui/stepper/step.html.erb +27 -0
- data/registry/app/components/ui/stepper/step.rb +213 -0
- data/registry/app/components/ui/stepper.html.erb +19 -0
- data/registry/app/components/ui/stepper.rb +145 -0
- data/registry/app/components/ui/theme_toggle.rb +2 -4
- data/registry/app/components/ui/toast.rb +6 -6
- data/registry/app/components/ui/toggle_group/item.html.erb +1 -0
- data/registry/app/components/ui/toggle_group/item.rb +85 -0
- data/registry/app/components/ui/toggle_group.html.erb +1 -0
- data/registry/app/components/ui/toggle_group.rb +79 -0
- data/registry/app/javascript/controllers/ui/confirm_dialog_controller.ts +110 -0
- data/registry/app/javascript/controllers/ui/stepper_controller.ts +187 -0
- data/registry/components.yml +9 -2
- data/registry/config/locales/velvetkit.en.yml +11 -0
- data/registry/docs/agents.md +7 -4
- data/registry/icons/lucide/LICENSE +39 -0
- data/registry/icons/lucide/align-center.svg +17 -0
- data/registry/icons/lucide/align-left.svg +17 -0
- data/registry/icons/lucide/align-right.svg +17 -0
- data/registry/icons/lucide/arrow-left.svg +16 -0
- data/registry/icons/lucide/arrow-right.svg +16 -0
- data/registry/icons/lucide/badge-check.svg +16 -0
- data/registry/icons/lucide/bar-chart-3.svg +18 -0
- data/registry/icons/lucide/bell.svg +16 -0
- data/registry/icons/lucide/bold.svg +15 -0
- data/registry/icons/lucide/book-open.svg +16 -0
- data/registry/icons/lucide/calendar.svg +18 -0
- data/registry/icons/lucide/chart-column.svg +18 -0
- data/registry/icons/lucide/check.svg +15 -0
- data/registry/icons/lucide/chevron-down.svg +15 -0
- data/registry/icons/lucide/chevron-left.svg +15 -0
- data/registry/icons/lucide/chevron-right.svg +15 -0
- data/registry/icons/lucide/chevrons-up-down.svg +16 -0
- data/registry/icons/lucide/circle-alert.svg +17 -0
- data/registry/icons/lucide/circle-check.svg +16 -0
- data/registry/icons/lucide/cloud.svg +15 -0
- data/registry/icons/lucide/credit-card.svg +16 -0
- data/registry/icons/lucide/ellipsis-vertical.svg +17 -0
- data/registry/icons/lucide/ellipsis.svg +17 -0
- data/registry/icons/lucide/eye-off.svg +18 -0
- data/registry/icons/lucide/eye.svg +16 -0
- data/registry/icons/lucide/file-text.svg +19 -0
- data/registry/icons/lucide/folder-kanban.svg +18 -0
- data/registry/icons/lucide/git-branch.svg +18 -0
- data/registry/icons/lucide/globe.svg +17 -0
- data/registry/icons/lucide/graduation-cap.svg +17 -0
- data/registry/icons/lucide/grip-vertical.svg +20 -0
- data/registry/icons/lucide/home.svg +16 -0
- data/registry/icons/lucide/inbox.svg +16 -0
- data/registry/icons/lucide/info.svg +17 -0
- data/registry/icons/lucide/italic.svg +17 -0
- data/registry/icons/lucide/layout-dashboard.svg +18 -0
- data/registry/icons/lucide/layout-grid.svg +18 -0
- data/registry/icons/lucide/life-buoy.svg +20 -0
- data/registry/icons/lucide/list.svg +20 -0
- data/registry/icons/lucide/loader.svg +22 -0
- data/registry/icons/lucide/lock.svg +16 -0
- data/registry/icons/lucide/log-out.svg +17 -0
- data/registry/icons/lucide/mail.svg +16 -0
- data/registry/icons/lucide/menu.svg +17 -0
- data/registry/icons/lucide/message-circle.svg +15 -0
- data/registry/icons/lucide/monitor.svg +17 -0
- data/registry/icons/lucide/moon.svg +15 -0
- data/registry/icons/lucide/newspaper.svg +18 -0
- data/registry/icons/lucide/panel-left.svg +16 -0
- data/registry/icons/lucide/plus.svg +16 -0
- data/registry/icons/lucide/qr-code.svg +26 -0
- data/registry/icons/lucide/rocket.svg +18 -0
- data/registry/icons/lucide/rotate-cw.svg +16 -0
- data/registry/icons/lucide/search.svg +16 -0
- data/registry/icons/lucide/settings.svg +16 -0
- data/registry/icons/lucide/shield-check.svg +16 -0
- data/registry/icons/lucide/shield.svg +15 -0
- data/registry/icons/lucide/store.svg +17 -0
- data/registry/icons/lucide/sun.svg +23 -0
- data/registry/icons/lucide/trash-2.svg +19 -0
- data/registry/icons/lucide/underline.svg +16 -0
- data/registry/icons/lucide/upload.svg +17 -0
- data/registry/icons/lucide/user.svg +16 -0
- data/registry/icons/lucide/users.svg +18 -0
- data/registry/icons/lucide/workflow.svg +17 -0
- data/registry/icons/lucide/x.svg +16 -0
- data/registry/icons/phosphor/LICENSE +21 -0
- data/registry/icons/phosphor/arrow-clockwise.svg +2 -0
- data/registry/icons/phosphor/arrow-left.svg +2 -0
- data/registry/icons/phosphor/arrow-right.svg +2 -0
- data/registry/icons/phosphor/bell.svg +2 -0
- data/registry/icons/phosphor/book-open.svg +2 -0
- data/registry/icons/phosphor/calendar-blank.svg +2 -0
- data/registry/icons/phosphor/caret-down.svg +2 -0
- data/registry/icons/phosphor/caret-left.svg +2 -0
- data/registry/icons/phosphor/caret-right.svg +2 -0
- data/registry/icons/phosphor/caret-up-down.svg +2 -0
- data/registry/icons/phosphor/chart-bar.svg +2 -0
- data/registry/icons/phosphor/chat-circle.svg +2 -0
- data/registry/icons/phosphor/check-circle.svg +2 -0
- data/registry/icons/phosphor/check.svg +2 -0
- data/registry/icons/phosphor/cloud.svg +2 -0
- data/registry/icons/phosphor/credit-card.svg +2 -0
- data/registry/icons/phosphor/desktop.svg +2 -0
- data/registry/icons/phosphor/dots-six-vertical.svg +2 -0
- data/registry/icons/phosphor/dots-three-vertical.svg +2 -0
- data/registry/icons/phosphor/dots-three.svg +2 -0
- data/registry/icons/phosphor/envelope.svg +2 -0
- data/registry/icons/phosphor/eye-slash.svg +2 -0
- data/registry/icons/phosphor/eye.svg +2 -0
- data/registry/icons/phosphor/file-text.svg +2 -0
- data/registry/icons/phosphor/flow-arrow.svg +2 -0
- data/registry/icons/phosphor/gear.svg +2 -0
- data/registry/icons/phosphor/git-branch.svg +2 -0
- data/registry/icons/phosphor/globe.svg +2 -0
- data/registry/icons/phosphor/graduation-cap.svg +2 -0
- data/registry/icons/phosphor/grid-four.svg +2 -0
- data/registry/icons/phosphor/house.svg +2 -0
- data/registry/icons/phosphor/info.svg +2 -0
- data/registry/icons/phosphor/kanban.svg +2 -0
- data/registry/icons/phosphor/lifebuoy.svg +2 -0
- data/registry/icons/phosphor/list.svg +2 -0
- data/registry/icons/phosphor/lock.svg +2 -0
- data/registry/icons/phosphor/magnifying-glass.svg +2 -0
- data/registry/icons/phosphor/moon.svg +2 -0
- data/registry/icons/phosphor/newspaper.svg +2 -0
- data/registry/icons/phosphor/plus.svg +2 -0
- data/registry/icons/phosphor/qr-code.svg +2 -0
- data/registry/icons/phosphor/rocket.svg +2 -0
- data/registry/icons/phosphor/seal-check.svg +2 -0
- data/registry/icons/phosphor/shield-check.svg +2 -0
- data/registry/icons/phosphor/shield.svg +2 -0
- data/registry/icons/phosphor/sidebar.svg +2 -0
- data/registry/icons/phosphor/sign-out.svg +2 -0
- data/registry/icons/phosphor/spinner.svg +2 -0
- data/registry/icons/phosphor/squares-four.svg +2 -0
- data/registry/icons/phosphor/storefront.svg +2 -0
- data/registry/icons/phosphor/sun.svg +2 -0
- data/registry/icons/phosphor/text-align-center.svg +2 -0
- data/registry/icons/phosphor/text-align-left.svg +2 -0
- data/registry/icons/phosphor/text-align-right.svg +2 -0
- data/registry/icons/phosphor/text-b.svg +2 -0
- data/registry/icons/phosphor/text-italic.svg +2 -0
- data/registry/icons/phosphor/text-underline.svg +2 -0
- data/registry/icons/phosphor/trash.svg +2 -0
- data/registry/icons/phosphor/tray.svg +2 -0
- data/registry/icons/phosphor/upload-simple.svg +2 -0
- data/registry/icons/phosphor/user.svg +2 -0
- data/registry/icons/phosphor/users.svg +2 -0
- data/registry/icons/phosphor/warning-circle.svg +2 -0
- data/registry/icons/phosphor/x.svg +2 -0
- data/registry/icons/tabler/LICENSE +21 -0
- data/registry/icons/tabler/alert-circle.svg +18 -0
- data/registry/icons/tabler/align-center.svg +18 -0
- data/registry/icons/tabler/align-left.svg +18 -0
- data/registry/icons/tabler/align-right.svg +18 -0
- data/registry/icons/tabler/arrow-left.svg +18 -0
- data/registry/icons/tabler/arrow-right.svg +18 -0
- data/registry/icons/tabler/bell.svg +17 -0
- data/registry/icons/tabler/bold.svg +17 -0
- data/registry/icons/tabler/book.svg +20 -0
- data/registry/icons/tabler/building-store.svg +20 -0
- data/registry/icons/tabler/calendar.svg +21 -0
- data/registry/icons/tabler/chart-bar.svg +19 -0
- data/registry/icons/tabler/check.svg +16 -0
- data/registry/icons/tabler/chevron-down.svg +16 -0
- data/registry/icons/tabler/chevron-left.svg +16 -0
- data/registry/icons/tabler/chevron-right.svg +16 -0
- data/registry/icons/tabler/circle-check.svg +17 -0
- data/registry/icons/tabler/cloud.svg +16 -0
- data/registry/icons/tabler/credit-card.svg +19 -0
- data/registry/icons/tabler/device-desktop.svg +19 -0
- data/registry/icons/tabler/dots-vertical.svg +18 -0
- data/registry/icons/tabler/dots.svg +18 -0
- data/registry/icons/tabler/eye-off.svg +18 -0
- data/registry/icons/tabler/eye.svg +17 -0
- data/registry/icons/tabler/file-text.svg +20 -0
- data/registry/icons/tabler/git-branch.svg +21 -0
- data/registry/icons/tabler/grip-vertical.svg +21 -0
- data/registry/icons/tabler/home.svg +18 -0
- data/registry/icons/tabler/inbox.svg +17 -0
- data/registry/icons/tabler/info-circle.svg +18 -0
- data/registry/icons/tabler/italic.svg +18 -0
- data/registry/icons/tabler/layout-dashboard.svg +19 -0
- data/registry/icons/tabler/layout-grid.svg +19 -0
- data/registry/icons/tabler/layout-kanban.svg +19 -0
- data/registry/icons/tabler/layout-sidebar.svg +17 -0
- data/registry/icons/tabler/lifebuoy.svg +21 -0
- data/registry/icons/tabler/list.svg +21 -0
- data/registry/icons/tabler/loader.svg +23 -0
- data/registry/icons/tabler/lock.svg +18 -0
- data/registry/icons/tabler/logout.svg +18 -0
- data/registry/icons/tabler/mail.svg +17 -0
- data/registry/icons/tabler/menu-2.svg +18 -0
- data/registry/icons/tabler/message-circle.svg +16 -0
- data/registry/icons/tabler/moon.svg +16 -0
- data/registry/icons/tabler/news.svg +19 -0
- data/registry/icons/tabler/plus.svg +17 -0
- data/registry/icons/tabler/qrcode.svg +27 -0
- data/registry/icons/tabler/rocket.svg +18 -0
- data/registry/icons/tabler/rosette-discount-check.svg +17 -0
- data/registry/icons/tabler/rotate-clockwise.svg +16 -0
- data/registry/icons/tabler/school.svg +17 -0
- data/registry/icons/tabler/search.svg +17 -0
- data/registry/icons/tabler/selector.svg +17 -0
- data/registry/icons/tabler/settings.svg +17 -0
- data/registry/icons/tabler/shield-check.svg +17 -0
- data/registry/icons/tabler/shield.svg +16 -0
- data/registry/icons/tabler/sitemap.svg +20 -0
- data/registry/icons/tabler/sun.svg +17 -0
- data/registry/icons/tabler/trash.svg +20 -0
- data/registry/icons/tabler/underline.svg +17 -0
- data/registry/icons/tabler/upload.svg +18 -0
- data/registry/icons/tabler/user.svg +17 -0
- data/registry/icons/tabler/users.svg +19 -0
- data/registry/icons/tabler/world.svg +20 -0
- data/registry/icons/tabler/x.svg +17 -0
- data/registry/icons.yml +74 -0
- data/registry/test/components/previews/ui/confirm_dialog_preview/destructive.html.erb +7 -0
- data/registry/test/components/previews/ui/confirm_dialog_preview/in_form.html.erb +6 -0
- data/registry/test/components/previews/ui/confirm_dialog_preview/on_link.html.erb +5 -0
- data/registry/test/components/previews/ui/confirm_dialog_preview/plain.html.erb +3 -0
- data/registry/test/components/previews/ui/confirm_dialog_preview/with_description.html.erb +4 -0
- data/registry/test/components/previews/ui/confirm_dialog_preview.rb +20 -0
- data/registry/test/components/previews/ui/empty_state_preview/in_card.html.erb +7 -0
- data/registry/test/components/previews/ui/empty_state_preview/no_results.html.erb +3 -0
- data/registry/test/components/previews/ui/empty_state_preview/outline.html.erb +3 -0
- data/registry/test/components/previews/ui/empty_state_preview/with_actions.html.erb +4 -0
- data/registry/test/components/previews/ui/empty_state_preview/with_media.html.erb +8 -0
- data/registry/test/components/previews/ui/empty_state_preview.rb +26 -0
- data/registry/test/components/previews/ui/icon_preview/common.html.erb +19 -3
- data/registry/test/components/previews/ui/icon_preview/labelled.html.erb +4 -0
- data/registry/test/components/previews/ui/icon_preview/missing.html.erb +3 -0
- data/registry/test/components/previews/ui/icon_preview.rb +18 -3
- data/registry/test/components/previews/ui/input_group_preview/playground.html.erb +2 -2
- data/registry/test/components/previews/ui/input_group_preview.rb +3 -3
- data/registry/test/components/previews/ui/stepper_preview/approvals.html.erb +9 -0
- data/registry/test/components/previews/ui/stepper_preview/checklist.html.erb +12 -0
- data/registry/test/components/previews/ui/stepper_preview/dot_wizard.html.erb +41 -0
- data/registry/test/components/previews/ui/stepper_preview/failed_deploy.html.erb +13 -0
- data/registry/test/components/previews/ui/stepper_preview/inline.html.erb +31 -0
- data/registry/test/components/previews/ui/stepper_preview/onboarding.html.erb +12 -0
- data/registry/test/components/previews/ui/stepper_preview/order_tracking.html.erb +10 -0
- data/registry/test/components/previews/ui/stepper_preview/price_calculator.html.erb +14 -0
- data/registry/test/components/previews/ui/stepper_preview/server_driven.html.erb +20 -0
- data/registry/test/components/previews/ui/stepper_preview/sidebar.html.erb +43 -0
- data/registry/test/components/previews/ui/stepper_preview/wizard.html.erb +55 -0
- data/registry/test/components/previews/ui/stepper_preview.rb +57 -0
- data/registry/test/components/previews/ui/toggle_group_preview/icon_only.html.erb +5 -0
- data/registry/test/components/previews/ui/toggle_group_preview/in_form.html.erb +11 -0
- data/registry/test/components/previews/ui/toggle_group_preview/multiple.html.erb +5 -0
- data/registry/test/components/previews/ui/toggle_group_preview/outline.html.erb +5 -0
- data/registry/test/components/previews/ui/toggle_group_preview/sizes.html.erb +9 -0
- data/registry/test/components/previews/ui/toggle_group_preview/with_icons.html.erb +5 -0
- data/registry/test/components/previews/ui/toggle_group_preview.rb +36 -0
- data/registry/test/components/ui/accordion/trigger_test.rb +1 -1
- data/registry/test/components/ui/alert_test.rb +10 -10
- data/registry/test/components/ui/badge_test.rb +3 -3
- data/registry/test/components/ui/banner_test.rb +3 -3
- data/registry/test/components/ui/breadcrumb/ellipsis_test.rb +2 -2
- data/registry/test/components/ui/button_test.rb +17 -14
- data/registry/test/components/ui/button_to_test.rb +2 -2
- data/registry/test/components/ui/checkbox_test.rb +2 -2
- data/registry/test/components/ui/confirm_dialog_test.rb +68 -0
- data/registry/test/components/ui/empty_state_test.rb +87 -0
- data/registry/test/components/ui/icon_test.rb +60 -20
- data/registry/test/components/ui/input_group_test.rb +1 -1
- data/registry/test/components/ui/link_test.rb +3 -3
- data/registry/test/components/ui/navigation_menu_test.rb +2 -2
- data/registry/test/components/ui/session_tabs_test.rb +3 -3
- data/registry/test/components/ui/spinner_test.rb +9 -9
- data/registry/test/components/ui/stepper_test.rb +239 -0
- data/registry/test/components/ui/tabs/trigger_test.rb +2 -2
- data/registry/test/components/ui/theme_toggle_test.rb +6 -8
- data/registry/test/components/ui/toast_test.rb +11 -10
- data/registry/test/components/ui/toggle_group_test.rb +162 -0
- metadata +253 -2
- data/registry/app/javascript/velvetkit_icons.ts +0 -70
|
@@ -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>
|
data/registry/icons.yml
ADDED
|
@@ -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,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,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
|
-
<%
|
|
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(
|
|
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>
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
class UI::IconPreview < ViewComponent::Preview
|
|
4
4
|
# @label Playground
|
|
5
|
-
# @param
|
|
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(
|
|
8
|
-
render(UI::Icon.new(name:
|
|
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:
|
|
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:
|
|
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
|
|
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,
|
|
12
|
-
render_with_template(locals: { left_icon: left_icon, right_icon: right_icon,
|
|
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>
|