css-zero 0.0.45 → 0.0.47

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: fd059d67d4f761e329571d4e4eefac0325a6cf14224717ed3581a7ffe7acaf0e
4
- data.tar.gz: 13afe2beaba626b1925504904160f01ab1c5589eb87d3bbe2baa9009c3e04cc2
3
+ metadata.gz: e2efe1919888b0e11a440ada88d32d728814c3a96f67e877e87009836a5c9e3a
4
+ data.tar.gz: eac6e9c80a23b456a92dec265859959fadb0e34298904308714df91bb3220d84
5
5
  SHA512:
6
- metadata.gz: 5bfb100356389b839542aa74775abce26f05fc0f8816df589fabb91af96892b28fac6fe2179bb8aa11476595ae7457ce0a33b9faef7b91d771151ef2100f581b
7
- data.tar.gz: 340f487beff85601804945afe83121df0c2ac1cf42ddd8fa80261a746754f788e8a31f2264b159de654745a7ee56dfa8b89e37175bdcbcdd5d9ca37aa32ae436
6
+ metadata.gz: 9180e92a3179e523600fe9c2a1090a56fc1625798f9d261262f0d2fe6e998e11b777db777c9a3982d7ca76570bc8d43bc68c48efc6016879462adcd23c300cab
7
+ data.tar.gz: e05418691df476b525df12b6df0e4a1159947bc45cc21b3d2f7378dfb7767dd235bb20f3d4fdb4dd6c481851ac60b0d2255101b3f09dd01d323bdbd27a9d7acc
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.45"
2
+ VERSION = "0.0.47"
3
3
  end
@@ -69,7 +69,7 @@
69
69
  .btn--plain {
70
70
  --btn-background: transparent;
71
71
  --btn-border-color: transparent;
72
- --btn-hover-lightness: 100%;
72
+ --btn-hover-lightness: l;
73
73
  --btn-padding: 0;
74
74
  }
75
75
 
@@ -42,10 +42,15 @@
42
42
  .command__item {
43
43
  --btn-border-color: transparent;
44
44
  --btn-font-weight: var(--font-normal);
45
+ --btn-hover-lightness: l;
45
46
  --btn-justify-content: start;
46
47
  --btn-outline-size: 0;
47
48
  --btn-padding: var(--size-1_5) var(--size-2);
48
49
 
50
+ &:hover {
51
+ --btn-background: var(--color-secondary);
52
+ }
53
+
49
54
  &:focus-visible {
50
55
  --btn-background: var(--color-secondary);
51
56
  }
@@ -57,8 +62,11 @@
57
62
  margin-inline-start: auto;
58
63
  }
59
64
 
65
+ .command__list--filtering:not(:has(.selected)) {
66
+ .command__empty { display: flex; }
67
+ }
68
+
60
69
  .command__list--filtering {
61
- &:not(:has(.selected)) > .command__empty { display: flex; }
62
70
  .command__group { display: none; }
63
71
  .command__group:has(.selected) { display: flex; }
64
72
  .command__item { display: none; }
@@ -54,6 +54,10 @@
54
54
  border: 0; inline-size: 100%; outline: 0;
55
55
  }
56
56
 
57
+ img:not([class]) {
58
+ filter: var(--input-icon-color, var(--color-filter-text));
59
+ }
60
+
57
61
  &:focus-within {
58
62
  outline: var(--input-outline-size, 2px) solid var(--color-selected-dark);
59
63
  outline-offset: var(--border-2);
@@ -63,7 +67,7 @@
63
67
  /* Checkbox, radio, and range */
64
68
  .checkbox, .radio {
65
69
  accent-color: var(--color-primary);
66
- block-size: 18px; inline-size: 18px;
70
+ block-size: 16px; inline-size: 18px;
67
71
  }
68
72
 
69
73
  .range {
@@ -23,11 +23,16 @@
23
23
  .menu__item {
24
24
  --btn-border-color: transparent;
25
25
  --btn-font-weight: var(--font-normal);
26
+ --btn-hover-lightness: l;
26
27
  --btn-justify-content: start;
27
28
  --btn-outline-size: 0;
28
29
  --btn-padding: var(--size-1_5) var(--size-2);
29
30
 
30
- .menu:not(:hover) &:focus {
31
+ &:hover {
32
+ --btn-background: var(--color-secondary);
33
+ }
34
+
35
+ &:focus-visible {
31
36
  --btn-background: var(--color-secondary);
32
37
  }
33
38
  }
@@ -11,7 +11,7 @@
11
11
  .btn--tab {
12
12
  --btn-background: transparent;
13
13
  --btn-border-color: transparent;
14
- --btn-hover-lightness: 100%;
14
+ --btn-hover-lightness: l;
15
15
  --btn-inline-size: var(--size-full);
16
16
 
17
17
  &[aria-selected=true] {
@@ -6,19 +6,23 @@ export default class extends Controller {
6
6
 
7
7
  indexValueChanged() {
8
8
  this.#removeTabstops()
9
- this.#focusCurrentItem()
10
9
  }
11
10
 
12
11
  prev() {
13
- this.indexValue > 0 && this.indexValue--
12
+ const hasPrevious = this.indexValue > 0
13
+ hasPrevious && this.indexValue--
14
+ hasPrevious && this.#focusCurrentItem()
14
15
  }
15
16
 
16
17
  next() {
17
- this.indexValue < this.#lastIndex && this.indexValue++
18
+ const hasNext = this.indexValue < this.#lastIndex
19
+ hasNext && this.indexValue++
20
+ hasNext && this.#focusCurrentItem()
18
21
  }
19
22
 
20
23
  reset() {
21
24
  this.indexValue = 0
25
+ this.#focusCurrentItem()
22
26
  }
23
27
 
24
28
  #removeTabstops() {
@@ -4,9 +4,8 @@ export default class extends Controller {
4
4
  static targets = [ "button", "tab" ]
5
5
  static values = { index: Number }
6
6
 
7
- indexValueChanged(index, previousIndex) {
7
+ indexValueChanged() {
8
8
  this.#showCurrentTab()
9
- this.#focusCurrentButton(previousIndex !== undefined)
10
9
  }
11
10
 
12
11
  select({ target }) {
@@ -14,11 +13,15 @@ export default class extends Controller {
14
13
  }
15
14
 
16
15
  prev() {
17
- this.indexValue > 0 && this.indexValue--
16
+ const hasPrevious = this.indexValue > 0
17
+ hasPrevious && this.indexValue--
18
+ hasPrevious && this.#focusCurrentButton()
18
19
  }
19
20
 
20
21
  next() {
21
- this.indexValue < this.#lastIndex && this.indexValue++
22
+ const hasNext = this.indexValue < this.#lastIndex
23
+ hasNext && this.indexValue++
24
+ hasNext && this.#focusCurrentButton()
22
25
  }
23
26
 
24
27
  #showCurrentTab() {
@@ -32,8 +35,8 @@ export default class extends Controller {
32
35
  })
33
36
  }
34
37
 
35
- #focusCurrentButton(shouldFocus) {
36
- shouldFocus && this.buttonTargets[this.indexValue].focus()
38
+ #focusCurrentButton() {
39
+ this.buttonTargets[this.indexValue].focus()
37
40
  }
38
41
 
39
42
  get #lastIndex() {
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.45
4
+ version: 0.0.47
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-10-13 00:00:00.000000000 Z
11
+ date: 2024-10-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com