tybo 0.3.11 → 0.3.13

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: 1e4984fe8dcf954e66f03bd8f96a381a036d8a3e3f68b650f5e52e6fafad0724
4
- data.tar.gz: 0a3c2126fcee04b9a578c41bc6aefcd32894ef04477424ff912c9d3a36318f46
3
+ metadata.gz: a8c51aacabad77126c940b704dc844e6f9288195f3ebbf4f7d520cebad4d903d
4
+ data.tar.gz: 6005f09dcfca2f82988eda0505231dbe11840b7d2130c626002ec71fa56a97c6
5
5
  SHA512:
6
- metadata.gz: ede63dde30c6701f7e2590924e55514751e2d57cdb9eee9a8f19e38233ed5f973bef34e1635e2c6954276eb3cd71cdd68fbc46530da042c4647d1fafc34b8e3f
7
- data.tar.gz: 7bab3acbf3f7d25f1afb3e2862a6dadecc04a354e0d468f8350f53b4b8cd229675d0b86d7f447efc8e19c30e004b25971c5fcd5c56af97106f229c5940041ee8
6
+ metadata.gz: 5498bb0066dc84ba321db87e2db4687a7246b89e0dce6cc5dfdda57248d9b2aa927569a98bddca3d6af21f12ded71857a4156ee81be7fb9b55cf70ec33e63192
7
+ data.tar.gz: 7b24a8d9dc4a9d585a100d3f79085dc3bbfce72271bf38ca957b88abddbe389c5a829b6cf3241a23fb99b408140ad68c95605f7c4b36fd00880e240d80d15d7c
@@ -1,4 +1,4 @@
1
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
1
+ <div class="px-4 mx-auto max-w-7xl sm:px-6 lg:px-8">
2
2
  <div class="max-w-2xl mx-auto ">
3
3
 
4
4
  <% if breadcrumb? %>
@@ -29,7 +29,7 @@
29
29
  </div>
30
30
  <% end %>
31
31
 
32
- <div class="px-4 bg-white sm:p-6 shadow sm:rounded-md">
32
+ <div class="px-4 bg-white shadow sm:p-6 sm:rounded-md">
33
33
  <%= content %>
34
34
  </div>
35
35
  </div>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="flex-shrink-0 w-6 h-6 mr-3 text-white text-sidebar-50">
2
+ <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z" />
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Icons
4
+ class CategoriesComponent < ViewComponent::Base
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 cursor-grabbing <%= @text_color %>">
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 cursor-grabbing <%= @text_color %>">
2
2
  <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 5.25h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5" />
3
3
  </svg>
@@ -1,3 +1,3 @@
1
1
  <td class="py-4 pl-4 pr-3 text-sm font-medium text-gray-900 whitespace-nowrap">
2
- <%= strip_tags(content).truncate(60) %>
2
+ <%= strip_tags(content) == content ? content&.truncate(60) : content %>
3
3
  </td>
@@ -0,0 +1,3 @@
1
+ <div class="mx-1 text-xs inline-flex items-center font-bold leading-sm px-3 py-1 bg-<%= @color %>-200 text-<%= @color %>-700 rounded-full">
2
+ <%= @label %>
3
+ </div>
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tag
4
+ class CategoryComponent < ViewComponent::Base
5
+ def initialize(label:, color: 'indigo')
6
+ @label = label
7
+ @color = color
8
+ end
9
+ end
10
+ end
@@ -3,6 +3,8 @@
3
3
  <%- bo_model.column_names.each do |column| -%>
4
4
  <%%= thead.with_active_record_th(column_name: '<%= column %>', ransack_object: @q) %>
5
5
  <%- end -%>
6
+ <%%= thead.with_active_record_th(column_name: '', ransack_object: @q) %>
7
+ <%%= thead.with_active_record_th(column_name: '', ransack_object: @q) %>
6
8
  <%% end %>
7
9
 
8
10
  <%% table.with_tbody do |tbody| %>
data/lib/tybo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tybo
2
- VERSION = '0.3.11'
2
+ VERSION = '0.3.13'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tybo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Delpierre
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-11-30 00:00:00.000000000 Z
12
+ date: 2023-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -151,6 +151,8 @@ files:
151
151
  - app/components/forms/subtitle_component.rb
152
152
  - app/components/forms/title_component.html.erb
153
153
  - app/components/forms/title_component.rb
154
+ - app/components/icons/categories_component.html.erb
155
+ - app/components/icons/categories_component.rb
154
156
  - app/components/icons/collection_component.html.erb
155
157
  - app/components/icons/collection_component.rb
156
158
  - app/components/icons/dashboard_component.html.erb
@@ -205,6 +207,8 @@ files:
205
207
  - app/components/tables/thead_component.rb
206
208
  - app/components/tables/tr_component.html.erb
207
209
  - app/components/tables/tr_component.rb
210
+ - app/components/tag/category_component.html.erb
211
+ - app/components/tag/category_component.rb
208
212
  - app/controllers/tybo/application_controller.rb
209
213
  - app/controllers/tybo/login_controller.rb
210
214
  - app/helpers/tybo/application_helper.rb