css-zero 0.0.59 → 0.0.61
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 +4 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/flash.css +6 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/navigation_controller.js +16 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js +23 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b704e3a3d8b4b380575985a2c56480f3f772d32ed9132786de42e4f098b89d90
|
4
|
+
data.tar.gz: bc56740674826f1c932eb8ab5acd1fe603b3a21a0df6a61efead4dc2d5d1eb15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e97246d26938cf23bb9934ded34165c3778794b103343e00ec9bdbcb789a53b31f6f047a3c7b9d3e74c422f375959220963f1b5fe0a0a86ce1877b15d52f298
|
7
|
+
data.tar.gz: cffeabee864a7819a10e67c6156af52165154af6d2d69a42cb9e970e01a1d1fb0c4a8d67e9408c815ebf3d864e00cfa8a34c922cfe1ebd4792532979f78a7bd0
|
data/README.md
CHANGED
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 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 pagination progress prose sheet skeleton switch table tabs trix upload_preview toggle web_share
|
5
|
+
accordion alert 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 trix upload_preview toggle web_share
|
6
6
|
|
7
7
|
Example:
|
8
8
|
bin/rails generate css_zero:add [components...]
|
@@ -87,6 +87,8 @@ lightbox:
|
|
87
87
|
- app/assets/images/x.svg
|
88
88
|
local_time:
|
89
89
|
- app/javascript/controllers/local_time_controller.js
|
90
|
+
navigation:
|
91
|
+
- app/javascript/controllers/navigation_controller.js
|
90
92
|
pagination:
|
91
93
|
- app/assets/images/chevron-right.svg
|
92
94
|
- app/assets/images/chevron-left.svg
|
@@ -104,6 +106,8 @@ sheet:
|
|
104
106
|
- app/assets/images/x.svg
|
105
107
|
skeleton:
|
106
108
|
- app/assets/stylesheets/skeleton.css
|
109
|
+
sortable:
|
110
|
+
- app/javascript/controllers/sortable_controller.js
|
107
111
|
switch:
|
108
112
|
- app/assets/stylesheets/switch.css
|
109
113
|
table:
|
@@ -1,7 +1,8 @@
|
|
1
1
|
.flash {
|
2
2
|
align-items: center;
|
3
3
|
animation: appear-then-fade 4s 300ms both;
|
4
|
-
|
4
|
+
backdrop-filter: var(--blur) var(--contrast-75);
|
5
|
+
background-color: hsl(from var(--color-text) h s l / .65);
|
5
6
|
border-radius: var(--rounded-full);
|
6
7
|
color: var(--color-text-reversed);
|
7
8
|
display: flex;
|
@@ -14,6 +15,10 @@
|
|
14
15
|
padding: var(--size-1) var(--size-4);
|
15
16
|
text-align: center;
|
16
17
|
|
18
|
+
[data-turbo-preview] & {
|
19
|
+
display: none;
|
20
|
+
}
|
21
|
+
|
17
22
|
@media (width >= 40rem) {
|
18
23
|
font-size: var(--text-lg);
|
19
24
|
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/navigation_controller.js
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { Turbo } from "@hotwired/turbo-rails"
|
3
|
+
|
4
|
+
export default class extends Controller {
|
5
|
+
back() {
|
6
|
+
history.back()
|
7
|
+
}
|
8
|
+
|
9
|
+
forward() {
|
10
|
+
history.forward()
|
11
|
+
}
|
12
|
+
|
13
|
+
reload() {
|
14
|
+
Turbo.visit(location.href, { action: "replace", shouldCacheSnapshot: false })
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { put } from "https://cdn.skypack.dev/@rails/request.js@0.0.11"
|
3
|
+
import Sortable from "https://cdn.skypack.dev/sortablejs"
|
4
|
+
|
5
|
+
export default class extends Controller {
|
6
|
+
static values = { url: String, group: String, handle: String }
|
7
|
+
|
8
|
+
connect() {
|
9
|
+
this.sortable = new Sortable(this.element, this.#options)
|
10
|
+
}
|
11
|
+
|
12
|
+
disconnect() {
|
13
|
+
this.sortable.destroy()
|
14
|
+
}
|
15
|
+
|
16
|
+
#submit({ item, newIndex, to }) {
|
17
|
+
put(item.dataset.urlValue, { responseKind: "plain", query: { position: newIndex, parent_id: to.dataset.parentId } })
|
18
|
+
}
|
19
|
+
|
20
|
+
get #options() {
|
21
|
+
return { animation: 150, onAdd: this.#submit, onUpdate: this.#submit, group: this.groupValue, handle: this.handleValue }
|
22
|
+
}
|
23
|
+
}
|
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.61
|
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-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|
@@ -106,8 +106,10 @@ files:
|
|
106
106
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/list_controller.js
|
107
107
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/local_time_controller.js
|
108
108
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/menu_controller.js
|
109
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/navigation_controller.js
|
109
110
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js
|
110
111
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/revealable_input_controller.js
|
112
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js
|
111
113
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/tabs_controller.js
|
112
114
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/upload_preview_controller.js
|
113
115
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/web_share_controller.js
|