@homebound/beam 2.386.0 → 2.387.0

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/dist/index.d.cts CHANGED
@@ -6044,6 +6044,7 @@ interface AccordionProps<X = AccordionXss> {
6044
6044
  * Allows multiple accordions to be expanded simultaneously (enabled by default)
6045
6045
  */
6046
6046
  index?: number;
6047
+ onToggle?: VoidFunction;
6047
6048
  setExpandedIndex?: Dispatch<SetStateAction<number | undefined>>;
6048
6049
  /** Turns the title into a button. If provided, disables expand/collapse on title text */
6049
6050
  titleOnClick?: VoidFunction;
package/dist/index.d.ts CHANGED
@@ -6044,6 +6044,7 @@ interface AccordionProps<X = AccordionXss> {
6044
6044
  * Allows multiple accordions to be expanded simultaneously (enabled by default)
6045
6045
  */
6046
6046
  index?: number;
6047
+ onToggle?: VoidFunction;
6047
6048
  setExpandedIndex?: Dispatch<SetStateAction<number | undefined>>;
6048
6049
  /** Turns the title into a button. If provided, disables expand/collapse on title text */
6049
6050
  titleOnClick?: VoidFunction;
package/dist/index.js CHANGED
@@ -13494,6 +13494,7 @@ function Accordion(props) {
13494
13494
  index,
13495
13495
  setExpandedIndex,
13496
13496
  titleOnClick,
13497
+ onToggle,
13497
13498
  omitPadding = false,
13498
13499
  xss
13499
13500
  } = props;
@@ -13518,7 +13519,8 @@ function Accordion(props) {
13518
13519
  const toggle = useCallback13(() => {
13519
13520
  setExpanded((prev) => !prev);
13520
13521
  if (setExpandedIndex) setExpandedIndex(index);
13521
- }, [index, setExpandedIndex]);
13522
+ if (onToggle) onToggle();
13523
+ }, [index, setExpandedIndex, onToggle]);
13522
13524
  const touchableStyle = useMemo22(
13523
13525
  () => ({
13524
13526
  ...Css.df.jcsb.gapPx(12).aic.p2.baseMd.outline("none").onHover.bgGray100.if(!!titleOnClick).baseSb.$,