@taikai/rocket-kit 2.0.0-beta.9 → 2.0.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 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,50 @@
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from '..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: (props: ButtonProps) => JSX.Element;
6
+ argTypes: {
7
+ color: {
8
+ control: {
9
+ type: string;
10
+ options: string[];
11
+ };
12
+ };
13
+ variant: {
14
+ control: {
15
+ type: string;
16
+ options: string[];
17
+ };
18
+ };
19
+ icon: {
20
+ control: {
21
+ type: string;
22
+ options: string[];
23
+ };
24
+ };
25
+ iconPosition: {
26
+ control: {
27
+ type: string;
28
+ options: string[];
29
+ };
30
+ };
31
+ };
32
+ };
33
+ export default _default;
34
+ export declare const ButtonComponent: {
35
+ (args: ButtonProps): JSX.Element;
36
+ storyName: string;
37
+ args: {
38
+ value: string;
39
+ variant: string;
40
+ color: string;
41
+ circle: boolean;
42
+ className: string;
43
+ querySelector: string;
44
+ ariaLabel: string;
45
+ disabled: boolean;
46
+ loading: boolean;
47
+ icon: string;
48
+ iconPosition: string;
49
+ };
50
+ };
@@ -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';
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { ButtonColor, ButtonVariant } from '../button/types';
3
3
  import { ActionMenu } from './types';
4
- interface ActionsMenuInterface<T> {
4
+ export interface ActionsMenuInterface<T> {
5
5
  variant?: ButtonVariant;
6
6
  color?: ButtonColor;
7
7
  value: string;
@@ -0,0 +1,47 @@
1
+ /// <reference types="react" />
2
+ import { ActionsMenuInterface } from '..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: <T>(props: ActionsMenuInterface<T>) => JSX.Element;
6
+ argTypes: {
7
+ color: {
8
+ control: {
9
+ type: string;
10
+ options: string[];
11
+ };
12
+ };
13
+ variant: {
14
+ control: {
15
+ type: string;
16
+ options: string[];
17
+ };
18
+ };
19
+ icon: {
20
+ control: {
21
+ type: string;
22
+ options: string[];
23
+ };
24
+ };
25
+ };
26
+ };
27
+ export default _default;
28
+ export declare const ButtonDropdownComponent: {
29
+ <T>(args: ActionsMenuInterface<T>): JSX.Element;
30
+ storyName: string;
31
+ args: {
32
+ variant: string;
33
+ color: string;
34
+ value: string;
35
+ icon: string;
36
+ ariaLabel: string;
37
+ actions: {
38
+ id: string;
39
+ value: string;
40
+ url: null;
41
+ action: () => void;
42
+ }[];
43
+ dataTestId: string;
44
+ startsOpen: boolean;
45
+ disabled: boolean;
46
+ };
47
+ };
@@ -0,0 +1,53 @@
1
+ /// <reference types="react" />
2
+ import { ButtonLinkProps } from '..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: (props: ButtonLinkProps) => JSX.Element;
6
+ argTypes: {
7
+ color: {
8
+ control: {
9
+ type: string;
10
+ options: string[];
11
+ };
12
+ };
13
+ variant: {
14
+ control: {
15
+ type: string;
16
+ options: string[];
17
+ };
18
+ };
19
+ icon: {
20
+ control: {
21
+ type: string;
22
+ options: string[];
23
+ };
24
+ };
25
+ iconPosition: {
26
+ control: {
27
+ type: string;
28
+ options: string[];
29
+ };
30
+ };
31
+ };
32
+ };
33
+ export default _default;
34
+ export declare const ButtonLinkComponent: {
35
+ (args: ButtonLinkProps): JSX.Element;
36
+ storyName: string;
37
+ args: {
38
+ value: string;
39
+ variant: string;
40
+ color: string;
41
+ circle: boolean;
42
+ className: string;
43
+ querySelector: string;
44
+ ariaLabel: string;
45
+ disabled: boolean;
46
+ loading: boolean;
47
+ icon: string;
48
+ iconPosition: string;
49
+ rel: string;
50
+ url: string;
51
+ blank: boolean;
52
+ };
53
+ };
@@ -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
- declare const SelectInteractive: (props: any) => JSX.Element;
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: (props: any) => JSX.Element;
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;
@@ -1 +1,2 @@
1
1
  export declare const SelectWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const SelectGroupLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -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,6 +1,6 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { TagVariant, TagColor } from './types';
3
- interface TagProps {
3
+ export interface TagProps {
4
4
  variant?: TagVariant;
5
5
  color?: TagColor;
6
6
  value: string;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { TagProps } from '..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: (props: TagProps) => JSX.Element;
6
+ argTypes: {
7
+ color: {
8
+ control: {
9
+ type: string;
10
+ options: string[];
11
+ };
12
+ };
13
+ variant: {
14
+ control: {
15
+ type: string;
16
+ options: string[];
17
+ };
18
+ };
19
+ };
20
+ };
21
+ export default _default;
22
+ export declare const TagPrimaryComponent: {
23
+ (args: TagProps): JSX.Element;
24
+ storyName: string;
25
+ args: {
26
+ color: string;
27
+ variant: string;
28
+ value: string;
29
+ };
30
+ };
@@ -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';
@@ -2,6 +2,7 @@ export declare const colors: {
2
2
  normal: string;
3
3
  light: string;
4
4
  blue: string;
5
+ darkBlue: string;
5
6
  orange: string;
6
7
  darkOrange: string;
7
8
  red: string;