@taikai/rocket-kit 2.0.0-beta.8 → 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/button/types.d.ts +1 -1
- package/dist/atoms/file-picker/index.d.ts +17 -0
- package/dist/atoms/file-picker/stories/file-picker.stories.d.ts +23 -0
- package/dist/atoms/file-picker/styles.d.ts +7 -0
- 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/atoms/tag/types.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/ions/variables.d.ts +1 -0
- package/dist/rocket-kit.cjs.development.js +430 -244
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +292 -200
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +430 -245
- 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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare type ButtonVariant = 'solid' | 'outline' | 'text';
|
|
2
|
-
export declare type ButtonColor = 'green' | 'orange' | 'red' | 'grey' | 'purple' | 'white' | 'dark' | 'magic' | 'pulse';
|
|
2
|
+
export declare type ButtonColor = 'green' | 'orange' | 'red' | 'grey' | 'purple' | 'white' | 'dark' | 'blue' | 'magic' | 'pulse';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FilePickerProps {
|
|
3
|
+
minimal?: boolean;
|
|
4
|
+
name: string;
|
|
5
|
+
accept?: string;
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
pluralText?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
value?: string;
|
|
13
|
+
buttonText?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const FilePicker: (props: FilePickerProps) => JSX.Element;
|
|
17
|
+
export default FilePicker;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilePickerProps } from '..';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: FilePickerProps) => JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const FilePickerComponent: {
|
|
9
|
+
(args: FilePickerProps): JSX.Element;
|
|
10
|
+
story: {
|
|
11
|
+
name: string;
|
|
12
|
+
args: {
|
|
13
|
+
minimal: boolean;
|
|
14
|
+
multiple: boolean;
|
|
15
|
+
name: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
pluralText: string;
|
|
18
|
+
error: string;
|
|
19
|
+
buttonText: string;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -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 {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare type TagVariant = 'solid' | 'outline';
|
|
2
|
-
export declare type TagColor = 'green' | 'orange' | 'red' | 'grey';
|
|
2
|
+
export declare type TagColor = 'green' | 'orange' | 'red' | 'grey' | 'light';
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { default as Slideshow } from './atoms/slideshow';
|
|
|
20
20
|
export { default as VideoPlayer } from './atoms/video-player';
|
|
21
21
|
export { default as ProgressBar } from './atoms/progress-bar';
|
|
22
22
|
export { default as Toggle } from './atoms/toggle';
|
|
23
|
+
export { default as FilePicker } from './atoms/file-picker';
|
|
23
24
|
export { default as ActionsMenu } from './molecules/actions-menu';
|
|
24
25
|
export { default as CardValue } from './molecules/card-value';
|
|
25
26
|
export { default as EmptyTable } from './molecules/empty-table';
|