diff --git a/docs/src/content/docs/docs/changelog.md b/docs/src/content/docs/docs/changelog.md
index 417f465..1c852b1 100644
--- a/docs/src/content/docs/docs/changelog.md
+++ b/docs/src/content/docs/docs/changelog.md
@@ -1,55 +1,55 @@
----
-# Warning: This file is generated automatically. Do not edit!
-title: Release Notes
-description: Release notes for the @studiocms/ui package.
-editUrl: false
----
-
-This document contains release notes for the `@studiocms/ui` package.
-For more information, see the [CHANGELOG file](https://github.com/withstudiocms/ui/blob/main/packages/studiocms_ui/CHANGELOG.md)
-
-## 0.3.2
-
-- [#33](https://github.com/withstudiocms/ui/pull/33) [`58e223c`](https://github.com/withstudiocms/ui/commit/58e223c861321e95c8db064be67e28e4563b4ff3) Thanks [@louisescher](https://github.com/louisescher)! - Fix tabs not being displayed correctly & dividers displaying backgrounds for empty slots
-
-## 0.3.1
-
-- [#27](https://github.com/withstudiocms/ui/pull/27) [`6b0b58f`](https://github.com/withstudiocms/ui/commit/6b0b58fbbe2a92d4bce7fa44c587164b8f2f53e5) Thanks [@louisescher](https://github.com/louisescher)! - Add pathe as a dependency to deal with path issues on Windows
-
-## 0.3.0
-
-- [#18](https://github.com/withstudiocms/ui/pull/18) [`e471e11`](https://github.com/withstudiocms/ui/commit/e471e1129a30ff2a5b019366a8eb7bbbf2abb73e) Thanks [@louisescher](https://github.com/louisescher)! - The Accessibility Update
-
- This version of `@studiocms/ui` includes a lot of improvements to the documentation and components. The most important changes include the move to
- an integration-based system and a massive keyboard accessibility overhaul (thanks to [HiDeoo](https://github.com/HiDeoo) for the feedback on this)!
-
- ### Components
-
- - Added a new `` component based on the tabs on the homepage.
- - Updated the `` component to include a new "filled" style.
-
- ### Utilities
-
- - Moved the `ThemeHelper` class to its own category in the docs.
-
- ### Accessibility
-
- - Overhauled the keyboard accessibility on all components to make them adhere to the ARIA standards.
-
-## 0.1.0
-
-- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Added a new footer component, made accessibility improvements and preparations for first stable release
-
-- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - - Update `` component's available types
-
-- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Added a new searchable select component and improved accessibility for normal selects
-
-- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Created new UI Library in preparations for the new StudioCMS Dashboard project
-
-- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Added a theme helper and theme toggle component
-
-- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Adjusted persistent toasts to include an outline for better visibility
-
-## 0.0.1
-
-- Initial Testing release
+---
+# Warning: This file is generated automatically. Do not edit!
+title: Release Notes
+description: Release notes for the @studiocms/ui package.
+editUrl: false
+---
+
+This document contains release notes for the `@studiocms/ui` package.
+For more information, see the [CHANGELOG file](https://github.com/withstudiocms/ui/blob/main/packages/studiocms_ui/CHANGELOG.md)
+
+## 0.3.2
+
+- [#33](https://github.com/withstudiocms/ui/pull/33) [`58e223c`](https://github.com/withstudiocms/ui/commit/58e223c861321e95c8db064be67e28e4563b4ff3) Thanks [@louisescher](https://github.com/louisescher)! - Fix tabs not being displayed correctly & dividers displaying backgrounds for empty slots
+
+## 0.3.1
+
+- [#27](https://github.com/withstudiocms/ui/pull/27) [`6b0b58f`](https://github.com/withstudiocms/ui/commit/6b0b58fbbe2a92d4bce7fa44c587164b8f2f53e5) Thanks [@louisescher](https://github.com/louisescher)! - Add pathe as a dependency to deal with path issues on Windows
+
+## 0.3.0
+
+- [#18](https://github.com/withstudiocms/ui/pull/18) [`e471e11`](https://github.com/withstudiocms/ui/commit/e471e1129a30ff2a5b019366a8eb7bbbf2abb73e) Thanks [@louisescher](https://github.com/louisescher)! - The Accessibility Update
+
+ This version of `@studiocms/ui` includes a lot of improvements to the documentation and components. The most important changes include the move to
+ an integration-based system and a massive keyboard accessibility overhaul (thanks to [HiDeoo](https://github.com/HiDeoo) for the feedback on this)!
+
+ ### Components
+
+ - Added a new `` component based on the tabs on the homepage.
+ - Updated the `` component to include a new "filled" style.
+
+ ### Utilities
+
+ - Moved the `ThemeHelper` class to its own category in the docs.
+
+ ### Accessibility
+
+ - Overhauled the keyboard accessibility on all components to make them adhere to the ARIA standards.
+
+## 0.1.0
+
+- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Added a new footer component, made accessibility improvements and preparations for first stable release
+
+- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - - Update `` component's available types
+
+- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Added a new searchable select component and improved accessibility for normal selects
+
+- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Created new UI Library in preparations for the new StudioCMS Dashboard project
+
+- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Added a theme helper and theme toggle component
+
+- [#1](https://github.com/withstudiocms/ui/pull/1) [`14be139`](https://github.com/withstudiocms/ui/commit/14be139876aa2c5ab75fea07ee338afefece6f56) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Adjusted persistent toasts to include an outline for better visibility
+
+## 0.0.1
+
+- Initial Testing release
diff --git a/packages/studiocms_ui/src/components/Accordion/accordion.ts b/packages/studiocms_ui/src/components/Accordion/accordion.ts
index de89e98..b0febef 100644
--- a/packages/studiocms_ui/src/components/Accordion/accordion.ts
+++ b/packages/studiocms_ui/src/components/Accordion/accordion.ts
@@ -4,7 +4,7 @@ for (const accordion of accordions) {
const items = accordion.querySelectorAll('.sui-accordion-item');
for (const item of items) {
- const content = accordion.querySelector('.sui-accordion-details');
+ const content = item.querySelector('.sui-accordion-details');
if (!content) continue;
const contentBoundingBox = content.getBoundingClientRect();
@@ -15,11 +15,12 @@ for (const accordion of accordions) {
item.addEventListener('click', () => {
item.classList.toggle('active');
+
if (item.classList.contains('active')) {
content.style.maxHeight = `${contentBoundingBox.height}px`;
} else {
- content.style.maxHeight = `0`;
+ content.style.maxHeight = '0';
}
});
}
-}
\ No newline at end of file
+}