css-zero 0.0.32 → 0.0.34

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: 1421a60d112863654f94a4b070a0da95043d7cbada5cad2ddf49b115cf61e9ff
4
- data.tar.gz: 5faa34fbd968a3ad3197f3782aeb34300ade587897fdec6a21a6e24245bd925c
3
+ metadata.gz: d24e900c6ffd95d573f125122b5131b8b1ced22db680982d186d9954997f18d9
4
+ data.tar.gz: 9d45a3f46abe2db0b9bc2c61aea8fbcebbb9911bb70533b7e059737d521b3015
5
5
  SHA512:
6
- metadata.gz: 610498e4c9ca04696ffa786da7498d344e9ef5704a6899bed3d3c75dd29fc88d2205ef59023e1e6fd2f8a82fd05cf91e901ed1ec90e4361519c71be9d0c4516b
7
- data.tar.gz: bf00a3e2988209b59a7fac29479bc05150367f7db0659f58c2030c7f1f2bb0b8d8061643bc1dd2845634e812fc3f4c6ae4be883f2920e2ed6ae89cb97517cc4e
6
+ metadata.gz: 4c99de823a3a774b26423edea867a8de01917a4ba1f52531f4f67f6bf02697898cca8184846d474c11125e21dd0b56cf48490d7fd1ad107e179d6cd6359706ea
7
+ data.tar.gz: 9d147c87cbc39ccea3861e3e5bf9b0c447984f4aa6dce4425380673d2445928a4092c678e42118d2eb2341004d57e8a6d22827e2945e8d0f9a8610ab7f96b1e4
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.32"
2
+ VERSION = "0.0.34"
3
3
  end
@@ -34,6 +34,7 @@ input:
34
34
  - app/assets/images/select-arrow.svg
35
35
  layouts:
36
36
  - app/assets/stylesheets/layouts.css
37
+ - app/assets/images/menu.svg
37
38
  pagination:
38
39
  - app/assets/stylesheets/pagination.css
39
40
  - app/assets/images/chevron-right.svg
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/></svg>
@@ -65,13 +65,16 @@
65
65
  visibility: hidden;
66
66
  }
67
67
 
68
+ &::after {
69
+ filter: var(--btn-icon-color, var(--color-filter-text-reversed));
70
+ }
71
+
68
72
  &::after {
69
73
  animation: spin 1s linear infinite;
70
74
  background-image: url("loader-circle.svg");
71
75
  background-size: cover;
72
76
  block-size: var(--size-4);
73
77
  content: "";
74
- filter: var(--btn-icon-color, var(--color-filter-text-reversed));
75
78
  inline-size: var(--size-4);
76
79
  position: absolute;
77
80
  }
@@ -7,7 +7,6 @@
7
7
  inline-size: var(--size-full);
8
8
  margin: auto;
9
9
  max-inline-size: var(--dialog-width, var(--width-lg));
10
- padding: var(--size-6);
11
10
 
12
11
  &::backdrop {
13
12
  background-color: rgba(0, 0, 0, .8);
@@ -55,6 +54,10 @@
55
54
  }
56
55
  }
57
56
 
57
+ .dialog__content {
58
+ padding: var(--size-6);
59
+ }
60
+
58
61
  .dialog__close {
59
62
  inset-block-start: var(--size-4);
60
63
  inset-inline-end: var(--size-4);
@@ -11,11 +11,10 @@
11
11
  padding-block: revert;
12
12
  }
13
13
 
14
- &:is(textarea):not([rows]) {
14
+ &:is(textarea[rows=auto]) {
15
15
  field-sizing: content;
16
16
  max-block-size: calc(10lh + var(--size-6));
17
17
  min-block-size: calc(3lh + var(--size-6));
18
- resize: none;
19
18
  }
20
19
 
21
20
  &:is(select):not([multiple], [size]) {
@@ -44,18 +43,23 @@
44
43
  }
45
44
  }
46
45
 
46
+ /* Hide invalid feedback by default */
47
+ .invalid-feedback {
48
+ display: none;
49
+ }
50
+
47
51
  /* Containers that act like (and contain) inputs */
