vitrail 0.4.2 → 1.0.0
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/README.md +16 -30
- data/app/components/vitrail/badge.rb +7 -7
- data/app/components/vitrail/base_component.rb +1 -1
- data/app/components/vitrail/button_tag/component.rb +74 -0
- data/app/components/vitrail/card/component.html.erb +18 -0
- data/app/components/vitrail/card/component.rb +9 -0
- data/app/components/vitrail/link_to/component.rb +64 -0
- data/app/components/vitrail/notice.html.erb +5 -5
- data/app/components/vitrail/notice.rb +6 -6
- data/app/components/vitrail/table/component.html.erb +15 -0
- data/app/components/vitrail/table/component.rb +10 -0
- data/app/components/vitrail/table/division.html.erb +1 -1
- data/app/components/vitrail/table/division.rb +3 -3
- data/app/components/vitrail/table/header.rb +3 -3
- data/app/components/vitrail/table/row.rb +2 -2
- data/app/components/vitrail/title/component.rb +34 -0
- data/lib/generators/vitrail/install/install_generator.rb +50 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/button_tag.css.tt +36 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/card.css.tt +20 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/config.css.tt +23 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/index.css.tt +8 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/link_to.css.tt +36 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/primitives.css.tt +24 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/table.css.tt +37 -0
- data/lib/generators/vitrail/install/templates/stylesheets/vitrail/title.css.tt +21 -0
- data/lib/generators/vitrail/install/templates/vitrail_preset.js.tt +41 -0
- data/lib/vitrail/engine.rb +18 -2
- data/lib/vitrail/helper.rb +9 -0
- data/lib/vitrail/tasks/install.rake +8 -0
- data/lib/vitrail/version.rb +1 -1
- data/lib/vitrail.rb +2 -0
- metadata +29 -32
- data/Rakefile +0 -8
- data/app/assets/config/vitrail_manifest.js +0 -1
- data/app/assets/stylesheets/vitrail/application.css +0 -15
- data/app/assets/stylesheets/vitrail/vitrail.css +0 -891
- data/app/assets/stylesheets/vitrail.tailwind.css +0 -13
- data/app/components/vitrail/card.html.erb +0 -12
- data/app/components/vitrail/card.rb +0 -18
- data/app/components/vitrail/link_to.rb +0 -40
- data/app/components/vitrail/table.html.erb +0 -19
- data/app/components/vitrail/table.rb +0 -10
- data/app/components/vitrail/title.rb +0 -29
- data/app/views/layouts/vitrail/component_preview.html.erb +0 -16
- data/config/tailwind.config.js +0 -22
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.vt-table--container {
|
|
3
|
+
@apply relative w-full overflow-auto;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vt-table {
|
|
7
|
+
@apply w-full caption-bottom text-sm;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.vt-table--head {
|
|
11
|
+
@apply [&_tr]:border-b;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.vt-table--body {
|
|
15
|
+
@apply divide-y divide-gray-200;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.vt-table--header {
|
|
19
|
+
@apply h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.vt-table--row {
|
|
23
|
+
@apply border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vt-table--division {
|
|
27
|
+
@apply p-4 align-middle [&:has([role=checkbox])]:pr-0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vt-table--division-link-to-container {
|
|
31
|
+
@apply group-hover:bg-gray-50;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.vt-table--division-link-to {
|
|
35
|
+
@apply block -mx-3 px-3 -my-4 py-4;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.vt-title {
|
|
3
|
+
@apply scroll-m-20 font-semibold tracking-tight mt-8;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vt-title.vt-title--level1 {
|
|
7
|
+
@apply text-4xl font-extrabold lg:text-5xl;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.vt-title.vt-title--level2 {
|
|
11
|
+
@apply border-b mb-4 pb-2 text-3xl;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.vt-title.vt-title--level3 {
|
|
15
|
+
@apply text-2xl;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.vt-title.vt-title--level4 {
|
|
19
|
+
@apply text-xl;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
theme: {
|
|
3
|
+
extend: {
|
|
4
|
+
colors: {
|
|
5
|
+
border: "hsl(var(--border) / <alpha-value>)",
|
|
6
|
+
input: "hsl(var(--input) / <alpha-value>)",
|
|
7
|
+
ring: "hsl(var(--ring) / <alpha-value>)",
|
|
8
|
+
background: "hsl(var(--background) / <alpha-value>)",
|
|
9
|
+
foreground: "hsl(var(--foreground) / <alpha-value>)",
|
|
10
|
+
primary: {
|
|
11
|
+
DEFAULT: "hsl(var(--primary) / <alpha-value>)",
|
|
12
|
+
foreground: "hsl(var(--primary-foreground) / <alpha-value>)",
|
|
13
|
+
},
|
|
14
|
+
secondary: {
|
|
15
|
+
DEFAULT: "hsl(var(--secondary) / <alpha-value>)",
|
|
16
|
+
foreground: "hsl(var(--secondary-foreground) / <alpha-value>)",
|
|
17
|
+
},
|
|
18
|
+
destructive: {
|
|
19
|
+
DEFAULT: "hsl(var(--destructive) / <alpha-value>)",
|
|
20
|
+
foreground: "hsl(var(--destructive-foreground) / <alpha-value>)",
|
|
21
|
+
},
|
|
22
|
+
muted: {
|
|
23
|
+
DEFAULT: "hsl(var(--muted) / <alpha-value>)",
|
|
24
|
+
foreground: "hsl(var(--muted-foreground) / <alpha-value>)",
|
|
25
|
+
},
|
|
26
|
+
accent: {
|
|
27
|
+
DEFAULT: "hsl(var(--accent) / <alpha-value>)",
|
|
28
|
+
foreground: "hsl(var(--accent-foreground) / <alpha-value>)",
|
|
29
|
+
},
|
|
30
|
+
popover: {
|
|
31
|
+
DEFAULT: "hsl(var(--popover) / <alpha-value>)",
|
|
32
|
+
foreground: "hsl(var(--popover-foreground) / <alpha-value>)",
|
|
33
|
+
},
|
|
34
|
+
card: {
|
|
35
|
+
DEFAULT: "hsl(var(--card) / <alpha-value>)",
|
|
36
|
+
foreground: "hsl(var(--card-foreground) / <alpha-value>)",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
}
|
data/lib/vitrail/engine.rb
CHANGED
|
@@ -2,8 +2,24 @@ module Vitrail
|
|
|
2
2
|
class Engine < ::Rails::Engine
|
|
3
3
|
isolate_namespace Vitrail
|
|
4
4
|
|
|
5
|
-
initializer "vitrail.
|
|
6
|
-
|
|
5
|
+
initializer "vitrail.action_controller" do |app|
|
|
6
|
+
ActiveSupport.on_load :action_controller do
|
|
7
|
+
helper Vitrail::Helper
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
initializer "vitrail.assets.precompile" do |app|
|
|
12
|
+
app.config.assets.paths << root.join("app", "components")
|
|
13
|
+
app.config.assets.precompile += ["vitrail/index.css"]
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Load the generator
|
|
17
|
+
config.generators do |g|
|
|
18
|
+
g.templates.unshift File.expand_path("templates", __dir__)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
rake_tasks do
|
|
22
|
+
load "vitrail/tasks/install.rake"
|
|
7
23
|
end
|
|
8
24
|
end
|
|
9
25
|
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module Vitrail
|
|
2
|
+
module Helper
|
|
3
|
+
def vt_link_to(*args, &block) = render(Vitrail::LinkTo::Component.new(*args), &block)
|
|
4
|
+
def vt_button_tag(*args, &block) = render(Vitrail::ButtonTag::Component.new(*args), &block)
|
|
5
|
+
def vt_card(*args, &block) = render(Vitrail::Card::Component.new(*args), &block)
|
|
6
|
+
def vt_title(*args, &block) = render(Vitrail::Title::Component.new(*args), &block)
|
|
7
|
+
def vt_table(*args, &block) = render(Vitrail::Table::Component.new(*args), &block)
|
|
8
|
+
end
|
|
9
|
+
end
|
data/lib/vitrail/version.rb
CHANGED
data/lib/vitrail.rb
CHANGED
metadata
CHANGED
|
@@ -1,54 +1,43 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vitrail
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Guillaume CABANEL
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2024-06-18 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: rails
|
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
|
15
16
|
requirements:
|
|
16
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
17
18
|
- !ruby/object:Gem::Version
|
|
18
19
|
version: '7'
|
|
19
|
-
- - "<"
|
|
20
|
-
- !ruby/object:Gem::Version
|
|
21
|
-
version: '9'
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
23
|
requirements:
|
|
26
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
27
25
|
- !ruby/object:Gem::Version
|
|
28
26
|
version: '7'
|
|
29
|
-
- - "<"
|
|
30
|
-
- !ruby/object:Gem::Version
|
|
31
|
-
version: '9'
|
|
32
27
|
- !ruby/object:Gem::Dependency
|
|
33
28
|
name: view_component
|
|
34
29
|
requirement: !ruby/object:Gem::Requirement
|
|
35
30
|
requirements:
|
|
36
|
-
- - "
|
|
31
|
+
- - "~>"
|
|
37
32
|
- !ruby/object:Gem::Version
|
|
38
33
|
version: '3'
|
|
39
|
-
- - "<"
|
|
40
|
-
- !ruby/object:Gem::Version
|
|
41
|
-
version: '5'
|
|
42
34
|
type: :runtime
|
|
43
35
|
prerelease: false
|
|
44
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
45
37
|
requirements:
|
|
46
|
-
- - "
|
|
38
|
+
- - "~>"
|
|
47
39
|
- !ruby/object:Gem::Version
|
|
48
40
|
version: '3'
|
|
49
|
-
- - "<"
|
|
50
|
-
- !ruby/object:Gem::Version
|
|
51
|
-
version: '5'
|
|
52
41
|
- !ruby/object:Gem::Dependency
|
|
53
42
|
name: tailwindcss-rails
|
|
54
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -72,30 +61,36 @@ extra_rdoc_files: []
|
|
|
72
61
|
files:
|
|
73
62
|
- MIT-LICENSE
|
|
74
63
|
- README.md
|
|
75
|
-
- Rakefile
|
|
76
|
-
- app/assets/config/vitrail_manifest.js
|
|
77
|
-
- app/assets/stylesheets/vitrail.tailwind.css
|
|
78
|
-
- app/assets/stylesheets/vitrail/application.css
|
|
79
|
-
- app/assets/stylesheets/vitrail/vitrail.css
|
|
80
64
|
- app/components/vitrail/badge.rb
|
|
81
65
|
- app/components/vitrail/base_component.rb
|
|
82
|
-
- app/components/vitrail/
|
|
83
|
-
- app/components/vitrail/card.
|
|
84
|
-
- app/components/vitrail/
|
|
66
|
+
- app/components/vitrail/button_tag/component.rb
|
|
67
|
+
- app/components/vitrail/card/component.html.erb
|
|
68
|
+
- app/components/vitrail/card/component.rb
|
|
69
|
+
- app/components/vitrail/link_to/component.rb
|
|
85
70
|
- app/components/vitrail/notice.html.erb
|
|
86
71
|
- app/components/vitrail/notice.rb
|
|
87
|
-
- app/components/vitrail/table.html.erb
|
|
88
|
-
- app/components/vitrail/table.rb
|
|
72
|
+
- app/components/vitrail/table/component.html.erb
|
|
73
|
+
- app/components/vitrail/table/component.rb
|
|
89
74
|
- app/components/vitrail/table/division.html.erb
|
|
90
75
|
- app/components/vitrail/table/division.rb
|
|
91
76
|
- app/components/vitrail/table/header.rb
|
|
92
77
|
- app/components/vitrail/table/row.rb
|
|
93
|
-
- app/components/vitrail/title.rb
|
|
94
|
-
-
|
|
95
|
-
-
|
|
78
|
+
- app/components/vitrail/title/component.rb
|
|
79
|
+
- lib/generators/vitrail/install/install_generator.rb
|
|
80
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/button_tag.css.tt
|
|
81
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/card.css.tt
|
|
82
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/config.css.tt
|
|
83
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/index.css.tt
|
|
84
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/link_to.css.tt
|
|
85
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/primitives.css.tt
|
|
86
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/table.css.tt
|
|
87
|
+
- lib/generators/vitrail/install/templates/stylesheets/vitrail/title.css.tt
|
|
88
|
+
- lib/generators/vitrail/install/templates/vitrail_preset.js.tt
|
|
96
89
|
- lib/tasks/vitrail_tasks.rake
|
|
97
90
|
- lib/vitrail.rb
|
|
98
91
|
- lib/vitrail/engine.rb
|
|
92
|
+
- lib/vitrail/helper.rb
|
|
93
|
+
- lib/vitrail/tasks/install.rake
|
|
99
94
|
- lib/vitrail/version.rb
|
|
100
95
|
homepage: https://github.com/kuartz-org/vitrail
|
|
101
96
|
licenses:
|
|
@@ -105,6 +100,7 @@ metadata:
|
|
|
105
100
|
homepage_uri: https://github.com/kuartz-org/vitrail
|
|
106
101
|
source_code_uri: https://github.com/kuartz-org/vitrail
|
|
107
102
|
changelog_uri: https://github.com/kuartz-org/vitrail/blob/main/CHANGELOG.md
|
|
103
|
+
post_install_message:
|
|
108
104
|
rdoc_options: []
|
|
109
105
|
require_paths:
|
|
110
106
|
- lib
|
|
@@ -119,7 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
119
115
|
- !ruby/object:Gem::Version
|
|
120
116
|
version: '0'
|
|
121
117
|
requirements: []
|
|
122
|
-
rubygems_version: 4.
|
|
118
|
+
rubygems_version: 3.4.19
|
|
119
|
+
signing_key:
|
|
123
120
|
specification_version: 4
|
|
124
121
|
summary: Kuartz design system
|
|
125
122
|
test_files: []
|
data/Rakefile
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//= link_directory ../stylesheets/vitrail .css
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
-
* listed below.
|
|
4
|
-
*
|
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
-
*
|
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
|
11
|
-
* It is generally better to create a new file per style scope.
|
|
12
|
-
*
|
|
13
|
-
*= require_tree .
|
|
14
|
-
*= require_self
|
|
15
|
-
*/
|