css-zero 0.0.85 → 0.0.87

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: 9d55393b875fa276f7e2ea8a7968c8cbcc3d09a3321a8c5e779c6a15dd698820
4
- data.tar.gz: bd3e87ca9591451c225ef969da3c1a165eab5d3922b79380b99dbb46973ad31e
3
+ metadata.gz: 9168f8d1372487bab5e744a8c000ec2cc3d4c9ed5feed65a9d781042f120e249
4
+ data.tar.gz: bc5fb02ebbc7525025b1a5a4ab69b9a2ad41941d5233e2df018d710fce3fd352
5
5
  SHA512:
6
- metadata.gz: bd4379518ff6301804054816b1d55f76d2b625892630e1b20de2c4e4699f87d822786b158063397319162505abb699ff1f97d11c121b7b80aaeba2f95b75621f
7
- data.tar.gz: 64d396a25c47d11e0e868880ad756c799628850e92baad28cf6689fce0b829835b4670827a41f341e7fa943fd2e9681e7da1eeb6e2019b12d52a9b26629f27de
6
+ metadata.gz: 3d26011763529941789b1b12e10b4e3e40988ab554fc6b9683df16bdf943caa4a0e2404c3303ac436b786ddaca139c52843f0bacb6aa16fa9ddc8d8ba1bd490a
7
+ data.tar.gz: ce390f1eb3dc6af677044d60182926afad29c302cb2f2180ad2172bb31743edaaac166857e7f72a3f6be9b313918fc29424c67f5789e44e6c0c08152435c89f7
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.85"
2
+ VERSION = "0.0.87"
3
3
  end
@@ -52,6 +52,7 @@ dropdown:
52
52
  - app/javascript/controllers/popover_controller.js
53
53
  - app/assets/stylesheets/menu.css
54
54
  - app/javascript/controllers/menu_controller.js
55
+ - app/javascript/controllers/context_menu_controller.js
55
56
  flash:
56
57
  - app/assets/stylesheets/flash.css
57
58
  - app/javascript/controllers/element_removal_controller.js
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  h6 {
40
- font-size: 0.9em;
40
+ font-size: 0.8em;
41
41
  }
42
42
 
