@firecms/ui 3.0.0-canary.43 → 3.0.0-canary.45

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/ui",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.43",
4
+ "version": "3.0.0-canary.45",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -116,7 +116,7 @@
116
116
  "src",
117
117
  "tailwind.config.js"
118
118
  ],
119
- "gitHead": "fedcb0d43c504245dd76b702e4ab4479fa8592df",
119
+ "gitHead": "7f22bfa3bb20479ad23becd9c10f78cac1a3bc32",
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 && "mb-2",
107
+ gutterBottom && gutterBottomClasses[variant],
91
108
  noWrap && "truncate",
92
109
  paragraph && "mb-3",
93
110
  className