css-zero 0.0.68 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/zutilities.css +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 +2 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/autoanimate.css +2 -2
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/group.css +23 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js +6 -11
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/chart_controller.js +4 -6
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js +1 -11
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/filter_controller.js +1 -11
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b0f3e711287beb458faf297d83d9ea04318425f54ed6548be547a987d1070c5
|
4
|
+
data.tar.gz: d46f8c2baea4bf522bfb7ebe8a44da65b39db2695a963c9d1ba06761a31d35cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b14d8872110a600f24be84cf14797504384f1a2209a5c0986eabaa3317aeda8200174f5d54433ba522b4b6f53352aed9a6ebe6e14f56f1d7a89deb880793e9a7
|
7
|
+
data.tar.gz: 94e9a9698d47d6c4118de58819e671e5520ce06fa388b23cd387efc97fde53d56ce3988afe2d16e27173afe58edb58bd04e7bd66f6fd3c7edb7b2825d7a67288
|
@@ -121,7 +121,7 @@
|
|
121
121
|
.border-main { border-color: var(--color-border); }
|
122
122
|
.border-dark { border-color: var(--color-border-dark); }
|
123
123
|
|
124
|
-
.rounded-none { border-radius:
|
124
|
+
.rounded-none { border-radius: 0; }
|
125
125
|
.rounded-sm { border-radius: var(--rounded-sm); }
|
126
126
|
.rounded { border-radius: var(--rounded); }
|
127
127
|
.rounded-md { border-radius: var(--rounded-md); }
|
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 autoanimate autosave avatar badge breadcrumb button card carousel chart check_all combobox command collapsible datepicker dialog dropdown flash form fullscreen hotkey input input_concerns inputmask layouts lightbox local_time navigation pagination progress prose sheet skeleton sortable switch table tabs tooltip trix upload_preview toggle web_share
|
5
|
+
accordion alert autoanimate autosave avatar badge breadcrumb button card carousel chart check_all combobox command collapsible datepicker dialog dropdown flash form fullscreen group hotkey input input_concerns inputmask layouts lightbox local_time navigation pagination progress prose sheet skeleton sortable switch table tabs tooltip trix upload_preview toggle web_share
|
6
6
|
|
7
7
|
Example:
|
8
8
|
bin/rails generate css_zero:add [components...]
|
@@ -4,12 +4,12 @@
|
|
4
4
|
|
5
5
|
::view-transition-old(.auto-animation):only-child {
|
6
6
|
animation: var(--animate-fade-out) forwards;
|
7
|
-
animation-duration: var(--time-
|
7
|
+
animation-duration: var(--time-300);
|
8
8
|
opacity: 1;
|
9
9
|
}
|
10
10
|
|
11
11
|
::view-transition-new(.auto-animation):only-child {
|
12
12
|
animation: var(--animate-fade-in) forwards;
|
13
|
-
animation-duration: var(--time-
|
13
|
+
animation-duration: var(--time-300);
|
14
14
|
opacity: 0;
|
15
15
|
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
.group {
|
2
|
+
align-items: center;
|
3
|
+
display: flex;
|
4
|
+
|
5
|
+
:first-child {
|
6
|
+
border-end-end-radius: 0;
|
7
|
+
border-start-end-radius: 0;
|
8
|
+
}
|
9
|
+
|
10
|
+
:last-child {
|
11
|
+
border-end-start-radius: 0;
|
12
|
+
border-start-start-radius: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
:not(:first-child, :last-child) {
|
16
|
+
border-radius: 0;
|
17
|
+
margin-inline: -1px;
|
18
|
+
}
|
19
|
+
|
20
|
+
> :focus-visible {
|
21
|
+
z-index: 1;
|
22
|
+
}
|
23
|
+
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js
CHANGED
@@ -24,10 +24,15 @@ export default class extends Controller {
|
|
24
24
|
async #save() {
|
25
25
|
this.#updateAppearance(true)
|
26
26
|
this.#resetTimer()
|
27
|
-
await submitForm(this.element)
|
27
|
+
await this.#submitForm(this.element)
|
28
28
|
this.#updateAppearance()
|
29
29
|
}
|
30
30
|
|
31
|
+
async #submitForm(form) {
|
32
|
+
const request = new FetchRequest(form.method, form.action, { body: new FormData(form) })
|
33
|
+
return await request.perform()
|
34
|
+
}
|
35
|
+
|
31
36
|
#updateAppearance(saving = false) {
|
32
37
|
if (saving) {
|
33
38
|
this.element.setAttribute("aria-busy", true)
|
@@ -52,13 +57,3 @@ export default class extends Controller {
|
|
52
57
|
return !!this.#timer
|
53
58
|
}
|
54
59
|
}
|
55
|
-
|
56
|
-
// Helpers
|
57
|
-
|
58
|
-
async function submitForm(form) {
|
59
|
-
const request = new FetchRequest(form.method, form.action, {
|
60
|
-
body: new FormData(form)
|
61
|
-
})
|
62
|
-
|
63
|
-
return await request.perform()
|
64
|
-
}
|
@@ -10,6 +10,10 @@ Chart.defaults.color = getCssVariableValue("--color-text")
|
|
10
10
|
Chart.defaults.font.family = getCssVariableValue("--font-system-ui")
|
11
11
|
Chart.defaults.font.size = 12
|
12
12
|
|
13
|
+
function getCssVariableValue(variableName) {
|
14
|
+
return getComputedStyle(document.documentElement).getPropertyValue(variableName).trim()
|
15
|
+
}
|
16
|
+
|
13
17
|
export default class extends Controller {
|
14
18
|
static values = { type: { type: String, default: "line" }, data: Object, options: Object }
|
15
19
|
|
@@ -24,10 +28,4 @@ export default class extends Controller {
|
|
24
28
|
get #settings() {
|
25
29
|
return { type: this.typeValue, data: this.dataValue, options: this.optionsValue }
|
26
30
|
}
|
27
|
-
}
|
28
|
-
|
29
|
-
// Helpers
|
30
|
-
|
31
|
-
function getCssVariableValue(variableName) {
|
32
|
-
return getComputedStyle(document.documentElement).getPropertyValue(variableName).trim()
|
33
31
|
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { debounce } from "https://cdn.skypack.dev/es-toolkit@v1.27.0/function"
|
2
3
|
|
3
4
|
export default class extends Controller {
|
4
5
|
static targets = [ "input", "copyIcon", "successIcon" ]
|
@@ -35,14 +36,3 @@ export default class extends Controller {
|
|
35
36
|
this.successIconTarget.hidden = !this.copiedValue
|
36
37
|
}
|
37
38
|
}
|
38
|
-
|
39
|
-
// Helpers
|
40
|
-
|
41
|
-
function debounce(fn, delay = 1000) {
|
42
|
-
let timeoutId = null
|
43
|
-
|
44
|
-
return (...args) => {
|
45
|
-
clearTimeout(timeoutId)
|
46
|
-
timeoutId = setTimeout(() => fn.apply(this, args), delay)
|
47
|
-
}
|
48
|
-
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { debounce } from "https://cdn.skypack.dev/es-toolkit@v1.27.0/function"
|
2
3
|
|
3
4
|
export default class extends Controller {
|
4
5
|
static targets = [ "list" ]
|
@@ -41,14 +42,3 @@ export default class extends Controller {
|
|
41
42
|
this.dispatch("after")
|
42
43
|
}
|
43
44
|
}
|
44
|
-
|
45
|
-
// Helpers
|
46
|
-
|
47
|
-
function debounce(fn, delay = 1000) {
|
48
|
-
let timeoutId = null
|
49
|
-
|
50
|
-
return (...args) => {
|
51
|
-
clearTimeout(timeoutId)
|
52
|
-
timeoutId = setTimeout(() => fn.apply(this, args), delay)
|
53
|
-
}
|
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.
|
4
|
+
version: 0.0.70
|
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-11-
|
11
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css
|
70
70
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/flash.css
|
71
71
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/flatpickr.css
|
72
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/group.css
|
72
73
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
|
73
74
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/layouts.css
|
74
75
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/lightbox.css
|