43
43
  :is(ul, ol, menu) {
@@ -99,8 +99,3 @@
99
99
  .invalid .ts-control {
100
100
  border-color: var(--color-negative);
101
101
  }
102
-
103
- [data-controller*="combobox"] {
104
- clip: rect(0 0 0 0);
105
- position: absolute;
106
- }
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { FetchRequest } from "https://cdn.skypack.dev/@rails/request.js@0.0.11?min"
2
+ import { FetchRequest } from "https://cdn.jsdelivr.net/npm/@rails/request.js@0.0.11/+esm"
3
3
 
4
4
  const AUTOSAVE_INTERVAL = 3000
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { Chart, registerables } from "https://cdn.skypack.dev/chart.js@4.4.6?min"
2
+ import { Chart, registerables } from "https://cdn.jsdelivr.net/npm/chart.js@4.4.7/+esm"
3
3
 
4
4
  Chart.register(...registerables)
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { get } from "https://cdn.skypack.dev/@rails/request.js@0.0.11?min"
3
- import TomSelect from "https://cdn.skypack.dev/tom-select@2.3.1?min"
2
+ import { get } from "https://cdn.jsdelivr.net/npm/@rails/request.js@0.0.11/+esm"
3
+ import TomSelect from "https://cdn.jsdelivr.net/npm/tom-select@2.4.1/+esm"
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,6 +1,6 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { debounce } from "https://cdn.skypack.dev/lodash-es@4.17.21?min"
3
- import Combobox from "https://cdn.skypack.dev/@github/combobox-nav@3.0.1?min"
2
+ import debounce from "https://cdn.jsdelivr.net/npm/lodash.debounce@4.0.8/+esm"
3
+ import Combobox from "https://cdn.jsdelivr.net/npm/@github/combobox-nav@3.0.1/+esm"
4
4
 
5
5
  export default class extends Controller {
6
6
  static targets = [ "input", "list" ]
@@ -0,0 +1,11 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class extends Controller {
4
+ static targets = [ "menu" ]
5
+
6
+ show(event) {
7
+ this.menuTarget.style.insetInlineStart = `${event.clientX - 5}px`
8
+ this.menuTarget.style.insetBlockStart = `${event.clientY - 5}px`
9
+ setTimeout(() => this.menuTarget.showPopover(), 150)
10
+ }
11
+ }
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { debounce } from "https://cdn.skypack.dev/lodash-es@4.17.21?min"
2
+ import debounce from "https://cdn.jsdelivr.net/npm/lodash.debounce@4.0.8/+esm"
3
3
 
4
4
  export default class extends Controller {
5
5
  static targets = [ "input", "copyIcon", "successIcon" ]
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import flatpickr from "https://cdn.skypack.dev/flatpickr@4.6.13?min"
2
+ import flatpickr from "https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/+esm"
3
3
 
4
4
  export default class extends Controller {
5
5
  static targets = [ "details" ]
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import Inputmask from "https://cdn.skypack.dev/inputmask@5.0.9?min"
2
+ import Inputmask from "https://cdn.jsdelivr.net/npm/inputmask@5.0.9/+esm"
3
3
 
4
4
  export default class extends Controller {
5
5
  static values = {
@@ -4,31 +4,46 @@ export default class extends Controller {
4
4
  static targets = [ "item" ]
5
5
  static values = { index: Number }
6
6
 
7
+ #observer
8
+
9
+ initialize() {
10
+ this.#observer = new IntersectionObserver(this.#reset.bind(this))
11
+ }
12
+
7
13
  connect() {
8
- this.#updateTabstops()
14
+ this.#observer.observe(this.element)
9
15
  }
10
16
 
11
- reset() {
12
- this.indexValue = 0
13
- this.#updateTabstops()
17
+ disconnect() {
18
+ this.#observer.disconnect()
14
19
  }
15
20
 
16
21
  prev() {
17
22
  if (this.indexValue > 0) {
18
23
  this.indexValue--
19
- this.#updateTabstops()
20
- this.#focusCurrentItem()
24
+ this.#update()
21
25
  }
22
26
  }
23
27
 
24
28
  next() {
25
29
  if (this.indexValue < this.#lastIndex) {
26
30
  this.indexValue++
27
- this.#updateTabstops()
28
- this.#focusCurrentItem()
31
+ this.#update()
29
32
  }
30
33
  }
31
34
 
35
+ #reset([ entry ]) {
36
+ if (entry.isIntersecting) {
37
+ this.indexValue = 0
38
+ this.#update()
39
+ }
40
+ }
41
+
42
+ #update() {
43
+ this.#updateTabstops()
44
+ this.#focusCurrentItem()
45
+ }
46
+
32
47
  #updateTabstops() {
33
48
  this.itemTargets.forEach((element, index) => {
34
49
  element.tabIndex = index === this.indexValue ? 0 : -1
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { computePosition, flip, shift, offset, autoUpdate } from "https://cdn.skypack.dev/@floating-ui/dom@1.6.12?min"
2
+ import { computePosition, flip, shift, offset, autoUpdate } from "https://cdn.jsdelivr.net/npm/@floating-ui/dom@1.6.13/+esm"
3
3
 
4
4
  export default class extends Controller {
5
5
  static targets = [ "button", "menu" ]
@@ -31,7 +31,8 @@ export default class extends Controller {
31
31
 
32
32
  orient() {
33
33
  computePosition(this.buttonTarget, this.menuTarget, this.#options).then(({x, y}) => {
34
- Object.assign(this.menuTarget.style, { insetInlineStart: `${x}px`, insetBlockStart: `${y}px` })
34
+ this.menuTarget.style.insetInlineStart = `${x}px`
35
+ this.menuTarget.style.insetBlockStart = `${y}px`
35
36
  })
36
37
  }
37
38
 
@@ -1,6 +1,6 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
- import { put } from "https://cdn.skypack.dev/@rails/request.js@0.0.11?min"
3
- import Sortable from "https://cdn.skypack.dev/sortablejs?min"
2
+ import { put } from "https://cdn.jsdelivr.net/npm/@rails/request.js@0.0.11/+esm"
3
+ import Sortable from "https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/+esm"
4
4
 
5
5
  export default class extends Controller {
6
6
  static values = { url: String, group: String, handle: String }
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.85
4
+ version: 0.0.87
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: 2025-01-10 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com
@@ -96,6 +96,7 @@ files:
96
96
  - lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js
97
97
  - lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js
98
98
  - lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js
99
+ - lib/generators/css_zero/add/templates/app/javascript/controllers/context_menu_controller.js
99
100
  - lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js
100
101
  - lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js
101
102
  - lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_controller.js