shadcn-ui 0.0.1
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 +7 -0
- data/.editorconfig +10 -0
- data/.prettierignore +43 -0
- data/.prettierrc.json +28 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/.vscode/settings.json +11 -0
- data/CHANGELOG.md +6 -0
- data/CODE_OF_CONDUCT.md +113 -0
- data/LICENSE.md +18 -0
- data/Procfile.dev +2 -0
- data/README.md +90 -0
- data/Rakefile +12 -0
- data/app/assets/builds/.keep +0 -0
- data/app/assets/config/manifest.js +5 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/stylesheets/application.scss +42 -0
- data/app/assets/stylesheets/application.tailwind.css +92 -0
- data/app/assets/stylesheets/lambda.light.scss +136 -0
- data/app/channels/application_cable/channel.rb +4 -0
- data/app/channels/application_cable/connection.rb +4 -0
- data/app/controllers/application_controller.rb +8 -0
- data/app/controllers/components_controller.rb +7 -0
- data/app/controllers/concerns/.keep +0 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/components/accordion_helper.rb +5 -0
- data/app/helpers/components/alert_dialog_helper.rb +6 -0
- data/app/helpers/components/alert_helper.rb +11 -0
- data/app/helpers/components/badge_helper.rb +20 -0
- data/app/helpers/components/button_helper.rb +20 -0
- data/app/helpers/components/card_helper.rb +5 -0
- data/app/helpers/components/checkbox_helper.rb +5 -0
- data/app/helpers/components/collapsible_helper.rb +6 -0
- data/app/helpers/components/dialog_helper.rb +14 -0
- data/app/helpers/components/dropdown_menu_helper.rb +23 -0
- data/app/helpers/components/hover_card_helper.rb +15 -0
- data/app/helpers/components/popover_helper.rb +15 -0
- data/app/helpers/components/seperator_helper.rb +6 -0
- data/app/helpers/components/textarea_helper.rb +13 -0
- data/app/helpers/components/toast_helper.rb +5 -0
- data/app/helpers/components/toggle_helper.rb +6 -0
- data/app/helpers/components/tooltip_helper.rb +15 -0
- data/app/helpers/components_helper.rb +7 -0
- data/app/helpers/examples_helper.rb +41 -0
- data/app/javascript/application.js +3 -0
- data/app/javascript/controllers/application.js +9 -0
- data/app/javascript/controllers/hello_controller.js +7 -0
- data/app/javascript/controllers/highlight_controller.js +9 -0
- data/app/javascript/controllers/index.js +11 -0
- data/app/javascript/controllers/tabs_controller.js +72 -0
- data/app/javascript/controllers/ui/accordion_controller.js +128 -0
- data/app/javascript/controllers/ui/checkbox_controller.js +17 -0
- data/app/javascript/controllers/ui/collapsible_controller.js +28 -0
- data/app/javascript/controllers/ui/dialog_controller.js +92 -0
- data/app/javascript/controllers/ui/dropdown_controller.js +25 -0
- data/app/javascript/controllers/ui/hover-card_controller.js +39 -0
- data/app/javascript/controllers/ui/popover_controller.js +27 -0
- data/app/javascript/controllers/ui/toast_controller.js +43 -0
- data/app/javascript/controllers/ui/toggle_controller.js +15 -0
- data/app/javascript/controllers/ui/tooltip_controller.js +3 -0
- data/app/javascript/controllers/ui/transition_controller.js +8 -0
- data/app/jobs/application_job.rb +7 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/concerns/.keep +0 -0
- data/app/views/application/index.html.erb +0 -0
- data/app/views/components/ui/_accordion.html.erb +40 -0
- data/app/views/components/ui/_alert.html.erb +55 -0
- data/app/views/components/ui/_alert_dialog.html.erb +20 -0
- data/app/views/components/ui/_badge.html.erb +1 -0
- data/app/views/components/ui/_button.html.erb +11 -0
- data/app/views/components/ui/_card.html.erb +13 -0
- data/app/views/components/ui/_checkbox.html.erb +37 -0
- data/app/views/components/ui/_collapsible.html.erb +38 -0
- data/app/views/components/ui/_dialog.html.erb +69 -0
- data/app/views/components/ui/_dropdown_menu.html.erb +9 -0
- data/app/views/components/ui/_hover_card.html.erb +18 -0
- data/app/views/components/ui/_popover.html.erb +19 -0
- data/app/views/components/ui/_separator.html.erb +4 -0
- data/app/views/components/ui/_textarea.html.erb +9 -0
- data/app/views/components/ui/_toast.html.erb +34 -0
- data/app/views/components/ui/_toggle.html.erb +3 -0
- data/app/views/components/ui/_tooltip.html.erb +18 -0
- data/app/views/components/ui/shared/_dialog_background.html.erb +7 -0
- data/app/views/components/ui/shared/_menu_item.html.erb +6 -0
- data/app/views/examples/authentication/index.html.erb +148 -0
- data/app/views/examples/components/accordion.html.erb +17 -0
- data/app/views/examples/components/alert-dialog.html.erb +24 -0
- data/app/views/examples/components/alert.html.erb +22 -0
- data/app/views/examples/components/badge.html.erb +30 -0
- data/app/views/examples/components/button.html.erb +33 -0
- data/app/views/examples/components/card.html.erb +156 -0
- data/app/views/examples/components/checkbox.html.erb +8 -0
- data/app/views/examples/components/collapsible.html.erb +24 -0
- data/app/views/examples/components/dialog/_usage.html.erb +28 -0
- data/app/views/examples/components/dialog/code/form.erb +48 -0
- data/app/views/examples/components/dialog/code/notifications.erb +83 -0
- data/app/views/examples/components/dialog/code/preview.erb +14 -0
- data/app/views/examples/components/dialog/code/usage.erb +8 -0
- data/app/views/examples/components/dialog.html.erb +148 -0
- data/app/views/examples/components/dropdown-menu.html.erb +26 -0
- data/app/views/examples/components/hover-card.html.erb +24 -0
- data/app/views/examples/components/popover.html.erb +34 -0
- data/app/views/examples/components/separator.html.erb +33 -0
- data/app/views/examples/components/textarea.html.erb +12 -0
- data/app/views/examples/components/toast.html.erb +15 -0
- data/app/views/examples/components/toggle.html.erb +12 -0
- data/app/views/examples/components/tooltip.html.erb +23 -0
- data/app/views/layouts/_sidebar.html.erb +270 -0
- data/app/views/layouts/application.html.erb +33 -0
- data/app/views/layouts/component.html.erb +35 -0
- data/app/views/layouts/documentation/_breadcrumb.html.erb +17 -0
- data/app/views/layouts/documentation/_component_header.html.erb +11 -0
- data/app/views/layouts/documentation/_examples.html.erb +80 -0
- data/app/views/layouts/documentation/_preview.html.erb +90 -0
- data/app/views/layouts/mailer.html.erb +13 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/layouts/shared/_header.html.erb +164 -0
- data/config/application.rb +37 -0
- data/config/boot.rb +4 -0
- data/config/cable.yml +11 -0
- data/config/credentials.yml.enc +1 -0
- data/config/database.yml +25 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +70 -0
- data/config/environments/production.rb +93 -0
- data/config/environments/test.rb +60 -0
- data/config/importmap.rb +13 -0
- data/config/initializers/assets.rb +12 -0
- data/config/initializers/content_security_policy.rb +25 -0
- data/config/initializers/filter_parameter_logging.rb +8 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/permissions_policy.rb +11 -0
- data/config/locales/en.yml +33 -0
- data/config/puma.rb +43 -0
- data/config/render.yml +9 -0
- data/config/routes.rb +7 -0
- data/config/storage.yml +34 -0
- data/config/tailwind.config.js +86 -0
- data/config.ru +6 -0
- data/db/seeds.rb +7 -0
- data/lib/assets/.keep +0 -0
- data/lib/generators/shadcn_ui_generator.rb +32 -0
- data/lib/shadcn-ui/shadcn-ui.rb +8 -0
- data/lib/shadcn-ui/version.rb +3 -0
- data/lib/tasks/.keep +0 -0
- data/log/.keep +0 -0
- data/package-lock.json +1014 -0
- data/package.json +8 -0
- data/public/404.html +67 -0
- data/public/422.html +67 -0
- data/public/500.html +66 -0
- data/public/android-chrome-192x192.png +0 -0
- data/public/android-chrome-512x512.png +0 -0
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon-16x16.png +0 -0
- data/public/favicon-32x32.png +0 -0
- data/public/favicon.ico +0 -0
- data/public/og.jpg +0 -0
- data/public/robots.txt +1 -0
- data/sig/shadcn-ui.rbs +4 -0
- data/storage/.keep +0 -0
- data/tmp/.keep +0 -0
- data/tmp/pids/.keep +0 -0
- data/tmp/storage/.keep +0 -0
- data/vendor/.keep +0 -0
- data/vendor/javascript/.keep +0 -0
- metadata +214 -0
@@ -0,0 +1,148 @@
|
|
1
|
+
<div class="overflow-hidden rounded-[0.5rem] border bg-background shadow">
|
2
|
+
<div class="md:hidden">
|
3
|
+
<img
|
4
|
+
alt="Authentication"
|
5
|
+
loading="lazy"
|
6
|
+
width="1280"
|
7
|
+
height="843"
|
8
|
+
decoding="async"
|
9
|
+
data-nimg="1"
|
10
|
+
class="block dark:hidden"
|
11
|
+
srcset="
|
12
|
+
/_next/image?url=%2Fexamples%2Fauthentication-light.png&w=1920&q=75 1x,
|
13
|
+
/_next/image?url=%2Fexamples%2Fauthentication-light.png&w=3840&q=75 2x
|
14
|
+
"
|
15
|
+
src="/_next/image?url=%2Fexamples%2Fauthentication-light.png&w=3840&q=75"
|
16
|
+
style="color: transparent"
|
17
|
+
/><img
|
18
|
+
alt="Authentication"
|
19
|
+
loading="lazy"
|
20
|
+
width="1280"
|
21
|
+
height="843"
|
22
|
+
decoding="async"
|
23
|
+
data-nimg="1"
|
24
|
+
class="hidden dark:block"
|
25
|
+
srcset="
|
26
|
+
/_next/image?url=%2Fexamples%2Fauthentication-dark.png&w=1920&q=75 1x,
|
27
|
+
/_next/image?url=%2Fexamples%2Fauthentication-dark.png&w=3840&q=75 2x
|
28
|
+
"
|
29
|
+
src="/_next/image?url=%2Fexamples%2Fauthentication-dark.png&w=3840&q=75"
|
30
|
+
style="color: transparent"
|
31
|
+
/>
|
32
|
+
</div>
|
33
|
+
<div
|
34
|
+
class="container relative hidden h-[800px] flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0"
|
35
|
+
>
|
36
|
+
<a
|
37
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 absolute right-4 top-4 md:right-8 md:top-8"
|
38
|
+
href="/examples/authentication"
|
39
|
+
>Login</a
|
40
|
+
>
|
41
|
+
<div
|
42
|
+
class="relative hidden h-full flex-col bg-muted p-10 text-white dark:border-r lg:flex"
|
43
|
+
>
|
44
|
+
<div class="absolute inset-0 bg-zinc-900"></div>
|
45
|
+
<div class="relative z-20 flex items-center text-lg font-medium">
|
46
|
+
<svg
|
47
|
+
xmlns="http://www.w3.org/2000/svg"
|
48
|
+
viewBox="0 0 24 24"
|
49
|
+
fill="none"
|
50
|
+
stroke="currentColor"
|
51
|
+
stroke-width="2"
|
52
|
+
stroke-linecap="round"
|
53
|
+
stroke-linejoin="round"
|
54
|
+
class="mr-2 h-6 w-6"
|
55
|
+
>
|
56
|
+
<path
|
57
|
+
d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"
|
58
|
+
></path></svg
|
59
|
+
>Acme Inc
|
60
|
+
</div>
|
61
|
+
<div class="relative z-20 mt-auto">
|
62
|
+
<blockquote class="space-y-2">
|
63
|
+
<p class="text-lg">
|
64
|
+
“This library has saved me countless hours of work and helped me
|
65
|
+
deliver stunning designs to my clients faster than ever before.”
|
66
|
+
</p>
|
67
|
+
<footer class="text-sm">Sofia Davis</footer>
|
68
|
+
</blockquote>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
<div class="lg:p-8">
|
72
|
+
<div
|
73
|
+
class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]"
|
74
|
+
>
|
75
|
+
<div class="flex flex-col space-y-2 text-center">
|
76
|
+
<h1 class="text-2xl font-semibold tracking-tight">
|
77
|
+
Create an account
|
78
|
+
</h1>
|
79
|
+
<p class="text-sm text-muted-foreground">
|
80
|
+
Enter your email below to create your account
|
81
|
+
</p>
|
82
|
+
</div>
|
83
|
+
<div class="grid gap-6">
|
84
|
+
<form>
|
85
|
+
<div class="grid gap-2">
|
86
|
+
<div class="grid gap-1">
|
87
|
+
<label
|
88
|
+
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 sr-only"
|
89
|
+
for="email"
|
90
|
+
>Email</label
|
91
|
+
><input
|
92
|
+
class="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
|
93
|
+
id="email"
|
94
|
+
placeholder="name@example.com"
|
95
|
+
autocapitalize="none"
|
96
|
+
autocomplete="email"
|
97
|
+
autocorrect="off"
|
98
|
+
type="email"
|
99
|
+
/>
|
100
|
+
</div>
|
101
|
+
<button
|
102
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2"
|
103
|
+
>
|
104
|
+
Sign In with Email
|
105
|
+
</button>
|
106
|
+
</div>
|
107
|
+
</form>
|
108
|
+
<div class="relative">
|
109
|
+
<div class="absolute inset-0 flex items-center">
|
110
|
+
<span class="w-full border-t"></span>
|
111
|
+
</div>
|
112
|
+
<div class="relative flex justify-center text-xs uppercase">
|
113
|
+
<span class="bg-background px-2 text-muted-foreground"
|
114
|
+
>Or continue with</span
|
115
|
+
>
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
<button
|
119
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2"
|
120
|
+
type="button"
|
121
|
+
>
|
122
|
+
<svg viewBox="0 0 438.549 438.549" class="mr-2 h-4 w-4">
|
123
|
+
<path
|
124
|
+
fill="currentColor"
|
125
|
+
d="M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z"
|
126
|
+
></path>
|
127
|
+
</svg>
|
128
|
+
Github
|
129
|
+
</button>
|
130
|
+
</div>
|
131
|
+
<p class="px-8 text-center text-sm text-muted-foreground">
|
132
|
+
By clicking continue, you agree to our
|
133
|
+
<a
|
134
|
+
class="underline underline-offset-4 hover:text-primary"
|
135
|
+
href="/terms"
|
136
|
+
>Terms of Service</a
|
137
|
+
>
|
138
|
+
and
|
139
|
+
<a
|
140
|
+
class="underline underline-offset-4 hover:text-primary"
|
141
|
+
href="/privacy"
|
142
|
+
>Privacy Policy</a
|
143
|
+
>.
|
144
|
+
</p>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= render "layouts/documentation/component_header",
|
2
|
+
title: "Accordion",
|
3
|
+
description: "A vertically stacked set of interactive headings that each reveal a section of content." %>
|
4
|
+
|
5
|
+
<% content_for :preview, flush: true do %>
|
6
|
+
<div class="w-full">
|
7
|
+
<%= render_accordion title: "Did you know?", description: "You can wrap shadcn helpers in any
|
8
|
+
component library you want!" %>
|
9
|
+
<%= render_accordion title: "Use the generators.", description: "Add components with #{code("rails g shadcn_ui add accordion")}".html_safe %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
|
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
|
+
|
17
|
+
<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"><a href="/docs/components/dialog#usage">Usage</a></h2>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!--prettier-ignore-->
|
2
|
+
<%= render "layouts/documentation/component_header",
|
3
|
+
title: "Alert Dialog",
|
4
|
+
description: "A modal dialog that interrupts the user with important content and expects a response." %>
|
5
|
+
|
6
|
+
<%= content_for :preview, flush: true do %>
|
7
|
+
<div class="w-full flex justify-center">
|
8
|
+
<!--prettier-ignore-->
|
9
|
+
|
10
|
+
<!--prettier-ignore-->
|
11
|
+
<%= render_alert_dialog(
|
12
|
+
trigger: render_button("Open Dialog", variant: :outline, data: {action: "ui--dialog#open" }),
|
13
|
+
continue: render_button("Continue"),
|
14
|
+
label: "Are you absolutely sure?",
|
15
|
+
description: "This action cannot be undone. This will permanently delete your account and remove your data from our servers.",
|
16
|
+
) %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<%= render_preview %>
|
21
|
+
|
22
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
23
|
+
|
24
|
+
<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"><a href="/docs/components/dialog#usage">Usage</a></h2>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!--prettier-ignore-->
|
2
|
+
<%= render "layouts/documentation/component_header",
|
3
|
+
title: "Alert",
|
4
|
+
description: "Displays a callout for user attention" %>
|
5
|
+
|
6
|
+
<% content_for :preview, flush: true do %>
|
7
|
+
<div class="w-full">
|
8
|
+
<%= render_alert title: "Did you know?", description: "You can wrap shadcn helpers in any
|
9
|
+
component library you want!" %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="w-full">
|
13
|
+
<%= render_alert(variant: :error, title: "Did you know?", description: "You can wrap shadcn
|
14
|
+
helpers in any component library you want!") %>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= render_preview %>
|
19
|
+
|
20
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
21
|
+
|
22
|
+
<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"><a href="/docs/components/dialog#usage">Usage</a></h2>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!--prettier-ignore-->
|
2
|
+
|
3
|
+
<%= render "layouts/documentation/component_header",
|
4
|
+
title: "Badge",
|
5
|
+
description: "Displays a badge or a component that looks like a badge." %>
|
6
|
+
|
7
|
+
<%= content_for :preview, flush: true do %>
|
8
|
+
<div class="w-full mx-auto flex justify-center"><%= render_badge text: "Badge" %></div>
|
9
|
+
<div class="w-full mx-auto flex justify-center">
|
10
|
+
<%= render_badge text: "Secondary", variant: :secondary %>
|
11
|
+
</div>
|
12
|
+
<div class="w-full mx-auto flex justify-center">
|
13
|
+
<%= render_badge text: "Destructive", variant: :destructive %>
|
14
|
+
</div>
|
15
|
+
<div class="w-full mx-auto flex justify-center">
|
16
|
+
<%= render_badge text: "Outline", variant: :outline %>
|
17
|
+
</div>
|
18
|
+
<div class="w-full mx-auto flex justify-center">
|
19
|
+
<%= render_badge text: "Ghost", variant: :ghost %>
|
20
|
+
</div>
|
21
|
+
<div class="w-full mx-auto flex justify-center">
|
22
|
+
<%= render_badge text: "Ghost Link", variant: :ghost, as: :link %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<%= render_preview %>
|
27
|
+
|
28
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
29
|
+
|
30
|
+
<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"><a href="/docs/components/dialog#usage">Usage</a></h2>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!--prettier-ignore-->
|
2
|
+
|
3
|
+
<%= render "layouts/documentation/component_header",
|
4
|
+
title: "Button",
|
5
|
+
description: "Displays a button or a component that looks like a button." %>
|
6
|
+
|
7
|
+
<%= content_for :preview, flush: true do %>
|
8
|
+
<div class="w-full mx-auto flex justify-center"><%= render_button text: "Button" %></div>
|
9
|
+
<div class="w-full mx-auto flex justify-center">
|
10
|
+
<%= render_button text: "Link", as: :link, href: "/" %>
|
11
|
+
</div>
|
12
|
+
<div class="w-full mx-auto flex justify-center">
|
13
|
+
<%= render_button text: "Secondary", variant: :secondary %>
|
14
|
+
</div>
|
15
|
+
<div class="w-full mx-auto flex justify-center">
|
16
|
+
<%= render_button text: "Destructive", variant: :destructive %>
|
17
|
+
</div>
|
18
|
+
<div class="w-full mx-auto flex justify-center">
|
19
|
+
<%= render_button text: "Outline", variant: :outline %>
|
20
|
+
</div>
|
21
|
+
<div class="w-full mx-auto flex justify-center">
|
22
|
+
<%= render_button text: "Ghost", variant: :ghost %>
|
23
|
+
</div>
|
24
|
+
<div class="w-full mx-auto flex justify-center">
|
25
|
+
<%= render_button text: "Ghost Link", variant: :ghost, as: :link %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<%= render_preview %>
|
30
|
+
|
31
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
32
|
+
|
33
|
+
<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"><a href="/docs/components/dialog#usage">Usage</a></h2>
|
@@ -0,0 +1,156 @@
|
|
1
|
+
<!--prettier-ignore-->
|
2
|
+
<%= render "layouts/documentation/component_header",
|
3
|
+
title: "Card",
|
4
|
+
description: "Displays a card with header, content, and footer." %>
|
5
|
+
|
6
|
+
<%= content_for :preview, flush: true do %>
|
7
|
+
<div class="w-full flex justify-center"><%= render_card body: "The Most Basic of Cards" %></div>
|
8
|
+
<div class="w-full flex justify-center">
|
9
|
+
<%= render_card title: "Did you know?", body: "You can embed any HTML in the body of a card by
|
10
|
+
yielding to a block for the body?", subtitle: "This is important." %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="w-full flex justify-center">
|
14
|
+
<%= render_card title: "Card with Form" do %>
|
15
|
+
<div class="p-6 pt-0">
|
16
|
+
<form>
|
17
|
+
<div class="grid w-full items-center gap-4">
|
18
|
+
<div class="flex flex-col space-y-1.5">
|
19
|
+
<label
|
20
|
+
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
21
|
+
for="name">Name</label><input
|
22
|
+
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
23
|
+
id="name"
|
24
|
+
placeholder="Name of your project">
|
25
|
+
</div>
|
26
|
+
<div class="flex flex-col space-y-1.5">
|
27
|
+
<label
|
28
|
+
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
29
|
+
for="name">Framework</label><button
|
30
|
+
type="button"
|
31
|
+
role="combobox"
|
32
|
+
aria-controls="radix-:r76:"
|
33
|
+
aria-expanded="false"
|
34
|
+
aria-autocomplete="none"
|
35
|
+
dir="ltr"
|
36
|
+
data-state="closed"
|
37
|
+
data-placeholder=""
|
38
|
+
class="flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50">
|
39
|
+
<span style="pointer-events: none">Select</span><svg
|
40
|
+
xmlns="http://www.w3.org/2000/svg"
|
41
|
+
width="24"
|
42
|
+
height="24"
|
43
|
+
viewBox="0 0 24 24"
|
44
|
+
fill="none"
|
45
|
+
stroke="currentColor"
|
46
|
+
stroke-width="2"
|
47
|
+
stroke-linecap="round"
|
48
|
+
stroke-linejoin="round"
|
49
|
+
class="h-4 w-4 opacity-50"
|
50
|
+
aria-hidden="true">
|
51
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
52
|
+
</svg></button><select
|
53
|
+
aria-hidden="true"
|
54
|
+
tabindex="-1"
|
55
|
+
style="
|
56
|
+
position: absolute;
|
57
|
+
border: 0px;
|
58
|
+
width: 1px;
|
59
|
+
height: 1px;
|
60
|
+
padding: 0px;
|
61
|
+
margin: -1px;
|
62
|
+
overflow: hidden;
|
63
|
+
clip: rect(0px, 0px, 0px, 0px);
|
64
|
+
white-space: nowrap;
|
65
|
+
overflow-wrap: normal;
|
66
|
+
">
|
67
|
+
<option value=""></option>
|
68
|
+
<option value="next">Next.js</option>
|
69
|
+
<option value="sveltekit">SvelteKit</option>
|
70
|
+
<option value="astro">Astro</option>
|
71
|
+
<option value="nuxt">Nuxt.js</option>
|
72
|
+
</select>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
</form>
|
76
|
+
</div>
|
77
|
+
<div class="items-center p-6 pt-0 flex justify-between">
|
78
|
+
<button
|
79
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2">
|
80
|
+
Cancel</button><button
|
81
|
+
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2">
|
82
|
+
Deploy
|
83
|
+
</button>
|
84
|
+
</div>
|
85
|
+
<% end %>
|
86
|
+
</div>
|
87
|
+
<div class="w-full flex justify-center">
|
88
|
+
<%= render_card title: "Notifications", footer: render_button(text: "Mark all as read", class:
|
89
|
+
"w-full") do %>
|
90
|
+
<div class="p-6 pt-0 grid gap-4">
|
91
|
+
<div class="flex items-center space-x-4 rounded-md border p-4">
|
92
|
+
<svg
|
93
|
+
xmlns="http://www.w3.org/2000/svg"
|
94
|
+
width="24"
|
95
|
+
height="24"
|
96
|
+
viewBox="0 0 24 24"
|
97
|
+
fill="none"
|
98
|
+
stroke="currentColor"
|
99
|
+
stroke-width="2"
|
100
|
+
stroke-linecap="round"
|
101
|
+
stroke-linejoin="round"
|
102
|
+
class="lucide lucide-bell-ring">
|
103
|
+
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"></path>
|
104
|
+
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"></path>
|
105
|
+
<path d="M4 2C2.8 3.7 2 5.7 2 8"></path>
|
106
|
+
<path d="M22 8c0-2.3-.8-4.3-2-6"></path>
|
107
|
+
</svg>
|
108
|
+
<div class="flex-1 space-y-1">
|
109
|
+
<p class="text-sm font-medium leading-none">Push Notifications</p>
|
110
|
+
<p class="text-sm text-muted-foreground">Send notifications to device.</p>
|
111
|
+
</div>
|
112
|
+
<button
|
113
|
+
type="button"
|
114
|
+
role="switch"
|
115
|
+
aria-checked="false"
|
116
|
+
data-state="unchecked"
|
117
|
+
value="on"
|
118
|
+
class="peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input">
|
119
|
+
<span
|
120
|
+
data-state="unchecked"
|
121
|
+
class="pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"></span>
|
122
|
+
</button>
|
123
|
+
</div>
|
124
|
+
<div>
|
125
|
+
<div class="mb-4 grid grid-cols-[25px_1fr] items-start pb-4 last:mb-0 last:pb-0">
|
126
|
+
<span class="flex h-2 w-2 translate-y-1 rounded-full bg-sky-500"></span>
|
127
|
+
<div class="space-y-1">
|
128
|
+
<p class="text-sm font-medium leading-none">Your call has been confirmed.</p>
|
129
|
+
<p class="text-sm text-muted-foreground">1 hour ago</p>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
<div class="mb-4 grid grid-cols-[25px_1fr] items-start pb-4 last:mb-0 last:pb-0">
|
133
|
+
<span class="flex h-2 w-2 translate-y-1 rounded-full bg-sky-500"></span>
|
134
|
+
<div class="space-y-1">
|
135
|
+
<p class="text-sm font-medium leading-none">You have a new message!</p>
|
136
|
+
<p class="text-sm text-muted-foreground">1 hour ago</p>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
<div class="mb-4 grid grid-cols-[25px_1fr] items-start pb-4 last:mb-0 last:pb-0">
|
140
|
+
<span class="flex h-2 w-2 translate-y-1 rounded-full bg-sky-500"></span>
|
141
|
+
<div class="space-y-1">
|
142
|
+
<p class="text-sm font-medium leading-none">Your subscription is expiring soon!</p>
|
143
|
+
<p class="text-sm text-muted-foreground">2 hours ago</p>
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
<% end %>
|
149
|
+
</div>
|
150
|
+
<% end %>
|
151
|
+
|
152
|
+
<%= render_preview %>
|
153
|
+
|
154
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
155
|
+
|
156
|
+
<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"><a href="/docs/components/dialog#usage">Usage</a></h2>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= render_component_header title: "Checkbox",
|
2
|
+
description: "A control that allows the user to toggle between checked and not checked." %>
|
3
|
+
|
4
|
+
<%= content_for :preview, flush: true do %>
|
5
|
+
<%= render_checkbox label: "Accept terms and conditions", name: "terms" %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<%= render_preview %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!--prettier-ignore-->
|
2
|
+
<%= render "layouts/documentation/component_header",
|
3
|
+
title: "Collapsible",
|
4
|
+
description: "An interactive component which expands/collapses a panel." %>
|
5
|
+
|
6
|
+
<%= content_for :preview, flush: true do %>
|
7
|
+
<div class="w-full flex justify-center">
|
8
|
+
<%= render_collapsible trigger: "@peduarte starred 3 repositories" do %>
|
9
|
+
<% content_for :preview do %>
|
10
|
+
<div class="rounded-md border px-4 py-3 font-mono text-sm">@radix-ui/primitives</div>
|
11
|
+
<% end %>
|
12
|
+
<% content_for :body do %>
|
13
|
+
<div class="rounded-md border px-4 py-3 font-mono text-sm">@radix-ui/colors</div>
|
14
|
+
<div class="rounded-md border px-4 py-3 font-mono text-sm">@stitches/react</div>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<%= render_preview %>
|
21
|
+
|
22
|
+
<h2 class="font-heading scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" id="installation">Installation</h2>
|
23
|
+
|
24
|
+
<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"><a href="/docs/components/dialog#usage">Usage</a></h2>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">The Dialog component introduces:</p>
|
2
|
+
|
3
|
+
<ul class="my-6 ml-6 list-disc [&>li]:mt-2 text-sm">
|
4
|
+
<li><%= code("app/helpers/components/dialog_helper.rb") %></li>
|
5
|
+
<li><%= code("app/views/components/ui/_dialog.html.erb") %></li>
|
6
|
+
<li><%= code("app/javascript/controllers/ui/dialog_controller.js") %></li>
|
7
|
+
</ul>
|
8
|
+
|
9
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
10
|
+
The method <%= code("render_dialog") %> defined in <%= code("app/helpers/components/dialog_helper.rb") %>
|
11
|
+
accepts a blog for the inner components of the dialog.It renders the partial
|
12
|
+
<%= code("app/views/components/ui/_dialog.html.erb") %> which contains the model structure and
|
13
|
+
a close button.
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
17
|
+
The modal is composed of two components with corresponding helper methods, <%= code("dialog_trigger") %>,
|
18
|
+
which accepts a block for the element that will trigger the modal, and <%= code("dialog_content") %>,
|
19
|
+
which accepts a block for the body of the modal.
|
20
|
+
</p>
|
21
|
+
|
22
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
23
|
+
<%= code("dialog_trigger") %> and <%= code("dialog_content") %> must be called nested within
|
24
|
+
<%= code("render_dialog") %>
|
25
|
+
|
26
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
27
|
+
<%= code("app/javascript/controllers/ui/dialog_controller.js") %> is a stimulus controller that provides
|
28
|
+
the functionality of the modal.</p>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
<%= render_dialog do %>
|
3
|
+
<%= dialog_trigger do %>
|
4
|
+
<%= render_button("Dialog with Form", variant: :outline) %>
|
5
|
+
<% end %>
|
6
|
+
<%= dialog_content do %>
|
7
|
+
<div class="flex flex-col space-y-1.5 text-center sm:text-left">
|
8
|
+
<h2
|
9
|
+
id="radix-:r7m:"
|
10
|
+
class="text-lg font-semibold leading-none tracking-tight">
|
11
|
+
Edit profile
|
12
|
+
</h2>
|
13
|
+
<p
|
14
|
+
id="radix-:r7n:"
|
15
|
+
class="text-sm text-muted-foreground">
|
16
|
+
Make changes to your profile here. Click save when you're done.
|
17
|
+
</p>
|
18
|
+
</div>
|
19
|
+
<div class="grid gap-4 py-4">
|
20
|
+
<div class="grid grid-cols-4 items-center gap-4">
|
21
|
+
<label
|
22
|
+
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-right"
|
23
|
+
for="name">Name
|
24
|
+
</label>
|
25
|
+
<input
|
26
|
+
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 col-span-3"
|
27
|
+
id="name"
|
28
|
+
value="Pedro Duarte">
|
29
|
+
</div>
|
30
|
+
<div class="grid grid-cols-4 items-center gap-4">
|
31
|
+
<label
|
32
|
+
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-right"
|
33
|
+
for="username">Username
|
34
|
+
</label>
|
35
|
+
<input
|
36
|
+
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 col-span-3"
|
37
|
+
id="username"
|
38
|
+
value="@peduarte">
|
39
|
+
</div>
|
40
|
+
<div class="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
|
41
|
+
<button class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2"
|
42
|
+
type="submit">
|
43
|
+
Save changes
|
44
|
+
</button>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
|
2
|
+
<%= render_dialog do %>
|
3
|
+
<%= dialog_trigger do %>
|
4
|
+
<%= render_button("Open Notifications", variant: :outline) %>
|
5
|
+
<% end %>
|
6
|
+
<%= dialog_content do %>
|
7
|
+
<div class="bg-card text-card-foreground">
|
8
|
+
<div class="flex flex-col space-y-1.5 pb-3">
|
9
|
+
<h3 class="font-semibold leading-none tracking-tight">Notifications</h3>
|
10
|
+
<p class="text-sm text-muted-foreground">Choose what you want to be notified about.</p>
|
11
|
+
</div>
|
12
|
+
<div class=" pt-0 grid gap-1">
|
13
|
+
<div class="-mx-2 flex items-start space-x-4 rounded-md p-2 transition-all hover:bg-accent hover:text-accent-foreground"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="mt-px h-5 w-5"><path d="M8.60124 1.25086C8.60124 1.75459 8.26278 2.17927 7.80087 2.30989C10.1459 2.4647 12 4.41582 12 6.79999V10.25C12 11.0563 12.0329 11.7074 12.7236 12.0528C12.931 12.1565 13.0399 12.3892 12.9866 12.6149C12.9333 12.8406 12.7319 13 12.5 13H8.16144C8.36904 13.1832 8.49997 13.4513 8.49997 13.75C8.49997 14.3023 8.05226 14.75 7.49997 14.75C6.94769 14.75 6.49997 14.3023 6.49997 13.75C6.49997 13.4513 6.63091 13.1832 6.83851 13H2.49999C2.2681 13 2.06664 12.8406 2.01336 12.6149C1.96009 12.3892 2.06897 12.1565 2.27638 12.0528C2.96708 11.7074 2.99999 11.0563 2.99999 10.25V6.79999C2.99999 4.41537 4.85481 2.46396 7.20042 2.3098C6.73867 2.17908 6.40036 1.75448 6.40036 1.25086C6.40036 0.643104 6.89304 0.150421 7.5008 0.150421C8.10855 0.150421 8.60124 0.643104 8.60124 1.25086ZM7.49999 3.29999C5.56699 3.29999 3.99999 4.86699 3.99999 6.79999V10.25L4.00002 10.3009C4.0005 10.7463 4.00121 11.4084 3.69929 12H11.3007C10.9988 11.4084 10.9995 10.7463 11 10.3009L11 10.25V6.79999C11 4.86699 9.43299 3.29999 7.49999 3.29999Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>
|
14
|
+
<div class="space-y-1">
|
15
|
+
<p class="text-sm font-medium leading-none">Everything</p>
|
16
|
+
<p class="text-sm text-muted-foreground">Email digest, mentions & all activity.</p>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="-mx-2 flex items-start space-x-4 rounded-md bg-accent p-2 text-accent-foreground transition-all"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="mt-px h-5 w-5"><path d="M7.5 0.875C5.49797 0.875 3.875 2.49797 3.875 4.5C3.875 6.15288 4.98124 7.54738 6.49373 7.98351C5.2997 8.12901 4.27557 8.55134 3.50407 9.31167C2.52216 10.2794 2.02502 11.72 2.02502 13.5999C2.02502 13.8623 2.23769 14.0749 2.50002 14.0749C2.76236 14.0749 2.97502 13.8623 2.97502 13.5999C2.97502 11.8799 3.42786 10.7206 4.17091 9.9883C4.91536 9.25463 6.02674 8.87499 7.49995 8.87499C8.97317 8.87499 10.0846 9.25463 10.8291 9.98831C11.5721 10.7206 12.025 11.8799 12.025 13.5999C12.025 13.8623 12.2376 14.0749 12.5 14.0749C12.7623 14.075 12.975 13.8623 12.975 13.6C12.975 11.72 12.4778 10.2794 11.4959 9.31166C10.7244 8.55135 9.70025 8.12903 8.50625 7.98352C10.0187 7.5474 11.125 6.15289 11.125 4.5C11.125 2.49797 9.50203 0.875 7.5 0.875ZM4.825 4.5C4.825 3.02264 6.02264 1.825 7.5 1.825C8.97736 1.825 10.175 3.02264 10.175 4.5C10.175 5.97736 8.97736 7.175 7.5 7.175C6.02264 7.175 4.825 5.97736 4.825 4.5Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>
|
20
|
+
<div class="space-y-1">
|
21
|
+
<p class="text-sm font-medium leading-none">Available</p>
|
22
|
+
<p class="text-sm text-muted-foreground">Only mentions and comments.</p>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<div class="-mx-2 flex items-start space-x-4 rounded-md p-2 transition-all hover:bg-accent hover:text-accent-foreground"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="mt-px h-5 w-5"><path d="M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>
|
26
|
+
<div class="space-y-1">
|
27
|
+
<p class="text-sm font-medium leading-none">Ignoring</p>
|
28
|
+
<p class="text-sm text-muted-foreground">Turn off all notifications.</p>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
36
|
+
<div class="w-full flex justify-center">
|
37
|
+
<%= render_dialog do %>
|
38
|
+
<%= dialog_trigger do %>
|
39
|
+
<%= render_button("Dialog with Form", variant: :outline) %>
|
40
|
+
<% end %>
|
41
|
+
<%= dialog_content do %>
|
42
|
+
<div class="flex flex-col space-y-1.5 text-center sm:text-left">
|
43
|
+
<h2
|
44
|
+
id="radix-:r7m:"
|
45
|
+
class="text-lg font-semibold leading-none tracking-tight">
|
46
|
+
Edit profile
|
47
|
+
</h2>
|
48
|
+
<p
|
49
|
+
id="radix-:r7n:"
|
50
|
+
class="text-sm text-muted-foreground">
|
51
|
+
Make changes to your profile here. Click save when you're done.
|
52
|
+
</p>
|
53
|
+
</div>
|
54
|
+
<div class="grid gap-4 py-4">
|
55
|
+
<div class="grid grid-cols-4 items-center gap-4">
|
56
|
+
<label
|
57
|
+
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-right"
|
58
|
+
for="name">Name
|
59
|
+
</label>
|
60
|
+
<input
|
61
|
+
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 col-span-3"
|
62
|
+
id="name"
|
63
|
+
value="Pedro Duarte">
|
64
|
+
</div>
|
65
|
+
<div class="grid grid-cols-4 items-center gap-4">
|
66
|
+
<label
|
67
|
+
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-right"
|
68
|
+
for="username">Username
|
69
|
+
</label>
|
70
|
+
<input
|
71
|
+
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 col-span-3"
|
72
|
+
id="username"
|
73
|
+
value="@peduarte">
|
74
|
+
</div>
|
75
|
+
<div class="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
|
76
|
+
<button class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2"
|
77
|
+
type="submit">
|
78
|
+
Save changes
|
79
|
+
</button>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
<% end %>
|
83
|
+
<% end %>
|