48
52
  .input--actor {
49
- &:focus-within {
50
- outline: var(--border-2) solid var(--color-selected-dark);
51
- outline-offset: var(--border-2);
52
- }
53
-
54
53
  &:has(:-webkit-autofill) {
55
54
  -webkit-text-fill-color: var(--color-text);
56
55
  -webkit-box-shadow: 0 0 0px 1000px var(--color-selected) inset;
57
56
  }
58
57
 
58
+ &:focus-within {
59
+ outline: var(--border-2) solid var(--color-selected-dark);
60
+ outline-offset: var(--border-2);
61
+ }
62
+
59
63
  .input__character {
60
64
  border: 0; inline-size: 100%; outline: 0;
61
65
  }
@@ -14,6 +14,10 @@
14
14
  }
15
15
  }
16
16
 
17
+ .sidebar__toggle {
18
+ @media (width >= 48rem) { display: none; }
19
+ }
20
+
17
21
  .layout-pancake {
18
22
  display: grid;
19
23
  grid-template-rows: auto 1fr auto;
@@ -8,7 +8,6 @@
8
8
  margin-inline: var(--sheet-margin);
9
9
  max-block-size: none;
10
10
  max-inline-size: var(--width-sm);
11
- padding: var(--size-6);
12
11
 
13
12
  &::backdrop {
14
13
  background-color: rgba(0, 0, 0, .8);
@@ -62,6 +61,11 @@
62
61
  --sheet-transform: translateX(100%);
63
62
  }
64
63
 
64
+ .sheet__content {
65
+ block-size: var(--size-full);
66
+ padding: var(--size-6);
67
+ }
68
+
65
69
  .sheet__close {
66
70
  inset-block-start: var(--size-4);
67
71
  inset-inline-end: var(--size-4);
@@ -19,7 +19,7 @@
19
19
  inline-size: var(--size-full);
20
20
  }
21
21
 
22
- button[data-selected=true] {
22
+ button[aria-selected=true] {
23
23
  background-color: var(--color-bg);
24
24
  color: var(--color-text);
25
25
  }
@@ -2,24 +2,24 @@ import { Controller } from "@hotwired/stimulus"
2
2
 
3
3
  export default class extends Controller {
4
4
  static targets = [ "button", "tab" ]
5
- static values = { selected: String }
5
+ static values = { selected: String }
6
6
 
7
7
  initialize() {
8
8
  this.#showSelectedTab()
9
9
  }
10
10
 
11
- select(event) {
12
- this.selectedValue = event.target.dataset.value
11
+ select({ target }) {
12
+ this.selectedValue = target.dataset.value
13
13
  this.#showSelectedTab()
14
14
  }
15
15
 
16
16
  #showSelectedTab() {
17
17
  this.buttonTargets.forEach(element => {
18
- element.dataset.selected = element.dataset.value === this.selectedValue
18
+ element.ariaSelected = element.dataset.value === this.selectedValue
19
19
  })
20
20
 
21
21
  this.tabTargets.forEach(element => {
22
- element.hidden = element.dataset.value !== this.selectedValue
22
+ element.hidden = element.id !== this.selectedValue
23
23
  })
24
24
  }
25
25
  }
@@ -1,7 +1,7 @@
1
1
  :root {
2
2
  /* Abstractions */
3
3
  --color-bg: white;
4
- --color-text: black;
4
+ --color-text: var(--zinc-950);
5
5
  --color-text-reversed: white;
6
6
  --color-text-subtle: var(--zinc-500);
7
7
  --color-link: var(--blue-700);
@@ -18,17 +18,17 @@
18
18
  --color-positive: var(--green-600);
19
19
 
20
20
  /* SVG color values */
21
- --color-filter-text: invert(0);
21
+ --color-filter-text: invert(2%) sepia(3%) saturate(3904%) hue-rotate(201deg) brightness(98%) contrast(97%);
22
22
  --color-filter-text-reversed: invert(100%);
23
- --color-filter-text-subtle: invert(43%) sepia(8%) saturate(340%) hue-rotate(202deg) brightness(99%) contrast(85%);
24
- --color-filter-negative: invert(31%) sepia(96%) saturate(4646%) hue-rotate(350deg) brightness(91%) contrast(89%);
25
- --color-filter-positive: invert(48%) sepia(74%) saturate(520%) hue-rotate(90deg) brightness(89%) contrast(90%);
23
+ --color-filter-text-subtle: invert(46%) sepia(8%) saturate(371%) hue-rotate(202deg) brightness(93%) contrast(85%);
24
+ --color-filter-negative: invert(22%) sepia(85%) saturate(1790%) hue-rotate(339deg) brightness(105%) contrast(108%);
25
+ --color-filter-positive: invert(44%) sepia(89%) saturate(409%) hue-rotate(89deg) brightness(94%) contrast(97%);
26
26
 
27
27
  @media (prefers-color-scheme: dark) {
28
28
  /* Abstractions */
29
29
  --color-bg: var(--zinc-950);
30
30
  --color-text: white;
31
- --color-text-reversed: black;
31
+ --color-text-reversed: var(--zinc-950);
32
32
  --color-text-subtle: var(--zinc-400);
33
33
  --color-link: var(--sky-400);
34
34
  --color-border-light: var(--zinc-800);
@@ -45,10 +45,10 @@
45
45
 
46
46
  /* SVG color values */
47
47
  --color-filter-text: invert(100%);
48
- --color-filter-text-reversed: invert(0);
49
- --color-filter-text-subtle: invert(55%) sepia(98%) saturate(0%) hue-rotate(299deg) brightness(96%) contrast(94%);
50
- --color-filter-negative: invert(15%) sepia(83%) saturate(2066%) hue-rotate(345deg) brightness(87%) contrast(88%);
51
- --color-filter-positive: invert(23%) sepia(74%) saturate(495%) hue-rotate(91deg) brightness(88%) contrast(89%);
48
+ --color-filter-text-reversed: invert(2%) sepia(3%) saturate(3904%) hue-rotate(201deg) brightness(98%) contrast(97%);
49
+ --color-filter-text-subtle: invert(76%) sepia(8%) saturate(230%) hue-rotate(201deg) brightness(84%) contrast(87%);
50
+ --color-filter-negative: invert(16%) sepia(62%) saturate(2100%) hue-rotate(337deg) brightness(92%) contrast(100%);
51
+ --color-filter-positive: invert(21%) sepia(62%) saturate(549%) hue-rotate(91deg) brightness(101%) contrast(91%);
52
52
  }
53
53
  }
54
54
 
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.32
4
+ version: 0.0.34
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-08-30 00:00:00.000000000 Z
11
+ date: 2024-09-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com
@@ -29,8 +29,6 @@ files:
29
29
  - app/assets/stylesheets/transition.css
30
30
  - app/assets/stylesheets/typography.css
31
31
  - app/assets/stylesheets/zutilities.css
32
- - app/helpers/dialog_helper.rb
33
- - app/helpers/tabs_helper.rb
34
32
  - lib/css-zero.rb
35
33
  - lib/css_zero/engine.rb
36
34
  - lib/css_zero/version.rb
@@ -45,6 +43,7 @@ files:
45
43
  - lib/generators/css_zero/add/templates/app/assets/images/circle-alert.svg
46
44
  - lib/generators/css_zero/add/templates/app/assets/images/ellipsis.svg
47
45
  - lib/generators/css_zero/add/templates/app/assets/images/loader-circle.svg
46
+ - lib/generators/css_zero/add/templates/app/assets/images/menu.svg
48
47
  - lib/generators/css_zero/add/templates/app/assets/images/select-arrow.svg
49
48
  - lib/generators/css_zero/add/templates/app/assets/images/x.svg
50
49
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/accordion.css
@@ -1,5 +0,0 @@
1
- module DialogHelper
2
- def button_to_close_dialog(content = nil, **, &)
3
- tag.form tag.button(content, **, &), method: :dialog
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module TabsHelper
2
- def tab_button(content = nil, value:, **, &)
3
- tag.button(content, class: "btn", data: { tabs_target: "button", action: "tabs#select", value: }, **, &)
4
- end
5
- end