css-zero 0.0.81 → 0.0.83

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: '093a0bb191b8b84a8caa29e3a141fba1cf4680150a26960134fa63fd06b42294'
4
- data.tar.gz: d1e303641e4f440a1ac65545946bbaff931ad31cdb49150bf7cdd270ecf2e3b3
3
+ metadata.gz: 71c3c38650e2b111579da72c2349589c5ae2bd114223701b7dd6dc2459136b35
4
+ data.tar.gz: 19401b13fa751a752893c70e9d9b84d641984a510fd66e246e188054360edbb1
5
5
  SHA512:
6
- metadata.gz: 5f54e73025fb075cfe9b876f3c7ea4ce83e4687053a8595034459cd2ef59aea41c8e44869929a9840bacac3eef4d5f9ed963982d155930790d559b651faa4951
7
- data.tar.gz: 584b223cf4b28bf706a1ebeab29b750dbbf1207aa0014285d7662106ec1ea9135b7f7b85502e5735cd9e432583f61649f045c7b08db96b22db31dd61b6fda5b3
6
+ metadata.gz: d67f8fb7778c60e40e7bfcedd7524b6296091777561e48c60c267d1c4bef5969f124c8b80ccd37a1f28f2da8d7e9988e8d9d3b90fbc67e9d4e70c904aabf4c51
7
+ data.tar.gz: 52d1ebd7224d43b4a4d67cd9b473fbbd60f849cfe02f56b8abecd3cdb8c02f460d6f8795411a7a22fd08234e0f0958e8de7bd263ca5059bb09809d9c623bf877
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.81"
2
+ VERSION = "0.0.83"
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
@@ -7,37 +7,37 @@
7
7
  -webkit-font-smoothing: antialiased;
8
8
 
9
9
  :is(h1, h2, h3, h4, h5, h6) {
10
- font-weight: 800;
10
+ font-weight: var(--font-extrabold);
11
11
  hyphens: auto;
12
12
  letter-spacing: -0.02ch;
13
13
  line-height: 1.1;
14
- margin-block: 0.65em;
14
+ margin-block: 0.5em;
15
15
  overflow-wrap: break-word;
16
16
  text-wrap: balance;
17
17
  }
18
18
 
19
19
  h1 {
20
- font-size: 2.25em;
20
+ font-size: 2.4em;
21
21
  }
22
22
 
23
23
  h2 {
24
- font-size: 1.5em;
24
+ font-size: 1.8em;
25
25
  }
26
26
 
27
27
  h3 {
28
- font-size: 1.125em;
28
+ font-size: 1.5em;
29
29
  }
30
30
 
31
31
  h4 {
32
- font-size: 1em;
32
+ font-size: 1.2em;
33
33
  }
34
34
 
35
35
  h5 {
36
- font-size: 0.875em;
36
+ font-size: 1em;
37
37
  }
38
38
 
39
39
  h6 {
40
- font-size: 0.75em;
40
+ font-size: 0.9em;
41
41
  }
42
42
 
43
43
  :is(ul, ol, menu) {
@@ -58,13 +58,13 @@
58
58
  }
59
59
 
60
60
  :is(b, strong) {
61
- font-weight: 700;
61
+ font-weight: var(--font-bold);
62
62
  }
63
63
 
64
64
  :is(pre, code) {
65
65
  background-color: var(--color-border-light);
66
66
  border: 1px solid var(--color-border);
67
- border-radius: 0.3em;
67
+ border-radius: var(--rounded);
68
68
  font-family: var(--font-monospace-code);
69
69
  font-size: 0.85em;
70
70
  }
@@ -108,7 +108,7 @@
108
108
  }
109
109
 
110
110
  th {
111
- font-weight: 700;
111
+ font-weight: var(--font-bold);
112
112
  }
113
113
 
114
114
  :is(th, td) {
@@ -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.81
4
+ version: 0.0.83
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-07 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
- }