@taikai/rocket-kit 2.0.0 → 2.0.1
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 +12 -5
- package/dist/atoms/select-interactive/components/index.d.ts +6 -0
- package/dist/atoms/select-interactive/index.d.ts +2 -1
- package/dist/atoms/select-interactive/stories/select-interactive.stories.d.ts +9 -9
- package/dist/atoms/select-interactive/styles.d.ts +1 -0
- package/dist/atoms/select-interactive/types.d.ts +34 -0
- package/dist/rocket-kit.cjs.development.js +109 -80
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +165 -152
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +109 -80
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,6 +114,13 @@ netlify init
|
|
|
114
114
|
# pick yes for netlify.toml
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
## Compiling Locally
|
|
118
|
+
When it is published or compiled locally, it allows to rapidly test the design system as would the final developer
|
|
119
|
+
|
|
120
|
+
* Change the `package.json` version property. For instance, if the version is currently at `2.0.0-beta.10`, change it to `2.0.0-beta.11`
|
|
121
|
+
* Run the command `npm run pack`, and you will find a file with the name `taikai-taikai-design-system-2.0.0-beta.11.tgz` at the root of your project. Copy the filepath of this file and move to the next step
|
|
122
|
+
* Now, in one of your separated projects, run `npm i [filepath-copied-above]`
|
|
123
|
+
|
|
117
124
|
## Publishing to Github Package Registry
|
|
118
125
|
|
|
119
126
|
We are using [np](https://github.com/sindresorhus/np)
|
|
@@ -122,14 +129,14 @@ We are using [np](https://github.com/sindresorhus/np)
|
|
|
122
129
|
npm install --global np
|
|
123
130
|
```
|
|
124
131
|
|
|
125
|
-
### Get Github Personnal Access Token
|
|
132
|
+
### Get Github Personnal Access Token
|
|
126
133
|
|
|
127
|
-
Follow this guide:
|
|
128
|
-
https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
|
|
134
|
+
Follow this guide:
|
|
135
|
+
https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
|
|
129
136
|
|
|
130
|
-
you need the following scopes (read:packages, write:packages, delete:packages, repo).
|
|
137
|
+
you need the following scopes (read:packages, write:packages, delete:packages, repo).
|
|
131
138
|
|
|
132
|
-
Once you get the TOKEN, you can login:
|
|
139
|
+
Once you get the TOKEN, you can login:
|
|
133
140
|
|
|
134
141
|
```
|
|
135
142
|
$ npm login --scope=@OWNER --registry=https://npm.pkg.github.com
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TCustomOptions, TOptions } from '../types';
|
|
3
|
+
import { formatGroupLabel } from 'react-select/src/builtins';
|
|
4
|
+
export declare const FormatGroupLabel: formatGroupLabel<TOptions>;
|
|
5
|
+
export declare const CustomSelectOption: (props: TCustomOptions, commonProps: any) => JSX.Element;
|
|
6
|
+
export declare const CustomSelectValue: (props: TCustomOptions) => JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { SelectInteractiveProps, TSelectInteractiveOption } from './types';
|
|
3
|
+
declare const SelectInteractive: ({ name, multi, search, placeholder, options, value, clear, error, disabled, formatGroupLabel, onChange, onInputChange, ...rest }: SelectInteractiveProps<TSelectInteractiveOption>) => JSX.Element;
|
|
3
4
|
export default SelectInteractive;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { SelectInteractiveProps, TSelectInteractiveOption } from '../types';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
|
-
component: (
|
|
5
|
+
component: ({ name, multi, search, placeholder, options, value, clear, error, disabled, formatGroupLabel, onChange, onInputChange, ...rest }: SelectInteractiveProps<TSelectInteractiveOption>) => JSX.Element;
|
|
5
6
|
argTypes: {
|
|
6
7
|
multi: {
|
|
7
8
|
control: {
|
|
@@ -16,13 +17,8 @@ declare const _default: {
|
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
19
|
export default _default;
|
|
19
|
-
interface SelectInteractiveProps {
|
|
20
|
-
multi: boolean;
|
|
21
|
-
search: boolean;
|
|
22
|
-
placeholder: string;
|
|
23
|
-
}
|
|
24
20
|
export declare const SelectInteractiveSimpleComponent: {
|
|
25
|
-
(args: SelectInteractiveProps): JSX.Element;
|
|
21
|
+
(args: SelectInteractiveProps<TSelectInteractiveOption>): JSX.Element;
|
|
26
22
|
storyName: string;
|
|
27
23
|
args: {
|
|
28
24
|
multi: boolean;
|
|
@@ -30,8 +26,12 @@ export declare const SelectInteractiveSimpleComponent: {
|
|
|
30
26
|
placeholder: string;
|
|
31
27
|
};
|
|
32
28
|
};
|
|
29
|
+
export declare const SelectInteractiveFormatedGroupedOptionsComponent: {
|
|
30
|
+
(args: SelectInteractiveProps<TSelectInteractiveOption>): JSX.Element;
|
|
31
|
+
storyName: string;
|
|
32
|
+
};
|
|
33
33
|
export declare const SelectInteractiveIconsComponent: {
|
|
34
|
-
(args: SelectInteractiveProps): JSX.Element;
|
|
34
|
+
(args: SelectInteractiveProps<TSelectInteractiveOption>): JSX.Element;
|
|
35
35
|
storyName: string;
|
|
36
36
|
args: {
|
|
37
37
|
multi: boolean;
|
|
@@ -40,7 +40,7 @@ export declare const SelectInteractiveIconsComponent: {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
export declare const SelectInteractiveCustomComponent: {
|
|
43
|
-
(args: SelectInteractiveProps): JSX.Element;
|
|
43
|
+
(args: SelectInteractiveProps<TSelectInteractiveOption>): JSX.Element;
|
|
44
44
|
storyName: string;
|
|
45
45
|
args: {
|
|
46
46
|
multi: boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { MapHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { NamedProps } from 'react-select/src/Select';
|
|
3
|
+
export interface TSelectInteractiveOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
[k: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface TOptions extends TSelectInteractiveOption {
|
|
9
|
+
icon?: string;
|
|
10
|
+
customImage?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface TCustomOptions {
|
|
13
|
+
data: TOptions;
|
|
14
|
+
}
|
|
15
|
+
export interface OptionsGroup<T extends TSelectInteractiveOption> {
|
|
16
|
+
label: string;
|
|
17
|
+
options: ReadonlyArray<T>;
|
|
18
|
+
}
|
|
19
|
+
declare type TDivElement = Omit<MapHTMLAttributes<HTMLDivElement>, 'onChange' | 'placeholder'>;
|
|
20
|
+
declare type Options = TSelectInteractiveOption | ReadonlyArray<TSelectInteractiveOption>;
|
|
21
|
+
export interface SelectInteractiveProps<T extends Options> extends TDivElement, Pick<NamedProps<T>, 'onInputChange'> {
|
|
22
|
+
name?: string;
|
|
23
|
+
error?: string;
|
|
24
|
+
clear?: boolean;
|
|
25
|
+
multi?: boolean;
|
|
26
|
+
search?: boolean;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
placeholder?: ReactNode;
|
|
29
|
+
formatGroupLabel?: boolean;
|
|
30
|
+
value?: ReadonlyArray<TOptions> | TOptions | null | undefined;
|
|
31
|
+
onChange: (values: Array<TOptions> | TOptions) => void;
|
|
32
|
+
options: ReadonlyArray<TOptions | OptionsGroup<TOptions>>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|