pollination-react-io 1.7.2 → 1.8.2
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 +17 -0
- package/build/ComboFileSelector/ComboFileSelector.d.ts +4 -0
- package/build/ComboFileSelector/ComboFileSelector.types.d.ts +10 -0
- package/build/CreateStudy/CreateStudy.d.ts +1 -1
- package/build/RecipeInputsForm/RecipeInputsForm.d.ts +1 -0
- package/build/RecipeInputsForm/RecipeInputsForm.types.d.ts +4 -3
- package/build/atoms/Button/Button.d.ts +2 -1
- package/build/atoms/ComboBox/ComboBox.d.ts +1 -0
- package/build/atoms/Dropdown/Dropdown.d.ts +1 -0
- package/build/atoms/FileInput/FileInput.d.ts +1 -0
- package/build/atoms/RadioList/RadioList.d.ts +1 -0
- package/build/atoms/SettingsButton/index.d.ts +1 -0
- package/build/atoms/TextInput/TextInput.d.ts +1 -0
- package/build/atoms/Tooltip/index.d.ts +1 -0
- package/build/hooks/useAPIClient.d.ts +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.esm.js +1029 -389
- package/build/index.esm.js.map +1 -1
- package/build/index.js +1029 -388
- package/build/index.js.map +1 -1
- package/package.json +10 -6
- package/build/variables.css +0 -12
package/README.md
CHANGED
|
@@ -75,6 +75,22 @@ which will install the local component library as a dependency in `test-app`. It
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
Your components can then be imported and used in that project.
|
|
78
|
+
### Using Component Library SASS Variables
|
|
79
|
+
|
|
80
|
+
I've found that it's helpful to export SASS variables to projects consuming the library. As such, I've added the `rollup-plugin-copy` NPM package and used it to copy the [`src/typography.scss`](src/typography.scss) and [`variables.scss`](src/variables.scss) into the `build` directory as part of the Rollup bundle process. This allows you to use these variables in your projects consuming the component library.
|
|
81
|
+
|
|
82
|
+
For example, let's say you installed `harvey-component-library` into your project. To use the exported variables/mixins, in a SASS file you would do the following:
|
|
83
|
+
|
|
84
|
+
```Sass
|
|
85
|
+
@import '~harvey-component-library/build/typography';
|
|
86
|
+
|
|
87
|
+
.example-container {
|
|
88
|
+
@include heading;
|
|
89
|
+
|
|
90
|
+
color: $harvey-white;
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
78
94
|
## Additional Help
|
|
79
95
|
|
|
80
96
|
### Dark Mode
|
|
@@ -89,6 +105,7 @@ Read https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-schem
|
|
|
89
105
|
[Built with react-component-library](https://blog.harveydelaney.com/creating-your-own-react-component-library/)
|
|
90
106
|
|
|
91
107
|
- [Rollup](https://github.com/rollup/rollup)
|
|
108
|
+
- [Sass](https://sass-lang.com/)
|
|
92
109
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
93
110
|
- [Storybook](https://storybook.js.org/)
|
|
94
111
|
- [Jest](https://jestjs.io/) and [React Testing Library](https://github.com/testing-library/react-testing-library)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLProps } from 'react';
|
|
2
|
+
import { APIClient } from '../hooks';
|
|
3
|
+
export interface ComboFileSelectorProps {
|
|
4
|
+
projectOwner?: string;
|
|
5
|
+
projectName?: string;
|
|
6
|
+
defaultOption?: 'get_model' | 'get_file' | 'get_cloud';
|
|
7
|
+
onChange?: (...any: any) => void;
|
|
8
|
+
client: APIClient;
|
|
9
|
+
inputProps?: HTMLProps<HTMLInputElement>;
|
|
10
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { RecipeInterface } from '@pollination-solutions/pollination-sdk';
|
|
2
|
-
import {
|
|
3
|
-
import { Message } from '../hooks';
|
|
2
|
+
import { APIClient, Message } from '../hooks';
|
|
4
3
|
export interface RecipeInputsFormProps {
|
|
5
4
|
recipe: RecipeInterface;
|
|
6
5
|
onSubmit?: (data: any) => Promise<void> | Promise<Message> | void;
|
|
7
6
|
disabled?: boolean;
|
|
8
|
-
|
|
7
|
+
projectOwner?: string;
|
|
8
|
+
projectName?: string;
|
|
9
|
+
client?: APIClient;
|
|
9
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import 'react-perfect-scrollbar/dist/css/styles.css';
|
|
3
3
|
import { ComboBoxProps } from './ComboBox.types';
|
|
4
|
+
import './ComboBox.scss';
|
|
4
5
|
export declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps>;
|
|
5
6
|
export default ComboBox;
|
|
@@ -22,7 +22,7 @@ export declare class APIClient {
|
|
|
22
22
|
constructor(props: ConfigurationParameters);
|
|
23
23
|
private init;
|
|
24
24
|
/** Overwrite current configuration and re-create all api clients. */
|
|
25
|
-
configure(
|
|
25
|
+
configure(config: Partial<ConfigurationParameters>): void;
|
|
26
26
|
}
|
|
27
27
|
export declare const useAPIClient: (config?: ConfigurationParameters) => {
|
|
28
28
|
client: React.MutableRefObject<APIClient>;
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './hooks';
|
|
2
2
|
export * from './AuthUser/AuthUser';
|
|
3
3
|
export * from './CreateStudy/CreateStudy';
|
|
4
|
+
export * from './ComboFileSelector/ComboFileSelector';
|
|
4
5
|
export * from './GetGeometry/GetGeometry';
|
|
5
6
|
export * from './GetModel/GetModel';
|
|
6
7
|
export * from './RunCommand/RunCommand';
|