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
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// Lucide icons for VelvetKit components.
|
|
2
|
-
//
|
|
3
|
-
// The Icon component renders `<i data-lucide="name">`; createIcons swaps each
|
|
4
|
-
// one for its SVG. Only the icons listed here are bundled, so an icon your
|
|
5
|
-
// own views use has to be added in BOTH places below — one only in the import
|
|
6
|
-
// list renders as an empty element with a console warning and no error.
|
|
7
|
-
import {
|
|
8
|
-
createIcons,
|
|
9
|
-
Calendar,
|
|
10
|
-
Check,
|
|
11
|
-
ChevronDown,
|
|
12
|
-
ChevronLeft,
|
|
13
|
-
ChevronRight,
|
|
14
|
-
ChevronsUpDown,
|
|
15
|
-
CircleAlert,
|
|
16
|
-
CircleCheck,
|
|
17
|
-
Ellipsis,
|
|
18
|
-
Eye,
|
|
19
|
-
EyeOff,
|
|
20
|
-
Info,
|
|
21
|
-
Loader,
|
|
22
|
-
Mail,
|
|
23
|
-
Monitor,
|
|
24
|
-
Moon,
|
|
25
|
-
PanelLeft,
|
|
26
|
-
Sun,
|
|
27
|
-
Upload,
|
|
28
|
-
X,
|
|
29
|
-
} from 'lucide';
|
|
30
|
-
|
|
31
|
-
const icons = {
|
|
32
|
-
Calendar,
|
|
33
|
-
Check,
|
|
34
|
-
ChevronDown,
|
|
35
|
-
ChevronLeft,
|
|
36
|
-
ChevronRight,
|
|
37
|
-
ChevronsUpDown,
|
|
38
|
-
CircleAlert,
|
|
39
|
-
CircleCheck,
|
|
40
|
-
Ellipsis,
|
|
41
|
-
Eye,
|
|
42
|
-
EyeOff,
|
|
43
|
-
Info,
|
|
44
|
-
Loader,
|
|
45
|
-
Mail,
|
|
46
|
-
Monitor,
|
|
47
|
-
Moon,
|
|
48
|
-
PanelLeft,
|
|
49
|
-
Sun,
|
|
50
|
-
Upload,
|
|
51
|
-
X,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// Icons are drawn whenever one is added to the page, however it arrives: a
|
|
55
|
-
// Turbo visit, frame or stream, or a controller's own markup. Only <i> is
|
|
56
|
-
// watched: the SVG that replaces it keeps data-lucide, and drawing on that
|
|
57
|
-
// would draw forever.
|
|
58
|
-
const draw = () => createIcons({ icons });
|
|
59
|
-
const added = (records: MutationRecord[]) =>
|
|
60
|
-
records.some((record) =>
|
|
61
|
-
Array.from(record.addedNodes).some(
|
|
62
|
-
(node) => node instanceof Element && (node.matches('i[data-lucide]') || node.querySelector('i[data-lucide]') !== null),
|
|
63
|
-
),
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
draw();
|
|
67
|
-
new MutationObserver((records) => added(records) && draw()).observe(document.documentElement, {
|
|
68
|
-
childList: true,
|
|
69
|
-
subtree: true,
|
|
70
|
-
});
|