@seeqdev/qomponents 0.0.154 → 0.0.155-react-19-v2
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 +2 -1
- package/dist/Alert/Alert.stories.d.ts +2 -1
- package/dist/Alert/Alert.types.d.ts +1 -0
- package/dist/Button/Button.stories.d.ts +5 -4
- package/dist/Button/Button.types.d.ts +1 -1
- package/dist/ButtonGroup/ButtonGroup.stories.d.ts +2 -1
- package/dist/ButtonGroup/ButtonGroup.types.d.ts +1 -0
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +2 -1
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +1 -0
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +2 -1
- package/dist/Carousel/Carousel.stories.d.ts +2 -1
- package/dist/Carousel/Carousel.types.d.ts +1 -0
- package/dist/Checkbox/Checkbox.stories.d.ts +2 -1
- package/dist/Checkbox/Checkbox.types.d.ts +1 -0
- package/dist/Collapse/Collapse.stories.d.ts +2 -1
- package/dist/Collapse/Collapse.types.d.ts +1 -0
- package/dist/Icon/Icon.stories.d.ts +2 -1
- package/dist/Icon/Icon.types.d.ts +1 -0
- package/dist/InputGroup/InputGroup.stories.d.ts +2 -1
- package/dist/InputGroup/InputGroup.types.d.ts +1 -0
- package/dist/ProgressBar/ProgressBar.stories.d.ts +2 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +2 -1
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +1 -0
- package/dist/Select/Select.stories.d.ts +2 -1
- package/dist/Slider/Slider.stories.d.ts +2 -1
- package/dist/Slider/Slider.types.d.ts +1 -0
- package/dist/SvgIcon/SvgIcon.stories.d.ts +2 -1
- package/dist/SvgIcon/SvgIcon.types.d.ts +1 -0
- package/dist/Tabs/Tabs.stories.d.ts +2 -1
- package/dist/Tabs/Tabs.types.d.ts +2 -1
- package/dist/TextArea/TextArea.stories.d.ts +2 -1
- package/dist/TextArea/TextArea.types.d.ts +1 -0
- package/dist/TextField/TextField.stories.d.ts +2 -1
- package/dist/TextField/TextField.types.d.ts +1 -0
- package/dist/ToolbarButton/ToolbarButton.stories.d.ts +2 -1
- package/dist/Tooltip/QTip.stories.d.ts +2 -1
- package/dist/Tooltip/QTipPerformance.stories.d.ts +2 -1
- package/dist/Tooltip/Tooltip.stories.d.ts +2 -1
- package/dist/Tooltip/Tooltip.types.d.ts +3 -2
- package/dist/Tooltip/TooltipPerformance.stories.d.ts +2 -1
- package/dist/example/.eslintrc.cjs +14 -14
- package/dist/example/README.md +33 -33
- package/dist/example/index.html +13 -13
- package/dist/example/package.json +30 -30
- package/dist/example/src/ComplexSelectExample.tsx +81 -81
- package/dist/example/src/Example.tsx +408 -408
- package/dist/example/src/index.css +102 -102
- package/dist/example/src/main.tsx +10 -10
- package/dist/example/src/vite-env.d.ts +1 -1
- package/dist/example/tsconfig.json +33 -33
- package/dist/example/tsconfig.node.json +12 -12
- package/dist/example/vite.config.ts +12 -12
- package/dist/index.esm.js +14409 -7954
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14449 -7994
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3819 -3819
- package/package.json +90 -88
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,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
title: string;
|
|
3
4
|
};
|
|
4
5
|
export default _default;
|
|
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;
|
|
6
|
+
export declare const AllButtonVariants: () => React.JSX.Element;
|
|
7
|
+
export declare const ButtonWithTooltip: () => React.JSX.Element;
|
|
8
|
+
export declare const ButtonWithIcon: () => React.JSX.Element;
|
|
9
|
+
export declare const DisabledButton: () => React.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 | JSX.Element | React.ReactNode;
|
|
16
|
+
label?: string | React.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,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
2
3
|
export declare const iconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success"];
|
|
3
4
|
export type IconType = (typeof iconTypes)[number];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
2
3
|
export declare const svgIconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success", "default"];
|
|
3
4
|
export type SvgIconType = (typeof svgIconTypes)[number];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface TabsProps {
|
|
2
3
|
extraClassNames?: string;
|
|
3
4
|
defaultActiveTab?: string;
|
|
@@ -10,7 +11,7 @@ export interface TabsProps {
|
|
|
10
11
|
tabs: {
|
|
11
12
|
label: string;
|
|
12
13
|
id: string;
|
|
13
|
-
content: JSX.Element;
|
|
14
|
+
content: React.JSX.Element;
|
|
14
15
|
icon?: string;
|
|
15
16
|
testId?: string;
|
|
16
17
|
tabExtraClassNames?: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export declare const DEFAULT_TOOL_TIP_DELAY = 500;
|
|
2
2
|
export declare const tooltipPositions: readonly ["top", "left", "right", "bottom"];
|
|
3
|
+
import React from 'react';
|
|
3
4
|
export type TooltipPosition = (typeof tooltipPositions)[number];
|
|
4
5
|
export interface TooltipProps {
|
|
5
6
|
position?: TooltipPosition;
|
|
6
|
-
children?: JSX.Element | string;
|
|
7
|
-
text: JSX.Element | string;
|
|
7
|
+
children?: React.JSX.Element | string;
|
|
8
|
+
text: React.JSX.Element | string;
|
|
8
9
|
delay?: number;
|
|
9
10
|
}
|
|
10
11
|
export interface TooltipComponentProps {
|