@seeqdev/qomponents 0.0.70 → 0.0.71
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/Button/Button.types.d.ts +1 -5
- package/dist/Select/Select.types.d.ts +6 -0
- 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 +167 -167
- 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 +19 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3281 -3281
- package/package.json +83 -83
- package/dist/Accordion/Accordion.js +0 -9
- package/dist/Accordion/Accordion.js.map +0 -1
- package/dist/Accordion/Accordion.stories.js +0 -109
- package/dist/Accordion/Accordion.stories.js.map +0 -1
- package/dist/Accordion/Accordion.test.js +0 -55
- package/dist/Accordion/Accordion.test.js.map +0 -1
- package/dist/Accordion/Accordion.types.js +0 -2
- package/dist/Accordion/Accordion.types.js.map +0 -1
- package/dist/Accordion/index.js +0 -2
- package/dist/Accordion/index.js.map +0 -1
- package/dist/Button/Button.js +0 -90
- package/dist/Button/Button.js.map +0 -1
- package/dist/Button/Button.stories.js +0 -85
- package/dist/Button/Button.stories.js.map +0 -1
- package/dist/Button/Button.test.js +0 -49
- package/dist/Button/Button.test.js.map +0 -1
- package/dist/Button/Button.types.js +0 -5
- package/dist/Button/Button.types.js.map +0 -1
- package/dist/Button/index.js +0 -2
- package/dist/Button/index.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js +0 -60
- package/dist/ButtonWithDropdown/ButtonWithDropdown.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js +0 -81
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +0 -72
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js +0 -2
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.js.map +0 -1
- package/dist/ButtonWithDropdown/index.js +0 -2
- package/dist/ButtonWithDropdown/index.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.js +0 -52
- package/dist/ButtonWithPopover/ButtonWithPopover.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +0 -72
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js +0 -87
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js +0 -2
- package/dist/ButtonWithPopover/ButtonWithPopover.types.js.map +0 -1
- package/dist/ButtonWithPopover/index.js +0 -2
- package/dist/ButtonWithPopover/index.js.map +0 -1
- package/dist/Checkbox/Checkbox.js +0 -26
- package/dist/Checkbox/Checkbox.js.map +0 -1
- package/dist/Checkbox/Checkbox.stories.js +0 -34
- package/dist/Checkbox/Checkbox.stories.js.map +0 -1
- package/dist/Checkbox/Checkbox.test.js +0 -94
- package/dist/Checkbox/Checkbox.test.js.map +0 -1
- package/dist/Checkbox/Checkbox.types.js +0 -2
- package/dist/Checkbox/Checkbox.types.js.map +0 -1
- package/dist/Checkbox/index.js +0 -2
- package/dist/Checkbox/index.js.map +0 -1
- package/dist/Icon/Icon.js +0 -55
- package/dist/Icon/Icon.js.map +0 -1
- package/dist/Icon/Icon.stories.js +0 -41
- package/dist/Icon/Icon.stories.js.map +0 -1
- package/dist/Icon/Icon.test.js +0 -55
- package/dist/Icon/Icon.test.js.map +0 -1
- package/dist/Icon/Icon.types.js +0 -16
- package/dist/Icon/Icon.types.js.map +0 -1
- package/dist/Icon/index.js +0 -2
- package/dist/Icon/index.js.map +0 -1
- package/dist/Modal/Modal.js +0 -99
- package/dist/Modal/Modal.js.map +0 -1
- package/dist/Modal/Modal.stories.js +0 -176
- package/dist/Modal/Modal.stories.js.map +0 -1
- package/dist/Modal/Modal.test.js +0 -108
- package/dist/Modal/Modal.test.js.map +0 -1
- package/dist/Modal/Modal.types.js +0 -2
- package/dist/Modal/Modal.types.js.map +0 -1
- package/dist/Modal/index.js +0 -2
- package/dist/Modal/index.js.map +0 -1
- package/dist/Select/Select.js +0 -168
- package/dist/Select/Select.js.map +0 -1
- package/dist/Select/Select.stories.js +0 -72
- package/dist/Select/Select.stories.js.map +0 -1
- package/dist/Select/Select.test.js +0 -161
- package/dist/Select/Select.test.js.map +0 -1
- package/dist/Select/Select.types.js +0 -2
- package/dist/Select/Select.types.js.map +0 -1
- package/dist/Select/index.js +0 -2
- package/dist/Select/index.js.map +0 -1
- package/dist/Tabs/Tabs.js +0 -22
- package/dist/Tabs/Tabs.js.map +0 -1
- package/dist/Tabs/Tabs.stories.js +0 -91
- package/dist/Tabs/Tabs.stories.js.map +0 -1
- package/dist/Tabs/Tabs.test.js +0 -91
- package/dist/Tabs/Tabs.test.js.map +0 -1
- package/dist/Tabs/Tabs.types.js +0 -2
- package/dist/Tabs/Tabs.types.js.map +0 -1
- package/dist/Tabs/index.js +0 -2
- package/dist/Tabs/index.js.map +0 -1
- package/dist/TextArea/TextArea.js +0 -23
- package/dist/TextArea/TextArea.js.map +0 -1
- package/dist/TextArea/TextArea.stories.js +0 -39
- package/dist/TextArea/TextArea.stories.js.map +0 -1
- package/dist/TextArea/TextArea.test.js +0 -68
- package/dist/TextArea/TextArea.test.js.map +0 -1
- package/dist/TextArea/TextArea.types.js +0 -2
- package/dist/TextArea/TextArea.types.js.map +0 -1
- package/dist/TextArea/index.js +0 -2
- package/dist/TextArea/index.js.map +0 -1
- package/dist/TextField/TextField.js +0 -64
- package/dist/TextField/TextField.js.map +0 -1
- package/dist/TextField/TextField.stories.js +0 -41
- package/dist/TextField/TextField.stories.js.map +0 -1
- package/dist/TextField/TextField.test.js +0 -35
- package/dist/TextField/TextField.test.js.map +0 -1
- package/dist/TextField/TextField.types.js +0 -2
- package/dist/TextField/TextField.types.js.map +0 -1
- package/dist/TextField/index.js +0 -2
- package/dist/TextField/index.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.js +0 -73
- package/dist/ToolbarButton/ToolbarButton.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.stories.js +0 -89
- package/dist/ToolbarButton/ToolbarButton.stories.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.test.js +0 -93
- package/dist/ToolbarButton/ToolbarButton.test.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.types.js +0 -2
- package/dist/ToolbarButton/ToolbarButton.types.js.map +0 -1
- package/dist/ToolbarButton/index.js +0 -2
- package/dist/ToolbarButton/index.js.map +0 -1
- package/dist/Tooltip/QTip.stories.js +0 -40
- package/dist/Tooltip/QTip.stories.js.map +0 -1
- package/dist/Tooltip/QTip.types.js +0 -2
- package/dist/Tooltip/QTip.types.js.map +0 -1
- package/dist/Tooltip/QTipPerformance.stories.js +0 -30
- package/dist/Tooltip/QTipPerformance.stories.js.map +0 -1
- package/dist/Tooltip/Qtip.js +0 -154
- package/dist/Tooltip/Qtip.js.map +0 -1
- package/dist/Tooltip/Tooltip.js +0 -36
- package/dist/Tooltip/Tooltip.js.map +0 -1
- package/dist/Tooltip/Tooltip.stories.js +0 -32
- package/dist/Tooltip/Tooltip.stories.js.map +0 -1
- package/dist/Tooltip/Tooltip.types.js +0 -3
- package/dist/Tooltip/Tooltip.types.js.map +0 -1
- package/dist/Tooltip/TooltipPerformance.stories.js +0 -30
- package/dist/Tooltip/TooltipPerformance.stories.js.map +0 -1
- package/dist/Tooltip/index.js +0 -3
- package/dist/Tooltip/index.js.map +0 -1
- package/dist/Tooltip/qTip.utilities.js +0 -11
- package/dist/Tooltip/qTip.utilities.js.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils/browserId.js +0 -29
- package/dist/utils/browserId.js.map +0 -1
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button, Checkbox, Icon, QTip, Select, TextArea, TextField } from '@seeqdev/qomponents';
|
|
3
|
-
import ComplexSelectExample, { SelectOption } from './ComplexSelectExample';
|
|
4
|
-
|
|
5
|
-
const availableThemes = [
|
|
6
|
-
{ display: 'Analysis', value: 'color_analysis' },
|
|
7
|
-
{ display: 'Topic', value: 'color_topic' },
|
|
8
|
-
{ display: 'DataLab', value: 'color_datalab' },
|
|
9
|
-
];
|
|
10
|
-
|
|
11
|
-
const options = [
|
|
12
|
-
{ value: '1', label: 'Beginner' },
|
|
13
|
-
{ value: '2', label: 'Advanced' },
|
|
14
|
-
{ value: '3', label: 'Expert' },
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
function Example() {
|
|
18
|
-
/**
|
|
19
|
-
* Theming is supported "out of the box". To apply a theme wrap your addOn in a div and assign the class that
|
|
20
|
-
* matched the desired theme:
|
|
21
|
-
* - color_analysis for Analysis styled qomponents (green)
|
|
22
|
-
* - color_topic for Topic styled qomponents (blue)
|
|
23
|
-
* - DataLab for DataLab styled qomponents (orange)
|
|
24
|
-
*/
|
|
25
|
-
const [theme, setTheme] = React.useState('color_analysis');
|
|
26
|
-
/**
|
|
27
|
-
* qomponents also support dark-mode. To render qomponents using dark-mode wrap your addOn in a div and assign the
|
|
28
|
-
* class "tw-dark" for dark-mode or "tw-light" for light mode.
|
|
29
|
-
*/
|
|
30
|
-
const [mode, setMode] = React.useState('tw-light');
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* This example uses controlled inputs (https://blog.logrocket.com/controlled-vs-uncontrolled-components-in-react/)
|
|
34
|
-
*/
|
|
35
|
-
const [textFieldValue, setTextFieldValue] = React.useState('');
|
|
36
|
-
const [textAreaValue, setTextAreaValue] = React.useState('');
|
|
37
|
-
const [selectValue, setSelectValue] = React.useState();
|
|
38
|
-
const [complexSelectedValue, setComplexSelectedValue] = React.useState<SelectOption>();
|
|
39
|
-
const [display, setDisplay] = React.useState('');
|
|
40
|
-
const [easeOfUse, setEaseOfUse] = React.useState(false);
|
|
41
|
-
const [lookAndFeel, setLookAndFeel] = React.useState(false);
|
|
42
|
-
const [speed, setSpeed] = React.useState(false);
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
// outer-wrapper div that assigns the mode (dark-mode or light) as well as the theme
|
|
46
|
-
<div className={`backdrop ${mode} ${theme}`}>
|
|
47
|
-
{/*add the QTip component at the very top level or your application to ensure your tooltips display as expected!*/}
|
|
48
|
-
<QTip />
|
|
49
|
-
<div className="flex-container">
|
|
50
|
-
<div className="scroll-container">
|
|
51
|
-
<div className="header">qomponents - form example</div>
|
|
52
|
-
<div>Use this example to see qomponents in actions.</div>
|
|
53
|
-
No libraries other than Seeq's qomponents (and of course React) are used to create this example, however
|
|
54
|
-
minimal CSS is used to create an appealing form - you can find all that CSS in index.css.
|
|
55
|
-
<p className="mb-10">
|
|
56
|
-
<b>A note on CSS:</b> Seeq's qomponents come fully styled and ready to use. While it is tempting to use the
|
|
57
|
-
available <i>extraClassNames</i> property to provide yet additional styling we strongly advise you to use
|
|
58
|
-
this property to provide only width, margins and padding. This will ensure for a smooth upgrade experience
|
|
59
|
-
when Seeq's look and feel changes. <br />
|
|
60
|
-
Tip: to indicate missing or wrong user input use the <i>showError</i> property available on TextField,
|
|
61
|
-
TextArea, as well as Select.
|
|
62
|
-
</p>
|
|
63
|
-
<p className="mb-10">
|
|
64
|
-
Using FontAwesome? You can pass FontAwesome Icons to the qomponent Icon component
|
|
65
|
-
<Icon icon="fa-regular fa-face-smile" extraClassNames="ml-10" />
|
|
66
|
-
</p>
|
|
67
|
-
<div className="mb-10">
|
|
68
|
-
<a
|
|
69
|
-
href="#"
|
|
70
|
-
onClick={() => setMode(mode === 'tw-light' ? 'tw-dark' : 'tw-light')}
|
|
71
|
-
// this is how you display a q-tip for an element that doesn't come with an "out-of the box" tooltip
|
|
72
|
-
// property:
|
|
73
|
-
data-qtip-text="Toggle Dark/Light Mode."
|
|
74
|
-
// the position is optional and defaults to top
|
|
75
|
-
data-qtip-position="bottom">
|
|
76
|
-
<Icon icon="fc-sun" extraClassNames="mr-10" />
|
|
77
|
-
Click to toggle to {mode === 'tw-light' ? 'Dark Mode' : 'Light Mode'}
|
|
78
|
-
</a>
|
|
79
|
-
</div>
|
|
80
|
-
<div className="formRow">
|
|
81
|
-
<div className="labelWidth">Select theme:</div>
|
|
82
|
-
{availableThemes.map((t) => (
|
|
83
|
-
<Checkbox
|
|
84
|
-
type="radio"
|
|
85
|
-
checked={theme === t.value}
|
|
86
|
-
value={t.value}
|
|
87
|
-
label={t.display}
|
|
88
|
-
onChange={(e) => setTheme(e.target.value)}
|
|
89
|
-
extraClassNames="mr-10"
|
|
90
|
-
/>
|
|
91
|
-
))}
|
|
92
|
-
</div>
|
|
93
|
-
<div className="formRow">
|
|
94
|
-
<div className="labelWidth">AddOn Name</div>
|
|
95
|
-
<TextField
|
|
96
|
-
placeholder="you must enter a name"
|
|
97
|
-
extraClassNames="formElementWidth"
|
|
98
|
-
value={textFieldValue}
|
|
99
|
-
showError={textFieldValue === ''}
|
|
100
|
-
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextFieldValue(e.target.value)}
|
|
101
|
-
/>
|
|
102
|
-
</div>
|
|
103
|
-
<div className="formRow">
|
|
104
|
-
<div className="labelWidth">Description</div>
|
|
105
|
-
<TextArea
|
|
106
|
-
value={textAreaValue}
|
|
107
|
-
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextAreaValue(e.target.value)}
|
|
108
|
-
extraClassNames="formElementWidth"
|
|
109
|
-
placeholder="provide some text here"
|
|
110
|
-
/>
|
|
111
|
-
</div>
|
|
112
|
-
<div className="formRow">
|
|
113
|
-
<div className="labelWidth">Goals</div>
|
|
114
|
-
<div className="formColumn">
|
|
115
|
-
<div>
|
|
116
|
-
<Checkbox checked={easeOfUse} label="Ease of Use" onChange={() => setEaseOfUse(!easeOfUse)} />
|
|
117
|
-
<Checkbox
|
|
118
|
-
checked={lookAndFeel}
|
|
119
|
-
label="Improved Look & Feel"
|
|
120
|
-
onChange={() => setLookAndFeel(!lookAndFeel)}
|
|
121
|
-
/>
|
|
122
|
-
<Checkbox checked={speed} label="Speedy Development" onChange={() => setSpeed(!speed)} />
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<div className="formRow">
|
|
127
|
-
<div className="labelWidth">Level</div>
|
|
128
|
-
<Select
|
|
129
|
-
value={selectValue}
|
|
130
|
-
extraClassNames="formElementWidth"
|
|
131
|
-
onChange={(selectValue) => setSelectValue(selectValue)}
|
|
132
|
-
options={options}
|
|
133
|
-
placeholder="please choose"
|
|
134
|
-
/>
|
|
135
|
-
</div>
|
|
136
|
-
<div className="formRow">
|
|
137
|
-
<div className="labelWidth">Advanced</div>
|
|
138
|
-
<ComplexSelectExample
|
|
139
|
-
value={complexSelectedValue}
|
|
140
|
-
onChange={(selectedOption: SelectOption) => setComplexSelectedValue(selectedOption)}
|
|
141
|
-
/>
|
|
142
|
-
</div>
|
|
143
|
-
<div className="buttonRow">
|
|
144
|
-
<Button
|
|
145
|
-
label="Cancel"
|
|
146
|
-
onClick={() => {
|
|
147
|
-
setDisplay('cancel');
|
|
148
|
-
}}
|
|
149
|
-
extraClassNames="mr-10"
|
|
150
|
-
/>
|
|
151
|
-
<Button
|
|
152
|
-
label="Submit"
|
|
153
|
-
onClick={() => {
|
|
154
|
-
setDisplay('success');
|
|
155
|
-
}}
|
|
156
|
-
variant="theme"
|
|
157
|
-
/>
|
|
158
|
-
</div>
|
|
159
|
-
{display === 'success' && <div>submit button onClick function was called</div>}
|
|
160
|
-
{display === 'cancel' && <div>cancel button onClick function was called</div>}
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export default Example;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Checkbox, Icon, QTip, Select, TextArea, TextField } from '@seeqdev/qomponents';
|
|
3
|
+
import ComplexSelectExample, { SelectOption } from './ComplexSelectExample';
|
|
4
|
+
|
|
5
|
+
const availableThemes = [
|
|
6
|
+
{ display: 'Analysis', value: 'color_analysis' },
|
|
7
|
+
{ display: 'Topic', value: 'color_topic' },
|
|
8
|
+
{ display: 'DataLab', value: 'color_datalab' },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const options = [
|
|
12
|
+
{ value: '1', label: 'Beginner' },
|
|
13
|
+
{ value: '2', label: 'Advanced' },
|
|
14
|
+
{ value: '3', label: 'Expert' },
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
function Example() {
|
|
18
|
+
/**
|
|
19
|
+
* Theming is supported "out of the box". To apply a theme wrap your addOn in a div and assign the class that
|
|
20
|
+
* matched the desired theme:
|
|
21
|
+
* - color_analysis for Analysis styled qomponents (green)
|
|
22
|
+
* - color_topic for Topic styled qomponents (blue)
|
|
23
|
+
* - DataLab for DataLab styled qomponents (orange)
|
|
24
|
+
*/
|
|
25
|
+
const [theme, setTheme] = React.useState('color_analysis');
|
|
26
|
+
/**
|
|
27
|
+
* qomponents also support dark-mode. To render qomponents using dark-mode wrap your addOn in a div and assign the
|
|
28
|
+
* class "tw-dark" for dark-mode or "tw-light" for light mode.
|
|
29
|
+
*/
|
|
30
|
+
const [mode, setMode] = React.useState('tw-light');
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* This example uses controlled inputs (https://blog.logrocket.com/controlled-vs-uncontrolled-components-in-react/)
|
|
34
|
+
*/
|
|
35
|
+
const [textFieldValue, setTextFieldValue] = React.useState('');
|
|
36
|
+
const [textAreaValue, setTextAreaValue] = React.useState('');
|
|
37
|
+
const [selectValue, setSelectValue] = React.useState();
|
|
38
|
+
const [complexSelectedValue, setComplexSelectedValue] = React.useState<SelectOption>();
|
|
39
|
+
const [display, setDisplay] = React.useState('');
|
|
40
|
+
const [easeOfUse, setEaseOfUse] = React.useState(false);
|
|
41
|
+
const [lookAndFeel, setLookAndFeel] = React.useState(false);
|
|
42
|
+
const [speed, setSpeed] = React.useState(false);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
// outer-wrapper div that assigns the mode (dark-mode or light) as well as the theme
|
|
46
|
+
<div className={`backdrop ${mode} ${theme}`}>
|
|
47
|
+
{/*add the QTip component at the very top level or your application to ensure your tooltips display as expected!*/}
|
|
48
|
+
<QTip />
|
|
49
|
+
<div className="flex-container">
|
|
50
|
+
<div className="scroll-container">
|
|
51
|
+
<div className="header">qomponents - form example</div>
|
|
52
|
+
<div>Use this example to see qomponents in actions.</div>
|
|
53
|
+
No libraries other than Seeq's qomponents (and of course React) are used to create this example, however
|
|
54
|
+
minimal CSS is used to create an appealing form - you can find all that CSS in index.css.
|
|
55
|
+
<p className="mb-10">
|
|
56
|
+
<b>A note on CSS:</b> Seeq's qomponents come fully styled and ready to use. While it is tempting to use the
|
|
57
|
+
available <i>extraClassNames</i> property to provide yet additional styling we strongly advise you to use
|
|
58
|
+
this property to provide only width, margins and padding. This will ensure for a smooth upgrade experience
|
|
59
|
+
when Seeq's look and feel changes. <br />
|
|
60
|
+
Tip: to indicate missing or wrong user input use the <i>showError</i> property available on TextField,
|
|
61
|
+
TextArea, as well as Select.
|
|
62
|
+
</p>
|
|
63
|
+
<p className="mb-10">
|
|
64
|
+
Using FontAwesome? You can pass FontAwesome Icons to the qomponent Icon component
|
|
65
|
+
<Icon icon="fa-regular fa-face-smile" extraClassNames="ml-10" />
|
|
66
|
+
</p>
|
|
67
|
+
<div className="mb-10">
|
|
68
|
+
<a
|
|
69
|
+
href="#"
|
|
70
|
+
onClick={() => setMode(mode === 'tw-light' ? 'tw-dark' : 'tw-light')}
|
|
71
|
+
// this is how you display a q-tip for an element that doesn't come with an "out-of the box" tooltip
|
|
72
|
+
// property:
|
|
73
|
+
data-qtip-text="Toggle Dark/Light Mode."
|
|
74
|
+
// the position is optional and defaults to top
|
|
75
|
+
data-qtip-position="bottom">
|
|
76
|
+
<Icon icon="fc-sun" extraClassNames="mr-10" />
|
|
77
|
+
Click to toggle to {mode === 'tw-light' ? 'Dark Mode' : 'Light Mode'}
|
|
78
|
+
</a>
|
|
79
|
+
</div>
|
|
80
|
+
<div className="formRow">
|
|
81
|
+
<div className="labelWidth">Select theme:</div>
|
|
82
|
+
{availableThemes.map((t) => (
|
|
83
|
+
<Checkbox
|
|
84
|
+
type="radio"
|
|
85
|
+
checked={theme === t.value}
|
|
86
|
+
value={t.value}
|
|
87
|
+
label={t.display}
|
|
88
|
+
onChange={(e) => setTheme(e.target.value)}
|
|
89
|
+
extraClassNames="mr-10"
|
|
90
|
+
/>
|
|
91
|
+
))}
|
|
92
|
+
</div>
|
|
93
|
+
<div className="formRow">
|
|
94
|
+
<div className="labelWidth">AddOn Name</div>
|
|
95
|
+
<TextField
|
|
96
|
+
placeholder="you must enter a name"
|
|
97
|
+
extraClassNames="formElementWidth"
|
|
98
|
+
value={textFieldValue}
|
|
99
|
+
showError={textFieldValue === ''}
|
|
100
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextFieldValue(e.target.value)}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
<div className="formRow">
|
|
104
|
+
<div className="labelWidth">Description</div>
|
|
105
|
+
<TextArea
|
|
106
|
+
value={textAreaValue}
|
|
107
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setTextAreaValue(e.target.value)}
|
|
108
|
+
extraClassNames="formElementWidth"
|
|
109
|
+
placeholder="provide some text here"
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
<div className="formRow">
|
|
113
|
+
<div className="labelWidth">Goals</div>
|
|
114
|
+
<div className="formColumn">
|
|
115
|
+
<div>
|
|
116
|
+
<Checkbox checked={easeOfUse} label="Ease of Use" onChange={() => setEaseOfUse(!easeOfUse)} />
|
|
117
|
+
<Checkbox
|
|
118
|
+
checked={lookAndFeel}
|
|
119
|
+
label="Improved Look & Feel"
|
|
120
|
+
onChange={() => setLookAndFeel(!lookAndFeel)}
|
|
121
|
+
/>
|
|
122
|
+
<Checkbox checked={speed} label="Speedy Development" onChange={() => setSpeed(!speed)} />
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div className="formRow">
|
|
127
|
+
<div className="labelWidth">Level</div>
|
|
128
|
+
<Select
|
|
129
|
+
value={selectValue}
|
|
130
|
+
extraClassNames="formElementWidth"
|
|
131
|
+
onChange={(selectValue) => setSelectValue(selectValue)}
|
|
132
|
+
options={options}
|
|
133
|
+
placeholder="please choose"
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
<div className="formRow">
|
|
137
|
+
<div className="labelWidth">Advanced</div>
|
|
138
|
+
<ComplexSelectExample
|
|
139
|
+
value={complexSelectedValue}
|
|
140
|
+
onChange={(selectedOption: SelectOption) => setComplexSelectedValue(selectedOption)}
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
<div className="buttonRow">
|
|
144
|
+
<Button
|
|
145
|
+
label="Cancel"
|
|
146
|
+
onClick={() => {
|
|
147
|
+
setDisplay('cancel');
|
|
148
|
+
}}
|
|
149
|
+
extraClassNames="mr-10"
|
|
150
|
+
/>
|
|
151
|
+
<Button
|
|
152
|
+
label="Submit"
|
|
153
|
+
onClick={() => {
|
|
154
|
+
setDisplay('success');
|
|
155
|
+
}}
|
|
156
|
+
variant="theme"
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
{display === 'success' && <div>submit button onClick function was called</div>}
|
|
160
|
+
{display === 'cancel' && <div>cancel button onClick function was called</div>}
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export default Example;
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
@import '@seeqdev/qomponents/dist/styles.css';
|
|
2
|
-
@import '@fortawesome/fontawesome-free/css/all.css';
|
|
3
|
-
|
|
4
|
-
.tw-light {
|
|
5
|
-
background-color: white;
|
|
6
|
-
color: #1a1a1a;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.tw-dark {
|
|
10
|
-
background-color: rgb(36, 36, 34);
|
|
11
|
-
color: rgb(194, 188, 176);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.formPanel {
|
|
15
|
-
align-items: center;
|
|
16
|
-
width: 500px;
|
|
17
|
-
display: flex;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.header {
|
|
21
|
-
font-size: larger;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.backdrop {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
justify-content: center;
|
|
29
|
-
align-items: center;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.scroll-container {
|
|
33
|
-
margin: auto;
|
|
34
|
-
max-height: 100%;
|
|
35
|
-
overflow: auto;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.flex-container {
|
|
39
|
-
margin-top: 30px;
|
|
40
|
-
margin-bottom: 70px;
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
width: 500px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.formRow {
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: row;
|
|
50
|
-
margin-bottom: 15px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.formColumn {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: column;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.buttonRow {
|
|
59
|
-
display: flex;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.labelWidth {
|
|
64
|
-
width: 150px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.formElementWidth {
|
|
68
|
-
width: 350px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.mr-10 {
|
|
72
|
-
margin-right: 10px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.ml-10 {
|
|
76
|
-
margin-left: 10px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.mb-10 {
|
|
80
|
-
margin-bottom: 10px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* styles for complexSelect*/
|
|
84
|
-
.selectOptionWrapperDiv {
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-direction: row;
|
|
87
|
-
align-items: center;
|
|
88
|
-
height: 34px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.selectOptionDiv {
|
|
92
|
-
display: flex;
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.selectOptionSubText {
|
|
97
|
-
font-size: smaller;
|
|
98
|
-
padding: 0;
|
|
99
|
-
margin-top: -6px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/* end styles for complexSelect*/
|
|
1
|
+
@import '@seeqdev/qomponents/dist/styles.css';
|
|
2
|
+
@import '@fortawesome/fontawesome-free/css/all.css';
|
|
3
|
+
|
|
4
|
+
.tw-light {
|
|
5
|
+
background-color: white;
|
|
6
|
+
color: #1a1a1a;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tw-dark {
|
|
10
|
+
background-color: rgb(36, 36, 34);
|
|
11
|
+
color: rgb(194, 188, 176);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.formPanel {
|
|
15
|
+
align-items: center;
|
|
16
|
+
width: 500px;
|
|
17
|
+
display: flex;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.header {
|
|
21
|
+
font-size: larger;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.backdrop {
|
|
26
|
+
margin: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.scroll-container {
|
|
33
|
+
margin: auto;
|
|
34
|
+
max-height: 100%;
|
|
35
|
+
overflow: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.flex-container {
|
|
39
|
+
margin-top: 30px;
|
|
40
|
+
margin-bottom: 70px;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
width: 500px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.formRow {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
margin-bottom: 15px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.formColumn {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.buttonRow {
|
|
59
|
+
display: flex;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.labelWidth {
|
|
64
|
+
width: 150px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.formElementWidth {
|
|
68
|
+
width: 350px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mr-10 {
|
|
72
|
+
margin-right: 10px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ml-10 {
|
|
76
|
+
margin-left: 10px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.mb-10 {
|
|
80
|
+
margin-bottom: 10px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* styles for complexSelect*/
|
|
84
|
+
.selectOptionWrapperDiv {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
align-items: center;
|
|
88
|
+
height: 34px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.selectOptionDiv {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.selectOptionSubText {
|
|
97
|
+
font-size: smaller;
|
|
98
|
+
padding: 0;
|
|
99
|
+
margin-top: -6px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* end styles for complexSelect*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import Example from './Example';
|
|
4
|
-
import './index.css';
|
|
5
|
-
|
|
6
|
-
ReactDOM.createRoot(document.body as HTMLElement).render(
|
|
7
|
-
<React.StrictMode>
|
|
8
|
-
<Example />
|
|
9
|
-
</React.StrictMode>,
|
|
10
|
-
);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import Example from './Example';
|
|
4
|
+
import './index.css';
|
|
5
|
+
|
|
6
|
+
ReactDOM.createRoot(document.body as HTMLElement).render(
|
|
7
|
+
<React.StrictMode>
|
|
8
|
+
<Example />
|
|
9
|
+
</React.StrictMode>,
|
|
10
|
+
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": [
|
|
6
|
-
"ES2020",
|
|
7
|
-
"DOM",
|
|
8
|
-
"DOM.Iterable"
|
|
9
|
-
],
|
|
10
|
-
"module": "ESNext",
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"allowImportingTsExtensions": true,
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"isolatedModules": true,
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
"jsx": "react",
|
|
18
|
-
/* Linting */
|
|
19
|
-
"strict": true,
|
|
20
|
-
"noUnusedLocals": true,
|
|
21
|
-
"noUnusedParameters": true,
|
|
22
|
-
"noFallthroughCasesInSwitch": true,
|
|
23
|
-
"allowSyntheticDefaultImports": true
|
|
24
|
-
},
|
|
25
|
-
"include": [
|
|
26
|
-
"src"
|
|
27
|
-
],
|
|
28
|
-
"references": [
|
|
29
|
-
{
|
|
30
|
-
"path": "./tsconfig.node.json"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2020",
|
|
7
|
+
"DOM",
|
|
8
|
+
"DOM.Iterable"
|
|
9
|
+
],
|
|
10
|
+
"module": "ESNext",
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react",
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"allowSyntheticDefaultImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"src"
|
|
27
|
+
],
|
|
28
|
+
"references": [
|
|
29
|
+
{
|
|
30
|
+
"path": "./tsconfig.node.json"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"skipLibCheck": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"allowSyntheticDefaultImports": true
|
|
8
|
-
},
|
|
9
|
-
"include": [
|
|
10
|
-
"vite.config.ts"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"skipLibCheck": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"allowSyntheticDefaultImports": true
|
|
8
|
+
},
|
|
9
|
+
"include": [
|
|
10
|
+
"vite.config.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|