@seeqdev/qomponents 0.0.78 → 0.0.79
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/Accordion/Accordion.js +9 -0
- package/dist/Accordion/Accordion.js.map +1 -0
- package/dist/Accordion/Accordion.stories.js +109 -0
- package/dist/Accordion/Accordion.stories.js.map +1 -0
- package/dist/Accordion/Accordion.test.js +55 -0
- package/dist/Accordion/Accordion.test.js.map +1 -0
- package/dist/Accordion/Accordion.types.js +2 -0
- package/dist/Accordion/Accordion.types.js.map +1 -0
- package/dist/Accordion/index.js +2 -0
- package/dist/Accordion/index.js.map +1 -0
- package/dist/Button/Button.js +90 -0
- package/dist/Button/Button.js.map +1 -0
- package/dist/Button/Button.stories.js +85 -0
- package/dist/Button/Button.stories.js.map +1 -0
- package/dist/Button/Button.test.js +49 -0
- package/dist/Button/Button.test.js.map +1 -0
- package/dist/Button/Button.types.js +5 -0
- package/dist/Button/Button.types.js.map +1 -0
- package/dist/Button/index.js +2 -0
- package/dist/Button/index.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js +64 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +93 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +72 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js.map +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js +2 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js.map +1 -0
- package/dist/ButtonWithDropdown/index.js +2 -0
- package/dist/ButtonWithDropdown/index.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.js +53 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +72 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js +82 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js.map +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js +2 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js.map +1 -0
- package/dist/ButtonWithPopover/index.js +2 -0
- package/dist/ButtonWithPopover/index.js.map +1 -0
- package/dist/Checkbox/Checkbox.js +26 -0
- package/dist/Checkbox/Checkbox.js.map +1 -0
- package/dist/Checkbox/Checkbox.stories.js +34 -0
- package/dist/Checkbox/Checkbox.stories.js.map +1 -0
- package/dist/Checkbox/Checkbox.test.js +94 -0
- package/dist/Checkbox/Checkbox.test.js.map +1 -0
- package/dist/Checkbox/Checkbox.types.js +2 -0
- package/dist/Checkbox/Checkbox.types.js.map +1 -0
- package/dist/Checkbox/index.js +2 -0
- package/dist/Checkbox/index.js.map +1 -0
- package/dist/Icon/Icon.js +55 -0
- package/dist/Icon/Icon.js.map +1 -0
- package/dist/Icon/Icon.stories.js +41 -0
- package/dist/Icon/Icon.stories.js.map +1 -0
- package/dist/Icon/Icon.test.js +55 -0
- package/dist/Icon/Icon.test.js.map +1 -0
- package/dist/Icon/Icon.types.js +16 -0
- package/dist/Icon/Icon.types.js.map +1 -0
- package/dist/Icon/index.js +2 -0
- package/dist/Icon/index.js.map +1 -0
- package/dist/Modal/Modal.js +88 -0
- package/dist/Modal/Modal.js.map +1 -0
- package/dist/Modal/Modal.stories.js +176 -0
- package/dist/Modal/Modal.stories.js.map +1 -0
- package/dist/Modal/Modal.test.js +108 -0
- package/dist/Modal/Modal.test.js.map +1 -0
- package/dist/Modal/Modal.types.js +2 -0
- package/dist/Modal/Modal.types.js.map +1 -0
- package/dist/Modal/index.js +2 -0
- package/dist/Modal/index.js.map +1 -0
- package/dist/NewWorkbench/NewWorkbench.js +48 -0
- package/dist/NewWorkbench/NewWorkbench.js.map +1 -0
- package/dist/NewWorkbench/NewWorkbench.stories.js +77 -0
- package/dist/NewWorkbench/NewWorkbench.stories.js.map +1 -0
- package/dist/NewWorkbench/NewWorkbench.test.js +73 -0
- package/dist/NewWorkbench/NewWorkbench.test.js.map +1 -0
- package/dist/NewWorkbench/NewWorkbench.types.d.ts +1 -0
- package/dist/NewWorkbench/NewWorkbench.types.js +2 -0
- package/dist/NewWorkbench/NewWorkbench.types.js.map +1 -0
- package/dist/NewWorkbench/index.js +2 -0
- package/dist/NewWorkbench/index.js.map +1 -0
- package/dist/NewWorkbench/variants.d.ts +5 -0
- package/dist/NewWorkbench/variants.js +23 -0
- package/dist/NewWorkbench/variants.js.map +1 -0
- package/dist/Select/Select.js +171 -0
- package/dist/Select/Select.js.map +1 -0
- package/dist/Select/Select.stories.js +77 -0
- package/dist/Select/Select.stories.js.map +1 -0
- package/dist/Select/Select.test.js +182 -0
- package/dist/Select/Select.test.js.map +1 -0
- package/dist/Select/Select.types.js +2 -0
- package/dist/Select/Select.types.js.map +1 -0
- package/dist/Select/index.js +2 -0
- package/dist/Select/index.js.map +1 -0
- package/dist/Tabs/Tabs.js +22 -0
- package/dist/Tabs/Tabs.js.map +1 -0
- package/dist/Tabs/Tabs.stories.js +91 -0
- package/dist/Tabs/Tabs.stories.js.map +1 -0
- package/dist/Tabs/Tabs.test.js +91 -0
- package/dist/Tabs/Tabs.test.js.map +1 -0
- package/dist/Tabs/Tabs.types.js +2 -0
- package/dist/Tabs/Tabs.types.js.map +1 -0
- package/dist/Tabs/index.js +2 -0
- package/dist/Tabs/index.js.map +1 -0
- package/dist/TextArea/TextArea.js +23 -0
- package/dist/TextArea/TextArea.js.map +1 -0
- package/dist/TextArea/TextArea.stories.js +39 -0
- package/dist/TextArea/TextArea.stories.js.map +1 -0
- package/dist/TextArea/TextArea.test.js +68 -0
- package/dist/TextArea/TextArea.test.js.map +1 -0
- package/dist/TextArea/TextArea.types.js +2 -0
- package/dist/TextArea/TextArea.types.js.map +1 -0
- package/dist/TextArea/index.js +2 -0
- package/dist/TextArea/index.js.map +1 -0
- package/dist/TextField/TextField.js +64 -0
- package/dist/TextField/TextField.js.map +1 -0
- package/dist/TextField/TextField.stories.js +41 -0
- package/dist/TextField/TextField.stories.js.map +1 -0
- package/dist/TextField/TextField.test.js +35 -0
- package/dist/TextField/TextField.test.js.map +1 -0
- package/dist/TextField/TextField.types.js +2 -0
- package/dist/TextField/TextField.types.js.map +1 -0
- package/dist/TextField/index.js +2 -0
- package/dist/TextField/index.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.js +73 -0
- package/dist/ToolbarButton/ToolbarButton.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.stories.js +89 -0
- package/dist/ToolbarButton/ToolbarButton.stories.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.test.js +93 -0
- package/dist/ToolbarButton/ToolbarButton.test.js.map +1 -0
- package/dist/ToolbarButton/ToolbarButton.types.js +2 -0
- package/dist/ToolbarButton/ToolbarButton.types.js.map +1 -0
- package/dist/ToolbarButton/index.js +2 -0
- package/dist/ToolbarButton/index.js.map +1 -0
- package/dist/Tooltip/QTip.stories.js +40 -0
- package/dist/Tooltip/QTip.stories.js.map +1 -0
- package/dist/Tooltip/QTip.types.js +2 -0
- package/dist/Tooltip/QTip.types.js.map +1 -0
- package/dist/Tooltip/QTipPerformance.stories.js +30 -0
- package/dist/Tooltip/QTipPerformance.stories.js.map +1 -0
- package/dist/Tooltip/Qtip.js +158 -0
- package/dist/Tooltip/Qtip.js.map +1 -0
- package/dist/Tooltip/Tooltip.js +36 -0
- package/dist/Tooltip/Tooltip.js.map +1 -0
- package/dist/Tooltip/Tooltip.stories.js +32 -0
- package/dist/Tooltip/Tooltip.stories.js.map +1 -0
- package/dist/Tooltip/Tooltip.types.js +3 -0
- package/dist/Tooltip/Tooltip.types.js.map +1 -0
- package/dist/Tooltip/TooltipPerformance.stories.js +30 -0
- package/dist/Tooltip/TooltipPerformance.stories.js.map +1 -0
- package/dist/Tooltip/index.js +3 -0
- package/dist/Tooltip/index.js.map +1 -0
- package/dist/Tooltip/qTip.utilities.js +11 -0
- package/dist/Tooltip/qTip.utilities.js.map +1 -0
- package/dist/index.esm.js +35 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +35 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +21 -4
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/browserId.js +29 -0
- package/dist/utils/browserId.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import Modal from './Modal';
|
|
3
|
+
import Button from '../Button';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Modal',
|
|
6
|
+
};
|
|
7
|
+
const modalBody = React.createElement("div", null, "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.");
|
|
8
|
+
const ModalComponent = ({ bodyClass = '', title: originalTitle, titleIcon, isTitleEditable, children, hideCloseIcon, disableSubmitButton, size, buttonLabel = 'Open Modal', customButton, customButtonLabel, }) => {
|
|
9
|
+
const [open, setOpen] = useState(false);
|
|
10
|
+
const [title, setTitle] = useState(originalTitle);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
return () => {
|
|
13
|
+
document.body.className = '';
|
|
14
|
+
};
|
|
15
|
+
}, []);
|
|
16
|
+
const onClose = () => {
|
|
17
|
+
document.body.className = '';
|
|
18
|
+
setOpen(false);
|
|
19
|
+
};
|
|
20
|
+
return (React.createElement("div", { className: "tw-p-4" },
|
|
21
|
+
React.createElement(Button, { onClick: () => {
|
|
22
|
+
document.body.className = bodyClass;
|
|
23
|
+
setOpen(true);
|
|
24
|
+
}, label: buttonLabel }),
|
|
25
|
+
React.createElement(Modal, { open: open, onClose: onClose, title: title, titleIcon: titleIcon, isTitleEditable: isTitleEditable, onTitleChanged: (event) => setTitle(event.target.value), hideCloseIcon: hideCloseIcon, disableSubmitButton: disableSubmitButton, size: size, customButton: customButton, customButtonLabel: customButtonLabel }, children)));
|
|
26
|
+
};
|
|
27
|
+
export const AllModalsVariants = () => (React.createElement("div", { className: "tw-grid tw-grid-cols-3 tw-gap-4" },
|
|
28
|
+
React.createElement("div", null,
|
|
29
|
+
React.createElement("b", null, "Topic Colors"),
|
|
30
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
31
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "xs", buttonLabel: "Open xsmall size modal" }),
|
|
32
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "sm", buttonLabel: "Open small size modal" }),
|
|
33
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "md", buttonLabel: "Open medium size modal" }),
|
|
34
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "lg", buttonLabel: "Open large size modal" }),
|
|
35
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "xl", buttonLabel: "Open xl size modal" }),
|
|
36
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "2xl", buttonLabel: "Open 2xl size modal" }),
|
|
37
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "3xl", buttonLabel: "Open 3xl size modal" }),
|
|
38
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "4xl", buttonLabel: "Open 4xl size modal" }),
|
|
39
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "5xl", buttonLabel: "Open 5xl size modal" }),
|
|
40
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal example", children: modalBody, size: "6xl", buttonLabel: "Open 6xl size modal" })),
|
|
41
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
42
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "xs", buttonLabel: "Open xsmall size modal" }),
|
|
43
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "sm", buttonLabel: "Open small size modal" }),
|
|
44
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "md", buttonLabel: "Open medium size modal" }),
|
|
45
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "lg", buttonLabel: "Open large size modal" }),
|
|
46
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "xl", buttonLabel: "Open xl size modal" }),
|
|
47
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "2xl", buttonLabel: "Open 2xl size modal" }),
|
|
48
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "3xl", buttonLabel: "Open 3xl size modal" }),
|
|
49
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "4xl", buttonLabel: "Open 4xl size modal" }),
|
|
50
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "5xl", buttonLabel: "Open 5xl size modal" }),
|
|
51
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "6xl", buttonLabel: "Open 6xl size modal" }))),
|
|
52
|
+
React.createElement("div", null,
|
|
53
|
+
React.createElement("b", null, "Analysis Colors"),
|
|
54
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
55
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "xs", buttonLabel: "Open xsmall size modal" }),
|
|
56
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "sm", buttonLabel: "Open small size modal" }),
|
|
57
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "md", buttonLabel: "Open medium size modal" }),
|
|
58
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "lg", buttonLabel: "Open large size modal" }),
|
|
59
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "xl", buttonLabel: "Open xl size modal" }),
|
|
60
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "2xl", buttonLabel: "Open 2xl size modal" }),
|
|
61
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "3xl", buttonLabel: "Open 3xl size modal" }),
|
|
62
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "4xl", buttonLabel: "Open 4xl size modal" }),
|
|
63
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "5xl", buttonLabel: "Open 5xl size modal" }),
|
|
64
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal example", children: modalBody, size: "6xl", buttonLabel: "Open 6xl size modal" })),
|
|
65
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
66
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "xs", buttonLabel: "Open xsmall size modal" }),
|
|
67
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "sm", buttonLabel: "Open small size modal" }),
|
|
68
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "md", buttonLabel: "Open medium size modal" }),
|
|
69
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "lg", buttonLabel: "Open large size modal" }),
|
|
70
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "xl", buttonLabel: "Open xl size modal" }),
|
|
71
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "2xl", buttonLabel: "Open 2xl size modal" }),
|
|
72
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "3xl", buttonLabel: "Open 3xl size modal" }),
|
|
73
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "4xl", buttonLabel: "Open 4xl size modal" }),
|
|
74
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "5xl", buttonLabel: "Open 5xl size modal" }),
|
|
75
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "6xl", buttonLabel: "Open 6xl size modal" }))),
|
|
76
|
+
React.createElement("div", null,
|
|
77
|
+
React.createElement("b", null, "Datalab Colors"),
|
|
78
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
79
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "xs", buttonLabel: "Open xsmall size modal" }),
|
|
80
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "sm", buttonLabel: "Open small size modal" }),
|
|
81
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "md", buttonLabel: "Open medium size modal" }),
|
|
82
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "lg", buttonLabel: "Open large size modal" }),
|
|
83
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "xl", buttonLabel: "Open xl size modal" }),
|
|
84
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "2xl", buttonLabel: "Open 2xl size modal" }),
|
|
85
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "3xl", buttonLabel: "Open 3xl size modal" }),
|
|
86
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "4xl", buttonLabel: "Open 4xl size modal" }),
|
|
87
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "5xl", buttonLabel: "Open 5xl size modal" }),
|
|
88
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal example", children: modalBody, size: "6xl", buttonLabel: "Open 6xl size modal" })),
|
|
89
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
90
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "xs", buttonLabel: "Open xsmall size modal" }),
|
|
91
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "sm", buttonLabel: "Open small size modal" }),
|
|
92
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "md", buttonLabel: "Open medium size modal" }),
|
|
93
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "lg", buttonLabel: "Open large size modal" }),
|
|
94
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "xl", buttonLabel: "Open xl size modal" }),
|
|
95
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "2xl", buttonLabel: "Open 2xl size modal" }),
|
|
96
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "3xl", buttonLabel: "Open 3xl size modal" }),
|
|
97
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "4xl", buttonLabel: "Open 4xl size modal" }),
|
|
98
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "5xl", buttonLabel: "Open 5xl size modal" }),
|
|
99
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal example", children: modalBody, size: "6xl", buttonLabel: "Open 6xl size modal" })))));
|
|
100
|
+
export const ModalsWithDisabledSubmit = () => (React.createElement("div", { className: "tw-grid tw-grid-cols-3 tw-gap-4" },
|
|
101
|
+
React.createElement("div", null,
|
|
102
|
+
React.createElement("b", null, "Topic Colors"),
|
|
103
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
104
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Disabled submit button example", disableSubmitButton: true, children: modalBody })),
|
|
105
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
106
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Disabled submit button example", disableSubmitButton: true, children: modalBody }))),
|
|
107
|
+
React.createElement("div", null,
|
|
108
|
+
React.createElement("b", null, "Analysis Colors"),
|
|
109
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
110
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Disabled submit button example", disableSubmitButton: true, children: modalBody })),
|
|
111
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
112
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Disabled submit button example", disableSubmitButton: true, children: modalBody }))),
|
|
113
|
+
React.createElement("div", null,
|
|
114
|
+
React.createElement("b", null, "Datalab Colors"),
|
|
115
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
116
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Disabled submit button example", disableSubmitButton: true, children: modalBody })),
|
|
117
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
118
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Disabled submit button example", disableSubmitButton: true, children: modalBody })))));
|
|
119
|
+
export const ModalsWithEditableTitle = () => (React.createElement("div", { className: "tw-grid tw-grid-cols-3 tw-gap-4" },
|
|
120
|
+
React.createElement("div", null,
|
|
121
|
+
React.createElement("b", null, "Topic Colors"),
|
|
122
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
123
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Editable title example", isTitleEditable: true, titleIcon: "fc-check", children: modalBody, hideCloseIcon: true })),
|
|
124
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
125
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Editable title example", titleIcon: "fc-check", isTitleEditable: true, children: modalBody, hideCloseIcon: true }))),
|
|
126
|
+
React.createElement("div", null,
|
|
127
|
+
React.createElement("b", null, "Analysis Colors"),
|
|
128
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
129
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Editable title example", isTitleEditable: true, titleIcon: "fc-check", children: modalBody, hideCloseIcon: true })),
|
|
130
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
131
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Editable title example", titleIcon: "fc-check", isTitleEditable: true, children: modalBody, hideCloseIcon: true }))),
|
|
132
|
+
React.createElement("div", null,
|
|
133
|
+
React.createElement("b", null, "Datalab Colors"),
|
|
134
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
135
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Editable title example", isTitleEditable: true, titleIcon: "fc-check", children: modalBody, hideCloseIcon: true })),
|
|
136
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
137
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Editable title example", titleIcon: "fc-check", isTitleEditable: true, children: modalBody, hideCloseIcon: true })))));
|
|
138
|
+
export const ModalsWithIcon = () => (React.createElement("div", { className: "tw-grid tw-grid-cols-3 tw-gap-4" },
|
|
139
|
+
React.createElement("div", null,
|
|
140
|
+
React.createElement("b", null, "Topic Colors"),
|
|
141
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
142
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal title with icon example", titleIcon: "fc-check", children: modalBody })),
|
|
143
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
144
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal title with example", titleIcon: "fc-circle_info", children: modalBody }))),
|
|
145
|
+
React.createElement("div", null,
|
|
146
|
+
React.createElement("b", null, "Analysis Colors"),
|
|
147
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
148
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal title with example", titleIcon: "fc-check", children: modalBody })),
|
|
149
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
150
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal title with example", titleIcon: "fc-circle_info", children: modalBody }))),
|
|
151
|
+
React.createElement("div", null,
|
|
152
|
+
React.createElement("b", null, "Datalab Colors"),
|
|
153
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
154
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal title with example", titleIcon: "fc-check", children: modalBody })),
|
|
155
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
156
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal title with example", titleIcon: "fc-circle_info", children: modalBody })))));
|
|
157
|
+
export const ModalsWithCustomButton = () => (React.createElement("div", { className: "tw-grid tw-grid-cols-3 tw-gap-4" },
|
|
158
|
+
React.createElement("div", null,
|
|
159
|
+
React.createElement("b", null, "Topic Colors"),
|
|
160
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
161
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic", title: "Modal with custom button", children: modalBody, customButton: true, customButtonLabel: "Back" })),
|
|
162
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
163
|
+
React.createElement(ModalComponent, { bodyClass: "color_topic tw-dark color_analysis_dark", title: "Modal with custom button", children: modalBody, customButton: true, customButtonLabel: "Back" }))),
|
|
164
|
+
React.createElement("div", null,
|
|
165
|
+
React.createElement("b", null, "Analysis Colors"),
|
|
166
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
167
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis", title: "Modal with custom button", children: modalBody, customButton: true, customButtonLabel: "Back" })),
|
|
168
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
169
|
+
React.createElement(ModalComponent, { bodyClass: "color_analysis tw-dark color_analysis_dark", title: "Modal with custom button", children: modalBody, customButton: true, customButtonLabel: "Back" }))),
|
|
170
|
+
React.createElement("div", null,
|
|
171
|
+
React.createElement("b", null, "Datalab Colors"),
|
|
172
|
+
React.createElement("div", { className: "tw-p-4 light" },
|
|
173
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab", title: "Modal with custom button", children: modalBody, customButton: true, customButtonLabel: "Back" })),
|
|
174
|
+
React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
|
|
175
|
+
React.createElement(ModalComponent, { bodyClass: "color_datalab tw-dark color_analysis_dark", title: "Modal with custom button", children: modalBody, customButton: true, customButtonLabel: "Back" })))));
|
|
176
|
+
//# sourceMappingURL=Modal.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.stories.js","sourceRoot":"","sources":["../../src/Modal/Modal.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,eAAe;IACb,KAAK,EAAE,OAAO;CACf,CAAC;AAEF,MAAM,SAAS,GAAG,kmBAKc,CAAC;AAQjC,MAAM,cAAc,GAAiD,CAAC,EACpE,SAAS,GAAG,EAAE,EACd,KAAK,EAAE,aAAa,EACpB,SAAS,EACT,eAAe,EACf,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,IAAI,EACJ,WAAW,GAAG,YAAY,EAC1B,YAAY,EACZ,iBAAiB,GAClB,EAAE,EAAE;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,E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,SAAS,EAAC,gBAAgB,EAAC,KAAK,EAAC,0BAA0B,EACzE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,EAAC,MAAM,GAAG,CAClE;QACN,6BAAK,SAAS,EAAC,yCAAyC;YACtD,oBAAC,cAAc,IAAC,SAAS,EAAC,4CAA4C,EAAC,KAAK,EAAC,0BAA0B,EACrG,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,EAAC,MAAM,GAAG,CAClE,CACF;IAEN;QACE,gDAAqB;QACrB,6BAAK,SAAS,EAAC,cAAc;YAC3B,oBAAC,cAAc,IAAC,SAAS,EAAC,eAAe,EAAC,KAAK,EAAC,0BAA0B,EACxE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,EAAC,MAAM,GAAG,CAClE;QACN,6BAAK,SAAS,EAAC,yCAAyC;YACtD,oBAAC,cAAc,IAAC,SAAS,EAAC,2CAA2C,EAAC,KAAK,EAAC,0BAA0B,EACpG,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,EAAC,MAAM,GAAG,CAClE,CACF,CACF,CACP,CAAC"}
|
|
@@ -0,0 +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
|
+
});
|
|
108
|
+
//# sourceMappingURL=Modal.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.test.js","sourceRoot":"","sources":["../../src/Modal/Modal.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,KAAK,MAAM,SAAS,CAAC;AAG5B,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,MAAM,OAAO;QACX,KAAK,GAAe;YAClB,cAAc,EAAE,IAAI,CAAC,EAAE,EAAE;YACzB,mBAAmB,EAAE,KAAK;YAC1B,KAAK,EAAE,sBAAsB;YAC7B,QAAQ,EAAE,iDAAwB;YAClC,IAAI,EAAE,IAAI;SACX,CAAC;KACH;IAED,IAAI,EAAW,CAAC;IAChB,UAAU,CAAC,GAAG,EAAE;QACd,EAAE,GAAG,IAAI,OAAO,EAAE,CAAC;IACrB,CAAC,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAE,EAA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EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;YAC3G,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;YAExD,MAAM,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC;YACnD,MAAM,CAAC,mBAAmB,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACjD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.types.js","sourceRoot":"","sources":["../../src/Modal/Modal.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import { getQTipData } from '../Tooltip/qTip.utilities';
|
|
4
|
+
import { InsertSeeqContent, NewWorkbenchItem, ViewWorkbench } from './variants';
|
|
5
|
+
const borderStyles = [
|
|
6
|
+
'tw-border-solid',
|
|
7
|
+
'tw-border',
|
|
8
|
+
'tw-rounded-sm',
|
|
9
|
+
'tw-border-sq-disabled-gray',
|
|
10
|
+
'dark:tw-border-gray-500',
|
|
11
|
+
].join(' ');
|
|
12
|
+
const bgStyles = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
|
|
13
|
+
const disabledClasses = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
|
|
14
|
+
const renderItem = (variant, item) => {
|
|
15
|
+
switch (variant) {
|
|
16
|
+
case 'create-workbench':
|
|
17
|
+
return React.createElement(NewWorkbenchItem, { ...item });
|
|
18
|
+
case 'view-workbench':
|
|
19
|
+
return React.createElement(ViewWorkbench, { ...item });
|
|
20
|
+
case 'insert-seeq-content':
|
|
21
|
+
return React.createElement(InsertSeeqContent, { ...item });
|
|
22
|
+
default:
|
|
23
|
+
return React.createElement(NewWorkbenchItem, { ...item });
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const NewWorkbench = ({ newWorkbenchItems, trigger, id, extraClassNames, containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset = 5, alignOffset = -35, hasArrow = false, onOpenChange, isOpen, setFocusOnTriggerOnClose = true, keepFocusInsideDropdown = true, variant, ...tooltipProps }) => {
|
|
27
|
+
const tooltipData = getQTipData(tooltipProps);
|
|
28
|
+
return (React.createElement(DropdownMenu.Root, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown },
|
|
29
|
+
React.createElement(DropdownMenu.Trigger, { id: id, "data-testid": id, className: `tw-border-none focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none`, asChild: true, disabled: disabled },
|
|
30
|
+
React.createElement("div", { ...tooltipData, className: `tw-bg-transparent tw-flex tw-flex-col tw-items-center focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none ${disabled ? disabledClasses : ''} ${extraClassNames || ''}` }, trigger)),
|
|
31
|
+
React.createElement(DropdownMenu.Content, { sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "focus-visible:tw-outline-none tw-outline-none" },
|
|
32
|
+
React.createElement("div", { "data-testid": containerTestId, className: bgStyles +
|
|
33
|
+
' tw-relative tw-z-[1200] tw-min-w-6 tw-py-2 focus-visible:tw-outline-none tw-outline-none' +
|
|
34
|
+
' data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out' +
|
|
35
|
+
' forceFont data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade ' +
|
|
36
|
+
borderStyles },
|
|
37
|
+
hasArrow && (React.createElement(DropdownMenu.Arrow, { asChild: true },
|
|
38
|
+
React.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500 tw-mt-[-7px]" }))),
|
|
39
|
+
newWorkbenchItems.map((item, index) => {
|
|
40
|
+
return (React.createElement("div", { key: item.display + index },
|
|
41
|
+
React.createElement(DropdownMenu.Item, { onSelect: (e) => {
|
|
42
|
+
item.action(e);
|
|
43
|
+
}, className: `tw-cursor-pointer tw-flex dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-relative tw-select-none tw-outline-none data-[disabled]:tw-text-sq-disabled-gray data-[disabled]:tw-pointer-events-none`, "data-testid": item.testId, disabled: !item.enabled }, renderItem(variant, item)),
|
|
44
|
+
item.divider && (React.createElement(DropdownMenu.Separator, { "data-testid": `dropdown-divider-${index}`, className: "tw-h-[1px] tw-bg-sq-disabled-gray dark:tw-bg-gray-500 tw-my-[8px]" }))));
|
|
45
|
+
})))));
|
|
46
|
+
};
|
|
47
|
+
export default NewWorkbench;
|
|
48
|
+
//# sourceMappingURL=NewWorkbench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewWorkbench.js","sourceRoot":"","sources":["../../src/NewWorkbench/NewWorkbench.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE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,OAAO,IAAI,CACf,oBAAC,YAAY,CAAC,SAAS,mBACR,oBAAoB,KAAK,EAAE,EACxC,SAAS,EAAC,mEAAmE,GAC7E,CACH,CACG,CACP,CAAC;gBACJ,CAAC,CAAC,CACE,CACe,CACL,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { QTip } from '../Tooltip/Qtip';
|
|
3
|
+
import Button from '../Button/Button';
|
|
4
|
+
import NewWorkbench from './NewWorkbench';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'New Workbench',
|
|
7
|
+
};
|
|
8
|
+
const options = [
|
|
9
|
+
{
|
|
10
|
+
display: 'New Workbook',
|
|
11
|
+
text: 'This is a workbook to show details about your data. You can make changes to your account',
|
|
12
|
+
icon: 'fc-analysis',
|
|
13
|
+
id: 'newWorkbook',
|
|
14
|
+
enabled: true,
|
|
15
|
+
iconExtraClassNames: 'workbenchDisplay',
|
|
16
|
+
action: () => { },
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
display: 'New Report Binder',
|
|
20
|
+
text: 'This is a data tab to show details about your data. You can make changes to your account',
|
|
21
|
+
icon: 'fc-report',
|
|
22
|
+
enabled: true,
|
|
23
|
+
action: () => { },
|
|
24
|
+
id: 'newReportBinder',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
display: 'New Datalab',
|
|
28
|
+
text: 'This is a data tab to show details about your data. You can make changes to your account',
|
|
29
|
+
icon: 'fc-seeq-datalab',
|
|
30
|
+
id: 'newDataLab',
|
|
31
|
+
enabled: false,
|
|
32
|
+
action: () => { },
|
|
33
|
+
divider: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
display: 'Folder',
|
|
37
|
+
icon: 'fc-folder',
|
|
38
|
+
action: () => { },
|
|
39
|
+
id: 'newFolder',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
export const AllNewWorkbenchVariants = () => {
|
|
43
|
+
const [openDropdown, setOpenDropdown] = React.useState('');
|
|
44
|
+
const allNewWorkbenchs = (color, isDark) => (React.createElement("div", { className: isDark ? 'tw-dark tw-bg-sq-dark-background' : '' },
|
|
45
|
+
React.createElement("div", { className: "tw-p-5 " },
|
|
46
|
+
React.createElement(NewWorkbench, { trigger: React.createElement(Button, { label: "New", icon: "fa-plus", variant: "theme" }), key: "newWorkbenchItem", "data-testid": "homeScreenNewButton", id: "newWorkbenchItem", align: "start", alignOffset: 0, placementOffset: 0, variant: "create-workbench", newWorkbenchItems: options })),
|
|
47
|
+
React.createElement("div", { className: "tw-p-5 " },
|
|
48
|
+
React.createElement("div", { className: "dark:tw-text-white tw-text-xs" }, "New workbench with arrow"),
|
|
49
|
+
React.createElement(NewWorkbench, { trigger: React.createElement(Button, { label: "New", icon: "fa-plus", variant: "theme" }), key: "newWorkbenchItem", "data-testid": "homeScreenNewButton", id: "newWorkbenchItem", align: "start", alignOffset: 0, hasArrow: true, variant: "create-workbench", placementOffset: 0, newWorkbenchItems: options })),
|
|
50
|
+
React.createElement("div", { className: "tw-p-5 " },
|
|
51
|
+
React.createElement("div", { className: "dark:tw-text-white tw-text-xs" }, "New workbench with center align"),
|
|
52
|
+
React.createElement(NewWorkbench, { trigger: React.createElement(Button, { label: "New", icon: "fa-plus", variant: "theme" }), key: "newWorkbenchItem", "data-testid": "homeScreenNewButton", id: "newWorkbenchItem", align: "center", alignOffset: 0, hasArrow: true, variant: "create-workbench", placementOffset: 0, newWorkbenchItems: options })),
|
|
53
|
+
React.createElement("div", { className: "tw-p-5 " },
|
|
54
|
+
React.createElement("div", { className: "dark:tw-text-white tw-text-xs" }, "New workbench with disabled button"),
|
|
55
|
+
React.createElement(NewWorkbench, { trigger: React.createElement(Button, { label: "New", icon: "fa-plus", variant: "theme" }), key: "newWorkbenchItem", "data-testid": "homeScreenNewButton", id: "newWorkbenchItem", align: "center", disabled: true, variant: "create-workbench", alignOffset: 0, hasArrow: true, placementOffset: 0, newWorkbenchItems: options })),
|
|
56
|
+
React.createElement("div", { className: "tw-p-5 " },
|
|
57
|
+
React.createElement("div", { className: "dark:tw-text-white tw-text-xs" }, "View workbench"),
|
|
58
|
+
React.createElement(NewWorkbench, { trigger: React.createElement(Button, { label: "View", icon: "fa-plus", variant: "theme" }), key: "newWorkbenchItem", "data-testid": "homeScreenNewButton", id: "newWorkbenchItem", align: "center", variant: "view-workbench", alignOffset: 0, placementOffset: 0, newWorkbenchItems: options })),
|
|
59
|
+
React.createElement("div", { className: "tw-p-5 " },
|
|
60
|
+
React.createElement("div", { className: "dark:tw-text-white tw-text-xs" }, "Insert seeq content"),
|
|
61
|
+
React.createElement(NewWorkbench, { trigger: React.createElement(Button, { label: "Insert", icon: "fc-plus", variant: "theme" }), key: "newWorkbenchItem", "data-testid": "homeScreenNewButton", id: "newWorkbenchItem", align: "center", variant: "insert-seeq-content", alignOffset: 0, placementOffset: 0, newWorkbenchItems: options }))));
|
|
62
|
+
const renderAllVariations = (color) => (React.createElement("div", { className: "tw-grid tw-grid-cols-2 tw-gap-4 tw-p-4" },
|
|
63
|
+
allNewWorkbenchs(color),
|
|
64
|
+
allNewWorkbenchs(color, true)));
|
|
65
|
+
return (React.createElement("div", { className: "tw-grid tw-grid-cols-3 tw-gap-4" },
|
|
66
|
+
React.createElement(QTip, null),
|
|
67
|
+
React.createElement("div", { className: "color_topic" },
|
|
68
|
+
React.createElement("b", null, "Topic Colors"),
|
|
69
|
+
renderAllVariations('topic')),
|
|
70
|
+
React.createElement("div", { className: "color_analysis" },
|
|
71
|
+
React.createElement("b", null, "Analysis Colors"),
|
|
72
|
+
renderAllVariations('analysis')),
|
|
73
|
+
React.createElement("div", { className: "color_datalab" },
|
|
74
|
+
React.createElement("b", null, "Datalab Colors"),
|
|
75
|
+
renderAllVariations('datalab'))));
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=NewWorkbench.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewWorkbench.stories.js","sourceRoot":"","sources":["../../src/NewWorkbench/NewWorkbench.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,eAAe;IACb,KAAK,EAAE,eAAe;CACvB,CAAC;AAEF,MAAM,OAAO,GAAG;IACd;QACE,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,0FAA0F;QAChG,IAAI,EAAE,aAAa;QACnB,EAAE,EAAE,aAAa;QACjB,OAAO,EAAE,IAAI;QACb,mBAAmB,EAAE,kBAAkB;QACvC,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;KACjB;IACD;QACE,OAAO,EAAE,mBAAmB;QAC5B,IAAI,EAAE,0FAA0F;QAChG,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;QAChB,EAAE,EAAE,iBAAiB;KACtB;IACD;QACE,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,0FAA0F;QAChG,IAAI,EAAE,iBAAiB;QACvB,EAAE,EAAE,YAAY;QAChB,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;QAChB,OAAO,EAAE,IAAI;KACd;IACD;QACE,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;QAChB,EAAE,EAAE,WAAW;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3D,MAAM,gBAAgB,GAAG,CAAC,KAAa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B,KAAK,EAAC,QAAQ,EACd,OAAO,EAAC,qBAAqB,EAC7B,WAAW,EAAE,CAAC,EACd,eAAe,EAAE,CAAC,EAClB,iBAAiB,EAAE,OAAO,GAAiB,CACzC,CACF,CACP,CAAC;IACF,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAC7C,6BAAK,SAAS,EAAC,wCAAwC;QACpD,gBAAgB,CAAC,KAAK,CAAC;QACvB,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAC1B,CACP,CAAC;IACF,OAAO,CACL,6BAAK,SAAS,EAAC,iCAAiC;QAC9C,oBAAC,IAAI,OAAG;QACR,6BAAK,SAAS,EAAC,aAAa;YAC1B,8CAAmB;YAClB,mBAAmB,CAAC,OAAO,CAAC,CACzB;QAEN,6BAAK,SAAS,EAAC,gBAAgB;YAC7B,iDAAsB;YACrB,mBAAmB,CAAC,UAAU,CAAC,CAC5B;QAEN,6BAAK,SAAS,EAAC,eAAe;YAC5B,gDAAqB;YACpB,mBAAmB,CAAC,SAAS,CAAC,CAC3B,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 Icon from '../Icon';
|
|
6
|
+
import NewWorkbench from './NewWorkbench';
|
|
7
|
+
describe('NewWorkbench', () => {
|
|
8
|
+
const mockOnClick = jest.fn();
|
|
9
|
+
const testId = 'trigger-icon';
|
|
10
|
+
class Context {
|
|
11
|
+
props = {
|
|
12
|
+
trigger: (React.createElement(Icon, { icon: "fc-more", type: "text", testId: testId, extraClassNames: "tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px]" })),
|
|
13
|
+
containerTestId: 'basic-dropdown1',
|
|
14
|
+
tooltip: 'This is a small dropdown.',
|
|
15
|
+
tooltipDelay: 0,
|
|
16
|
+
tooltipPlacement: 'top',
|
|
17
|
+
variant: 'create-workbench',
|
|
18
|
+
isHtmlTooltip: false,
|
|
19
|
+
newWorkbenchItems: [
|
|
20
|
+
{ display: 'Orange', icon: 'fc-data-file', action: mockOnClick, enabled: true },
|
|
21
|
+
{ display: 'Mango', icon: 'fc-user-community', action: mockOnClick, enabled: true },
|
|
22
|
+
{ display: 'Guava', icon: 'fc-user-community', action: mockOnClick },
|
|
23
|
+
{ display: 'Banana', icon: 'fc-user-community', action: mockOnClick },
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
let tc;
|
|
28
|
+
beforeEach(() => {
|
|
29
|
+
tc = new Context();
|
|
30
|
+
jest.clearAllMocks();
|
|
31
|
+
});
|
|
32
|
+
const renderNewWorkbench = (props) => render(React.createElement(NewWorkbench, { ...props }));
|
|
33
|
+
const openDropdown = async () => {
|
|
34
|
+
const popover = screen.getByTestId(testId);
|
|
35
|
+
await userEvent.click(popover);
|
|
36
|
+
};
|
|
37
|
+
test('renders trigger and opens dropdown content on trigger click', async () => {
|
|
38
|
+
renderNewWorkbench(tc.props);
|
|
39
|
+
expect(screen.getByTestId('trigger-icon')).toBeInTheDocument();
|
|
40
|
+
await openDropdown();
|
|
41
|
+
expect(screen.getByText('Orange')).toBeInTheDocument();
|
|
42
|
+
});
|
|
43
|
+
test('renders dividers correctly', async () => {
|
|
44
|
+
tc.props.newWorkbenchItems[1].divider = true;
|
|
45
|
+
renderNewWorkbench(tc.props);
|
|
46
|
+
expect(screen.getByTestId('trigger-icon')).toBeInTheDocument();
|
|
47
|
+
await openDropdown();
|
|
48
|
+
expect(screen.getByText('Orange')).toBeInTheDocument();
|
|
49
|
+
expect(screen.getByTestId('dropdown-divider-1')).toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
test('calls onClick handler when dropdown item is selected', async () => {
|
|
52
|
+
renderNewWorkbench(tc.props);
|
|
53
|
+
await openDropdown();
|
|
54
|
+
const item1 = screen.getByText('Orange');
|
|
55
|
+
await userEvent.click(item1);
|
|
56
|
+
expect(mockOnClick).toHaveBeenCalledTimes(1);
|
|
57
|
+
});
|
|
58
|
+
test('closes dropdown when item is clicked', async () => {
|
|
59
|
+
renderNewWorkbench(tc.props);
|
|
60
|
+
await openDropdown();
|
|
61
|
+
const item1 = screen.getByText('Orange');
|
|
62
|
+
await userEvent.click(item1);
|
|
63
|
+
expect(mockOnClick).toHaveBeenCalledTimes(1);
|
|
64
|
+
expect(screen.queryByText('Orange')).not.toBeInTheDocument();
|
|
65
|
+
});
|
|
66
|
+
test('does not open when disabled', async () => {
|
|
67
|
+
tc.props.disabled = true;
|
|
68
|
+
renderNewWorkbench(tc.props);
|
|
69
|
+
await openDropdown();
|
|
70
|
+
expect(screen.queryByText('Orange')).not.toBeInTheDocument();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=NewWorkbench.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewWorkbench.test.js","sourceRoot":"","sources":["../../src/NewWorkbench/NewWorkbench.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,cAAc,CAAC;IAC9B,MAAM,OAAO;QACX,KAAK,GAAsB;YACzB,OAAO,EAAE,CACP,oBAAC,IAAI,IACH,IAAI,EAAC,SAAS,EACd,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,MAAM,EACd,e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