@homebound/beam 2.386.0 → 2.387.1
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.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
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.$,
|
|
@@ -16957,11 +16959,9 @@ function ScrollShadows(props) {
|
|
|
16957
16959
|
setShowStartShadow(start > 0);
|
|
16958
16960
|
setShowEndShadow(start + boxSize < end);
|
|
16959
16961
|
},
|
|
16960
|
-
|
|
16961
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16962
|
-
[]
|
|
16962
|
+
[horizontal]
|
|
16963
16963
|
);
|
|
16964
|
-
const onResize = useCallback21(() => scrollRef.current && updateScrollProps(scrollRef.current), []);
|
|
16964
|
+
const onResize = useCallback21(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
|
|
16965
16965
|
useResizeObserver5({ ref: scrollRef, onResize });
|
|
16966
16966
|
return /* @__PURE__ */ jsxs71(
|
|
16967
16967
|
"div",
|
|
@@ -16969,8 +16969,8 @@ function ScrollShadows(props) {
|
|
|
16969
16969
|
css: Css.relative.oh.h(height).w(width).df.fd(!horizontal ? "column" : "row").$,
|
|
16970
16970
|
...tid,
|
|
16971
16971
|
children: [
|
|
16972
|
-
|
|
16973
|
-
|
|
16972
|
+
/* @__PURE__ */ jsx152("div", { css: { ...startShadowStyles, opacity: showStartShadow ? 1 : 0 }, "data-chromatic": "ignore" }),
|
|
16973
|
+
/* @__PURE__ */ jsx152("div", { css: { ...endShadowStyles, opacity: showEndShadow ? 1 : 0 }, "data-chromatic": "ignore" }),
|
|
16974
16974
|
/* @__PURE__ */ jsx152(
|
|
16975
16975
|
"div",
|
|
16976
16976
|
{
|