rails_icons 1.6.1 → 1.7.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/Gemfile +0 -1
- data/Gemfile.lock +4 -2
- data/README.md +11 -11
- data/lib/generators/rails_icons/initializer_generator.rb +2 -2
- data/lib/generators/rails_icons/sync_generator.rb +3 -2
- data/lib/rails_icons/base_generator.rb +8 -4
- data/lib/rails_icons/engine.rb +6 -0
- data/lib/rails_icons/helpers/icon_helper.rb +3 -3
- data/lib/rails_icons/version.rb +1 -1
- data/lib/rails_icons.rb +10 -4
- data/lib/ruby_lsp/rails_icons/addon.rb +128 -0
- data/rails_icons.gemspec +1 -2
- metadata +6 -32
- data/lib/rails_icons/configuration/animated.rb +0 -24
- data/lib/rails_icons/configuration/boxicons.rb +0 -78
- data/lib/rails_icons/configuration/feather.rb +0 -49
- data/lib/rails_icons/configuration/flags.rb +0 -69
- data/lib/rails_icons/configuration/heroicons.rb +0 -105
- data/lib/rails_icons/configuration/linear.rb +0 -49
- data/lib/rails_icons/configuration/lucide.rb +0 -54
- data/lib/rails_icons/configuration/phosphor.rb +0 -145
- data/lib/rails_icons/configuration/radix.rb +0 -47
- data/lib/rails_icons/configuration/sidekickicons.rb +0 -105
- data/lib/rails_icons/configuration/tabler.rb +0 -72
- data/lib/rails_icons/configuration/weather.rb +0 -55
- data/lib/rails_icons/configuration.rb +0 -59
- data/lib/rails_icons/errors.rb +0 -19
- data/lib/rails_icons/icon/attributes.rb +0 -47
- data/lib/rails_icons/icon/file_path.rb +0 -57
- data/lib/rails_icons/icon.rb +0 -62
- data/lib/rails_icons/libraries.rb +0 -32
- data/lib/rails_icons/sync/engine.rb +0 -77
- data/lib/rails_icons/sync/process_variants.rb +0 -76
- data/lib/rails_icons/sync/transformations.rb +0 -29
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1eb234823bc6e27e9acad4dff7c38f02e09680874be20591ebfcd5259b9076f4
|
|
4
|
+
data.tar.gz: d8d835dc636cd685ad6db3fff46580a8ea623725827742110c1d781e64c3209c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8b4b1e11b017a7f31c700422306e2d92bb8a60c5c338a1c9797f08988058b635ece2543abfe8f0db6c11e44576d6507c3ad7a9b71d63f6e2d0c86ab52d13492
|
|
7
|
+
data.tar.gz: 8f9f3515fb864772cca37e3c28a20a3467cd6974a815b41325504794fa8b5225629759ce72245304ae2f0e53884fa666e40189723605e6f3159f538972217055
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rails_icons (1.
|
|
5
|
-
|
|
4
|
+
rails_icons (1.7.0)
|
|
5
|
+
icons (~> 0.8.0)
|
|
6
6
|
rails (>= 7.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
@@ -102,6 +102,8 @@ GEM
|
|
|
102
102
|
activesupport (>= 6.1)
|
|
103
103
|
i18n (1.14.7)
|
|
104
104
|
concurrent-ruby (~> 1.0)
|
|
105
|
+
icons (0.8.0)
|
|
106
|
+
nokogiri (~> 1.16, >= 1.16.4)
|
|
105
107
|
io-console (0.8.1)
|
|
106
108
|
irb (1.15.2)
|
|
107
109
|
pp (>= 0.6.0)
|
data/README.md
CHANGED
|
@@ -77,17 +77,17 @@ icon "check", stroke_width: 2
|
|
|
77
77
|
|
|
78
78
|
## First-party libraries
|
|
79
79
|
|
|
80
|
-
- [Boxicons](https://railsdesigner.com/rails-icons/boxicons/) (1600+ icons)
|
|
81
|
-
- [Feather](https://railsdesigner.com/rails-icons/feather/) (280+ icons)
|
|
82
|
-
- [Flags](https://railsdesigner.com/rails-icons/flags/) (540+ icons)
|
|
83
|
-
- [Heroicons](https://railsdesigner.com/rails-icons/heroicons/) (300+ icons)
|
|
84
|
-
- [Linear](https://railsdesigner.com/rails-icons/linear/) (170+ icons)
|
|
85
|
-
- [Lucide](https://railsdesigner.com/rails-icons/lucide/) (1500+ icons)
|
|
86
|
-
- [Phosphor](https://railsdesigner.com/rails-icons/phosphor/) (9000+ icons)
|
|
87
|
-
- [Radix](https://railsdesigner.com/rails-icons/radix/) (300+ icons)
|
|
88
|
-
- [SidekickIcons](https://railsdesigner.com/rails-icons/sidekickicons/) (49 icons, complementing [Heroicons](https://railsdesigner.com/rails-icons/heroicons/))
|
|
89
|
-
- [Tabler](https://railsdesigner.com/rails-icons/tabler/) (5700+ icons)
|
|
90
|
-
- [Weather](https://railsdesigner.com/rails-icons/weather/) (215+ icons)
|
|
80
|
+
- [Boxicons](https://railsdesigner.com/open-source/rails-icons/boxicons/) (1600+ icons)
|
|
81
|
+
- [Feather](https://railsdesigner.com/open-source/rails-icons/feather/) (280+ icons)
|
|
82
|
+
- [Flags](https://railsdesigner.com/open-source/rails-icons/flags/) (540+ icons)
|
|
83
|
+
- [Heroicons](https://railsdesigner.com/open-source/rails-icons/heroicons/) (300+ icons)
|
|
84
|
+
- [Linear](https://railsdesigner.com/open-source/rails-icons/linear/) (170+ icons)
|
|
85
|
+
- [Lucide](https://railsdesigner.com/open-source/rails-icons/lucide/) (1500+ icons)
|
|
86
|
+
- [Phosphor](https://railsdesigner.com/open-source/rails-icons/phosphor/) (9000+ icons)
|
|
87
|
+
- [Radix](https://railsdesigner.com/open-source/rails-icons/radix/) (300+ icons)
|
|
88
|
+
- [SidekickIcons](https://railsdesigner.com/open-source/rails-icons/sidekickicons/) (49 icons, complementing [Heroicons](https://railsdesigner.com/open-source/rails-icons/heroicons/))
|
|
89
|
+
- [Tabler](https://railsdesigner.com/open-source/rails-icons/tabler/) (5700+ icons)
|
|
90
|
+
- [Weather](https://railsdesigner.com/open-source/rails-icons/weather/) (215+ icons)
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
## Animated icons
|
|
@@ -75,7 +75,7 @@ module RailsIcons
|
|
|
75
75
|
def create_custom_directory = FileUtils.mkdir_p(File.join(options[:destination], options[:custom]))
|
|
76
76
|
|
|
77
77
|
def library_configuration
|
|
78
|
-
libraries.map { RailsIcons.libraries[
|
|
78
|
+
libraries.map { |library| RailsIcons.libraries[library.to_sym].initializer_config }.join("\n")
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
def custom_configuration
|
|
@@ -92,7 +92,7 @@ module RailsIcons
|
|
|
92
92
|
def default_configuration_exists?
|
|
93
93
|
line = /^\s*config\.default_library\s*=/
|
|
94
94
|
|
|
95
|
-
File.readlines(INITIALIZER).any? {
|
|
95
|
+
File.readlines(INITIALIZER).any? { |file_line| file_line.match?(line) }
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
def libraries
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "rails_icons/base_generator"
|
|
4
|
-
require "rails_icons/sync/engine"
|
|
5
4
|
|
|
6
5
|
module RailsIcons
|
|
7
6
|
class SyncGenerator < RailsIcons::BaseGenerator
|
|
@@ -12,7 +11,9 @@ module RailsIcons
|
|
|
12
11
|
class_option :library, type: :string, desc: "Choose a library (#{RailsIcons.libraries.keys.join("/")})"
|
|
13
12
|
class_option :libraries, type: :array, default: [], desc: "Choose libraries (#{RailsIcons.libraries.keys.join("/")})"
|
|
14
13
|
|
|
15
|
-
def sync_icons
|
|
14
|
+
def sync_icons
|
|
15
|
+
libraries.each { |library| Icons::Sync.new(library).now }
|
|
16
|
+
end
|
|
16
17
|
|
|
17
18
|
private
|
|
18
19
|
|
|
@@ -15,8 +15,8 @@ module RailsIcons
|
|
|
15
15
|
def validate!
|
|
16
16
|
return if custom_library?
|
|
17
17
|
|
|
18
|
-
raise
|
|
19
|
-
raise
|
|
18
|
+
raise Icons::LibraryNotFound.new("") if libraries.empty?
|
|
19
|
+
raise Icons::LibraryNotFound.new(invalid_libraries.join(", ")) if invalid_libraries.any?
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def validatable? = false
|
|
@@ -25,9 +25,13 @@ module RailsIcons
|
|
|
25
25
|
[*options.libraries, options.library].compact_blank
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
def invalid_libraries
|
|
28
|
+
def invalid_libraries
|
|
29
|
+
libraries.map(&:to_sym).map(&:downcase).reject { |library| RailsIcons.libraries.key?(library) }
|
|
30
|
+
end
|
|
29
31
|
|
|
30
|
-
def custom_library?
|
|
32
|
+
def custom_library?
|
|
33
|
+
options.custom.present?
|
|
34
|
+
end
|
|
31
35
|
|
|
32
36
|
# Uses `gsub_file` as a read-only operation to check file content. This
|
|
33
37
|
# approach is preferred over `File.read` because `gsub_file` is properly stubbed
|
data/lib/rails_icons/engine.rb
CHANGED
|
@@ -6,6 +6,12 @@ module RailsIcons
|
|
|
6
6
|
class Engine < ::Rails::Engine
|
|
7
7
|
isolate_namespace RailsIcons
|
|
8
8
|
|
|
9
|
+
initializer "rails_icons.configure_icons_gem", before: :load_config_initializers do
|
|
10
|
+
Icons.configure do |config|
|
|
11
|
+
config.base_path = Rails.root
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
9
15
|
initializer "rails_icons.helpers" do
|
|
10
16
|
ActiveSupport.on_load(:action_view) do
|
|
11
17
|
include RailsIcons::Helpers::IconHelper
|
|
@@ -4,16 +4,16 @@ module RailsIcons
|
|
|
4
4
|
module Helpers
|
|
5
5
|
module IconHelper
|
|
6
6
|
def icon(name, library: RailsIcons.configuration.default_library, from: library, variant: nil, **arguments)
|
|
7
|
-
|
|
7
|
+
Icons::Icon.new(
|
|
8
8
|
name: name,
|
|
9
9
|
library: from || library,
|
|
10
10
|
variant: variant,
|
|
11
11
|
arguments: arguments
|
|
12
|
-
).svg
|
|
12
|
+
).svg.html_safe
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def encoded_icon(name, library: RailsIcons.configuration.default_library, from: library, variant: nil, **arguments)
|
|
16
|
-
svg_content =
|
|
16
|
+
svg_content = Icons::Icon.new(
|
|
17
17
|
name: name,
|
|
18
18
|
library: from || library,
|
|
19
19
|
variant: variant,
|
data/lib/rails_icons/version.rb
CHANGED
data/lib/rails_icons.rb
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "icons"
|
|
4
|
+
|
|
3
5
|
require_relative "rails_icons/version"
|
|
4
|
-
require_relative "rails_icons/libraries"
|
|
5
|
-
require_relative "rails_icons/configuration"
|
|
6
6
|
require_relative "rails_icons/engine"
|
|
7
|
-
require_relative "rails_icons/errors"
|
|
8
|
-
require_relative "rails_icons/icon"
|
|
9
7
|
|
|
10
8
|
module RailsIcons
|
|
9
|
+
class << self
|
|
10
|
+
def configure(&block) = Icons.configure(&block)
|
|
11
|
+
|
|
12
|
+
def configuration = Icons.configuration
|
|
13
|
+
alias_method :config, :configuration
|
|
14
|
+
|
|
15
|
+
def libraries = Icons.libraries
|
|
16
|
+
end
|
|
11
17
|
end
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ruby_lsp/addon"
|
|
4
|
+
|
|
5
|
+
module RubyLsp
|
|
6
|
+
module RailsIcons
|
|
7
|
+
class Addon < ::RubyLsp::Addon
|
|
8
|
+
def activate(global_state, message_queue)
|
|
9
|
+
@workspace_path = global_state.workspace_path
|
|
10
|
+
@icons = index_icons
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def deactivate
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def name = "Rails Icons"
|
|
17
|
+
|
|
18
|
+
def version = ::RailsIcons::VERSION
|
|
19
|
+
|
|
20
|
+
def create_completion_listener(response_builder, node_context, dispatcher, uri)
|
|
21
|
+
node = node_context.node
|
|
22
|
+
|
|
23
|
+
return unless node.is_a?(Prism::CallNode) && node.name == :icon
|
|
24
|
+
|
|
25
|
+
Completion.new(response_builder, node, @icons, dispatcher)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def configuration
|
|
31
|
+
::RailsIcons.configuration
|
|
32
|
+
rescue
|
|
33
|
+
nil
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def default_library
|
|
37
|
+
configuration&.default_library&.to_s
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def icons_path
|
|
41
|
+
File.join(@workspace_path, configuration&.icons_path || "app/assets/svg/icons")
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def library_path
|
|
45
|
+
default_library ? File.join(icons_path, default_library) : icons_path
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def index_icons
|
|
49
|
+
Dir.glob("#{library_path}/**/*.svg").map { |path| File.basename(path, ".svg") }.uniq.sort
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
class Completion
|
|
54
|
+
include ::RubyLsp::Requests::Support::Common
|
|
55
|
+
|
|
56
|
+
def initialize(response_builder, node, icons, dispatcher)
|
|
57
|
+
@response_builder = response_builder
|
|
58
|
+
@node = node
|
|
59
|
+
@icons = icons
|
|
60
|
+
|
|
61
|
+
dispatcher.register(self, :on_call_node_enter)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def on_call_node_enter(node)
|
|
65
|
+
return unless node.name == :icon
|
|
66
|
+
|
|
67
|
+
prefix = extract_prefix(node)
|
|
68
|
+
|
|
69
|
+
@icons.each do |icon|
|
|
70
|
+
next unless icon.start_with?(prefix)
|
|
71
|
+
|
|
72
|
+
@response_builder << Interface::CompletionItem.new(
|
|
73
|
+
label: icon,
|
|
74
|
+
kind: Constant::CompletionItemKind::VALUE,
|
|
75
|
+
text_edit: Interface::TextEdit.new(
|
|
76
|
+
range: first_argument_range(node),
|
|
77
|
+
new_text: icon
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
private
|
|
84
|
+
|
|
85
|
+
def extract_prefix(node)
|
|
86
|
+
first_argument = node.arguments&.arguments&.first
|
|
87
|
+
|
|
88
|
+
return "" unless first_argument.is_a?(Prism::StringNode)
|
|
89
|
+
|
|
90
|
+
first_argument.content
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def first_argument_range(node)
|
|
94
|
+
first_argument = node.arguments&.arguments&.first
|
|
95
|
+
|
|
96
|
+
return zero_width_range(node.location) unless first_argument.is_a?(Prism::StringNode)
|
|
97
|
+
|
|
98
|
+
content_location = first_argument.content_loc
|
|
99
|
+
|
|
100
|
+
Interface::Range.new(
|
|
101
|
+
start: Interface::Position.new(
|
|
102
|
+
line: content_location.start_line - 1,
|
|
103
|
+
character: content_location.start_column
|
|
104
|
+
),
|
|
105
|
+
|
|
106
|
+
end: Interface::Position.new(
|
|
107
|
+
line: content_location.end_line - 1,
|
|
108
|
+
character: content_location.end_column
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def zero_width_range(location)
|
|
114
|
+
Interface::Range.new(
|
|
115
|
+
start: Interface::Position.new(
|
|
116
|
+
line: location.end_line - 1,
|
|
117
|
+
character: location.end_column
|
|
118
|
+
),
|
|
119
|
+
|
|
120
|
+
end: Interface::Position.new(
|
|
121
|
+
line: location.end_line - 1,
|
|
122
|
+
character: location.end_column
|
|
123
|
+
)
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
data/rails_icons.gemspec
CHANGED
|
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
|
|
19
19
|
spec.files = Dir["{bin,app,config,db,lib,public}/**/*", "Rakefile", "README.md", "rails_icons.gemspec", "Gemfile", "Gemfile.lock"]
|
|
20
20
|
|
|
21
|
-
# spec.required_ruby_version = ">= 3.1.0"
|
|
22
21
|
spec.add_dependency "rails", ">= 7.0"
|
|
23
|
-
spec.
|
|
22
|
+
spec.add_dependency "icons", "~> 0.8.0"
|
|
24
23
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_icons
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rails Designer Developers
|
|
@@ -24,25 +24,19 @@ dependencies:
|
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '7.0'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
|
-
name:
|
|
27
|
+
name: icons
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
33
|
-
- - ">="
|
|
34
|
-
- !ruby/object:Gem::Version
|
|
35
|
-
version: 1.16.4
|
|
32
|
+
version: 0.8.0
|
|
36
33
|
type: :runtime
|
|
37
34
|
prerelease: false
|
|
38
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
36
|
requirements:
|
|
40
37
|
- - "~>"
|
|
41
38
|
- !ruby/object:Gem::Version
|
|
42
|
-
version:
|
|
43
|
-
- - ">="
|
|
44
|
-
- !ruby/object:Gem::Version
|
|
45
|
-
version: 1.16.4
|
|
39
|
+
version: 0.8.0
|
|
46
40
|
description: Add any icon library to a Rails app, from Heroicons, to Lucide to Tabler
|
|
47
41
|
(and others). Rails Icons is library-agnostic, so you can add any library while
|
|
48
42
|
using the same interface.
|
|
@@ -70,30 +64,10 @@ files:
|
|
|
70
64
|
- lib/generators/rails_icons/templates/initializer.rb.tt
|
|
71
65
|
- lib/rails_icons.rb
|
|
72
66
|
- lib/rails_icons/base_generator.rb
|
|
73
|
-
- lib/rails_icons/configuration.rb
|
|
74
|
-
- lib/rails_icons/configuration/animated.rb
|
|
75
|
-
- lib/rails_icons/configuration/boxicons.rb
|
|
76
|
-
- lib/rails_icons/configuration/feather.rb
|
|
77
|
-
- lib/rails_icons/configuration/flags.rb
|
|
78
|
-
- lib/rails_icons/configuration/heroicons.rb
|
|
79
|
-
- lib/rails_icons/configuration/linear.rb
|
|
80
|
-
- lib/rails_icons/configuration/lucide.rb
|
|
81
|
-
- lib/rails_icons/configuration/phosphor.rb
|
|
82
|
-
- lib/rails_icons/configuration/radix.rb
|
|
83
|
-
- lib/rails_icons/configuration/sidekickicons.rb
|
|
84
|
-
- lib/rails_icons/configuration/tabler.rb
|
|
85
|
-
- lib/rails_icons/configuration/weather.rb
|
|
86
67
|
- lib/rails_icons/engine.rb
|
|
87
|
-
- lib/rails_icons/errors.rb
|
|
88
68
|
- lib/rails_icons/helpers/icon_helper.rb
|
|
89
|
-
- lib/rails_icons/icon.rb
|
|
90
|
-
- lib/rails_icons/icon/attributes.rb
|
|
91
|
-
- lib/rails_icons/icon/file_path.rb
|
|
92
|
-
- lib/rails_icons/libraries.rb
|
|
93
|
-
- lib/rails_icons/sync/engine.rb
|
|
94
|
-
- lib/rails_icons/sync/process_variants.rb
|
|
95
|
-
- lib/rails_icons/sync/transformations.rb
|
|
96
69
|
- lib/rails_icons/version.rb
|
|
70
|
+
- lib/ruby_lsp/rails_icons/addon.rb
|
|
97
71
|
- rails_icons.gemspec
|
|
98
72
|
homepage: https://railsdesigner.com/rails-icons/
|
|
99
73
|
licenses:
|
|
@@ -115,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
89
|
- !ruby/object:Gem::Version
|
|
116
90
|
version: '0'
|
|
117
91
|
requirements: []
|
|
118
|
-
rubygems_version: 4.0.
|
|
92
|
+
rubygems_version: 4.0.3
|
|
119
93
|
specification_version: 4
|
|
120
94
|
summary: Add any icon library to a Rails app
|
|
121
95
|
test_files: []
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RailsIcons
|
|
4
|
-
class Configuration
|
|
5
|
-
module Animated
|
|
6
|
-
extend self
|
|
7
|
-
|
|
8
|
-
def config
|
|
9
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
10
|
-
options.default = default_options
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
def default_options
|
|
17
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
18
|
-
options.css = "size-6"
|
|
19
|
-
options.data = {}
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RailsIcons
|
|
4
|
-
class Configuration
|
|
5
|
-
module Boxicons
|
|
6
|
-
extend self
|
|
7
|
-
|
|
8
|
-
def config
|
|
9
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
10
|
-
options.default_variant = :regular
|
|
11
|
-
options.exclude_variants = []
|
|
12
|
-
|
|
13
|
-
setup_regular_config(options)
|
|
14
|
-
setup_solid_config(options)
|
|
15
|
-
setup_logos_config(options)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def initializer_config
|
|
20
|
-
<<~RB.indent(2)
|
|
21
|
-
# Override Boxicons defaults
|
|
22
|
-
# config.libraries.boxicons.default_variant = "" # Set a default variant for Boxicons
|
|
23
|
-
# config.libraries.boxicons.exclude_variants = [] # Exclude specific variants
|
|
24
|
-
|
|
25
|
-
# config.libraries.boxicons.solid.css = "size-6"
|
|
26
|
-
# config.libraries.boxicons.solid.data = {}
|
|
27
|
-
|
|
28
|
-
# config.libraries.boxicons.regular.css = "size-6"
|
|
29
|
-
# config.libraries.boxicons.regular.data = {}
|
|
30
|
-
|
|
31
|
-
# config.libraries.boxicons.logos.css = "size-6"
|
|
32
|
-
# config.libraries.boxicons.logos.data = {}
|
|
33
|
-
RB
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def source
|
|
37
|
-
{
|
|
38
|
-
url: "https://github.com/atisawd/boxicons.git",
|
|
39
|
-
variants: {
|
|
40
|
-
logos: "svg/logos",
|
|
41
|
-
regular: "svg/regular",
|
|
42
|
-
solid: "svg/solid"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def transformations
|
|
48
|
-
{
|
|
49
|
-
filenames: {
|
|
50
|
-
delete_prefix: ["bxl-", "bx-", "bxs-"]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def setup_regular_config(options)
|
|
56
|
-
options.regular = ActiveSupport::OrderedOptions.new
|
|
57
|
-
options.regular.default = default_options
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def setup_solid_config(options)
|
|
61
|
-
options.solid = ActiveSupport::OrderedOptions.new
|
|
62
|
-
options.solid.default = default_options
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def setup_logos_config(options)
|
|
66
|
-
options.logos = ActiveSupport::OrderedOptions.new
|
|
67
|
-
options.logos.default = default_options
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def default_options
|
|
71
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
72
|
-
options.css = "size-6"
|
|
73
|
-
options.data = {}
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
end
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RailsIcons
|
|
4
|
-
class Configuration
|
|
5
|
-
module Feather
|
|
6
|
-
extend self
|
|
7
|
-
|
|
8
|
-
def config
|
|
9
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
10
|
-
options.default_variant = nil
|
|
11
|
-
options.exclude_variants = []
|
|
12
|
-
|
|
13
|
-
options.default = default_options
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def initializer_config
|
|
18
|
-
<<~RB.indent(2)
|
|
19
|
-
# Override Feather defaults
|
|
20
|
-
# config.libraries.feather.default_variant = "" # Feather has no variants, this is provided for backwards compatibility
|
|
21
|
-
# config.libraries.feather.exclude_variants = [] # Feather has no variants, this is provided for backwards compatibility
|
|
22
|
-
|
|
23
|
-
# config.libraries.feather.default.css = "size-6"
|
|
24
|
-
# config.libraries.feather.default.stroke_width = "2"
|
|
25
|
-
# config.libraries.feather.default.data = {}
|
|
26
|
-
RB
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def source
|
|
30
|
-
{
|
|
31
|
-
url: "https://github.com/feathericons/feather.git",
|
|
32
|
-
variants: {
|
|
33
|
-
".": "icons" # Feather has no variants, store in the top directory
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
|
|
40
|
-
def default_options
|
|
41
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
42
|
-
options.stroke_width = "2"
|
|
43
|
-
options.css = "size-6"
|
|
44
|
-
options.data = {}
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RailsIcons
|
|
4
|
-
class Configuration
|
|
5
|
-
module Flags
|
|
6
|
-
extend self
|
|
7
|
-
|
|
8
|
-
def config
|
|
9
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
10
|
-
options.default_variant = "landscape"
|
|
11
|
-
options.exclude_variants = []
|
|
12
|
-
|
|
13
|
-
setup_square_config(options)
|
|
14
|
-
setup_landscape_config(options)
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def initializer_config
|
|
19
|
-
<<~RB.indent(2)
|
|
20
|
-
# Override Flags defaults
|
|
21
|
-
# config.libraries.flags.default_variant = "" # Set a default variant for Flags
|
|
22
|
-
# config.libraries.flags.exclude_variants = [:square, :landscape]
|
|
23
|
-
|
|
24
|
-
# config.libraries.flags.square.default.css = "size-6"
|
|
25
|
-
# config.libraries.flags.square.default.data = {}
|
|
26
|
-
|
|
27
|
-
# config.libraries.flags.landscape.default.css = "size-6"
|
|
28
|
-
# config.libraries.flags.landscape.default.data = {}
|
|
29
|
-
RB
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def source
|
|
33
|
-
{
|
|
34
|
-
url: "https://github.com/lipis/flag-icons.git",
|
|
35
|
-
variants: {
|
|
36
|
-
square: "flags/1x1",
|
|
37
|
-
landscape: "flags/4x3"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
private
|
|
43
|
-
|
|
44
|
-
def setup_square_config(options)
|
|
45
|
-
options.square = ActiveSupport::OrderedOptions.new
|
|
46
|
-
options.square.default = default_square_options
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def setup_landscape_config(options)
|
|
50
|
-
options.landscape = ActiveSupport::OrderedOptions.new
|
|
51
|
-
options.landscape.default = default_landscape_options
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def default_square_options
|
|
55
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
56
|
-
options.css = "size-6"
|
|
57
|
-
options.data = {}
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def default_landscape_options
|
|
62
|
-
ActiveSupport::OrderedOptions.new.tap do |options|
|
|
63
|
-
options.css = "size-6"
|
|
64
|
-
options.data = {}
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|