@sebgroup/green-react 1.0.0-beta.1 → 1.0.0-beta.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 +51 -1
- package/lib/dropdown/dropdown.d.ts +9 -0
- package/lib/dropdown/hooks.d.ts +19 -0
- package/lib/form/input.d.ts +0 -1
- package/package.json +7 -4
- package/react.esm.js +910 -675
- package/react.umd.js +393 -644
- package/lib/form/buttonGroup.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -2,10 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
> TODO: description
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install \*
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save @sebgroup/green-react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn add @sebgroup/green-react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage \*
|
|
6
16
|
|
|
7
17
|
```
|
|
8
18
|
const greenReact = require('@sebgroup/green-react');
|
|
9
19
|
|
|
10
20
|
// TODO: DEMONSTRATE API
|
|
11
21
|
```
|
|
22
|
+
|
|
23
|
+
### Components
|
|
24
|
+
|
|
25
|
+
View all components in the Storybook
|
|
26
|
+
|
|
27
|
+
## Develop \*
|
|
28
|
+
|
|
29
|
+
1. Clone the monorepo
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
git clone git@github.com:sebgroup/green.git
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
2. Install the dependencies
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd green
|
|
39
|
+
yarn
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
3. Start the Storybook
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
yarn storybook react
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
4. Start the test runner (or make sure your IDE runs the tests continuously)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
yarn test react --watch
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
5. Pick an issue from the board and pull it into `In progress`
|
|
55
|
+
6. Open a Draft PR and reference the Issue
|
|
56
|
+
7. Start coding 🎉 Don't forget:
|
|
57
|
+
1. Test
|
|
58
|
+
2. Code
|
|
59
|
+
3. Refactor
|
|
60
|
+
|
|
61
|
+
## Commands \*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownOption } from '@sebgroup/extract';
|
|
2
|
+
export interface DropdownProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
children?: string;
|
|
5
|
+
options: DropdownOption[];
|
|
6
|
+
loop?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Dropdown: ({ id, options, loop, children }: DropdownProps) => JSX.Element;
|
|
9
|
+
export default Dropdown;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DropdownOption } from '@sebgroup/extract';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
interface HookArgs {
|
|
4
|
+
id?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
options: DropdownOption[];
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare type Props = HTMLAttributes<HTMLElement>;
|
|
10
|
+
interface HookResult {
|
|
11
|
+
togglerProps: Props;
|
|
12
|
+
listboxProps: Props;
|
|
13
|
+
listItems: Props[];
|
|
14
|
+
activate: () => void;
|
|
15
|
+
deactivate: () => void;
|
|
16
|
+
close: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const useDropdown: ({ id, text, options, loop }: HookArgs) => HookResult;
|
|
19
|
+
export {};
|
package/lib/form/input.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CheckboxProps, TextInputProps } from './types';
|
|
3
2
|
export declare const TextInput: ({ label, info, onChangeText, ...props }: TextInputProps<string>) => JSX.Element;
|
|
4
3
|
export declare const EmailInput: ({ label, info, onChangeText, ...props }: TextInputProps<string>) => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^17.0.2",
|
|
6
|
-
"react-dom": "^17.0.2"
|
|
6
|
+
"react-dom": "^17.0.2",
|
|
7
|
+
"rxjs": "^6.6.7",
|
|
8
|
+
"merge": "^2.1.1"
|
|
7
9
|
},
|
|
8
10
|
"dependencies": {
|
|
9
|
-
"@sebgroup/chlorophyll": "
|
|
10
|
-
"@sebgroup/extract": "
|
|
11
|
+
"@sebgroup/chlorophyll": "1.0.0-beta.2",
|
|
12
|
+
"@sebgroup/extract": "1.0.0-beta.2",
|
|
13
|
+
"react-popper": "^2.2.5"
|
|
11
14
|
},
|
|
12
15
|
"description": "React components built on top of @sebgroup/chlorophyll.",
|
|
13
16
|
"repository": {
|