tramway 1.1.1.1 → 1.1.1.2

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: d030fadb4001f3f0b6f7d0f357bd51600fa7d215fc33e7b04c4b2425e107cd85
4
- data.tar.gz: b17e4b7498a18dc9521645db93cd506a4f0d835bc34d933142d292efd0fb3603
3
+ metadata.gz: ff6be5af7046f8107ab09309cec19ae847918386ada74006339c0130d1c2cdcc
4
+ data.tar.gz: a22ac41c8bf93f817b8766f26c5f056d1fd98973d22f3eee0c7d88d2553564b3
5
5
  SHA512:
6
- metadata.gz: 1c37c218ca13fc270e0d37cb37aeaf21c074724c75e1c2aa2a294c67e0e9ba59a16c0f6fd4f6711a092f07530e13c354bccd0d56c13064db5941f8accd88418f
7
- data.tar.gz: 19816173a9590f08e477840a2cb2f822dabdbd8a2f9ef9f3304f9e5c02cbb01ce2fbdefd0b10a18bdf44cd97b0f4df68db8414bae374213a598e413a6d308323
6
+ metadata.gz: 4a315c6ad6d2af7210e6595030abf43ee149fc1f1308b193b51be7058267d262c5d74e9921cc64ba6f587e5c03c5fb627b05fbf1c5767477ea01abbab3988cb0
7
+ data.tar.gz: 40703b4481eabdd0311c09dda42f430f19de1e0e7a57347b698c5e990eeddebcc1d9d582b473ac2088b4f02bc160ebe55ae4f5a53fe64ea4bdeea6fcb40493f0
data/README.md CHANGED
@@ -819,6 +819,14 @@ Tramway ships with helpers for common UI patterns built on top of Tailwind compo
819
819
  <%= tramway_button path: user_path(user), text: 'View profile', color: :emerald, data: { turbo: false } %>
820
820
  ```
821
821
 
822
+ * `tramway_badge` renders a Tailwind-styled badge with the provided `text`. Pass a semantic `type` (for example, `:success` or
823
+ `:danger`) to use the built-in color mappings, or supply a custom Tailwind color family with `color:`. When you opt into a
824
+ custom color, ensure the corresponding background utilities are available in your Tailwind safelist.
825
+
826
+ ```erb
827
+ <%= tramway_badge text: 'Active', type: :success %>
828
+ ```
829
+
822
830
  * `tramway_back_button` renders a standardized "Back" link.
823
831
 
824
832
  ```erb
@@ -1,2 +1,2 @@
1
- .div-table-cell.px-6.py-4.font-medium.text-gray-900.dark:text-white.text-xs.sm:text-base
1
+ .div-table-cell.md:block.first:block.hidden.px-6.py-4.font-medium.text-gray-900.dark:text-white.text-base
2
2
  = content
@@ -1,7 +1,7 @@
1
- .div-table-row.grid.text-white.text-small.gap-4.bg-purple-700.dark:bg-gray-700.dark:text-gray-400{ class: "grid-cols-#{columns_count}", aria: { label: "Table Header" }, role: "row" }
1
+ .div-table-row.grid.text-white.text-small.gap-4.bg-purple-700.dark:bg-gray-700.dark:text-gray-400.grid-cols-1{ class: "md:grid-cols-#{columns_count}", aria: { label: "Table Header" }, role: "row" }
2
2
  - if headers.any?
3
3
  - headers.each do |header|
4
- .div-table-cell.py-4.px-6
4
+ .div-table-cell.py-4.px-6.first:block.hidden.md:block
5
5
  = header
6
6
  - else
7
7
  = content
@@ -25,7 +25,7 @@ module Tailwinds
25
25
  def desktop_row_classes(cells_count)
26
26
  [
27
27
  'div-table-row', 'grid', 'gap-4', 'bg-white', 'border-b', 'last:border-b-0', 'dark:bg-gray-800',
28
- 'dark:border-gray-700', "grid-cols-#{cells_count}"
28
+ 'dark:border-gray-700', "md:grid-cols-#{cells_count}", 'grid-cols-1'
29
29
  ].join(' ')
30
30
  end
31
31
 
@@ -1,5 +1,6 @@
1
1
  = helpers.component 'tailwinds/table/row/preview'
2
2
 
3
3
  - width_class = options[:class]&.include?('w-') ? '' : 'w-full'
4
+
4
5
  .div-table.text-left.rtl:text-right.text-gray-500.dark:text-gray-400{ class: "#{options[:class]} #{width_class}", **options.except(:class) }
5
6
  = content
@@ -11,6 +11,8 @@ module.exports = {
11
11
  'div-table-cell',
12
12
  'sm:text-base',
13
13
  'last:border-b-0',
14
+ 'md:block',
15
+ 'first:block',
14
16
 
15
17
  // === Visibility and typography helpers ===
16
18
  'hidden',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '1.1.1.1'
4
+ VERSION = '1.1.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1.1
4
+ version: 1.1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-11-27 00:00:00.000000000 Z
12
+ date: 2025-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: anyway_config