@seeqdev/qomponents 0.0.132 → 0.0.133
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/README.md +135 -135
- package/dist/Accordion/Accordion.js +8 -8
- package/dist/Accordion/Accordion.stories.js +114 -114
- package/dist/Accordion/Accordion.test.js +54 -54
- package/dist/Accordion/Accordion.types.js +1 -1
- package/dist/Accordion/index.js +1 -1
- package/dist/Alert/Alert.js +33 -33
- package/dist/Alert/Alert.stories.js +51 -51
- package/dist/Alert/Alert.test.js +50 -50
- package/dist/Alert/Alert.types.js +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Button/Button.js +91 -91
- package/dist/Button/Button.stories.js +99 -99
- package/dist/Button/Button.test.js +48 -48
- package/dist/Button/Button.types.js +4 -4
- package/dist/Button/index.js +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +32 -32
- package/dist/ButtonGroup/ButtonGroup.stories.js +384 -384
- package/dist/ButtonGroup/ButtonGroup.test.js +66 -66
- package/dist/ButtonGroup/ButtonGroup.types.js +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js +59 -59
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +142 -142
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +92 -92
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js +1 -1
- package/dist/ButtonWithDropdown/index.js +1 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.js +61 -61
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +74 -74
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js +81 -81
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js +1 -1
- package/dist/ButtonWithPopover/index.js +1 -1
- package/dist/Carousel/Carousel.js +66 -66
- package/dist/Carousel/Carousel.stories.js +114 -114
- package/dist/Carousel/Carousel.test.js +47 -47
- package/dist/Carousel/Carousel.types.js +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/Checkbox/Checkbox.js +25 -25
- package/dist/Checkbox/Checkbox.stories.js +33 -33
- package/dist/Checkbox/Checkbox.test.js +93 -93
- package/dist/Checkbox/Checkbox.types.js +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Collapse/Collapse.js +17 -17
- package/dist/Collapse/Collapse.stories.js +36 -36
- package/dist/Collapse/Collapse.test.js +18 -18
- package/dist/Collapse/Collapse.types.js +1 -1
- package/dist/Collapse/index.js +1 -1
- package/dist/Icon/Icon.js +54 -54
- package/dist/Icon/Icon.stories.js +46 -46
- package/dist/Icon/Icon.test.js +54 -54
- package/dist/Icon/Icon.types.js +15 -15
- package/dist/Icon/index.js +1 -1
- package/dist/InputGroup/InputGroup.js +31 -31
- package/dist/InputGroup/InputGroup.stories.js +167 -167
- package/dist/InputGroup/InputGroup.test.js +42 -42
- package/dist/InputGroup/InputGroup.types.js +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/Modal/Modal.js +99 -99
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.stories.js +126 -126
- package/dist/Modal/Modal.test.js +107 -107
- package/dist/Modal/Modal.types.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/ProgressBar/ProgressBar.js +49 -29
- package/dist/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/ProgressBar/ProgressBar.stories.js +80 -72
- package/dist/ProgressBar/ProgressBar.stories.js.map +1 -1
- package/dist/ProgressBar/ProgressBar.test.js +43 -37
- package/dist/ProgressBar/ProgressBar.test.js.map +1 -1
- package/dist/ProgressBar/ProgressBar.types.d.ts +2 -0
- package/dist/ProgressBar/ProgressBar.types.js +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.js +47 -47
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js +79 -79
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js +72 -72
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js +1 -1
- package/dist/SeeqActionDropdown/index.js +1 -1
- package/dist/SeeqActionDropdown/variants.js +22 -22
- package/dist/Select/Select.js +173 -173
- package/dist/Select/Select.stories.js +79 -79
- package/dist/Select/Select.test.js +181 -181
- package/dist/Select/Select.types.js +1 -1
- package/dist/Select/index.js +2 -2
- package/dist/Slider/Slider.js +12 -12
- package/dist/Slider/Slider.stories.js +57 -57
- package/dist/Slider/Slider.test.js +32 -32
- package/dist/Slider/Slider.types.js +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/Tabs/Tabs.js +21 -21
- package/dist/Tabs/Tabs.stories.js +90 -90
- package/dist/Tabs/Tabs.test.js +90 -90
- package/dist/Tabs/Tabs.types.js +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/TextArea/TextArea.js +24 -24
- package/dist/TextArea/TextArea.stories.js +45 -45
- package/dist/TextArea/TextArea.test.js +67 -67
- package/dist/TextArea/TextArea.types.js +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/TextField/TextField.js +78 -78
- package/dist/TextField/TextField.stories.js +69 -69
- package/dist/TextField/TextField.test.js +38 -38
- package/dist/TextField/TextField.types.js +1 -1
- package/dist/TextField/index.js +1 -1
- package/dist/ToolbarButton/ToolbarButton.js +74 -74
- package/dist/ToolbarButton/ToolbarButton.stories.js +93 -93
- package/dist/ToolbarButton/ToolbarButton.test.js +92 -92
- package/dist/ToolbarButton/ToolbarButton.types.js +1 -1
- package/dist/ToolbarButton/index.js +1 -1
- package/dist/Tooltip/QTip.stories.js +44 -44
- package/dist/Tooltip/QTip.types.js +1 -1
- package/dist/Tooltip/QTipPerformance.stories.js +29 -29
- package/dist/Tooltip/Qtip.js +167 -167
- package/dist/Tooltip/Tooltip.js +35 -35
- package/dist/Tooltip/Tooltip.stories.js +31 -31
- package/dist/Tooltip/Tooltip.types.js +2 -2
- package/dist/Tooltip/TooltipPerformance.stories.js +29 -29
- package/dist/Tooltip/index.js +2 -2
- package/dist/Tooltip/qTip.utilities.js +10 -10
- package/dist/example/.eslintrc.cjs +14 -14
- package/dist/example/README.md +33 -33
- package/dist/example/index.html +13 -13
- package/dist/example/package.json +30 -30
- package/dist/example/src/ComplexSelectExample.tsx +81 -81
- package/dist/example/src/Example.tsx +408 -408
- package/dist/example/src/index.css +102 -102
- package/dist/example/src/main.tsx +10 -10
- package/dist/example/src/vite-env.d.ts +1 -1
- package/dist/example/tsconfig.json +33 -33
- package/dist/example/tsconfig.node.json +12 -12
- package/dist/example/vite.config.ts +12 -12
- package/dist/index.esm.js +1229 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1229 -31
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3714 -3709
- package/dist/types.js +1 -1
- package/dist/utils/browserId.js +28 -28
- package/dist/utils/svg.js +19 -19
- package/dist/utils/validateStyleDimension.js +13 -13
- package/dist/utils/validateStyleDimension.test.js +19 -19
- package/package.json +88 -86
package/dist/Modal/Modal.test.js
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '@testing-library/jest-dom';
|
|
3
|
-
import { render, screen } from '@testing-library/react';
|
|
4
|
-
import userEvent from '@testing-library/user-event';
|
|
5
|
-
import Modal from './Modal';
|
|
6
|
-
describe('Modal', () => {
|
|
7
|
-
class Context {
|
|
8
|
-
props = {
|
|
9
|
-
onTitleChanged: jest.fn(),
|
|
10
|
-
disableSubmitButton: false,
|
|
11
|
-
title: 'Testing Modal Dialog',
|
|
12
|
-
children: React.createElement("div", null, "Modal content"),
|
|
13
|
-
open: true,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
let tc;
|
|
17
|
-
beforeEach(() => {
|
|
18
|
-
tc = new Context();
|
|
19
|
-
});
|
|
20
|
-
const renderModal = (props) => render(React.createElement(Modal, { ...props }));
|
|
21
|
-
describe('renders Modal', () => {
|
|
22
|
-
it('doesn\'t render the modal if the open state is false', () => {
|
|
23
|
-
const open = false;
|
|
24
|
-
renderModal({ ...tc.props, open });
|
|
25
|
-
expect(screen.queryByTestId('modal')).not.toBeInTheDocument();
|
|
26
|
-
});
|
|
27
|
-
it('renders the modal if the open state is true', () => {
|
|
28
|
-
renderModal(tc.props);
|
|
29
|
-
expect(screen.getByTestId('modal')).toBeInTheDocument();
|
|
30
|
-
expect(screen.getByTestId('modal')).toHaveClass('tw-max-w-xl');
|
|
31
|
-
});
|
|
32
|
-
it('calls onClose modal when close button is clicked', async () => {
|
|
33
|
-
const onClose = jest.fn();
|
|
34
|
-
const { getByTestId } = renderModal({ ...tc.props, onClose });
|
|
35
|
-
expect(screen.getByTestId('modal')).toBeInTheDocument();
|
|
36
|
-
await userEvent.click(getByTestId('closeButton'));
|
|
37
|
-
expect(onClose).toHaveBeenCalled();
|
|
38
|
-
});
|
|
39
|
-
it('hides close button', () => {
|
|
40
|
-
const hideCloseIcon = true;
|
|
41
|
-
const { queryByTestId } = renderModal({ ...tc.props, hideCloseIcon });
|
|
42
|
-
expect(queryByTestId('closeButton')).not.toBeInTheDocument();
|
|
43
|
-
});
|
|
44
|
-
it('renders modal size based on the size prop', () => {
|
|
45
|
-
const size = 'lg';
|
|
46
|
-
renderModal({ ...tc.props, size });
|
|
47
|
-
expect(screen.getByTestId('modal')).toHaveClass('tw-max-w-lg');
|
|
48
|
-
});
|
|
49
|
-
it('renders not editable title', () => {
|
|
50
|
-
renderModal(tc.props);
|
|
51
|
-
expect(screen.getByTestId('modalTitle')).not.toHaveAttribute('value');
|
|
52
|
-
});
|
|
53
|
-
it('renders editable title', () => {
|
|
54
|
-
const isTitleEditable = true;
|
|
55
|
-
const { getByTestId } = renderModal({ ...tc.props, isTitleEditable });
|
|
56
|
-
expect(getByTestId('modalTitle')).toHaveAttribute('value');
|
|
57
|
-
});
|
|
58
|
-
it('calls onChange when title is modified', async () => {
|
|
59
|
-
const isTitleEditable = true;
|
|
60
|
-
const { getByTestId } = renderModal({ ...tc.props, isTitleEditable });
|
|
61
|
-
await userEvent.type(getByTestId('modalTitle'), 'a');
|
|
62
|
-
expect(tc.props.onTitleChanged).toHaveBeenCalled();
|
|
63
|
-
});
|
|
64
|
-
it('displays icon title', () => {
|
|
65
|
-
const titleIcon = 'fc-check';
|
|
66
|
-
const { getByTestId } = renderModal({ ...tc.props, titleIcon });
|
|
67
|
-
expect(getByTestId('modalTitleIcon')).toBeInTheDocument();
|
|
68
|
-
});
|
|
69
|
-
it('calls onSubmit when submit button is clicked', async () => {
|
|
70
|
-
const onSubmit = jest.fn();
|
|
71
|
-
const { getByTestId } = renderModal({ ...tc.props, onSubmit });
|
|
72
|
-
expect(getByTestId('submitButton')).not.toBeDisabled();
|
|
73
|
-
await userEvent.click(getByTestId('submitButton'));
|
|
74
|
-
expect(onSubmit).toHaveBeenCalled();
|
|
75
|
-
});
|
|
76
|
-
it('displays the disabled submit button', async () => {
|
|
77
|
-
const onSubmit = jest.fn();
|
|
78
|
-
const disableSubmitButton = true;
|
|
79
|
-
const { getByTestId } = renderModal({ ...tc.props, onSubmit, disableSubmitButton });
|
|
80
|
-
expect(getByTestId('submitButton')).toBeDisabled();
|
|
81
|
-
await userEvent.click(getByTestId('submitButton'));
|
|
82
|
-
expect(onSubmit).not.toHaveBeenCalled();
|
|
83
|
-
});
|
|
84
|
-
it('calls onClose when cancel button is clicked', async () => {
|
|
85
|
-
const onClose = jest.fn();
|
|
86
|
-
const { getByTestId } = renderModal({ ...tc.props, onClose });
|
|
87
|
-
expect(getByTestId('cancelButton')).not.toBeDisabled();
|
|
88
|
-
await userEvent.click(getByTestId('cancelButton'));
|
|
89
|
-
expect(onClose).toHaveBeenCalled();
|
|
90
|
-
});
|
|
91
|
-
it('displays custom button', () => {
|
|
92
|
-
const customButton = true;
|
|
93
|
-
const customButtonLabel = 'Back';
|
|
94
|
-
const { getByTestId } = renderModal({ ...tc.props, customButton, customButtonLabel });
|
|
95
|
-
expect(getByTestId('customButton')).toBeInTheDocument();
|
|
96
|
-
});
|
|
97
|
-
it('calls onClickCustomButton when custom button is clicked', async () => {
|
|
98
|
-
const customButton = true;
|
|
99
|
-
const customButtonLabel = 'Back';
|
|
100
|
-
const onClickCustomButton = jest.fn();
|
|
101
|
-
const { getByTestId } = renderModal({ ...tc.props, customButtonLabel, customButton, onClickCustomButton });
|
|
102
|
-
expect(getByTestId('customButton')).toBeInTheDocument();
|
|
103
|
-
await userEvent.click(getByTestId('customButton'));
|
|
104
|
-
expect(onClickCustomButton).toHaveBeenCalled();
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
});
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import { render, screen } from '@testing-library/react';
|
|
4
|
+
import userEvent from '@testing-library/user-event';
|
|
5
|
+
import Modal from './Modal';
|
|
6
|
+
describe('Modal', () => {
|
|
7
|
+
class Context {
|
|
8
|
+
props = {
|
|
9
|
+
onTitleChanged: jest.fn(),
|
|
10
|
+
disableSubmitButton: false,
|
|
11
|
+
title: 'Testing Modal Dialog',
|
|
12
|
+
children: React.createElement("div", null, "Modal content"),
|
|
13
|
+
open: true,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
let tc;
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
tc = new Context();
|
|
19
|
+
});
|
|
20
|
+
const renderModal = (props) => render(React.createElement(Modal, { ...props }));
|
|
21
|
+
describe('renders Modal', () => {
|
|
22
|
+
it('doesn\'t render the modal if the open state is false', () => {
|
|
23
|
+
const open = false;
|
|
24
|
+
renderModal({ ...tc.props, open });
|
|
25
|
+
expect(screen.queryByTestId('modal')).not.toBeInTheDocument();
|
|
26
|
+
});
|
|
27
|
+
it('renders the modal if the open state is true', () => {
|
|
28
|
+
renderModal(tc.props);
|
|
29
|
+
expect(screen.getByTestId('modal')).toBeInTheDocument();
|
|
30
|
+
expect(screen.getByTestId('modal')).toHaveClass('tw-max-w-xl');
|
|
31
|
+
});
|
|
32
|
+
it('calls onClose modal when close button is clicked', async () => {
|
|
33
|
+
const onClose = jest.fn();
|
|
34
|
+
const { getByTestId } = renderModal({ ...tc.props, onClose });
|
|
35
|
+
expect(screen.getByTestId('modal')).toBeInTheDocument();
|
|
36
|
+
await userEvent.click(getByTestId('closeButton'));
|
|
37
|
+
expect(onClose).toHaveBeenCalled();
|
|
38
|
+
});
|
|
39
|
+
it('hides close button', () => {
|
|
40
|
+
const hideCloseIcon = true;
|
|
41
|
+
const { queryByTestId } = renderModal({ ...tc.props, hideCloseIcon });
|
|
42
|
+
expect(queryByTestId('closeButton')).not.toBeInTheDocument();
|
|
43
|
+
});
|
|
44
|
+
it('renders modal size based on the size prop', () => {
|
|
45
|
+
const size = 'lg';
|
|
46
|
+
renderModal({ ...tc.props, size });
|
|
47
|
+
expect(screen.getByTestId('modal')).toHaveClass('tw-max-w-lg');
|
|
48
|
+
});
|
|
49
|
+
it('renders not editable title', () => {
|
|
50
|
+
renderModal(tc.props);
|
|
51
|
+
expect(screen.getByTestId('modalTitle')).not.toHaveAttribute('value');
|
|
52
|
+
});
|
|
53
|
+
it('renders editable title', () => {
|
|
54
|
+
const isTitleEditable = true;
|
|
55
|
+
const { getByTestId } = renderModal({ ...tc.props, isTitleEditable });
|
|
56
|
+
expect(getByTestId('modalTitle')).toHaveAttribute('value');
|
|
57
|
+
});
|
|
58
|
+
it('calls onChange when title is modified', async () => {
|
|
59
|
+
const isTitleEditable = true;
|
|
60
|
+
const { getByTestId } = renderModal({ ...tc.props, isTitleEditable });
|
|
61
|
+
await userEvent.type(getByTestId('modalTitle'), 'a');
|
|
62
|
+
expect(tc.props.onTitleChanged).toHaveBeenCalled();
|
|
63
|
+
});
|
|
64
|
+
it('displays icon title', () => {
|
|
65
|
+
const titleIcon = 'fc-check';
|
|
66
|
+
const { getByTestId } = renderModal({ ...tc.props, titleIcon });
|
|
67
|
+
expect(getByTestId('modalTitleIcon')).toBeInTheDocument();
|
|
68
|
+
});
|
|
69
|
+
it('calls onSubmit when submit button is clicked', async () => {
|
|
70
|
+
const onSubmit = jest.fn();
|
|
71
|
+
const { getByTestId } = renderModal({ ...tc.props, onSubmit });
|
|
72
|
+
expect(getByTestId('submitButton')).not.toBeDisabled();
|
|
73
|
+
await userEvent.click(getByTestId('submitButton'));
|
|
74
|
+
expect(onSubmit).toHaveBeenCalled();
|
|
75
|
+
});
|
|
76
|
+
it('displays the disabled submit button', async () => {
|
|
77
|
+
const onSubmit = jest.fn();
|
|
78
|
+
const disableSubmitButton = true;
|
|
79
|
+
const { getByTestId } = renderModal({ ...tc.props, onSubmit, disableSubmitButton });
|
|
80
|
+
expect(getByTestId('submitButton')).toBeDisabled();
|
|
81
|
+
await userEvent.click(getByTestId('submitButton'));
|
|
82
|
+
expect(onSubmit).not.toHaveBeenCalled();
|
|
83
|
+
});
|
|
84
|
+
it('calls onClose when cancel button is clicked', async () => {
|
|
85
|
+
const onClose = jest.fn();
|
|
86
|
+
const { getByTestId } = renderModal({ ...tc.props, onClose });
|
|
87
|
+
expect(getByTestId('cancelButton')).not.toBeDisabled();
|
|
88
|
+
await userEvent.click(getByTestId('cancelButton'));
|
|
89
|
+
expect(onClose).toHaveBeenCalled();
|
|
90
|
+
});
|
|
91
|
+
it('displays custom button', () => {
|
|
92
|
+
const customButton = true;
|
|
93
|
+
const customButtonLabel = 'Back';
|
|
94
|
+
const { getByTestId } = renderModal({ ...tc.props, customButton, customButtonLabel });
|
|
95
|
+
expect(getByTestId('customButton')).toBeInTheDocument();
|
|
96
|
+
});
|
|
97
|
+
it('calls onClickCustomButton when custom button is clicked', async () => {
|
|
98
|
+
const customButton = true;
|
|
99
|
+
const customButtonLabel = 'Back';
|
|
100
|
+
const onClickCustomButton = jest.fn();
|
|
101
|
+
const { getByTestId } = renderModal({ ...tc.props, customButtonLabel, customButton, onClickCustomButton });
|
|
102
|
+
expect(getByTestId('customButton')).toBeInTheDocument();
|
|
103
|
+
await userEvent.click(getByTestId('customButton'));
|
|
104
|
+
expect(onClickCustomButton).toHaveBeenCalled();
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
108
|
//# sourceMappingURL=Modal.test.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Modal.types.js.map
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './Modal';
|
|
1
|
+
export { default } from './Modal';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,30 +1,50 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import * as Progress from '@radix-ui/react-progress';
|
|
3
|
-
import { getQTipData } from '../Tooltip/qTip.utilities';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import * as Progress from '@radix-ui/react-progress';
|
|
3
|
+
import { getQTipData } from '../Tooltip/qTip.utilities';
|
|
4
|
+
import tinycolor from 'tinycolor2';
|
|
5
|
+
const baseLabelClasses = 'tw-left-1 tw-text-xs tw-text-sq-text-color dark:tw-text-sq-dark-text tw-items-center tw-h-[18px]';
|
|
6
|
+
const ProgressIndicator = (props) => {
|
|
7
|
+
const { value, color = undefined, testId, label, extraClasses = '', labelClasses = '', valuesLength, max, index, ...tooltipProps } = props;
|
|
8
|
+
const tooltipData = getQTipData(tooltipProps);
|
|
9
|
+
const previousWidth = useRef(0);
|
|
10
|
+
const indicatorElementRef = useRef(null);
|
|
11
|
+
const [textColorClass, setTextColorClass] = React.useState('');
|
|
12
|
+
const [animatedWidth, setAnimatedWidth] = React.useState(previousWidth.current);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const timeout = setTimeout(() => {
|
|
15
|
+
const newWidth = (Number(value) / Number(max)) * 100;
|
|
16
|
+
setAnimatedWidth(newWidth);
|
|
17
|
+
previousWidth.current = newWidth;
|
|
18
|
+
}, 100);
|
|
19
|
+
return () => clearTimeout(timeout);
|
|
20
|
+
}, [value]);
|
|
21
|
+
const bgColor = color || undefined;
|
|
22
|
+
const bgClass = color ? '' : 'tw-bg-sq-color-dark';
|
|
23
|
+
const computeTextClass = (elem) => {
|
|
24
|
+
const computedStyle = getComputedStyle(elem);
|
|
25
|
+
const backgroundColor = computedStyle.backgroundColor;
|
|
26
|
+
const textColorClass = tinycolor(backgroundColor).isDark()
|
|
27
|
+
? 'tw-text-sq-white dark:tw-text-sq-white'
|
|
28
|
+
: 'tw-text-sq-text-color dark:tw-text-sq-text-color';
|
|
29
|
+
setTextColorClass(textColorClass);
|
|
30
|
+
};
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (indicatorElementRef.current) {
|
|
33
|
+
computeTextClass(indicatorElementRef.current);
|
|
34
|
+
}
|
|
35
|
+
}, [!!indicatorElementRef.current]);
|
|
36
|
+
return (React.createElement(Progress.Indicator, { className: `tw-ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw-w-full tw-h-[18px] tw-duration-[660ms] tw-flex tw-justify-center tw-items-center tw-overflow-hidden ${bgClass} ${extraClasses}`, ...tooltipData, "data-qtip-text": tooltipProps.tooltip ? tooltipProps.tooltip : `${value}%`, "data-testid": `progress-bar-indicator-${testId ? testId : value}`, key: `${index}-${value}`, ref: indicatorElementRef, style: {
|
|
37
|
+
// Background color will default to the theme color if undefined
|
|
38
|
+
backgroundColor: bgColor,
|
|
39
|
+
animation: 'width 660ms forwards',
|
|
40
|
+
width: `${animatedWidth}%`,
|
|
41
|
+
} }, label ? React.createElement("span", { className: `${baseLabelClasses} ${labelClasses} ${textColorClass}` }, label) : undefined));
|
|
42
|
+
};
|
|
43
|
+
const ProgressBar = ({ values = [], max = 100, containerExtraClasses = '', zeroValueLabel = 'No progress yet', }) => {
|
|
44
|
+
const totalValue = values.reduce((acc, { value }) => acc + value, 0);
|
|
45
|
+
return (React.createElement(Progress.Root, { className: `tw-relative tw-h-[18px] tw-w-full tw-overflow-hidden tw-rounded-[2.5px] tw-bg-sq-dark-gray dark:tw-bg-sq-dark-disabled-gray tw-flex tw-flex-1 ${containerExtraClasses}`, max: max, value: totalValue }, totalValue > 0 ? (values.map((props, i) => {
|
|
46
|
+
return React.createElement(ProgressIndicator, { ...props, max: max, valuesLength: values.length, index: i, key: i });
|
|
47
|
+
})) : (React.createElement("div", { className: `${baseLabelClasses} tw-mx-auto tw-overflow-hidden` }, zeroValueLabel))));
|
|
48
|
+
};
|
|
49
|
+
export default ProgressBar;
|
|
30
50
|
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../src/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../src/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,gBAAgB,GACpB,kGAAkG,CAAC;AAErG,MAAM,iBAAiB,GAEnB,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iB,GACnC,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC;IACrE,OAAO,CACL,oBAAC,QAAQ,CAAC,IAAI,IACZ,SAAS,EAAE,iJAAiJ,qBAAqB,EAAE,EACnL,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,UAAU,IAChB,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAChB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QACtB,OAAO,oBAAC,iBAAiB,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,GAAI,CAAC;IACnG,CAAC,CAAC,CACH,CAAC,CAAC,CAAC,CACF,6BAAK,SAAS,EAAE,GAAG,gBAAgB,gCAAgC,IAAG,cAAc,CAAO,CAC5F,CACa,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,73 +1,81 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import ProgressBar from './ProgressBar';
|
|
3
|
-
import { QTip } from '../Tooltip';
|
|
4
|
-
export default {
|
|
5
|
-
title: 'ProgressBar',
|
|
6
|
-
};
|
|
7
|
-
export const AllProgressBars = () => {
|
|
8
|
-
const [values, setValues] = React.useState([
|
|
9
|
-
{ value: 20, label: 'RGB' },
|
|
10
|
-
{ value: 15, color: 'brown', label: 'Brown' },
|
|
11
|
-
{ value: 40, color: '#435abc', label: 'Hex' },
|
|
12
|
-
]);
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
const timeout = setTimeout(() => {
|
|
15
|
-
setValues([
|
|
16
|
-
{ value: 40, label: 'RGB' },
|
|
17
|
-
{ value: 5, color: 'brown', label: 'Brown' },
|
|
18
|
-
{ value: 50, color: '#435abc', label: 'Hex' },
|
|
19
|
-
]);
|
|
20
|
-
}, 2000);
|
|
21
|
-
return () => clearTimeout(timeout);
|
|
22
|
-
});
|
|
23
|
-
const renderAllVariations = () => (React.createElement(React.Fragment, null,
|
|
24
|
-
React.createElement("div", { className: "tw-p-4 light" },
|
|
25
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
26
|
-
React.createElement(ProgressBar, { max: 100, values: [{ value: 40 }] })),
|
|
27
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
28
|
-
React.createElement(ProgressBar, { max: 100, values: [{ value: 10 }] })),
|
|
29
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
30
|
-
React.createElement(ProgressBar, { values: [{ value: 0 }], max: 100 })),
|
|
31
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
32
|
-
React.createElement(ProgressBar, { values: [{ value: 70, tooltip: 'this is an indicator tooltip' }], max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
33
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
34
|
-
React.createElement(ProgressBar, { values: [
|
|
35
|
-
{ value: 20, label: 'RGB' },
|
|
36
|
-
{ value: 15, color: 'brown', label: 'Brown' },
|
|
37
|
-
{ value: 40, color: '#435abc', label: 'Hex' },
|
|
38
|
-
], max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
39
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
40
|
-
React.createElement(ProgressBar, { values: values, max: 100, containerExtraClasses: "tw-bg-sq-text-color" }))
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
47
|
-
React.createElement(ProgressBar, { values: [{ value:
|
|
48
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
49
|
-
React.createElement(ProgressBar, { values: [{ value:
|
|
50
|
-
React.createElement("div", { className: "tw-p-4" },
|
|
51
|
-
React.createElement(ProgressBar, { values: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
React.createElement("
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import ProgressBar from './ProgressBar';
|
|
3
|
+
import { QTip } from '../Tooltip';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'ProgressBar',
|
|
6
|
+
};
|
|
7
|
+
export const AllProgressBars = () => {
|
|
8
|
+
const [values, setValues] = React.useState([
|
|
9
|
+
{ value: 20, label: 'RGB' },
|
|
10
|
+
{ value: 15, color: 'brown', label: 'Brown' },
|
|
11
|
+
{ value: 40, color: '#435abc', label: 'Hex' },
|
|
12
|
+
]);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const timeout = setTimeout(() => {
|
|
15
|
+
setValues([
|
|
16
|
+
{ value: 40, label: 'RGB' },
|
|
17
|
+
{ value: 5, color: 'brown', label: 'Brown' },
|
|
18
|
+
{ value: 50, color: '#435abc', label: 'Hex' },
|
|
19
|
+
]);
|
|
20
|
+
}, 2000);
|
|
21
|
+
return () => clearTimeout(timeout);
|
|
22
|
+
});
|
|
23
|
+
const renderAllVariations = () => (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
25
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
26
|
+
React.createElement(ProgressBar, { max: 100, values: [{ value: 40 }] })),
|
|
27
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
28
|
+
React.createElement(ProgressBar, { max: 100, values: [{ value: 10 }] })),
|
|
29
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
30
|
+
React.createElement(ProgressBar, { values: [{ value: 0 }], max: 100 })),
|
|
31
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
32
|
+
React.createElement(ProgressBar, { values: [{ value: 70, tooltip: 'this is an indicator tooltip' }], max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
33
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
34
|
+
React.createElement(ProgressBar, { values: [
|
|
35
|
+
{ value: 20, label: 'RGB' },
|
|
36
|
+
{ value: 15, color: 'brown', label: 'Brown' },
|
|
37
|
+
{ value: 40, color: '#435abc', label: 'Hex' },
|
|
38
|
+
], max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
39
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
40
|
+
React.createElement(ProgressBar, { values: values, max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
41
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
42
|
+
React.createElement(ProgressBar, { values: [{ value: 0, label: 'zero label' }], max: 100 })),
|
|
43
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
44
|
+
React.createElement(ProgressBar, { values: [{ value: 0 }], zeroValueLabel: "default zero level label deliberately long to test overflow", max: 100 }))),
|
|
45
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
46
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
47
|
+
React.createElement(ProgressBar, { max: 100, values: [{ value: 40 }] })),
|
|
48
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
49
|
+
React.createElement(ProgressBar, { max: 100, values: [{ value: 10 }] })),
|
|
50
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
51
|
+
React.createElement(ProgressBar, { values: [{ value: 0 }], max: 100 })),
|
|
52
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
53
|
+
React.createElement(ProgressBar, { values: [{ value: 70, tooltip: 'this is an indicator tooltip' }], max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
54
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
55
|
+
React.createElement(ProgressBar, { values: [
|
|
56
|
+
{ value: 20, color: 'rgb(44,200,190)', label: 'RGB' },
|
|
57
|
+
{ value: 15, color: 'brown', label: 'Brown' },
|
|
58
|
+
{ value: 40, color: '#435abc', label: 'Hex' },
|
|
59
|
+
], max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
60
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
61
|
+
React.createElement(ProgressBar, { values: values, max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
62
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
63
|
+
React.createElement(ProgressBar, { values: [{ value: 0, label: 'zero label' }], max: 100, containerExtraClasses: "tw-bg-sq-text-color" })),
|
|
64
|
+
React.createElement("div", { className: "tw-p-4" },
|
|
65
|
+
React.createElement(ProgressBar, { values: [{ value: 0 }], zeroValueLabel: "default zero level label is made deliberately long to test overflow", max: 100, containerExtraClasses: "tw-bg-sq-text-color" })))));
|
|
66
|
+
return (React.createElement("div", { className: "tw-grid tw-grid-cols-4 tw-gap-4" },
|
|
67
|
+
React.createElement(QTip, null),
|
|
68
|
+
React.createElement("div", { className: "color_topic" },
|
|
69
|
+
React.createElement("b", null, "Topic Colors"),
|
|
70
|
+
renderAllVariations()),
|
|
71
|
+
React.createElement("div", { className: "color_analysis" },
|
|
72
|
+
React.createElement("b", null, "Analysis Colors"),
|
|
73
|
+
renderAllVariations()),
|
|
74
|
+
React.createElement("div", { className: "color_datalab" },
|
|
75
|
+
React.createElement("b", null, "Datalab Colors"),
|
|
76
|
+
renderAllVariations()),
|
|
77
|
+
React.createElement("div", { className: "color_vantage" },
|
|
78
|
+
React.createElement("b", null, "Vantage Colors"),
|
|
79
|
+
renderAllVariations())));
|
|
80
|
+
};
|
|
73
81
|
//# sourceMappingURL=ProgressBar.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.stories.js","sourceRoot":"","sources":["../../src/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EN,6BAAK,SAAS,EAAC,eAAe;YAC5B,gDAAqB;YACpB,mBAAmB,EAAE,CAClB,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,38 +1,44 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
-
import ProgressBar from './ProgressBar';
|
|
5
|
-
import userEvent from '@testing-library/user-event';
|
|
6
|
-
describe('ProgressBar', () => {
|
|
7
|
-
it('renders without crashing', () => {
|
|
8
|
-
render(React.createElement(ProgressBar, { values: [{ value: 50 }] }));
|
|
9
|
-
const progressBar = screen.getByRole('progressbar');
|
|
10
|
-
expect(progressBar).toBeInTheDocument();
|
|
11
|
-
});
|
|
12
|
-
it('displays the correct progress value', () => {
|
|
13
|
-
render(React.createElement(ProgressBar, { values: [{ value: 75 }] }));
|
|
14
|
-
const progressBarIndicator = screen.getByRole('progressbar').firstChild;
|
|
15
|
-
waitFor(() => {
|
|
16
|
-
expect(progressBarIndicator).toHaveStyle('transform: translateX(-25%)');
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
it('applies the correct max value', () => {
|
|
20
|
-
render(React.createElement(ProgressBar, { values: [{ value: 50 }], max: 200 }));
|
|
21
|
-
const progressBar = screen.getByRole('progressbar');
|
|
22
|
-
expect(progressBar).toHaveAttribute('data-max', '200');
|
|
23
|
-
});
|
|
24
|
-
it('displays the tooltip with the correct label', () => {
|
|
25
|
-
render(React.createElement(ProgressBar, { values: [{ value: 50, tooltip: 'Progress' }] }));
|
|
26
|
-
userEvent.hover(screen.getByTestId('progress-bar-indicator-50'));
|
|
27
|
-
waitFor(() => {
|
|
28
|
-
expect(screen.getByText('Progress')).toBeInTheDocument();
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
it('
|
|
32
|
-
render(React.createElement(ProgressBar, { values: [{ value:
|
|
33
|
-
|
|
34
|
-
expect(screen.
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
import ProgressBar from './ProgressBar';
|
|
5
|
+
import userEvent from '@testing-library/user-event';
|
|
6
|
+
describe('ProgressBar', () => {
|
|
7
|
+
it('renders without crashing', () => {
|
|
8
|
+
render(React.createElement(ProgressBar, { values: [{ value: 50 }] }));
|
|
9
|
+
const progressBar = screen.getByRole('progressbar');
|
|
10
|
+
expect(progressBar).toBeInTheDocument();
|
|
11
|
+
});
|
|
12
|
+
it('displays the correct progress value', () => {
|
|
13
|
+
render(React.createElement(ProgressBar, { values: [{ value: 75 }] }));
|
|
14
|
+
const progressBarIndicator = screen.getByRole('progressbar').firstChild;
|
|
15
|
+
waitFor(() => {
|
|
16
|
+
expect(progressBarIndicator).toHaveStyle('transform: translateX(-25%)');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
it('applies the correct max value', () => {
|
|
20
|
+
render(React.createElement(ProgressBar, { values: [{ value: 50 }], max: 200 }));
|
|
21
|
+
const progressBar = screen.getByRole('progressbar');
|
|
22
|
+
expect(progressBar).toHaveAttribute('data-max', '200');
|
|
23
|
+
});
|
|
24
|
+
it('displays the tooltip with the correct label', () => {
|
|
25
|
+
render(React.createElement(ProgressBar, { values: [{ value: 50, tooltip: 'Progress' }] }));
|
|
26
|
+
userEvent.hover(screen.getByTestId('progress-bar-indicator-50'));
|
|
27
|
+
waitFor(() => {
|
|
28
|
+
expect(screen.getByText('Progress')).toBeInTheDocument();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
it('displays the no progress level for zero value', () => {
|
|
32
|
+
render(React.createElement(ProgressBar, { values: [{ value: 0, tooltip: '0%' }], zeroValueLabel: "No progress" }));
|
|
33
|
+
waitFor(() => {
|
|
34
|
+
expect(screen.getByText('No progress')).toBeInTheDocument();
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
it('applies the multiple values of the Progress bar', () => {
|
|
38
|
+
render(React.createElement(ProgressBar, { values: [{ value: 20 }, { value: 15 }, { value: 40 }], max: 200 }));
|
|
39
|
+
for (const val of [20, 15, 40]) {
|
|
40
|
+
expect(screen.getByTestId(`progress-bar-indicator-${val}`)).toBeInTheDocument();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
38
44
|
//# sourceMappingURL=ProgressBar.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.test.js","sourceRoot":"","sources":["../../src/ProgressBar/ProgressBar.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,yCAAyC,CAAC;AACjD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,CAAC,oBAAC,WAAW,IAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,CAAC,CAAC;QACjD,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QACpD,MAAM,CAAC,WAAW,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC7C,MAAM,CAAC,oBAAC,WAAW,IAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,CAAC,CAAC;QACjD,MAAM,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC;QACxE,OAAO,CA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