playbook_ui 12.37.0.pre.alpha.svgiconmethods1064 → 12.37.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: 14c36bf2dc83555d191d529d857f9be98bed92ff0165962b37676c269dee8c44
4
- data.tar.gz: 36997b2084a332b87ef58515b6a3263e633c2e9f873bb754ad71282a2babef31
3
+ metadata.gz: 92ab5b99e6bc4d33881e4087db34763fd0d818607d0412cbe5305e9a376c6c31
4
+ data.tar.gz: 0ed7902b4ebff49a4dbc5dd60e7e6411311ab7fdee3bf0812501a6d2fe63a0f5
5
5
  SHA512:
6
- metadata.gz: 96695e4ab6365e311252d3b7b02971bbcb418b1bae241f7d23cdeef069d469ccf01db4739ae41c8f1b3db91b939d1851f0be4301e789988add39902acc538c64
7
- data.tar.gz: 1b88816484853815d500c9629c80e36970d7c238be5b017d88ed2f761e81525b4073e0c55135dfbfeacc385fc653fdb593eb7f9ff70ad17d44edfc09a1be1ff2
6
+ metadata.gz: 40657ad869c7a5ca5aa6494a5d4ef300f1e00aa30fe8f4fac97402b4fe169f46dbccdf166fa926a91543c6751b410471dcb1ad0add23601b99e71758204f3cd2
7
+ data.tar.gz: 3b44c5fd8f3a0fad567fd4ff9064273ea86e86b5dec6ec283cc419fff7fad6a354571b4d7e77fafb59391fd913c0431f6764a00b895896aec9d1cc11ab1c8880
@@ -1,4 +1,3 @@
1
1
  <p><%= pb_rails("icon", props: { icon: "spinner", spin: true, fixed_width: true, size: "2x" }) %> <span>Spin</span></p>
2
2
  <br/>
3
3
  <p><%= pb_rails("icon", props: { icon: "spinner", pulse: true, fixed_width: true, size: "2x" }) %> <span>Pulse</span></p>
4
-
@@ -14,5 +14,3 @@
14
14
  parent element's css color properties."
15
15
  } ) %>
16
16
  </div>
17
-
18
-
@@ -1,15 +1,14 @@
1
1
  examples:
2
2
  rails:
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
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.embedded_svg(object.custom_icon) %>
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "12.37.0"
5
- VERSION = "12.37.0.pre.alpha.svgiconmethods1064"
4
+ PREVIOUS_VERSION = "12.36.0"
5
+ VERSION = "12.37.0"
6
6
  end
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.pre.alpha.svgiconmethods1064
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-11 00:00:00.000000000 Z
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: 1.3.1
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: []
@@ -1,5 +0,0 @@
1
- <%= pb_rails("icon", props: { size: "5x", custom_icon: "copilot", padding_left: "xl" } ) %>
2
- <%= pb_rails("icon", props: { size: "5x", custom_icon: "squirrel", padding_left: "xl" } ) %>
3
-
4
-
5
-