tramway 3.1.2.3 → 3.1.2.4

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: 4ba325b50a3330d5dba36031bac32fb842160b4b9310a58441014a1a1b27688a
4
- data.tar.gz: 8d520c1c588ad3d4b163ef76315162ac47c61bce415d40565f7164ebccf151c6
3
+ metadata.gz: f525c9fd76a1edc7050318ead14629ddf7c4be7d9d53dcc14b61ee04b5563d18
4
+ data.tar.gz: 486e418f27e02dae869e2ef625167998e737e0f9ff2a49fa47caa46fe1fc9d74
5
5
  SHA512:
6
- metadata.gz: a5c8f31d74b68563f146fab8cb904044e5f33043f9ba58b9d744c3fa602d90dc65813bcb57de003abb9c9135e3b01a9a9a007a31b340be630596e6572b2edfdc
7
- data.tar.gz: f35a743cc8175ef41354cbfed89cd2d9f3940274ac32ac34a3c3aed76ec3a4bfda532f984e87ba655e08399198d7675862354c88835b05c6194c3cad2e54ca30
6
+ metadata.gz: 04111aad9852f77817a6f01f2b9e96f20ed6ffa24ba70f0a9bd9c12f08060aee26d9deba7fedd437fcedae1b7cb27782df2e82da5c629a090993443a05bb5f47
7
+ data.tar.gz: 53117c53d931e58338947378b8c0de7cbb8b92d9b66ee7c918e56bea5a3c7d4dff7e62ebb310f1b1b57013a820f3a81dfc046fa89f39fffbe2553e9ccc042aa0
data/README.md CHANGED
@@ -12,7 +12,7 @@ Codex instruction that points agents to the Tramway skill for Tramway-native cod
12
12
  * [Installation](https://github.com/Purple-Magic/tramway#installation)
13
13
  * [Getting Started](https://github.com/Purple-Magic/tramway?tab=readme-ov-file#getting-started)
14
14
  * [Usage](https://github.com/Purple-Magic/tramway#usage)
15
- * [Tramway Entities](https://github.com/Purple-Magic/tramway#tramway-entities)
15
+ * [Tramway CRUD](https://github.com/Purple-Magic/tramway#tramway-crud)
16
16
  * [Tramway Decorators](https://github.com/Purple-Magic/tramway#tramway-decorators)
17
17
  * [Tramway Form](https://github.com/Purple-Magic/tramway#tramway-form)
18
18
  * [Tramway Navbar](https://github.com/Purple-Magic/tramway#tramway-navbar)
@@ -132,7 +132,7 @@ Open [http://localhost:3000/users](http://localhost:3000/users)
132
132
  ## Usage
133
133
 
134
134
 
135
- ### Tramway Entities
135
+ ### Tramway CRUD
136
136
 
137
137
  Tramway is an entity-based framework. **Entity** is the class on whose objects actions be applied: _index, show, create, update, and destroy_. Tramway will support numerous classes as entities. For now, Entity could be only **ActiveRecord::Base** class.
138
138
 
@@ -145,7 +145,7 @@ Tramway.configure do |config|
145
145
  end
146
146
  ```
147
147
 
148
- By default, links to the Tramway Entities index page are rendered in [Tramway Navbar](https://github.com/Purple-Magic/tramway#tramway-navbar).
148
+ By default, links to the Tramway CRUD index page are rendered in [Tramway Navbar](https://github.com/Purple-Magic/tramway#tramway-navbar).
149
149
 
150
150
  #### Define entities with options
151
151
 
@@ -819,10 +819,10 @@ title_link: Link on Tramway Navbar title. Default: '/'
819
819
  background:
820
820
  color: Css-color. Supports all named CSS colors and HEX colors
821
821
  intensity: Color intensity. Range: **100..950**. Used by Tailwind. Not supported in case of using HEX color in the background.color
822
- with_entities: Show Tramway Entities index page links to navbar. Default: true
822
+ with_entities: Show Tramway CRUD index page links to navbar. Default: true
823
823
  ```
824
824
 
825
- **NOTE:** `tramway_navbar` method called without arguments and block of code will render only [Tramway Entities](https://github.com/Purple-Magic/tramway#tramway-entities) links on the left.
825
+ **NOTE:** `tramway_navbar` method called without arguments and block of code will render only [Tramway CRUD](https://github.com/Purple-Magic/tramway#tramway-crud) links on the left.
826
826
 
827
827
  In case you want to hide entity links you can pass `with_entities: false`.
828
828
 
@@ -113,7 +113,7 @@ module Tramway
113
113
  Tramway::ButtonComponent.new(
114
114
  text: action,
115
115
  size: form_size,
116
- type: :default,
116
+ type: :will,
117
117
  options: sanitized_options.merge(name: :commit, type: :submit)
118
118
  ),
119
119
  &
@@ -6,8 +6,8 @@ module Tramway
6
6
  #
7
7
  class ItemComponent < TailwindComponent
8
8
  def style
9
- @style ||= 'inline-flex items-center rounded-md px-3 py-2 text-sm font-medium text-zinc-100 ' \
10
- 'transition-colors hover:bg-zinc-800 hover:text-zinc-50'
9
+ @style ||= 'inline-flex items-center rounded-md px-4 py-3 text-base font-medium text-zinc-100 ' \
10
+ 'transition-colors hover:bg-zinc-800 hover:text-zinc-50 sm:px-3 sm:py-2 sm:text-sm'
11
11
  end
12
12
  end
13
13
  end
@@ -21,18 +21,21 @@
21
21
  = item
22
22
 
23
23
  #mobile-menu{ class: mobile_menu_classes }
24
- - if @left_items.present?
25
- %ul.flex.flex-col.space-y-1.pt-4
26
- - @left_items.each do |item|
27
- = item
28
-
29
- - if @right_items.present?
30
- %ul.flex.flex-col.space-y-1.pt-4
31
- - @right_items.each do |item|
32
- = item
33
-
34
- %button.absolute.top-4.right-4.inline-flex.items-center.justify-center.rounded-md.p-2.text-zinc-50.transition-colors.hover:bg-zinc-800.hover:text-zinc-50.focus:outline-none.focus-visible:ring-2.focus-visible:ring-zinc-400.focus-visible:ring-offset-2.focus-visible:ring-offset-zinc-950#mobile-menu-close-button{ role: :button }
35
-
24
+ .flex.flex-1.flex-col
25
+ .flex-1
26
+ - if @left_items.present?
27
+ %ul.flex.flex-col.space-y-1.pt-4
28
+ - @left_items.each do |item|
29
+ = item
30
+
31
+ - if @right_items.present?
32
+ %ul.flex.flex-col.space-y-1.pt-4
33
+ - @right_items.each do |item|
34
+ = item
35
+
36
+ .pt-6
37
+ %button.w-full.inline-flex.items-center.justify-center.rounded-md.border.border-zinc-700.bg-zinc-900.px-4.py-3.text-sm.font-semibold.text-zinc-50.transition-colors.hover:bg-zinc-800.hover:text-zinc-50.focus:outline-none.focus-visible:ring-2.focus-visible:ring-zinc-400.focus-visible:ring-offset-2.focus-visible:ring-offset-zinc-950#mobile-menu-close-button{ role: :button }
38
+ Close
36
39
 
37
40
  :javascript
38
41
  (() => {
@@ -14,8 +14,8 @@ module Tramway
14
14
  ].freeze
15
15
 
16
16
  MOBILE_MENU_CLASSES = %w[
17
- fixed inset-0 z-50 hidden h-screen w-screen flex-col border-r border-zinc-800 bg-zinc-950 px-4 py-6 shadow-lg
18
- transition-transform transform -translate-x-full duration-300 ease-in-out pt-16
17
+ fixed inset-0 z-50 hidden h-screen w-screen flex flex-col border-r border-zinc-800 bg-zinc-950 px-4 py-6 shadow-lg
18
+ transition-transform transform -translate-x-full duration-300 ease-in-out pt-16 justify-between
19
19
  ].freeze
20
20
 
21
21
  def initialize(**options)
@@ -21,4 +21,4 @@
21
21
  = f.submit t('tramway.actions.save')
22
22
  = tramway_button text: t('tramway.actions.cancel'),
23
23
  path: public_send(@entity.index_helper_method),
24
- type: :inverse
24
+ type: :compassion
@@ -57,6 +57,7 @@ module.exports = {
57
57
  'w-fit',
58
58
  'text-base',
59
59
  'text-sm',
60
+ 'text-lg',
60
61
  'rounded-md',
61
62
  'rounded-sm',
62
63
  'border-b',
@@ -69,7 +70,9 @@ module.exports = {
69
70
  'grid-cols-1',
70
71
  'grid',
71
72
  'px-4',
73
+ 'px-3',
72
74
  'py-3',
75
+ 'py-2',
73
76
  'py-4',
74
77
  'py-6',
75
78
  'p-2',
@@ -167,6 +170,9 @@ module.exports = {
167
170
  'md:p-4',
168
171
  'md:p-6',
169
172
  'p-2',
173
+ 'sm:px-3',
174
+ 'sm:py-2',
175
+ 'sm:text-sm',
170
176
  'md:gap-1',
171
177
  'md:space-y-4',
172
178
  'space-y-2',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '3.1.2.3'
4
+ VERSION = '3.1.2.4'
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: 3.1.2.3
4
+ version: 3.1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme