@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.
Files changed (59) hide show
  1. package/README.md +135 -135
  2. package/dist/Accordion/Accordion.stories.d.ts +2 -1
  3. package/dist/Alert/Alert.stories.d.ts +2 -1
  4. package/dist/Alert/Alert.types.d.ts +1 -0
  5. package/dist/Button/Button.stories.d.ts +5 -4
  6. package/dist/Button/Button.types.d.ts +1 -1
  7. package/dist/ButtonGroup/ButtonGroup.stories.d.ts +2 -1
  8. package/dist/ButtonGroup/ButtonGroup.types.d.ts +1 -0
  9. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +2 -1
  10. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +1 -0
  11. package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +2 -1
  12. package/dist/Carousel/Carousel.stories.d.ts +2 -1
  13. package/dist/Carousel/Carousel.types.d.ts +1 -0
  14. package/dist/Checkbox/Checkbox.stories.d.ts +2 -1
  15. package/dist/Checkbox/Checkbox.types.d.ts +1 -0
  16. package/dist/Collapse/Collapse.stories.d.ts +2 -1
  17. package/dist/Collapse/Collapse.types.d.ts +1 -0
  18. package/dist/Icon/Icon.stories.d.ts +2 -1
  19. package/dist/Icon/Icon.types.d.ts +1 -0
  20. package/dist/InputGroup/InputGroup.stories.d.ts +2 -1
  21. package/dist/InputGroup/InputGroup.types.d.ts +1 -0
  22. package/dist/ProgressBar/ProgressBar.stories.d.ts +2 -1
  23. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +2 -1
  24. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +1 -0
  25. package/dist/Select/Select.stories.d.ts +2 -1
  26. package/dist/Slider/Slider.stories.d.ts +2 -1
  27. package/dist/Slider/Slider.types.d.ts +1 -0
  28. package/dist/SvgIcon/SvgIcon.stories.d.ts +2 -1
  29. package/dist/SvgIcon/SvgIcon.types.d.ts +1 -0
  30. package/dist/Tabs/Tabs.stories.d.ts +2 -1
  31. package/dist/Tabs/Tabs.types.d.ts +2 -1
  32. package/dist/TextArea/TextArea.stories.d.ts +2 -1
  33. package/dist/TextArea/TextArea.types.d.ts +1 -0
  34. package/dist/TextField/TextField.stories.d.ts +2 -1
  35. package/dist/TextField/TextField.types.d.ts +1 -0
  36. package/dist/ToolbarButton/ToolbarButton.stories.d.ts +2 -1
  37. package/dist/Tooltip/QTip.stories.d.ts +2 -1
  38. package/dist/Tooltip/QTipPerformance.stories.d.ts +2 -1
  39. package/dist/Tooltip/Tooltip.stories.d.ts +2 -1
  40. package/dist/Tooltip/Tooltip.types.d.ts +3 -2
  41. package/dist/Tooltip/TooltipPerformance.stories.d.ts +2 -1
  42. package/dist/example/.eslintrc.cjs +14 -14
  43. package/dist/example/README.md +33 -33
  44. package/dist/example/index.html +13 -13
  45. package/dist/example/package.json +30 -30
  46. package/dist/example/src/ComplexSelectExample.tsx +81 -81
  47. package/dist/example/src/Example.tsx +408 -408
  48. package/dist/example/src/index.css +102 -102
  49. package/dist/example/src/main.tsx +10 -10
  50. package/dist/example/src/vite-env.d.ts +1 -1
  51. package/dist/example/tsconfig.json +33 -33
  52. package/dist/example/tsconfig.node.json +12 -12
  53. package/dist/example/vite.config.ts +12 -12
  54. package/dist/index.esm.js +14409 -7954
  55. package/dist/index.esm.js.map +1 -1
  56. package/dist/index.js +14449 -7994
  57. package/dist/index.js.map +1 -1
  58. package/dist/styles.css +3819 -3819
  59. package/package.json +90 -88
