@turystack/ui 0.0.16 → 0.0.17
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/dist/index.d.ts +25 -26
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,22 @@ import { default as default_2 } from 'react';
|
|
|
2
2
|
import { JSX } from 'react/jsx-runtime';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
declare type ComponentClassNameSlots<T extends string> = Partial<Record<T, string>>;
|
|
6
|
+
|
|
7
|
+
export declare type ComponentConfig<T extends object, S extends string> = {
|
|
8
|
+
classNames?: ComponentClassNameSlots<S>;
|
|
9
|
+
defaultProps?: ComponentDefaultProps<T>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare type ComponentDefaultProps<T extends object> = Partial<T>;
|
|
6
13
|
|
|
7
|
-
export declare
|
|
14
|
+
export declare function TButton(props: PropsWithChildren<TButtonProps>): JSX.Element;
|
|
15
|
+
|
|
16
|
+
export declare type TButtonProps = {
|
|
8
17
|
form?: string;
|
|
9
|
-
type?:
|
|
10
|
-
size?:
|
|
11
|
-
variant?:
|
|
18
|
+
type?: TButtonType;
|
|
19
|
+
size?: TButtonSize;
|
|
20
|
+
variant?: TButtonVariant;
|
|
12
21
|
leftSection?: React.ReactNode;
|
|
13
22
|
rightSection?: React.ReactNode;
|
|
14
23
|
block?: boolean;
|
|
@@ -18,27 +27,23 @@ export declare type ButtonProps = {
|
|
|
18
27
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
19
28
|
};
|
|
20
29
|
|
|
21
|
-
export declare type
|
|
22
|
-
|
|
23
|
-
export declare type ButtonSlots = 'root' | 'loading' | 'leftSection' | 'rightSection';
|
|
30
|
+
export declare type TButtonSize = 'sm' | 'md' | 'lg' | 'icon-sm' | 'icon-md' | 'icon-lg';
|
|
24
31
|
|
|
25
|
-
export declare type
|
|
32
|
+
export declare type TButtonSlots = 'root' | 'loading' | 'leftSection' | 'rightSection';
|
|
26
33
|
|
|
27
|
-
export declare type
|
|
34
|
+
export declare type TButtonType = 'button' | 'submit' | 'reset';
|
|
28
35
|
|
|
29
|
-
declare type
|
|
30
|
-
|
|
31
|
-
declare type ComponentDefaultProps<T extends object> = Partial<T>;
|
|
36
|
+
export declare type TButtonVariant = 'default' | 'destructive' | 'outline' | 'dashed' | 'secondary' | 'ghost' | 'link';
|
|
32
37
|
|
|
33
|
-
export declare function
|
|
38
|
+
export declare function TLoader({ size }: TLoaderProps): JSX.Element;
|
|
34
39
|
|
|
35
|
-
export declare type
|
|
36
|
-
size?:
|
|
40
|
+
export declare type TLoaderProps = {
|
|
41
|
+
size?: TLoaderSize;
|
|
37
42
|
};
|
|
38
43
|
|
|
39
|
-
export declare type
|
|
44
|
+
export declare type TLoaderSize = 'sm' | 'md' | 'lg';
|
|
40
45
|
|
|
41
|
-
export declare type
|
|
46
|
+
export declare type TLoaderSlots = 'root';
|
|
42
47
|
|
|
43
48
|
export declare function TuryStackProvider({ children, ...props }: TuryStackProviderProps & {
|
|
44
49
|
children: default_2.ReactNode;
|
|
@@ -46,14 +51,8 @@ export declare function TuryStackProvider({ children, ...props }: TuryStackProvi
|
|
|
46
51
|
|
|
47
52
|
export declare type TuryStackProviderProps = {
|
|
48
53
|
components?: {
|
|
49
|
-
button?:
|
|
50
|
-
|
|
51
|
-
defaultProps?: ComponentDefaultProps<ButtonProps>;
|
|
52
|
-
};
|
|
53
|
-
loader?: {
|
|
54
|
-
classNames?: ComponentClassNameSlots<LoaderSlots>;
|
|
55
|
-
defaultProps?: ComponentDefaultProps<LoaderProps>;
|
|
56
|
-
};
|
|
54
|
+
button?: ComponentConfig<TButtonProps, TButtonSlots>;
|
|
55
|
+
loader?: ComponentConfig<TLoaderProps, TLoaderSlots>;
|
|
57
56
|
};
|
|
58
57
|
};
|
|
59
58
|
|
package/dist/index.js
CHANGED