@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/ui",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.42",
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.4.0",
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.2.1",
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.11.30",
89
+ "@types/node": "^20.12.7",
90
90
  "@types/object-hash": "^3.0.6",
91
- "@types/react": "^18.2.67",
92
- "@types/react-dom": "^18.2.22",
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.3.1",
95
- "@typescript-eslint/parser": "^7.3.1",
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.9.0",
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.30.7",
111
- "typescript": "^5.4.2",
112
- "vite": "^5.2.3"
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": "d6a2f28e93d3c532dd6efacfccffb91383d5330e",
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
  ? (
@@ -12,8 +12,8 @@ export interface MarkdownProps {
12
12
  }
13
13
 
14
14
  const proseClasses = {
15
- small: "prose-sm",
16
- medium: "prose",
15
+ small: "prose-sm text-sm",
16
+ medium: "prose text-base",
17
17
  large: "prose-lg",
18
18
  xl: "prose-xl",
19
19
  "2xl": "prose-2xl"
@@ -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