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