tramway 2.0.2 → 2.0.3

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: c421d98b7d6e5ceac1042c02b4d96f0f4fb5fac9851660f4776af8d9a4f47ae1
4
- data.tar.gz: 707231fa0d49e2fa0e8e0d21679e2b7f30368285dd43cc9b09c0fa2b179e3f08
3
+ metadata.gz: 5565893c9153d2914e800609426fe0be62fe9c46163c80e4964cdf427c4178f4
4
+ data.tar.gz: 374172adbeaf55a926859c54c21ef78d2d9d56fbbe84af44544bd0a3cd1de5c3
5
5
  SHA512:
6
- metadata.gz: c4aa0f111d82f5005fdef3a7d0f57ec9f1cb8255a9fa01aeb376e598711ab86619449bbee9f73c047dd5038bdfabf26287a34f763da55cb099da2db0968f2ebf
7
- data.tar.gz: 2ff65fcefa12c47d50a5a1fdb83a04372faa8c036679df8ca7511703f8533f780f385d55ab6d4940870c2fe2b5c01df0f902a7f609b3a77515ec7c02035f2bf9
6
+ metadata.gz: 7061fae419485630e856be9422f9b495ecb6316f367c7341f019bb360782e13d4993e7324eedac1eed9f51b440a56b33cbb0bbc53f8f2955ef7d90312ae3bcdd
7
+ data.tar.gz: 02d84eabc379ea00eb75b2f6750dd928d5eabe088d71dfe5442598253e1afc1fa11bb2cf7a3cec789cc56f76daa3edde66c2eca559ba39d38a73faceb25bd919
data/README.md CHANGED
@@ -717,17 +717,17 @@ custom HTML options directly (e.g., `class:`, `data:`) and they will be merged i
717
717
 
718
718
  ```haml
719
719
  -# Haml example
720
- = tramway_flash text: flash[:notice], type: :success
721
- = tramway_flash text: 'Double check your data', type: :warning, class: 'mt-2', data: { turbo: 'false' }
720
+ = tramway_flash text: flash[:notice], type: :hope
721
+ = tramway_flash text: 'Double check your data', type: :greed, class: 'mt-2', data: { turbo: 'false' }
722
722
  ```
723
723
 
724
724
  ```erb
725
725
  <%# ERB example %>
726
- <%= tramway_flash text: flash[:alert], type: :danger %>
727
- <%= tramway_flash text: 'Saved!', type: :success, data: { controller: 'dismissible' } %>
726
+ <%= tramway_flash text: flash[:alert], type: :rage %>
727
+ <%= tramway_flash text: 'Saved!', type: :will, data: { controller: 'dismissible' } %>
728
728
  ```
729
729
 
730
- Use the `type` argument for semantic colors (`:success`, `:warning`, `:danger`, and more) or provide a `color:` keyword to set
730
+ Use the `type` argument is compatible to [Lantern Color Palette](https://github.com/TrinityMonsters/tramway/blob/main/README.md#lantern-color-palette) or provide a `color:` keyword to set
731
731
  the Tailwind color family explicitly.
732
732
 
733
733
  ### Tramway Table Component
@@ -817,19 +817,7 @@ Tramway ships with helpers for common UI patterns built on top of Tailwind compo
817
817
  options: { data: { controller: 'submit-once' } } %>
818
818
  ```
819
819
 
820
- The `type` option maps semantic intent to Tailwind color families. The full set of supported values is:
821
-
822
- | Type | Color |
823
- | ---- | ----- |
824
- | `default`, `life` | Gray |
825
- | `primary`, `hope` | Blue |
826
- | `secondary` | Zinc |
827
- | `success`, `will` | Green |
828
- | `warning`, `greed` | Orange |
829
- | `danger`, `rage` | Red |
830
- | `love` | Violet |
831
- | `compassion` | Indigo |
832
- | `fear` | Yellow |
820
+ The `type` option maps semantic intent to [Lantern Color Palette](https://github.com/TrinityMonsters/tramway/blob/main/README.md#lantern-color-palette).
833
821
 
834
822
  If none of the predefined semantic types fit your needs, you can supply a Tailwind color family directly using the `color`
835
823
  option—for example: `color: :gray`. When you pass a custom color ensure the corresponding utility classes exist in your
@@ -1050,6 +1038,20 @@ Tramway.configure do |config|
1050
1038
  end
1051
1039
  ```
1052
1040
 
1041
+ ## Lantern Color Palette
1042
+
1043
+ | Type | Color |
1044
+ | ---- | ----- |
1045
+ | `default`, `life` | Gray |
1046
+ | `primary`, `hope` | Blue |
1047
+ | `secondary` | Zinc |
1048
+ | `success`, `will` | Green |
1049
+ | `warning`, `greed` | Orange |
1050
+ | `danger`, `rage` | Red |
1051
+ | `love` | Violet |
1052
+ | `compassion` | Indigo |
1053
+ | `fear` | Yellow |
1054
+
1053
1055
  ## Articles
1054
1056
  * [Tramway on Rails](https://kalashnikovisme.medium.com/tramway-on-rails-32158c35ed68)
1055
1057
  * [Tramway is the way to deal with little things for Rails developers](https://medium.com/@kalashnikovisme/tramway-is-the-way-to-deal-with-little-things-for-rails-developers-4f502172a18c)
@@ -1057,6 +1059,7 @@ end
1057
1059
  * [Behave as ActiveRecord. Why do we want objects to be AR lookalikes?](https://kalashnikovisme.medium.com/behave-as-activerecord-why-do-we-want-objects-to-be-ar-lookalikes-d494d692e1d3)
1058
1060
  * [Decorating associations in Rails with Tramway](https://kalashnikovisme.medium.com/decorating-associations-in-rails-with-tramway-b46a28392f9e)
1059
1061
  * [Easy-to-use Tailwind-styled multi-select built with Stimulus](https://medium.com/@kalashnikovisme/easy-to-use-tailwind-styled-multi-select-built-with-stimulus-b3daa9e307aa)
1062
+ * [Lantern Color Palette]([https://github.com/TrinityMonsters/tramway/blob/main/README.md#lantern-color-palette](https://kalashnikovisme.medium.com/lantern-buttons-in-rails-ff61688fd8e3?postPublishedType=repub))
1060
1063
 
1061
1064
  ## Contributing
1062
1065
 
@@ -31,8 +31,8 @@ module Tailwinds
31
31
 
32
32
  def default_classes
33
33
  [
34
- 'btn', 'btn-primary', 'font-bold', 'rounded-sm', 'flex', 'flex-row', 'whitespace-nowrap', size_classes.to_s,
35
- options[:class].to_s
34
+ 'btn', 'btn-primary', 'flex', 'flex-row', 'font-bold', 'rounded-sm', 'flex', 'flex-row', 'whitespace-nowrap',
35
+ 'items-center', 'space-x-1', size_classes.to_s, options[:class].to_s
36
36
  ]
37
37
  end
38
38
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '2.0.2'
4
+ VERSION = '2.0.3'
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: 2.0.2
4
+ version: 2.0.3
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-12-10 00:00:00.000000000 Z
12
+ date: 2025-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: anyway_config