@pelatform/starter.shared 0.1.0 → 0.2.0

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.
@@ -0,0 +1,96 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { Avatar, buttonVariants, Dialog, Card } from 'pelatform-ui/default';
3
+ import { User, Workspace } from '@pelatform/starter.utils';
4
+
5
+ type AvatarClassNames = {
6
+ base?: string;
7
+ fallback?: string;
8
+ fallbackIcon?: string;
9
+ image?: string;
10
+ skeleton?: string;
11
+ };
12
+ interface AvatarProps extends ComponentProps<typeof Avatar> {
13
+ className?: string;
14
+ classNames?: AvatarClassNames;
15
+ image?: string;
16
+ isPending?: boolean;
17
+ size?: NonNullable<Parameters<typeof buttonVariants>[0]>["size"] | null | undefined;
18
+ user?: Partial<User> | null;
19
+ workspace?: Partial<Workspace> | null;
20
+ }
21
+
22
+ type DialogClassNames = {
23
+ content?: string;
24
+ header?: string;
25
+ footer?: string;
26
+ };
27
+ interface DialogComponentProps extends ComponentProps<typeof Dialog> {
28
+ className?: string;
29
+ children?: ReactNode;
30
+ classNames?: CardClassNames;
31
+ title?: string;
32
+ description?: string;
33
+ disableFooter?: boolean;
34
+ cancelButton?: boolean;
35
+ cancelButtonDisabled?: boolean;
36
+ button?: ReactNode;
37
+ }
38
+
39
+ type CardClassNames = {
40
+ base?: string;
41
+ cell?: string;
42
+ content?: string;
43
+ header?: string;
44
+ footer?: string;
45
+ grid?: string;
46
+ skeleton?: string;
47
+ title?: string;
48
+ description?: string;
49
+ instructions?: string;
50
+ error?: string;
51
+ label?: string;
52
+ input?: string;
53
+ checkbox?: string;
54
+ icon?: string;
55
+ button?: string;
56
+ primaryButton?: string;
57
+ secondaryButton?: string;
58
+ outlineButton?: string;
59
+ destructiveButton?: string;
60
+ avatar?: AvatarClassNames;
61
+ dialog?: DialogClassNames;
62
+ };
63
+ interface CardComponentProps extends Omit<ComponentProps<typeof Card>, "title" | "variant"> {
64
+ className?: string;
65
+ children?: ReactNode;
66
+ classNames?: CardClassNames;
67
+ title?: ReactNode;
68
+ description?: ReactNode;
69
+ instructions?: ReactNode;
70
+ actionLabel?: ReactNode;
71
+ action?: () => Promise<unknown> | unknown;
72
+ disabled?: boolean;
73
+ isDestructive?: boolean;
74
+ isPending?: boolean;
75
+ isSubmitting?: boolean;
76
+ }
77
+
78
+ type ViewClassNames = {
79
+ base?: string;
80
+ content?: string;
81
+ title?: string;
82
+ subtitle?: string;
83
+ skeleton?: string;
84
+ icon?: string;
85
+ avatar?: AvatarClassNames;
86
+ };
87
+ interface ViewProps {
88
+ className?: string;
89
+ classNames?: ViewClassNames;
90
+ isPending?: boolean;
91
+ size?: NonNullable<Parameters<typeof buttonVariants>[0]>["size"] | null | undefined;
92
+ user?: Partial<User> | null;
93
+ workspace?: Partial<Workspace> | null;
94
+ }
95
+
96
+ export type { AvatarClassNames as A, CardClassNames as C, DialogClassNames as D, ViewClassNames as V, AvatarProps as a, CardComponentProps as b, DialogComponentProps as c, ViewProps as d };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelatform/starter.shared",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A part of SaaS starter kit for Pelatform applications.",
5
5
  "author": "Pelatform",
6
6
  "license": "MIT",
@@ -13,6 +13,10 @@
13
13
  ".": {
14
14
  "types": "./dist/index.d.ts",
15
15
  "default": "./dist/index.js"
16
+ },
17
+ "./extend": {
18
+ "types": "./dist/extend.d.ts",
19
+ "default": "./dist/extend.js"
16
20
  }
17
21
  },
18
22
  "scripts": {
@@ -31,16 +35,17 @@
31
35
  "components",
32
36
  "utilities"
33
37
  ],
34
- "dependencies": {},
38
+ "dependencies": {
39
+ "@tanstack/react-query-devtools": "^5.91.1"
40
+ },
35
41
  "devDependencies": {
36
- "@pelatform/starter.config": "0.1.0",
37
- "@pelatform/starter.hook": "0.1.1",
38
- "@pelatform/starter.i18n": "0.1.2",
39
- "@pelatform/starter.utils": "0.1.1",
42
+ "@pelatform/starter.config": "0.2.0",
43
+ "@pelatform/starter.hook": "0.2.0",
44
+ "@pelatform/starter.utils": "0.2.0",
40
45
  "@pelatform/tsconfig": "^0.1.3",
41
46
  "@types/react": "^19.2.7",
42
47
  "lucide-react": "^0.556.0",
43
- "next": "^16.0.7",
48
+ "next": "^16.0.8",
44
49
  "next-intl": "^4.5.8",
45
50
  "pelatform-ui": "^1.1.3",
46
51
  "react": "^19.2.1",
@@ -50,7 +55,6 @@
50
55
  "peerDependencies": {
51
56
  "@pelatform/starter.config": ">=0.1.0",
52
57
  "@pelatform/starter.hook": ">=0.1.0",
53
- "@pelatform/starter.i18n": ">=0.1.0",
54
58
  "@pelatform/starter.utils": ">=0.1.0",
55
59
  "lucide-react": ">=0.55.0",
56
60
  "next": ">=16.0.0",