@sikka/hawa 0.16.14-next → 0.16.15-next

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.mts CHANGED
@@ -410,6 +410,7 @@ interface DialogCarouselProps {
410
410
  children: React$1.ReactNode;
411
411
  stepsApi?: any;
412
412
  stepsRef?: any;
413
+ direction?: DirectionType;
413
414
  }
414
415
  declare const DialogCarousel: React$1.FC<DialogCarouselProps>;
415
416
  interface DialogStepsProps {
@@ -1750,7 +1751,7 @@ declare function useToast(): {
1750
1751
  toasts: ToasterToast[];
1751
1752
  };
1752
1753
 
1753
- declare const useDialogCarousel: () => {
1754
+ declare const useDialogCarousel: (options?: any) => {
1754
1755
  emblaRef: <ViewportElement extends HTMLElement>(instance: ViewportElement | null) => void;
1755
1756
  emblaApi: embla_carousel_react.EmblaCarouselType | undefined;
1756
1757
  nextStep: () => void;
package/dist/index.d.ts CHANGED
@@ -410,6 +410,7 @@ interface DialogCarouselProps {
410
410
  children: React$1.ReactNode;
411
411
  stepsApi?: any;
412
412
  stepsRef?: any;
413
+ direction?: DirectionType;
413
414
  }
414
415
  declare const DialogCarousel: React$1.FC<DialogCarouselProps>;
415
416
  interface DialogStepsProps {
@@ -1750,7 +1751,7 @@ declare function useToast(): {
1750
1751
  toasts: ToasterToast[];
1751
1752
  };
1752
1753
 
1753
- declare const useDialogCarousel: () => {
1754
+ declare const useDialogCarousel: (options?: any) => {
1754
1755
  emblaRef: <ViewportElement extends HTMLElement>(instance: ViewportElement | null) => void;
1755
1756
  emblaApi: embla_carousel_react.EmblaCarouselType | undefined;
1756
1757
  nextStep: () => void;
package/dist/index.js CHANGED
@@ -3878,19 +3878,18 @@ var DialogFooter = ({
3878
3878
  var DialogCarousel = ({
3879
3879
  stepsApi,
3880
3880
  stepsRef,
3881
- children
3881
+ children,
3882
+ direction
3882
3883
  }) => {
3883
- const [selectedIndex, setSelectedIndex] = React25.useState(0);
3884
- const steps = React25.Children.toArray(children);
3885
3884
  React25.useEffect(() => {
3886
3885
  if (stepsApi) {
3887
3886
  stepsApi.reInit();
3888
3887
  }
3889
3888
  }, [stepsApi, children]);
3890
- return /* @__PURE__ */ React25.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React25.createElement("div", { ref: stepsRef }, /* @__PURE__ */ React25.createElement(
3889
+ return /* @__PURE__ */ React25.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React25.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React25.createElement(
3891
3890
  "div",
3892
3891
  {
3893
- className: "hawa-flex first-line:",
3892
+ className: "hawa-flex",
3894
3893
  style: {
3895
3894
  transition: "height 0.2s"
3896
3895
  }
@@ -3899,7 +3898,7 @@ var DialogCarousel = ({
3899
3898
  "div",
3900
3899
  {
3901
3900
  className: cn(
3902
- " hawa-justify-center hawa-h-fit hawa-flex hawa-items-center hawa-flex-[0_0_100%]"
3901
+ "hawa-justify-center hawa-h-fit hawa-flex hawa-items-center hawa-flex-[0_0_100%]"
3903
3902
  ),
3904
3903
  key: index
3905
3904
  },
@@ -10471,9 +10470,9 @@ var import_react72 = require("react");
10471
10470
  // components/hooks/useDialogCarousel.ts
10472
10471
  var import_embla_carousel_react2 = __toESM(require("embla-carousel-react"));
10473
10472
  var import_embla_carousel_auto_height = __toESM(require("embla-carousel-auto-height"));
10474
- var useDialogCarousel = () => {
10473
+ var useDialogCarousel = (options) => {
10475
10474
  const [emblaRef, emblaApi] = (0, import_embla_carousel_react2.default)(
10476
- { loop: false, watchDrag: false, startIndex: 0 },
10475
+ { loop: false, watchDrag: false, startIndex: 0, ...options },
10477
10476
  [(0, import_embla_carousel_auto_height.default)({ destroyHeight: "fit", active: true })]
10478
10477
  );
10479
10478
  const nextStep = () => {
package/dist/index.mjs CHANGED
@@ -3660,19 +3660,18 @@ var DialogFooter = ({
3660
3660
  var DialogCarousel = ({
3661
3661
  stepsApi,
3662
3662
  stepsRef,
3663
- children
3663
+ children,
3664
+ direction
3664
3665
  }) => {
3665
- const [selectedIndex, setSelectedIndex] = React25.useState(0);
3666
- const steps = React25.Children.toArray(children);
3667
3666
  React25.useEffect(() => {
3668
3667
  if (stepsApi) {
3669
3668
  stepsApi.reInit();
3670
3669
  }
3671
3670
  }, [stepsApi, children]);
3672
- return /* @__PURE__ */ React25.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React25.createElement("div", { ref: stepsRef }, /* @__PURE__ */ React25.createElement(
3671
+ return /* @__PURE__ */ React25.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React25.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React25.createElement(
3673
3672
  "div",
3674
3673
  {
3675
- className: "hawa-flex first-line:",
3674
+ className: "hawa-flex",
3676
3675
  style: {
3677
3676
  transition: "height 0.2s"
3678
3677
  }
@@ -3681,7 +3680,7 @@ var DialogCarousel = ({
3681
3680
  "div",
3682
3681
  {
3683
3682
  className: cn(
3684
- " hawa-justify-center hawa-h-fit hawa-flex hawa-items-center hawa-flex-[0_0_100%]"
3683
+ "hawa-justify-center hawa-h-fit hawa-flex hawa-items-center hawa-flex-[0_0_100%]"
3685
3684
  ),
3686
3685
  key: index
3687
3686
  },
@@ -10265,9 +10264,9 @@ import { useState as useState39, useRef as useRef15 } from "react";
10265
10264
  // components/hooks/useDialogCarousel.ts
10266
10265
  import useEmblaCarousel2 from "embla-carousel-react";
10267
10266
  import AutoHeight from "embla-carousel-auto-height";
10268
- var useDialogCarousel = () => {
10267
+ var useDialogCarousel = (options) => {
10269
10268
  const [emblaRef, emblaApi] = useEmblaCarousel2(
10270
- { loop: false, watchDrag: false, startIndex: 0 },
10269
+ { loop: false, watchDrag: false, startIndex: 0, ...options },
10271
10270
  [AutoHeight({ destroyHeight: "fit", active: true })]
10272
10271
  );
10273
10272
  const nextStep = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.16.14-next",
3
+ "version": "0.16.15-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {