@firecms/core 3.0.0-canary.57 → 3.0.0-canary.58
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.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +2 -2
- package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -2
- package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +2 -2
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +3 -3
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +2 -2
- package/src/components/EntityPreview.tsx +3 -3
- package/src/components/EntityView.tsx +3 -3
- package/src/components/FireCMSAppBar.tsx +3 -3
- package/src/components/HomePage/NavigationCard.tsx +2 -2
- package/src/components/HomePage/SmallNavigationCard.tsx +2 -2
- package/src/components/ReferenceWidget.tsx +2 -2
- package/src/components/VirtualTable/VirtualTable.tsx +2 -2
- package/src/components/VirtualTable/VirtualTableHeader.tsx +4 -4
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +2 -2
- package/src/components/VirtualTable/VirtualTableRow.tsx +2 -2
- package/src/core/Drawer.tsx +2 -2
- package/src/core/DrawerNavigationItem.tsx +3 -3
- package/src/core/EntityEditView.tsx +3 -3
- package/src/core/Scaffold.tsx +4 -4
- package/src/form/EntityForm.tsx +2 -2
- package/src/form/components/StorageItemPreview.tsx +2 -2
- package/src/form/components/StorageUploadProgress.tsx +2 -2
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +2 -2
- package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +4 -4
- package/src/form/field_bindings/MarkdownFieldBinding.tsx +2 -2
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +2 -2
- package/src/form/field_bindings/SelectFieldBinding.tsx +2 -2
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +4 -4
- package/src/preview/components/BooleanPreview.tsx +2 -2
- package/src/preview/property_previews/ArrayOneOfPreview.tsx +2 -2
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +2 -2
- package/src/preview/property_previews/MapPropertyPreview.tsx +5 -5
- package/src/preview/property_previews/StringPropertyPreview.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.58",
|
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
50
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
49
|
+
"@firecms/formex": "^3.0.0-canary.58",
|
|
50
|
+
"@firecms/ui": "^3.0.0-canary.58",
|
|
51
51
|
"@fontsource/jetbrains-mono": "^5.0.20",
|
|
52
52
|
"@hello-pangea/dnd": "^16.6.0",
|
|
53
53
|
"@radix-ui/react-portal": "^1.0.4",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"dist",
|
|
112
112
|
"src"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "8fb738b6abf384c0cba679f293b049a0ac56a7c2",
|
|
115
115
|
"publishConfig": {
|
|
116
116
|
"access": "public"
|
|
117
117
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { MouseEvent, useCallback } from "react";
|
|
2
2
|
|
|
3
3
|
import { CollectionSize, Entity, EntityAction, EntityCollection, SelectionController } from "../../types";
|
|
4
|
-
import { Checkbox,
|
|
4
|
+
import { Checkbox, cls, IconButton, Menu, MenuItem, MoreVertIcon, Skeleton, Tooltip, Typography } from "@firecms/ui";
|
|
5
5
|
import { useFireCMSContext, useLargeLayout } from "../../hooks";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -72,7 +72,7 @@ export const EntityCollectionRowActions = function EntityCollectionRowActions({
|
|
|
72
72
|
return (
|
|
73
73
|
<div
|
|
74
74
|
onClick={onClick}
|
|
75
|
-
className={
|
|
75
|
+
className={cls(
|
|
76
76
|
"h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",
|
|
77
77
|
frozen ? "sticky left-0" : ""
|
|
78
78
|
)}
|
|
@@ -14,7 +14,7 @@ import { renderSkeletonText } from "../../preview";
|
|
|
14
14
|
import { propertiesToColumns } from "./column_utils";
|
|
15
15
|
import { ErrorView } from "../ErrorView";
|
|
16
16
|
import { SelectableTable } from "../SelectableTable/SelectableTable";
|
|
17
|
-
import {
|
|
17
|
+
import { cls } from "@firecms/ui";
|
|
18
18
|
import { getRowHeight } from "../common/table_height";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -292,7 +292,7 @@ export const EntityCollectionTable = function EntityCollectionTable<M extends Re
|
|
|
292
292
|
|
|
293
293
|
<div ref={ref}
|
|
294
294
|
style={style}
|
|
295
|
-
className={
|
|
295
|
+
className={cls("h-full w-full flex flex-col bg-white dark:bg-gray-950", className)}>
|
|
296
296
|
|
|
297
297
|
<CollectionTableToolbar
|
|
298
298
|
onTextSearch={textSearchEnabled ? onTextSearch : undefined}
|
|
@@ -9,7 +9,7 @@ import { useSnackbarController, useStorageSource } from "../../../hooks";
|
|
|
9
9
|
import { getThumbnailMeasure } from "../../../preview/util";
|
|
10
10
|
import { StorageFieldItem, useStorageUploadController } from "../../../util/useStorageUploadController";
|
|
11
11
|
import { StorageUploadProgress } from "../../../form/components/StorageUploadProgress";
|
|
12
|
-
import {
|
|
12
|
+
import { cls, EditIcon, IconButton, Typography } from "@firecms/ui";
|
|
13
13
|
import { EntityTableCellActions } from "../internal/EntityTableCellActions";
|
|
14
14
|
|
|
15
15
|
const dropZoneClasses = "max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid";
|
|
@@ -207,7 +207,7 @@ function StorageUpload({
|
|
|
207
207
|
onMouseEnter={() => setOnHover(true)}
|
|
208
208
|
onMouseMove={() => setOnHover(true)}
|
|
209
209
|
onMouseLeave={() => setOnHover(false)}
|
|
210
|
-
className={
|
|
210
|
+
className={cls(dropZoneClasses,
|
|
211
211
|
"relative w-full h-full flex",
|
|
212
212
|
`justify-${hasValue ? "start" : "center"}`,
|
|
213
213
|
isDragActive ? activeDropClasses : "",
|
|
@@ -3,7 +3,7 @@ import React, { useEffect } from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
5
|
CircularProgress,
|
|
6
|
-
|
|
6
|
+
cls,
|
|
7
7
|
defaultBorderMixin,
|
|
8
8
|
FilterListOffIcon,
|
|
9
9
|
SearchBar,
|
|
@@ -71,7 +71,7 @@ export function CollectionTableToolbar({
|
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
73
|
<div
|
|
74
|
-
className={
|
|
74
|
+
className={cls(defaultBorderMixin, "no-scrollbar min-h-[56px] overflow-x-auto px-2 md:px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full")}>
|
|
75
75
|
|
|
76
76
|
<div className="flex items-center gap-2 md:mr-4 mr-2">
|
|
77
77
|
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
|
|
2
2
|
|
|
3
3
|
import useMeasure from "react-use-measure";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { cls, RemoveCircleIcon, Tooltip } from "@firecms/ui";
|
|
6
6
|
import { ErrorBoundary } from "../../../components";
|
|
7
7
|
import { getRowHeight, TableSize } from "../../common/table_height";
|
|
8
8
|
|
|
@@ -46,7 +46,7 @@ const TableCellInner = ({
|
|
|
46
46
|
}: TableCellInnerProps) => {
|
|
47
47
|
return (
|
|
48
48
|
<div
|
|
49
|
-
className={
|
|
49
|
+
className={cls("flex flex-col max-h-full w-full",
|
|
50
50
|
{
|
|
51
51
|
"items-start": faded || scrollable
|
|
52
52
|
})}
|
|
@@ -185,7 +185,7 @@ export const EntityTableCell = React.memo<EntityTableCellProps>(
|
|
|
185
185
|
|
|
186
186
|
return (
|
|
187
187
|
<div
|
|
188
|
-
className={
|
|
188
|
+
className={cls(
|
|
189
189
|
"transition-colors duration-100 ease-in-out",
|
|
190
190
|
`flex relative h-full rounded-md p-${p} border border-4 border-opacity-75`,
|
|
191
191
|
onHover && !disabled ? "bg-gray-50 dark:bg-gray-900" : "",
|
|
@@ -45,7 +45,7 @@ import { EntityCollectionViewActions } from "./EntityCollectionViewActions";
|
|
|
45
45
|
import {
|
|
46
46
|
AddIcon,
|
|
47
47
|
Button,
|
|
48
|
-
|
|
48
|
+
cls,
|
|
49
49
|
IconButton,
|
|
50
50
|
KeyboardTabIcon,
|
|
51
51
|
Markdown,
|
|
@@ -591,7 +591,7 @@ export const EntityCollectionView = React.memo(
|
|
|
591
591
|
});
|
|
592
592
|
|
|
593
593
|
return (
|
|
594
|
-
<div className={
|
|
594
|
+
<div className={cls("overflow-hidden h-full w-full rounded-md", className)}
|
|
595
595
|
ref={containerRef}>
|
|
596
596
|
<EntityCollectionTable
|
|
597
597
|
key={`collection_table_${fullPath}`}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getValueInPath,
|
|
11
11
|
resolveCollection
|
|
12
12
|
} from "../util";
|
|
13
|
-
import {
|
|
13
|
+
import { cls, defaultBorderMixin, IconButton, KeyboardTabIcon, Skeleton, Tooltip, Typography } from "@firecms/ui";
|
|
14
14
|
import { PreviewSize, PropertyPreview, SkeletonPropertyComponent } from "../preview";
|
|
15
15
|
import { useCustomizationController, useNavigationController, useSideEntityController } from "../hooks";
|
|
16
16
|
import { useAnalyticsController } from "../hooks/useAnalyticsController";
|
|
@@ -77,7 +77,7 @@ export function EntityPreview({
|
|
|
77
77
|
hover={disabled ? undefined : hover}
|
|
78
78
|
size={size}>
|
|
79
79
|
{imageProperty && (
|
|
80
|
-
<div className={
|
|
80
|
+
<div className={cls("w-10 h-10 mr-2 shrink-0 grow-0", size === "tiny" ? "my-0.5" : "m-2 self-start")}>
|
|
81
81
|
<PropertyPreview property={imageProperty}
|
|
82
82
|
propertyKey={imagePropertyKey as string}
|
|
83
83
|
size={"tiny"}
|
|
@@ -197,7 +197,7 @@ const EntityPreviewContainerInner = React.forwardRef<HTMLDivElement, EntityPrevi
|
|
|
197
197
|
// @ts-ignore
|
|
198
198
|
tabindex: 0
|
|
199
199
|
}}
|
|
200
|
-
className={
|
|
200
|
+
className={cls(
|
|
201
201
|
"bg-white dark:bg-gray-900",
|
|
202
202
|
fullwidth ? "w-full" : "",
|
|
203
203
|
"items-center",
|
|
@@ -2,7 +2,7 @@ import React, { useMemo } from "react";
|
|
|
2
2
|
import { PropertyPreview } from "../preview";
|
|
3
3
|
import { Entity, EntityCollection, ResolvedEntityCollection, ResolvedProperties } from "../types";
|
|
4
4
|
import { resolveCollection } from "../util";
|
|
5
|
-
import {
|
|
5
|
+
import { cls, defaultBorderMixin, IconButton, OpenInNewIcon } from "@firecms/ui";
|
|
6
6
|
import { CustomizationController } from "../types/customization_controller";
|
|
7
7
|
import { useCustomizationController } from "../hooks/useCustomizationController";
|
|
8
8
|
|
|
@@ -38,7 +38,7 @@ export function EntityView<M extends Record<string, any>>(
|
|
|
38
38
|
return (
|
|
39
39
|
<div className={"w-full " + className}>
|
|
40
40
|
<div className={"w-full mb-4"}>
|
|
41
|
-
<div className={
|
|
41
|
+
<div className={cls(defaultBorderMixin, "flex justify-between py-2 border-b last:border-b-0")}>
|
|
42
42
|
<div className="flex items-center w-1/4">
|
|
43
43
|
<span className="pl-2 text-sm text-gray-600">Id</span>
|
|
44
44
|
</div>
|
|
@@ -62,7 +62,7 @@ export function EntityView<M extends Record<string, any>>(
|
|
|
62
62
|
return (
|
|
63
63
|
<div
|
|
64
64
|
key={`reference_previews_${key}`}
|
|
65
|
-
className={
|
|
65
|
+
className={cls(defaultBorderMixin, "flex justify-between py-2 border-b last:border-b-0")}>
|
|
66
66
|
<div className="flex items-center w-1/4">
|
|
67
67
|
<span className="pl-2 text-sm text-gray-600">{property.name}</span>
|
|
68
68
|
</div>
|
|
@@ -4,7 +4,7 @@ import { Link as ReactLink } from "react-router-dom";
|
|
|
4
4
|
import { ErrorBoundary, FireCMSLogo } from "../components";
|
|
5
5
|
import {
|
|
6
6
|
Avatar,
|
|
7
|
-
|
|
7
|
+
cls,
|
|
8
8
|
DarkModeIcon,
|
|
9
9
|
IconButton,
|
|
10
10
|
LightModeIcon,
|
|
@@ -96,7 +96,7 @@ export const FireCMSAppBar = function FireCMSAppBar({
|
|
|
96
96
|
return (
|
|
97
97
|
<div
|
|
98
98
|
style={style}
|
|
99
|
-
className={
|
|
99
|
+
className={cls("pr-2",
|
|
100
100
|
{
|
|
101
101
|
"ml-[17rem]": drawerOpen && largeLayout,
|
|
102
102
|
"ml-16": includeDrawer && !(drawerOpen && largeLayout),
|
|
@@ -124,7 +124,7 @@ export const FireCMSAppBar = function FireCMSAppBar({
|
|
|
124
124
|
{!includeDrawer && (logo
|
|
125
125
|
? <img src={logo}
|
|
126
126
|
alt="Logo"
|
|
127
|
-
className={
|
|
127
|
+
className={cls("w-[32px] h-[32px]")}/>
|
|
128
128
|
: <FireCMSLogo width={"32px"} height={"32px"}/>)}
|
|
129
129
|
|
|
130
130
|
{typeof title === "string"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArrowForwardIcon, Card,
|
|
1
|
+
import { ArrowForwardIcon, Card, cls, Markdown, Typography, } from "@firecms/ui";
|
|
2
2
|
|
|
3
3
|
export type NavigationCardProps = {
|
|
4
4
|
name: string,
|
|
@@ -17,7 +17,7 @@ export function NavigationCard({
|
|
|
17
17
|
}: NavigationCardProps) {
|
|
18
18
|
|
|
19
19
|
return (<Card
|
|
20
|
-
className={
|
|
20
|
+
className={cls("h-full p-4 cursor-pointer min-h-[230px]")}
|
|
21
21
|
onClick={() => {
|
|
22
22
|
onClick?.();
|
|
23
23
|
}}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArrowForwardIcon, cardClickableMixin, cardMixin,
|
|
1
|
+
import { ArrowForwardIcon, cardClickableMixin, cardMixin, cls, focusedMixin, Typography, } from "@firecms/ui";
|
|
2
2
|
|
|
3
3
|
import { Link } from "react-router-dom";
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@ export function SmallNavigationCard({
|
|
|
19
19
|
|
|
20
20
|
<Link
|
|
21
21
|
tabIndex={0}
|
|
22
|
-
className={
|
|
22
|
+
className={cls(cardMixin,
|
|
23
23
|
cardClickableMixin,
|
|
24
24
|
focusedMixin,
|
|
25
25
|
"cursor-pointer flex flex-row items-center px-4 py-2 text-inherit dark:text-inherit visited:text-inherit visited:dark:text-inherit hover:text-inherit hover:dark:text-inherit ")}
|
|
@@ -4,7 +4,7 @@ import { Entity, EntityCollection, EntityReference, FilterValues } from "../type
|
|
|
4
4
|
import { getReferenceFrom } from "../util";
|
|
5
5
|
import { PreviewSize, ReferencePreview } from "../preview";
|
|
6
6
|
import { useNavigationController, useReferenceDialog } from "../hooks";
|
|
7
|
-
import { Button,
|
|
7
|
+
import { Button, cls } from "@firecms/ui";
|
|
8
8
|
|
|
9
9
|
export type ReferenceWidgetProps<M extends Record<string, any>> = {
|
|
10
10
|
name?: string,
|
|
@@ -132,7 +132,7 @@ export function ReferenceWidget<M extends Record<string, any>>({
|
|
|
132
132
|
includeEntityLink={includeEntityLink}/>
|
|
133
133
|
|
|
134
134
|
}
|
|
135
|
-
return <div className={
|
|
135
|
+
return <div className={cls("text-sm font-medium",
|
|
136
136
|
"min-w-80 flex flex-col gap-4",
|
|
137
137
|
"relative transition-colors duration-200 ease-in rounded font-medium",
|
|
138
138
|
disabled ? "bg-opacity-50" : "hover:bg-opacity-75",
|
|
@@ -19,7 +19,7 @@ import { VirtualTableContextProps } from "./types";
|
|
|
19
19
|
import { VirtualTableHeaderRow } from "./VirtualTableHeaderRow";
|
|
20
20
|
import { VirtualTableRow } from "./VirtualTableRow";
|
|
21
21
|
import { VirtualTableCell } from "./VirtualTableCell";
|
|
22
|
-
import { AssignmentIcon, CenteredView,
|
|
22
|
+
import { AssignmentIcon, CenteredView, cls, Typography } from "@firecms/ui";
|
|
23
23
|
|
|
24
24
|
const VirtualListContext = createContext<VirtualTableContextProps<any>>({} as any);
|
|
25
25
|
VirtualListContext.displayName = "VirtualListContext";
|
|
@@ -275,7 +275,7 @@ export const VirtualTable = React.memo<VirtualTableProps<any>>(
|
|
|
275
275
|
return (
|
|
276
276
|
<div
|
|
277
277
|
ref={measureRef}
|
|
278
|
-
className={
|
|
278
|
+
className={cls("h-full w-full", className)}>
|
|
279
279
|
<VirtualListContext.Provider
|
|
280
280
|
value={virtualListController}>
|
|
281
281
|
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ArrowUpwardIcon,
|
|
8
8
|
Badge,
|
|
9
9
|
Button,
|
|
10
|
-
|
|
10
|
+
cls,
|
|
11
11
|
defaultBorderMixin,
|
|
12
12
|
FilterListIcon,
|
|
13
13
|
IconButton,
|
|
@@ -85,7 +85,7 @@ export const VirtualTableHeader = React.memo<VirtualTableHeaderProps<any>>(
|
|
|
85
85
|
return (
|
|
86
86
|
<ErrorBoundary>
|
|
87
87
|
<div
|
|
88
|
-
className={
|
|
88
|
+
className={cls("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900",
|
|
89
89
|
"text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ",
|
|
90
90
|
"hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",
|
|
91
91
|
column.frozen ? "sticky left-0 z-10" : "relative z-0"
|
|
@@ -179,7 +179,7 @@ export const VirtualTableHeader = React.memo<VirtualTableHeaderProps<any>>(
|
|
|
179
179
|
|
|
180
180
|
{column.resizable && <div
|
|
181
181
|
ref={resizeHandleRef}
|
|
182
|
-
className={
|
|
182
|
+
className={cls(
|
|
183
183
|
"absolute h-full w-[6px] top-0 right-0 cursor-col-resize",
|
|
184
184
|
hovered && "bg-gray-300 dark:bg-gray-700"
|
|
185
185
|
)}
|
|
@@ -240,7 +240,7 @@ function FilterForm<M>({
|
|
|
240
240
|
}}
|
|
241
241
|
className={"text-gray-900 dark:text-white"}>
|
|
242
242
|
<div
|
|
243
|
-
className={
|
|
243
|
+
className={cls(defaultBorderMixin, "py-4 px-6 text-xs font-semibold uppercase border-b")}>
|
|
244
244
|
{column.title ?? id}
|
|
245
245
|
</div>
|
|
246
246
|
{filterField && <div className="m-4">
|
|
@@ -4,7 +4,7 @@ import { VirtualTableColumn, VirtualTableWhereFilterOp } from "./VirtualTablePro
|
|
|
4
4
|
import { ErrorBoundary } from "../ErrorBoundary";
|
|
5
5
|
import { VirtualTableHeader } from "./VirtualTableHeader";
|
|
6
6
|
import { VirtualTableContextProps } from "./types";
|
|
7
|
-
import {
|
|
7
|
+
import { cls, defaultBorderMixin } from "@firecms/ui";
|
|
8
8
|
|
|
9
9
|
export const VirtualTableHeaderRow = ({
|
|
10
10
|
columns,
|
|
@@ -100,7 +100,7 @@ export const VirtualTableHeaderRow = ({
|
|
|
100
100
|
|
|
101
101
|
return (
|
|
102
102
|
<div
|
|
103
|
-
className={
|
|
103
|
+
className={cls(defaultBorderMixin, "z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900")}>
|
|
104
104
|
{columns.map((c, columnIndex) => {
|
|
105
105
|
const column = columns[columnIndex];
|
|
106
106
|
|
|
@@ -3,7 +3,7 @@ import React, { useCallback } from "react";
|
|
|
3
3
|
import equal from "react-fast-compare"
|
|
4
4
|
|
|
5
5
|
import { VirtualTableRowProps } from "./types";
|
|
6
|
-
import {
|
|
6
|
+
import { cls } from "@firecms/ui";
|
|
7
7
|
|
|
8
8
|
export const VirtualTableRow = React.memo<VirtualTableRowProps<any>>(
|
|
9
9
|
function VirtualTableRow<T>({
|
|
@@ -28,7 +28,7 @@ export const VirtualTableRow = React.memo<VirtualTableRowProps<any>>(
|
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
30
|
<div
|
|
31
|
-
className={
|
|
31
|
+
className={cls(
|
|
32
32
|
"flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",
|
|
33
33
|
rowClassName ? rowClassName(rowData) : "",
|
|
34
34
|
{
|
package/src/core/Drawer.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { useLargeLayout, useNavigationController } from "../hooks";
|
|
|
5
5
|
import { useNavigate } from "react-router-dom";
|
|
6
6
|
import { CMSAnalyticsEvent, TopNavigationEntry, TopNavigationResult } from "../types";
|
|
7
7
|
import { IconForView } from "../util";
|
|
8
|
-
import {
|
|
8
|
+
import { cls, IconButton, Menu, MenuItem, MoreVertIcon, Tooltip, Typography } from "@firecms/ui";
|
|
9
9
|
import { useAnalyticsController } from "../hooks/useAnalyticsController";
|
|
10
10
|
import { useDrawer } from "./Scaffold";
|
|
11
11
|
import { DrawerNavigationItem } from "./DrawerNavigationItem";
|
|
@@ -114,7 +114,7 @@ export function Drawer() {
|
|
|
114
114
|
<MoreVertIcon/>
|
|
115
115
|
</Tooltip>
|
|
116
116
|
{drawerOpen && <div
|
|
117
|
-
className={
|
|
117
|
+
className={cls(
|
|
118
118
|
drawerOpen ? "opacity-100" : "opacity-0 hidden",
|
|
119
119
|
"mx-4 font-inherit text-inherit"
|
|
120
120
|
)}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
import { NavLink } from "react-router-dom";
|
|
4
|
-
import {
|
|
4
|
+
import { cls, Tooltip } from "@firecms/ui";
|
|
5
5
|
|
|
6
6
|
export function DrawerNavigationItem({
|
|
7
7
|
name,
|
|
@@ -30,7 +30,7 @@ export function DrawerNavigationItem({
|
|
|
30
30
|
width: !drawerOpen ? "72px" : "280px",
|
|
31
31
|
transition: drawerOpen ? "width 150ms ease-in" : undefined
|
|
32
32
|
}}
|
|
33
|
-
className={({ isActive }: any) =>
|
|
33
|
+
className={({ isActive }: any) => cls("rounded-r-lg truncate",
|
|
34
34
|
"hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white",
|
|
35
35
|
"flex flex-row items-center mr-8",
|
|
36
36
|
// "transition-all ease-in-out delay-100 duration-300",
|
|
@@ -45,7 +45,7 @@ export function DrawerNavigationItem({
|
|
|
45
45
|
{iconWrap}
|
|
46
46
|
|
|
47
47
|
<div
|
|
48
|
-
className={
|
|
48
|
+
className={cls(
|
|
49
49
|
drawerOpen ? "opacity-100" : "opacity-0 hidden",
|
|
50
50
|
"ml-4 font-inherit text-inherit"
|
|
51
51
|
)}>
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
useSnackbarController
|
|
30
30
|
} from "../hooks";
|
|
31
31
|
import { EntityForm } from "../form";
|
|
32
|
-
import { CircularProgress, CloseIcon,
|
|
32
|
+
import { CircularProgress, CloseIcon, cls, defaultBorderMixin, IconButton, Tab, Tabs, Typography } from "@firecms/ui";
|
|
33
33
|
import { EntityFormSaveParams } from "../form/EntityForm";
|
|
34
34
|
import { useSideDialogContext } from "./index";
|
|
35
35
|
|
|
@@ -297,7 +297,7 @@ export function EntityEditView<M extends Record<string, any>, UserType extends U
|
|
|
297
297
|
return null;
|
|
298
298
|
}
|
|
299
299
|
return <div
|
|
300
|
-
className={
|
|
300
|
+
className={cls(defaultBorderMixin,
|
|
301
301
|
"relative flex-grow w-full h-full overflow-auto ")}
|
|
302
302
|
key={`custom_view_${customView.key}`}
|
|
303
303
|
role="tabpanel">
|
|
@@ -481,7 +481,7 @@ export function EntityEditView<M extends Record<string, any>, UserType extends U
|
|
|
481
481
|
<>
|
|
482
482
|
|
|
483
483
|
<div
|
|
484
|
-
className={
|
|
484
|
+
className={cls(defaultBorderMixin, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950")}>
|
|
485
485
|
|
|
486
486
|
<div
|
|
487
487
|
className="pb-1 self-center">
|
package/src/core/Scaffold.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
|
|
|
5
5
|
import { Drawer as DefaultDrawer, DrawerProps } from "./Drawer";
|
|
6
6
|
import { useLargeLayout, useNavigationController } from "../hooks";
|
|
7
7
|
import { ErrorBoundary, FireCMSAppBar as DefaultFireCMSAppBar, FireCMSAppBarProps, FireCMSLogo } from "../components";
|
|
8
|
-
import { ChevronLeftIcon,
|
|
8
|
+
import { ChevronLeftIcon, cls, defaultBorderMixin, IconButton, MenuIcon, Sheet, Tooltip } from "@firecms/ui";
|
|
9
9
|
|
|
10
10
|
export const DRAWER_WIDTH = 280;
|
|
11
11
|
|
|
@@ -150,7 +150,7 @@ export const Scaffold = React.memo<PropsWithChildren<ScaffoldProps>>(
|
|
|
150
150
|
className="flex flex-col flex-grow overflow-auto">
|
|
151
151
|
<DrawerHeader/>
|
|
152
152
|
<div
|
|
153
|
-
className={
|
|
153
|
+
className={cls(defaultBorderMixin, "flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1")}>
|
|
154
154
|
|
|
155
155
|
<ErrorBoundary>
|
|
156
156
|
{children}
|
|
@@ -218,7 +218,7 @@ function DrawerWrapper(props: {
|
|
|
218
218
|
transition: "padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
|
|
219
219
|
padding: props.open ? "32px 144px 0px 24px" : "72px 16px 0px"
|
|
220
220
|
}}
|
|
221
|
-
className={
|
|
221
|
+
className={cls("cursor-pointer")}>
|
|
222
222
|
|
|
223
223
|
<Tooltip title={"Home"}
|
|
224
224
|
sideOffset={20}
|
|
@@ -228,7 +228,7 @@ function DrawerWrapper(props: {
|
|
|
228
228
|
{props.logo
|
|
229
229
|
? <img src={props.logo}
|
|
230
230
|
alt="Logo"
|
|
231
|
-
className={
|
|
231
|
+
className={cls("max-w-full max-h-full",
|
|
232
232
|
props.open ?? "w-[112px] h-[112px]")}/>
|
|
233
233
|
: <FireCMSLogo/>}
|
|
234
234
|
|
package/src/form/EntityForm.tsx
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "../hooks";
|
|
36
36
|
import { ErrorFocus } from "./components/ErrorFocus";
|
|
37
37
|
import { CustomIdField } from "./components/CustomIdField";
|
|
38
|
-
import { Alert, Button, CircularProgress,
|
|
38
|
+
import { Alert, Button, CircularProgress, cls, DialogActions, IconButton, Tooltip, Typography } from "@firecms/ui";
|
|
39
39
|
import { CircularProgressCenter, ErrorBoundary } from "../components";
|
|
40
40
|
import { copyEntityAction, deleteEntityAction } from "../components/common/default_entity_actions";
|
|
41
41
|
import { useAnalyticsController } from "../hooks/useAnalyticsController";
|
|
@@ -453,7 +453,7 @@ function EntityFormInternal<M extends Record<string, any>>({
|
|
|
453
453
|
<div className="h-full overflow-auto">
|
|
454
454
|
|
|
455
455
|
{pluginActions.length > 0 && <div
|
|
456
|
-
className={
|
|
456
|
+
className={cls("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md")}>
|
|
457
457
|
{pluginActions}
|
|
458
458
|
</div>}
|
|
459
459
|
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { Entity, EntityCollection, ResolvedStringProperty } from "../../types";
|
|
4
4
|
import { PreviewSize, PropertyPreview } from "../../preview";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { cls, IconButton, paperMixin, RemoveIcon, Tooltip } from "@firecms/ui";
|
|
7
7
|
import { ErrorBoundary } from "../../components";
|
|
8
8
|
|
|
9
9
|
interface StorageItemPreviewProps {
|
|
@@ -29,7 +29,7 @@ export function StorageItemPreview({
|
|
|
29
29
|
}: StorageItemPreviewProps) {
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<div className={
|
|
32
|
+
<div className={cls(paperMixin,
|
|
33
33
|
"relative m-4 border-box flex items-center justify-center",
|
|
34
34
|
size === "medium" ? "min-w-[220px] min-h-[220px] max-w-[220px]" : "min-w-[118px] min-h-[118px] max-w-[118px]")}>
|
|
35
35
|
|
|
@@ -3,7 +3,7 @@ import React, { useCallback } from "react";
|
|
|
3
3
|
import { useSnackbarController, useStorageSource } from "../../hooks";
|
|
4
4
|
import { StorageFieldItem } from "../../util/useStorageUploadController";
|
|
5
5
|
import { ErrorView } from "../../components";
|
|
6
|
-
import {
|
|
6
|
+
import { cls, paperMixin, Skeleton } from "@firecms/ui";
|
|
7
7
|
import { EntityCollection, StorageSource } from "../../types";
|
|
8
8
|
|
|
9
9
|
export interface StorageUploadItemProps {
|
|
@@ -88,7 +88,7 @@ export function StorageUploadProgress({
|
|
|
88
88
|
}
|
|
89
89
|
return (
|
|
90
90
|
|
|
91
|
-
<div className={
|
|
91
|
+
<div className={cls(paperMixin,
|
|
92
92
|
"relative m-4 border-box flex items-center justify-center",
|
|
93
93
|
`min-w-[${imageSize}px] min-h-[${imageSize}px]`)}>
|
|
94
94
|
|
|
@@ -6,7 +6,7 @@ import { ErrorView } from "../../components";
|
|
|
6
6
|
import { getIconForProperty, getReferenceFrom } from "../../util";
|
|
7
7
|
|
|
8
8
|
import { useNavigationController, useReferenceDialog } from "../../hooks";
|
|
9
|
-
import { Button,
|
|
9
|
+
import { Button, cls, ExpandablePanel, fieldBackgroundMixin } from "@firecms/ui";
|
|
10
10
|
import { useClearRestoreValue } from "../useClearRestoreValue";
|
|
11
11
|
|
|
12
12
|
type ArrayOfReferencesFieldProps = FieldProps<EntityReference[]>;
|
|
@@ -132,7 +132,7 @@ export function ArrayOfReferencesFieldBinding({
|
|
|
132
132
|
{!tableMode &&
|
|
133
133
|
<ExpandablePanel
|
|
134
134
|
titleClassName={fieldBackgroundMixin}
|
|
135
|
-
className={
|
|
135
|
+
className={cls("px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2", fieldBackgroundMixin)}
|
|
136
136
|
initiallyExpanded={expanded}
|
|
137
137
|
title={title}>
|
|
138
138
|
{body}
|
|
@@ -8,7 +8,7 @@ import { EnumValuesChip } from "../../preview";
|
|
|
8
8
|
import { FieldProps, FormContext, PropertyFieldBindingProps, PropertyOrBuilder } from "../../types";
|
|
9
9
|
import { getDefaultValueFor, getIconForProperty, } from "../../util";
|
|
10
10
|
import { DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE } from "../../util/common";
|
|
11
|
-
import {
|
|
11
|
+
import { cls, ExpandablePanel, paperMixin, Select, SelectItem, Typography } from "@firecms/ui";
|
|
12
12
|
import { useClearRestoreValue } from "../useClearRestoreValue";
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -193,7 +193,7 @@ function BlockEntry({
|
|
|
193
193
|
};
|
|
194
194
|
|
|
195
195
|
return (
|
|
196
|
-
<div className={
|
|
196
|
+
<div className={cls(paperMixin, "bg-transparent p-4 my-4 py-8")}>
|
|
197
197
|
|
|
198
198
|
<Field
|
|
199
199
|
name={typeFieldName}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ArrowDropDownIcon,
|
|
9
9
|
BooleanSwitchWithLabel,
|
|
10
10
|
Button,
|
|
11
|
-
|
|
11
|
+
cls,
|
|
12
12
|
DateTimeField,
|
|
13
13
|
defaultBorderMixin,
|
|
14
14
|
ExpandablePanel,
|
|
@@ -316,7 +316,7 @@ function MapKeyValueRow<T extends Record<string, any>>({
|
|
|
316
316
|
}}/>;
|
|
317
317
|
} else if (dataType === "array") {
|
|
318
318
|
return <div
|
|
319
|
-
className={
|
|
319
|
+
className={cls(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
|
|
320
320
|
<ArrayContainer value={entryValue}
|
|
321
321
|
newDefaultEntry={""}
|
|
322
322
|
droppableId={rowId.toString()}
|
|
@@ -349,7 +349,7 @@ function MapKeyValueRow<T extends Record<string, any>>({
|
|
|
349
349
|
</div>;
|
|
350
350
|
} else if (dataType === "map") {
|
|
351
351
|
return <div
|
|
352
|
-
className={
|
|
352
|
+
className={cls(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
|
|
353
353
|
<MapEditView value={entryValue}
|
|
354
354
|
fieldName={fieldKey}
|
|
355
355
|
setValue={(updatedValue) => {
|
|
@@ -482,7 +482,7 @@ function ArrayKeyValueRow<T>({
|
|
|
482
482
|
Arrays of arrays are not supported.
|
|
483
483
|
</Typography>;
|
|
484
484
|
} else if (dataType === "map") {
|
|
485
|
-
return <div className={
|
|
485
|
+
return <div className={cls(defaultBorderMixin, "ml-2 pl-2 border-l border-solid")}>
|
|
486
486
|
<MapEditView value={entryValue}
|
|
487
487
|
setValue={(updatedValue) => {
|
|
488
488
|
setValue(updatedValue);
|
|
@@ -8,7 +8,7 @@ import { FieldHelperText, LabelWithIcon } from "../components";
|
|
|
8
8
|
import { FieldProps } from "../../types";
|
|
9
9
|
import { getIconForProperty } from "../../util";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
cls,
|
|
12
12
|
fieldBackgroundDisabledMixin,
|
|
13
13
|
fieldBackgroundHoverMixin,
|
|
14
14
|
fieldBackgroundMixin,
|
|
@@ -81,7 +81,7 @@ export function MarkdownFieldBinding({
|
|
|
81
81
|
</Typography>}
|
|
82
82
|
|
|
83
83
|
<MdEditor value={internalValue ?? ""}
|
|
84
|
-
className={
|
|
84
|
+
className={cls(fieldBackgroundMixin,
|
|
85
85
|
disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
|
|
86
86
|
"text-base")}
|
|
87
87
|
readOnly={disabled}
|