css-zero 1.1.10 → 1.1.11

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: fc82d7a1a5965a33b21abc4b928e9addfd45a097bb1274da71c75ad719c85012
4
- data.tar.gz: 2547d5cef025144e57653d24b4ec8436edfdc559c4597c96e36d0cdf421920ac
3
+ metadata.gz: bd553579a473a3540a8adef826e33aff68cce9c9285074dcad3c235263925b8c
4
+ data.tar.gz: 73cda33c1b3cf346c3b97b4cf14e7f3ba42b83347710de95b8803b3f6ed2196d
5
5
  SHA512:
6
- metadata.gz: a1b55197225ad626b71d2cfa9beabdfb6acb7abda305c197b013a95dd59a761bbefa2bf957eaa4d42b1ffc689cb6e1b53a73e272faf23464b055e5d137e1792f
7
- data.tar.gz: c9e5cc81ef87032df8d0d9146f1287a4c2cbd1e2c79db92a465d0ef08dc410de49ed74c522d3c813337b700eeb7bdee2d181e92789a20a7853da59e5d76972e8
6
+ metadata.gz: 2bd0d3d1826713c47216b87ee3e12ee0624f8358947f5158b50153fbe2d4066de39cea608cbe48a1af138410af4c352b5dab678f9647f914844999252737f8e9
7
+ data.tar.gz: c808198b01c9760f1c632941d78dec732b928a151f98bc7b4a9f8433384ca5c397ffa99fe8e9bf7b2194bc1f0a860a4260462b84044c8affaaf911d034aa8c6d
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "1.1.10"
2
+ VERSION = "1.1.11"
3
3
  end
@@ -69,15 +69,15 @@ input:
69
69
  - app/assets/stylesheets/input.css
70
70
  - app/assets/images/select-arrow.svg
71
71
  input_concerns:
72
+ - app/assets/stylesheets/input_concerns.css
72
73
  - app/javascript/controllers/autoselect_controller.js
73
74
  - app/javascript/controllers/copyable_input_controller.js
74
75
  - app/assets/images/copy.svg
75
- - app/assets/images/check.svg
76
76
  - app/javascript/controllers/clearable_input_controller.js
77
77
  - app/assets/images/x.svg
78
78
  - app/javascript/controllers/revealable_input_controller.js
79
79
  - app/assets/images/eye.svg
80
- - app/assets/images/eye-off.svg
80
+ - app/assets/images/off.svg
81
81
  - app/javascript/controllers/otp_input_controller.js
82
82
  inputmask:
83
83
  - app/javascript/controllers/inputmask_controller.js
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2"><path d="m2 2 20 20"/></svg>
@@ -1,4 +1,4 @@
1
- @import url("https://esm.sh/tom-select@2.4.2/dist/css/tom-select.min.css");
1
+ @import url("https://esm.sh/tom-select@2.4.3/dist/css/tom-select.min.css");
2
2
 
