shadcn-ui 0.0.3 → 0.0.4
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/app/controllers/documentation_controller.rb +0 -1
- data/app/helpers/components/input_helper.rb +1 -1
- data/app/helpers/components/slider_helper.rb +1 -1
- data/app/helpers/examples_helper.rb +6 -1
- data/app/javascript/controllers/highlight_controller.js +0 -1
- data/app/javascript/controllers/ui/popover_controller.js +6 -2
- data/app/views/application/index.html.erb +625 -17
- data/app/views/components/ui/_card.html.erb +7 -1
- data/app/views/components/ui/_filter.html.erb +2 -1
- data/app/views/documentation/generators.html.md +20 -0
- data/app/views/documentation/helpers.html.md +54 -0
- data/app/views/documentation/javascript.html.md +8 -0
- data/app/views/examples/components/accordion.html.erb +5 -7
- data/app/views/examples/components/alert-dialog/code/_preview.erb +6 -0
- data/app/views/examples/components/alert-dialog/code/_usage.erb +0 -0
- data/app/views/examples/components/alert-dialog.html.erb +8 -11
- data/app/views/examples/components/alert.html.erb +9 -10
- data/app/views/examples/components/badge.html.erb +3 -15
- data/app/views/examples/components/button.html.erb +3 -25
- data/app/views/examples/components/card/code/{preview.erb → _preview.erb} +1 -1
- data/app/views/examples/components/card.html.erb +5 -9
- data/app/views/examples/components/checkbox/code/_preview.erb +2 -0
- data/app/views/examples/components/checkbox.html.erb +3 -3
- data/app/views/examples/components/collapsible.html.erb +3 -11
- data/app/views/examples/components/dialog.html.erb +5 -14
- data/app/views/examples/components/dropdown-menu/_usage.html.erb +19 -0
- data/app/views/examples/components/dropdown-menu/code/_preview.erb +19 -0
- data/app/views/examples/components/dropdown-menu/code/_usage.erb +13 -0
- data/app/views/examples/components/dropdown-menu.html.erb +29 -15
- data/app/views/examples/components/filter/_usage.html.erb +14 -0
- data/app/views/examples/components/filter/code/_icon.html.erb +7 -0
- data/app/views/examples/components/filter/code/_preview.erb +3 -0
- data/app/views/examples/components/filter/code/_usage.erb +5 -0
- data/app/views/examples/components/filter.html.erb +27 -7
- data/app/views/examples/components/hover-card/_usage.html.erb +15 -0
- data/app/views/examples/components/hover-card/code/_preview.erb +13 -0
- data/app/views/examples/components/hover-card/code/_usage.erb +6 -0
- data/app/views/examples/components/hover-card.html.erb +12 -14
- data/app/views/examples/components/input/_usage.html.erb +10 -0
- data/app/views/examples/components/input/code/_borderless.erb +3 -0
- data/app/views/examples/components/input/code/_preview.erb +1 -0
- data/app/views/examples/components/input/code/_usage.erb +1 -0
- data/app/views/examples/components/input.html.erb +17 -3
- data/app/views/examples/components/label/_usage.html.erb +9 -0
- data/app/views/examples/components/label/code/_preview.erb +5 -0
- data/app/views/examples/components/label/code/_usage.erb +1 -0
- data/app/views/examples/components/label.html.erb +14 -5
- data/app/views/examples/components/popover/_usage.html.erb +12 -0
- data/app/views/examples/components/popover/code/_form.erb +23 -0
- data/app/views/examples/components/popover/code/_preview.erb +13 -0
- data/app/views/examples/components/popover/code/_usage.erb +7 -0
- data/app/views/examples/components/popover.html.erb +28 -24
- data/app/views/examples/components/progress/_usage.erb +9 -0
- data/app/views/examples/components/progress/code/_preview.erb +1 -0
- data/app/views/examples/components/progress/code/_usage.erb +1 -0
- data/app/views/examples/components/progress.html.erb +12 -2
- data/app/views/examples/components/separator/_usage.html.erb +10 -0
- data/app/views/examples/components/separator/code/_fancy.erb +21 -0
- data/app/views/examples/components/separator/code/_preview.erb +1 -0
- data/app/views/examples/components/separator/code/_usage.erb +1 -0
- data/app/views/examples/components/separator.html.erb +26 -19
- data/app/views/examples/components/sheet/_usage.html.erb +38 -0
- data/app/views/examples/components/sheet/code/_mobile_menu.erb +17 -0
- data/app/views/examples/components/sheet/code/_preview.erb +22 -0
- data/app/views/examples/components/sheet/code/_usage.erb +7 -0
- data/app/views/examples/components/sheet.html.erb +17 -10
- data/app/views/examples/components/skeleton/_usage.html.erb +9 -0
- data/app/views/examples/components/skeleton/code/_preview.erb +1 -0
- data/app/views/examples/components/skeleton/code/_usage.erb +1 -0
- data/app/views/examples/components/skeleton.html.erb +16 -2
- data/app/views/examples/components/slider/_usage.html.erb +11 -0
- data/app/views/examples/components/slider/code/_preview.erb +3 -0
- data/app/views/examples/components/slider/code/_usage.erb +1 -0
- data/app/views/examples/components/slider.html.erb +16 -2
- data/app/views/examples/components/textarea/_usage.html.erb +9 -0
- data/app/views/examples/components/textarea/code/_preview.erb +1 -0
- data/app/views/examples/components/textarea/code/_usage.erb +1 -0
- data/app/views/examples/components/textarea.html.erb +16 -2
- data/app/views/examples/components/toast/_usage.html.erb +11 -0
- data/app/views/examples/components/toast/code/_preview.erb +3 -0
- data/app/views/examples/components/toast/code/_usage.erb +2 -0
- data/app/views/examples/components/toast.html.erb +12 -4
- data/app/views/examples/components/toggle/_usage.html.erb +10 -0
- data/app/views/examples/components/toggle/code/_preview.erb +1 -0
- data/app/views/examples/components/toggle/code/_usage.erb +1 -0
- data/app/views/examples/components/toggle.html.erb +16 -2
- data/app/views/examples/components/tooltip/_usage.html.erb +11 -0
- data/app/views/examples/components/tooltip/code/_preview.erb +12 -0
- data/app/views/examples/components/tooltip/code/_usage.erb +7 -0
- data/app/views/examples/components/tooltip.html.erb +16 -13
- data/app/views/layouts/shared/_components.html.erb +35 -33
- data/config/environments/production.rb +4 -4
- data/lib/shadcn-ui/version.rb +1 -1
- metadata +74 -20
- data/app/views/examples/components/checkbox/code/preview.erb +0 -2
- /data/app/views/examples/components/accordion/code/{preview.erb → _preview.erb} +0 -0
- /data/app/views/examples/components/accordion/code/{usage.erb → _usage.erb} +0 -0
- /data/app/views/examples/components/alert/code/{preview.erb → _preview.erb} +0 -0
- /data/app/views/examples/components/alert/code/{usage.erb → _usage.erb} +0 -0
- /data/app/views/examples/components/badge/code/{preview.erb → _preview.erb} +0 -0
- /data/app/views/examples/components/badge/code/{usage.erb → _usage.erb} +0 -0
- /data/app/views/examples/components/button/code/{preview.erb → _preview.erb} +0 -0
- /data/app/views/examples/components/button/code/{usage.erb → _usage.erb} +0 -0
- /data/app/views/examples/components/card/code/{usage.erb → _usage.erb} +0 -0
- /data/app/views/examples/components/checkbox/code/{usage.erb → _usage.erb} +0 -0
- /data/app/views/examples/components/collapsible/code/{preview.erb → _preview.erb} +0 -0
- /data/app/views/examples/components/collapsible/code/{usage.erb → _usage.erb} +0 -0
- /data/app/views/examples/components/dialog/code/{form.erb → _form.erb} +0 -0
- /data/app/views/examples/components/dialog/code/{notifications.erb → _notifications.erb} +0 -0
- /data/app/views/examples/components/dialog/code/{preview.erb → _preview.erb} +0 -0
- /data/app/views/examples/components/dialog/code/{usage.erb → _usage.erb} +0 -0
@@ -3,17 +3,24 @@
|
|
3
3
|
|
4
4
|
<% content_for :preview, flush: true do %>
|
5
5
|
<div class="w-full flex justify-center">
|
6
|
-
<%=
|
7
|
-
<%= sheet_trigger do %>
|
8
|
-
<%= render_button("Open Sidebar", variant: :outline) %>
|
9
|
-
<% end %>
|
10
|
-
<%= sheet_content do %>
|
11
|
-
<h2 class="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">The King's Plan</h2>
|
12
|
-
<p class="leading-7 [&:not(:first-child)]:mt-6">The king thought long and hard, and finally came up with <a href="#" class="font-medium text-primary underline underline-offset-4">a brilliant plan</a>: he would tax the jokes in the kingdom.</p>
|
13
|
-
<blockquote class="mt-6 border-l-2 pl-6 italic">"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."</blockquote>
|
14
|
-
<% end %>
|
15
|
-
<% end %>
|
6
|
+
<%= render_code_preview('sheet') %>
|
16
7
|
</div>
|
17
8
|
<% end %>
|
18
9
|
|
10
|
+
<% content_for :code, flush: true do %>
|
11
|
+
<div class="w-full flex justify-center">
|
12
|
+
<%= code_partial("sheet/preview", :erb) %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
19
16
|
<%= render_preview %>
|
17
|
+
|
18
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
19
|
+
<%= code_sample(language: "sh") do %>
|
20
|
+
rails generate shadcn-ui sheet
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2>
|
24
|
+
<%= code_partial("sheet/usage", :erb) %>
|
25
|
+
|
26
|
+
<%= render_usage("sheet") %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">The Skeleton component introduces:</p>
|
2
|
+
|
3
|
+
<ul class="my-6 ml-6 list-disc [&>li]:mt-2 text-sm">
|
4
|
+
<li><%= code("app/helpers/components/skeleton_helper.rb") %></li>
|
5
|
+
<li><%= code("app/views/components/ui/_skeleton.html.erb") %></li>
|
6
|
+
</ul>
|
7
|
+
|
8
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
9
|
+
<%= code("render_skeleton") %> will output the skeleton component.</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_skeleton %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_skeleton %>
|
@@ -2,11 +2,25 @@
|
|
2
2
|
description: "Use to show a placeholder while content is loading." %>
|
3
3
|
|
4
4
|
<% content_for :preview, flush: true do %>
|
5
|
-
|
5
|
+
<div class="w-full flex justify-center">
|
6
|
+
<%= render_code_preview('skeleton') %>
|
7
|
+
</div>
|
6
8
|
<% end %>
|
7
9
|
|
8
10
|
<% content_for :code, flush: true do %>
|
9
|
-
|
11
|
+
<div class="w-full flex justify-center">
|
12
|
+
<%= code_partial("skeleton/preview", :erb) %>
|
13
|
+
</div>
|
10
14
|
<% end %>
|
11
15
|
|
12
16
|
<%= render_preview %>
|
17
|
+
|
18
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
19
|
+
<%= code_sample(language: "sh") do %>
|
20
|
+
rails generate shadcn-ui skeleton
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2>
|
24
|
+
<%= code_partial("skeleton/usage", :erb) %>
|
25
|
+
|
26
|
+
<%= render_usage("skeleton") %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">The Slider component introduces:</p>
|
2
|
+
|
3
|
+
<ul class="my-6 ml-6 list-disc [&>li]:mt-2 text-sm">
|
4
|
+
<li><%= code("app/helpers/components/slider_helper.rb") %></li>
|
5
|
+
<li><%= code("app/javascript/controllers/ui/slider_controller.js") %></li>
|
6
|
+
<li><%= code("app/views/components/ui/_slider.html.erb") %></li>
|
7
|
+
</ul>
|
8
|
+
|
9
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
10
|
+
<%= code("render_slider") %> accepts one keyword argument for the <%= code("name") %> of the slider element. It optionally accepts a <%= code("value") %> keyword for the starting value of the slider.
|
11
|
+
The javascript controller is responsible for maintaining the state and visual of the slider from the underlying range input.</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_slider name: %>
|
@@ -2,11 +2,25 @@
|
|
2
2
|
description: "An input where the user selects a value from within a given range." %>
|
3
3
|
|
4
4
|
<% content_for :preview, flush: true do %>
|
5
|
-
|
5
|
+
<div class="w-full flex justify-center">
|
6
|
+
<%= render_code_preview('slider') %>
|
7
|
+
</div>
|
6
8
|
<% end %>
|
7
9
|
|
8
10
|
<% content_for :code, flush: true do %>
|
9
|
-
|
11
|
+
<div class="w-full flex justify-center">
|
12
|
+
<%= code_partial("slider/preview", :erb) %>
|
13
|
+
</div>
|
10
14
|
<% end %>
|
11
15
|
|
12
16
|
<%= render_preview %>
|
17
|
+
|
18
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
19
|
+
<%= code_sample(language: "sh") do %>
|
20
|
+
rails generate shadcn-ui slider
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2>
|
24
|
+
<%= code_partial("slider/usage", :erb) %>
|
25
|
+
|
26
|
+
<%= render_usage("slider") %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">The Textarea component introduces:</p>
|
2
|
+
|
3
|
+
<ul class="my-6 ml-6 list-disc [&>li]:mt-2 text-sm">
|
4
|
+
<li><%= code("app/helpers/components/textarea_helper.rb") %></li>
|
5
|
+
<li><%= code("app/views/components/ui/_textarea.html.erb") %></li>
|
6
|
+
</ul>
|
7
|
+
|
8
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
9
|
+
<%= code("render_textarea") %> accepts one keyword argument for the <%= code("name") %> of the textarea element.</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_textarea name: "sample_textarea" %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_textarea name: %>
|
@@ -2,11 +2,25 @@
|
|
2
2
|
description: "Displays a form textarea or a component that looks like a textarea." %>
|
3
3
|
|
4
4
|
<% content_for :preview, flush: true do %>
|
5
|
-
|
5
|
+
<div class="w-full flex justify-center">
|
6
|
+
<%= render_code_preview('textarea') %>
|
7
|
+
</div>
|
6
8
|
<% end %>
|
7
9
|
|
8
10
|
<% content_for :code, flush: true do %>
|
9
|
-
|
11
|
+
<div class="w-full flex justify-center">
|
12
|
+
<%= code_partial("textarea/preview", :erb) %>
|
13
|
+
</div>
|
10
14
|
<% end %>
|
11
15
|
|
12
16
|
<%= render_preview %>
|
17
|
+
|
18
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
19
|
+
<%= code_sample(language: "sh") do %>
|
20
|
+
rails generate shadcn-ui textarea
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2>
|
24
|
+
<%= code_partial("textarea/usage", :erb) %>
|
25
|
+
|
26
|
+
<%= render_usage("textarea") %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">The Toast component introduces:</p>
|
2
|
+
|
3
|
+
<ul class="my-6 ml-6 list-disc [&>li]:mt-2 text-sm">
|
4
|
+
<li><%= code("app/helpers/components/toast_helper.rb") %></li>
|
5
|
+
<li><%= code("app/javascript/controllers/ui/toast_controller.js") %></li>
|
6
|
+
<li><%= code("app/views/components/ui/_toast.html.erb") %></li>
|
7
|
+
</ul>
|
8
|
+
|
9
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
10
|
+
<%= code("render_toast") %> accepts two keyword arguments, one for the <%= code("header") %> and the second for the <%= code("description") %>
|
11
|
+
or body of the toast. An optional 3rd argument can be provided for an <%= code("action") %> element like a button.</p>
|
@@ -3,13 +3,21 @@
|
|
3
3
|
|
4
4
|
<% content_for :preview, flush: true do %>
|
5
5
|
<%= render_button "Trigger Toast", variant: "outline", data: {controller: "ui--toast", action: "ui--toast#test"} %>
|
6
|
-
<%=
|
7
|
-
description: "Friday, February 10, 2023 at 5:57 PM",
|
8
|
-
action: render_button("Undo", variant: :outline) %>
|
6
|
+
<%= render_code_preview('toast') %>
|
9
7
|
<% end %>
|
10
8
|
|
11
9
|
<% content_for :code, flush: true do %>
|
12
|
-
|
10
|
+
<%= code_partial("toast/preview", :erb) %>
|
13
11
|
<% end %>
|
14
12
|
|
15
13
|
<%= render_preview %>
|
14
|
+
|
15
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
16
|
+
<%= code_sample(language: "sh") do %>
|
17
|
+
rails generate shadcn-ui toast
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2>
|
21
|
+
<%= code_partial("toast/usage", :erb) %>
|
22
|
+
|
23
|
+
<%= render_usage("toast") %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">The Toggle component introduces:</p>
|
2
|
+
|
3
|
+
<ul class="my-6 ml-6 list-disc [&>li]:mt-2 text-sm">
|
4
|
+
<li><%= code("app/helpers/components/toggle_helper.rb") %></li>
|
5
|
+
<li><%= code("app/javascript/controllers/ui/toggle_controller.js") %></li>
|
6
|
+
<li><%= code("app/views/components/ui/_toggle.html.erb") %></li>
|
7
|
+
</ul>
|
8
|
+
|
9
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
10
|
+
<%= code("render_toggle") %> an argument for the content for the button that will become a toggle.</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_toggle "𝐁" %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_toggle 'content' %>
|
@@ -2,11 +2,25 @@
|
|
2
2
|
description: "A two-state button that can be either on or off." %>
|
3
3
|
|
4
4
|
<% content_for :preview, flush: true do %>
|
5
|
-
|
5
|
+
<div class="w-full flex justify-center">
|
6
|
+
<%= render_code_preview('toggle') %>
|
7
|
+
</div>
|
6
8
|
<% end %>
|
7
9
|
|
8
10
|
<% content_for :code, flush: true do %>
|
9
|
-
|
11
|
+
<div class="w-full flex justify-center">
|
12
|
+
<%= code_partial("toggle/preview", :erb) %>
|
13
|
+
</div>
|
10
14
|
<% end %>
|
11
15
|
|
12
16
|
<%= render_preview %>
|
17
|
+
|
18
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
19
|
+
<%= code_sample(language: "sh") do %>
|
20
|
+
rails generate shadcn-ui toggle
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2>
|
24
|
+
<%= code_partial("toggle/usage", :erb) %>
|
25
|
+
|
26
|
+
<%= render_usage("toggle") %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">The Tooltip component introduces:</p>
|
2
|
+
|
3
|
+
<ul class="my-6 ml-6 list-disc [&>li]:mt-2 text-sm">
|
4
|
+
<li><%= code("app/helpers/components/tooltip_helper.rb") %></li>
|
5
|
+
<li><%= code("app/javascript/controllers/ui/tooltip_controller.js") %></li>
|
6
|
+
<li><%= code("app/views/components/ui/_tooltip.html.erb") %></li>
|
7
|
+
</ul>
|
8
|
+
|
9
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
10
|
+
<%= code("render_tooltip") %> accepts a block that contains calls to <%= code("tooltip_trigger") %> and <%= code("tooltip_content") %> each accepting a block for their respective content.
|
11
|
+
The <%= code("tooltip_trigger") %> is the element that upon hovering over, will reveal the <%= code("tooltip_content") %>.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= render_tooltip do %>
|
2
|
+
<%= tooltip_trigger do %>
|
3
|
+
<%= render_button "Hover", variant: :outline %>
|
4
|
+
<% end %>
|
5
|
+
<%= tooltip_content do %>
|
6
|
+
<div class="grid gap-2">
|
7
|
+
<div class="space-y-2">
|
8
|
+
<p class="text-sm text-muted-foreground">More will be revealed.</p>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
@@ -2,22 +2,25 @@
|
|
2
2
|
description: "A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it." %>
|
3
3
|
|
4
4
|
<% content_for :preview, flush: true do %>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<% end %>
|
9
|
-
<%= tooltip_content do %>
|
10
|
-
<div class="grid gap-2">
|
11
|
-
<div class="space-y-2">
|
12
|
-
<p class="text-sm text-muted-foreground">More will be revealed.</p>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<% end %>
|
16
|
-
<% end %>
|
5
|
+
<div class="w-full flex justify-center">
|
6
|
+
<%= render_code_preview('tooltip') %>
|
7
|
+
</div>
|
17
8
|
<% end %>
|
18
9
|
|
19
10
|
<% content_for :code, flush: true do %>
|
20
|
-
|
11
|
+
<div class="w-full flex justify-center">
|
12
|
+
<%= code_partial("tooltip/preview", :erb) %>
|
13
|
+
</div>
|
21
14
|
<% end %>
|
22
15
|
|
23
16
|
<%= render_preview %>
|
17
|
+
|
18
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
19
|
+
<%= code_sample(language: "sh") do %>
|
20
|
+
rails generate shadcn-ui tooltip
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<h2 class="font-heading mt-12 scroll-m-20 border-b pb-2 mb-2 text-2xl font-semibold tracking-tight first:mt-0" id="usage">Usage</h2>
|
24
|
+
<%= code_partial("tooltip/usage", :erb) %>
|
25
|
+
|
26
|
+
<%= render_usage("tooltip") %>
|
@@ -8,6 +8,8 @@
|
|
8
8
|
<%= sidebar_link "Introduction", documentation_index_path %>
|
9
9
|
<%= sidebar_link "Installation", documentation_path("installation") %>
|
10
10
|
<%= sidebar_link "Generators", documentation_path("generators") %>
|
11
|
+
<%= sidebar_link "Helpers", documentation_path("helpers") %>
|
12
|
+
<%= sidebar_link "Stimulus", documentation_path("Javascript") %>
|
11
13
|
<%= sidebar_link "About", documentation_path("about") %>
|
12
14
|
</div>
|
13
15
|
</div>
|
@@ -16,45 +18,45 @@
|
|
16
18
|
<div class="grid grid-flow-row auto-rows-max text-sm">
|
17
19
|
<%= sidebar_link "✅ 📖 Accordion", "/docs/components/accordion" %>
|
18
20
|
<%= sidebar_link "✅ 📖 Alert", "/docs/components/alert" %>
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
<%#= sidebar_link "✅ Alert Dialog", "/docs/components/alert-dialog" %>
|
22
|
+
<%#= sidebar_link "❌ Aspect Ratio", "/docs/components/aspect-ratio" %>
|
23
|
+
<%#= sidebar_link "❌ Avatar", "/docs/components/avatar" %>
|
22
24
|
<%= sidebar_link "✅ 📖 Badge", "/docs/components/badge" %>
|
23
25
|
<%= sidebar_link "✅ 📖 Button", "/docs/components/button" %>
|
24
|
-
|
26
|
+
<%#= sidebar_link "❌ Calendar", "/docs/components/calendar" %>
|
25
27
|
<%= sidebar_link "✅ 📖 Card", "/docs/components/card" %>
|
26
28
|
<%= sidebar_link "✅ 📖 Checkbox", "/docs/components/checkbox" %>
|
27
29
|
<%= sidebar_link "✅ 📖 Collapsible", "/docs/components/collapsible" %>
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
<%#= sidebar_link "Combobox", "/docs/components/combobox" %>
|
31
|
+
<%#= sidebar_link "Command", "/docs/components/command" %>
|
32
|
+
<%#= sidebar_link "Context Menu", "/docs/components/context-menu" %>
|
33
|
+
<%#= sidebar_link "Data Table", "/docs/components/data-table" %>
|
34
|
+
<%#= sidebar_link "Date Picker", "/docs/components/date-picker" %>
|
33
35
|
<%= sidebar_link "✅ 📖 Dialog", "/docs/components/dialog" %>
|
34
|
-
<%= sidebar_link "Dropdown Menu", "/docs/components/dropdown-menu" %>
|
35
|
-
<%= sidebar_link "➕ Filter", "/docs/components/filter" %>
|
36
|
-
|
37
|
-
<%= sidebar_link "✅ Hover Card", "/docs/components/hover-card" %>
|
38
|
-
<%= sidebar_link "✅ Input", "/docs/components/input" %>
|
39
|
-
<%= sidebar_link "✅ Label", "/docs/components/label" %>
|
40
|
-
|
41
|
-
|
42
|
-
<%= sidebar_link "✅ Popover", "/docs/components/popover" %>
|
43
|
-
<%= sidebar_link "✅ Progress", "/docs/components/progress" %>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<%= sidebar_link "✅ Separator", "/docs/components/separator" %>
|
48
|
-
<%= sidebar_link "✅ Sheet", "/docs/components/sheet" %>
|
49
|
-
<%= sidebar_link "✅ Skeleton", "/docs/components/skeleton" %>
|
50
|
-
<%= sidebar_link "✅ Slider", "/docs/components/slider" %>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
<%= sidebar_link "✅ Textarea", "/docs/components/textarea" %>
|
55
|
-
<%= sidebar_link "✅ Toast", "/docs/components/toast" %>
|
56
|
-
<%= sidebar_link "✅ Toggle", "/docs/components/toggle" %>
|
57
|
-
<%= sidebar_link "✅ Tooltip", "/docs/components/tooltip" %>
|
36
|
+
<%= sidebar_link "✅ 📖 Dropdown Menu", "/docs/components/dropdown-menu" %>
|
37
|
+
<%= sidebar_link "➕ 📖 Filter", "/docs/components/filter" %>
|
38
|
+
<%#= sidebar_link "Form", "/docs/components/form" %>
|
39
|
+
<%= sidebar_link "✅ 📖 Hover Card", "/docs/components/hover-card" %>
|
40
|
+
<%= sidebar_link "✅ 📖 Input", "/docs/components/input" %>
|
41
|
+
<%= sidebar_link "✅ 📖 Label", "/docs/components/label" %>
|
42
|
+
<%#= sidebar_link "Menubar", "/docs/components/menubar" %>
|
43
|
+
<%#= sidebar_link "Navigation Menu", "/docs/components/navigation-menu" %>
|
44
|
+
<%= sidebar_link "✅ 📖 Popover", "/docs/components/popover" %>
|
45
|
+
<%= sidebar_link "✅ 📖 Progress", "/docs/components/progress" %>
|
46
|
+
<%#= sidebar_link "Radio Group", "/docs/components/radio-group" %>
|
47
|
+
<%#= sidebar_link "Scroll Area", "/docs/components/scroll-area" %>
|
48
|
+
<%#= sidebar_link "Select", "/docs/components/select" %>
|
49
|
+
<%= sidebar_link "✅ 📖 Separator", "/docs/components/separator" %>
|
50
|
+
<%= sidebar_link "✅ 📖 Sheet", "/docs/components/sheet" %>
|
51
|
+
<%= sidebar_link "✅ 📖 Skeleton", "/docs/components/skeleton" %>
|
52
|
+
<%= sidebar_link "✅ 📖 Slider", "/docs/components/slider" %>
|
53
|
+
<%#= sidebar_link "Switch", "/docs/components/switch" %>
|
54
|
+
<%#= sidebar_link "Table", "/docs/components/table" %>
|
55
|
+
<%#= sidebar_link "Tabs", "/docs/components/tabs" %>
|
56
|
+
<%= sidebar_link "✅ 📖 Textarea", "/docs/components/textarea" %>
|
57
|
+
<%= sidebar_link "✅ 📖 Toast", "/docs/components/toast" %>
|
58
|
+
<%= sidebar_link "✅ 📖 Toggle", "/docs/components/toggle" %>
|
59
|
+
<%= sidebar_link "✅ 📖 Tooltip", "/docs/components/tooltip" %>
|
58
60
|
</div>
|
59
61
|
</div>
|
60
62
|
</div>
|
@@ -13,7 +13,7 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = true
|
14
14
|
|
15
15
|
# Full error reports are disabled and caching is turned on.
|
16
|
-
config.consider_all_requests_local
|
16
|
+
config.consider_all_requests_local = false
|
17
17
|
config.action_controller.perform_caching = true
|
18
18
|
|
19
19
|
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
@@ -53,7 +53,7 @@ Rails.application.configure do
|
|
53
53
|
config.log_level = :info
|
54
54
|
|
55
55
|
# Prepend all log lines with the following tags.
|
56
|
-
config.log_tags = [
|
56
|
+
config.log_tags = [:request_id]
|
57
57
|
|
58
58
|
# Use a different cache store in production.
|
59
59
|
# config.cache_store = :mem_cache_store
|
@@ -83,9 +83,9 @@ Rails.application.configure do
|
|
83
83
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
|
84
84
|
|
85
85
|
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
86
|
-
logger
|
86
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
87
87
|
logger.formatter = config.log_formatter
|
88
|
-
config.logger
|
88
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
89
89
|
end
|
90
90
|
|
91
91
|
# Do not dump schema after migrations.
|
data/lib/shadcn-ui/version.rb
CHANGED