@seeqdev/qomponents 0.0.133 → 0.0.134

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
3
  interface Props {
3
4
  children: React.ReactNode;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ButtonProps } from '../Button/Button.types';
2
3
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
3
  interface DropdownSubItem {
3
4
  /** icon class to be used with the dropdown subitems - if available (i.e. 'fc-zoom') */
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { animated, useTransition } from '@react-spring/web';
2
+ import { motion } from 'framer-motion';
3
3
  import Button from '../Button/Button';
4
4
  /**
5
5
  * Carousel:
@@ -9,57 +9,60 @@ import Button from '../Button/Button';
9
9
  const Carousel = ({ testId = 'carousel-id', activeIndex = 0, extraClassNames = '', onSlide = () => { }, autoSlide, showIndicators = true, continuous = true, interval = 4000, prevIcon = 'fc-arrow-dropdown tw-rotate-90', nextIcon = 'fc-arrow-dropdown -tw-rotate-90', showArrows = true, iconExtraClassNames = '', carouselItems = [], }) => {
10
10
  const [currentIndex, setCurrentIndex] = useState(activeIndex);
11
11
  const changeSlide = (nextIndex) => {
12
- const newIndex = nextIndex % carouselItems.length;
12
+ const newIndex = (nextIndex + carouselItems.length) % carouselItems.length;
13
13
  setCurrentIndex(newIndex);
14
14
  onSlide(newIndex, newIndex > currentIndex ? 'right' : 'left');
15
15
  };
16
16
  useEffect(() => {
17
17
  if (autoSlide) {
18
- const currentInterval = setInterval(() => {
19
- if (continuous) {
20
- setCurrentIndex((prevCurrentIndex) => {
21
- onSlide((prevCurrentIndex + 1) % carouselItems.length, (prevCurrentIndex + 1) % carouselItems.length > prevCurrentIndex ? 'right' : 'left');
22
- return (prevCurrentIndex + 1) % carouselItems.length;
23
- });
24
- }
25
- else if (currentIndex === carouselItems.length - 1) {
26
- clearInterval(currentInterval);
18
+ const slideInterval = setInterval(() => {
19
+ if (continuous || currentIndex < carouselItems.length - 1) {
20
+ changeSlide(currentIndex + 1);
27
21
  }
28
22
  else {
29
- changeSlide(currentIndex + 1);
23
+ clearInterval(slideInterval);
30
24
  }
31
25
  }, interval);
32
- return () => clearInterval(currentInterval);
26
+ return () => clearInterval(slideInterval);
33
27
  }
34
- }, [autoSlide]);
28
+ }, [autoSlide, currentIndex, continuous, interval, carouselItems.length]);
35
29
  useEffect(() => {
36
- if (activeIndex && activeIndex !== currentIndex) {
30
+ if (activeIndex !== currentIndex) {
37
31
  setCurrentIndex(activeIndex);
38
32
  }
39
33
  }, [activeIndex]);
40
- const transitions = useTransition([currentIndex], {
41
- keys: null,
42
- exitBeforeEnter: true,
43
- from: { transform: 'translate3d(100%,0,0)' },
44
- enter: { transform: 'translate3d(0%,0,0)' },
45
- leave: { transform: 'translate3d(0%,0,0)' },
46
- });
47
34
  const onBackClick = () => {
48
35
  if (currentIndex === 0 && !continuous) {
49
36
  return;
50
37
  }
51
- changeSlide((currentIndex - 1) % carouselItems.length);
38
+ changeSlide(currentIndex - 1);
52
39
  };
53
40
  const onForwardClick = () => {
54
41
  if (currentIndex === carouselItems.length - 1 && !continuous) {
55
42
  return;
56
43
  }
57
- changeSlide((currentIndex + 1) % carouselItems.length);
44
+ changeSlide(currentIndex + 1);
45
+ };
46
+ const slideVariants = {
47
+ initial: (direction) => ({
48
+ x: direction > 0 ? '100%' : '-100%',
49
+ opacity: 0,
50
+ }),
51
+ animate: {
52
+ x: 0,
53
+ opacity: 1,
54
+ transition: { type: 'spring', damping: 20, stiffness: 100 },
55
+ },
56
+ exit: (direction) => ({
57
+ x: direction > 0 ? '-100%' : '100%',
58
+ opacity: 0,
59
+ transition: { type: 'spring', damping: 20, stiffness: 100 },
60
+ }),
58
61
  };
59
62
  return (React.createElement("div", { "data-testid": testId, className: `tw-flex tw-flex-col tw-items-center tw-justify-center tw-w-full tw-overflow-hidden ${extraClassNames}` },
60
63
  React.createElement("div", { className: "tw-flex tw-items-center tw-w-full tw-h-max tw-gap-1" },
61
64
  showArrows && (React.createElement(Button, { icon: prevIcon, size: "lg", variant: "no-border", testId: "carousel-prev", extraClassNames: `${currentIndex === 0 && !continuous ? 'tw-invisible' : ''} ${iconExtraClassNames} tw-animate-fadeIn`, onClick: onBackClick })),
62
- transitions((style, i) => (React.createElement(animated.div, { "data-testid": `${testId}-${currentIndex}`, style: style, className: "tw-w-full" }, carouselItems[currentIndex]))),
65
+ React.createElement(motion.div, { key: currentIndex, custom: 1, initial: "initial", animate: "animate", exit: "exit", variants: slideVariants, className: "tw-w-full" }, carouselItems[currentIndex]),
63
66
  showArrows && (React.createElement(Button, { icon: nextIcon, testId: "carousel-next", size: "lg", variant: "no-border", extraClassNames: `${currentIndex === carouselItems.length - 1 && !continuous ? 'tw-invisible' : ''} ${iconExtraClassNames} tw-animate-fadeIn`, onClick: onForwardClick }))),
64
67
  showIndicators && (React.createElement("div", { className: "tw-flex tw-gap-1 tw-mt-2" }, carouselItems.map((_, i) => (React.createElement("div", { key: i, className: `tw-w-2 tw-h-2 tw-rounded-full tw-cursor-pointer ${i === currentIndex ? 'tw-bg-sq-color-dark' : 'tw-bg-sq-darkish-gray'}`, onClick: () => changeSlide(i) })))))));
65
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;;;GAIG;AACH,MAAM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C3C,OAAO,EAAE,cAAc,GACvB,CACH,CACG;QACL,cAAc,IAAI,CACjB,6BAAK,SAAS,EAAC,0BAA0B,IACtC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3B,6BACE,GAAG,EAAE,CAAC,EACN,SAAS,EAAE,mDACT,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,uBAC/C,EAAE,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,GAC7B,CACH,CAAC,CACE,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * Properties for the Carousel component.
3
4
  */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
3
  type FormControlElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
3
4
  export interface CheckboxProps extends TooltipComponentProps {
@@ -1,18 +1,15 @@
1
1
  import React, { useRef, useEffect, useState } from 'react';
2
- import { animated, useSpring } from '@react-spring/web';
2
+ import { motion, AnimatePresence } from 'framer-motion';
3
3
  const Collapse = ({ isVisible, children }) => {
4
4
  const contentRef = useRef(null);
5
- const [contentHeight, setContentHeight] = useState(contentRef.current?.scrollHeight);
5
+ const [contentHeight, setContentHeight] = useState(0);
6
6
  useEffect(() => {
7
7
  if (contentRef.current) {
8
- setContentHeight(contentRef.current?.scrollHeight ?? 0);
8
+ setContentHeight(contentRef.current.scrollHeight);
9
9
  }
10
10
  }, [children]);
11
- const styles = useSpring({
12
- opacity: isVisible ? 1 : 0,
13
- height: isVisible ? contentHeight : 0,
14
- });
15
- return React.createElement(animated.div, { style: styles }, isVisible ? React.createElement("div", { ref: contentRef }, children) : undefined);
11
+ return (React.createElement(AnimatePresence, { initial: false }, isVisible && (React.createElement(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: contentHeight, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { type: 'spring', damping: 20, stiffness: 100 }, style: { overflow: 'hidden' } },
12
+ React.createElement("div", { ref: contentRef }, children)))));
16
13
  };
17
14
  export default Collapse;
18
15
  //# sourceMappingURL=Collapse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Collapse.js","sourceRoot":"","sources":["../../src/Collapse/Collapse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,QAAQ,GAA2C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnF,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAErF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,gBAAgB,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,IAAI,CAAC,CAAC,CAAC;SACzD;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,MAAM,GAAG,SAAS,CAAC;QACvB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;KACtC,CAAC,CAAC;IAEH,OAAO,oBAAC,QAAQ,CAAC,GAAG,IAAC,KAAK,EAAE,MAAM,IAAG,SAAS,CAAC,CAAC,CAAC,6BAAK,GAAG,EAAE,UAAU,IAAG,QAAQ,CAAO,CA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CACd,CACe,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface CollapseProps {
2
3
  isVisible: boolean;
3
4
  children: React.ReactNode;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
3
  export declare const iconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success"];
3
4
  export type IconType = (typeof iconTypes)[number];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ButtonProps } from '../Button/Button.types';
2
3
  import { InputLengthStyleProps, TextFieldProps } from '../TextField/TextField.types';
3
4
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
3
  export interface SeeqActionDropdownItems {
3
4
  id?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface SliderProps {
2
3
  disabled?: boolean;
3
4
  onValueChange?: (value: number[]) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface TabsProps {
2
3
  extraClassNames?: string;
3
4
  defaultActiveTab?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormControlElement } from '../types';
2
3
  export interface TextAreaProps {
3
4
  /** extra class names to be placed on the TextArea component */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
3
  import { FormControlElement, InputGroupPlacement } from '../types';
3
4
  export interface TextFieldProps extends TooltipComponentProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const DEFAULT_TOOL_TIP_DELAY = 500;
2
3
  export declare const tooltipPositions: readonly ["top", "left", "right", "bottom"];
3
4
  export type TooltipPosition = (typeof tooltipPositions)[number];