@digital-b2c/coreui-kit 0.21.4 → 0.21.6
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/LICENSE.txt +21 -21
- package/README.md +52 -52
- package/dist/index.cjs +23 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -2
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +23 -8
- package/dist/index.mjs.map +1 -1
- package/dist/types/global.d.ts +25 -25
- package/package.json +100 -101
package/dist/index.mjs
CHANGED
|
@@ -2433,19 +2433,16 @@ var CardCarousel = ({
|
|
|
2433
2433
|
onResize: syncPagination,
|
|
2434
2434
|
children: cards.map((_d, index) => {
|
|
2435
2435
|
var _e = _d, { isLocked, className: cardClassName, videoUrl } = _e, card = __objRest(_e, ["isLocked", "className", "videoUrl"]);
|
|
2436
|
-
var _a2;
|
|
2437
2436
|
return /* @__PURE__ */ jsx(SwiperSlide, { children: /* @__PURE__ */ jsx(
|
|
2438
2437
|
Card2,
|
|
2439
|
-
__spreadProps(__spreadValues({
|
|
2438
|
+
__spreadProps(__spreadValues({}, card), {
|
|
2440
2439
|
variant: theme,
|
|
2441
2440
|
className: clsx52(CardCarousel_module_default.card, isLocked && CardCarousel_module_default.locked, cardClassName),
|
|
2442
|
-
onCtaClick:
|
|
2443
|
-
var _a3, _b2;
|
|
2441
|
+
onCtaClick: !isLocked && videoUrl ? (event) => {
|
|
2444
2442
|
event.preventDefault();
|
|
2445
|
-
setActiveVideo(
|
|
2446
|
-
} : card.onCtaClick
|
|
2447
|
-
|
|
2448
|
-
cta: videoUrl && card.cta ? __spreadProps(__spreadValues({}, card.cta), { icon: "watchBlack" }) : card.cta
|
|
2443
|
+
setActiveVideo(videoUrl);
|
|
2444
|
+
} : card.onCtaClick,
|
|
2445
|
+
cta: !isLocked && videoUrl && card.cta ? __spreadProps(__spreadValues({}, card.cta), { icon: "watchBlack" }) : card.cta
|
|
2449
2446
|
})
|
|
2450
2447
|
) }, index);
|
|
2451
2448
|
})
|
|
@@ -4181,6 +4178,24 @@ var Navigation2 = (props) => {
|
|
|
4181
4178
|
document.body.style.overflow = "";
|
|
4182
4179
|
};
|
|
4183
4180
|
}, [isMobileMenuOpen]);
|
|
4181
|
+
useEffect(() => {
|
|
4182
|
+
if (!navRef.current) return;
|
|
4183
|
+
const navigation = navRef.current;
|
|
4184
|
+
const root = document.documentElement;
|
|
4185
|
+
const updateNavigationHeight = () => {
|
|
4186
|
+
root.style.setProperty(
|
|
4187
|
+
"--navigation-height",
|
|
4188
|
+
`${navigation.getBoundingClientRect().height}px`
|
|
4189
|
+
);
|
|
4190
|
+
};
|
|
4191
|
+
updateNavigationHeight();
|
|
4192
|
+
const resizeObserver = new ResizeObserver(updateNavigationHeight);
|
|
4193
|
+
resizeObserver.observe(navigation);
|
|
4194
|
+
return () => {
|
|
4195
|
+
resizeObserver.disconnect();
|
|
4196
|
+
root.style.removeProperty("--navigation-height");
|
|
4197
|
+
};
|
|
4198
|
+
}, []);
|
|
4184
4199
|
useEffect(() => {
|
|
4185
4200
|
if (!dropdownOpen) return;
|
|
4186
4201
|
const handleKey = (e) => {
|