@seeqdev/qomponents 0.0.115 → 0.0.116

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 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.
@@ -0,0 +1,20 @@
1
+ import React, { useRef, useEffect, useState } from 'react';
2
+ import { animated, useSpring } from '@react-spring/web';
3
+ const Collapse = ({ isVisible, children }) => {
4
+ const contentRef = useRef(null);
5
+ const [contentHeight, setContentHeight] = useState(0);
6
+ useEffect(() => {
7
+ if (contentRef.current) {
8
+ setContentHeight(contentRef.current?.scrollHeight);
9
+ }
10
+ }, [children]);
11
+ const styles = useSpring({
12
+ opacity: isVisible ? 1 : 0,
13
+ height: isVisible ? contentHeight : 0,
14
+ y: isVisible ? 0 : 24,
15
+ });
16
+ return (React.createElement(animated.div, { style: styles },
17
+ React.createElement("div", { ref: contentRef }, children)));
18
+ };
19
+ export default Collapse;
20
+ //# sourceMappingURL=Collapse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collapse.js","sourceRoot":"","sources":["../../src/Collapse/Collapse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,QAAQ,GAA2C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnF,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,gBAAgB,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;SACpD;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,MAAM,GAAG,SAAS,CAAC;QACvB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;KACtB,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,QAAQ,CAAC,GAAG,IAAC,KAAK,EAAE,MAAM;QACzB,6BAAK,GAAG,EAAE,UAAU,IAAG,QAAQ,CAAO,CACzB,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import Collapse from './Collapse';
3
+ import { QTip } from '../Tooltip';
4
+ import Button from '../Button';
5
+ export default {
6
+ title: 'Collapse',
7
+ };
8
+ export const AllCollapses = () => {
9
+ const [isVisible, setIsVisible] = React.useState(true);
10
+ const renderChild = () => (React.createElement("div", { className: "tw-text-sq-color-gray dark:tw-text-sq-white" },
11
+ React.createElement("p", { className: "tw-mb-5 tw-text-[15px] tw-leading-normal" }, "This is a content to be shown when the collapse is visible. Clice the button above to toggle it"),
12
+ React.createElement(Button, { variant: "outline", label: "Save data" })));
13
+ const renderAllVariations = () => (React.createElement(React.Fragment, null,
14
+ React.createElement("div", { className: "tw-p-4 light" },
15
+ React.createElement("div", { className: "tw-p-4" },
16
+ React.createElement(Button, { variant: "theme", label: "Toggle Collapse", onClick: () => setIsVisible(!isVisible) }),
17
+ React.createElement(Collapse, { isVisible: isVisible }, renderChild()))),
18
+ React.createElement("div", { className: "tw-p-4 tw-dark tw-bg-sq-dark-background" },
19
+ React.createElement("div", { className: "tw-p-4" },
20
+ React.createElement(Button, { variant: "theme", label: "Toggle Collapse", onClick: () => setIsVisible(!isVisible) }),
21
+ React.createElement(Collapse, { isVisible: isVisible }, renderChild())))));
22
+ return (React.createElement("div", { className: "tw-grid tw-grid-cols-4 tw-gap-4" },
23
+ React.createElement(QTip, null),
24
+ React.createElement("div", { className: "color_topic" },
25
+ React.createElement("b", null, "Topic Colors"),
26
+ renderAllVariations()),
27
+ React.createElement("div", { className: "color_analysis" },
28
+ React.createElement("b", null, "Analysis Colors"),
29
+ renderAllVariations()),
30
+ React.createElement("div", { className: "color_datalab" },
31
+ React.createElement("b", null, "Datalab Colors"),
32
+ renderAllVariations()),
33
+ React.createElement("div", { className: "color_vantage" },
34
+ React.createElement("b", null, "Vantage Colors"),
35
+ renderAllVariations())));
36
+ };
37
+ //# sourceMappingURL=Collapse.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collapse.stories.js","sourceRoot":"","sources":["../../src/Collapse/Collapse.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,eAAe;IACb,KAAK,EAAE,UAAU;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEvD,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CACxB,6BAAK,SAAS,EAAC,6CAA6C;QAC1D,2BAAG,SAAS,EAAC,0CAA0C,sGAEnD;QACJ,oBAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,WAAW,GAAG,CAC1C,CACP,CAAC;IACF,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,CAChC;QACE,6BAAK,SAAS,EAAC,cAAc;YAC3B,6BAAK,SAAS,EAAC,QAAQ;gBACrB,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAI;gBAC3F,oBAAC,QAAQ,IAAC,SAAS,EAAE,SAAS,IAAG,WAAW,EAAE,CAAY,CACtD,CACF;QAEN,6BAAK,SAAS,EAAC,yCAAyC;YACtD,6BAAK,SAAS,EAAC,QAAQ;gBACrB,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAI;gBAC3F,oBAAC,QAAQ,IAAC,SAAS,EAAE,SAAS,IAAG,WAAW,EAAE,CAAY,CACtD,CACF,CACL,CACJ,CAAC;IACF,OAAO,CACL,6BAAK,SAAS,EAAC,iCAAiC;QAC9C,oBAAC,IAAI,OAAG;QACR,6BAAK,SAAS,EAAC,aAAa;YAC1B,8CAAmB;YAClB,mBAAmB,EAAE,CAClB;QAEN,6BAAK,SAAS,EAAC,gBAAgB;YAC7B,iDAAsB;YACrB,mBAAmB,EAAE,CAClB;QAEN,6BAAK,SAAS,EAAC,eAAe;YAC5B,gDAAqB;YACpB,mBAAmB,EAAE,CAClB;QAEN,6BAAK,SAAS,EAAC,eAAe;YAC5B,gDAAqB;YACpB,mBAAmB,EAAE,CAClB,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import '@testing-library/jest-dom';
4
+ import Collapse from './Collapse';
5
+ describe('Collapse component', () => {
6
+ test('renders children when visible', () => {
7
+ render(React.createElement(Collapse, { isVisible: true },
8
+ React.createElement("div", { "data-testid": "content" }, "Content")));
9
+ expect(screen.getByTestId('content')).toBeVisible();
10
+ });
11
+ test('does not render children when not visible', () => {
12
+ render(React.createElement(Collapse, { isVisible: false },
13
+ React.createElement("div", { "data-testid": "content" }, "Content")));
14
+ expect(screen.queryByTestId('content')).not.toBeVisible();
15
+ });
16
+ test('applies correct styles when not visible', () => {
17
+ render(React.createElement(Collapse, { isVisible: false },
18
+ React.createElement("div", { "data-testid": "content" }, "Content")));
19
+ const animatedDiv = screen.getByTestId('content').parentElement?.parentElement;
20
+ expect(animatedDiv).toHaveStyle('opacity: 0');
21
+ expect(animatedDiv).toHaveStyle('height: 0');
22
+ });
23
+ });
24
+ //# sourceMappingURL=Collapse.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collapse.test.js","sourceRoot":"","sources":["../../src/Collapse/Collapse.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,2BAA2B,CAAC;AACnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACzC,MAAM,CACJ,oBAAC,QAAQ,IAAC,SAAS,EAAE,IAAI;YACvB,4CAAiB,SAAS,cAAc,CAC/B,CACZ,CAAC;QAEF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACrD,MAAM,CACJ,oBAAC,QAAQ,IAAC,SAAS,EAAE,KAAK;YACxB,4CAAiB,SAAS,cAAc,CAC/B,CACZ,CAAC;QAEF,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACnD,MAAM,CACJ,oBAAC,QAAQ,IAAC,SAAS,EAAE,KAAK;YACxB,4CAAiB,SAAS,cAAc,CAC/B,CACZ,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC;QAC/E,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Collapse.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collapse.types.js","sourceRoot":"","sources":["../../src/Collapse/Collapse.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { default } from './Collapse';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Collapse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
Binary file
Binary file
@@ -1,12 +1,29 @@
1
- export interface ProgressBarProps {
2
- /** The progress value, between 0 and 100. */
1
+ import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
+ /**
3
+ * The ProgressBar component displays a visual representation of a progress value.
4
+ */
5
+ interface ProgressIndicatorProps extends TooltipComponentProps {
6
+ /** Additional classes to apply to the progress indicator. */
7
+ extraClasses?: string;
8
+ /** The test id for the progress indicator. */
9
+ testId?: string;
10
+ /** The value of the progress indicator, between 0 and max. */
3
11
  value: number;
4
- /** The label to display above the progress bar. */
5
- label: string;
12
+ /** The color of the progress indicator. e.g. #ffffff */
13
+ color?: string;
14
+ /** The label to display on the progress indicator. */
15
+ label?: string;
16
+ /** Additional classes to apply to the label. */
17
+ labelClasses?: string;
18
+ }
19
+ export interface ProgressBarProps {
20
+ /** The indicator values */
21
+ values: ProgressIndicatorProps[];
6
22
  /** The maximum value of the progress bar. */
7
23
  max?: number;
8
- /** Additional classes to apply to the progress bar. */
9
- extraClasses?: string;
24
+ /** Additional classes to apply to the progress bar container. */
25
+ containerExtraClasses?: string;
10
26
  /** The test id for the progress bar. */
11
27
  testId?: string;
12
28
  }
29
+ export {};
@@ -1,14 +1,14 @@
1
- module.exports = {
2
- env: { browser: true, es2020: true },
3
- extends: [
4
- 'eslint:recommended',
5
- 'plugin:@typescript-eslint/recommended',
6
- 'plugin:react-hooks/recommended',
7
- ],
8
- parser: '@typescript-eslint/parser',
9
- parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
10
- plugins: ['react-refresh'],
11
- rules: {
12
- 'react-refresh/only-export-components': 'warn',
13
- },
14
- }
1
+ module.exports = {
2
+ env: { browser: true, es2020: true },
3
+ extends: [
4
+ 'eslint:recommended',
5
+ 'plugin:@typescript-eslint/recommended',
6
+ 'plugin:react-hooks/recommended',
7
+ ],
8
+ parser: '@typescript-eslint/parser',
9
+ parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
10
+ plugins: ['react-refresh'],
11
+ rules: {
12
+ 'react-refresh/only-export-components': 'warn',
13
+ },
14
+ }
@@ -1,33 +1,33 @@
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-form example</h1>
6
-
7
- Time to see qomponents in action!
8
-
9
- This is a simple form example that showcases Seeq's qomponents library.
10
-
11
- This application is built using [vite](https://vitejs.dev/).
12
-
13
- ## Installation
14
-
15
- First, be sure to install all dependencies (React, and qomponents):
16
-
17
- ```sh
18
- npm install
19
- ```
20
-
21
- Once you've installed all dependencies you can start up a dev server and observer any changes you make in real-time:
22
-
23
- ```sh
24
- npm run dev
25
- ```
26
-
27
- ## Tip
28
-
29
- All application code can be found in Example.tsx. Check out the source code to learn how to ensure your
30
- components display using the correct theme (green, blue, orange) as well as the correct mode (light or dark).
31
-
32
-
33
-
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-form example</h1>
6
+
7
+ Time to see qomponents in action!
8
+
9
+ This is a simple form example that showcases Seeq's qomponents library.
10
+
11
+ This application is built using [vite](https://vitejs.dev/).
12
+
13
+ ## Installation
14
+
15
+ First, be sure to install all dependencies (React, and qomponents):
16
+
17
+ ```sh
18
+ npm install
19
+ ```
20
+
21
+ Once you've installed all dependencies you can start up a dev server and observer any changes you make in real-time:
22
+
23
+ ```sh
24
+ npm run dev
25
+ ```
26
+
27
+ ## Tip
28
+
29
+ All application code can be found in Example.tsx. Check out the source code to learn how to ensure your
30
+ components display using the correct theme (green, blue, orange) as well as the correct mode (light or dark).
31
+
32
+
33
+
@@ -1,13 +1,13 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>qomponents form example</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.tsx"></script>
12
- </body>
13
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>qomponents form example</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
+ </html>
@@ -1,30 +1,30 @@
1
- {
2
- "name": "example",
3
- "private": true,
4
- "version": "0.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "dev": "vite",
8
- "build": "tsc && vite build",
9
- "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
- "preview": "vite preview"
11
- },
12
- "dependencies": {
13
- "@fortawesome/fontawesome-free": "^6.4.0",
14
- "@seeqdev/qomponents": "0.0.72",
15
- "react": "^18.2.0",
16
- "react-dom": "^18.2.0"
17
- },
18
- "devDependencies": {
19
- "@types/react": "^18.0.37",
20
- "@types/react-dom": "^18.0.11",
21
- "@typescript-eslint/eslint-plugin": "^5.59.0",
22
- "@typescript-eslint/parser": "^5.59.0",
23
- "@vitejs/plugin-react": "^4.0.0",
24
- "eslint": "^8.38.0",
25
- "eslint-plugin-react-hooks": "^4.6.0",
26
- "eslint-plugin-react-refresh": "^0.3.4",
27
- "typescript": "^5.0.2",
28
- "vite": "^4.3.9"
29
- }
30
- }
1
+ {
2
+ "name": "example",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc && vite build",
9
+ "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "@fortawesome/fontawesome-free": "^6.4.0",
14
+ "@seeqdev/qomponents": "0.0.72",
15
+ "react": "^18.2.0",
16
+ "react-dom": "^18.2.0"
17
+ },
18
+ "devDependencies": {
19
+ "@types/react": "^18.0.37",
20
+ "@types/react-dom": "^18.0.11",
21
+ "@typescript-eslint/eslint-plugin": "^5.59.0",
22
+ "@typescript-eslint/parser": "^5.59.0",
23
+ "@vitejs/plugin-react": "^4.0.0",
24
+ "eslint": "^8.38.0",
25
+ "eslint-plugin-react-hooks": "^4.6.0",
26
+ "eslint-plugin-react-refresh": "^0.3.4",
27
+ "typescript": "^5.0.2",
28
+ "vite": "^4.3.9"
29
+ }
30
+ }