@asd20/ui 3.2.944 → 3.2.945
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.
- package/package.json +1 -1
- package/src/components/templates/Asd20DetailAlternateTemplate/index.vue +50 -0
- package/src/components/templates/Asd20DetailImageFullTemplate/index.vue +50 -0
- package/src/components/templates/Asd20DetailImageTemplate/index.vue +50 -0
- package/src/components/templates/Asd20DetailTemplate/index.vue +50 -1
package/package.json
CHANGED
|
@@ -180,6 +180,56 @@ export default {
|
|
|
180
180
|
Asd20QuicklinksMenu,
|
|
181
181
|
Asd20MediaSection,
|
|
182
182
|
},
|
|
183
|
+
mounted() {
|
|
184
|
+
// Allow accordions to be injected into the DOM via the SuperEditor in the CommCenter
|
|
185
|
+
this.$nextTick(() => {
|
|
186
|
+
const accordionButtons = document.querySelectorAll('.accordion-button')
|
|
187
|
+
|
|
188
|
+
accordionButtons.forEach(button => {
|
|
189
|
+
button.addEventListener('click', () => {
|
|
190
|
+
const contentId = button.getAttribute('aria-controls')
|
|
191
|
+
const content = document.getElementById(contentId)
|
|
192
|
+
const expanded = button.getAttribute('aria-expanded') === 'true'
|
|
193
|
+
|
|
194
|
+
button.setAttribute('aria-expanded', !expanded)
|
|
195
|
+
button.querySelector('.toggle-icon').textContent = expanded
|
|
196
|
+
? '+'
|
|
197
|
+
: '-'
|
|
198
|
+
|
|
199
|
+
if (!expanded) {
|
|
200
|
+
content.style.display = 'block'
|
|
201
|
+
|
|
202
|
+
// Reset maxHeight before calculating scrollHeight (force reflow)
|
|
203
|
+
content.style.maxHeight = '0'
|
|
204
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
205
|
+
|
|
206
|
+
requestAnimationFrame(() => {
|
|
207
|
+
content.style.transition =
|
|
208
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
209
|
+
content.style.maxHeight = content.scrollHeight + 'px'
|
|
210
|
+
content.style.padding = 'var(--space-1, 1em)'
|
|
211
|
+
})
|
|
212
|
+
} else {
|
|
213
|
+
content.style.maxHeight = content.scrollHeight + 'px' // Set to current height for smooth transition
|
|
214
|
+
|
|
215
|
+
requestAnimationFrame(() => {
|
|
216
|
+
content.style.transition =
|
|
217
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
218
|
+
content.style.maxHeight = '0'
|
|
219
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
// Optionally hide the content after animation
|
|
223
|
+
setTimeout(() => {
|
|
224
|
+
if (content.style.maxHeight === '0px') {
|
|
225
|
+
content.style.display = 'none'
|
|
226
|
+
}
|
|
227
|
+
}, 400) // Match transition duration
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
},
|
|
183
233
|
}
|
|
184
234
|
</script>
|
|
185
235
|
|
|
@@ -172,6 +172,56 @@ export default {
|
|
|
172
172
|
Asd20QuicklinksMenu,
|
|
173
173
|
Asd20MediaSection,
|
|
174
174
|
},
|
|
175
|
+
mounted() {
|
|
176
|
+
// Allow accordions to be injected into the DOM via the SuperEditor in the CommCenter
|
|
177
|
+
this.$nextTick(() => {
|
|
178
|
+
const accordionButtons = document.querySelectorAll('.accordion-button')
|
|
179
|
+
|
|
180
|
+
accordionButtons.forEach(button => {
|
|
181
|
+
button.addEventListener('click', () => {
|
|
182
|
+
const contentId = button.getAttribute('aria-controls')
|
|
183
|
+
const content = document.getElementById(contentId)
|
|
184
|
+
const expanded = button.getAttribute('aria-expanded') === 'true'
|
|
185
|
+
|
|
186
|
+
button.setAttribute('aria-expanded', !expanded)
|
|
187
|
+
button.querySelector('.toggle-icon').textContent = expanded
|
|
188
|
+
? '+'
|
|
189
|
+
: '-'
|
|
190
|
+
|
|
191
|
+
if (!expanded) {
|
|
192
|
+
content.style.display = 'block'
|
|
193
|
+
|
|
194
|
+
// Reset maxHeight before calculating scrollHeight (force reflow)
|
|
195
|
+
content.style.maxHeight = '0'
|
|
196
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
197
|
+
|
|
198
|
+
requestAnimationFrame(() => {
|
|
199
|
+
content.style.transition =
|
|
200
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
201
|
+
content.style.maxHeight = content.scrollHeight + 'px'
|
|
202
|
+
content.style.padding = 'var(--space-1, 1em)'
|
|
203
|
+
})
|
|
204
|
+
} else {
|
|
205
|
+
content.style.maxHeight = content.scrollHeight + 'px' // Set to current height for smooth transition
|
|
206
|
+
|
|
207
|
+
requestAnimationFrame(() => {
|
|
208
|
+
content.style.transition =
|
|
209
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
210
|
+
content.style.maxHeight = '0'
|
|
211
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
212
|
+
})
|
|
213
|
+
|
|
214
|
+
// Optionally hide the content after animation
|
|
215
|
+
setTimeout(() => {
|
|
216
|
+
if (content.style.maxHeight === '0px') {
|
|
217
|
+
content.style.display = 'none'
|
|
218
|
+
}
|
|
219
|
+
}, 400) // Match transition duration
|
|
220
|
+
}
|
|
221
|
+
})
|
|
222
|
+
})
|
|
223
|
+
})
|
|
224
|
+
},
|
|
175
225
|
}
|
|
176
226
|
</script>
|
|
177
227
|
|
|
@@ -165,6 +165,56 @@ export default {
|
|
|
165
165
|
Asd20QuicklinksMenu,
|
|
166
166
|
Asd20MediaSection,
|
|
167
167
|
},
|
|
168
|
+
mounted() {
|
|
169
|
+
// Allow accordions to be injected into the DOM via the SuperEditor in the CommCenter
|
|
170
|
+
this.$nextTick(() => {
|
|
171
|
+
const accordionButtons = document.querySelectorAll('.accordion-button')
|
|
172
|
+
|
|
173
|
+
accordionButtons.forEach(button => {
|
|
174
|
+
button.addEventListener('click', () => {
|
|
175
|
+
const contentId = button.getAttribute('aria-controls')
|
|
176
|
+
const content = document.getElementById(contentId)
|
|
177
|
+
const expanded = button.getAttribute('aria-expanded') === 'true'
|
|
178
|
+
|
|
179
|
+
button.setAttribute('aria-expanded', !expanded)
|
|
180
|
+
button.querySelector('.toggle-icon').textContent = expanded
|
|
181
|
+
? '+'
|
|
182
|
+
: '-'
|
|
183
|
+
|
|
184
|
+
if (!expanded) {
|
|
185
|
+
content.style.display = 'block'
|
|
186
|
+
|
|
187
|
+
// Reset maxHeight before calculating scrollHeight (force reflow)
|
|
188
|
+
content.style.maxHeight = '0'
|
|
189
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
190
|
+
|
|
191
|
+
requestAnimationFrame(() => {
|
|
192
|
+
content.style.transition =
|
|
193
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
194
|
+
content.style.maxHeight = content.scrollHeight + 'px'
|
|
195
|
+
content.style.padding = 'var(--space-1, 1em)'
|
|
196
|
+
})
|
|
197
|
+
} else {
|
|
198
|
+
content.style.maxHeight = content.scrollHeight + 'px' // Set to current height for smooth transition
|
|
199
|
+
|
|
200
|
+
requestAnimationFrame(() => {
|
|
201
|
+
content.style.transition =
|
|
202
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
203
|
+
content.style.maxHeight = '0'
|
|
204
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
// Optionally hide the content after animation
|
|
208
|
+
setTimeout(() => {
|
|
209
|
+
if (content.style.maxHeight === '0px') {
|
|
210
|
+
content.style.display = 'none'
|
|
211
|
+
}
|
|
212
|
+
}, 400) // Match transition duration
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
},
|
|
168
218
|
}
|
|
169
219
|
</script>
|
|
170
220
|
|
|
@@ -168,6 +168,56 @@ export default {
|
|
|
168
168
|
props: {
|
|
169
169
|
languageCode: { type: String, default: 'en' },
|
|
170
170
|
},
|
|
171
|
+
mounted() {
|
|
172
|
+
// Allow accordions to be injected into the DOM via the SuperEditor in the CommCenter
|
|
173
|
+
this.$nextTick(() => {
|
|
174
|
+
const accordionButtons = document.querySelectorAll('.accordion-button')
|
|
175
|
+
|
|
176
|
+
accordionButtons.forEach(button => {
|
|
177
|
+
button.addEventListener('click', () => {
|
|
178
|
+
const contentId = button.getAttribute('aria-controls')
|
|
179
|
+
const content = document.getElementById(contentId)
|
|
180
|
+
const expanded = button.getAttribute('aria-expanded') === 'true'
|
|
181
|
+
|
|
182
|
+
button.setAttribute('aria-expanded', !expanded)
|
|
183
|
+
button.querySelector('.toggle-icon').textContent = expanded
|
|
184
|
+
? '+'
|
|
185
|
+
: '-'
|
|
186
|
+
|
|
187
|
+
if (!expanded) {
|
|
188
|
+
content.style.display = 'block'
|
|
189
|
+
|
|
190
|
+
// Reset maxHeight before calculating scrollHeight (force reflow)
|
|
191
|
+
content.style.maxHeight = '0'
|
|
192
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
193
|
+
|
|
194
|
+
requestAnimationFrame(() => {
|
|
195
|
+
content.style.transition =
|
|
196
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
197
|
+
content.style.maxHeight = content.scrollHeight + 'px'
|
|
198
|
+
content.style.padding = 'var(--space-1, 1em)'
|
|
199
|
+
})
|
|
200
|
+
} else {
|
|
201
|
+
content.style.maxHeight = content.scrollHeight + 'px' // Set to current height for smooth transition
|
|
202
|
+
|
|
203
|
+
requestAnimationFrame(() => {
|
|
204
|
+
content.style.transition =
|
|
205
|
+
'max-height 0.4s ease, padding 0.4s ease'
|
|
206
|
+
content.style.maxHeight = '0'
|
|
207
|
+
content.style.padding = '0 var(--space-1, 1em)'
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
// Optionally hide the content after animation
|
|
211
|
+
setTimeout(() => {
|
|
212
|
+
if (content.style.maxHeight === '0px') {
|
|
213
|
+
content.style.display = 'none'
|
|
214
|
+
}
|
|
215
|
+
}, 400) // Match transition duration
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
},
|
|
171
221
|
}
|
|
172
222
|
</script>
|
|
173
223
|
|
|
@@ -254,7 +304,6 @@ export default {
|
|
|
254
304
|
// max-width: 50vw;
|
|
255
305
|
}
|
|
256
306
|
}
|
|
257
|
-
|
|
258
307
|
}
|
|
259
308
|
}
|
|
260
309
|
</style>
|