phlexy_ui 0.1.12 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15833ec8eb9cd9c00452ea80591bba425ffdecc6d0013c437aa3f8a940e9fe03
4
- data.tar.gz: 00aeee09acce4fca859f4e0da44faf57fe4ea8535d2d02853f2c4e2b6e7c3e7a
3
+ metadata.gz: 17d8f82d3306795ae9dbd48419c9e4a29f17b3aac473ab48d479becd00333f67
4
+ data.tar.gz: 0c6a955c43d25f238d879041ce078492b2c696d2fb972a94fb98505a03cdf261
5
5
  SHA512:
6
- metadata.gz: 0cfdd30af5edce344e54ea410dbea263e45e0e7f3b4f336b1d5efc25141bb02235597d6d20ddbe4b3e935a7d9f987c3fefad733a8facf65d6e9bbde2ba692afb
7
- data.tar.gz: 7ade2f88c64c129d15464459d2ce342fe6e0f2917dd2573990ab60ad614bf21380d8db2576bdd2443a8b045fdaf1d1fe69d83208823efd1f6e8dcc1f6bbca9e3
6
+ metadata.gz: 526e769e706e4a02067a53807954dfad246ccbf0da949f3381d99a4ccdd8b089b8be5522f763a4eb1a89acf7b704aae1961d307a288952f088587182d8dcd5d2
7
+ data.tar.gz: e980c98da1d7fe27883c72c9eff15efe8e1759054f79f9afce72cb64dacc2a5a22f049da5914d98538222dc3564068ad4770eb97d43505063ac24ed0550e8bbf
@@ -24,6 +24,7 @@ module PhlexyUI
24
24
 
25
25
  def modifiers
26
26
  {
27
+ skeleton: :skeleton,
27
28
  **self.class.modifiers,
28
29
  **PhlexyUI.configuration.modifiers.for(component: self.class),
29
30
  **PhlexyUI.configuration.modifiers.for(component: nil)
@@ -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.12"
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.12
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