tramway 3.1.2.5 → 3.1.2.6

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: 564610d50165b34a4446cdc570c377a12f9c49587b366c994141a3e2702e289f
4
- data.tar.gz: beed0c0e6d742dbec6caeaed2fff43c0b6ff62248b804d723dc7b0ce98883b4b
3
+ metadata.gz: c9b234f727ff8de6c0d6f910d4132ae760f304db2b2e4fb211c06a1983264a18
4
+ data.tar.gz: b94972e8d2862560cefca6f4343e15c3b362be56038426cda2b3a988b8705329
5
5
  SHA512:
6
- metadata.gz: 98bfc099a4338a4e114a7591d9721b209077e3a419b83669b5c5fbe5ce21a4c004515a97af9d4a32bf3c5219c426198176c5e413b3633569b68935f623eb9f3f
7
- data.tar.gz: f7d43d03755310fa2ae39e8d0a89c2c87ff90791843ce7ee899eae5ef518dd06b7830c45a0a861159dcf7378862c3e008ef7411b21b465a19ade3863085880a1
6
+ metadata.gz: 59d8c55e6c5300996bc0250d106715647180320c0ab044a1e99dde08188cc887f5de4d8d2f175246c06a73e25f90c7dcea537ff58f0ff29a07f01ba278f346e9
7
+ data.tar.gz: 5061f9357362cf45cfbfe5cc96ca937cdb4a1be8f58a6e156946c4ac2ea277ca3b3d5615f18fb66372a4ea33f57b39a71e33d15542ea2ff72ddf4b2bdf169ae3
data/README.md CHANGED
@@ -1230,7 +1230,7 @@ Tramway uses [Tailwind](https://tailwindcss.com/) by default. All UI helpers are
1230
1230
 
1231
1231
  Tramway provides `tramway_form_for` helper that renders Tailwind-styled forms by default. Form inputs use hardcoded
1232
1232
  dark shadcn-style classes; Tramway does not render a separate light form theme.
1233
- Checkboxes render with a visible, fixed-size dark unchecked surface and use the light primary checked state.
1233
+ Checkboxes render with the same dark border and focus highlight treatment as other inputs, then use the light primary checked state.
1234
1234
  Checkbox controls, checkmarks, and vertically centered label line heights scale together with the form-level `size:` option.
1235
1235
 
1236
1236
  ```erb
@@ -389,12 +389,12 @@ class UiCheckbox extends Controller {
389
389
  this.buttonTarget.setAttribute("aria-checked", checked.toString())
390
390
  this.buttonTarget.dataset.state = state
391
391
  this.syncBoxStyle(checked)
392
- this.buttonTarget.classList.add("border-zinc-50")
392
+ this.buttonTarget.classList.toggle("border-zinc-50", checked)
393
+ this.buttonTarget.classList.toggle("border-zinc-800", !checked)
393
394
  this.buttonTarget.classList.toggle("bg-zinc-50", checked)
394
395
  this.buttonTarget.classList.toggle("text-zinc-950", checked)
395
- this.buttonTarget.classList.toggle("bg-zinc-900", !checked)
396
+ this.buttonTarget.classList.toggle("bg-zinc-950", !checked)
396
397
  this.buttonTarget.classList.toggle("text-zinc-50", !checked)
397
- this.buttonTarget.classList.remove("border-zinc-800", "bg-zinc-950")
398
398
  this.indicatorTarget.classList.toggle("hidden", !checked)
399
399
  this.buttonTarget.toggleAttribute("disabled", this.inputTarget.disabled)
400
400
  }
@@ -412,10 +412,8 @@ class UiCheckbox extends Controller {
412
412
  this.buttonTarget.style.padding = "0"
413
413
  this.buttonTarget.style.lineHeight = "1"
414
414
  this.buttonTarget.style.boxSizing = "border-box"
415
- this.buttonTarget.style.border = "1px solid #fafafa"
416
- this.buttonTarget.style.backgroundColor = checked ? "#fafafa" : "#18181b"
415
+ this.buttonTarget.style.backgroundColor = checked ? "#fafafa" : "#09090b"
417
416
  this.buttonTarget.style.color = checked ? "#09090b" : "#fafafa"
418
- this.buttonTarget.style.boxShadow = "0 0 0 1px #fafafa"
419
417
  }
420
418
 
421
419
  checkboxSize() {
@@ -72,7 +72,7 @@ class TailwindComponent < Tramway::BaseComponent
72
72
  end
73
73
 
74
74
  def checkbox_base_classes
75
- 'shrink-0 rounded-sm border border-zinc-800 bg-zinc-950 text-zinc-50 shadow-sm ' \
75
+ 'shrink-0 rounded-sm border border-zinc-800 bg-zinc-950 text-zinc-50 shadow-sm transition-colors ' \
76
76
  'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-300 ' \
77
77
  'focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950 disabled:cursor-not-allowed ' \
78
78
  'disabled:opacity-50'
@@ -10,9 +10,7 @@ module Tramway
10
10
  'justify-content': 'center',
11
11
  padding: '0',
12
12
  'line-height': '1',
13
- 'box-sizing': 'border-box',
14
- border: '1px solid #fafafa',
15
- 'box-shadow': '0 0 0 1px #fafafa'
13
+ 'box-sizing': 'border-box'
16
14
  }.freeze
17
15
 
18
16
  CHECKBOX_BUTTON_SIZES = {
@@ -22,10 +20,7 @@ module Tramway
22
20
  }.freeze
23
21
 
24
22
  def checkbox_button_classes
25
- "peer #{size_class(:checkbox_input)} shrink-0 rounded-sm border border-zinc-50 bg-zinc-900 text-zinc-50 " \
26
- 'ring-offset-zinc-950 ' \
27
- 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-300 ' \
28
- 'focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ' \
23
+ "peer #{size_class(:checkbox_input)} #{checkbox_base_classes} " \
29
24
  'data-[state=checked]:border-zinc-50 data-[state=checked]:bg-zinc-50 ' \
30
25
  'data-[state=checked]:text-zinc-950'
31
26
  end
@@ -87,7 +82,7 @@ module Tramway
87
82
  height: checkbox_button_size,
88
83
  'min-width': checkbox_button_size,
89
84
  'min-height': checkbox_button_size,
90
- 'background-color': checked? ? '#fafafa' : '#18181b',
85
+ 'background-color': checked? ? '#fafafa' : '#09090b',
91
86
  color: checked? ? '#09090b' : '#fafafa'
92
87
  )
93
88
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '3.1.2.5'
4
+ VERSION = '3.1.2.6'
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.5
4
+ version: 3.1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme