playbook_ui 12.37.0.pre.alpha.svgiconmethods1064 → 12.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_icon/docs/_icon_animate.html.erb +0 -1
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.html.erb +0 -2
- data/app/pb_kits/playbook/pb_icon/docs/example.yml +9 -10
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +3 -3
- data/app/pb_kits/playbook/pb_icon/icon.rb +0 -19
- data/lib/playbook/version.rb +2 -2
- metadata +7 -8
- data/app/pb_kits/playbook/pb_icon/docs/_icon_svg.html.erb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92ab5b99e6bc4d33881e4087db34763fd0d818607d0412cbe5305e9a376c6c31
|
4
|
+
data.tar.gz: 0ed7902b4ebff49a4dbc5dd60e7e6411311ab7fdee3bf0812501a6d2fe63a0f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40657ad869c7a5ca5aa6494a5d4ef300f1e00aa30fe8f4fac97402b4fe169f46dbccdf166fa926a91543c6751b410471dcb1ad0add23601b99e71758204f3cd2
|
7
|
+
data.tar.gz: 3b44c5fd8f3a0fad567fd4ff9064273ea86e86b5dec6ec283cc419fff7fad6a354571b4d7e77fafb59391fd913c0431f6764a00b895896aec9d1cc11ab1c8880
|
@@ -1,15 +1,14 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
- icon_svg: Icon SVG
|
3
|
+
- icon_default: Icon Default
|
4
|
+
- icon_rotate: Icon Rotate
|
5
|
+
- icon_flip: Icon Flip
|
6
|
+
- icon_animate: Icon Animation
|
7
|
+
- icon_pull: Icon Pull
|
8
|
+
- icon_border: Icon Border
|
9
|
+
- icon_sizes: Icon Sizes
|
10
|
+
- icon_custom: Icon Custom
|
11
|
+
- icon_fa_kit: Icon with FontAwesome Kit
|
13
12
|
|
14
13
|
react:
|
15
14
|
- icon_default: Icon Default
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<% if object.custom_icon %>
|
2
|
-
<%= object.
|
2
|
+
<%= object.render_svg(object.custom_icon) %>
|
3
3
|
<% elsif object.valid_emoji(object.icon) %>
|
4
4
|
<span class="pb_icon_kit_emoji"><%= object.icon.html_safe %></span>
|
5
5
|
<% else %>
|
6
6
|
<%= content_tag(:i, nil,
|
7
7
|
id: object.id,
|
8
8
|
data: object.data,
|
9
|
-
class: object.classname
|
9
|
+
class: object.classname
|
10
10
|
) %>
|
11
11
|
<%= content_tag(:span, nil,
|
12
12
|
aria: { label: "#{object.icon} icon" }.merge(object.aria),
|
13
13
|
hidden: true
|
14
14
|
) %>
|
15
|
-
<% end %>
|
15
|
+
<% end %>
|
@@ -90,25 +90,6 @@ module Playbook
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
def embedded_svg(icon_name)
|
94
|
-
svg_path = Rails.application.config.respond_to?(:icon_path) ? Rails.application.config.icon_path : "app/assets/images"
|
95
|
-
file_path = File.read(Rails.root.join(svg_path, "#{icon_name}.svg"))
|
96
|
-
|
97
|
-
doc = Nokogiri::HTML::DocumentFragment.parse file_path
|
98
|
-
svg = doc.at_css "svg"
|
99
|
-
|
100
|
-
doc.to_html.html_safe
|
101
|
-
|
102
|
-
size_factor = size.to_i
|
103
|
-
if size_factor > 1
|
104
|
-
pixel_size = size_factor * 16
|
105
|
-
svg["width"] = pixel_size.to_s
|
106
|
-
svg["height"] = pixel_size.to_s
|
107
|
-
end
|
108
|
-
|
109
|
-
raw doc
|
110
|
-
end
|
111
|
-
|
112
93
|
private
|
113
94
|
|
114
95
|
def border_class
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.37.0
|
4
|
+
version: 12.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
8
8
|
- Power Devs
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-08-
|
12
|
+
date: 2023-08-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1195,7 +1195,6 @@ files:
|
|
1195
1195
|
- app/pb_kits/playbook/pb_icon/docs/_icon_rotate.jsx
|
1196
1196
|
- app/pb_kits/playbook/pb_icon/docs/_icon_sizes.html.erb
|
1197
1197
|
- app/pb_kits/playbook/pb_icon/docs/_icon_sizes.jsx
|
1198
|
-
- app/pb_kits/playbook/pb_icon/docs/_icon_svg.html.erb
|
1199
1198
|
- app/pb_kits/playbook/pb_icon/docs/example.yml
|
1200
1199
|
- app/pb_kits/playbook/pb_icon/docs/index.js
|
1201
1200
|
- app/pb_kits/playbook/pb_icon/icon.html.erb
|
@@ -2589,7 +2588,7 @@ homepage: https://playbook.powerapp.cloud/
|
|
2589
2588
|
licenses:
|
2590
2589
|
- ISC
|
2591
2590
|
metadata: {}
|
2592
|
-
post_install_message:
|
2591
|
+
post_install_message:
|
2593
2592
|
rdoc_options: []
|
2594
2593
|
require_paths:
|
2595
2594
|
- lib
|
@@ -2600,12 +2599,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2600
2599
|
version: '0'
|
2601
2600
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2602
2601
|
requirements:
|
2603
|
-
- - "
|
2602
|
+
- - ">="
|
2604
2603
|
- !ruby/object:Gem::Version
|
2605
|
-
version:
|
2604
|
+
version: '0'
|
2606
2605
|
requirements: []
|
2607
2606
|
rubygems_version: 3.3.7
|
2608
|
-
signing_key:
|
2607
|
+
signing_key:
|
2609
2608
|
specification_version: 4
|
2610
2609
|
summary: Playbook Design System
|
2611
2610
|
test_files: []
|