@@ -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
+ }
@@ -1,81 +1,81 @@
1
- import React from 'react';
2
- import { Icon, Select } from '@seeqdev/qomponents';
3
-
4
- export interface SelectOption {
5
- id: string;
6
- label: string;
7
- color: string;
8
- asset: string;
9
- type: 'SCALAR' | 'STRING' | 'NUMERIC';
10
- }
11
-
12
- const options: SelectOption[] = [
13
- { id: '1', label: 'Label for the first entry', color: 'pink', asset: 'Asset 1', type: 'NUMERIC' },
14
- { id: '2', label: 'Label for the second entry', color: 'green', asset: 'Asset 2', type: 'SCALAR' },
15
- { id: '3', label: 'Label for the third entry', color: 'orange', asset: 'Asset 3', type: 'STRING' },
16
- ];
17
-
18
- interface ComplexSelectExampleProps {
19
- onChange: (selectedOption: SelectOption) => void;
20
- value: SelectOption | undefined;
21
- }
22
-
23
- function ComplexSelectExample({ onChange, value }: ComplexSelectExampleProps) {
24
- const getIcon = (type: string) => {
25
- switch (type) {
26
- case 'STRING':
27
- return 'fa fa-font';
28
- case 'SCALAR':
29
- return 'fc-scalar';
30
- default:
31
- return 'fc-series';
32
- }
33
- };
34
- /**
35
- * This function formats the select option as desired. You can apply css styling here or use additional qomponents
36
- * to style the select option display.
37
- *
38
- * You can use the same function to format the selected value or use a different one (sometimes having a separate
39
- * function is helpful if you want to limit the space that is taken up by the selected option).
40
- *
41
- * This example shows how to use an additional Icon component (styled in color based on the select option) as well
42
- * as how to display the properties of the select option
43
- */
44
- const getOptionLabel = (optionValue: SelectOption): React.ReactNode => {
45
- return (
46
- <div className="selectOptionWrapperDiv">
47
- <Icon icon={getIcon(optionValue.type)} type="color" color={optionValue.color} extraClassNames="mr-10" />
48
- <div className="selectOptionDiv">
49
- <div className="selectOption">
50
- <strong>{optionValue.label}</strong>
51
- </div>
52
- <div className="selectOptionSubText">{optionValue.asset}</div>
53
- </div>
54
- </div>
55
- );
56
- };
57
- const getOptionValue = (option: SelectOption) => {
58
- return option.id;
59
- };
60
-
61
- return (
62
- // use the getOptionLabel function to provide a custom render function that determines how the select options
63
- // are displayed
64
- // use the getSelectedValueLabel function to provide a custom render function that determines how the selected
65
- // option is displayed
66
- <Select
67
- placeholder="formatted select options"
68
- extraClassNames="formElementWidth"
69
- options={options}
70
- value={value}
71
- getOptionLabel={getOptionLabel}
72
- getOptionValue={getOptionValue}
73
- getSelectedValueLabel={getOptionLabel}
74
- onChange={(selectedOption: SelectOption) => {
75
- onChange(selectedOption);
76
- }}
77
- />
78
- );
79
- }
80
-
81
- export default ComplexSelectExample;
1
+ import React from 'react';
2
+ import { Icon, Select } from '@seeqdev/qomponents';
3
+
4
+ export interface SelectOption {
5
+ id: string;
6
+ label: string;
7
+ color: string;
8
+ asset: string;
9
+ type: 'SCALAR' | 'STRING' | 'NUMERIC';
10
+ }
11
+
12
+ const options: SelectOption[] = [
13
+ { id: '1', label: 'Label for the first entry', color: 'pink', asset: 'Asset 1', type: 'NUMERIC' },
14
+ { id: '2', label: 'Label for the second entry', color: 'green', asset: 'Asset 2', type: 'SCALAR' },
15
+ { id: '3', label: 'Label for the third entry', color: 'orange', asset: 'Asset 3', type: 'STRING' },
16
+ ];
17
+
18
+ interface ComplexSelectExampleProps {
19
+ onChange: (selectedOption: SelectOption) => void;
20
+ value: SelectOption | undefined;
21
+ }
22
+
23
+ function ComplexSelectExample({ onChange, value }: ComplexSelectExampleProps) {
24
+ const getIcon = (type: string) => {
25
+ switch (type) {
26
+ case 'STRING':
27
+ return 'fa fa-font';
28
+ case 'SCALAR':
29
+ return 'fc-scalar';
30
+ default:
31
+ return 'fc-series';
32
+ }
33
+ };
34
+ /**
35
+ * This function formats the select option as desired. You can apply css styling here or use additional qomponents
36
+ * to style the select option display.
37
+ *
38
+ * You can use the same function to format the selected value or use a different one (sometimes having a separate
39
+ * function is helpful if you want to limit the space that is taken up by the selected option).
40
+ *
41
+ * This example shows how to use an additional Icon component (styled in color based on the select option) as well
42
+ * as how to display the properties of the select option
43
+ */
44
+ const getOptionLabel = (optionValue: SelectOption): React.ReactNode => {
45
+ return (
46
+ <div className="selectOptionWrapperDiv">
47
+ <Icon icon={getIcon(optionValue.type)} type="color" color={optionValue.color} extraClassNames="mr-10" />
48
+ <div className="selectOptionDiv">
49
+ <div className="selectOption">
50
+ <strong>{optionValue.label}</strong>
51
+ </div>
52
+ <div className="selectOptionSubText">{optionValue.asset}</div>
53
+ </div>
54
+ </div>
55
+ );
56
+ };
57
+ const getOptionValue = (option: SelectOption) => {
58
+ return option.id;
59
+ };
60
+
61
+ return (
62
+ // use the getOptionLabel function to provide a custom render function that determines how the select options
63
+ // are displayed
64
+ // use the getSelectedValueLabel function to provide a custom render function that determines how the selected
65
+ // option is displayed
66
+ <Select
67
+ placeholder="formatted select options"
68
+ extraClassNames="formElementWidth"
69
+ options={options}
70
+ value={value}
71
+ getOptionLabel={getOptionLabel}
72
+ getOptionValue={getOptionValue}
73
+ getSelectedValueLabel={getOptionLabel}
74
+ onChange={(selectedOption: SelectOption) => {
75
+ onChange(selectedOption);
76
+ }}
77
+ />
78
+ );
79
+ }
80
+
81
+ export default ComplexSelectExample;