@seeqdev/qomponents 0.0.124 → 0.0.126

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.
@@ -0,0 +1,115 @@
1
+ import React from 'react';
2
+ import { QTip } from '../Tooltip/Qtip';
3
+ import Carousel from './Carousel';
4
+ import Button from '../Button';
5
+ export default {
6
+ title: 'Carousel',
7
+ };
8
+ export const AllCarousels = () => {
9
+ const [value, setValue] = React.useState(0);
10
+ const renderChild = (text, extraClass) => (React.createElement("div", { className: 'tw-p-4 tw-text-sq-color-gray dark:tw-text-sq-white tw-h-[200px] ' + extraClass },
11
+ React.createElement("p", { className: "tw-mb-5 tw-text-[15px] tw-leading-normal" }, text),
12
+ React.createElement(Button, { variant: "outline", label: "Save data" })));
13
+ const renderAllVariations = () => (React.createElement(React.Fragment, null,
14
+ React.createElement("div", { className: "light" },
15
+ React.createElement("div", { className: "tw-p-4" },
16
+ React.createElement("p", null, "Controlled"),
17
+ React.createElement(Carousel, { carouselItems: [
18
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
19
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
20
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
21
+ ], activeIndex: value, onSlide: (index) => setValue(index) })),
22
+ React.createElement("div", { className: "tw-p-4" },
23
+ React.createElement("p", null, "Uncontrolled"),
24
+ React.createElement(Carousel, { carouselItems: [
25
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
26
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
27
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
28
+ ], autoSlide: true, continuous: true, showArrows: false })),
29
+ React.createElement("div", { className: "tw-p-4" },
30
+ React.createElement("p", null, "Custom side buttons"),
31
+ React.createElement(Carousel, { carouselItems: [
32
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
33
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
34
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
35
+ ], activeIndex: value, onSlide: (index) => setValue(index), nextIcon: "fc-more", prevIcon: "fc-y-axis" })),
36
+ React.createElement("div", { className: "tw-p-4" },
37
+ React.createElement("p", null, "Continuous"),
38
+ React.createElement(Carousel, { carouselItems: [
39
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
40
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
41
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
42
+ ], activeIndex: value, onSlide: (index) => setValue(index), continuous: true })),
43
+ React.createElement("div", { className: "tw-p-4" },
44
+ React.createElement("p", null, "Non continuous"),
45
+ React.createElement(Carousel, { carouselItems: [
46
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
47
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
48
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
49
+ ], activeIndex: value, onSlide: (index) => setValue(index), showArrows: true, continuous: false })),
50
+ React.createElement("div", { className: "tw-p-4" },
51
+ React.createElement("p", null, "Without indicators"),
52
+ React.createElement(Carousel, { carouselItems: [
53
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
54
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
55
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
56
+ ], activeIndex: value, onSlide: (index) => setValue(index), showArrows: true, continuous: true, showIndicators: false }))),
57
+ React.createElement("div", { className: "tw-dark tw-bg-sq-dark-background" },
58
+ React.createElement("div", { className: "tw-p-4" },
59
+ React.createElement("p", null, "Controlled"),
60
+ React.createElement(Carousel, { carouselItems: [
61
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
62
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
63
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
64
+ ], activeIndex: value, onSlide: (index) => setValue(index) })),
65
+ React.createElement("div", { className: "tw-p-4" },
66
+ React.createElement("p", null, "Uncontrolled"),
67
+ React.createElement(Carousel, { carouselItems: [
68
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
69
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
70
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
71
+ ], autoSlide: true, continuous: true, showArrows: false })),
72
+ React.createElement("div", { className: "tw-p-4" },
73
+ React.createElement("p", null, "Custom side buttons"),
74
+ React.createElement(Carousel, { carouselItems: [
75
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
76
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
77
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
78
+ ], activeIndex: value, onSlide: (index) => setValue(index), nextIcon: "fc-more", prevIcon: "fc-y-axis" })),
79
+ React.createElement("div", { className: "tw-p-4" },
80
+ React.createElement("p", null, "Continuous"),
81
+ React.createElement(Carousel, { carouselItems: [
82
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
83
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
84
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
85
+ ], activeIndex: value, onSlide: (index) => setValue(index), continuous: true })),
86
+ React.createElement("div", { className: "tw-p-4" },
87
+ React.createElement("p", null, "Non continuous"),
88
+ React.createElement(Carousel, { carouselItems: [
89
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
90
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
91
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
92
+ ], activeIndex: value, onSlide: (index) => setValue(index), showArrows: true, continuous: false })),
93
+ React.createElement("div", { className: "tw-p-4" },
94
+ React.createElement("p", null, "Without indicators"),
95
+ React.createElement(Carousel, { carouselItems: [
96
+ renderChild('First of her name, the Queen to be, long may she reign', 'tw-bg-yellow-500'),
97
+ renderChild('Second of her home, but her love conquers all', 'tw-bg-green-500'),
98
+ renderChild('Third is a wonder, the embodiment of hope and faith', 'tw-bg-gray-500'),
99
+ ], activeIndex: value, onSlide: (index) => setValue(index), showArrows: true, continuous: true, showIndicators: false })))));
100
+ return (React.createElement("div", { className: "tw-grid tw-grid-cols-4 tw-gap-4" },
101
+ React.createElement(QTip, null),
102
+ React.createElement("div", { className: "color_topic" },
103
+ React.createElement("b", null, "Topic Colors"),
104
+ renderAllVariations()),
105
+ React.createElement("div", { className: "color_analysis" },
106
+ React.createElement("b", null, "Analysis Colors"),
107
+ renderAllVariations()),
108
+ React.createElement("div", { className: "color_datalab" },
109
+ React.createElement("b", null, "Datalab Colors"),
110
+ renderAllVariations()),
111
+ React.createElement("div", { className: "color_vantage" },
112
+ React.createElement("b", null, "Vantage Colors"),
113
+ renderAllVariations())));
114
+ };
115
+ //# sourceMappingURL=Carousel.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Carousel.stories.js","sourceRoot":"","sources":["../../src/Carousel/Carousel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,eAAe;IACb,KAAK,EAAE,UAAU;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE5C,MAAM,WAAW,GA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AE,CAClB;QAEN,6BAAK,SAAS,EAAC,eAAe;YAC5B,gDAAqB;YACpB,mBAAmB,EAAE,CAClB;QAEN,6BAAK,SAAS,EAAC,eAAe;YAC5B,gDAAqB;YACpB,mBAAmB,EAAE,CAClB,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import '@testing-library/jest-dom';
3
+ import { act, render, fireEvent, screen } from '@testing-library/react';
4
+ import Carousel from './Carousel';
5
+ describe('Carousel Component', () => {
6
+ const mockOnSlide = jest.fn();
7
+ const carouselItems = [React.createElement("div", { key: "1" }, "Slide 1"), React.createElement("div", { key: "2" }, "Slide 2"), React.createElement("div", { key: "3" }, "Slide 3")];
8
+ it('renders correctly', () => {
9
+ render(React.createElement(Carousel, { testId: "carousel", carouselItems: carouselItems }));
10
+ expect(screen.getByTestId('carousel')).toBeInTheDocument();
11
+ });
12
+ it('shows the correct initial slide', () => {
13
+ render(React.createElement(Carousel, { testId: "carousel", carouselItems: carouselItems, activeIndex: 1 }));
14
+ expect(screen.getByText('Slide 2')).toBeInTheDocument();
15
+ });
16
+ it('calls onSlide when next button is clicked', () => {
17
+ render(React.createElement(Carousel, { testId: "carousel", carouselItems: carouselItems, onSlide: mockOnSlide }));
18
+ const nextButton = screen.getByTestId('carousel-next');
19
+ fireEvent.click(nextButton);
20
+ expect(mockOnSlide).toHaveBeenCalledWith(1, 'right');
21
+ });
22
+ it('calls onSlide when previous button is clicked', () => {
23
+ render(React.createElement(Carousel, { testId: "carousel", carouselItems: carouselItems, onSlide: mockOnSlide, activeIndex: 1 }));
24
+ const prevButton = screen.getByTestId('carousel-prev');
25
+ fireEvent.click(prevButton);
26
+ expect(mockOnSlide).toHaveBeenCalledWith(0, 'left');
27
+ });
28
+ it('does not move past the last slide', () => {
29
+ render(React.createElement(Carousel, { testId: "carousel", carouselItems: carouselItems, activeIndex: 2, continuous: false }));
30
+ const nextButton = screen.queryByTestId('carousel-next');
31
+ expect(nextButton).toHaveClass('tw-invisible');
32
+ });
33
+ it('autoSlides correctly', async () => {
34
+ jest.useFakeTimers();
35
+ render(React.createElement(Carousel, { testId: "carousel", carouselItems: carouselItems, autoSlide: true, interval: 1000 }));
36
+ expect(screen.getByText('Slide 1')).toBeInTheDocument();
37
+ act(() => {
38
+ jest.advanceTimersByTime(1000);
39
+ });
40
+ expect(screen.getByText('Slide 2')).toBeInTheDocument();
41
+ act(() => {
42
+ jest.advanceTimersByTime(1000);
43
+ });
44
+ expect(screen.getByText('Slide 3')).toBeInTheDocument();
45
+ jest.useRealTimers();
46
+ });
47
+ });
48
+ //# sourceMappingURL=Carousel.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Carousel.test.js","sourceRoot":"","sources":["../../src/Carousel/Carousel.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC9B,MAAM,aAAa,GAAG,CAAC,6BAAK,GAAG,EAAC,GAAG,cAAc,EAAE,6BAAK,GAAG,EAAC,GAAG,cAAc,EAAE,6BAAK,GAAG,EAAC,GAAG,cAAc,CAAC,CAAC;IAE3G,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,oBAAC,QAAQ,IAAC,MAAM,EAAC,UAAU,EAAC,aAAa,EAAE,aAAa,GAAI,CAAC,CAAC;QACrE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAC7D,CAAC,CA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E,CAAC,EAAE,UAAU,EAAE,KAAK,GAAI,CAAC,CAAC;QACxG,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QACzD,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACpC,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,MAAM,CAAC,oBAAC,QAAQ,IAAC,MAAM,EAAC,UAAU,EAAC,aAAa,EAAE,aAAa,EAAE,SAAS,QAAC,QAAQ,EAAE,IAAI,GAAI,CAAC,CAAC;QAE/F,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QACxD,GAAG,CAAC,GAAG,EAAE;YACP,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAExD,GAAG,CAAC,GAAG,EAAE;YACP,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAExD,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Properties for the Carousel component.
3
+ */
4
+ export interface CarouselProps {
5
+ testId?: string;
6
+ extraClassNames?: string;
7
+ activeIndex?: number;
8
+ /**
9
+ * Callback function that is called when the slide changes.
10
+ * @param nextSlide - The index of the next slide.
11
+ * @param direction - The direction of the slide change, either 'left' or 'right'.
12
+ */
13
+ onSlide?: (nextSlide: number, direction: 'left' | 'right') => void;
14
+ autoSlide?: boolean;
15
+ interval?: number;
16
+ nextIcon?: string;
17
+ prevIcon?: string;
18
+ iconExtraClassNames?: string;
19
+ showArrows?: boolean;
20
+ showIndicators?: boolean;
21
+ continuous?: boolean;
22
+ carouselItems: React.ReactNode[];
23
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Carousel.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Carousel.types.js","sourceRoot":"","sources":["../../src/Carousel/Carousel.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { default } from './Carousel';
@@ -0,0 +1,2 @@
1
+ export { default } from './Carousel';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Carousel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.esm.js CHANGED
@@ -15850,7 +15850,7 @@ const Alert = ({ children, dismissible = true, onClose, show = true, variant, te
15850
15850
  }
15851
15851
  return (React__default.createElement("div", { "data-testid": testId, id: id, className: appliedClasses },
15852
15852
  children,
15853
- dismissible && (React__default.createElement(Icon, { icon: "fc-delete", type: variant.match(/danger|warning/) ? 'color' : 'theme', color: variant.match(/danger|warning/) ? 'inherit' : undefined, extraClassNames: `tw-self-end tw-text-[11px] tw-cursor-pointer tw-absolute tw-right-[10px] tw-top-[10px] ${variant.match(/danger|warning|gray/) ? 'tw-text-sq-text-color dark:tw-text-sq-text-color' : ''}`, testId: `${testId}-close-btn`, onClick: onClose, ...tooltipProps }))));
15853
+ dismissible && (React__default.createElement(Icon, { icon: "fc-delete", type: variant.match(/danger|warning/) ? 'color' : 'theme', color: variant.match(/danger|warning/) ? 'inherit' : undefined, extraClassNames: `tw-self-end tw-text-[11px] tw-cursor-pointer tw-absolute tw-right-[10px] tw-top-[10px] ${variant.match(/danger|warning|gray/) ? 'tw-text-sq-text-color dark:tw-text-sq-dark-text' : ''}`, testId: `${testId}-close-btn`, onClick: onClose, ...tooltipProps }))));
15854
15854
  };
