css-zero 0.0.82 → 0.0.84

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: e8ec29ec17afa74563dcc2fa5bd24685b96132de62a6aa0cb14785463925dcf2
4
- data.tar.gz: 183f5f659feb95a2d82467e8c4739acd0ba2cdb9f49b143cadcc4e4d5688aa59
3
+ metadata.gz: 0d6d7165606f68bfeaf5ea3257f89a0930e1e4ff4f1e98fab0a02f832cf0fb0a
4
+ data.tar.gz: cef16687bf6571c5e7af1454519bfb69a72cf66cfc48ca0b5ea90e809d8138e1
5
5
  SHA512:
6
- metadata.gz: d68e553275f7974dbb96e912119d23c70e2362eb63ec111485d601ac15f07f17d36c172001eb63e958b4f2c29bf21d34f8bab6954355645574784e10730ccf1a
7
- data.tar.gz: 799ae1844ba99b374498076523c3050473eaf40dccfaa0b05f1e680293ca679c7e96a8fe005909985d3f8cf2de12a30e8f9c6186425c599e43020dab837cf076
6
+ metadata.gz: f3f726e4812aea10b251fc6dd3d3532d7ddb67899f99dfe8677742a7c7e82876273274b03cf53d6ba859e6ee1cfdfdf65123b5e2f0f99b1cd3ce02ee4c7b8add
7
+ data.tar.gz: 4a269b0b7868152d856552a537f09753bf6297a3cf9cbd4bb1cc9ec4d92bd5fd3cf5c5185b1f0ffb8cb8691a0aa8d2b20176cc31e67041ec822c060611f6d6f4
@@ -391,7 +391,7 @@ turbo-frame {
391
391
  Make elements with the HTML hidden attribute stay hidden by default.
392
392
  */
393
393
 
394
- [hidden] {
394
+ [hidden]:where(:not([hidden='until-found'])) {
395
395
  display: none !important;
396
396
  }
397
397
 
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.82"
2
+ VERSION = "0.0.84"
3
3
  end
@@ -36,7 +36,7 @@ combobox:
36
36
  command:
37
37
  - app/assets/stylesheets/command.css
38
38
  - app/javascript/controllers/filter_controller.js
39
- - app/javascript/controllers/list_controller.js
39
+ - app/javascript/controllers/listbox_controller.js
40
40
  - app/assets/images/search.svg
41
41
  collapsible:
42
42
  - app/javascript/controllers/collapsible_controller.js
@@ -6,7 +6,7 @@
6
6
  color: var(--color-text);
7
7
  inline-size: var(--size-full);
8
8
  margin: auto;
9
- max-inline-size: var(--max-i-lg);
9
+ max-inline-size: var(--dialog-size, var(--max-i-lg));
10
10
 
11
11
  &::backdrop {
12
12
  background-color: rgba(0, 0, 0, .8);
@@ -34,11 +34,9 @@ export default class extends Controller {
34
34
 
35
35
  #activate() {
36
36
  this.listTarget.classList.add(this.activeClass)
37
- this.dispatch("after")
38
37
  }
39
38
 
40
39
  #deactivate() {
41
40
  this.listTarget.classList.remove(this.activeClass)
42
- this.dispatch("after")
43
41
  }
44
42
  }
@@ -0,0 +1,22 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+ import Listbox from "https://cdn.skypack.dev/@github/combobox-nav@3.0.1?min"
3
+
4
+ export default class extends Controller {
5
+ static targets = [ "input", "list" ]
6
+
7
+ connect() {
8
+ this.listbox = new Listbox(this.inputTarget, this.listTarget)
9
+ }
10
+
11
+ disconnect() {
12
+ this.listbox.destroy()
13
+ }
14
+
15
+ start() {
16
+ this.listbox.start()
17
+ }
18
+
19
+ stop() {
20
+ this.listbox.stop()
21
+ }
22
+ }
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.82
4
+ version: 0.0.84
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-01-08 00:00:00.000000000 Z
11
+ date: 2025-01-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com
@@ -105,7 +105,7 @@ files:
105
105
  - lib/generators/css_zero/add/templates/app/javascript/controllers/hotkey_controller.js
106
106
  - lib/generators/css_zero/add/templates/app/javascript/controllers/inputmask_controller.js
107
107
  - lib/generators/css_zero/add/templates/app/javascript/controllers/lightbox_controller.js
108
- - lib/generators/css_zero/add/templates/app/javascript/controllers/list_controller.js
108
+ - lib/generators/css_zero/add/templates/app/javascript/controllers/listbox_controller.js
109
109
  - lib/generators/css_zero/add/templates/app/javascript/controllers/local_time_controller.js
110
110
  - lib/generators/css_zero/add/templates/app/javascript/controllers/menu_controller.js
111
111
  - lib/generators/css_zero/add/templates/app/javascript/controllers/navigation_controller.js
@@ -1,79 +0,0 @@
1
- import { Controller } from "@hotwired/stimulus"
2
-
3
- export default class extends Controller {
4
- static targets = [ "option" ]
5
- static values = { index: Number }
6
-
7
- connect() {
8
- this.#removeTabstops()
9
- this.#selectFirstOption()
10
- }
11
-
12
- reset() {
13
- this.indexValue = 0
14
- this.#selectCurrentOption()
15
- }
16
-
17
- navigate(event) {
18
- switch (event.key) {
19
- case "ArrowUp":
20
- event.preventDefault()
21
- this.#prev()
22
- break
23
- case "ArrowDown":
24
- event.preventDefault()
25
- this.#next()
26
- break
27
- case "Enter":
28
- event.preventDefault()
29
- this.#clickSelected()
30
- break
31
- }
32
- }
33
-
34
- #prev() {
35
- if (this.indexValue > 0) {
36
- this.indexValue--
37
- this.#selectCurrentOption()
38
- }
39
- }
40
-
41
- #next() {
42
- if (this.indexValue < this.#lastIndex) {
43
- this.indexValue++
44
- this.#selectCurrentOption()
45
- }
46
- }
47
-
48
- #clickSelected() {
49
- this.#visibleOptions[this.indexValue]?.click()
50
- }
51
-
52
- #removeTabstops() {
53
- this.optionTargets.forEach(e => e.tabIndex = -1)
54
- }
55
-
56
- #selectFirstOption() {
57
- this.optionTargets.forEach((element, index) => {
58
- element.ariaSelected = index === 0
59
- })
60
- }
61
-
62
- #selectCurrentOption() {
63
- this.optionTargets.forEach((element, index) => {
64
- element.ariaSelected = false
65
- })
66
-
67
- this.#visibleOptions.forEach((element, index) => {
68
- element.ariaSelected = index === this.indexValue
69
- })
70
- }
71
-
72
- get #visibleOptions() {
73
- return this.optionTargets.filter(e => e.offsetParent != null)
74
- }
75
-
76
- get #lastIndex() {
77
- return this.#visibleOptions.length -1
78
- }
79
- }