css-zero 0.0.36 → 0.0.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/resources.yml +5 -5
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/carousel_controller.js +12 -4
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/{reveal_button_controller.js → revealable_input_controller.js} +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/tabs_controller.js +14 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/upload_preview_controller.js +1 -1
- metadata +4 -4
- /data/lib/generators/css_zero/add/templates/app/javascript/controllers/{clear_button_controller.js → clearable_input_controller.js} +0 -0
- /data/lib/generators/css_zero/add/templates/app/javascript/controllers/{copy_button_controller.js → copyable_input_controller.js} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d03cbc1032455ed1426a832bd3f71fcc6091275b6a6a75fa1d2111cf0105f24
|
4
|
+
data.tar.gz: e4aae85c8fdcea540a262ae0de03546c367afabb6a3bbb0e769eceff328e3a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eae8de16d7008f3c47960c19a90840e236b9846505b3e988d20c10c41f21e5319200bb10b1fd0154d9dc61072bddb479efd8369597c9051bd1724ac32b64ecb0
|
7
|
+
data.tar.gz: 8fcecce58a61bfa94b08879bd9338357988cb217da22c3398f6832b2a2842fc2d0802c9403502b70f80531dc7100b6d8fd591d0dc10211c4ba2185f994494c6e
|
data/lib/css_zero/version.rb
CHANGED
@@ -40,13 +40,13 @@ input:
|
|
40
40
|
- app/javascript/controllers/check_all_controller.js
|
41
41
|
input_concerns:
|
42
42
|
- app/javascript/controllers/autoselect_controller.js
|
43
|
-
- app/javascript/controllers/
|
44
|
-
- app/
|
45
|
-
- app/javascript/controllers/
|
43
|
+
- app/javascript/controllers/copyable_input_controller.js
|
44
|
+
- app/javascript/controllers/clearable_input_controller.js
|
45
|
+
- app/javascript/controllers/revealable_input_controller.js
|
46
|
+
- app/assets/images/copy.svg
|
46
47
|
- app/assets/images/eye.svg
|
47
48
|
- app/assets/images/eye-off.svg
|
48
|
-
- app/
|
49
|
-
- app/assets/images/copy.svg
|
49
|
+
- app/assets/images/x.svg
|
50
50
|
layouts:
|
51
51
|
- app/assets/stylesheets/layouts.css
|
52
52
|
- app/assets/images/menu.svg
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/carousel_controller.js
CHANGED
@@ -4,12 +4,20 @@ export default class extends Controller {
|
|
4
4
|
static targets = [ "content" ]
|
5
5
|
|
6
6
|
next() {
|
7
|
-
this.contentTarget.scrollTo({ left: this.#
|
7
|
+
this.contentTarget.scrollTo({ left: this.#nextPosition, behavior: "smooth" })
|
8
8
|
}
|
9
9
|
|
10
|
-
|
11
|
-
this.contentTarget.scrollTo({ left: this.#
|
12
|
-
}
|
10
|
+
prev() {
|
11
|
+
this.contentTarget.scrollTo({ left: this.#prevPosition, behavior: "smooth" })
|
12
|
+
}
|
13
|
+
|
14
|
+
get #nextPosition() {
|
15
|
+
return this.#scrollLeft + this.#slideSize
|
16
|
+
}
|
17
|
+
|
18
|
+
get #prevPosition() {
|
19
|
+
return this.#scrollLeft - this.#slideSize
|
20
|
+
}
|
13
21
|
|
14
22
|
get #scrollLeft() {
|
15
23
|
return this.contentTarget.scrollLeft
|
@@ -4,12 +4,24 @@ export default class extends Controller {
|
|
4
4
|
static targets = [ "button", "tab" ]
|
5
5
|
static values = { index: Number, default: 0 }
|
6
6
|
|
7
|
+
indexValueChanged() {
|
8
|
+
this.#showSelectedTab()
|
9
|
+
}
|
10
|
+
|
7
11
|
select({ target }) {
|
8
12
|
this.indexValue = target.dataset.index
|
9
13
|
}
|
10
14
|
|
11
|
-
|
12
|
-
this
|
15
|
+
prev() {
|
16
|
+
if (this.indexValue > 0) this.indexValue--
|
17
|
+
}
|
18
|
+
|
19
|
+
next() {
|
20
|
+
if (this.indexValue < this.#lastIndex) this.indexValue++
|
21
|
+
}
|
22
|
+
|
23
|
+
get #lastIndex() {
|
24
|
+
return this.tabTargets.length -1
|
13
25
|
}
|
14
26
|
|
15
27
|
#showSelectedTab() {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lázaro Nixon
|
@@ -79,16 +79,16 @@ files:
|
|
79
79
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
|
80
80
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/carousel_controller.js
|
81
81
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/check_all_controller.js
|
82
|
-
- lib/generators/css_zero/add/templates/app/javascript/controllers/
|
82
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/clearable_input_controller.js
|
83
83
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js
|
84
|
-
- lib/generators/css_zero/add/templates/app/javascript/controllers/
|
84
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js
|
85
85
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_controller.js
|
86
86
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/element_removal_controller.js
|
87
87
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/form_controller.js
|
88
88
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/fullscreen_controller.js
|
89
89
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/hotkey_controller.js
|
90
90
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/lightbox_controller.js
|
91
|
-
- lib/generators/css_zero/add/templates/app/javascript/controllers/
|
91
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/revealable_input_controller.js
|
92
92
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/tabs_controller.js
|
93
93
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/upload_preview_controller.js
|
94
94
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/web_share_controller.js
|
File without changes
|