From a022515fe377f7037282f9f15054a2db83b5531d Mon Sep 17 00:00:00 2001 From: Rogin Farrer Date: Sat, 26 Nov 2022 22:33:52 -0500 Subject: [PATCH] feat: refactor to vanilla JS core BREAKING CHANGES - Adopts React 18's `useId`, making the library incompatible with React <18 - Switch to `tsup` from `microbundle` for bundling library. No longer exports a UMD version, just CJS and MJS Features & Bug fixes - Refactors core functionality to vanilla JS (with a React) adapter, which I think should fix #103 and fix #100 - Added `onExpandedChange` option - Tries to detect if `getToggleProps` is used. If the toggle element ref can be accessed, the `aria-labelledby` attribute will be added to the collapse element - Added `role="region"` to collapse - Updated toggle props to pass the appropriate attributes to the element, whether it's a button or not