rails_icons 1.3.0 → 1.4.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d7cd3efc6fcdd950e2a509b16d65cb70657b5444ac28b3a16e86a36aaae9a68
|
4
|
+
data.tar.gz: 41e21e7a5d8fa720b16e90c7a67534de8c2fd2e59eac726408243778e2d90f60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91571161520d6d7a57b6fc53d7e2a81ec49dfc76c58d922b0c3adb1e706207f55de846b436e7d87803262f18d8dfa0e4a4a7874bf7e8b2770df023f5091d4b7b
|
7
|
+
data.tar.gz: 07f2cdb947abed671415af4ec25b784a651acd094581099622bc7e40bf44e98ec70283ee0e1154d974c7a8e6586e1a3a263a88a338c3d0c7af1a42283503443d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Add any icon library to a Rails app. Rails Icons has first-party support for a [handful of libraries](#first-party-libraries). It is library agnostic so it can be used with any icon library using the same interface.
|
4
4
|
|
5
|
+

|
6
|
+
|
5
7
|
```erb
|
6
8
|
# Using the default icon library
|
7
9
|
icon "check", class: "text-gray-500"
|
@@ -99,7 +101,7 @@ Rails Icons also includes a few animated icons. Great for loading states and so
|
|
99
101
|
- `fading-dots`
|
100
102
|
- `bouncing-dots`
|
101
103
|
|
102
|
-
Use like this: `icon "faded-spinner", library: "animated"`. The same attributes as the
|
104
|
+
Use like this: `icon "faded-spinner", library: "animated"`. The same attributes as the other libraries are available.
|
103
105
|
|
104
106
|
|
105
107
|
## Custom icon library
|
@@ -7,7 +7,7 @@ module RailsIcons
|
|
7
7
|
def initialize(*arguments)
|
8
8
|
super(*arguments)
|
9
9
|
|
10
|
-
validate!
|
10
|
+
validate! if validatable?
|
11
11
|
end
|
12
12
|
|
13
13
|
private
|
@@ -19,6 +19,8 @@ module RailsIcons
|
|
19
19
|
raise RailsIcons::LibraryNotFound.new(invalid_libraries.join(", ")) if invalid_libraries.any?
|
20
20
|
end
|
21
21
|
|
22
|
+
def validatable? = false
|
23
|
+
|
22
24
|
def invalid_libraries = options.libraries.map(&:to_sym).map(&:downcase).reject { RailsIcons.libraries.key?(_1) }
|
23
25
|
|
24
26
|
def custom_library? = options.custom.present?
|
data/lib/rails_icons/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_icons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rails Designer Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|