css-zero 0.0.41 → 0.0.42

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: 1a6f169a735b32dc7a7d9c1e2f4796e4dbbfd7198f0aa3fcee5540e45d91f33e
4
- data.tar.gz: b3b10a68322044a44c154275e2680356b2a633ed87de0e8860387c0333df30f7
3
+ metadata.gz: 9147bdaa40d0da67f7bfa6c4ee6ec20485051188a857184f858c051148a544b6
4
+ data.tar.gz: efc47b5ed912f4a6739482d492e65523ffa95dea8d5c237e44ff1a94ce2b9f88
5
5
  SHA512:
6
- metadata.gz: '08bd1158769b2a955b7a3c4508567e309ece4cb923b259b87a2963546c2f844603280e6cb16f772440b14a05de2d68ea1885e76833cac5391a401a852e341858'
7
- data.tar.gz: ae28b4bab6aa03bccaa82693628e54094abe8dab787ed4a82814382a088e1fc505f922c182e0fbadc31dc5dee77be1b3c7b68e0f23d02b58e22134a966554612
6
+ metadata.gz: cec2e300f215ab9f92d50cd61b6336ccbdb6189e071eb266841198fbda4b7ac6f20385832065674a4732f3e35677cb4e4382e483c0f6334423e082f4b73538fd
7
+ data.tar.gz: 16f064b7bc328519e52e58c635a1fc6941176d7e7098852072fb1dd7a209ccc7107e20108372a3bfba5037fe4101824d1fe77ae62a24a8f0e0d285c4e44385fb
data/README.md CHANGED
@@ -19,7 +19,7 @@ bin/rails generate css_zero:install
19
19
  Add only the components you need. (Optional)
20
20
 
21
21
  ```
22
- bin/rails generate css_zero:add accordion alert avatar badge breadcrumb button card carousel command collapsible dialog flash fullscreen hotkey input input_concerns layouts lightbox local_time pagination progress prose sheet skeleton switch table tabs upload_preview toggle web_share
22
+ bin/rails generate css_zero:add accordion alert avatar badge breadcrumb button card carousel check_all command collapsible dialog flash fullscreen hotkey input input_concerns layouts lightbox local_time pagination progress prose sheet skeleton switch table tabs upload_preview toggle web_share
23
23
  ```
24
24
 
25
25
  ### Requirements
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.41"
2
+ VERSION = "0.0.42"
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 avatar badge breadcrumb button card carousel command collapsible dialog flash fullscreen hotkey input input_concerns layouts lightbox local_time pagination progress prose sheet skeleton switch table tabs upload_preview toggle web_share
5
+ accordion alert avatar badge breadcrumb button card carousel check_call command collapsible dialog flash fullscreen hotkey input input_concerns layouts lightbox local_time pagination progress prose sheet skeleton switch table tabs upload_preview toggle web_share
6
6
 
7
7
  Example:
8
8
  bin/rails generate css_zero:add [components...]
@@ -20,9 +20,11 @@ carousel:
20
20
  - app/javascript/controllers/carousel_controller.js
21
21
  - app/assets/images/arrow-left.svg
22
22
  - app/assets/images/arrow-right.svg
23
+ check_all:
24
+ - app/assets/stylesheets/check_all_controller.js
23
25
  command:
24
26
  - app/assets/stylesheets/command.css
25
- - app/javascript/controllers/command_controller.js
27
+ - app/javascript/controllers/filter_controller.js
26
28
  - app/assets/images/search.svg
27
29
  collapsible:
28
30
  - app/javascript/controllers/collapsible_controller.js
@@ -9,6 +9,7 @@
9
9
  font-size: var(--btn-font-size, var(--text-sm));
10
10
  font-weight: var(--btn-font-weight, var(--font-medium));
11
11
  gap: var(--size-2);
12
+ inline-size: var(--btn-inline-size, auto);
12
13
  justify-content: var(--btn-justify-content, center);
13
14
  padding: var(--btn-padding, 0.5rem 1rem);
