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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22a141b91988a0b7411fa66841274699ee3f55d4a6b7b2afb152000cdba95385
|
4
|
+
data.tar.gz: f7a806d1a7897c1154b4b6a23903d1a2295e4152e29638ff6e5721982eea4760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b2264728f5100c07607e963c4027aa406e91c7635ef9b9cf6e1c21f5dd7fa193575e0a11b08a2021358835de6645665f6370b4119a1169c99b6ece40c195f9d
|
7
|
+
data.tar.gz: 357afd147401ff2c9911082690ed8b8f8162bbf60d64a229ee1c51bfbfd7c6cbfcfa88c8ace873dc1c64029c3ef5fefe64d4e0767029eec579eeb4208defb985
|
data/.prettierrc.json
CHANGED
data/README.md
CHANGED
@@ -5,8 +5,268 @@
|
|
5
5
|
Accessible and customizable components that you can copy and paste into your apps. Free. Open
|
6
6
|
Source. **Use this to build your own component library**.
|
7
7
|
|
8
|
+
## About
|
9
|
+
|
10
|
+
This is **NOT** a component library. It's a collection of re-usable components that you can copy and
|
11
|
+
paste into your apps.
|
12
|
+
|
13
|
+
**What do you mean by not a component library?**
|
14
|
+
|
15
|
+
I mean you do not install it as a dependency. It is not available or distributed via npm.
|
16
|
+
|
17
|
+
Pick the components you need. Copy and paste the code into your project and customize to your needs.
|
18
|
+
The code is yours.
|
19
|
+
|
20
|
+
Use this as a reference to build your own component libraries.
|
21
|
+
|
8
22
|

