@firecms/ui 3.0.0-canary.42 → 3.0.0-canary.44
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/components/Avatar.d.ts +1 -0
- package/dist/index.es.js +7075 -7058
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +13 -13
- package/src/components/Avatar.tsx +3 -0
- package/src/components/Markdown.tsx +2 -2
- package/src/components/Typography.tsx +18 -1
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@firecms/ui",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.0.0-canary.
|
4
|
+
"version": "3.0.0-canary.44",
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
6
6
|
"funding": {
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
@@ -65,7 +65,7 @@
|
|
65
65
|
"clsx": "^2.1.0",
|
66
66
|
"cmdk": "^0.2.1",
|
67
67
|
"date-fns": "^3.6.0",
|
68
|
-
"react-datepicker": "^6.
|
68
|
+
"react-datepicker": "^6.8.0",
|
69
69
|
"react-dropzone": "^14.2.3",
|
70
70
|
"react-fast-compare": "^3.2.2",
|
71
71
|
"tailwind-merge": "^2.2.2"
|
@@ -83,16 +83,16 @@
|
|
83
83
|
"devDependencies": {
|
84
84
|
"@jest/globals": "^29.7.0",
|
85
85
|
"@testing-library/jest-dom": "^6.4.2",
|
86
|
-
"@testing-library/react": "^14.
|
86
|
+
"@testing-library/react": "^14.3.1",
|
87
87
|
"@testing-library/user-event": "^14.5.2",
|
88
88
|
"@types/jest": "^29.5.12",
|
89
|
-
"@types/node": "^20.
|
89
|
+
"@types/node": "^20.12.7",
|
90
90
|
"@types/object-hash": "^3.0.6",
|
91
|
-
"@types/react": "^18.2.
|
92
|
-
"@types/react-dom": "^18.2.
|
91
|
+
"@types/react": "^18.2.79",
|
92
|
+
"@types/react-dom": "^18.2.25",
|
93
93
|
"@types/react-measure": "^2.0.12",
|
94
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
95
|
-
"@typescript-eslint/parser": "^7.
|
94
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
95
|
+
"@typescript-eslint/parser": "^7.7.0",
|
96
96
|
"@vitejs/plugin-react": "^4.2.1",
|
97
97
|
"cross-env": "^7.0.3",
|
98
98
|
"eslint": "^8.57.0",
|
@@ -102,21 +102,21 @@
|
|
102
102
|
"eslint-plugin-promise": "^6.1.1",
|
103
103
|
"eslint-plugin-react": "^7.34.1",
|
104
104
|
"eslint-plugin-react-hooks": "^4.6.0",
|
105
|
-
"firebase": "^10.
|
105
|
+
"firebase": "^10.11.0",
|
106
106
|
"jest": "^29.7.0",
|
107
107
|
"npm-run-all": "^4.1.5",
|
108
108
|
"ts-jest": "^29.1.2",
|
109
109
|
"ts-node": "^10.9.2",
|
110
|
-
"tsd": "^0.
|
111
|
-
"typescript": "^5.4.
|
112
|
-
"vite": "^5.2.
|
110
|
+
"tsd": "^0.31.0",
|
111
|
+
"typescript": "^5.4.5",
|
112
|
+
"vite": "^5.2.9"
|
113
113
|
},
|
114
114
|
"files": [
|
115
115
|
"dist",
|
116
116
|
"src",
|
117
117
|
"tailwind.config.js"
|
118
118
|
],
|
119
|
-
"gitHead": "
|
119
|
+
"gitHead": "15e52171f137c2876a3566bbc2752d140b9d0c7a",
|
120
120
|
"publishConfig": {
|
121
121
|
"access": "public"
|
122
122
|
}
|
@@ -7,6 +7,7 @@ export interface AvatarProps {
|
|
7
7
|
alt?: string;
|
8
8
|
children?: React.ReactNode;
|
9
9
|
className?: string;
|
10
|
+
outerClassName?: string;
|
10
11
|
style?: React.CSSProperties;
|
11
12
|
}
|
12
13
|
|
@@ -17,6 +18,7 @@ const AvatarInner: React.ForwardRefRenderFunction<HTMLButtonElement, AvatarProps
|
|
17
18
|
children,
|
18
19
|
className,
|
19
20
|
style,
|
21
|
+
outerClassName,
|
20
22
|
...props
|
21
23
|
}, ref) => {
|
22
24
|
|
@@ -28,6 +30,7 @@ const AvatarInner: React.ForwardRefRenderFunction<HTMLButtonElement, AvatarProps
|
|
28
30
|
className={cn("rounded-full flex items-center justify-center overflow-hidden",
|
29
31
|
focusedMixin,
|
30
32
|
"p-1 hover:bg-slate-200 hover:dark:bg-slate-700 w-12 h-12",
|
33
|
+
outerClassName
|
31
34
|
)}>
|
32
35
|
{src
|
33
36
|
? (
|
@@ -43,6 +43,23 @@ const colorToClasses = {
|
|
43
43
|
error: "text-red-600 dark:text-red-500"
|
44
44
|
};
|
45
45
|
|
46
|
+
const gutterBottomClasses = {
|
47
|
+
h1: "mb-5",
|
48
|
+
h2: "mb-4",
|
49
|
+
h3: "mb-4",
|
50
|
+
h4: "mb-4",
|
51
|
+
h5: "mb-3",
|
52
|
+
h6: "mb-3",
|
53
|
+
subtitle1: "mb-3",
|
54
|
+
subtitle2: "mb-3",
|
55
|
+
body1: "mb-3",
|
56
|
+
body2: "mb-3",
|
57
|
+
inherit: "mb-3",
|
58
|
+
caption: "mb-2",
|
59
|
+
button: "mb-2",
|
60
|
+
label: "mb-2"
|
61
|
+
};
|
62
|
+
|
46
63
|
const variantToClasses = {
|
47
64
|
h1: "text-6xl font-headers font-light",
|
48
65
|
h2: "text-5xl font-headers font-light",
|
@@ -87,7 +104,7 @@ export function Typography<C extends React.ElementType>(
|
|
87
104
|
variantToClasses[variant],
|
88
105
|
color ? colorToClasses[color] : "",
|
89
106
|
align !== "inherit" && `text-${align}`,
|
90
|
-
gutterBottom &&
|
107
|
+
gutterBottom && gutterBottomClasses[variant],
|
91
108
|
noWrap && "truncate",
|
92
109
|
paragraph && "mb-3",
|
93
110
|
className
|