@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 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
- export declare function Button(props: PropsWithChildren<ButtonProps>): JSX.Element;
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 type ButtonProps = {
14
+ export declare function TButton(props: PropsWithChildren<TButtonProps>): JSX.Element;
15
+
16
+ export declare type TButtonProps = {
8
17
  form?: string;
9
- type?: ButtonType;
10
- size?: ButtonSize;
11
- variant?: ButtonVariant;
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 ButtonSize = 'sm' | 'md' | 'lg' | 'icon-sm' | 'icon-md' | 'icon-lg';
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 ButtonType = 'button' | 'submit' | 'reset';
32
+ export declare type TButtonSlots = 'root' | 'loading' | 'leftSection' | 'rightSection';
26
33
 
27
- export declare type ButtonVariant = 'default' | 'destructive' | 'outline' | 'dashed' | 'secondary' | 'ghost' | 'link';
34
+ export declare type TButtonType = 'button' | 'submit' | 'reset';
28
35
 
29
- declare type ComponentClassNameSlots<T extends string> = Partial<Record<T, string>>;
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 Loader({ size }: LoaderProps): JSX.Element;
38
+ export declare function TLoader({ size }: TLoaderProps): JSX.Element;
34
39
 
35
- export declare type LoaderProps = {
36
- size?: LoaderSize;
40
+ export declare type TLoaderProps = {
41
+ size?: TLoaderSize;
37
42
  };
38
43
 
39
- export declare type LoaderSize = 'sm' | 'md' | 'lg';
44
+ export declare type TLoaderSize = 'sm' | 'md' | 'lg';
40
45
 
41
- export declare type LoaderSlots = 'root';
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
- classNames?: ComponentClassNameSlots<ButtonSlots>;
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
@@ -3357,7 +3357,7 @@ function pr({
3357
3357
  return /* @__PURE__ */ H(Qe.Provider, { value: r, children: e });
3358
3358
  }
3359
3359
  export {
3360
- mr as Button,
3361
- fr as Loader,
3360
+ mr as TButton,
3361
+ fr as TLoader,
3362
3362
  pr as TuryStackProvider
3363
3363
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turystack/ui",
3
3
  "private": false,
4
- "version": "0.0.16",
4
+ "version": "0.0.17",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",