css-zero 0.0.41 → 0.0.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/USAGE +1 -1
- data/lib/generators/css_zero/add/resources.yml +3 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/command.css +1 -5
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/flash.css +3 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/tabs.css +1 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/check_all_controller.js +34 -0
- metadata +4 -3
- /data/lib/generators/css_zero/add/templates/app/javascript/controllers/{command_controller.js → filter_controller.js} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ced95bc29890a4882d0c31a40d2b109ac5c118f6fce4e7663e48d710b8d54a50
|
4
|
+
data.tar.gz: 62f21e06f144267737c578db2942dddbfd46d36f30a4c3e78b85ceea550408f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e2c45036d2d68f17ac5a064cb7c84acb9d6870e375c35afd7c03dbf9c6b8e4c0931db0ba9ce6d77e2ef699f199cc854a589f856033f419f183909da22c1b4ca
|
7
|
+
data.tar.gz: f33fc4eb0c24ab0fca8c8ac37155f0378c93cb11e0ad34c748cde9ee94204cf3a7f218d245a783126d8da412b852306c1b5905d910be924fee33daa135c3b51f
|
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
|
data/lib/css_zero/version.rb
CHANGED
@@ -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/javascript/controllers/check_all_controller.js
|
23
25
|
command:
|
24
26
|
- app/assets/stylesheets/command.css
|
25
|
-
- app/javascript/controllers/
|
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);
|
@@ -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.
|
4
|
+
version: 0.0.43
|
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-
|
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
|