css-zero 0.0.61 → 0.0.63

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b704e3a3d8b4b380575985a2c56480f3f772d32ed9132786de42e4f098b89d90
4
- data.tar.gz: bc56740674826f1c932eb8ab5acd1fe603b3a21a0df6a61efead4dc2d5d1eb15
3
+ metadata.gz: 1dcad18cf8b767d6b04eeffa882dc11a58855ccfee8bc4bbfc5b0f53dee40ba5
4
+ data.tar.gz: f508def8ee8def3ed3046af44ee40ed506b528d9d200c780a3d4f5581197e192
5
5
  SHA512:
6
- metadata.gz: 0e97246d26938cf23bb9934ded34165c3778794b103343e00ec9bdbcb789a53b31f6f047a3c7b9d3e74c422f375959220963f1b5fe0a0a86ce1877b15d52f298
7
- data.tar.gz: cffeabee864a7819a10e67c6156af52165154af6d2d69a42cb9e970e01a1d1fb0c4a8d67e9408c815ebf3d864e00cfa8a34c922cfe1ebd4792532979f78a7bd0
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.61"
2
+ VERSION = "0.0.63"
3
3
  end
@@ -2,7 +2,7 @@ Description:
2
2
  This will add components into your project.
3
3
 
4
4
  Components:
5
- accordion alert autosave avatar badge breadcrumb button card carousel chart check_all combobox command collapsible datepicker dialog dropdown flash form fullscreen hotkey input input_concerns inputmask layouts lightbox local_time navigation pagination progress prose sheet skeleton sortable switch table tabs trix upload_preview toggle web_share
5
+ accordion alert autosave avatar badge breadcrumb button card carousel chart check_all combobox command collapsible datepicker dialog dropdown flash form fullscreen hotkey input input_concerns inputmask layouts lightbox local_time navigation pagination progress prose sheet skeleton sortable switch table tabs tooltip trix upload_preview toggle web_share
6
6
 
7
7
  Example:
8
8
  bin/rails generate css_zero:add [components...]
@@ -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:
@@ -115,6 +116,9 @@ table:
115
116
  tabs:
116
117
  - app/assets/stylesheets/tabs.css
117
118
  - app/javascript/controllers/tabs_controller.js
119
+ tooltip:
120
+ - app/assets/stylesheets/tooltip.css
121
+ - app/javascript/controllers/tooltip_controller.js
118
122
  trix:
119
123
  - app/assets/stylesheets/ztrix.css
120
124
  upload_preview:
@@ -0,0 +1,22 @@
1
+ .tippy-box {
2
+ background-color: var(--color-bg);
3
+ border: 1px solid var(--color-border);
4
+ border-radius: var(--rounded-md);
5
+ box-shadow: var(--shadow-md);
6
+ color: var(--color-text);
7
+ font-size: var(--text-sm);
8
+ line-height: var(--leading-normal);
9
+ transition-property: transform, visibility, opacity;
10
+
11
+ &[data-state=hidden] {
12
+ opacity: 0;
13
+ }
14
+
15
+ &[data-state=visible] {
16
+ transition-timing-function: var(--ease-in);
17
+ }
18
+
19
+ .tippy-content {
20
+ padding: var(--size-1_5) var(--size-3);
21
+ }
22
+ }
@@ -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
+ }
@@ -0,0 +1,14 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+ import tippy from "https://cdn.skypack.dev/tippy.js@6.3.7"
3
+
4
+ export default class extends Controller {
5
+ static values = { content: String }
6
+
7
+ connect() {
8
+ this.tooltip = tippy(this.element, { content: this.contentValue, arrow: false, interactive: true, delay: [700, 0], offset: [0, 3] })
9
+ }
10
+
11
+ disconnect() {
12
+ this.tooltip.destroy()
13
+ }
14
+ }
@@ -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.61
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-11 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
@@ -82,6 +82,7 @@ files:
82
82
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/tabs.css
83
83
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/toggle.css
84
84
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/tom-select.css
85
+ - lib/generators/css_zero/add/templates/app/assets/stylesheets/tooltip.css
85
86
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/zcombobox.css
86
87
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/zdatepicker.css
87
88
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/ztrix.css
@@ -107,10 +108,12 @@ files:
107
108
  - lib/generators/css_zero/add/templates/app/javascript/controllers/local_time_controller.js
108
109
  - lib/generators/css_zero/add/templates/app/javascript/controllers/menu_controller.js
109
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
110
112
  - lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js
111
113
  - lib/generators/css_zero/add/templates/app/javascript/controllers/revealable_input_controller.js
112
114
  - lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js
113
115
  - lib/generators/css_zero/add/templates/app/javascript/controllers/tabs_controller.js
116
+ - lib/generators/css_zero/add/templates/app/javascript/controllers/tooltip_controller.js
114
117
  - lib/generators/css_zero/add/templates/app/javascript/controllers/upload_preview_controller.js
115
118
  - lib/generators/css_zero/add/templates/app/javascript/controllers/web_share_controller.js
116
119
  - lib/generators/css_zero/authentication/authentication_generator.rb