railwind 0.1.24 → 0.1.25

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: 68bd072f892742af3a7e2313012e976533bd3d73fc64a84705369bb1c2290a80
4
- data.tar.gz: 00a5509d85e52917a851be910c1df081583274cf35537120f610a6c8be6a90c0
3
+ metadata.gz: 85f1ad6b80de9ce7f54fa24193750d0eaa04ba4d45c770e21621146883ba3594
4
+ data.tar.gz: bc108d03b6be068224ed227bc4160589b022957744e3afd2294b26b2cee2cacc
5
5
  SHA512:
6
- metadata.gz: f85b2bf9b9ce851bba143c60377e017088a7eec6ebda1d41c92c566fafd9a2513adb42ecc2b83561b94a53048e911a0f9d3a3dce504785d7b30239773d6927f1
7
- data.tar.gz: 933d488b41a43b06bfe53f79138b0c4f2c48c0d62a1b8d627152eed38368637af613952e5b4c26e162d8801fe8108dc4ad51d00e05a8ca27a24c8be9472ba805
6
+ metadata.gz: ff81827ad27518d6982ede30e184e40b9376fa13dda8ecdb5a19d706b61ca993cd1e7c6973d5675634984168ca0bbe5ee02195ac31a512149ab9fa2488b92039
7
+ data.tar.gz: 8cbdeb310acbd900cb88c40712631e1d0a0623d4cc1171d08a4a8188577a99fa7389c87c1735ab3839ef2a4ce2507b65b2617bf59a4e59afc50e78843e1f4536
@@ -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
@@ -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.24"
4
+ VERSION = "0.1.25"
5
5
  end
data/lib/railwind.rb CHANGED
@@ -1,11 +1,12 @@
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"
7
9
  require_relative "railwind/generators/callout_generator"
8
- require_relative "railwind/generators/progress_generator"
9
10
 
10
11
  module Railwind
11
12
  class Error < StandardError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railwind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Bryant
@@ -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