rails_heroicon 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/compressed/outline/arrow-sm-down.svg +1 -0
- data/compressed/outline/arrow-sm-left.svg +1 -0
- data/compressed/outline/arrow-sm-right.svg +1 -0
- data/compressed/outline/arrow-sm-up.svg +1 -0
- data/compressed/outline/plus.svg +1 -1
- data/compressed/solid/arrow-sm-down.svg +1 -0
- data/compressed/solid/arrow-sm-left.svg +1 -0
- data/compressed/solid/arrow-sm-right.svg +1 -0
- data/compressed/solid/arrow-sm-up.svg +1 -0
- data/compressed/solid/plus.svg +1 -1
- data/lib/rails_heroicon/helper.rb +4 -2
- data/lib/rails_heroicon/version.rb +1 -1
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af6d15fcca5f31aac2b9d9f41245bfcf8ea86bb1880332e57b04718cc05faab8
|
4
|
+
data.tar.gz: 81641b2a96aa996e473806dc9d4373aaec4e81c9db96050b7d7d19fffbc90f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bbf06b2b6d5b92fda3bd02b8b1893966068e7f64bba6b9e59b5f46d83dd44084bb161aa0cb613e13bc5bf981c4ecb02a597b31a554f0f53c7e7aabfefa29975
|
7
|
+
data.tar.gz: 9922ca1ddf6097e2aec1a1a5bb97fc7fa30e143eac58a26235170097ebbcc0fcb769c4412bcd10f74f014283f41150a696b511138e1465b1c8d484591696db2c
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Ruby on Rails views helper for the awesome heroicons by Steve Schoger. To see
|
4
4
|
all the icons visit [heroicons](https://heroicons.com/).
|
5
5
|
|
6
|
-
|
6
|
+
230 icons included as of today.
|
7
7
|
|
8
8
|
> This gem has no official affiliation with [Tailwind Labs](https://github.com/tailwindlabs),
|
9
9
|
> yet.
|
@@ -93,6 +93,13 @@ However, this can be over-written with the `size` attribute.
|
|
93
93
|
`rails_heroicon` automatically sets `aria-hidden="true"` if `aria-label` is not
|
94
94
|
set, and if `aria-label` is set, then `role="img"` is set.
|
95
95
|
|
96
|
+
### Tooltip
|
97
|
+
|
98
|
+
You can provide tooltips on hover if you pass in a `title` option. Anything
|
99
|
+
passed into the `title` option will be rendered inside of a
|
100
|
+
`<title>` tag within the rendered SVG, which modern browsers will lean on to
|
101
|
+
display a tooltip on hover.
|
102
|
+
|
96
103
|
## Development
|
97
104
|
|
98
105
|
- Clone the repo
|
@@ -0,0 +1 @@
|
|
1
|
+
<path d="M17 13L12 18M12 18L7 13M12 18L12 6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
@@ -0,0 +1 @@
|
|
1
|
+
<path d="M11 17L6 12M6 12L11 7M6 12L18 12" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
@@ -0,0 +1 @@
|
|
1
|
+
<path d="M13 7L18 12M18 12L13 17M18 12L6 12" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
@@ -0,0 +1 @@
|
|
1
|
+
<path d="M7 11L12 6M12 6L17 11M12 6V18" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
data/compressed/outline/plus.svg
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<path d="M12
|
1
|
+
<path d="M12 4V20M20 12L4 12" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
@@ -0,0 +1 @@
|
|
1
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.7071 10.2929C15.0976 10.6834 15.0976 11.3166 14.7071 11.7071L10.7071 15.7071C10.3166 16.0976 9.68342 16.0976 9.29289 15.7071L5.29289 11.7071C4.90237 11.3166 4.90237 10.6834 5.29289 10.2929C5.68342 9.90237 6.31658 9.90237 6.70711 10.2929L9 12.5858V5C9 4.44772 9.44772 4 10 4C10.5523 4 11 4.44772 11 5L11 12.5858L13.2929 10.2929C13.6834 9.90237 14.3166 9.90237 14.7071 10.2929Z"></path>
|
@@ -0,0 +1 @@
|
|
1
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.70711 14.7071C9.31658 15.0976 8.68342 15.0976 8.29289 14.7071L4.29289 10.7071C3.90237 10.3166 3.90237 9.68342 4.29289 9.29289L8.29289 5.29289C8.68342 4.90237 9.31658 4.90237 9.70711 5.29289C10.0976 5.68342 10.0976 6.31658 9.70711 6.70711L7.41421 9L15 9C15.5523 9 16 9.44772 16 10C16 10.5523 15.5523 11 15 11H7.41421L9.70711 13.2929C10.0976 13.6834 10.0976 14.3166 9.70711 14.7071Z"></path>
|
@@ -0,0 +1 @@
|
|
1
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.2929 5.29289C10.6834 4.90237 11.3166 4.90237 11.7071 5.29289L15.7071 9.29289C16.0976 9.68342 16.0976 10.3166 15.7071 10.7071L11.7071 14.7071C11.3166 15.0976 10.6834 15.0976 10.2929 14.7071C9.90237 14.3166 9.90237 13.6834 10.2929 13.2929L12.5858 11L5 11C4.44772 11 4 10.5523 4 10C4 9.44772 4.44772 9 5 9H12.5858L10.2929 6.70711C9.90237 6.31658 9.90237 5.68342 10.2929 5.29289Z"></path>
|
@@ -0,0 +1 @@
|
|
1
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289L9.29289 4.29289C9.68342 3.90237 10.3166 3.90237 10.7071 4.29289L14.7071 8.29289C15.0976 8.68342 15.0976 9.31658 14.7071 9.70711C14.3166 10.0976 13.6834 10.0976 13.2929 9.70711L11 7.41421L11 15C11 15.5523 10.5523 16 10 16C9.44772 16 9 15.5523 9 15L9 7.41421L6.70711 9.70711C6.31658 10.0976 5.68342 10.0976 5.29289 9.70711Z"></path>
|
data/compressed/solid/plus.svg
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10
|
1
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 3C10.5523 3 11 3.44772 11 4V9H16C16.5523 9 17 9.44772 17 10C17 10.5523 16.5523 11 16 11H11V16C11 16.5523 10.5523 17 10 17C9.44772 17 9 16.5523 9 16V11H4C3.44772 11 3 10.5523 3 10C3 9.44771 3.44772 9 4 9L9 9V4C9 3.44772 9.44772 3 10 3Z"></path>
|
@@ -32,9 +32,11 @@ module RailsHeroicon
|
|
32
32
|
# == Accessibility
|
33
33
|
# The helper method automatically sets <tt>aria-hidden=true</tt> if <tt>aria-label</tt> is not set, and
|
34
34
|
# if <tt>aria-label</tt> is set, then <tt>role=img</tt> is set automatically.
|
35
|
-
def heroicon(symbol, **options)
|
35
|
+
def heroicon(symbol, title: nil, **options)
|
36
36
|
icon = RailsHeroicon.new(symbol, **options)
|
37
|
-
|
37
|
+
|
38
|
+
title_tag = content_tag(:title, title) if title
|
39
|
+
content_tag(:svg, title_tag.to_s.html_safe + icon.svg_path.html_safe, icon.options)
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_heroicon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- abeidahmed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03
|
11
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -48,6 +48,10 @@ files:
|
|
48
48
|
- compressed/outline/arrow-narrow-right.svg
|
49
49
|
- compressed/outline/arrow-narrow-up.svg
|
50
50
|
- compressed/outline/arrow-right.svg
|
51
|
+
- compressed/outline/arrow-sm-down.svg
|
52
|
+
- compressed/outline/arrow-sm-left.svg
|
53
|
+
- compressed/outline/arrow-sm-right.svg
|
54
|
+
- compressed/outline/arrow-sm-up.svg
|
51
55
|
- compressed/outline/arrow-up.svg
|
52
56
|
- compressed/outline/arrows-expand.svg
|
53
57
|
- compressed/outline/at-symbol.svg
|
@@ -274,6 +278,10 @@ files:
|
|
274
278
|
- compressed/solid/arrow-narrow-right.svg
|
275
279
|
- compressed/solid/arrow-narrow-up.svg
|
276
280
|
- compressed/solid/arrow-right.svg
|
281
|
+
- compressed/solid/arrow-sm-down.svg
|
282
|
+
- compressed/solid/arrow-sm-left.svg
|
283
|
+
- compressed/solid/arrow-sm-right.svg
|
284
|
+
- compressed/solid/arrow-sm-up.svg
|
277
285
|
- compressed/solid/arrow-up.svg
|
278
286
|
- compressed/solid/arrows-expand.svg
|
279
287
|
- compressed/solid/at-symbol.svg
|
@@ -513,7 +521,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
513
521
|
- !ruby/object:Gem::Version
|
514
522
|
version: '0'
|
515
523
|
requirements: []
|
516
|
-
rubygems_version: 3.2.
|
524
|
+
rubygems_version: 3.2.15
|
517
525
|
signing_key:
|
518
526
|
specification_version: 4
|
519
527
|
summary: Ruby on Rails view helpers for the awesome Heroicons by Steve Schoger.
|