spree_storefront 5.2.3 → 5.2.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76fa4253e2e1ea52d1f30116574561d27c0bc2c607b02ab17918d9f790b62e46
|
|
4
|
+
data.tar.gz: 4eaf942e5774379423a2471e24c7dd310c5694b9ebe15d636ab9cb949eb97c00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea4a3f2d7f98f66339dd866c4022e9b2d98d034b7596b4c3cd186912b65bca418ac0ca2d8ffb9db24e6c1d9782f2e5e014c9811cc41e5feff406784d2c674494
|
|
7
|
+
data.tar.gz: 93ffd6f63e6fd59e377ee05426044ff9ba75df19b0d95a3823809cc1ef9945e1279502597511c5433622ca224dfa9466e27f8d53f8fc4d6136ab3c538ee6ced8
|
|
@@ -7,6 +7,12 @@ export default class ToggleMenu extends Toggle {
|
|
|
7
7
|
|
|
8
8
|
connect() {
|
|
9
9
|
super.connect()
|
|
10
|
+
this.setupDynamicHeight()
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
disconnect() {
|
|
14
|
+
super.disconnect()
|
|
15
|
+
this.cleanupObservers()
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
hide(e) {
|
|
@@ -17,6 +23,7 @@ export default class ToggleMenu extends Toggle {
|
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
toggle(e) {
|
|
26
|
+
this.updateDynamicHeight()
|
|
20
27
|
super.toggle(e)
|
|
21
28
|
if (this.openValue) {
|
|
22
29
|
this.buttonTarget.classList.add('menu-open')
|
|
@@ -28,4 +35,47 @@ export default class ToggleMenu extends Toggle {
|
|
|
28
35
|
unlockScroll()
|
|
29
36
|
}
|
|
30
37
|
}
|
|
38
|
+
|
|
39
|
+
setupDynamicHeight() {
|
|
40
|
+
this.updateDynamicHeight()
|
|
41
|
+
this.setupObservers()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
updateDynamicHeight() {
|
|
45
|
+
if (!this.hasContentTarget) return
|
|
46
|
+
|
|
47
|
+
const contentTopDistance = this.contentTarget.getBoundingClientRect().top
|
|
48
|
+
const calculatedHeight = `calc(100dvh - ${contentTopDistance}px)`
|
|
49
|
+
|
|
50
|
+
this.contentTarget.style.height = calculatedHeight
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
setupObservers() {
|
|
54
|
+
const debouncedUpdate = () => {
|
|
55
|
+
clearTimeout(this.updateTimeout)
|
|
56
|
+
this.updateTimeout = setTimeout(() => this.updateDynamicHeight(), 16)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
60
|
+
this.resizeObserver = new ResizeObserver(debouncedUpdate)
|
|
61
|
+
const navElement = this.element.querySelector('nav[aria-label="Top"]')
|
|
62
|
+
if (navElement) {
|
|
63
|
+
this.resizeObserver.observe(navElement)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
this.windowResizeHandler = debouncedUpdate
|
|
68
|
+
window.addEventListener('resize', this.windowResizeHandler)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
cleanupObservers() {
|
|
72
|
+
if (this.resizeObserver) {
|
|
73
|
+
this.resizeObserver.disconnect()
|
|
74
|
+
}
|
|
75
|
+
if (this.windowResizeHandler) {
|
|
76
|
+
window.removeEventListener('resize', this.windowResizeHandler)
|
|
77
|
+
}
|
|
78
|
+
clearTimeout(this.updateTimeout)
|
|
79
|
+
}
|
|
80
|
+
|
|
31
81
|
}
|
|
@@ -137,19 +137,19 @@
|
|
|
137
137
|
</div>
|
|
138
138
|
</nav>
|
|
139
139
|
<div
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
</div>
|
|
140
|
+
class='h-0 opacity-0 pointer-events-none hide-on-load'
|
|
141
|
+
data-toggle-menu-target='toggleable'
|
|
142
|
+
role='dialog'
|
|
143
|
+
aria-modal='true'
|
|
144
|
+
>
|
|
145
|
+
<div
|
|
146
|
+
class='flex justify-between flex-col lg:hidden w-full transition-transform has-[.currency-and-locale-modal:not(.hidden)]:transform-none body header--mobile-menu'
|
|
147
|
+
data-toggle-menu-target='content'
|
|
148
|
+
style='background-color: <%= section.preferred_background_color %>;'
|
|
149
|
+
>
|
|
150
|
+
<%= render 'spree/page_sections/nav/mobile', section: section %>
|
|
152
151
|
</div>
|
|
152
|
+
</div>
|
|
153
153
|
|
|
154
154
|
<%= render 'spree/shared/cart_pane', section: section %>
|
|
155
155
|
<% if show_account_pane? %>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_storefront
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.
|
|
4
|
+
version: 5.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 5.2.
|
|
18
|
+
version: 5.2.4
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 5.2.
|
|
25
|
+
version: 5.2.4
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: active_link_to
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -570,9 +570,9 @@ licenses:
|
|
|
570
570
|
- AGPL-3.0-or-later
|
|
571
571
|
metadata:
|
|
572
572
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
573
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.
|
|
573
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.4
|
|
574
574
|
documentation_uri: https://docs.spreecommerce.org/
|
|
575
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.2.
|
|
575
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.2.4
|
|
576
576
|
rdoc_options: []
|
|
577
577
|
require_paths:
|
|
578
578
|
- lib
|
|
@@ -587,7 +587,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
587
587
|
- !ruby/object:Gem::Version
|
|
588
588
|
version: 1.8.23
|
|
589
589
|
requirements: []
|
|
590
|
-
rubygems_version:
|
|
590
|
+
rubygems_version: 4.0.2
|
|
591
591
|
specification_version: 4
|
|
592
592
|
summary: Modern fully featured storefront and checkout for Spree Commerce
|
|
593
593
|
test_files: []
|