css-zero 0.0.62 → 0.0.63

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: 50f4f06305367205ea49ea3f51a52d15f1be0d03412988a1721c3d8fb21078f7
4
- data.tar.gz: fc0907d77ef83b4c69446373baa99606a8217f406f4fb2ed78eaaeca0b738a3c
3
+ metadata.gz: 1dcad18cf8b767d6b04eeffa882dc11a58855ccfee8bc4bbfc5b0f53dee40ba5
4
+ data.tar.gz: f508def8ee8def3ed3046af44ee40ed506b528d9d200c780a3d4f5581197e192
5
5
  SHA512:
6
- metadata.gz: aa156ba233ef386980a0ee10801205adeab2d75d4698a2828f164437db63caabb3f73fef9a1d0b08aaf6bbfa0cf4304d178180a692eead1f017a0725d73a28e6
7
- data.tar.gz: ebad60a25af3c51dddaea41a62cce99aa1aca172bbde633a8b6852b0864097764ffea8ec57a62e0c49a6713e2edbe59d7ea38d7c141824d06ad70ee533217036
6
+ metadata.gz: 8aa4e8e29b184bcd7d9c131d0c8990abf0c95e72650e95638d97668682607162549dbad1232acf774470c5ee8908992f486004d1fd012ca19f344f813d834992
7
+ data.tar.gz: 0f905749c2d50d27191ae171f6337859fa1217f4f1d8b2660cf7372b4c8228f4baa15b18a53d84a2a13455e078db2b047e8c35c4730faece0465d4aedf14820b
@@ -1,9 +1,5 @@
1
1
  module CssZero
2
2
  class Engine < ::Rails::Engine
3
- initializer "css_zero.disable_generator_stylesheets" do
4
- Rails.application.config.generators.stylesheets = false
5
- end
6
-
7
3
  config.app_generators do |g|
8
4
  g.template_engine :css_zero
9
5
  end
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.62"
2
+ VERSION = "0.0.63"
3
3
  end
@@ -73,6 +73,7 @@ input_concerns:
73
73
  - app/javascript/controllers/revealable_input_controller.js
74
74
  - app/assets/images/eye.svg
75
75
  - app/assets/images/eye-off.svg
76
+ - app/javascript/controllers/otp_input_controller.js
76
77
  inputmask:
77
78
  - app/javascript/controllers/inputmask_controller.js
78
79
  layouts:
@@ -0,0 +1,31 @@
1
+ import { Controller } from "@hotwired/stimulus";
2
+
3
+ export default class extends Controller {
4
+ initialize() {
5
+ this.abortController = new AbortController()
6
+ }
7
+
8
+ disconnect() {
9
+ this.abortController.abort()
10
+ }
11
+
12
+ connect() {
13
+ this.#supportsOTP && this.#requestOTP()
14
+ }
15
+
16
+ #requestOTP() {
17
+ navigator.credentials.get(this.#options).then(otp => {
18
+ this.element.value = otp.code
19
+ }).catch(error => {
20
+ console.log(error)
21
+ })
22
+ }
23
+
24
+ get #options() {
25
+ return { otp: { transport: ["sms"] }, signal: this.abortController.signal }
26
+ }
27
+
28
+ get #supportsOTP() {
29
+ return "OTPCredential" in window
30
+ }
31
+ }
@@ -16,7 +16,6 @@
16
16
  *= require colors
17
17
  *= require effects
18
18
  *= require filters
19
- *= require grid
20
19
  *= require sizes
21
20
  *= require transform
22
21
  *= require transition
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: 0.0.62
4
+ version: 0.0.63
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: 2024-11-13 00:00:00.000000000 Z
11
+ date: 2024-11-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com
@@ -108,6 +108,7 @@ files:
108
108
  - lib/generators/css_zero/add/templates/app/javascript/controllers/local_time_controller.js
109
109
  - lib/generators/css_zero/add/templates/app/javascript/controllers/menu_controller.js
110
110
  - lib/generators/css_zero/add/templates/app/javascript/controllers/navigation_controller.js
111
+ - lib/generators/css_zero/add/templates/app/javascript/controllers/otp_input_controller.js
111
112
  - lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js
112
113
  - lib/generators/css_zero/add/templates/app/javascript/controllers/revealable_input_controller.js
113
114
  - lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js