phlexy_ui 0.1.13 → 0.1.14

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: 05cc7d7b0f5ca858eaef1fdb41520f94eb2fc518d3eecb8512b3ca9f66cde412
4
- data.tar.gz: 3dbb3b78459c7b44700a4f49a314ec1d6974d96f47bcd110559f905a399b04d0
3
+ metadata.gz: 17d8f82d3306795ae9dbd48419c9e4a29f17b3aac473ab48d479becd00333f67
4
+ data.tar.gz: 0c6a955c43d25f238d879041ce078492b2c696d2fb972a94fb98505a03cdf261
5
5
  SHA512:
6
- metadata.gz: 949a7237e3f8ea09d3ffbbc151043350fc359be2cab2df9a602cb7df157b004d6626a38e4724664902ee22c94bbc02d41fea9679db81ebe4c7f96b72d0f95868
7
- data.tar.gz: b926813ecc2a3561a199213d5592c5e659344324cc6014f06d89e78218507a5403541ced957c4d36d28d9845a6d85550f78802ff303042ff1ad54f3c4bcb6fce
6
+ metadata.gz: 526e769e706e4a02067a53807954dfad246ccbf0da949f3381d99a4ccdd8b089b8be5522f763a4eb1a89acf7b704aae1961d307a288952f088587182d8dcd5d2
7
+ data.tar.gz: e980c98da1d7fe27883c72c9eff15efe8e1759054f79f9afce72cb64dacc2a5a22f049da5914d98538222dc3564068ad4770eb97d43505063ac24ed0550e8bbf
@@ -20,9 +20,25 @@ module PhlexyUI
20
20
  style = options.delete(:style)
21
21
 
22
22
  if style.nil?
23
- style = "--value: #{value}; --size: #{size}; --thickness: #{thickness};"
23
+ style = "--value: #{value};"
24
+
25
+ if size && !size.empty?
26
+ style += " --size: #{size};"
27
+ end
28
+
29
+ if thickness && !thickness.empty?
30
+ style += " --thickness: #{thickness};"
31
+ end
24
32
  elsif style.is_a?(String)
25
- style = "#{style} --value: #{value}; --size: #{size}; --thickness: #{thickness};"
33
+ style = "#{style} --value: #{value};"
34
+
35
+ if size && !size.empty?
36
+ style += " --size: #{size};"
37
+ end
38
+
39
+ if thickness && !thickness.empty?
40
+ style += " --thickness: #{thickness};"
41
+ end
26
42
  end
27
43
 
28
44
  public_send(as, role: :progressbar, class: classes, style:, **options, &)
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PhlexyUI
4
+ class Skeleton < Base
5
+ def initialize(*, as: :div, **)
6
+ super(*, **)
7
+ @as = as
8
+ end
9
+
10
+ def view_template(&)
11
+ generate_classes!(
12
+ component_html_class: :skeleton,
13
+ modifiers_map: modifiers,
14
+ base_modifiers:,
15
+ options:
16
+ ).then do |classes|
17
+ public_send(as, class: classes, **options, &)
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ register_modifiers({})
24
+ end
25
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PhlexyUI
4
- VERSION = "0.1.13"
4
+ VERSION = "0.1.14"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlexy_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Alejandro Aguilar Ramos
@@ -117,6 +117,7 @@ files:
117
117
  - lib/phlexy_ui/modal.rb
118
118
  - lib/phlexy_ui/navbar.rb
119
119
  - lib/phlexy_ui/radial_progress.rb
120
+ - lib/phlexy_ui/skeleton.rb
120
121
  - lib/phlexy_ui/sub_menu.rb
121
122
  - lib/phlexy_ui/tab.rb
122
123
  - lib/phlexy_ui/tab_with_content.rb