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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 533d8a1cf38cd84982b5966e4cf637f575e99c4f9547b18025e2327864be0cb3
4
- data.tar.gz: 6a318e6ce1611f64b01ab8e226630450adc9fe2a5bba80f4daf1396e3fa62953
3
+ metadata.gz: b704e3a3d8b4b380575985a2c56480f3f772d32ed9132786de42e4f098b89d90
4
+ data.tar.gz: bc56740674826f1c932eb8ab5acd1fe603b3a21a0df6a61efead4dc2d5d1eb15
5
5
  SHA512:
6
- metadata.gz: e68b22eca9bd7147a435e13f3e872a2001f2d3b2365c22fcf0272c19a9acb87fdd9ea6609abed0b57d88540032531cccdd24cc3b25c60bcf1af4e3a9592ee453
7
- data.tar.gz: a48d660993be5b3b101541587f2d6e5dc905931d898128e37ee9e62b791e9df8f9af80493bd9cb9d45d043181d5af540a339ab01514198bca01b787948619818
6
+ metadata.gz: 0e97246d26938cf23bb9934ded34165c3778794b103343e00ec9bdbcb789a53b31f6f047a3c7b9d3e74c422f375959220963f1b5fe0a0a86ce1877b15d52f298
7
+ data.tar.gz: cffeabee864a7819a10e67c6156af52165154af6d2d69a42cb9e970e01a1d1fb0c4a8d67e9408c815ebf3d864e00cfa8a34c922cfe1ebd4792532979f78a7bd0
data/README.md CHANGED
@@ -16,7 +16,7 @@ Run the install command.
16
16
  bin/rails generate css_zero:install
17
17
  ```
18
18
 
19
- Add the additional components you need.
19
+ Add the additional components you need. (Optional)
20
20
 
21
21
  ```
22
22
  bin/rails generate css_zero:add --help
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.59"
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:
@@ -1,7 +1,8 @@
1
1
  .flash {
2
2
  align-items: center;
3
3
  animation: appear-then-fade 4s 300ms both;
4
- background-color: var(--color-text);
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
  }
@@ -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.59
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