css-zero 4.2.2 → 4.3.0
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/CHANGELOG.md +23 -0
- data/app/assets/stylesheets/css-zero/utilities.css +2 -2
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/avatar.css +0 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/card.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/combobox.css +2 -2
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/command.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/datepicker.css +5 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css +0 -4
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/dropzone.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/group.css +0 -2
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/input_otp.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/layouts.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/lexxy.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/popover.css +0 -4
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/sheet.css +0 -4
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/sidebar_menu.css +0 -4
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/switch.css +0 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/toggle.css +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js +24 -8
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js +10 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/dropzone_controller.js +2 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/inputmask_controller.js +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/menu_controller.js +9 -74
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a53c87ec617153d3c974fb2efdbd0c957cc8cc16d96d3cab89de42bbc3a0b285
|
|
4
|
+
data.tar.gz: b4e6faacece7a73849e72afc821679bf13db9bd8fdf6765b20fd7454c9568441
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef07f360edf5fd8ea89cb3c576ab46bb181eae6b12bfda9b299a414e6676b47ac9f253f82000e1e029cea5b038fb7f6f2962157e601272a2b96edefe1faa728d
|
|
7
|
+
data.tar.gz: 1ba0cee5571959c133711ecf2988ddb502684c4b5bb98e7b296c5a23b2a0ca928b0f07ee2ad7285df90e2ef1df1b11645b683bdde9ee051782c5a3a147a587b5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## 4.3.0 - 2026-09-20
|
|
2
|
+
- Rename .overflow-x-auto and .overflow-y-auto to .overflow-i-auto and .overflow-b-auto
|
|
3
|
+
- Remove scroll snap from overflow utilities
|
|
4
|
+
- Use logical overflow properties in command and sidebar
|
|
5
|
+
- Refactor command
|
|
6
|
+
- Remove Safari exit animation guard from dialog, popover and sheet
|
|
7
|
+
- Remove obsolete ::-webkit-details-marker rule from sidebar menu
|
|
8
|
+
- Replace deprecated clip with clip-path in combobox and toggle
|
|
9
|
+
- Remove redundant padding fallback from card
|
|
10
|
+
- Remove redundant default declarations from avatar, group and switch
|
|
11
|
+
- Update activestorage to 8.1.301
|
|
12
|
+
- Update combobox-nav to 3.0.2
|
|
13
|
+
- Update dropzone to 7.4.4
|
|
14
|
+
- Update input-otp-zero to 0.0.4
|
|
15
|
+
- Update lexxy to 0.9.32
|
|
16
|
+
- Update maska to 3.2.1
|
|
17
|
+
- Update tom-select to 2.6.2
|
|
18
|
+
|
|
19
|
+
## 4.2.3 - 2026-09-07
|
|
20
|
+
- Prevent month header from wrapping in datepicker
|
|
21
|
+
- Refactor autosave
|
|
22
|
+
- Rebuild menu on top of roving-ux
|
|
23
|
+
|
|
1
24
|
## 4.2.2 - 2026-08-29
|
|
2
25
|
- Use position-try shorthand in popover
|
|
3
26
|
- Adjust dialog transition durations
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
.i-min { inline-size: min-content; }
|
|
152
152
|
.i-fit { inline-size: fit-content; }
|
|
153
153
|
|
|
154
|
-
.overflow-
|
|
155
|
-
.overflow-
|
|
154
|
+
.overflow-i-auto { overflow-inline: auto; }
|
|
155
|
+
.overflow-b-auto { overflow-block: auto; }
|
|
156
156
|
.overflow-hidden { overflow: hidden; }
|
|
157
157
|
|
|
158
158
|
.object-contain { object-fit: contain; }
|
data/lib/css_zero/version.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import url("https://esm.sh/tom-select@2.6.
|
|
1
|
+
@import url("https://esm.sh/tom-select@2.6.2/dist/css/tom-select.min.css");
|
|
2
2
|
|
|
3
3
|
.ts-control {
|
|
4
4
|
align-items: center;
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
[data-controller~="combobox"] {
|
|
138
|
-
clip:
|
|
138
|
+
clip-path: inset(50%); position: absolute;
|
|
139
139
|
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js
CHANGED
|
@@ -16,15 +16,9 @@ export default class extends Controller {
|
|
|
16
16
|
!this.#dirty && this.#scheduleSave()
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
#save() {
|
|
20
20
|
this.#resetTimer()
|
|
21
|
-
this.#
|
|
22
|
-
await this.#submitForm(this.element)
|
|
23
|
-
this.#toggleSaving(false)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async #submitForm(form) {
|
|
27
|
-
return await new FetchRequest(form.method, form.action, { body: new FormData(form) }).perform()
|
|
21
|
+
this.#submit()
|
|
28
22
|
}
|
|
29
23
|
|
|
30
24
|
#scheduleSave() {
|
|
@@ -36,11 +30,33 @@ export default class extends Controller {
|
|
|
36
30
|
this.#timer = null
|
|
37
31
|
}
|
|
38
32
|
|
|
33
|
+
async #submit() {
|
|
34
|
+
this.#toggleSaving(true)
|
|
35
|
+
await this.#performRequest()
|
|
36
|
+
this.#toggleSaving(false)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
39
|
#toggleSaving(saving) {
|
|
40
40
|
this.element.ariaBusy = saving
|
|
41
41
|
this.submitTarget.disabled = saving
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
#performRequest() {
|
|
45
|
+
return new FetchRequest(this.#method, this.#action, { body: this.#body }).perform()
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
get #method() {
|
|
49
|
+
return this.element.method
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get #action() {
|
|
53
|
+
return this.element.action
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get #body() {
|
|
57
|
+
return new FormData(this.element)
|
|
58
|
+
}
|
|
59
|
+
|
|
44
60
|
get #dirty() {
|
|
45
61
|
return !!this.#timer
|
|
46
62
|
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
|
2
2
|
import { get } from "https://esm.sh/@rails/request.js@0.0.13?standalone"
|
|
3
|
-
import TomSelect from "https://esm.sh/tom-select@2.6.
|
|
3
|
+
import TomSelect from "https://esm.sh/tom-select@2.6.2/base?standalone"
|
|
4
4
|
|
|
5
5
|
export default class extends Controller {
|
|
6
6
|
static values = { url: String, optionCreate: { type: String, default: "Add" }, noResults: { type: String, default: "No results found" } }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
|
2
|
-
import Combobox from "https://esm.sh/@github/combobox-nav@3.0.
|
|
2
|
+
import Combobox from "https://esm.sh/@github/combobox-nav@3.0.2?standalone"
|
|
3
3
|
import debounce from "https://esm.sh/just-debounce-it@3.2.0?standalone"
|
|
4
4
|
|
|
5
5
|
export default class extends Controller {
|
|
@@ -19,7 +19,7 @@ export default class extends Controller {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
filter({ target }) {
|
|
22
|
-
this.itemTargets.forEach(it => this.#matches(it.dataset.value, target.value) ? it
|
|
22
|
+
this.itemTargets.forEach(it => this.#matches(it.dataset.value, target.value) ? this.#show(it) : this.#hide(it))
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
commit({ target }) {
|
|
@@ -29,4 +29,12 @@ export default class extends Controller {
|
|
|
29
29
|
#matches(text, potentialMatch) {
|
|
30
30
|
return text.toLowerCase().includes(potentialMatch.toLowerCase())
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
#show(element) {
|
|
34
|
+
element.toggleAttribute("hidden", false)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#hide(element) {
|
|
38
|
+
element.toggleAttribute("hidden", true)
|
|
39
|
+
}
|
|
32
40
|
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/dropzone_controller.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
|
2
|
-
import { DirectUpload } from "https://esm.sh/@rails/activestorage@8.1.
|
|
3
|
-
import Dropzone from "https://esm.sh/@deltablot/dropzone@7.4.
|
|
2
|
+
import { DirectUpload } from "https://esm.sh/@rails/activestorage@8.1.301?standalone"
|
|
3
|
+
import Dropzone from "https://esm.sh/@deltablot/dropzone@7.4.4?standalone"
|
|
4
4
|
|
|
5
5
|
export default class extends Controller {
|
|
6
6
|
static values = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
|
2
|
+
import { rovingIndex } from "https://esm.sh/roving-ux@1.0.5?standalone"
|
|
2
3
|
|
|
3
4
|
export default class extends Controller {
|
|
4
5
|
static targets = [ "item" ]
|
|
5
|
-
static values = { index: Number }
|
|
6
6
|
|
|
7
7
|
#observer
|
|
8
8
|
|
|
@@ -18,85 +18,20 @@ export default class extends Controller {
|
|
|
18
18
|
this.#observer.disconnect()
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
navigate(event) {
|
|
22
|
-
switch (event.key) {
|
|
23
|
-
case " ":
|
|
24
|
-
case "Enter":
|
|
25
|
-
this.#cancel(event)
|
|
26
|
-
this.#activate(event.target)
|
|
27
|
-
break
|
|
28
|
-
case "ArrowUp":
|
|
29
|
-
this.#cancel(event)
|
|
30
|
-
this.#prev()
|
|
31
|
-
break
|
|
32
|
-
case "ArrowDown":
|
|
33
|
-
this.#cancel(event)
|
|
34
|
-
this.#next()
|
|
35
|
-
break
|
|
36
|
-
case "Home":
|
|
37
|
-
this.#cancel(event)
|
|
38
|
-
this.#first()
|
|
39
|
-
break
|
|
40
|
-
case "End":
|
|
41
|
-
this.#cancel(event)
|
|
42
|
-
this.#last()
|
|
43
|
-
break
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
#cancel(event) {
|
|
48
|
-
event.stopPropagation()
|
|
49
|
-
event.preventDefault()
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
#activate(menuItem) {
|
|
53
|
-
menuItem.click()
|
|
54
|
-
}
|
|
55
|
-
|
|
56
21
|
#reset([ entry ]) {
|
|
57
|
-
entry.isIntersecting && this.#
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
#prev() {
|
|
61
|
-
if (this.indexValue > 0) {
|
|
62
|
-
this.indexValue--
|
|
63
|
-
this.#update()
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
#next() {
|
|
68
|
-
if (this.indexValue < this.#lastIndex) {
|
|
69
|
-
this.indexValue++
|
|
70
|
-
this.#update()
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
#first() {
|
|
75
|
-
this.indexValue = 0
|
|
76
|
-
this.#update()
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
#last() {
|
|
80
|
-
this.indexValue = this.#lastIndex
|
|
81
|
-
this.#update()
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
#update() {
|
|
85
|
-
this.#updateTabstops()
|
|
86
|
-
this.#focusItemAtIndex()
|
|
22
|
+
entry.isIntersecting && this.#start()
|
|
87
23
|
}
|
|
88
24
|
|
|
89
|
-
#
|
|
90
|
-
this
|
|
91
|
-
|
|
92
|
-
})
|
|
25
|
+
#start() {
|
|
26
|
+
this.#rovingIndex()
|
|
27
|
+
this.#focus()
|
|
93
28
|
}
|
|
94
29
|
|
|
95
|
-
#
|
|
96
|
-
this.
|
|
30
|
+
#rovingIndex() {
|
|
31
|
+
rovingIndex({ element: this.element, target: "[data-menu-target='item']" })
|
|
97
32
|
}
|
|
98
33
|
|
|
99
|
-
|
|
100
|
-
|
|
34
|
+
#focus() {
|
|
35
|
+
this.itemTargets[0].focus()
|
|
101
36
|
}
|
|
102
37
|
}
|