3
3
  .ts-control {
4
4
  align-items: center;
@@ -0,0 +1,13 @@
1
+ .btn--copied img {
2
+ animation: var(--animate-fade-out), var(--animate-slide-out-up);
3
+ animation-duration: var(--time-500);
4
+ }
5
+
6
+ .btn--revealed img {
7
+ background-image: url("off.svg");
8
+ background-size: cover;
9
+ }
10
+
11
+ .input--clearable ::-webkit-search-cancel-button {
12
+ display: none;
13
+ }
@@ -1,4 +1,4 @@
1
- @import url("https://esm.sh/trix@2.1.12/dist/trix.css");
1
+ @import url("https://esm.sh/trix@2.1.13/dist/trix.css");
2
2
 
3
3
  /* Action Text */
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { Chart, registerables } from "https://esm.sh/chart.js@4.4.7?standalone"
2
+ import { Chart, registerables } from "https://esm.sh/chart.js@4.4.8?standalone"
3
3
 
4
4
  Chart.register(...registerables)
5
5
 
@@ -1,9 +1,23 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
2
 
3
3
  export default class extends Controller {
4
- static targets = [ "input" ]
4
+ static targets = [ "input", "button" ]
5
+
6
+ connect() {
7
+ this.update()
8
+ }
5
9
 
6
10
  clear() {
7
11
  this.inputTarget.value = ""
12
+ 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 === ""
8
22
  }
9
23
  }
@@ -1,6 +1,6 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
2
  import { get } from "https://esm.sh/@rails/request.js@0.0.11?standalone"
3
- import TomSelect from "https://esm.sh/tom-select@2.4.2/base?standalone"
3
+ import TomSelect from "https://esm.sh/tom-select@2.4.3/base?standalone"
4
4
 
5
5
  export default class extends Controller {
6
6
  static values = { url: String, optionCreate: { type: String, default: "Add" }, noResults: { type: String, default: "No results found" } }
@@ -1,38 +1,26 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import debounce from "https://esm.sh/just-debounce-it@3.2.0?standalone"
3
2
 
4
3
  export default class extends Controller {
5
- static targets = [ "input", "copyIcon", "successIcon" ]
6
- static values = { copied: Boolean }
4
+ static targets = [ "input", "button" ]
7
5
 
8
- initialize() {
9
- this.reset = debounce(this.reset.bind(this), 2500)
6
+ async copy() {
7
+ this.#reset()
8
+ this.#writeToClipboard()
10
9
  }
11
10
 
12
- copiedValueChanged() {
13
- this.#update()
14
- }
15
-
16
- copy() {
17
- this.#copyToClipboard()
18
- this.reset()
19
- }
20
-
21
- reset() {
22
- this.copiedValue = false
11
+ async #writeToClipboard() {
12
+ try {
13
+ await navigator.clipboard.writeText(this.inputTarget.value)
14
+ this.buttonTarget.classList.add("btn--copied")
15
+ } catch {}
23
16
  }
24
17
 
25
- #copyToClipboard() {
26
- try {
27
- navigator.clipboard.writeText(this.inputTarget.value)
28
- this.copiedValue = true
29
- } catch {
30
- this.copiedValue = false
31
- }
18
+ #reset() {
19
+ this.buttonTarget.classList.remove("btn--copied")
20
+ this.#forceReflow()
32
21
  }
33
22
 
34
- #update() {
35
- this.copyIconTarget.hidden = this.copiedValue
36
- this.successIconTarget.hidden = !this.copiedValue
23
+ #forceReflow() {
24
+ this.buttonTarget.offsetWidth
37
25
  }
38
26
  }
@@ -1,24 +1,14 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
2
 
3
3
  export default class extends Controller {
4
- static targets = [ "input", "showIcon", "hideIcon" ]
5
- static values = { revealed: Boolean }
6
-
7
- revealedValueChanged() {
8
- this.#update()
9
- }
4
+ static targets = [ "input", "button" ]
10
5
 
11
6
  reveal() {
12
- this.revealedValue = !this.revealedValue
13
- }
14
-
15
- #update() {
16
- this.inputTarget.type = this.#inputType
17
- this.showIconTarget.hidden = this.revealedValue
18
- this.hideIconTarget.hidden = !this.revealedValue
7
+ this.buttonTarget.classList.toggle("btn--revealed")
8
+ this.inputTarget.type = this.#type
19
9
  }
20
10
 
21
- get #inputType() {
22
- return this.revealedValue ? "text" : "password"
11
+ get #type() {
12
+ return this.inputTarget.type === "text" ? "password" : "text"
23
13
  }
24
14
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lázaro Nixon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-10 00:00:00.000000000 Z
11
+ date: 2025-03-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com
@@ -39,7 +39,6 @@ files:
39
39
  - lib/generators/css_zero/add/templates/app/assets/images/arrow-left.svg
40
40
  - lib/generators/css_zero/add/templates/app/assets/images/arrow-right.svg
41
41
  - lib/generators/css_zero/add/templates/app/assets/images/camera.svg
42
- - lib/generators/css_zero/add/templates/app/assets/images/check.svg
43
42
  - lib/generators/css_zero/add/templates/app/assets/images/chevron-down.svg
44
43
  - lib/generators/css_zero/add/templates/app/assets/images/chevron-left.svg
45
44
  - lib/generators/css_zero/add/templates/app/assets/images/chevron-right.svg
@@ -48,11 +47,11 @@ files:
48
47
  - lib/generators/css_zero/add/templates/app/assets/images/default-picture.webp
49
48
  - lib/generators/css_zero/add/templates/app/assets/images/download.svg
50
49
  - lib/generators/css_zero/add/templates/app/assets/images/ellipsis.svg
51
- - lib/generators/css_zero/add/templates/app/assets/images/eye-off.svg
52
50
  - lib/generators/css_zero/add/templates/app/assets/images/eye.svg
53
51
  - lib/generators/css_zero/add/templates/app/assets/images/loader-circle.svg
54
52
  - lib/generators/css_zero/add/templates/app/assets/images/menu.svg
55
53
  - lib/generators/css_zero/add/templates/app/assets/images/minus.svg
54
+ - lib/generators/css_zero/add/templates/app/assets/images/off.svg
56
55
  - lib/generators/css_zero/add/templates/app/assets/images/search.svg
57
56
  - lib/generators/css_zero/add/templates/app/assets/images/select-arrow.svg
58
57
  - lib/generators/css_zero/add/templates/app/assets/images/share.svg
@@ -74,6 +73,7 @@ files:
74
73
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/flash.css
75
74
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/group.css
76
75
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
76
+ - lib/generators/css_zero/add/templates/app/assets/stylesheets/input_concerns.css
77
77
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/layouts.css
78
78
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/lightbox.css
79
79
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/menu.css
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check"><path d="M20 6 9 17l-5-5"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-eye-off"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>