lightning-ui 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8c2efc337fbdde7aaee691afca43c5f5a06ae1381d4f3d4a8283ba35a6d12fca
4
+ data.tar.gz: 8956608911b4d7c397f2cc901ff71c3e6a230f61159b279dc2ae998a5d9e535a
5
+ SHA512:
6
+ metadata.gz: 0bc4a2e722e03b7a2748ee14b3b22d8c90012c3e91f5169d9143b16bffd1dd37fc98203d978a190d9ff84658dbe19ad3a9981deec12f358dd8079cafca4b0124
7
+ data.tar.gz: 4ffc0d3af7822f629e0a6c3122cc0f9c43829f072468c94f789947ea1465beeea4a9eb589fa7036c060be12a7bf5f840d2b432ef48dca567f88ec161e100ceb1
@@ -0,0 +1,20 @@
1
+ Copyright 2020
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,28 @@
1
+ # Lightning UI
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'lightning-ui'
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install lightning-ui
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,27 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'Lightning::UI'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rspec/core/rake_task'
25
+ RSpec::Core::RakeTask.new(:spec)
26
+
27
+ task default: :spec
@@ -0,0 +1,6 @@
1
+ module Lightning
2
+ module UI
3
+ class ApplicationComponent < ViewComponent::Base
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ <%= content_tag :span, class: css_classes do %>
2
+ <%= text_or_content %>
3
+ <% end %>
@@ -0,0 +1,34 @@
1
+ module Lightning
2
+ module UI
3
+ class BadgeComponent < ApplicationComponent
4
+ COLORS = {
5
+ default: nil,
6
+ inverse: 'slds-badge_inverse',
7
+ lightest: 'slds-badge_lightest',
8
+ success: 'slds-theme_success',
9
+ warning: 'slds-theme_warning',
10
+ error: 'slds-theme_error'
11
+ }.freeze
12
+
13
+ def initialize(text: nil, color: :default)
14
+ @text = text
15
+ @color = color
16
+ end
17
+
18
+ private
19
+
20
+ attr_reader :color, :text
21
+
22
+ def css_classes
23
+ [
24
+ 'slds-badge',
25
+ COLORS[color]
26
+ ]
27
+ end
28
+
29
+ def text_or_content
30
+ text || content
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,3 @@
1
+ Rails.autoloaders.each do |autoloader|
2
+ autoloader.inflector.inflect('ui' => 'UI')
3
+ end
@@ -0,0 +1,2 @@
1
+ Rails.application.routes.draw do
2
+ end
@@ -0,0 +1,7 @@
1
+ require 'view_component/engine'
2
+ require 'lightning/ui/engine'
3
+
4
+ module Lightning
5
+ module UI
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Lightning
2
+ module UI
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Lightning::UI
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module Lightning
2
+ module UI
3
+ VERSION = '0.1.0'.freeze
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :lightning_ui do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,180 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lightning-ui
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Aaric Pittman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 6.0.0.0
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: 6.0.3
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 6.0.0.0
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: 6.0.3
33
+ - !ruby/object:Gem::Dependency
34
+ name: view_component
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '2.0'
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '2.14'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '2.0'
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '2.14'
53
+ - !ruby/object:Gem::Dependency
54
+ name: capybara
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '3.33'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '3.33'
67
+ - !ruby/object:Gem::Dependency
68
+ name: pry
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '0.13'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '0.13'
81
+ - !ruby/object:Gem::Dependency
82
+ name: rspec-rails
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '4.0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: '4.0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: rubocop
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: '0.87'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - "~>"
107
+ - !ruby/object:Gem::Version
108
+ version: '0.87'
109
+ - !ruby/object:Gem::Dependency
110
+ name: solargraph
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '0.39'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '0.39'
123
+ - !ruby/object:Gem::Dependency
124
+ name: sqlite3
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '1.4'
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: '1.4'
137
+ description:
138
+ email:
139
+ - aaricpittman@gmail.com
140
+ executables: []
141
+ extensions: []
142
+ extra_rdoc_files: []
143
+ files:
144
+ - MIT-LICENSE
145
+ - README.md
146
+ - Rakefile
147
+ - app/assets/config/lightning_ui_manifest.js
148
+ - app/components/lightning/ui/application_component.rb
149
+ - app/components/lightning/ui/badge_component.html.erb
150
+ - app/components/lightning/ui/badge_component.rb
151
+ - config/initializers/inflections.rb
152
+ - config/routes.rb
153
+ - lib/lightning/ui.rb
154
+ - lib/lightning/ui/engine.rb
155
+ - lib/lightning/ui/version.rb
156
+ - lib/tasks/lightning/ui_tasks.rake
157
+ homepage: https://github.com/aaricpittman/lightning-ui
158
+ licenses:
159
+ - MIT
160
+ metadata: {}
161
+ post_install_message:
162
+ rdoc_options: []
163
+ require_paths:
164
+ - lib
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ requirements: []
176
+ rubygems_version: 3.0.3
177
+ signing_key:
178
+ specification_version: 4
179
+ summary: Rails view components for Salesforce Lightning Design System
180
+ test_files: []