alveole 0.0.1 → 1.0.0.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -0
- data/README.md +21 -26
- data/Rakefile +6 -8
- data/app/assets/config/alveole_manifest.js +5 -0
- data/app/assets/images/alveole/icons/favicon-150.png +0 -0
- data/app/assets/javascripts/alveole/application.js +10 -0
- data/app/assets/stylesheets/alveole/application.css +15 -0
- data/app/assets/stylesheets/application.tailwind.css +13 -0
- data/app/components/alveole/button_component.html.erb +10 -0
- data/app/components/alveole/button_component.rb +46 -0
- data/app/components/alveole/chip_component.html.erb +3 -0
- data/app/components/alveole/chip_component.rb +23 -0
- data/app/components/alveole/dropdown/menu_item_component.html.erb +2 -0
- data/app/components/alveole/dropdown/menu_item_component.rb +5 -0
- data/app/components/alveole/dropdown_component.html.erb +27 -0
- data/app/components/alveole/dropdown_component.rb +21 -0
- data/app/components/alveole/footer/link_component.html.erb +6 -0
- data/app/components/alveole/footer/link_component.rb +8 -0
- data/app/components/alveole/footer_component.html.erb +14 -0
- data/app/components/alveole/footer_component.rb +9 -0
- data/app/components/alveole/form_layout_component.html.erb +32 -0
- data/app/components/alveole/form_layout_component.rb +43 -0
- data/app/components/alveole/icon_component.html.erb +1 -0
- data/app/components/alveole/icon_component.rb +20 -0
- data/app/components/alveole/input/avatar_component.html.erb +16 -0
- data/app/components/alveole/input/avatar_component.rb +4 -0
- data/app/components/alveole/input/base_component.rb +16 -0
- data/app/components/alveole/input/comment_component.html.erb +153 -0
- data/app/components/alveole/input/comment_component.rb +5 -0
- data/app/components/alveole/input/counter_component.html.erb +16 -0
- data/app/components/alveole/input/counter_component.rb +4 -0
- data/app/components/alveole/input/email_component.html.erb +17 -0
- data/app/components/alveole/input/email_component.rb +4 -0
- data/app/components/alveole/input/file_component.html.erb +4 -0
- data/app/components/alveole/input/file_component.rb +4 -0
- data/app/components/alveole/input/search_component.html.erb +7 -0
- data/app/components/alveole/input/search_component.rb +5 -0
- data/app/components/alveole/input/select_component.html.erb +4 -0
- data/app/components/alveole/input/select_component.rb +12 -0
- data/app/components/alveole/input/text_component.html.erb +17 -0
- data/app/components/alveole/input/text_component.rb +4 -0
- data/app/components/alveole/input/textarea_component.html.erb +16 -0
- data/app/components/alveole/input/textarea_component.rb +4 -0
- data/app/components/alveole/mega_menu_component.html.erb +107 -0
- data/app/components/alveole/mega_menu_component.rb +6 -0
- data/app/components/alveole/sidebar/divider_component.html.erb +5 -0
- data/app/components/alveole/sidebar/divider_component.rb +5 -0
- data/app/components/alveole/sidebar/group_component.html.erb +7 -0
- data/app/components/alveole/sidebar/group_component.rb +37 -0
- data/app/components/alveole/sidebar/heading_component.html.erb +3 -0
- data/app/components/alveole/sidebar/heading_component.rb +8 -0
- data/app/components/alveole/sidebar/item_component.html.erb +14 -0
- data/app/components/alveole/sidebar/item_component.rb +17 -0
- data/app/components/alveole/sidebar_component.html.erb +13 -0
- data/app/components/alveole/sidebar_component.rb +40 -0
- data/app/controllers/alveole/application_controller.rb +4 -0
- data/app/helpers/alveole/application_helper.rb +4 -0
- data/app/jobs/alveole/application_job.rb +4 -0
- data/app/mailers/alveole/application_mailer.rb +6 -0
- data/app/models/alveole/application_record.rb +5 -0
- data/app/views/layouts/alveole/application.html.erb +28 -0
- data/config/importmap.rb +7 -0
- data/config/routes.rb +2 -0
- data/config/tailwind.config.js +42 -0
- data/lib/alveole/engine.rb +18 -21
- data/lib/alveole/version.rb +1 -1
- data/lib/alveole.rb +2 -12
- data/lib/tasks/alveole_tasks.rake +14 -0
- metadata +110 -110
- data/.gitignore +0 -8
- data/.gitlab-ci.yml +0 -55
- data/.rubocop.yml +0 -63
- data/.rubocop_todo.yml +0 -12
- data/.travis.yml +0 -6
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -7
- data/Gemfile.lock +0 -171
- data/LICENSE.txt +0 -21
- data/alveole.gemspec +0 -35
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/alveole/components/avatar_component/avatar_component.html.slim +0 -6
- data/lib/alveole/components/avatar_component.rb +0 -9
- data/lib/alveole/components/badge_component/badge_component.html.slim +0 -2
- data/lib/alveole/components/badge_component.rb +0 -8
- data/lib/alveole/components/breadcrumb_component/breadcrumb_component.html.slim +0 -2
- data/lib/alveole/components/breadcrumb_component.rb +0 -8
- data/lib/alveole/components/breadcrumbs_component.rb +0 -7
- data/lib/alveole/components/button_component/button_component.html.slim +0 -5
- data/lib/alveole/components/button_component.rb +0 -15
- data/lib/alveole/components/definition_component/definition_component.html.slim +0 -4
- data/lib/alveole/components/definition_component.rb +0 -13
- data/lib/alveole/components/form_component/form_component.html.slim +0 -3
- data/lib/alveole/components/form_component.rb +0 -3
- data/lib/alveole/components/form_submit_component/form_submit_component.html.slim +0 -1
- data/lib/alveole/components/form_submit_component.rb +0 -7
- data/lib/alveole/components/heading_component/heading_component.html.slim +0 -4
- data/lib/alveole/components/heading_component.rb +0 -8
- data/lib/alveole/components/input_component/input_component.html.slim +0 -17
- data/lib/alveole/components/input_component.rb +0 -42
- data/lib/alveole/components/notice_component/notice_component.html.slim +0 -5
- data/lib/alveole/components/notice_component.rb +0 -15
- data/lib/alveole/components/page_component/page_component.html.slim +0 -10
- data/lib/alveole/components/page_component.rb +0 -4
- data/lib/alveole/components/sidebar_component/sidebar_component.html.slim +0 -7
- data/lib/alveole/components/sidebar_component.rb +0 -4
- data/lib/alveole/components/table_column_component/table_column_component.html.slim +0 -3
- data/lib/alveole/components/table_column_component.rb +0 -12
- data/lib/alveole/components/table_component/table_component.html.slim +0 -7
- data/lib/alveole/components/table_component.rb +0 -3
- data/lib/alveole/components/table_header_component/table_header_component.html.slim +0 -2
- data/lib/alveole/components/table_header_component.rb +0 -8
- data/lib/alveole/components/table_row_component/table_row_component.html.slim +0 -4
- data/lib/alveole/components/table_row_component.rb +0 -3
- data/lib/alveole/components/toolbar_component/toolbar_component.html.slim +0 -7
- data/lib/alveole/components/toolbar_component.rb +0 -4
- data/lib/alveole/concerns/bem.rb +0 -21
- data/lib/alveole/helpers/method_helper.rb +0 -31
- data/lib/alveole/javascript/components.js +0 -5
- data/lib/alveole/previews/avatar_component_preview.rb +0 -11
- data/lib/alveole/previews/badge_component_preview.rb +0 -11
- data/lib/alveole/previews/breadcrumb_component_preview.rb +0 -15
- data/lib/alveole/previews/button_component_preview.rb +0 -7
- data/lib/alveole/previews/definition_component_preview.rb +0 -33
- data/lib/alveole/previews/form_component_preview.rb +0 -18
- data/lib/alveole/previews/form_submit_component_preview.rb +0 -7
- data/lib/alveole/previews/heading_component_preview.rb +0 -11
- data/lib/alveole/previews/input_component_preview.rb +0 -32
- data/lib/alveole/previews/notice_component_preview.rb +0 -15
- data/lib/alveole/previews/page_component_preview.rb +0 -33
- data/lib/alveole/previews/sidebar_component_preview.rb +0 -33
- data/lib/alveole/previews/table_column_component_preview.rb +0 -36
- data/lib/alveole/previews/table_component_preview.rb +0 -12
- data/lib/alveole/previews/table_header_component_preview.rb +0 -27
- data/lib/alveole/previews/table_row_component_preview.rb +0 -18
- data/lib/alveole/previews/toolbar_component_preview.rb +0 -33
- data/lib/generators/alveole/config_generator.rb +0 -17
- data/lib/generators/alveole/templates/alveole_config.rb +0 -1
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at marinesourin@live.fr. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: https://contributor-covenant.org
|
74
|
-
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,171 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
alveole (0.0.1)
|
5
|
-
actionview
|
6
|
-
activesupport (>= 4.1.0)
|
7
|
-
rails
|
8
|
-
view_component (~> 2.35)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
actioncable (6.1.4.1)
|
14
|
-
actionpack (= 6.1.4.1)
|
15
|
-
activesupport (= 6.1.4.1)
|
16
|
-
nio4r (~> 2.0)
|
17
|
-
websocket-driver (>= 0.6.1)
|
18
|
-
actionmailbox (6.1.4.1)
|
19
|
-
actionpack (= 6.1.4.1)
|
20
|
-
activejob (= 6.1.4.1)
|
21
|
-
activerecord (= 6.1.4.1)
|
22
|
-
activestorage (= 6.1.4.1)
|
23
|
-
activesupport (= 6.1.4.1)
|
24
|
-
mail (>= 2.7.1)
|
25
|
-
actionmailer (6.1.4.1)
|
26
|
-
actionpack (= 6.1.4.1)
|
27
|
-
actionview (= 6.1.4.1)
|
28
|
-
activejob (= 6.1.4.1)
|
29
|
-
activesupport (= 6.1.4.1)
|
30
|
-
mail (~> 2.5, >= 2.5.4)
|
31
|
-
rails-dom-testing (~> 2.0)
|
32
|
-
actionpack (6.1.4.1)
|
33
|
-
actionview (= 6.1.4.1)
|
34
|
-
activesupport (= 6.1.4.1)
|
35
|
-
rack (~> 2.0, >= 2.0.9)
|
36
|
-
rack-test (>= 0.6.3)
|
37
|
-
rails-dom-testing (~> 2.0)
|
38
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
39
|
-
actiontext (6.1.4.1)
|
40
|
-
actionpack (= 6.1.4.1)
|
41
|
-
activerecord (= 6.1.4.1)
|
42
|
-
activestorage (= 6.1.4.1)
|
43
|
-
activesupport (= 6.1.4.1)
|
44
|
-
nokogiri (>= 1.8.5)
|
45
|
-
actionview (6.1.4.1)
|
46
|
-
activesupport (= 6.1.4.1)
|
47
|
-
builder (~> 3.1)
|
48
|
-
erubi (~> 1.4)
|
49
|
-
rails-dom-testing (~> 2.0)
|
50
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
51
|
-
activejob (6.1.4.1)
|
52
|
-
activesupport (= 6.1.4.1)
|
53
|
-
globalid (>= 0.3.6)
|
54
|
-
activemodel (6.1.4.1)
|
55
|
-
activesupport (= 6.1.4.1)
|
56
|
-
activerecord (6.1.4.1)
|
57
|
-
activemodel (= 6.1.4.1)
|
58
|
-
activesupport (= 6.1.4.1)
|
59
|
-
activestorage (6.1.4.1)
|
60
|
-
actionpack (= 6.1.4.1)
|
61
|
-
activejob (= 6.1.4.1)
|
62
|
-
activerecord (= 6.1.4.1)
|
63
|
-
activesupport (= 6.1.4.1)
|
64
|
-
marcel (~> 1.0.0)
|
65
|
-
mini_mime (>= 1.1.0)
|
66
|
-
activesupport (6.1.4.1)
|
67
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
68
|
-
i18n (>= 1.6, < 2)
|
69
|
-
minitest (>= 5.1)
|
70
|
-
tzinfo (~> 2.0)
|
71
|
-
zeitwerk (~> 2.3)
|
72
|
-
ast (2.4.2)
|
73
|
-
builder (3.2.4)
|
74
|
-
concurrent-ruby (1.1.9)
|
75
|
-
crass (1.0.6)
|
76
|
-
erubi (1.10.0)
|
77
|
-
globalid (0.5.2)
|
78
|
-
activesupport (>= 5.0)
|
79
|
-
i18n (1.8.10)
|
80
|
-
concurrent-ruby (~> 1.0)
|
81
|
-
loofah (2.12.0)
|
82
|
-
crass (~> 1.0.2)
|
83
|
-
nokogiri (>= 1.5.9)
|
84
|
-
mail (2.7.1)
|
85
|
-
mini_mime (>= 0.1.1)
|
86
|
-
marcel (1.0.1)
|
87
|
-
method_source (1.0.0)
|
88
|
-
mini_mime (1.1.1)
|
89
|
-
minitest (5.14.4)
|
90
|
-
nio4r (2.5.8)
|
91
|
-
nokogiri (1.12.3-arm64-darwin)
|
92
|
-
racc (~> 1.4)
|
93
|
-
parallel (1.20.1)
|
94
|
-
parser (3.0.1.1)
|
95
|
-
ast (~> 2.4.1)
|
96
|
-
racc (1.5.2)
|
97
|
-
rack (2.2.3)
|
98
|
-
rack-test (1.1.0)
|
99
|
-
rack (>= 1.0, < 3)
|
100
|
-
rails (6.1.4.1)
|
101
|
-
actioncable (= 6.1.4.1)
|
102
|
-
actionmailbox (= 6.1.4.1)
|
103
|
-
actionmailer (= 6.1.4.1)
|
104
|
-
actionpack (= 6.1.4.1)
|
105
|
-
actiontext (= 6.1.4.1)
|
106
|
-
actionview (= 6.1.4.1)
|
107
|
-
activejob (= 6.1.4.1)
|
108
|
-
activemodel (= 6.1.4.1)
|
109
|
-
activerecord (= 6.1.4.1)
|
110
|
-
activestorage (= 6.1.4.1)
|
111
|
-
activesupport (= 6.1.4.1)
|
112
|
-
bundler (>= 1.15.0)
|
113
|
-
railties (= 6.1.4.1)
|
114
|
-
sprockets-rails (>= 2.0.0)
|
115
|
-
rails-dom-testing (2.0.3)
|
116
|
-
activesupport (>= 4.2.0)
|
117
|
-
nokogiri (>= 1.6)
|
118
|
-
rails-html-sanitizer (1.4.1)
|
119
|
-
loofah (~> 2.3)
|
120
|
-
railties (6.1.4.1)
|
121
|
-
actionpack (= 6.1.4.1)
|
122
|
-
activesupport (= 6.1.4.1)
|
123
|
-
method_source
|
124
|
-
rake (>= 0.13)
|
125
|
-
thor (~> 1.0)
|
126
|
-
rainbow (3.0.0)
|
127
|
-
rake (12.3.3)
|
128
|
-
regexp_parser (2.1.1)
|
129
|
-
rexml (3.2.5)
|
130
|
-
rubocop (1.18.3)
|
131
|
-
parallel (~> 1.10)
|
132
|
-
parser (>= 3.0.0.0)
|
133
|
-
rainbow (>= 2.2.2, < 4.0)
|
134
|
-
regexp_parser (>= 1.8, < 3.0)
|
135
|
-
rexml
|
136
|
-
rubocop-ast (>= 1.7.0, < 2.0)
|
137
|
-
ruby-progressbar (~> 1.7)
|
138
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
139
|
-
rubocop-ast (1.7.0)
|
140
|
-
parser (>= 3.0.1.1)
|
141
|
-
ruby-progressbar (1.11.0)
|
142
|
-
sprockets (4.0.2)
|
143
|
-
concurrent-ruby (~> 1.0)
|
144
|
-
rack (> 1, < 3)
|
145
|
-
sprockets-rails (3.2.2)
|
146
|
-
actionpack (>= 4.0)
|
147
|
-
activesupport (>= 4.0)
|
148
|
-
sprockets (>= 3.0.0)
|
149
|
-
thor (1.1.0)
|
150
|
-
tzinfo (2.0.4)
|
151
|
-
concurrent-ruby (~> 1.0)
|
152
|
-
unicode-display_width (2.0.0)
|
153
|
-
view_component (2.38.0)
|
154
|
-
activesupport (>= 5.0.0, < 8.0)
|
155
|
-
method_source (~> 1.0)
|
156
|
-
websocket-driver (0.7.5)
|
157
|
-
websocket-extensions (>= 0.1.0)
|
158
|
-
websocket-extensions (0.1.5)
|
159
|
-
zeitwerk (2.4.2)
|
160
|
-
|
161
|
-
PLATFORMS
|
162
|
-
ruby
|
163
|
-
|
164
|
-
DEPENDENCIES
|
165
|
-
alveole!
|
166
|
-
minitest (~> 5.0)
|
167
|
-
rake (~> 12.0)
|
168
|
-
rubocop (~> 1.18)
|
169
|
-
|
170
|
-
BUNDLED WITH
|
171
|
-
2.2.22
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2021 Marine Sourin
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/alveole.gemspec
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require_relative 'lib/alveole/version'
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'alveole'
|
5
|
-
spec.version = Alveole::VERSION
|
6
|
-
spec.authors = ['Marine Sourin', 'Marine Domine', 'Cedric Feyaerts', 'Thomas Kienlen']
|
7
|
-
spec.email = ['marinesourin@live.fr', 'marine@captive.fr', 'c.feyaerts@captive.fr', 't.kienlen@captive.fr']
|
8
|
-
|
9
|
-
spec.summary = 'Components and generator for the Alveole design system'
|
10
|
-
spec.homepage = 'https://git.captive.fr' # TODO: fix this
|
11
|
-
spec.license = 'MIT'
|
12
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
13
|
-
|
14
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
15
|
-
|
16
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
17
|
-
spec.metadata['source_code_uri'] = 'https://git.captive.fr' # TODO: fix this
|
18
|
-
spec.metadata['changelog_uri'] = 'https://git.captive.fr' # TODO: fix this
|
19
|
-
|
20
|
-
# Specify which files should be added to the gem when it is released.
|
21
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
23
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
-
end
|
25
|
-
spec.bindir = 'exe'
|
26
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
-
spec.require_paths = ['lib']
|
28
|
-
|
29
|
-
spec.add_dependency 'actionview'
|
30
|
-
spec.add_dependency 'activesupport', '>= 4.1.0'
|
31
|
-
spec.add_dependency 'rails'
|
32
|
-
spec.add_dependency 'view_component', '~> 2.35'
|
33
|
-
|
34
|
-
spec.add_development_dependency 'rubocop', '~> 1.18'
|
35
|
-
end
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'alveole'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
class ButtonComponent < ViewComponent::Base
|
2
|
-
include Alveole::Concerns::Bem
|
3
|
-
|
4
|
-
MODIFIERS = %i[small icon_only primary].freeze
|
5
|
-
|
6
|
-
def initialize(url:, label:, icon: nil, modifiers: [], options: {})
|
7
|
-
super
|
8
|
-
|
9
|
-
@url = url
|
10
|
-
@label = label
|
11
|
-
@icon = icon
|
12
|
-
@options = options
|
13
|
-
self.modifiers = modifiers
|
14
|
-
end
|
15
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class DefinitionComponent < ViewComponent::Base
|
2
|
-
def initialize(label: nil, value: nil, obj: nil, fieldname: nil, options: {})
|
3
|
-
super
|
4
|
-
|
5
|
-
@obj = obj
|
6
|
-
@fieldname = fieldname
|
7
|
-
@value = value || obj&.send(fieldname)
|
8
|
-
@value = ApplicationController.helpers.format_value(@value, options)
|
9
|
-
@value = '---' if @value.blank?
|
10
|
-
@label = label || ApplicationController.helpers.label_for(obj, fieldname)
|
11
|
-
@options = options
|
12
|
-
end
|
13
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
input[type="submit" name="commit" value=@label class='form__action button button--primary']
|
@@ -1,17 +0,0 @@
|
|
1
|
-
.input class=@bem_classes
|
2
|
-
= @form.label @fieldname, @label, class: 'input__label'
|
3
|
-
- case @type
|
4
|
-
- when :text
|
5
|
-
= @form.text_field @fieldname, @options.merge(class: 'input__input')
|
6
|
-
- when :date
|
7
|
-
= @form.text_field @fieldname, @options.merge(class: 'input__input datepicker')
|
8
|
-
- when :color
|
9
|
-
= @form.color_field @fieldname, @options
|
10
|
-
- when :select
|
11
|
-
= @form.select @fieldname, @collection, @options, @options.merge(class: 'input__input')
|
12
|
-
- when :file
|
13
|
-
= @form.file_field @fieldname, @options.merge(class: 'input__input')
|
14
|
-
- when :text_area
|
15
|
-
= @form.text_area @fieldname, @options.merge(class: 'input__input')
|
16
|
-
- if @error_message
|
17
|
-
.input__errors = @error_message
|
@@ -1,42 +0,0 @@
|
|
1
|
-
class InputComponent < ViewComponent::Base
|
2
|
-
include Alveole::Concerns::Bem
|
3
|
-
|
4
|
-
MODIFIERS = %i[disabled error].freeze
|
5
|
-
|
6
|
-
def initialize(type: nil, label: nil,
|
7
|
-
value: nil,
|
8
|
-
form: nil,
|
9
|
-
fieldname: nil,
|
10
|
-
collection: nil,
|
11
|
-
modifiers: [],
|
12
|
-
options: {})
|
13
|
-
super
|
14
|
-
|
15
|
-
@label = label
|
16
|
-
@form = form
|
17
|
-
@fieldname = fieldname
|
18
|
-
@collection = collection
|
19
|
-
@options = options
|
20
|
-
@options[:value] = value if value
|
21
|
-
@type = type || :text
|
22
|
-
@error_message = error_message
|
23
|
-
|
24
|
-
modifiers << :error if error?
|
25
|
-
modifiers << :disabled if options[:disabled]
|
26
|
-
self.modifiers = modifiers
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def error?
|
32
|
-
return false unless @form.object.respond_to? :errors
|
33
|
-
|
34
|
-
@error ||= @form.object.errors.include?(@fieldname.to_s.sub(/_id$/, ''))
|
35
|
-
end
|
36
|
-
|
37
|
-
def error_message
|
38
|
-
return unless error?
|
39
|
-
|
40
|
-
@error_message ||= @form.object.errors.messages_for(@fieldname.to_s.sub(/_id$/, '')).join(', ')
|
41
|
-
end
|
42
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class NoticeComponent < ViewComponent::Base
|
2
|
-
TYPES = %w[notice alert].freeze
|
3
|
-
def initialize(title:, messages: [], type: nil)
|
4
|
-
super
|
5
|
-
|
6
|
-
@type = type if TYPES.include?(type)
|
7
|
-
@type ||= 'alert'
|
8
|
-
@title = title
|
9
|
-
@messages = messages
|
10
|
-
end
|
11
|
-
|
12
|
-
def render?
|
13
|
-
@messages.any?
|
14
|
-
end
|
15
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class TableColumnComponent < ViewComponent::Base
|
2
|
-
def initialize(value: nil, obj: nil, fieldname: nil, url: nil, options: {})
|
3
|
-
super
|
4
|
-
|
5
|
-
@obj = obj
|
6
|
-
@fieldname = fieldname
|
7
|
-
@value = value || obj&.send(fieldname)
|
8
|
-
@value = ApplicationController.helpers.format_value(@value, options)
|
9
|
-
@url = url
|
10
|
-
@options = options
|
11
|
-
end
|
12
|
-
end
|