railwind 0.1.23 → 0.1.25

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: db5ccd80f2a24cec982ac3275e008927303e0e2b36c3cda6bc196ff59605b3de
4
- data.tar.gz: 831847785839c6944f4ac0cf1f3f56a0d7e94552b6455defbfcc67c455e13cc7
3
+ metadata.gz: 85f1ad6b80de9ce7f54fa24193750d0eaa04ba4d45c770e21621146883ba3594
4
+ data.tar.gz: bc108d03b6be068224ed227bc4160589b022957744e3afd2294b26b2cee2cacc
5
5
  SHA512:
6
- metadata.gz: 5b0884e3517c1c2f0660d6eb6687de37206b8febe2a1af957a22e11fc5e19593c5db0a473240e605facba16c1bee76f30ba504a4a4c440a6ae61c60bc26cd84f
7
- data.tar.gz: c2cb347554d3e7c684c0be6caff7e8b555a8285ffa9d4c0c2d9bb3f4e98073a7c0e60f3f1072fecb33bc4ea8071d493ea229f11ce16a64309909d95146c61507
6
+ metadata.gz: ff81827ad27518d6982ede30e184e40b9376fa13dda8ecdb5a19d706b61ca993cd1e7c6973d5675634984168ca0bbe5ee02195ac31a512149ab9fa2488b92039
7
+ data.tar.gz: 8cbdeb310acbd900cb88c40712631e1d0a0623d4cc1171d08a4a8188577a99fa7389c87c1735ab3839ef2a4ce2507b65b2617bf59a4e59afc50e78843e1f4536
@@ -9,4 +9,6 @@ module Railwind
9
9
  copy_file "button/_button_component.html.erb", "app/components/button_component.html.erb"
10
10
  end
11
11
  end
12
- end
12
+ end
13
+
14
+
@@ -0,0 +1,12 @@
1
+ require 'rails/generators'
2
+
3
+ module Railwind
4
+ class ProgressGenerator < Rails::Generators::Base
5
+ source_root File.expand_path('templates', __dir__)
6
+
7
+ def create_component_file
8
+ copy_file "progress/progress_component.rb", "app/components/progress_component.rb"
9
+ copy_file "progress/_progress_component.html.erb", "app/components/progress_component.html.erb"
10
+ end
11
+ end
12
+ end
@@ -19,5 +19,5 @@ tailwind_classes = "#{base_classes} #{variant_classes}" %>
19
19
 
20
20
  <button type="<%= @type %>" class="<%= tailwind_classes %>">
21
21
  <%= content %>
22
- <%= @text %>
22
+ <%= @text %>">
23
23
  </button>
@@ -0,0 +1,17 @@
1
+ <div class="relative w-full">
2
+ <div class="flex mb-2 items-center justify-between">
3
+ <div>
4
+ <span class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded-full text-zinc-600 bg-zinc-200">
5
+ <%= @label %>
6
+ </span>
7
+ </div>
8
+ <div class="text-right">
9
+ <span class="text-xs font-semibold inline-block text-zinc-600"><%= @value %>%</span>
10
+ </div>
11
+ </div>
12
+ <div class="overflow-hidden h-2 mb-4 text-xs flex rounded bg-zinc-200">
13
+ <div
14
+ class="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-zinc-600"
15
+ style="width: <%= @value %>%" ></div>
16
+ </div>
17
+ </div>
@@ -0,0 +1,6 @@
1
+ class ProgressComponent < ViewComponent::Base
2
+ def initialize(label:, value:)
3
+ @label = label
4
+ @value = value
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Railwind
4
- VERSION = "0.1.23"
4
+ VERSION = "0.1.25"
5
5
  end
data/lib/railwind.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "railwind/version"
4
+
5
+ require_relative "railwind/generators/progress_generator"
4
6
  require_relative "railwind/generators/button_generator"
5
7
  require_relative "railwind/generators/card_generator"
6
8
  require_relative "railwind/generators/tab_generator"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railwind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Bryant
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-01 00:00:00.000000000 Z
11
+ date: 2023-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -57,6 +57,7 @@ files:
57
57
  - lib/railwind/generators/button_generator.rb
58
58
  - lib/railwind/generators/callout_generator.rb
59
59
  - lib/railwind/generators/card_generator.rb
60
+ - lib/railwind/generators/progress_generator.rb
60
61
  - lib/railwind/generators/tab_generator.rb
61
62
  - lib/railwind/generators/templates/button/_button_component.html.erb
62
63
  - lib/railwind/generators/templates/button/button_component.rb
@@ -64,6 +65,8 @@ files:
64
65
  - lib/railwind/generators/templates/callout/callout_component.rb
65
66
  - lib/railwind/generators/templates/card/_card_component.html.erb
66
67
  - lib/railwind/generators/templates/card/card_component.rb
68
+ - lib/railwind/generators/templates/progress/_progress_component.html.erb
69
+ - lib/railwind/generators/templates/progress/progress_component.rb
67
70
  - lib/railwind/generators/templates/tabs/_tab_component.html.erb
68
71
  - lib/railwind/generators/templates/tabs/tab_component.rb
69
72
  - lib/railwind/generators/templates/tabs/tabs_controller.js