15855
15855
 
15856
15856
  const SeeqActionDropdownItem = (item) => {
@@ -20671,7 +20671,7 @@ const ProgressIndicator = (props) => {
20671
20671
  }, 100);
20672
20672
  return () => clearTimeout(timeout);
20673
20673
  }, [value]);
20674
- return (React__default.createElement(Indicator, { className: `tw-ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw-w-full tw-h-full tw-duration-[660ms] tw-flex tw-bg-sq-color-dark ${extraClasses}`, ...tooltipData, "data-qtip-text": tooltipProps.tooltip ? tooltipProps.tooltip : `${value}%`, "data-testid": `progress-bar-indicator-${testId ? testId : value}`, key: `${index}-${value}`, style: {
20674
+ return (React__default.createElement(Indicator, { className: `tw-ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw-w-full tw-h-full tw-duration-[660ms] tw-flex tw-bg-sq-color-dark tw-justify-center tw-items-center ${extraClasses}`, ...tooltipData, "data-qtip-text": tooltipProps.tooltip ? tooltipProps.tooltip : `${value}%`, "data-testid": `progress-bar-indicator-${testId ? testId : value}`, key: `${index}-${value}`, style: {
20675
20675
  // Background color will default to the theme color if undefined
20676
20676
  backgroundColor: color ? color : undefined,
20677
20677
  animation: 'width 660ms forwards',