css-zero 1.1.13 → 1.1.14

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: 26678344cabfa8f02f3951ecdee51e92f6cc11cdf0ff95c4b14834b388438b4f
4
- data.tar.gz: 26808cdcd174c55b3aae23cae75e330a2afd61d1620d9cd60bbff722135fc6fd
3
+ metadata.gz: 1d12ea13a67b496f1781d2b19b1f7cdbe3571247ccfba8058e6f86224a78ca96
4
+ data.tar.gz: 1205cd68c1a55d97f7f145d035176c0fe554f60191c7bdef3e6f1d14e62315ed
5
5
  SHA512:
6
- metadata.gz: c7ee248da8e79a73c36f882ebe659d05df0cf8ba94381bb8f6c11a5e41bd7f3c7a3f5b71385725f4f25e004154edf0c87bbf5ab1cd79e12f04df68b751202226
7
- data.tar.gz: 288d8b3ffe6e3d747680899153aa8a1fd7885096999f974b3cd870ff3129d15d8471032483359f4fe2fa86bd0cb93ad3a21f433a03533c8d9177ae5dee48b782
6
+ metadata.gz: 2e4be07882ae3121a041a18de96ddb6b9c9210b0e999b63271ac58645f1b7ae959cbc9b69aa38dd6fe15580899fed6949f80424b45026fb1d791efe1a2a09d07
7
+ data.tar.gz: 6ea61906b720da2f4a391768eca9844113f4f8ab7891917d71a0f473d7439ff0a3a79696752342030229e953424fbb88f1c7e952a6dff229de72baaf1d586785
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "1.1.13"
2
+ VERSION = "1.1.14"
3
3
  end
@@ -8,6 +8,12 @@
8
8
  background-size: cover;
9
9
  }
10
10
 
11
- .input--clearable ::-webkit-search-cancel-button {
12
- display: none;
11
+ .input--clearable {
12
+ input::-webkit-search-cancel-button {
13
+ display: none;
14
+ }
15
+
16
+ &:has(:placeholder-shown) > button {
17
+ display: none;
18
+ }
13
19
  }
@@ -12,7 +12,7 @@
12
12
  background: linear-gradient(to right, var(--track) 45%, var(--progress) 0%, var(--progress) 55%, var(--track) 0%);
13
13
  background-size: 225% 100%;
14
14
  background-position: right;
15
- animation: progress-loading 2s infinite ease;
15
+ animation: progress-loading 2s infinite;
16
16
  }
17
17
 
18
18
  /* Safari/Chromium */
@@ -6,7 +6,7 @@ const AUTOSAVE_INTERVAL = 3000
6
6
  export default class extends Controller {
7
7
  static targets = [ "submitter" ]
8
8
 
9
- #timer
9
+ #timer = null
10
10
 
11
11
  disconnect() {
12
12
  this.#submit()
@@ -1,23 +1,10 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
2
 
3
3
  export default class extends Controller {
4
- static targets = [ "input", "button" ]
5
-
6
- connect() {
7
- this.update()
8
- }
4
+ static targets = [ "input" ]
9
5
 
10
6
  clear() {
11
7
  this.inputTarget.value = ""
12
8
  this.inputTarget.focus()
13
- this.update()
14
- }
15
-
16
- update() {
17
- this.buttonTarget.hidden = this.#isEmpty
18
- }
19
-
20
- get #isEmpty() {
21
- return this.inputTarget.value === ""
22
9
  }
23
10
  }
@@ -8,12 +8,12 @@ export default class extends Controller {
8
8
  this.search = debounce(this.search.bind(this), 500)
9
9
  }
10
10
 
11
- submit() {
12
- this.element.requestSubmit()
11
+ submit({ params }) {
12
+ params.submitter ? this.#click(params.submitter) : this.element.requestSubmit()
13
13
  }
14
14
 
15
- search() {
16
- this.element.requestSubmit()
15
+ search({ params }) {
16
+ params.submitter ? this.#click(params.submitter) : this.element.requestSubmit()
17
17
  }
18
18
 
19
19
  cancel() {
@@ -23,4 +23,8 @@ export default class extends Controller {
23
23
  preventAttachment(event) {
24
24
  event.preventDefault()
25
25
  }
26
+
27
+ #click(selectors) {
28
+ this.element.querySelector(selectors).click()
29
+ }
26
30
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.13
4
+ version: 1.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lázaro Nixon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-16 00:00:00.000000000 Z
10
+ date: 2025-03-20 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email: lazaronixon@hotmail.com
13
13
  executables: []