amber_component 0.0.3 → 0.0.5
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/.solargraph.yml +1 -2
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +12 -12
- data/README.md +327 -4
- data/lib/amber_component/base.rb +31 -12
- data/lib/amber_component/helpers/component_helper.rb +1 -0
- data/lib/amber_component/minitest_test_case.rb +10 -0
- data/lib/amber_component/prop_definition.rb +54 -0
- data/lib/amber_component/props.rb +111 -0
- data/lib/amber_component/test_helper.rb +34 -0
- data/lib/amber_component/typed_content.rb +3 -3
- data/lib/amber_component/version.rb +1 -1
- data/lib/amber_component/views.rb +4 -4
- data/lib/amber_component.rb +8 -9
- data/lib/generators/amber_component/install_generator.rb +20 -1
- data/lib/generators/amber_component/templates/application_component_test_case.rb +7 -0
- data/lib/generators/amber_component_generator.rb +56 -4
- data/lib/generators/component_generator.rb +9 -0
- data/lib/generators/templates/component.rb.erb +3 -1
- data/lib/generators/templates/component_test.rb.erb +11 -3
- data/lib/generators/templates/style.css.erb +1 -1
- data/lib/generators/templates/style.sass.erb +3 -0
- data/lib/generators/templates/style.scss.erb +5 -0
- data/lib/generators/templates/view.haml.erb +9 -0
- data/lib/generators/templates/view.html.erb.erb +8 -0
- data/lib/generators/templates/view.slim.erb +6 -0
- metadata +13 -31
- data/docs/.bundle/config +0 -2
- data/docs/.gitignore +0 -5
- data/docs/404.html +0 -25
- data/docs/Gemfile +0 -37
- data/docs/Gemfile.lock +0 -89
- data/docs/README.md +0 -19
- data/docs/_config.yml +0 -148
- data/docs/_data/amber_component.yml +0 -3
- data/docs/_sass/_variables.scss +0 -2
- data/docs/_sass/color_schemes/amber_component.scss +0 -11
- data/docs/_sass/custom/custom.scss +0 -60
- data/docs/api/index.md +0 -8
- data/docs/assets/images/logo_wide.png +0 -0
- data/docs/changelog/index.md +0 -8
- data/docs/favicon.ico +0 -0
- data/docs/getting_started/index.md +0 -8
- data/docs/getting_started/installation.md +0 -7
- data/docs/getting_started/ruby_support.md +0 -7
- data/docs/getting_started/wireframes.md +0 -7
- data/docs/index.md +0 -17
- data/docs/introduction/basic_usage.md +0 -7
- data/docs/introduction/index.md +0 -8
- data/docs/introduction/why_amber_component.md +0 -7
- data/docs/resources/index.md +0 -8
- data/docs/styles/index.md +0 -8
- data/docs/styles/usage.md +0 -7
- data/docs/views/index.md +0 -8
- data/docs/views/usage.md +0 -7
- data/lib/generators/templates/view.html.erb +0 -3
data/docs/Gemfile.lock
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
addressable (2.8.0)
|
5
|
-
public_suffix (>= 2.0.2, < 5.0)
|
6
|
-
colorator (1.1.0)
|
7
|
-
concurrent-ruby (1.1.10)
|
8
|
-
em-websocket (0.5.3)
|
9
|
-
eventmachine (>= 0.12.9)
|
10
|
-
http_parser.rb (~> 0)
|
11
|
-
eventmachine (1.2.7)
|
12
|
-
ffi (1.15.5)
|
13
|
-
forwardable-extended (2.6.0)
|
14
|
-
http_parser.rb (0.8.0)
|
15
|
-
i18n (1.12.0)
|
16
|
-
concurrent-ruby (~> 1.0)
|
17
|
-
jekyll (4.2.2)
|
18
|
-
addressable (~> 2.4)
|
19
|
-
colorator (~> 1.0)
|
20
|
-
em-websocket (~> 0.5)
|
21
|
-
i18n (~> 1.0)
|
22
|
-
jekyll-sass-converter (~> 2.0)
|
23
|
-
jekyll-watch (~> 2.0)
|
24
|
-
kramdown (~> 2.3)
|
25
|
-
kramdown-parser-gfm (~> 1.0)
|
26
|
-
liquid (~> 4.0)
|
27
|
-
mercenary (~> 0.4.0)
|
28
|
-
pathutil (~> 0.9)
|
29
|
-
rouge (~> 3.0)
|
30
|
-
safe_yaml (~> 1.0)
|
31
|
-
terminal-table (~> 2.0)
|
32
|
-
jekyll-feed (0.16.0)
|
33
|
-
jekyll (>= 3.7, < 5.0)
|
34
|
-
jekyll-sass-converter (2.2.0)
|
35
|
-
sassc (> 2.0.1, < 3.0)
|
36
|
-
jekyll-seo-tag (2.8.0)
|
37
|
-
jekyll (>= 3.8, < 5.0)
|
38
|
-
jekyll-watch (2.2.1)
|
39
|
-
listen (~> 3.0)
|
40
|
-
just-the-docs (0.3.3)
|
41
|
-
jekyll (>= 3.8.5)
|
42
|
-
jekyll-seo-tag (~> 2.0)
|
43
|
-
rake (>= 12.3.1, < 13.1.0)
|
44
|
-
kramdown (2.4.0)
|
45
|
-
rexml
|
46
|
-
kramdown-parser-gfm (1.1.0)
|
47
|
-
kramdown (~> 2.0)
|
48
|
-
liquid (4.0.3)
|
49
|
-
listen (3.7.1)
|
50
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
51
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
52
|
-
mercenary (0.4.0)
|
53
|
-
minima (2.5.1)
|
54
|
-
jekyll (>= 3.5, < 5.0)
|
55
|
-
jekyll-feed (~> 0.9)
|
56
|
-
jekyll-seo-tag (~> 2.1)
|
57
|
-
pathutil (0.16.2)
|
58
|
-
forwardable-extended (~> 2.6)
|
59
|
-
public_suffix (4.0.7)
|
60
|
-
rake (13.0.6)
|
61
|
-
rb-fsevent (0.11.1)
|
62
|
-
rb-inotify (0.10.1)
|
63
|
-
ffi (~> 1.0)
|
64
|
-
rexml (3.2.5)
|
65
|
-
rouge (3.29.0)
|
66
|
-
safe_yaml (1.0.5)
|
67
|
-
sassc (2.4.0)
|
68
|
-
ffi (~> 1.9)
|
69
|
-
terminal-table (2.0.0)
|
70
|
-
unicode-display_width (~> 1.1, >= 1.1.1)
|
71
|
-
unicode-display_width (1.8.0)
|
72
|
-
webrick (1.7.0)
|
73
|
-
|
74
|
-
PLATFORMS
|
75
|
-
ruby
|
76
|
-
|
77
|
-
DEPENDENCIES
|
78
|
-
http_parser.rb (~> 0.6.0)
|
79
|
-
jekyll (~> 4.2.2)
|
80
|
-
jekyll-feed (~> 0.12)
|
81
|
-
just-the-docs
|
82
|
-
minima (~> 2.5)
|
83
|
-
tzinfo (~> 1.2)
|
84
|
-
tzinfo-data
|
85
|
-
wdm (~> 0.1.1)
|
86
|
-
webrick
|
87
|
-
|
88
|
-
BUNDLED WITH
|
89
|
-
2.3.14
|
data/docs/README.md
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-

|
2
|
-
|
3
|
-
# Docs
|
4
|
-
|
5
|
-
> Based on jekyll gem [https://jekyllrb.com/](https://jekyllrb.com/)
|
6
|
-
|
7
|
-
## install
|
8
|
-
|
9
|
-
1. `bundle install`
|
10
|
-
|
11
|
-
## run:development
|
12
|
-
|
13
|
-
1. `jekyll serve`
|
14
|
-
2. `http://127.0.0.1:4000/`
|
15
|
-
|
16
|
-
## build for production
|
17
|
-
|
18
|
-
1. `jekyll build`
|
19
|
-
2. `check`
|
data/docs/_config.yml
DELETED
@@ -1,148 +0,0 @@
|
|
1
|
-
# Welcome to Jekyll!
|
2
|
-
#
|
3
|
-
# This config file is meant for settings that affect your whole site, values
|
4
|
-
# which you are expected to set up once and rarely edit after that. If you find
|
5
|
-
# yourself editing these this file very often, consider using Jekyll's data files
|
6
|
-
# feature for the data you need to update frequently.
|
7
|
-
#
|
8
|
-
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
9
|
-
# 'jekyll serve'. If you change this file, please restart the server process.
|
10
|
-
|
11
|
-
# Site settings
|
12
|
-
# These are used to personalize your new site. If you look in the HTML files,
|
13
|
-
# you will see them accessed via {{ site.title }}, {{ site.github_repo }}, and so on.
|
14
|
-
# You can create any custom variable you would like, and they will be accessible
|
15
|
-
# in the templates via {{ site.myvariable }}.
|
16
|
-
title: Amber Component
|
17
|
-
baseurl: '/amber-doc-test' # the subpath of your site, e.g. /blog
|
18
|
-
# url: https://ambercomponent.com # the base hostname & protocol for your site, e.g. http://example.com
|
19
|
-
url: https://garbusbeach.com/ # the base hostname & protocol for your site, e.g. http://example.com
|
20
|
-
|
21
|
-
theme: just-the-docs
|
22
|
-
# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define
|
23
|
-
# color_scheme: "dark"
|
24
|
-
color_scheme: "amber_component"
|
25
|
-
|
26
|
-
permalink: pretty
|
27
|
-
exclude: [
|
28
|
-
"node_modules/",
|
29
|
-
"*.gemspec",
|
30
|
-
"*.gem",
|
31
|
-
"Gemfile",
|
32
|
-
"Gemfile.lock",
|
33
|
-
"package.json",
|
34
|
-
"package-lock.json",
|
35
|
-
"script/",
|
36
|
-
"LICENSE.txt",
|
37
|
-
"lib/",
|
38
|
-
"bin/",
|
39
|
-
"README.md",
|
40
|
-
"Rakefile" ,
|
41
|
-
"docs/tests/"
|
42
|
-
]
|
43
|
-
|
44
|
-
# Regression tests
|
45
|
-
# By default, the pages in /docs/tests are excluded when the ste is built.
|
46
|
-
# To include them, comment-out the relevant line above.
|
47
|
-
# Uncommenting the following line doesn't work - see https://github.com/jekyll/jekyll/issues/4791
|
48
|
-
# include: ["docs/tests/"]
|
49
|
-
|
50
|
-
# Set a path/url to a logo that will be displayed instead of the title
|
51
|
-
logo: /assets/images/logo_wide.png
|
52
|
-
|
53
|
-
# Enable or disable the site search
|
54
|
-
# Supports true (default) or false
|
55
|
-
search_enabled: true
|
56
|
-
search:
|
57
|
-
# Split pages into sections that can be searched individually
|
58
|
-
# Supports 1 - 6, default: 2
|
59
|
-
heading_level: 2
|
60
|
-
# Maximum amount of previews per search result
|
61
|
-
# Default: 3
|
62
|
-
previews: 2
|
63
|
-
# Maximum amount of words to display before a matched word in the preview
|
64
|
-
# Default: 5
|
65
|
-
preview_words_before: 3
|
66
|
-
# Maximum amount of words to display after a matched word in the preview
|
67
|
-
# Default: 10
|
68
|
-
preview_words_after: 3
|
69
|
-
# Set the search token separator
|
70
|
-
# Default: /[\s\-/]+/
|
71
|
-
# Example: enable support for hyphenated search words
|
72
|
-
tokenizer_separator: /[\s/]+/
|
73
|
-
# Display the relative url in search results
|
74
|
-
# Supports true (default) or false
|
75
|
-
rel_url: true
|
76
|
-
# Enable or disable the search button that appears in the bottom right corner of every page
|
77
|
-
# Supports true or false (default)
|
78
|
-
button: false
|
79
|
-
|
80
|
-
# Enable or disable heading anchors
|
81
|
-
heading_anchors: true
|
82
|
-
|
83
|
-
# Aux links for the upper right navigation
|
84
|
-
aux_links:
|
85
|
-
AmberComponent on GitHub:
|
86
|
-
- https://github.com/amber-ruby/amber_component
|
87
|
-
|
88
|
-
# Makes Aux links open in a new tab. Default is false
|
89
|
-
aux_links_new_tab: true
|
90
|
-
|
91
|
-
# Sort order for navigation links
|
92
|
-
# nav_sort: case_insensitive # default, equivalent to nil
|
93
|
-
nav_sort: case_sensitive # Capital letters sorted before lowercase
|
94
|
-
|
95
|
-
# Footer content
|
96
|
-
# appears at the bottom of every page's main content
|
97
|
-
|
98
|
-
# Back to top link
|
99
|
-
back_to_top: true
|
100
|
-
back_to_top_text: "Back to top"
|
101
|
-
|
102
|
-
footer_content: >-
|
103
|
-
Copyright ©
|
104
|
-
<script type="text/javascript">
|
105
|
-
document.write(new Date().getFullYear());
|
106
|
-
</script>
|
107
|
-
<a class="personal-link" href="{{ site.data.amber_component.garbus_beach_url }}">Garbus Beach</a>,
|
108
|
-
<a class="personal-link" href="{{ site.data.amber_component.mateusz_drewniak_url }}">Mateusz Drewniak</a>.
|
109
|
-
Made with ❤️ for ruby.
|
110
|
-
|
111
|
-
# Footer last edited timestamp
|
112
|
-
last_edit_timestamp: false # show or hide edit time - page must have `last_modified_date` defined in the frontmatter
|
113
|
-
last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
# Footer "Edit this page on GitHub" link text
|
118
|
-
gh_edit_link: false # show or hide edit this page link
|
119
|
-
# gh_edit_link_text: "Edit this page on GitHub"
|
120
|
-
# gh_edit_repository: "https://github.com/just-the-docs/just-the-docs" # the github URL for your repo
|
121
|
-
# gh_edit_branch: "main" # the branch that your docs is served from
|
122
|
-
# gh_edit_source: docs # the source that your files originate from
|
123
|
-
# gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately
|
124
|
-
|
125
|
-
# Google Analytics Tracking (optional)
|
126
|
-
# e.g, UA-1234567-89
|
127
|
-
|
128
|
-
# TODO:
|
129
|
-
# ga_tracking: UA-2709176-10
|
130
|
-
# ga_tracking_anonymize_ip: false # Use GDPR compliant Google Analytics settings (true/nil by default)
|
131
|
-
|
132
|
-
plugins:
|
133
|
-
- jekyll-seo-tag
|
134
|
-
|
135
|
-
kramdown:
|
136
|
-
syntax_highlighter_opts:
|
137
|
-
block:
|
138
|
-
line_numbers: false
|
139
|
-
|
140
|
-
compress_html:
|
141
|
-
clippings: all
|
142
|
-
comments: all
|
143
|
-
endings: all
|
144
|
-
startings: []
|
145
|
-
blanklines: false
|
146
|
-
profile: false
|
147
|
-
# ignore:
|
148
|
-
# envs: all
|
data/docs/_sass/_variables.scss
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
@import url(https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css);
|
2
|
-
|
3
|
-
@import './color_schemes/dark.scss';
|
4
|
-
@import './../variables.scss';
|
5
|
-
|
6
|
-
$link-color: $amber_color;
|
7
|
-
$btn-primary-color: $amber_color;
|
8
|
-
$body-font-family: 'Fira Code', Menlo, Consolas, Monospace;
|
9
|
-
$mono-font-family: $body-font-family;
|
10
|
-
// $body-background-color: $amber_black;
|
11
|
-
// $sidebar-color: $amber_black;
|
@@ -1,60 +0,0 @@
|
|
1
|
-
@import './../variables.scss';
|
2
|
-
|
3
|
-
.site-footer {
|
4
|
-
display: none;
|
5
|
-
}
|
6
|
-
|
7
|
-
.search {
|
8
|
-
input.search-input {
|
9
|
-
color: white;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
.btn {
|
14
|
-
&:focus,
|
15
|
-
&:focus:hover,
|
16
|
-
&.selected:focus {
|
17
|
-
box-shadow: 0 0 0 3px rgba($amber_color, 0.25);
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
footer {
|
22
|
-
a.personal-link {
|
23
|
-
color: #5c5962;
|
24
|
-
text-decoration: underline;
|
25
|
-
|
26
|
-
&:hover {
|
27
|
-
color: $amber_color;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
.site-header {
|
33
|
-
a.site-title {
|
34
|
-
&:hover {
|
35
|
-
background-image: none;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
.nav-list {
|
41
|
-
.nav-list-item {
|
42
|
-
a.nav-list-link {
|
43
|
-
color: rgba(255, 255, 255, 0.8);
|
44
|
-
}
|
45
|
-
|
46
|
-
&.active {
|
47
|
-
// margin: 0 16px;
|
48
|
-
border-radius: 2px;
|
49
|
-
background-color: rgba($amber_color, 0.3);
|
50
|
-
|
51
|
-
a.nav-list-link {
|
52
|
-
&.active {
|
53
|
-
// padding-left: 18px;
|
54
|
-
color: $amber_color;
|
55
|
-
background-image: none;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
}
|
data/docs/api/index.md
DELETED
Binary file
|
data/docs/changelog/index.md
DELETED
data/docs/favicon.ico
DELETED
Binary file
|
data/docs/index.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: default
|
3
|
-
title: Home
|
4
|
-
nav_order: 1
|
5
|
-
permalink: /
|
6
|
-
---
|
7
|
-
|
8
|
-
# AmberComponent (v{{ site.data.amber_component.version }})
|
9
|
-
|
10
|
-
A simple component library which seamlessly hooks into your Rails project and allows you to create simple backend components. They work like mini controllers which are bound with their view.
|
11
|
-
|
12
|
-
Created by [Garbus Beach]({{ site.data.amber_component.garbus_beach_url }}){:target="_blank"}
|
13
|
-
and
|
14
|
-
[Mateusz Drewniak]({{ site.data.amber_component.mateusz_drewniak_url }}){:target="_blank"}.
|
15
|
-
|
16
|
-
[Get started now](#getting-started){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
|
17
|
-
[View it on GitHub](https://github.com/amber-ruby/amber_component){: .btn .fs-5 .mb-4 .mb-md-0 target="_blank"}
|
data/docs/introduction/index.md
DELETED
data/docs/resources/index.md
DELETED
data/docs/styles/index.md
DELETED
data/docs/styles/usage.md
DELETED
data/docs/views/index.md
DELETED
data/docs/views/usage.md
DELETED