shadcn-ui 0.0.2 → 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/Rakefile +6 -3
- data/app/assets/stylesheets/{application.scss → application.css} +0 -27
- data/app/assets/stylesheets/application.tailwind.css +32 -160
- data/app/assets/stylesheets/shadcn.css +216 -0
- data/app/controllers/documentation_controller.rb +1 -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 +1 -1
- data/app/helpers/components/checkbox_helper.rb +2 -2
- data/app/helpers/components/collapsible_helper.rb +8 -0
- data/app/helpers/components/sheet_helper.rb +9 -0
- data/app/helpers/components_helper.rb +11 -0
- data/app/helpers/examples_helper.rb +1 -2
- 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/_checkbox.html.erb +2 -1
- data/app/views/components/ui/_collapsible.html.erb +2 -6
- data/app/views/components/ui/_sheet.html.erb +1 -1
- data/app/views/documentation/generators.html.md +1 -0
- data/app/views/documentation/index.html.md +22 -0
- data/app/views/documentation/installation.html.md +130 -2
- 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/layouts/shared/_components.html.erb +9 -8
- data/config/shadcn.tailwind.js +98 -0
- data/config/tailwind.config.js +13 -74
- data/lib/components.json +7 -3
- 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
- metadata +39 -5
- data/lib/generators/shadcn_ui_generator.rb +0 -81
- /data/app/assets/stylesheets/{lambda.light.scss → lambda.light.css} +0 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
const defaultTheme = require("tailwindcss/defaultTheme");
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
darkMode: ["class"],
|
5
|
+
content: [
|
6
|
+
"./public/*.html",
|
7
|
+
"./app/helpers/**/*.rb",
|
8
|
+
"./app/javascript/**/*.js",
|
9
|
+
"./app/views/**/*.{erb,haml,html,slim}",
|
10
|
+
],
|
11
|
+
theme: {
|
12
|
+
container: {
|
13
|
+
center: true,
|
14
|
+
padding: "2rem",
|
15
|
+
screens: {
|
16
|
+
"2xl": "1400px",
|
17
|
+
},
|
18
|
+
},
|
19
|
+
extend: {
|
20
|
+
colors: {
|
21
|
+
border: "hsl(var(--border))",
|
22
|
+
input: "hsl(var(--input))",
|
23
|
+
ring: "hsl(var(--ring))",
|
24
|
+
background: "hsl(var(--background))",
|
25
|
+
foreground: "hsl(var(--foreground))",
|
26
|
+
primary: {
|
27
|
+
DEFAULT: "hsl(var(--primary))",
|
28
|
+
foreground: "hsl(var(--primary-foreground))",
|
29
|
+
},
|
30
|
+
secondary: {
|
31
|
+
DEFAULT: "hsl(var(--secondary))",
|
32
|
+
foreground: "hsl(var(--secondary-foreground))",
|
33
|
+
},
|
34
|
+
destructive: {
|
35
|
+
DEFAULT: "hsl(var(--destructive))",
|
36
|
+
foreground: "hsl(var(--destructive-foreground))",
|
37
|
+
},
|
38
|
+
success: {
|
39
|
+
DEFAULT: "hsl(var(--success))",
|
40
|
+
foreground: "hsl(var(--success-foreground))",
|
41
|
+
},
|
42
|
+
info: {
|
43
|
+
DEFAULT: "hsl(var(--info))",
|
44
|
+
foreground: "hsl(var(--info-foreground))",
|
45
|
+
},
|
46
|
+
attention: {
|
47
|
+
DEFAULT: "var(--yellow-50)",
|
48
|
+
foreground: "hsl(var(--attention-foreground))",
|
49
|
+
},
|
50
|
+
muted: {
|
51
|
+
DEFAULT: "hsl(var(--muted))",
|
52
|
+
foreground: "hsl(var(--muted-foreground))",
|
53
|
+
},
|
54
|
+
accent: {
|
55
|
+
DEFAULT: "hsl(var(--accent))",
|
56
|
+
foreground: "hsl(var(--accent-foreground))",
|
57
|
+
},
|
58
|
+
popover: {
|
59
|
+
DEFAULT: "hsl(var(--popover))",
|
60
|
+
foreground: "hsl(var(--popover-foreground))",
|
61
|
+
},
|
62
|
+
card: {
|
63
|
+
DEFAULT: "hsl(var(--card))",
|
64
|
+
foreground: "hsl(var(--card-foreground))",
|
65
|
+
},
|
66
|
+
},
|
67
|
+
borderRadius: {
|
68
|
+
lg: "var(--radius)",
|
69
|
+
md: "calc(var(--radius) - 2px)",
|
70
|
+
sm: "calc(var(--radius) - 4px)",
|
71
|
+
},
|
72
|
+
fontFamily: {
|
73
|
+
sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans],
|
74
|
+
},
|
75
|
+
keyframes: {
|
76
|
+
"accordion-down": {
|
77
|
+
from: { height: 0 },
|
78
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
79
|
+
},
|
80
|
+
"accordion-up": {
|
81
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
82
|
+
to: { height: 0 },
|
83
|
+
},
|
84
|
+
},
|
85
|
+
animation: {
|
86
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
87
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
88
|
+
},
|
89
|
+
},
|
90
|
+
},
|
91
|
+
plugins: [
|
92
|
+
require("@tailwindcss/forms"),
|
93
|
+
require("@tailwindcss/aspect-ratio"),
|
94
|
+
require("@tailwindcss/typography"),
|
95
|
+
require("@tailwindcss/container-queries"),
|
96
|
+
require("tailwindcss-animate"),
|
97
|
+
],
|
98
|
+
};
|
data/config/tailwind.config.js
CHANGED
@@ -1,86 +1,25 @@
|
|
1
|
-
const
|
1
|
+
const shadcnConfig = require("./shadcn.tailwind.js");
|
2
2
|
|
3
3
|
module.exports = {
|
4
|
-
|
5
|
-
content: [
|
6
|
-
"./public/*.html",
|
7
|
-
"./app/helpers/**/*.rb",
|
8
|
-
"./app/javascript/**/*.js",
|
9
|
-
"./app/views/**/*.{erb,haml,html,slim}",
|
10
|
-
],
|
4
|
+
...shadcnConfig,
|
11
5
|
theme: {
|
12
|
-
container: {
|
13
|
-
center: true,
|
14
|
-
padding: "2rem",
|
15
|
-
screens: {
|
16
|
-
"2xl": "1400px",
|
17
|
-
},
|
18
|
-
},
|
19
6
|
extend: {
|
20
7
|
colors: {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
primary: {
|
27
|
-
DEFAULT: "hsl(var(--primary))",
|
28
|
-
foreground: "hsl(var(--primary-foreground))",
|
29
|
-
},
|
30
|
-
secondary: {
|
31
|
-
DEFAULT: "hsl(var(--secondary))",
|
32
|
-
foreground: "hsl(var(--secondary-foreground))",
|
33
|
-
},
|
34
|
-
destructive: {
|
35
|
-
DEFAULT: "hsl(var(--destructive))",
|
36
|
-
foreground: "hsl(var(--destructive-foreground))",
|
37
|
-
},
|
38
|
-
muted: {
|
39
|
-
DEFAULT: "hsl(var(--muted))",
|
40
|
-
foreground: "hsl(var(--muted-foreground))",
|
41
|
-
},
|
42
|
-
accent: {
|
43
|
-
DEFAULT: "hsl(var(--accent))",
|
44
|
-
foreground: "hsl(var(--accent-foreground))",
|
8
|
+
...shadcnConfig.theme.extend.colors,
|
9
|
+
pink: "hsl(var(--pink))",
|
10
|
+
success: {
|
11
|
+
DEFAULT: "hsl(var(--success))",
|
12
|
+
foreground: "hsl(var(--success-foreground))",
|
45
13
|
},
|
46
|
-
|
47
|
-
DEFAULT: "hsl(var(--
|
48
|
-
foreground: "hsl(var(--
|
14
|
+
info: {
|
15
|
+
DEFAULT: "hsl(var(--info))",
|
16
|
+
foreground: "hsl(var(--info-foreground))",
|
49
17
|
},
|
50
|
-
|
51
|
-
DEFAULT: "hsl(var(--
|
52
|
-
foreground: "hsl(var(--
|
18
|
+
attention: {
|
19
|
+
DEFAULT: "hsl(var(--attention))",
|
20
|
+
foreground: "hsl(var(--attention-foreground))",
|
53
21
|
},
|
54
22
|
},
|
55
|
-
borderRadius: {
|
56
|
-
lg: `var(--radius)`,
|
57
|
-
md: `calc(var(--radius) - 2px)`,
|
58
|
-
sm: "calc(var(--radius) - 4px)",
|
59
|
-
},
|
60
|
-
fontFamily: {
|
61
|
-
sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans],
|
62
|
-
},
|
63
|
-
keyframes: {
|
64
|
-
"accordion-down": {
|
65
|
-
from: { height: 0 },
|
66
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
67
|
-
},
|
68
|
-
"accordion-up": {
|
69
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
70
|
-
to: { height: 0 },
|
71
|
-
},
|
72
|
-
},
|
73
|
-
animation: {
|
74
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
75
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
76
|
-
},
|
77
23
|
},
|
78
24
|
},
|
79
|
-
plugins: [
|
80
|
-
require("@tailwindcss/forms"),
|
81
|
-
require("@tailwindcss/aspect-ratio"),
|
82
|
-
require("@tailwindcss/typography"),
|
83
|
-
require("@tailwindcss/container-queries"),
|
84
|
-
require("tailwindcss-animate"),
|
85
|
-
],
|
86
25
|
};
|
data/lib/components.json
CHANGED
@@ -102,9 +102,13 @@
|
|
102
102
|
"name": "dropdown-menu",
|
103
103
|
"type": "components:ui",
|
104
104
|
"files": [
|
105
|
-
"app/helpers/components/
|
106
|
-
"app/views/components/ui/
|
107
|
-
"app/javascript/controllers/ui/
|
105
|
+
"app/helpers/components/dropdown_menu_helper.rb",
|
106
|
+
"app/views/components/ui/_dropdown_menu.html.erb",
|
107
|
+
"app/javascript/controllers/ui/dropdown_controller.js"
|
108
|
+
],
|
109
|
+
"dependencies": [
|
110
|
+
{ "component": "popover" },
|
111
|
+
"app/views/components/ui/shared/_menu_item.html.erb"
|
108
112
|
]
|
109
113
|
},
|
110
114
|
"hover-card": {
|
@@ -0,0 +1,201 @@
|
|
1
|
+
require "json"
|
2
|
+
require "rails/generators/base"
|
3
|
+
|
4
|
+
class ShadcnUiGenerator < Rails::Generators::Base
|
5
|
+
namespace "shadcn-ui"
|
6
|
+
|
7
|
+
attr_reader :component_name, :target_rails_root, :options
|
8
|
+
|
9
|
+
argument :component, required: false, desc: "The name of the component to install"
|
10
|
+
argument :rails_root, required: false, desc: "Path to the Rails root directory"
|
11
|
+
|
12
|
+
def self.banner
|
13
|
+
"rails generate shadcn-ui <component_name> [--remove] [rails_root_path]"
|
14
|
+
end
|
15
|
+
|
16
|
+
def initialize(args, *options)
|
17
|
+
super
|
18
|
+
@component_name = component
|
19
|
+
@target_rails_root = rails_root || Rails.root
|
20
|
+
@options = options.first
|
21
|
+
end
|
22
|
+
|
23
|
+
def preprocess_sources
|
24
|
+
check_target_app
|
25
|
+
end
|
26
|
+
|
27
|
+
def install_component
|
28
|
+
if component_valid?
|
29
|
+
copy_files
|
30
|
+
else
|
31
|
+
display_available_components
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def check_target_app
|
38
|
+
puts "Checking for tailwind..."
|
39
|
+
puts "...tailwind found." if check_for_tailwind
|
40
|
+
|
41
|
+
puts "Checking for shadcn.css..."
|
42
|
+
check_for_shadcn_css
|
43
|
+
|
44
|
+
puts "Checking for shadcn import..."
|
45
|
+
check_for_shadcn_css_import
|
46
|
+
|
47
|
+
puts "Checking for shadcn.tailwind.js..."
|
48
|
+
check_for_shadcn_tailwind_js
|
49
|
+
|
50
|
+
puts "Checking for component_helper.rb"
|
51
|
+
check_for_component_helper
|
52
|
+
end
|
53
|
+
|
54
|
+
def available_components
|
55
|
+
if !@available_components
|
56
|
+
gem_lib_path = File.expand_path("../../lib", __dir__)
|
57
|
+
components_file = File.read(File.join(gem_lib_path, "components.json"))
|
58
|
+
@available_components = JSON.parse(components_file)
|
59
|
+
else
|
60
|
+
@available_components
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def display_available_components
|
65
|
+
puts self.class.banner
|
66
|
+
puts "\nAvailable components:"
|
67
|
+
|
68
|
+
available_components.each do |component, _|
|
69
|
+
description = "# A #{component} component"
|
70
|
+
banner_line = "rails g shadcn_ui #{component}:install #{" " * (20 - component.length)} #{description}"
|
71
|
+
puts banner_line
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def copy_files
|
76
|
+
return unless component_valid?
|
77
|
+
puts "Installing #{component_name} component..."
|
78
|
+
|
79
|
+
install_component_files(component_name)
|
80
|
+
component_data["dependencies"]&.each do |dependency|
|
81
|
+
if dependency.is_a?(String)
|
82
|
+
copy_file(dependency)
|
83
|
+
elsif dependency.is_a?(Hash)
|
84
|
+
install_component_files(dependency["component"])
|
85
|
+
end
|
86
|
+
end
|
87
|
+
puts "#{component_name.capitalize} component installed!"
|
88
|
+
end
|
89
|
+
|
90
|
+
def install_component_files(key)
|
91
|
+
return unless component_valid?(key)
|
92
|
+
|
93
|
+
available_components[key]["files"].each do |file|
|
94
|
+
copy_file(file)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def copy_file(file)
|
99
|
+
source_path = File.expand_path(File.join("../../", file), __dir__)
|
100
|
+
destination_path = File.expand_path(File.join(target_rails_root, file))
|
101
|
+
if File.exist?(source_path)
|
102
|
+
FileUtils.mkdir_p(File.dirname(destination_path))
|
103
|
+
puts "...copying #{file}"
|
104
|
+
FileUtils.cp(source_path, destination_path)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def component_data(name = nil)
|
109
|
+
@component_data ||= available_components[component_name]
|
110
|
+
end
|
111
|
+
|
112
|
+
def component_valid?(name = nil)
|
113
|
+
name ||= component_name
|
114
|
+
name.present? && available_components.key?(name) && component_data
|
115
|
+
end
|
116
|
+
|
117
|
+
def check_for_tailwind
|
118
|
+
tailwind_file_path = File.join(target_rails_root, "app/assets/stylesheets/application.tailwind.css")
|
119
|
+
|
120
|
+
if File.exist?(tailwind_file_path)
|
121
|
+
true
|
122
|
+
else
|
123
|
+
abort "shadcn-ui requires Tailwind CSS. Please include tailwindcss-rails in your Gemfile and run `rails g tailwind:install` to install Tailwind CSS."
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
def check_for_shadcn_css
|
128
|
+
shadcn_file_path = "app/assets/stylesheets/shadcn.css"
|
129
|
+
if File.exist?(File.expand_path(File.join(target_rails_root, shadcn_file_path)))
|
130
|
+
puts "...found shadcn.css"
|
131
|
+
true
|
132
|
+
else
|
133
|
+
source_path = File.expand_path(File.join("../../", shadcn_file_path), __dir__)
|
134
|
+
destination_path = File.expand_path(File.join(target_rails_root, shadcn_file_path))
|
135
|
+
puts "...copying shadcn.css to app/assets/stylesheets/shadcn.css"
|
136
|
+
FileUtils.cp(source_path, destination_path)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
def check_for_shadcn_css_import
|
141
|
+
tailwind_file_path = File.join(target_rails_root, "app/assets/stylesheets/application.tailwind.css")
|
142
|
+
|
143
|
+
if File.file?(tailwind_file_path)
|
144
|
+
matched_file = File.readlines(tailwind_file_path).any? { |s| s.include?("shadcn.css") }
|
145
|
+
if !matched_file
|
146
|
+
puts "Importing shadcn.css into application.tailwind.css..."
|
147
|
+
insert_import_first_line(tailwind_file_path, "@import \"shadcn.css\";")
|
148
|
+
end
|
149
|
+
else
|
150
|
+
puts "application.tailwind.css does not exist."
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def insert_import_line(file_path, line)
|
155
|
+
file_contents = File.read(file_path)
|
156
|
+
new_contents = file_contents.gsub(/@tailwind\s+utilities;/, "\\0\n#{line}\n")
|
157
|
+
File.write(file_path, new_contents)
|
158
|
+
end
|
159
|
+
|
160
|
+
def insert_import_first_line(file_path, line)
|
161
|
+
file_contents = File.read(file_path)
|
162
|
+
new_contents = "#{line}\n#{file_contents}"
|
163
|
+
File.write(file_path, new_contents)
|
164
|
+
end
|
165
|
+
|
166
|
+
def check_for_shadcn_tailwind_js
|
167
|
+
shadcn_tailwind_path = "config/shadcn.tailwind.js"
|
168
|
+
if File.exist?(File.expand_path(File.join(target_rails_root, shadcn_tailwind_path)))
|
169
|
+
puts "...found shadcn.tailwind.js"
|
170
|
+
true
|
171
|
+
else
|
172
|
+
source_path = File.expand_path(File.join("../../", shadcn_tailwind_path), __dir__)
|
173
|
+
destination_path = File.expand_path(File.join(target_rails_root, shadcn_tailwind_path))
|
174
|
+
puts "...copying shadcn.tailwind.js to config/shadcn.tailwind.js"
|
175
|
+
puts "Make sure to include shadcn.tailwind.js in your tailwind.config.js"
|
176
|
+
puts "const shadcnConfig = require('./shadcn.tailwind.js');"
|
177
|
+
puts "module.exports = {
|
178
|
+
...shadcnConfig,
|
179
|
+
};"
|
180
|
+
|
181
|
+
FileUtils.cp(source_path, destination_path)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
def check_for_component_helper
|
186
|
+
component_helper_path = "app/helpers/components_helper.rb"
|
187
|
+
if File.exist?(File.expand_path(File.join(target_rails_root, component_helper_path)))
|
188
|
+
puts "...found components_helper.rb"
|
189
|
+
true
|
190
|
+
else
|
191
|
+
source_path = File.expand_path(File.join("../../", component_helper_path), __dir__)
|
192
|
+
destination_path = File.expand_path(File.join(target_rails_root, component_helper_path))
|
193
|
+
puts "...copying components_helper.rb app/helpers"
|
194
|
+
|
195
|
+
FileUtils.cp(source_path, destination_path)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
# Two things - you need the helper helpers
|
201
|
+
# you have to put @import on the 3rd line after the tailwind directives? Is that possible? It's because of border-border...worse case you can just use the actual styles
|
data/lib/shadcn-ui/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -8,6 +8,10 @@
|
|
8
8
|
"tailwindcss-animate": "^1.0.6"
|
9
9
|
},
|
10
10
|
"devDependencies": {
|
11
|
+
"@tailwindcss/aspect-ratio": "^0.4.2",
|
12
|
+
"@tailwindcss/container-queries": "^0.1.1",
|
13
|
+
"@tailwindcss/forms": "^0.5.3",
|
14
|
+
"@tailwindcss/typography": "^0.5.9",
|
11
15
|
"prettier": "^3.0.0"
|
12
16
|
}
|
13
17
|
},
|
@@ -112,6 +116,64 @@
|
|
112
116
|
"node": ">= 8"
|
113
117
|
}
|
114
118
|
},
|
119
|
+
"node_modules/@tailwindcss/aspect-ratio": {
|
120
|
+
"version": "0.4.2",
|
121
|
+
"resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz",
|
122
|
+
"integrity": "sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==",
|
123
|
+
"dev": true,
|
124
|
+
"peerDependencies": {
|
125
|
+
"tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1"
|
126
|
+
}
|
127
|
+
},
|
128
|
+
"node_modules/@tailwindcss/container-queries": {
|
129
|
+
"version": "0.1.1",
|
130
|
+
"resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz",
|
131
|
+
"integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==",
|
132
|
+
"dev": true,
|
133
|
+
"peerDependencies": {
|
134
|
+
"tailwindcss": ">=3.2.0"
|
135
|
+
}
|
136
|
+
},
|
137
|
+
"node_modules/@tailwindcss/forms": {
|
138
|
+
"version": "0.5.3",
|
139
|
+
"resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz",
|
140
|
+
"integrity": "sha512-y5mb86JUoiUgBjY/o6FJSFZSEttfb3Q5gllE4xoKjAAD+vBrnIhE4dViwUuow3va8mpH4s9jyUbUbrRGoRdc2Q==",
|
141
|
+
"dev": true,
|
142
|
+
"dependencies": {
|
143
|
+
"mini-svg-data-uri": "^1.2.3"
|
144
|
+
},
|
145
|
+
"peerDependencies": {
|
146
|
+
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1"
|
147
|
+
}
|
148
|
+
},
|
149
|
+
"node_modules/@tailwindcss/typography": {
|
150
|
+
"version": "0.5.9",
|
151
|
+
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.9.tgz",
|
152
|
+
"integrity": "sha512-t8Sg3DyynFysV9f4JDOVISGsjazNb48AeIYQwcL+Bsq5uf4RYL75C1giZ43KISjeDGBaTN3Kxh7Xj/vRSMJUUg==",
|
153
|
+
"dev": true,
|
154
|
+
"dependencies": {
|
155
|
+
"lodash.castarray": "^4.4.0",
|
156
|
+
"lodash.isplainobject": "^4.0.6",
|
157
|
+
"lodash.merge": "^4.6.2",
|
158
|
+
"postcss-selector-parser": "6.0.10"
|
159
|
+
},
|
160
|
+
"peerDependencies": {
|
161
|
+
"tailwindcss": ">=3.0.0 || insiders"
|
162
|
+
}
|
163
|
+
},
|
164
|
+
"node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": {
|
165
|
+
"version": "6.0.10",
|
166
|
+
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
|
167
|
+
"integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
|
168
|
+
"dev": true,
|
169
|
+
"dependencies": {
|
170
|
+
"cssesc": "^3.0.0",
|
171
|
+
"util-deprecate": "^1.0.2"
|
172
|
+
},
|
173
|
+
"engines": {
|
174
|
+
"node": ">=4"
|
175
|
+
}
|
176
|
+
},
|
115
177
|
"node_modules/any-promise": {
|
116
178
|
"version": "1.3.0",
|
117
179
|
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
@@ -241,7 +303,6 @@
|
|
241
303
|
"version": "3.0.0",
|
242
304
|
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
243
305
|
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
244
|
-
"peer": true,
|
245
306
|
"bin": {
|
246
307
|
"cssesc": "bin/cssesc"
|
247
308
|
},
|
@@ -474,6 +535,24 @@
|
|
474
535
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
475
536
|
"peer": true
|
476
537
|
},
|
538
|
+
"node_modules/lodash.castarray": {
|
539
|
+
"version": "4.4.0",
|
540
|
+
"resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
|
541
|
+
"integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==",
|
542
|
+
"dev": true
|
543
|
+
},
|
544
|
+
"node_modules/lodash.isplainobject": {
|
545
|
+
"version": "4.0.6",
|
546
|
+
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
547
|
+
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
|
548
|
+
"dev": true
|
549
|
+
},
|
550
|
+
"node_modules/lodash.merge": {
|
551
|
+
"version": "4.6.2",
|
552
|
+
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
553
|
+
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
554
|
+
"dev": true
|
555
|
+
},
|
477
556
|
"node_modules/merge2": {
|
478
557
|
"version": "1.4.1",
|
479
558
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
@@ -496,6 +575,15 @@
|
|
496
575
|
"node": ">=8.6"
|
497
576
|
}
|
498
577
|
},
|
578
|
+
"node_modules/mini-svg-data-uri": {
|
579
|
+
"version": "1.4.4",
|
580
|
+
"resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz",
|
581
|
+
"integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==",
|
582
|
+
"dev": true,
|
583
|
+
"bin": {
|
584
|
+
"mini-svg-data-uri": "cli.js"
|
585
|
+
}
|
586
|
+
},
|
499
587
|
"node_modules/minimatch": {
|
500
588
|
"version": "3.1.2",
|
501
589
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
@@ -992,8 +1080,7 @@
|
|
992
1080
|
"node_modules/util-deprecate": {
|
993
1081
|
"version": "1.0.2",
|
994
1082
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
995
|
-
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
996
|
-
"peer": true
|
1083
|
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
997
1084
|
},
|
998
1085
|
"node_modules/wrappy": {
|
999
1086
|
"version": "1.0.2",
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shadcn-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Avi Flombaum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem is a documentation site and gem that will copy components from
|
14
14
|
the shadcn-ui library into a Ruby on Rails application.
|
@@ -19,6 +19,7 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- ".editorconfig"
|
22
|
+
- ".env"
|
22
23
|
- ".prettierignore"
|
23
24
|
- ".prettierrc.json"
|
24
25
|
- ".rspec"
|
@@ -33,9 +34,10 @@ files:
|
|
33
34
|
- app/assets/builds/.keep
|
34
35
|
- app/assets/config/manifest.js
|
35
36
|
- app/assets/images/.keep
|
36
|
-
- app/assets/stylesheets/application.
|
37
|
+
- app/assets/stylesheets/application.css
|
37
38
|
- app/assets/stylesheets/application.tailwind.css
|
38
|
-
- app/assets/stylesheets/lambda.light.
|
39
|
+
- app/assets/stylesheets/lambda.light.css
|
40
|
+
- app/assets/stylesheets/shadcn.css
|
39
41
|
- app/channels/application_cable/channel.rb
|
40
42
|
- app/channels/application_cable/connection.rb
|
41
43
|
- app/controllers/application_controller.rb
|
@@ -127,18 +129,49 @@ files:
|
|
127
129
|
- app/views/components/ui/shared/_menu_item.html.erb
|
128
130
|
- app/views/components/ui/svg/_check.html.erb
|
129
131
|
- app/views/documentation/about.html.md
|
132
|
+
- app/views/documentation/generators.html.md
|
130
133
|
- app/views/documentation/index.html.erb.bak
|
131
134
|
- app/views/documentation/index.html.md
|
132
135
|
- app/views/documentation/installation.html.md
|
133
136
|
- app/views/examples/authentication/index.html.erb
|
134
137
|
- app/views/examples/components/accordion.html.erb
|
138
|
+
- app/views/examples/components/accordion/_usage.html.erb
|
139
|
+
- app/views/examples/components/accordion/code/_block.html.erb
|
140
|
+
- app/views/examples/components/accordion/code/_description.html.erb
|
141
|
+
- app/views/examples/components/accordion/code/preview.erb
|
142
|
+
- app/views/examples/components/accordion/code/usage.erb
|
135
143
|
- app/views/examples/components/alert-dialog.html.erb
|
136
144
|
- app/views/examples/components/alert.html.erb
|
145
|
+
- app/views/examples/components/alert/_usage.html.erb
|
146
|
+
- app/views/examples/components/alert/code/_attention.erb
|
147
|
+
- app/views/examples/components/alert/code/_destructive.erb
|
148
|
+
- app/views/examples/components/alert/code/_info.erb
|
149
|
+
- app/views/examples/components/alert/code/_no_icon.erb
|
150
|
+
- app/views/examples/components/alert/code/_success.erb
|
151
|
+
- app/views/examples/components/alert/code/preview.erb
|
152
|
+
- app/views/examples/components/alert/code/usage.erb
|
137
153
|
- app/views/examples/components/badge.html.erb
|
154
|
+
- app/views/examples/components/badge/_usage.html.erb
|
155
|
+
- app/views/examples/components/badge/code/preview.erb
|
156
|
+
- app/views/examples/components/badge/code/usage.erb
|
138
157
|
- app/views/examples/components/button.html.erb
|
158
|
+
- app/views/examples/components/button/_usage.html.erb
|
159
|
+
- app/views/examples/components/button/code/preview.erb
|
160
|
+
- app/views/examples/components/button/code/usage.erb
|
139
161
|
- app/views/examples/components/card.html.erb
|
162
|
+
- app/views/examples/components/card/_usage.html.erb
|
163
|
+
- app/views/examples/components/card/code/_form.erb
|
164
|
+
- app/views/examples/components/card/code/_notifications.erb
|
165
|
+
- app/views/examples/components/card/code/preview.erb
|
166
|
+
- app/views/examples/components/card/code/usage.erb
|
140
167
|
- app/views/examples/components/checkbox.html.erb
|
168
|
+
- app/views/examples/components/checkbox/_usage.html.erb
|
169
|
+
- app/views/examples/components/checkbox/code/preview.erb
|
170
|
+
- app/views/examples/components/checkbox/code/usage.erb
|
141
171
|
- app/views/examples/components/collapsible.html.erb
|
172
|
+
- app/views/examples/components/collapsible/_usage.html.erb
|
173
|
+
- app/views/examples/components/collapsible/code/preview.erb
|
174
|
+
- app/views/examples/components/collapsible/code/usage.erb
|
142
175
|
- app/views/examples/components/dialog.html.erb
|
143
176
|
- app/views/examples/components/dialog/_usage.html.erb
|
144
177
|
- app/views/examples/components/dialog/code/form.erb
|
@@ -193,12 +226,13 @@ files:
|
|
193
226
|
- config/puma.rb
|
194
227
|
- config/render.yml
|
195
228
|
- config/routes.rb
|
229
|
+
- config/shadcn.tailwind.js
|
196
230
|
- config/storage.yml
|
197
231
|
- config/tailwind.config.js
|
198
232
|
- db/seeds.rb
|
199
233
|
- lib/assets/.keep
|
200
234
|
- lib/components.json
|
201
|
-
- lib/generators/
|
235
|
+
- lib/generators/shadcn-ui_generator.rb
|
202
236
|
- lib/shadcn-ui/shadcn-ui.rb
|
203
237
|
- lib/shadcn-ui/version.rb
|
204
238
|
- lib/tasks/.keep
|