14
15
  text-align: center;
@@ -58,13 +58,9 @@
58
58
  }
59
59
 
60
60
  .command__list--filtering {
61
+ &:not(:has(.selected)) > .command__empty { display: flex; }
61
62
  .command__group { display: none; }
62
63
  .command__group:has(.selected) { display: flex; }
63
-
64
64
  .command__item { display: none; }
65
65
  .command__item:is(.selected) { display: flex; }
66
-
67
- &:not(:has(.command__item.selected)) {
68
- .command__empty { display: flex; }
69
- }
70
66
  }
@@ -6,7 +6,10 @@
6
6
  color: var(--color-text-reversed);
7
7
  display: flex;
8
8
  gap: var(--size-2);
9
+ inset: 0;
10
+ justify-content: center;
9
11
  line-height: var(--leading-none);
12
+ margin-block-start: var(--flash-position, 0);
10
13
  margin-inline: auto;
11
14
  min-block-size: var(--size-11);
12
15
  padding: var(--size-1) var(--size-4);
@@ -8,7 +8,7 @@
8
8
  padding: var(--input-padding, 0.5rem 1rem);
9
9
 
10
10
  option {
11
- padding-block: revert;
11
+ padding-block: 2px;
12
12
  }
13
13
 
14
14
  &:is(textarea[rows=auto]) {
@@ -12,8 +12,7 @@
12
12
  --btn-background: transparent;
13
13
  --btn-border-color: transparent;
14
14
  --btn-hover-lightness: 100%;
15
-
16
- inline-size: var(--size-full);
15
+ --btn-inline-size: var(--size-full);
17
16
 
18
17
  &[aria-selected=true] {
19
18
  --btn-background: var(--color-bg);
@@ -0,0 +1,34 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class extends Controller {
4
+ static targets = [ "dependee", "dependant" ]
5
+
6
+ connect() {
7
+ this.#checkDependee()
8
+ }
9
+
10
+ check({ target }) {
11
+ target === this.dependeeTarget ? this.#checkDependants() : this.#checkDependee()
12
+ }
13
+
14
+ #checkDependants() {
15
+ this.dependantTargets.forEach(e => e.checked = this.dependeeTarget.checked)
16
+ }
17
+
18
+ #checkDependee() {
19
+ this.dependeeTarget.checked = this.#allChecked
20
+ this.dependeeTarget.indeterminate = this.#indeterminate
21
+ }
22
+
23
+ get #indeterminate() {
24
+ return this.#atLeastOneChecked && !this.#allChecked;
25
+ }
26
+
27
+ get #atLeastOneChecked() {
28
+ return this.dependantTargets.some(e => e.checked)
29
+ }
30
+
31
+ get #allChecked() {
32
+ return this.dependantTargets.every(e => e.checked)
33
+ }
34
+ }
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.41
4
+ version: 0.0.42
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-03 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com
@@ -80,12 +80,13 @@ files:
80
80
  - lib/generators/css_zero/add/templates/app/assets/stylesheets/toggle.css
81
81
  - lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
82
82
  - lib/generators/css_zero/add/templates/app/javascript/controllers/carousel_controller.js
83
+ - lib/generators/css_zero/add/templates/app/javascript/controllers/check_all_controller.js
83
84
  - lib/generators/css_zero/add/templates/app/javascript/controllers/clearable_input_controller.js
84
85
  - lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js
85
- - lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js
86
86
  - lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js
87
87
  - lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_controller.js
88
88
  - lib/generators/css_zero/add/templates/app/javascript/controllers/element_removal_controller.js
89
+ - lib/generators/css_zero/add/templates/app/javascript/controllers/filter_controller.js
89
90
  - lib/generators/css_zero/add/templates/app/javascript/controllers/form_controller.js
90
91
  - lib/generators/css_zero/add/templates/app/javascript/controllers/fullscreen_controller.js
91
92
  - lib/generators/css_zero/add/templates/app/javascript/controllers/hotkey_controller.js