css-zero 0.0.60 → 0.0.61

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 871a8269f4d74512519b9582720a027fe3ef50162cc5391aa4c53874ecb496f2
4
- data.tar.gz: 0e42421a174fbda4a1d7246ebd46f36bb60425cb0e3e6943fc553e85ac9e3565
3
+ metadata.gz: b704e3a3d8b4b380575985a2c56480f3f772d32ed9132786de42e4f098b89d90
4
+ data.tar.gz: bc56740674826f1c932eb8ab5acd1fe603b3a21a0df6a61efead4dc2d5d1eb15
5
5
  SHA512:
6
- metadata.gz: 330c2aa8bf2cf91b9fad4fb573e52900789f93556f6cb5e6552e56311b0ab07e8f28c24ca95e626c25552213906705a1f45a9013a85dbd1cb30066e1a2004f6e
7
- data.tar.gz: 8501b13069a736a3f89f83634f841680daea78db53341a5e77d0deb417a352187633efeb294cadd4bf8f112cb2e2299e307a6ff1071facd09af5ab3af69c10eb
6
+ metadata.gz: 0e97246d26938cf23bb9934ded34165c3778794b103343e00ec9bdbcb789a53b31f6f047a3c7b9d3e74c422f375959220963f1b5fe0a0a86ce1877b15d52f298
7
+ data.tar.gz: cffeabee864a7819a10e67c6156af52165154af6d2d69a42cb9e970e01a1d1fb0c4a8d67e9408c815ebf3d864e00cfa8a34c922cfe1ebd4792532979f78a7bd0
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.60"
2
+ VERSION = "0.0.61"
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 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:
@@ -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.60
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-08 00:00:00.000000000 Z
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