@seeqdev/qomponents 0.0.155-react-19-v10 → 0.0.156
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.stories.d.ts +1 -2
- package/dist/Alert/Alert.stories.d.ts +1 -2
- package/dist/Alert/Alert.types.d.ts +0 -1
- package/dist/Button/Button.stories.d.ts +4 -5
- package/dist/Button/Button.types.d.ts +1 -1
- package/dist/ButtonGroup/ButtonGroup.stories.d.ts +1 -2
- package/dist/ButtonGroup/ButtonGroup.types.d.ts +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +1 -2
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +1 -2
- package/dist/Carousel/Carousel.stories.d.ts +1 -2
- package/dist/Carousel/Carousel.types.d.ts +0 -1
- package/dist/Checkbox/Checkbox.stories.d.ts +1 -2
- package/dist/Checkbox/Checkbox.types.d.ts +0 -1
- package/dist/Collapse/Collapse.stories.d.ts +1 -2
- package/dist/Collapse/Collapse.types.d.ts +0 -1
- package/dist/Icon/Icon.stories.d.ts +1 -2
- package/dist/Icon/Icon.types.d.ts +0 -1
- package/dist/InputGroup/InputGroup.stories.d.ts +1 -2
- package/dist/InputGroup/InputGroup.types.d.ts +0 -1
- package/dist/ProgressBar/ProgressBar.stories.d.ts +3 -2
- package/dist/ProgressBar/ProgressBar.types.d.ts +10 -0
- package/dist/ProgressBar/index.d.ts +1 -0
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +1 -2
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -1
- package/dist/Select/Select.stories.d.ts +1 -2
- package/dist/Slider/Slider.stories.d.ts +1 -2
- package/dist/Slider/Slider.types.d.ts +0 -1
- package/dist/SvgIcon/SvgIcon.stories.d.ts +1 -2
- package/dist/SvgIcon/SvgIcon.types.d.ts +0 -1
- package/dist/Tabs/Tabs.stories.d.ts +1 -2
- package/dist/Tabs/Tabs.types.d.ts +1 -2
- package/dist/TextArea/TextArea.stories.d.ts +1 -2
- package/dist/TextArea/TextArea.types.d.ts +0 -1
- package/dist/TextField/TextField.stories.d.ts +1 -2
- package/dist/TextField/TextField.types.d.ts +0 -1
- package/dist/ToolbarButton/ToolbarButton.stories.d.ts +1 -2
- package/dist/Tooltip/QTip.stories.d.ts +1 -2
- package/dist/Tooltip/QTipPerformance.stories.d.ts +1 -2
- package/dist/Tooltip/Tooltip.stories.d.ts +1 -2
- package/dist/Tooltip/Tooltip.types.d.ts +2 -3
- package/dist/Tooltip/TooltipPerformance.stories.d.ts +1 -2
- 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.d.ts +1 -0
- package/dist/index.esm.js +7896 -14347
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7889 -14340
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4006 -3819
- package/package.json +88 -91
- package/dist/Accordion/Accordion.js +0 -9
- package/dist/Accordion/Accordion.js.map +0 -1
- package/dist/Accordion/Accordion.stories.js +0 -115
- 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/Alert/Alert.js +0 -34
- package/dist/Alert/Alert.js.map +0 -1
- package/dist/Alert/Alert.stories.js +0 -52
- package/dist/Alert/Alert.stories.js.map +0 -1
- package/dist/Alert/Alert.test.js +0 -51
- package/dist/Alert/Alert.test.js.map +0 -1
- package/dist/Alert/Alert.types.js +0 -2
- package/dist/Alert/Alert.types.js.map +0 -1
- package/dist/Alert/index.js +0 -2
- package/dist/Alert/index.js.map +0 -1
- package/dist/Button/Button.js +0 -92
- package/dist/Button/Button.js.map +0 -1
- package/dist/Button/Button.stories.js +0 -100
- 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/ButtonGroup/ButtonGroup.js +0 -35
- package/dist/ButtonGroup/ButtonGroup.js.map +0 -1
- package/dist/ButtonGroup/ButtonGroup.stories.js +0 -385
- package/dist/ButtonGroup/ButtonGroup.stories.js.map +0 -1
- package/dist/ButtonGroup/ButtonGroup.test.js +0 -67
- package/dist/ButtonGroup/ButtonGroup.test.js.map +0 -1
- package/dist/ButtonGroup/ButtonGroup.types.js +0 -2
- package/dist/ButtonGroup/ButtonGroup.types.js.map +0 -1
- package/dist/ButtonGroup/index.js +0 -2
- package/dist/ButtonGroup/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 -143
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.js.map +0 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.test.js +0 -93
- 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 -62
- package/dist/ButtonWithPopover/ButtonWithPopover.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js +0 -75
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.js.map +0 -1
- package/dist/ButtonWithPopover/ButtonWithPopover.test.js +0 -82
- 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/Carousel/Carousel.js +0 -70
- package/dist/Carousel/Carousel.js.map +0 -1
- package/dist/Carousel/Carousel.stories.js +0 -115
- package/dist/Carousel/Carousel.stories.js.map +0 -1
- package/dist/Carousel/Carousel.test.js +0 -48
- package/dist/Carousel/Carousel.test.js.map +0 -1
- package/dist/Carousel/Carousel.types.js +0 -2
- package/dist/Carousel/Carousel.types.js.map +0 -1
- package/dist/Carousel/index.js +0 -2
- package/dist/Carousel/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/Collapse/Collapse.js +0 -15
- package/dist/Collapse/Collapse.js.map +0 -1
- package/dist/Collapse/Collapse.stories.js +0 -37
- package/dist/Collapse/Collapse.stories.js.map +0 -1
- package/dist/Collapse/Collapse.test.js +0 -19
- package/dist/Collapse/Collapse.test.js.map +0 -1
- package/dist/Collapse/Collapse.types.js +0 -2
- package/dist/Collapse/Collapse.types.js.map +0 -1
- package/dist/Collapse/index.js +0 -2
- package/dist/Collapse/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 -49
- 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/InputGroup/InputGroup.js +0 -35
- package/dist/InputGroup/InputGroup.js.map +0 -1
- package/dist/InputGroup/InputGroup.stories.js +0 -176
- package/dist/InputGroup/InputGroup.stories.js.map +0 -1
- package/dist/InputGroup/InputGroup.test.js +0 -43
- package/dist/InputGroup/InputGroup.test.js.map +0 -1
- package/dist/InputGroup/InputGroup.types.js +0 -2
- package/dist/InputGroup/InputGroup.types.js.map +0 -1
- package/dist/InputGroup/index.js +0 -2
- package/dist/InputGroup/index.js.map +0 -1
- package/dist/Modal/Modal.js +0 -102
- package/dist/Modal/Modal.js.map +0 -1
- package/dist/Modal/Modal.stories.js +0 -127
- 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/ProgressBar/ProgressBar.js +0 -70
- package/dist/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/ProgressBar/ProgressBar.stories.js +0 -83
- package/dist/ProgressBar/ProgressBar.stories.js.map +0 -1
- package/dist/ProgressBar/ProgressBar.test.js +0 -44
- package/dist/ProgressBar/ProgressBar.test.js.map +0 -1
- package/dist/ProgressBar/ProgressBar.types.js +0 -2
- package/dist/ProgressBar/ProgressBar.types.js.map +0 -1
- package/dist/ProgressBar/index.js +0 -2
- package/dist/ProgressBar/index.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.js +0 -48
- package/dist/SeeqActionDropdown/SeeqActionDropdown.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js +0 -87
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js +0 -73
- package/dist/SeeqActionDropdown/SeeqActionDropdown.test.js.map +0 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js +0 -2
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.js.map +0 -1
- package/dist/SeeqActionDropdown/index.js +0 -2
- package/dist/SeeqActionDropdown/index.js.map +0 -1
- package/dist/SeeqActionDropdown/variants.js +0 -38
- package/dist/SeeqActionDropdown/variants.js.map +0 -1
- package/dist/Select/Select.js +0 -177
- package/dist/Select/Select.js.map +0 -1
- package/dist/Select/Select.stories.js +0 -82
- package/dist/Select/Select.stories.js.map +0 -1
- package/dist/Select/Select.test.js +0 -182
- 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 -3
- package/dist/Select/index.js.map +0 -1
- package/dist/Slider/Slider.js +0 -13
- package/dist/Slider/Slider.js.map +0 -1
- package/dist/Slider/Slider.stories.js +0 -58
- package/dist/Slider/Slider.stories.js.map +0 -1
- package/dist/Slider/Slider.test.js +0 -33
- package/dist/Slider/Slider.test.js.map +0 -1
- package/dist/Slider/Slider.types.js +0 -2
- package/dist/Slider/Slider.types.js.map +0 -1
- package/dist/Slider/index.js +0 -2
- package/dist/Slider/index.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.js +0 -30
- package/dist/SvgIcon/SvgIcon.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.stories.js +0 -42
- package/dist/SvgIcon/SvgIcon.stories.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.test.js +0 -41
- package/dist/SvgIcon/SvgIcon.test.js.map +0 -1
- package/dist/SvgIcon/SvgIcon.types.js +0 -6
- package/dist/SvgIcon/SvgIcon.types.js.map +0 -1
- package/dist/SvgIcon/index.js +0 -2
- package/dist/SvgIcon/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 -25
- package/dist/TextArea/TextArea.js.map +0 -1
- package/dist/TextArea/TextArea.stories.js +0 -46
- 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 -86
- package/dist/TextField/TextField.js.map +0 -1
- package/dist/TextField/TextField.stories.js +0 -70
- package/dist/TextField/TextField.stories.js.map +0 -1
- package/dist/TextField/TextField.test.js +0 -41
- 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 -69
- package/dist/ToolbarButton/ToolbarButton.js.map +0 -1
- package/dist/ToolbarButton/ToolbarButton.stories.js +0 -97
- 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 -45
- 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 -170
- 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
- package/dist/utils/svg.js +0 -20
- package/dist/utils/svg.js.map +0 -1
- package/dist/utils/validateStyleDimension.js +0 -14
- package/dist/utils/validateStyleDimension.js.map +0 -1
- package/dist/utils/validateStyleDimension.test.js +0 -20
- package/dist/utils/validateStyleDimension.test.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
<!-- markdownlint-disable-next-line -->
|
|
2
|
-
<p align="center">
|
|
3
|
-
<img width="150" src="https://seeq.com/sites/default/files/seeq-content/seeq-logo-blue-web-33h.svg" alt="Seeq logo">
|
|
4
|
-
</p>
|
|
5
|
-
<h1 align="center">qomponents</h1>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Seeq qomponents are a collection of UI components, including a Button, a TextField, an Icon, as well as a Tooltip
|
|
9
|
-
React component (more coming soon!)
|
|
10
|
-
|
|
11
|
-
These components are used by Seeq's application and are made publicly available for Developers who want to expand
|
|
12
|
-
the Seeq eco-system with their own plugins and add-ons without having to worry about creating a cohesive Seeq UX
|
|
13
|
-
experience. Every component comes fully styled (and with dark mode support).
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
Seeq qomponents are available on npm.
|
|
18
|
-
|
|
19
|
-
**npm:**
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
npm install @seeqdev/qomponents
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
**yarn:**
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
yarn add @seeqdev/qomponents
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Getting started with Seeq qomponents
|
|
32
|
-
|
|
33
|
-
Prefer a more complete example? <br/>Checkout the example folder provided.
|
|
34
|
-
It includes a ready to run example application. Start with the readme in the example folder to get up and running!
|
|
35
|
-
|
|
36
|
-
Here is an example of a basic app using the `Button` component:
|
|
37
|
-
|
|
38
|
-
```jsx
|
|
39
|
-
import * as React from 'react';
|
|
40
|
-
import {Button} from '@seeqdev/qomponents';
|
|
41
|
-
|
|
42
|
-
function App() {
|
|
43
|
-
return <Button variant="theme" label="Seeq Rocks" />;
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
To make sure all styles are properly applied be sure to include the qomponents css file in your main css file.
|
|
48
|
-
|
|
49
|
-
```css
|
|
50
|
-
@import '@seeqdev/qomponents/dist/styles.css';
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
<b>A note on CSS:</b> Seeq's qomponents come fully styled and ready to use. While it is tempting to use the
|
|
54
|
-
available <i>extraClassNames</i> property to provide yet additional styling we strongly advise you to use this
|
|
55
|
-
property to provide only width, margins and padding. This will ensure for a smooth upgrade experience when
|
|
56
|
-
Seeq's look and feel changes.
|
|
57
|
-
<br />
|
|
58
|
-
<b>Tip:</b>: to indicate missing or wrong user input use the <i>showError</i> property available on TextField,
|
|
59
|
-
TextArea, as well as Select.
|
|
60
|
-
|
|
61
|
-
## Frequently asked questions
|
|
62
|
-
|
|
63
|
-
<h3>1) I use webpack and I get a strange error once I added qomponents to my package.json!</h3>
|
|
64
|
-
|
|
65
|
-
Webpack needs a little help :)
|
|
66
|
-
Add the following to the <code>rules</code> array in your <code>webpack.config</code>
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
{
|
|
70
|
-
test: /@?(seeqdev).*\.(ts|js)x?$/,
|
|
71
|
-
loader:'babel-loader'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
|
75
|
-
type: 'asset/resource',
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
If you're using webpack + scss be sure to include a <code>~</code> as part of the css import path:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
@import '~@seeqdev/qomponents/dist/styles.css';
|
|
83
|
-
@import '~@fortawesome/fontawesome-free/css/all.css';
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
<h3>2) How do I get my Button to be green?</h3>
|
|
87
|
-
|
|
88
|
-
The colors of your qomponents are controlled by the "theme". </br>
|
|
89
|
-
If you do not provide a theme your qomponents will use the default blue or also known as Topic-based theme.
|
|
90
|
-
Themes are applied by adding the class of the desired theme to a wrapper of your application. The theme class can
|
|
91
|
-
also be applied to the body tag.
|
|
92
|
-
|
|
93
|
-
```html
|
|
94
|
-
|
|
95
|
-
<div class="color_analysis">
|
|
96
|
-
... your application here
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
There are 3 themes available:
|
|
102
|
-
|
|
103
|
-
| Theme | Color | Class | Example |
|
|
104
|
-
|:---------|:-------|:---------------|:-----------------------|
|
|
105
|
-
| Topic | blue | color_topic | class="color_topic" |
|
|
106
|
-
| Analysis | green | color_analysis | class="color_analysis" |
|
|
107
|
-
| DataLab | orange | color_datalab | class="color_datalab" |
|
|
108
|
-
|
|
109
|
-
<h3>3) How do I use Fontawesome Icons?</h3>
|
|
110
|
-
Before you can use Fontawesome icons you must install FontAwesome.
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
npm install --save @fortawesome/fontawesome-free
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Once it's installed simply import the required css files. To import all variations of FontAwesome's Icons you can
|
|
117
|
-
add the following import to your main css file:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
@import "@fortawesome/fontawesome-free/css/all.css";
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
If your project only uses Classic Solid or (Sharp Solids, or any other one kind) it's better to import only the
|
|
124
|
-
required css for that Icon type to keep your packages size small.<br/> Note: if you don't import "all" like shown above
|
|
125
|
-
be sure to include <code>fontawesome.css</code> in addition to whatever Icon style you require.
|
|
126
|
-
|
|
127
|
-
For Example:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
@import "@fortawesome/fontawesome-free/css/fontawesome.css";
|
|
131
|
-
@import "@fortawesome/fontawesome-free/css/solid.css";
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
<h3>4) How can I see all the props that are available?</h3>
|
|
135
|
-
Take a look at the <code>.types.d.ts</code> files that can be found in the <code>dist/{component name}/</code>
|
|
1
|
+
<!-- markdownlint-disable-next-line -->
|
|
2
|
+
<p align="center">
|
|
3
|
+
<img width="150" src="https://seeq.com/sites/default/files/seeq-content/seeq-logo-blue-web-33h.svg" alt="Seeq logo">
|
|
4
|
+
</p>
|
|
5
|
+
<h1 align="center">qomponents</h1>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Seeq qomponents are a collection of UI components, including a Button, a TextField, an Icon, as well as a Tooltip
|
|
9
|
+
React component (more coming soon!)
|
|
10
|
+
|
|
11
|
+
These components are used by Seeq's application and are made publicly available for Developers who want to expand
|
|
12
|
+
the Seeq eco-system with their own plugins and add-ons without having to worry about creating a cohesive Seeq UX
|
|
13
|
+
experience. Every component comes fully styled (and with dark mode support).
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
Seeq qomponents are available on npm.
|
|
18
|
+
|
|
19
|
+
**npm:**
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install @seeqdev/qomponents
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**yarn:**
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
yarn add @seeqdev/qomponents
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Getting started with Seeq qomponents
|
|
32
|
+
|
|
33
|
+
Prefer a more complete example? <br/>Checkout the example folder provided.
|
|
34
|
+
It includes a ready to run example application. Start with the readme in the example folder to get up and running!
|
|
35
|
+
|
|
36
|
+
Here is an example of a basic app using the `Button` component:
|
|
37
|
+
|
|
38
|
+
```jsx
|
|
39
|
+
import * as React from 'react';
|
|
40
|
+
import {Button} from '@seeqdev/qomponents';
|
|
41
|
+
|
|
42
|
+
function App() {
|
|
43
|
+
return <Button variant="theme" label="Seeq Rocks" />;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To make sure all styles are properly applied be sure to include the qomponents css file in your main css file.
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
@import '@seeqdev/qomponents/dist/styles.css';
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
<b>A note on CSS:</b> Seeq's qomponents come fully styled and ready to use. While it is tempting to use the
|
|
54
|
+
available <i>extraClassNames</i> property to provide yet additional styling we strongly advise you to use this
|
|
55
|
+
property to provide only width, margins and padding. This will ensure for a smooth upgrade experience when
|
|
56
|
+
Seeq's look and feel changes.
|
|
57
|
+
<br />
|
|
58
|
+
<b>Tip:</b>: to indicate missing or wrong user input use the <i>showError</i> property available on TextField,
|
|
59
|
+
TextArea, as well as Select.
|
|
60
|
+
|
|
61
|
+
## Frequently asked questions
|
|
62
|
+
|
|
63
|
+
<h3>1) I use webpack and I get a strange error once I added qomponents to my package.json!</h3>
|
|
64
|
+
|
|
65
|
+
Webpack needs a little help :)
|
|
66
|
+
Add the following to the <code>rules</code> array in your <code>webpack.config</code>
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
{
|
|
70
|
+
test: /@?(seeqdev).*\.(ts|js)x?$/,
|
|
71
|
+
loader:'babel-loader'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
|
75
|
+
type: 'asset/resource',
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If you're using webpack + scss be sure to include a <code>~</code> as part of the css import path:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
@import '~@seeqdev/qomponents/dist/styles.css';
|
|
83
|
+
@import '~@fortawesome/fontawesome-free/css/all.css';
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
<h3>2) How do I get my Button to be green?</h3>
|
|
87
|
+
|
|
88
|
+
The colors of your qomponents are controlled by the "theme". </br>
|
|
89
|
+
If you do not provide a theme your qomponents will use the default blue or also known as Topic-based theme.
|
|
90
|
+
Themes are applied by adding the class of the desired theme to a wrapper of your application. The theme class can
|
|
91
|
+
also be applied to the body tag.
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
|
|
95
|
+
<div class="color_analysis">
|
|
96
|
+
... your application here
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
There are 3 themes available:
|
|
102
|
+
|
|
103
|
+
| Theme | Color | Class | Example |
|
|
104
|
+
|:---------|:-------|:---------------|:-----------------------|
|
|
105
|
+
| Topic | blue | color_topic | class="color_topic" |
|
|
106
|
+
| Analysis | green | color_analysis | class="color_analysis" |
|
|
107
|
+
| DataLab | orange | color_datalab | class="color_datalab" |
|
|
108
|
+
|
|
109
|
+
<h3>3) How do I use Fontawesome Icons?</h3>
|
|
110
|
+
Before you can use Fontawesome icons you must install FontAwesome.
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
npm install --save @fortawesome/fontawesome-free
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Once it's installed simply import the required css files. To import all variations of FontAwesome's Icons you can
|
|
117
|
+
add the following import to your main css file:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
@import "@fortawesome/fontawesome-free/css/all.css";
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
If your project only uses Classic Solid or (Sharp Solids, or any other one kind) it's better to import only the
|
|
124
|
+
required css for that Icon type to keep your packages size small.<br/> Note: if you don't import "all" like shown above
|
|
125
|
+
be sure to include <code>fontawesome.css</code> in addition to whatever Icon style you require.
|
|
126
|
+
|
|
127
|
+
For Example:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
@import "@fortawesome/fontawesome-free/css/fontawesome.css";
|
|
131
|
+
@import "@fortawesome/fontawesome-free/css/solid.css";
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
<h3>4) How can I see all the props that are available?</h3>
|
|
135
|
+
Take a look at the <code>.types.d.ts</code> files that can be found in the <code>dist/{component name}/</code>
|
|
136
136
|
folder. This file contains all available properties including some descriptive text that tells you more about them.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
};
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const AllButtonVariants: () =>
|
|
7
|
-
export declare const ButtonWithTooltip: () =>
|
|
8
|
-
export declare const ButtonWithIcon: () =>
|
|
9
|
-
export declare const DisabledButton: () =>
|
|
5
|
+
export declare const AllButtonVariants: () => JSX.Element;
|
|
6
|
+
export declare const ButtonWithTooltip: () => JSX.Element;
|
|
7
|
+
export declare const ButtonWithIcon: () => JSX.Element;
|
|
8
|
+
export declare const DisabledButton: () => JSX.Element;
|
|
@@ -13,7 +13,7 @@ export interface ButtonProps {
|
|
|
13
13
|
/** function to call when clicking the button (takes no parameters) */
|
|
14
14
|
onClick?: (e: React.MouseEvent) => void;
|
|
15
15
|
/** label translation key on the button (i.e. SUBMIT) */
|
|
16
|
-
label?: string |
|
|
16
|
+
label?: string | JSX.Element | React.ReactNode;
|
|
17
17
|
variant?: ButtonVariant;
|
|
18
18
|
/** type of button (i.e button/submit/reset, default is button) */
|
|
19
19
|
type?: ButtonType;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
3
2
|
export declare const iconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success"];
|
|
4
3
|
export type IconType = (typeof iconTypes)[number];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
};
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const AllProgressBars: () =>
|
|
5
|
+
export declare const AllProgressBars: () => JSX.Element;
|
|
6
|
+
export declare const WaveAnimationShowcase: () => JSX.Element;
|
|
7
|
+
export declare const HeightCustomizationShowcase: () => JSX.Element;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
2
|
+
/**
|
|
3
|
+
* Animation types for progress indicators
|
|
4
|
+
*/
|
|
5
|
+
export type ProgressAnimationType = 'default' | 'wave' | 'none';
|
|
2
6
|
/**
|
|
3
7
|
* The ProgressBar component displays a visual representation of a progress value.
|
|
4
8
|
*/
|
|
@@ -15,6 +19,8 @@ export interface ProgressIndicatorProps extends TooltipComponentProps {
|
|
|
15
19
|
label?: string;
|
|
16
20
|
/** Additional classes to apply to the label. */
|
|
17
21
|
labelClasses?: string;
|
|
22
|
+
/** Animation type for the progress indicator */
|
|
23
|
+
animationType?: ProgressAnimationType;
|
|
18
24
|
}
|
|
19
25
|
export interface ProgressBarProps {
|
|
20
26
|
/** The indicator values */
|
|
@@ -23,8 +29,12 @@ export interface ProgressBarProps {
|
|
|
23
29
|
max?: number;
|
|
24
30
|
/** Additional classes to apply to the progress bar container. */
|
|
25
31
|
containerExtraClasses?: string;
|
|
32
|
+
/** Additional classes to apply to the progress bar for styling (including height). */
|
|
33
|
+
extraClassNames?: string;
|
|
26
34
|
/** The test id for the progress bar. */
|
|
27
35
|
testId?: string;
|
|
28
36
|
/** The label to display when the progress bar has a value of zero. */
|
|
29
37
|
zeroValueLabel?: string;
|
|
38
|
+
/** Animation type for all progress indicators (can be overridden per indicator) */
|
|
39
|
+
animationType?: ProgressAnimationType;
|
|
30
40
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
3
2
|
export declare const svgIconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success", "default"];
|
|
4
3
|
export type SvgIconType = (typeof svgIconTypes)[number];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface TabsProps {
|
|
3
2
|
extraClassNames?: string;
|
|
4
3
|
defaultActiveTab?: string;
|
|
@@ -11,7 +10,7 @@ export interface TabsProps {
|
|
|
11
10
|
tabs: {
|
|
12
11
|
label: string;
|
|
13
12
|
id: string;
|
|
14
|
-
content:
|
|
13
|
+
content: JSX.Element;
|
|
15
14
|
icon?: string;
|
|
16
15
|
testId?: string;
|
|
17
16
|
tabExtraClassNames?: string;
|