lato 3.11.12 → 3.11.13

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: 007da36b953585b304144bf9eb4e257cd9ded2a731c7f37a7ff2c90cd3b9085b
4
- data.tar.gz: e8389f60e7ca1dbc4fd9eda84b9cdc0e59e135073b2d2e7652bb3de1ff4ac6a8
3
+ metadata.gz: 7baced60fcb66e212666ae63936af3b4ac2e251e6f8aff2cedc08888defe3cde
4
+ data.tar.gz: 81bf058b8f8e0c9cd84ca0508e0747bf4fc7d1e9cdb49c2a6d96c36392985743
5
5
  SHA512:
6
- metadata.gz: 779f705e3a34e99000c1c3020661634d0032c46f38d34965b4e0943118daf3e85a8ecf5eeef71de3b84c8e79d9af67245b4d3ded4c7305e23678083885f823bb
7
- data.tar.gz: ae574718db31cb7e5fb159c7730d5265f5272a570f14b8ac2938cd445a3fa994edb84dcd7e1d50cec7189ff27a6ed625e1ee5f7bf11da827536846c28c89aa19
6
+ metadata.gz: b0765b08353b74ad25b94c4dc31f905949ab0b02ff5aa47abf85d9f48cc68cda9cbccf4a4970bc4f46d7db9c062469a320e76df5dd182d979e6d9a1c04d01a50
7
+ data.tar.gz: 2864f98cdb5082b304aed65a45b9394be794a37229fbf1b511cdb253d9b614c4baae26ec5c1219584563a1d642de015f70bc22a3c6cb8250c92e217a2dfe432d
@@ -0,0 +1,41 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class extends Controller {
4
+ static targets = [
5
+ 'input',
6
+ 'button'
7
+ ]
8
+
9
+ connect() {
10
+ if (this.hasButtonTarget) {
11
+ this.buttonTargetOriginalHTML = this.buttonTarget.innerHTML
12
+ }
13
+ }
14
+
15
+ onButtonClick(e) {
16
+ e.preventDefault()
17
+
18
+ this.copy()
19
+ }
20
+
21
+ copy() {
22
+ if (!this.hasInputTarget) return
23
+
24
+ // Copy the text inside the text field
25
+ this.inputTarget.select()
26
+ this.inputTarget.setSelectionRange(0, 99999) // For mobile devices
27
+
28
+ // Copy the text inside the text field
29
+ navigator.clipboard.writeText(this.inputTarget.value)
30
+
31
+ // Manage button state
32
+ if (this.hasButtonTarget) {
33
+ this.buttonTarget.innerHTML = this.buttonTarget.dataset.copyText || 'Copied!'
34
+
35
+ if (this._copyTimeout) clearTimeout(this._copyTimeout)
36
+ this._copyTimeout = setTimeout(() => {
37
+ this.buttonTarget.innerHTML = this.buttonTargetOriginalHTML
38
+ }, 2000)
39
+ }
40
+ }
41
+ }
@@ -113,6 +113,14 @@ main, aside {
113
113
  }
114
114
  }
115
115
 
116
+ .lato-index {
117
+ .table {
118
+ th, td {
119
+ vertical-align: middle;
120
+ }
121
+ }
122
+ }
123
+
116
124
  .lato-index-col-sort {
117
125
  .btn {
118
126
  font-size: 12px;
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.11.12"
2
+ VERSION = "3.11.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.12
4
+ version: 3.11.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-17 00:00:00.000000000 Z
11
+ date: 2025-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -158,6 +158,7 @@ files:
158
158
  - app/assets/javascripts/lato/controllers/lato_action_controller.js
159
159
  - app/assets/javascripts/lato/controllers/lato_aside_opener_controller.js
160
160
  - app/assets/javascripts/lato/controllers/lato_confirm_controller.js
161
+ - app/assets/javascripts/lato/controllers/lato_copyclip_controller.js
161
162
  - app/assets/javascripts/lato/controllers/lato_feedback_controller.js
162
163
  - app/assets/javascripts/lato/controllers/lato_form_controller.js
163
164
  - app/assets/javascripts/lato/controllers/lato_guide_controller.js