@helpwave/hightide 0.1.38 → 0.1.40
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/components/index.js +9 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +9 -4
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/layout/Carousel.d.mts +4 -2
- package/dist/components/layout/Carousel.d.ts +4 -2
- package/dist/components/layout/Carousel.js +9 -4
- package/dist/components/layout/Carousel.js.map +1 -1
- package/dist/components/layout/Carousel.mjs +9 -4
- package/dist/components/layout/Carousel.mjs.map +1 -1
- package/dist/components/layout/index.js +9 -4
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +9 -4
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10941,11 +10941,11 @@ var defaultCarouselSlideTranslationType = {
|
|
|
10941
10941
|
var CarouselSlide = (0, import_react24.forwardRef)(
|
|
10942
10942
|
function CarouselSlide2({
|
|
10943
10943
|
index,
|
|
10944
|
+
isSelected,
|
|
10944
10945
|
...props
|
|
10945
10946
|
}, ref) {
|
|
10946
10947
|
const translation = useTranslation([defaultCarouselSlideTranslationType]);
|
|
10947
|
-
const { id,
|
|
10948
|
-
const isSelected = currentIndex === index;
|
|
10948
|
+
const { id, slideCount } = useCarouselContext();
|
|
10949
10949
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
10950
10950
|
"div",
|
|
10951
10951
|
{
|
|
@@ -10993,8 +10993,9 @@ var Carousel = ({
|
|
|
10993
10993
|
dots = true,
|
|
10994
10994
|
blurColor = "from-background",
|
|
10995
10995
|
heightClassName = "h-96",
|
|
10996
|
-
|
|
10996
|
+
slideClassName = "w-[70%] desktop:w-1/2",
|
|
10997
10997
|
slideContainerProps,
|
|
10998
|
+
onSlideChanged,
|
|
10998
10999
|
...props
|
|
10999
11000
|
}) => {
|
|
11000
11001
|
const translation = useTranslation([defaultCarouselTranslationType]);
|
|
@@ -11108,6 +11109,9 @@ var Carousel = ({
|
|
|
11108
11109
|
(0, import_react24.useEffect)(() => {
|
|
11109
11110
|
setDisableClick(!dragState);
|
|
11110
11111
|
}, [dragState]);
|
|
11112
|
+
(0, import_react24.useEffect)(() => {
|
|
11113
|
+
onSlideChanged?.(currentIndex);
|
|
11114
|
+
}, [currentIndex]);
|
|
11111
11115
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
11112
11116
|
"div",
|
|
11113
11117
|
{
|
|
@@ -11143,9 +11147,10 @@ var Carousel = ({
|
|
|
11143
11147
|
{
|
|
11144
11148
|
ref: isInItems ? slideRefs[index] : void 0,
|
|
11145
11149
|
index,
|
|
11150
|
+
isSelected: isInItems && currentIndex === index,
|
|
11146
11151
|
className: (0, import_clsx20.default)(
|
|
11147
11152
|
`absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
|
|
11148
|
-
|
|
11153
|
+
slideClassName
|
|
11149
11154
|
),
|
|
11150
11155
|
onClick: () => !disableClick && setCurrentIndex(index),
|
|
11151
11156
|
style: {
|