shadcn-ui 0.0.1 → 0.0.3
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/.env +1 -0
- data/.prettierrc.json +6 -0
- data/README.md +260 -0
- data/Rakefile +6 -3
- data/app/assets/stylesheets/{application.scss → application.css} +0 -27
- data/app/assets/stylesheets/application.tailwind.css +46 -73
- data/app/assets/stylesheets/shadcn.css +216 -0
- data/app/controllers/components_controller.rb +1 -1
- data/app/controllers/documentation_controller.rb +10 -0
- data/app/helpers/application_helper.rb +19 -0
- data/app/helpers/components/accordion_helper.rb +14 -1
- data/app/helpers/components/alert_helper.rb +4 -2
- data/app/helpers/components/button_helper.rb +2 -1
- data/app/helpers/components/card_helper.rb +2 -2
- data/app/helpers/components/checkbox_helper.rb +2 -2
- data/app/helpers/components/collapsible_helper.rb +8 -0
- data/app/helpers/components/filter_helper.rb +12 -0
- data/app/helpers/components/input_helper.rb +21 -0
- data/app/helpers/components/label_helper.rb +5 -0
- data/app/helpers/components/list_helper.rb +15 -0
- data/app/helpers/components/progress_helper.rb +5 -0
- data/app/helpers/components/sheet_helper.rb +29 -0
- data/app/helpers/components/skeleton_helper.rb +5 -0
- data/app/helpers/components/slider_helper.rb +5 -0
- data/app/helpers/components_helper.rb +11 -0
- data/app/helpers/documentation_helper.rb +2 -0
- data/app/helpers/examples_helper.rb +1 -2
- data/app/javascript/controllers/theme_controller.js +25 -0
- data/app/javascript/controllers/ui/dialog_controller.js +3 -1
- data/app/javascript/controllers/ui/dropdown_controller.js +2 -22
- data/app/javascript/controllers/ui/filter_controller.js +20 -0
- data/app/javascript/controllers/ui/popover_controller.js +29 -1
- data/app/javascript/controllers/ui/sheet_controller.js +33 -0
- data/app/javascript/controllers/ui/slider_controller.js +14 -0
- data/app/javascript/controllers/ui/tooltip_controller.js +1 -1
- data/app/views/application/index.html.erb +122 -0
- data/app/views/components/ui/_accordion.html.erb +2 -2
- data/app/views/components/ui/_alert.html.erb +15 -3
- data/app/views/components/ui/_alert_dialog.html.erb +1 -1
- data/app/views/components/ui/_card.html.erb +2 -2
- data/app/views/components/ui/_checkbox.html.erb +3 -7
- data/app/views/components/ui/_collapsible.html.erb +2 -6
- data/app/views/components/ui/_command.html.erb +0 -0
- data/app/views/components/ui/_dialog.html.erb +1 -1
- data/app/views/components/ui/_filter.html.erb +14 -0
- data/app/views/components/ui/_input.html.erb +8 -0
- data/app/views/components/ui/_label.html.erb +3 -0
- data/app/views/components/ui/_list.html.erb +5 -0
- data/app/views/components/ui/_progress.html.erb +15 -0
- data/app/views/components/ui/_sheet.html.erb +44 -0
- data/app/views/components/ui/_skeleton.html.erb +1 -0
- data/app/views/components/ui/_slider.html.erb +2 -0
- data/app/views/components/ui/_textarea.html.erb +1 -1
- data/app/views/components/ui/shared/{_dialog_background.html.erb → _backdrop.html.erb} +1 -0
- data/app/views/components/ui/svg/_check.html.erb +11 -0
- data/app/views/documentation/about.html.md +20 -0
- data/app/views/documentation/generators.html.md +1 -0
- data/app/views/documentation/index.html.erb.bak +70 -0
- data/app/views/documentation/index.html.md +37 -0
- data/app/views/documentation/installation.html.md +377 -0
- data/app/views/examples/components/accordion/_usage.html.erb +15 -0
- data/app/views/examples/components/accordion/code/_block.html.erb +8 -0
- data/app/views/examples/components/accordion/code/_description.html.erb +7 -0
- data/app/views/examples/components/accordion/code/preview.erb +3 -0
- data/app/views/examples/components/accordion/code/usage.erb +16 -0
- data/app/views/examples/components/accordion.html.erb +36 -0
- data/app/views/examples/components/alert/_usage.html.erb +10 -0
- data/app/views/examples/components/alert/code/_attention.erb +3 -0
- data/app/views/examples/components/alert/code/_destructive.erb +2 -0
- data/app/views/examples/components/alert/code/_info.erb +3 -0
- data/app/views/examples/components/alert/code/_no_icon.erb +3 -0
- data/app/views/examples/components/alert/code/_success.erb +3 -0
- data/app/views/examples/components/alert/code/preview.erb +2 -0
- data/app/views/examples/components/alert/code/usage.erb +1 -0
- data/app/views/examples/components/alert.html.erb +90 -7
- data/app/views/examples/components/badge/_usage.html.erb +10 -0
- data/app/views/examples/components/badge/code/preview.erb +5 -0
- data/app/views/examples/components/badge/code/usage.erb +1 -0
- data/app/views/examples/components/badge.html.erb +11 -4
- data/app/views/examples/components/button/_usage.html.erb +19 -0
- data/app/views/examples/components/button/code/preview.erb +13 -0
- data/app/views/examples/components/button/code/usage.erb +6 -0
- data/app/views/examples/components/button.html.erb +20 -6
- data/app/views/examples/components/card/_usage.html.erb +21 -0
- data/app/views/examples/components/card/code/_form.erb +72 -0
- data/app/views/examples/components/card/code/_notifications.erb +61 -0
- data/app/views/examples/components/card/code/preview.erb +6 -0
- data/app/views/examples/components/card/code/usage.erb +3 -0
- data/app/views/examples/components/card.html.erb +35 -143
- data/app/views/examples/components/checkbox/_usage.html.erb +9 -0
- data/app/views/examples/components/checkbox/code/preview.erb +2 -0
- data/app/views/examples/components/checkbox/code/usage.erb +1 -0
- data/app/views/examples/components/checkbox.html.erb +14 -0
- data/app/views/examples/components/collapsible/_usage.html.erb +16 -0
- data/app/views/examples/components/collapsible/code/preview.erb +9 -0
- data/app/views/examples/components/collapsible/code/usage.erb +7 -0
- data/app/views/examples/components/collapsible.html.erb +13 -3
- data/app/views/examples/components/dialog.html.erb +1 -1
- data/app/views/examples/components/filter.html.erb +25 -0
- data/app/views/examples/components/input.html.erb +18 -0
- data/app/views/examples/components/label.html.erb +13 -0
- data/app/views/examples/components/progress.html.erb +12 -0
- data/app/views/examples/components/sheet.html.erb +19 -0
- data/app/views/examples/components/skeleton.html.erb +12 -0
- data/app/views/examples/components/slider.html.erb +12 -0
- data/app/views/layouts/application.html.erb +2 -3
- data/app/views/layouts/component.html.erb +2 -2
- data/app/views/layouts/documentation.html.erb +39 -0
- data/app/views/layouts/shared/_components.html.erb +62 -0
- data/app/views/layouts/shared/_header.html.erb +25 -33
- data/app/views/layouts/shared/_sidebar.html.erb +10 -0
- data/config/application.rb +2 -1
- data/config/importmap.rb +6 -6
- data/config/initializers/markdown.rb +24 -0
- data/config/routes.rb +7 -1
- data/config/shadcn.tailwind.js +98 -0
- data/config/tailwind.config.js +13 -74
- data/lib/components.json +305 -0
- data/lib/generators/shadcn-ui_generator.rb +201 -0
- data/lib/shadcn-ui/version.rb +1 -1
- data/package-lock.json +90 -3
- data/package.json +4 -0
- data/public/accordion.png +0 -0
- metadata +81 -7
- data/app/views/layouts/_sidebar.html.erb +0 -270
- data/lib/generators/shadcn_ui_generator.rb +0 -32
- /data/app/assets/stylesheets/{lambda.light.scss → lambda.light.css} +0 -0
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shadcn-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Avi Flombaum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem is a documentation site and gem that will copy components from
|
14
14
|
the shadcn-ui library into a Ruby on Rails application.
|
@@ -19,6 +19,7 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- ".editorconfig"
|
22
|
+
- ".env"
|
22
23
|
- ".prettierignore"
|
23
24
|
- ".prettierrc.json"
|
24
25
|
- ".rspec"
|
@@ -33,14 +34,16 @@ files:
|
|
33
34
|
- app/assets/builds/.keep
|
34
35
|
- app/assets/config/manifest.js
|
35
36
|
- app/assets/images/.keep
|
36
|
-
- app/assets/stylesheets/application.
|
37
|
+
- app/assets/stylesheets/application.css
|
37
38
|
- app/assets/stylesheets/application.tailwind.css
|
38
|
-
- app/assets/stylesheets/lambda.light.
|
39
|
+
- app/assets/stylesheets/lambda.light.css
|
40
|
+
- app/assets/stylesheets/shadcn.css
|
39
41
|
- app/channels/application_cable/channel.rb
|
40
42
|
- app/channels/application_cable/connection.rb
|
41
43
|
- app/controllers/application_controller.rb
|
42
44
|
- app/controllers/components_controller.rb
|
43
45
|
- app/controllers/concerns/.keep
|
46
|
+
- app/controllers/documentation_controller.rb
|
44
47
|
- app/helpers/application_helper.rb
|
45
48
|
- app/helpers/components/accordion_helper.rb
|
46
49
|
- app/helpers/components/alert_dialog_helper.rb
|
@@ -52,14 +55,23 @@ files:
|
|
52
55
|
- app/helpers/components/collapsible_helper.rb
|
53
56
|
- app/helpers/components/dialog_helper.rb
|
54
57
|
- app/helpers/components/dropdown_menu_helper.rb
|
58
|
+
- app/helpers/components/filter_helper.rb
|
55
59
|
- app/helpers/components/hover_card_helper.rb
|
60
|
+
- app/helpers/components/input_helper.rb
|
61
|
+
- app/helpers/components/label_helper.rb
|
62
|
+
- app/helpers/components/list_helper.rb
|
56
63
|
- app/helpers/components/popover_helper.rb
|
64
|
+
- app/helpers/components/progress_helper.rb
|
57
65
|
- app/helpers/components/seperator_helper.rb
|
66
|
+
- app/helpers/components/sheet_helper.rb
|
67
|
+
- app/helpers/components/skeleton_helper.rb
|
68
|
+
- app/helpers/components/slider_helper.rb
|
58
69
|
- app/helpers/components/textarea_helper.rb
|
59
70
|
- app/helpers/components/toast_helper.rb
|
60
71
|
- app/helpers/components/toggle_helper.rb
|
61
72
|
- app/helpers/components/tooltip_helper.rb
|
62
73
|
- app/helpers/components_helper.rb
|
74
|
+
- app/helpers/documentation_helper.rb
|
63
75
|
- app/helpers/examples_helper.rb
|
64
76
|
- app/javascript/application.js
|
65
77
|
- app/javascript/controllers/application.js
|
@@ -67,13 +79,17 @@ files:
|
|
67
79
|
- app/javascript/controllers/highlight_controller.js
|
68
80
|
- app/javascript/controllers/index.js
|
69
81
|
- app/javascript/controllers/tabs_controller.js
|
82
|
+
- app/javascript/controllers/theme_controller.js
|
70
83
|
- app/javascript/controllers/ui/accordion_controller.js
|
71
84
|
- app/javascript/controllers/ui/checkbox_controller.js
|
72
85
|
- app/javascript/controllers/ui/collapsible_controller.js
|
73
86
|
- app/javascript/controllers/ui/dialog_controller.js
|
74
87
|
- app/javascript/controllers/ui/dropdown_controller.js
|
88
|
+
- app/javascript/controllers/ui/filter_controller.js
|
75
89
|
- app/javascript/controllers/ui/hover-card_controller.js
|
76
90
|
- app/javascript/controllers/ui/popover_controller.js
|
91
|
+
- app/javascript/controllers/ui/sheet_controller.js
|
92
|
+
- app/javascript/controllers/ui/slider_controller.js
|
77
93
|
- app/javascript/controllers/ui/toast_controller.js
|
78
94
|
- app/javascript/controllers/ui/toggle_controller.js
|
79
95
|
- app/javascript/controllers/ui/tooltip_controller.js
|
@@ -91,26 +107,71 @@ files:
|
|
91
107
|
- app/views/components/ui/_card.html.erb
|
92
108
|
- app/views/components/ui/_checkbox.html.erb
|
93
109
|
- app/views/components/ui/_collapsible.html.erb
|
110
|
+
- app/views/components/ui/_command.html.erb
|
94
111
|
- app/views/components/ui/_dialog.html.erb
|
95
112
|
- app/views/components/ui/_dropdown_menu.html.erb
|
113
|
+
- app/views/components/ui/_filter.html.erb
|
96
114
|
- app/views/components/ui/_hover_card.html.erb
|
115
|
+
- app/views/components/ui/_input.html.erb
|
116
|
+
- app/views/components/ui/_label.html.erb
|
117
|
+
- app/views/components/ui/_list.html.erb
|
97
118
|
- app/views/components/ui/_popover.html.erb
|
119
|
+
- app/views/components/ui/_progress.html.erb
|
98
120
|
- app/views/components/ui/_separator.html.erb
|
121
|
+
- app/views/components/ui/_sheet.html.erb
|
122
|
+
- app/views/components/ui/_skeleton.html.erb
|
123
|
+
- app/views/components/ui/_slider.html.erb
|
99
124
|
- app/views/components/ui/_textarea.html.erb
|
100
125
|
- app/views/components/ui/_toast.html.erb
|
101
126
|
- app/views/components/ui/_toggle.html.erb
|
102
127
|
- app/views/components/ui/_tooltip.html.erb
|
103
|
-
- app/views/components/ui/shared/
|
128
|
+
- app/views/components/ui/shared/_backdrop.html.erb
|
104
129
|
- app/views/components/ui/shared/_menu_item.html.erb
|
130
|
+
- app/views/components/ui/svg/_check.html.erb
|
131
|
+
- app/views/documentation/about.html.md
|
132
|
+
- app/views/documentation/generators.html.md
|
133
|
+
- app/views/documentation/index.html.erb.bak
|
134
|
+
- app/views/documentation/index.html.md
|
135
|
+
- app/views/documentation/installation.html.md
|
105
136
|
- app/views/examples/authentication/index.html.erb
|
106
137
|
- app/views/examples/components/accordion.html.erb
|
138
|
+
- app/views/examples/components/accordion/_usage.html.erb
|
139
|
+
- app/views/examples/components/accordion/code/_block.html.erb
|
140
|
+
- app/views/examples/components/accordion/code/_description.html.erb
|
141
|
+
- app/views/examples/components/accordion/code/preview.erb
|
142
|
+
- app/views/examples/components/accordion/code/usage.erb
|
107
143
|
- app/views/examples/components/alert-dialog.html.erb
|
108
144
|
- app/views/examples/components/alert.html.erb
|
145
|
+
- app/views/examples/components/alert/_usage.html.erb
|
146
|
+
- app/views/examples/components/alert/code/_attention.erb
|
147
|
+
- app/views/examples/components/alert/code/_destructive.erb
|
148
|
+
- app/views/examples/components/alert/code/_info.erb
|
149
|
+
- app/views/examples/components/alert/code/_no_icon.erb
|
150
|
+
- app/views/examples/components/alert/code/_success.erb
|
151
|
+
- app/views/examples/components/alert/code/preview.erb
|
152
|
+
- app/views/examples/components/alert/code/usage.erb
|
109
153
|
- app/views/examples/components/badge.html.erb
|
154
|
+
- app/views/examples/components/badge/_usage.html.erb
|
155
|
+
- app/views/examples/components/badge/code/preview.erb
|
156
|
+
- app/views/examples/components/badge/code/usage.erb
|
110
157
|
- app/views/examples/components/button.html.erb
|
158
|
+
- app/views/examples/components/button/_usage.html.erb
|
159
|
+
- app/views/examples/components/button/code/preview.erb
|
160
|
+
- app/views/examples/components/button/code/usage.erb
|
111
161
|
- app/views/examples/components/card.html.erb
|
162
|
+
- app/views/examples/components/card/_usage.html.erb
|
163
|
+
- app/views/examples/components/card/code/_form.erb
|
164
|
+
- app/views/examples/components/card/code/_notifications.erb
|
165
|
+
- app/views/examples/components/card/code/preview.erb
|
166
|
+
- app/views/examples/components/card/code/usage.erb
|
112
167
|
- app/views/examples/components/checkbox.html.erb
|
168
|
+
- app/views/examples/components/checkbox/_usage.html.erb
|
169
|
+
- app/views/examples/components/checkbox/code/preview.erb
|
170
|
+
- app/views/examples/components/checkbox/code/usage.erb
|
113
171
|
- app/views/examples/components/collapsible.html.erb
|
172
|
+
- app/views/examples/components/collapsible/_usage.html.erb
|
173
|
+
- app/views/examples/components/collapsible/code/preview.erb
|
174
|
+
- app/views/examples/components/collapsible/code/usage.erb
|
114
175
|
- app/views/examples/components/dialog.html.erb
|
115
176
|
- app/views/examples/components/dialog/_usage.html.erb
|
116
177
|
- app/views/examples/components/dialog/code/form.erb
|
@@ -118,23 +179,32 @@ files:
|
|
118
179
|
- app/views/examples/components/dialog/code/preview.erb
|
119
180
|
- app/views/examples/components/dialog/code/usage.erb
|
120
181
|
- app/views/examples/components/dropdown-menu.html.erb
|
182
|
+
- app/views/examples/components/filter.html.erb
|
121
183
|
- app/views/examples/components/hover-card.html.erb
|
184
|
+
- app/views/examples/components/input.html.erb
|
185
|
+
- app/views/examples/components/label.html.erb
|
122
186
|
- app/views/examples/components/popover.html.erb
|
187
|
+
- app/views/examples/components/progress.html.erb
|
123
188
|
- app/views/examples/components/separator.html.erb
|
189
|
+
- app/views/examples/components/sheet.html.erb
|
190
|
+
- app/views/examples/components/skeleton.html.erb
|
191
|
+
- app/views/examples/components/slider.html.erb
|
124
192
|
- app/views/examples/components/textarea.html.erb
|
125
193
|
- app/views/examples/components/toast.html.erb
|
126
194
|
- app/views/examples/components/toggle.html.erb
|
127
195
|
- app/views/examples/components/tooltip.html.erb
|
128
|
-
- app/views/layouts/_sidebar.html.erb
|
129
196
|
- app/views/layouts/application.html.erb
|
130
197
|
- app/views/layouts/component.html.erb
|
198
|
+
- app/views/layouts/documentation.html.erb
|
131
199
|
- app/views/layouts/documentation/_breadcrumb.html.erb
|
132
200
|
- app/views/layouts/documentation/_component_header.html.erb
|
133
201
|
- app/views/layouts/documentation/_examples.html.erb
|
134
202
|
- app/views/layouts/documentation/_preview.html.erb
|
135
203
|
- app/views/layouts/mailer.html.erb
|
136
204
|
- app/views/layouts/mailer.text.erb
|
205
|
+
- app/views/layouts/shared/_components.html.erb
|
137
206
|
- app/views/layouts/shared/_header.html.erb
|
207
|
+
- app/views/layouts/shared/_sidebar.html.erb
|
138
208
|
- config.ru
|
139
209
|
- config/application.rb
|
140
210
|
- config/boot.rb
|
@@ -150,16 +220,19 @@ files:
|
|
150
220
|
- config/initializers/content_security_policy.rb
|
151
221
|
- config/initializers/filter_parameter_logging.rb
|
152
222
|
- config/initializers/inflections.rb
|
223
|
+
- config/initializers/markdown.rb
|
153
224
|
- config/initializers/permissions_policy.rb
|
154
225
|
- config/locales/en.yml
|
155
226
|
- config/puma.rb
|
156
227
|
- config/render.yml
|
157
228
|
- config/routes.rb
|
229
|
+
- config/shadcn.tailwind.js
|
158
230
|
- config/storage.yml
|
159
231
|
- config/tailwind.config.js
|
160
232
|
- db/seeds.rb
|
161
233
|
- lib/assets/.keep
|
162
|
-
- lib/
|
234
|
+
- lib/components.json
|
235
|
+
- lib/generators/shadcn-ui_generator.rb
|
163
236
|
- lib/shadcn-ui/shadcn-ui.rb
|
164
237
|
- lib/shadcn-ui/version.rb
|
165
238
|
- lib/tasks/.keep
|
@@ -169,6 +242,7 @@ files:
|
|
169
242
|
- public/404.html
|
170
243
|
- public/422.html
|
171
244
|
- public/500.html
|
245
|
+
- public/accordion.png
|
172
246
|
- public/android-chrome-192x192.png
|
173
247
|
- public/android-chrome-512x512.png
|
174
248
|
- public/apple-touch-icon-precomposed.png
|
@@ -1,270 +0,0 @@
|
|
1
|
-
<aside
|
2
|
-
class="fixed top-14 z-30 -ml-2 hidden h-[calc(100vh-3.5rem)] w-full shrink-0 md:sticky md:block">
|
3
|
-
<div
|
4
|
-
dir="ltr"
|
5
|
-
class="relative overflow-hidden h-full py-6 pl-8 pr-6 lg:py-8"
|
6
|
-
style="
|
7
|
-
position: relative;
|
8
|
-
--radix-scroll-area-corner-width: 0px;
|
9
|
-
--radix-scroll-area-corner-height: 0px;
|
10
|
-
">
|
11
|
-
<style>
|
12
|
-
[data-radix-scroll-area-viewport] {
|
13
|
-
scrollbar-width: none;
|
14
|
-
-ms-overflow-style: none;
|
15
|
-
-webkit-overflow-scrolling: touch;
|
16
|
-
}
|
17
|
-
[data-radix-scroll-area-viewport]::-webkit-scrollbar {
|
18
|
-
display: none;
|
19
|
-
}
|
20
|
-
</style>
|
21
|
-
<div
|
22
|
-
data-radix-scroll-area-viewport=""
|
23
|
-
class="h-full w-full rounded-[inherit]"
|
24
|
-
style="overflow: hidden scroll">
|
25
|
-
<div style="min-width: 100%; display: table">
|
26
|
-
<div class="w-full">
|
27
|
-
<div class="pb-4">
|
28
|
-
<h4 class="mb-1 rounded-md px-2 py-1 text-sm font-semibold">Getting Started</h4>
|
29
|
-
<div class="grid grid-flow-row auto-rows-max text-sm">
|
30
|
-
<a
|
31
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline font-medium text-foreground"
|
32
|
-
target=""
|
33
|
-
rel=""
|
34
|
-
href="/docs">Introduction</a>
|
35
|
-
<a
|
36
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
37
|
-
target=""
|
38
|
-
rel=""
|
39
|
-
href="/docs/installation">Installation</a>
|
40
|
-
<a
|
41
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
42
|
-
target=""
|
43
|
-
rel=""
|
44
|
-
href="/docs/theming">Theming</a>
|
45
|
-
<a
|
46
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
47
|
-
target=""
|
48
|
-
rel=""
|
49
|
-
href="/docs/dark-mode">Dark mode</a>
|
50
|
-
<a
|
51
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
52
|
-
target=""
|
53
|
-
rel=""
|
54
|
-
href="/docs/changelog">Changelog</a>
|
55
|
-
<a
|
56
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
57
|
-
target=""
|
58
|
-
rel=""
|
59
|
-
href="/docs/about">About</a>
|
60
|
-
</div>
|
61
|
-
</div>
|
62
|
-
<div class="pb-4">
|
63
|
-
<h4 class="mb-1 rounded-md px-2 py-1 text-sm font-semibold">Components</h4>
|
64
|
-
<div class="grid grid-flow-row auto-rows-max text-sm">
|
65
|
-
<a
|
66
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
67
|
-
target=""
|
68
|
-
rel=""
|
69
|
-
href="/docs/components/accordion">✅ Accordion</a>
|
70
|
-
<a
|
71
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
72
|
-
target=""
|
73
|
-
rel=""
|
74
|
-
href="/docs/components/alert">✅ Alert</a>
|
75
|
-
<a
|
76
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
77
|
-
target=""
|
78
|
-
rel=""
|
79
|
-
href="/docs/components/alert-dialog">✅ Alert Dialog</a>
|
80
|
-
<span
|
81
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
82
|
-
target=""
|
83
|
-
rel="">❌ Aspect Ratio</span>
|
84
|
-
<span
|
85
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
86
|
-
target=""
|
87
|
-
rel=""
|
88
|
-
href="/docs/components/avatar">❌ Avatar</span>
|
89
|
-
<a
|
90
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
91
|
-
target=""
|
92
|
-
rel=""
|
93
|
-
href="/docs/components/badge">✅ Badge</a>
|
94
|
-
<a
|
95
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
96
|
-
target=""
|
97
|
-
rel=""
|
98
|
-
href="/docs/components/button">✅ Button</a>
|
99
|
-
<span
|
100
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
101
|
-
target=""
|
102
|
-
rel=""
|
103
|
-
href="/docs/components/calendar">❌ Calendar</span>
|
104
|
-
<a
|
105
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
106
|
-
target=""
|
107
|
-
rel=""
|
108
|
-
href="/docs/components/card">✅ Card</a>
|
109
|
-
<a
|
110
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
111
|
-
target=""
|
112
|
-
rel=""
|
113
|
-
href="/docs/components/checkbox">✅ Checkbox</a>
|
114
|
-
<a
|
115
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
116
|
-
target=""
|
117
|
-
rel=""
|
118
|
-
href="/docs/components/collapsible">✅ Collapsible</a>
|
119
|
-
<a
|
120
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
121
|
-
target=""
|
122
|
-
rel=""
|
123
|
-
href="/docs/components/combobox">Combobox</a>
|
124
|
-
<a
|
125
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
126
|
-
target=""
|
127
|
-
rel=""
|
128
|
-
href="/docs/components/command">Command</a>
|
129
|
-
<a
|
130
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
131
|
-
target=""
|
132
|
-
rel=""
|
133
|
-
href="/docs/components/context-menu">Context Menu</a>
|
134
|
-
<a
|
135
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
136
|
-
target=""
|
137
|
-
rel=""
|
138
|
-
href="/docs/components/data-table">Data Table</a>
|
139
|
-
<a
|
140
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
141
|
-
target=""
|
142
|
-
rel=""
|
143
|
-
href="/docs/components/date-picker">Date Picker</a>
|
144
|
-
<a
|
145
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
146
|
-
target=""
|
147
|
-
rel=""
|
148
|
-
href="/docs/components/dialog">✅ Dialog</a>
|
149
|
-
<a
|
150
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
151
|
-
target=""
|
152
|
-
rel=""
|
153
|
-
href="/docs/components/dropdown-menu">Dropdown Menu</a>
|
154
|
-
<a
|
155
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
156
|
-
target=""
|
157
|
-
rel=""
|
158
|
-
href="/docs/components/form">Form</a>
|
159
|
-
<a
|
160
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
161
|
-
target=""
|
162
|
-
rel=""
|
163
|
-
href="/docs/components/hover-card">✅ Hover Card</a>
|
164
|
-
<a
|
165
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
166
|
-
target=""
|
167
|
-
rel=""
|
168
|
-
href="/docs/components/input">Input</a>
|
169
|
-
<a
|
170
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
171
|
-
target=""
|
172
|
-
rel=""
|
173
|
-
href="/docs/components/label">Label</a>
|
174
|
-
<a
|
175
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
176
|
-
target=""
|
177
|
-
rel=""
|
178
|
-
href="/docs/components/menubar">Menubar</a>
|
179
|
-
<a
|
180
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
181
|
-
target=""
|
182
|
-
rel=""
|
183
|
-
href="/docs/components/navigation-menu">Navigation Menu</a>
|
184
|
-
<a
|
185
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
186
|
-
target=""
|
187
|
-
rel=""
|
188
|
-
href="/docs/components/popover">✅ Popover</a>
|
189
|
-
<a
|
190
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
191
|
-
target=""
|
192
|
-
rel=""
|
193
|
-
href="/docs/components/progress">Progress</a>
|
194
|
-
<a
|
195
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
196
|
-
target=""
|
197
|
-
rel=""
|
198
|
-
href="/docs/components/radio-group">Radio Group</a>
|
199
|
-
<a
|
200
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
201
|
-
target=""
|
202
|
-
rel=""
|
203
|
-
href="/docs/components/scroll-area">Scroll Area</a>
|
204
|
-
<a
|
205
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
206
|
-
target=""
|
207
|
-
rel=""
|
208
|
-
href="/docs/components/select">Select</a>
|
209
|
-
<a
|
210
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
211
|
-
target=""
|
212
|
-
rel=""
|
213
|
-
href="/docs/components/separator">✅ Separator</a>
|
214
|
-
<a
|
215
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
216
|
-
target=""
|
217
|
-
rel=""
|
218
|
-
href="/docs/components/sheet">Sheet</a>
|
219
|
-
<a
|
220
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
221
|
-
target=""
|
222
|
-
rel=""
|
223
|
-
href="/docs/components/skeleton">Skeleton</a>
|
224
|
-
<a
|
225
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
226
|
-
target=""
|
227
|
-
rel=""
|
228
|
-
href="/docs/components/slider">Slider</a>
|
229
|
-
<a
|
230
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
231
|
-
target=""
|
232
|
-
rel=""
|
233
|
-
href="/docs/components/switch">Switch</a>
|
234
|
-
<a
|
235
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
236
|
-
target=""
|
237
|
-
rel=""
|
238
|
-
href="/docs/components/table">Table</a>
|
239
|
-
<a
|
240
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
241
|
-
target=""
|
242
|
-
rel=""
|
243
|
-
href="/docs/components/tabs">Tabs</a>
|
244
|
-
<a
|
245
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
246
|
-
target=""
|
247
|
-
rel=""
|
248
|
-
href="/docs/components/textarea">✅ Textarea</a>
|
249
|
-
<a
|
250
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
251
|
-
target=""
|
252
|
-
rel=""
|
253
|
-
href="/docs/components/toast">✅ Toast</a>
|
254
|
-
<a
|
255
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
256
|
-
target=""
|
257
|
-
rel=""
|
258
|
-
href="/docs/components/toggle">✅ Toggle</a>
|
259
|
-
<a
|
260
|
-
class="group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline text-muted-foreground"
|
261
|
-
target=""
|
262
|
-
rel=""
|
263
|
-
href="/docs/components/tooltip">✅ Tooltip</a>
|
264
|
-
</div>
|
265
|
-
</div>
|
266
|
-
</div>
|
267
|
-
</div>
|
268
|
-
</div>
|
269
|
-
</div>
|
270
|
-
</aside>
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# lib/generators/shadcn_ui_generator.rb
|
2
|
-
|
3
|
-
require "rails/generators/base"
|
4
|
-
|
5
|
-
class ShadcnUiGenerator < Rails::Generators::Base
|
6
|
-
source_root File.expand_path("path/to/source/files")
|
7
|
-
|
8
|
-
argument :component, required: true, desc: "Name of the component"
|
9
|
-
class_option :remove, type: :boolean, default: false, desc: "Remove the component"
|
10
|
-
|
11
|
-
def copy_or_remove_files
|
12
|
-
if options[:remove]
|
13
|
-
remove_files
|
14
|
-
else
|
15
|
-
copy_files
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def copy_files
|
22
|
-
template "component_template.html.erb", destination_file_path
|
23
|
-
end
|
24
|
-
|
25
|
-
def remove_files
|
26
|
-
remove_file destination_file_path
|
27
|
-
end
|
28
|
-
|
29
|
-
def destination_file_path
|
30
|
-
"app/views/components/#{component}.html.erb" # Modify the destination path according to your requirements
|
31
|
-
end
|
32
|
-
end
|
File without changes
|