|
9
23
|
|
24
|
+
## Alpha Usage/Installation
|
25
|
+
|
26
|
+
Prior to the initial gem release, you can use this as an alpha by cloning this repository and
|
27
|
+
starting up the app as you would a standard rails app.
|
28
|
+
|
29
|
+
```
|
30
|
+
git clone https://github.com/aviflombaum/shadcn-rails.git
|
31
|
+
cd shadcn-rails
|
32
|
+
bundle install
|
33
|
+
./bin/dev
|
34
|
+
```
|
35
|
+
|
36
|
+
There are very few dependencies and no database so it should just boot up. Visit
|
37
|
+
http://localhost:3000 to see the demo app which is also the documentation. You'll be able to browse
|
38
|
+
the components at http://localhost:3000/components.
|
39
|
+
|
40
|
+
If there's a component you want to try in your app, you will be copying the code from this app to
|
41
|
+
yours. There's a few other steps you'll need.
|
42
|
+
|
43
|
+
## Installing a Component
|
44
|
+
|
45
|
+
### Add Tailwind CSS
|
46
|
+
|
47
|
+
Components are styled using Tailwind CSS. You need to install Tailwind CSS in your project.
|
48
|
+
|
49
|
+
[Follow the Tailwind CSS installation instructions to get started.](https://tailwindcss.com/docs/installation)
|
50
|
+
|
51
|
+
### Add dependencies
|
52
|
+
|
53
|
+
If you haven't already, install Tailwind into your rails application by adding `tailwindcss-rails`
|
54
|
+
to your `Gemfile` and install tailwind into your app:
|
55
|
+
|
56
|
+
```sh
|
57
|
+
./bin/bundle add tailwindcss-rails
|
58
|
+
./bin/rails tailwindcss:install
|
59
|
+
```
|
60
|
+
|
61
|
+
Then install ./bin/rails tailwindcss:install
|
62
|
+
|
63
|
+
### Configure tailwind.config.js
|
64
|
+
|
65
|
+
Here's what my `tailwind.config.js` file looks like:
|
66
|
+
|
67
|
+
```js title="tailwind.config.js"
|
68
|
+
const defaultTheme = require("tailwindcss/defaultTheme");
|
69
|
+
|
70
|
+
module.exports = {
|
71
|
+
darkMode: ["class"],
|
72
|
+
content: [
|
73
|
+
"./public/*.html",
|
74
|
+
"./app/helpers/**/*.rb",
|
75
|
+
"./app/javascript/**/*.js",
|
76
|
+
"./app/views/**/*.{erb,haml,html,slim}",
|
77
|
+
],
|
78
|
+
theme: {
|
79
|
+
container: {
|
80
|
+
center: true,
|
81
|
+
padding: "2rem",
|
82
|
+
screens: {
|
83
|
+
"2xl": "1400px",
|
84
|
+
},
|
85
|
+
},
|
86
|
+
extend: {
|
87
|
+
colors: {
|
88
|
+
border: "hsl(var(--border))",
|
89
|
+
input: "hsl(var(--input))",
|
90
|
+
ring: "hsl(var(--ring))",
|
91
|
+
background: "hsl(var(--background))",
|
92
|
+
foreground: "hsl(var(--foreground))",
|
93
|
+
primary: {
|
94
|
+
DEFAULT: "hsl(var(--primary))",
|
95
|
+
foreground: "hsl(var(--primary-foreground))",
|
96
|
+
},
|
97
|
+
secondary: {
|
98
|
+
DEFAULT: "hsl(var(--secondary))",
|
99
|
+
foreground: "hsl(var(--secondary-foreground))",
|
100
|
+
},
|
101
|
+
destructive: {
|
102
|
+
DEFAULT: "hsl(var(--destructive))",
|
103
|
+
foreground: "hsl(var(--destructive-foreground))",
|
104
|
+
},
|
105
|
+
muted: {
|
106
|
+
DEFAULT: "hsl(var(--muted))",
|
107
|
+
foreground: "hsl(var(--muted-foreground))",
|
108
|
+
},
|
109
|
+
accent: {
|
110
|
+
DEFAULT: "hsl(var(--accent))",
|
111
|
+
foreground: "hsl(var(--accent-foreground))",
|
112
|
+
},
|
113
|
+
popover: {
|
114
|
+
DEFAULT: "hsl(var(--popover))",
|
115
|
+
foreground: "hsl(var(--popover-foreground))",
|
116
|
+
},
|
117
|
+
card: {
|
118
|
+
DEFAULT: "hsl(var(--card))",
|
119
|
+
foreground: "hsl(var(--card-foreground))",
|
120
|
+
},
|
121
|
+
},
|
122
|
+
borderRadius: {
|
123
|
+
lg: `var(--radius)`,
|
124
|
+
md: `calc(var(--radius) - 2px)`,
|
125
|
+
sm: "calc(var(--radius) - 4px)",
|
126
|
+
},
|
127
|
+
fontFamily: {
|
128
|
+
sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans],
|
129
|
+
},
|
130
|
+
keyframes: {
|
131
|
+
"accordion-down": {
|
132
|
+
from: { height: 0 },
|
133
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
134
|
+
},
|
135
|
+
"accordion-up": {
|
136
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
137
|
+
to: { height: 0 },
|
138
|
+
},
|
139
|
+
},
|
140
|
+
animation: {
|
141
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
142
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
143
|
+
},
|
144
|
+
},
|
145
|
+
},
|
146
|
+
plugins: [
|
147
|
+
require("@tailwindcss/forms"),
|
148
|
+
require("@tailwindcss/aspect-ratio"),
|
149
|
+
require("@tailwindcss/typography"),
|
150
|
+
require("@tailwindcss/container-queries"),
|
151
|
+
require("tailwindcss-animate"),
|
152
|
+
],
|
153
|
+
};
|
154
|
+
```
|
155
|
+
|
156
|
+
### Configure styles
|
157
|
+
|
158
|
+
Add the following to your app/assets/stylesheets/application.tailwind.css file.
|
159
|
+
|
160
|
+
```css title="application.tailwind.css"
|
161
|
+
@tailwind base;
|
162
|
+
@tailwind components;
|
163
|
+
@tailwind utilities;
|
164
|
+
|
165
|
+
@layer base {
|
166
|
+
:root {
|
167
|
+
--background: 0 0% 100%;
|
168
|
+
--foreground: 222.2 47.4% 11.2%;
|
169
|
+
|
170
|
+
--muted: 210 40% 96.1%;
|
171
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
172
|
+
|
173
|
+
--popover: 0 0% 100%;
|
174
|
+
--popover-foreground: 222.2 47.4% 11.2%;
|
175
|
+
|
176
|
+
--border: 214.3 31.8% 91.4%;
|
177
|
+
--input: 214.3 31.8% 91.4%;
|
178
|
+
|
179
|
+
--card: 0 0% 100%;
|
180
|
+
--card-foreground: 222.2 47.4% 11.2%;
|
181
|
+
|
182
|
+
--primary: 222.2 47.4% 11.2%;
|
183
|
+
--primary-foreground: 210 40% 98%;
|
184
|
+
|
185
|
+
--secondary: 210 40% 96.1%;
|
186
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
187
|
+
|
188
|
+
--accent: 210 40% 96.1%;
|
189
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
190
|
+
|
191
|
+
--destructive: 0 100% 50%;
|
192
|
+
--destructive-foreground: 210 40% 98%;
|
193
|
+
|
194
|
+
--ring: 215 20.2% 65.1%;
|
195
|
+
|
196
|
+
--radius: 0.5rem;
|
197
|
+
}
|
198
|
+
|
199
|
+
.dark {
|
200
|
+
--background: 224 71% 4%;
|
201
|
+
--foreground: 213 31% 91%;
|
202
|
+
|
203
|
+
--muted: 223 47% 11%;
|
204
|
+
--muted-foreground: 215.4 16.3% 56.9%;
|
205
|
+
|
206
|
+
--accent: 216 34% 17%;
|
207
|
+
--accent-foreground: 210 40% 98%;
|
208
|
+
|
209
|
+
--popover: 224 71% 4%;
|
210
|
+
--popover-foreground: 215 20.2% 65.1%;
|
211
|
+
|
212
|
+
--border: 216 34% 17%;
|
213
|
+
--input: 216 34% 17%;
|
214
|
+
|
215
|
+
--card: 224 71% 4%;
|
216
|
+
--card-foreground: 213 31% 91%;
|
217
|
+
|
218
|
+
--primary: 210 40% 98%;
|
219
|
+
--primary-foreground: 222.2 47.4% 1.2%;
|
220
|
+
|
221
|
+
--secondary: 222.2 47.4% 11.2%;
|
222
|
+
--secondary-foreground: 210 40% 98%;
|
223
|
+
|
224
|
+
--destructive: 0 63% 31%;
|
225
|
+
--destructive-foreground: 210 40% 98%;
|
226
|
+
|
227
|
+
--ring: 216 34% 17%;
|
228
|
+
|
229
|
+
--radius: 0.5rem;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
233
|
+
@layer base {
|
234
|
+
* {
|
235
|
+
@apply border-border;
|
236
|
+
}
|
237
|
+
body {
|
238
|
+
@apply bg-background text-foreground;
|
239
|
+
font-feature-settings:
|
240
|
+
"rlig" 1,
|
241
|
+
"calt" 1;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
```
|
245
|
+
|
246
|
+
### Copy a a component's files to your application
|
247
|
+
|
248
|
+
For example, if you want to use the Accordion component, you would copy the following files to your
|
249
|
+
application:
|
250
|
+
|
251
|
+
- `app/javascript/controllers/components/ui/accordion_controller.js` The Stimulus controller for any
|
252
|
+
component that requires javascript.
|
253
|
+
- `app/helpers/components/accordion_helper.rb` The helper for the component that allows for easy
|
254
|
+
rendering within views.
|
255
|
+
- `app/views/components/ui/_accordion.html.erb` The html for the component.
|
256
|
+
|
257
|
+
Once those are copied in your application you can render an accordion with:
|
258
|
+
|
259
|
+
```erb
|
260
|
+
<%= render_accordion title: "Did you know?", description: "You can wrap shadcn helpers in any
|
261
|
+
component library you want!" %>
|
262
|
+
<%= render_accordion title: "Use the generators.", description: "Add components with #{code("rails g shadcn_ui add accordion")}".html_safe %>
|
263
|
+
```
|
264
|
+
|
265
|
+
See the component's demo page in `app/views/examples/components/accordion.html.erb` for more
|
266
|
+
examples.
|
267
|
+
|
268
|
+
This will be similar for each component.
|
269
|
+
|
10
270
|
## Documentation
|
11
271
|
|
12
272
|
Visit https://avi.nyc/shadcn-on-rails to view the documentation.
|
data/Rakefile
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
require "bundler/gem_tasks"
|
4
|
-
require "rspec/core/rake_task"
|
5
4
|
|
6
|
-
|
5
|
+
if ENV["RAILS_ENV"] != "production"
|
6
|
+
require "rspec/core/rake_task"
|
7
7
|
|
8
|
-
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
9
|
+
|
10
|
+
task default: :spec
|
11
|
+
end
|
9
12
|
|
10
13
|
require_relative "config/application"
|
11
14
|
|
@@ -13,30 +13,3 @@
|
|
13
13
|
*=
|
14
14
|
*= require_self
|
15
15
|
*/
|
16
|
-
.st-accordion {
|
17
|
-
.st-accordion__icon:before {
|
18
|
-
content: "▼";
|
19
|
-
display: inline-block;
|
20
|
-
margin-right: 5px;
|
21
|
-
font-size: 80%;
|
22
|
-
text-decoration: none;
|
23
|
-
transform: rotate(-90deg);
|
24
|
-
}
|
25
|
-
.st-accordion__icon--opened:before {
|
26
|
-
transform: rotate(0deg);
|
27
|
-
}
|
28
|
-
|
29
|
-
.st-accordion__content:not(.st-accordion__content--visible) {
|
30
|
-
height: 0;
|
31
|
-
opacity: 0;
|
32
|
-
visibility: hidden;
|
33
|
-
overflow: hidden;
|
34
|
-
transition: all 0.2s;
|
35
|
-
}
|
36
|
-
.st-accordion__content.st-accordion__content--visible {
|
37
|
-
opacity: 1;
|
38
|
-
visibility: visible;
|
39
|
-
overflow: hidden;
|
40
|
-
transition: all 0.2s;
|
41
|
-
}
|
42
|
-
}
|
@@ -1,92 +1,65 @@
|
|
1
|
+
@import "shadcn.css";
|
2
|
+
|
1
3
|
@tailwind base;
|
2
4
|
@tailwind components;
|
3
5
|
@tailwind utilities;
|
4
6
|
|
5
7
|
@layer base {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
--muted-foreground: 215.4 16.3% 46.9%;
|
13
|
-
|
14
|
-
--popover: 0 0% 100%;
|
15
|
-
--popover-foreground: 222.2 47.4% 11.2%;
|
16
|
-
|
17
|
-
--border: 214.3 31.8% 91.4%;
|
18
|
-
--input: 214.3 31.8% 91.4%;
|
19
|
-
|
20
|
-
--card: 0 0% 100%;
|
21
|
-
--card-foreground: 222.2 47.4% 11.2%;
|
22
|
-
|
23
|
-
--primary: 222.2 47.4% 11.2%;
|
24
|
-
--primary-foreground: 210 40% 98%;
|
25
|
-
|
26
|
-
--secondary: 210 40% 96.1%;
|
27
|
-
--secondary-foreground: 222.2 47.4% 11.2%;
|
28
|
-
|
29
|
-
--accent: 210 40% 96.1%;
|
30
|
-
--accent-foreground: 222.2 47.4% 11.2%;
|
31
|
-
|
32
|
-
--destructive: 0 100% 50%;
|
33
|
-
--destructive-foreground: 210 40% 98%;
|
34
|
-
|
35
|
-
--ring: 215 20.2% 65.1%;
|
36
|
-
|
37
|
-
--radius: 0.5rem;
|
8
|
+
.container {
|
9
|
+
margin-left: auto;
|
10
|
+
margin-right: auto;
|
11
|
+
padding-left: 2rem;
|
12
|
+
padding-right: 2rem;
|
13
|
+
width: 100%;
|
38
14
|
}
|
39
15
|
|
40
|
-
|
41
|
-
--
|
42
|
-
|
43
|
-
|
44
|
-
--muted: 223 47% 11%;
|
45
|
-
--muted-foreground: 215.4 16.3% 56.9%;
|
46
|
-
|
47
|
-
--accent: 216 34% 17%;
|
48
|
-
--accent-foreground: 210 40% 98%;
|
49
|
-
|
50
|
-
--popover: 224 71% 4%;
|
51
|
-
--popover-foreground: 215 20.2% 65.1%;
|
16
|
+
:root {
|
17
|
+
--pink: 301 98% 50% 0.88;
|
18
|
+
}
|
19
|
+
}
|
52
20
|
|
53
|
-
|
54
|
-
|
21
|
+
article.documentation h1 {
|
22
|
+
@apply scroll-m-20 text-4xl font-bold tracking-tight;
|
23
|
+
}
|
55
24
|
|
56
|
-
|
57
|
-
|
25
|
+
article.documentation p + h1 {
|
26
|
+
@apply mt-12;
|
27
|
+
}
|
28
|
+
article.documentation h2 {
|
29
|
+
@apply scroll-m-20 text-3xl font-bold tracking-tight my-8;
|
30
|
+
}
|
58
31
|
|
59
|
-
|
60
|
-
|
32
|
+
article.documentation h3 {
|
33
|
+
@apply scroll-m-20 text-2xl font-bold tracking-tight my-4;
|
34
|
+
}
|
61
35
|
|
62
|
-
|
63
|
-
|
36
|
+
article.documentation h4 {
|
37
|
+
@apply scroll-m-20 text-xl font-bold tracking-tight my-2;
|
38
|
+
}
|
64
39
|
|
65
|
-
|
66
|
-
|
40
|
+
article.documentation subtitle {
|
41
|
+
@apply text-lg text-muted-foreground;
|
42
|
+
}
|
43
|
+
article.documentation p {
|
44
|
+
@apply leading-7 [&:not(:first-child)]:mt-6;
|
45
|
+
}
|
67
46
|
|
68
|
-
|
47
|
+
article.documentation :where(code):not(:where([class~="not-prose"] *)):before {
|
48
|
+
content: "";
|
49
|
+
}
|
69
50
|
|
70
|
-
|
71
|
-
|
51
|
+
article.documentation :where(code):not(:where([class~="not-prose"] *)):after {
|
52
|
+
content: "";
|
72
53
|
}
|
73
54
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
}
|
78
|
-
body {
|
79
|
-
@apply bg-background text-foreground;
|
80
|
-
font-feature-settings:
|
81
|
-
"rlig" 1,
|
82
|
-
"calt" 1;
|
83
|
-
}
|
55
|
+
article.documentation p a {
|
56
|
+
@apply underline hover:text-pink;
|
57
|
+
}
|
84
58
|
|
85
|
-
|
86
|
-
|
87
|
-
|
59
|
+
article.documentation pre {
|
60
|
+
@apply max-h-[650px] overflow-x-auto rounded-lg border bg-zinc-950 dark:bg-zinc-900 text-white py-4 px-8 rounded-lg my-4;
|
61
|
+
}
|
88
62
|
|
89
|
-
|
90
|
-
|
91
|
-
}
|
63
|
+
article.documentation p > code {
|
64
|
+
@apply text-white bg-black p-1 rounded;
|
92
65
|
}
|
@@ -0,0 +1,216 @@
|
|
1
|
+
@layer base {
|
2
|
+
:root {
|
3
|
+
--font-sans: "Inter var";
|
4
|
+
--background: 0 0% 100%;
|
5
|
+
--foreground: 222.2 47.4% 11.2%;
|
6
|
+
|
7
|
+
--muted: 210 40% 96.1%;
|
8
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
9
|
+
|
10
|
+
--popover: 0 0% 100%;
|
11
|
+
--popover-foreground: 222.2 47.4% 11.2%;
|
12
|
+
|
13
|
+
--border: 214.3 31.8% 91.4%;
|
14
|
+
--input: 214.3 31.8% 91.4%;
|
15
|
+
|
16
|
+
--card: 0 0% 100%;
|
17
|
+
--card-foreground: 222.2 47.4% 11.2%;
|
18
|
+
|
19
|
+
--primary: 222.2 47.4% 11.2%;
|
20
|
+
--primary-foreground: 210 40% 98%;
|
21
|
+
|
22
|
+
--secondary: 210 40% 96.1%;
|
23
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
24
|
+
|
25
|
+
--accent: 210 40% 96.1%;
|
26
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
27
|
+
|
28
|
+
--destructive: 0 100% 50%;
|
29
|
+
--destructive-foreground: 210 40% 98%;
|
30
|
+
|
31
|
+
--success: 132, 95.3%, 33.3%, 0.74;
|
32
|
+
--success-foreground: 109 55% 28%;
|
33
|
+
|
34
|
+
--info: 223 78% 42%;
|
35
|
+
--info-foreground: 225 100% 50%;
|
36
|
+
|
37
|
+
--attention: 45 90% 45%;
|
38
|
+
--attention-foreground: 60 98.4% 48.8% 0.82;
|
39
|
+
|
40
|
+
--ring: 215 20.2% 65.1%;
|
41
|
+
|
42
|
+
--radius: 0.5rem;
|
43
|
+
}
|
44
|
+
|
45
|
+
.dark {
|
46
|
+
--background: 224 71% 4%;
|
47
|
+
--foreground: 213 31% 91%;
|
48
|
+
|
49
|
+
--muted: 223 47% 11%;
|
50
|
+
--muted-foreground: 215.4 16.3% 56.9%;
|
51
|
+
|
52
|
+
--accent: 216 34% 17%;
|
53
|
+
--accent-foreground: 210 40% 98%;
|
54
|
+
|
55
|
+
--popover: 224 71% 4%;
|
56
|
+
--popover-foreground: 215 20.2% 65.1%;
|
57
|
+
|
58
|
+
--border: 216 34% 17%;
|
59
|
+
--input: 216 34% 17%;
|
60
|
+
|
61
|
+
--card: 224 71% 4%;
|
62
|
+
--card-foreground: 213 31% 91%;
|
63
|
+
|
64
|
+
--primary: 210 40% 98%;
|
65
|
+
--primary-foreground: 222.2 47.4% 1.2%;
|
66
|
+
|
67
|
+
--secondary: 222.2 47.4% 11.2%;
|
68
|
+
--secondary-foreground: 210 40% 98%;
|
69
|
+
|
70
|
+
--destructive: 0 63% 31%;
|
71
|
+
--destructive-foreground: 210 40% 98%;
|
72
|
+
|
73
|
+
--attention: 45, 90%, 45%, 0.8;
|
74
|
+
--attention-foreground: 60 98.4% 48.8% 0.82;
|
75
|
+
|
76
|
+
--success: 109 55% 28%;
|
77
|
+
--success-foreground: 109 55% 28%;
|
78
|
+
|
79
|
+
--ring: 216 34% 17%;
|
80
|
+
|
81
|
+
--radius: 0.5rem;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
@layer base {
|
86
|
+
* {
|
87
|
+
@apply border-border;
|
88
|
+
}
|
89
|
+
body {
|
90
|
+
@apply bg-background text-foreground;
|
91
|
+
font-feature-settings:
|
92
|
+
"rlig" 1,
|
93
|
+
"calt" 1;
|
94
|
+
}
|
95
|
+
|
96
|
+
.code-sample {
|
97
|
+
@apply max-h-[650px] min-h-[350px] overflow-x-auto rounded-lg border bg-zinc-950 dark:bg-zinc-900;
|
98
|
+
}
|
99
|
+
|
100
|
+
.code-sample pre {
|
101
|
+
@apply min-h-[350px];
|
102
|
+
}
|
103
|
+
|
104
|
+
.code-sample span {
|
105
|
+
@apply bg-zinc-950;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
input[type="range"] {
|
109
|
+
display: inline-block;
|
110
|
+
vertical-align: middle;
|
111
|
+
font-size: 1em;
|
112
|
+
font-family: Arial, sans-serif;
|
113
|
+
}
|
114
|
+
|
115
|
+
/* input[type="range"]:focus,
|
116
|
+
input[type="number"]:focus {
|
117
|
+
box-shadow: 0 0 3px 1px #4b81dd;
|
118
|
+
outline: none;
|
119
|
+
} */
|
120
|
+
|
121
|
+
input[type="range"] {
|
122
|
+
-webkit-appearance: none;
|
123
|
+
margin-right: 15px;
|
124
|
+
width: 200px;
|
125
|
+
height: 7px;
|
126
|
+
background: #f4f4f5;
|
127
|
+
border-radius: 5px;
|
128
|
+
background-image: linear-gradient(#000, #000);
|
129
|
+
background-repeat: no-repeat;
|
130
|
+
}
|
131
|
+
|
132
|
+
/* Input Thumb */
|
133
|
+
input[type="range"]::-webkit-slider-thumb {
|
134
|
+
-webkit-appearance: none;
|
135
|
+
height: 20px;
|
136
|
+
width: 20px;
|
137
|
+
border-radius: 50%;
|
138
|
+
background: #fff;
|
139
|
+
cursor: ew-resize;
|
140
|
+
box-shadow: 0 0 2px 0 #000;
|
141
|
+
transition: background 0.3s ease-in-out;
|
142
|
+
}
|
143
|
+
|
144
|
+
input[type="range"]::-moz-range-thumb {
|
145
|
+
-webkit-appearance: none;
|
146
|
+
height: 20px;
|
147
|
+
width: 20px;
|
148
|
+
border-radius: 50%;
|
149
|
+
background: #fff;
|
150
|
+
cursor: ew-resize;
|
151
|
+
box-shadow: 0 0 2px 0 #000;
|
152
|
+
transition: background 0.3s ease-in-out;
|
153
|
+
}
|
154
|
+
|
155
|
+
input[type="range"]::-ms-thumb {
|
156
|
+
-webkit-appearance: none;
|
157
|
+
height: 20px;
|
158
|
+
width: 20px;
|
159
|
+
border-radius: 50%;
|
160
|
+
background: #fff;
|
161
|
+
cursor: ew-resize;
|
162
|
+
box-shadow: 0 0 2px 0 #000;
|
163
|
+
transition: background 0.3s ease-in-out;
|
164
|
+
}
|
165
|
+
|
166
|
+
/* input[type="range"]::-webkit-slider-thumb:hover {
|
167
|
+
background: #a1a1aa;
|
168
|
+
}
|
169
|
+
|
170
|
+
input[type="range"]::-moz-range-thumb:hover {
|
171
|
+
background: #a1a1aa;
|
172
|
+
}
|
173
|
+
|
174
|
+
input[type="range"]::-ms-thumb:hover {
|
175
|
+
background: #a1a1aa;
|
176
|
+
} */
|
177
|
+
|
178
|
+
input[type="range"]::-moz-range-track {
|
179
|
+
-webkit-appearance: none;
|
180
|
+
box-shadow: none;
|
181
|
+
border: none;
|
182
|
+
background: transparent;
|
183
|
+
}
|
184
|
+
|
185
|
+
input[type="range"]::-ms-track {
|
186
|
+
-webkit-appearance: none;
|
187
|
+
box-shadow: none;
|
188
|
+
border: none;
|
189
|
+
background: transparent;
|
190
|
+
}
|
191
|
+
|
192
|
+
.st-accordion .st-accordion__icon:before {
|
193
|
+
content: "▼";
|
194
|
+
display: inline-block;
|
195
|
+
margin-right: 5px;
|
196
|
+
font-size: 80%;
|
197
|
+
text-decoration: none;
|
198
|
+
transform: rotate(-90deg);
|
199
|
+
}
|
200
|
+
.st-accordion .st-accordion__icon--opened:before {
|
201
|
+
transform: rotate(0deg);
|
202
|
+
}
|
203
|
+
|
204
|
+
.st-accordion .st-accordion__content:not(.st-accordion__content--visible) {
|
205
|
+
height: 0;
|
206
|
+
opacity: 0;
|
207
|
+
visibility: hidden;
|
208
|
+
overflow: hidden;
|
209
|
+
transition: all 0.2s;
|
210
|
+
}
|
211
|
+
.st-accordion .st-accordion__content.st-accordion__content--visible {
|
212
|
+
opacity: 1;
|
213
|
+
visibility: visible;
|
214
|
+
overflow: hidden;
|
215
|
+
transition: all 0.2s;
|
216
|
+
}
|