@firecms/core 3.0.0-canary.57 → 3.0.0-canary.59

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.
Files changed (42) hide show
  1. package/dist/components/VirtualTable/VirtualTableProps.d.ts +4 -0
  2. package/dist/index.es.js +1037 -1035
  3. package/dist/index.es.js.map +1 -1
  4. package/dist/index.umd.js +5 -5
  5. package/dist/index.umd.js.map +1 -1
  6. package/package.json +4 -4
  7. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +2 -2
  8. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +2 -2
  9. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +2 -2
  10. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +2 -2
  11. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +3 -3
  12. package/src/components/EntityCollectionView/EntityCollectionView.tsx +2 -2
  13. package/src/components/EntityPreview.tsx +3 -3
  14. package/src/components/EntityView.tsx +3 -3
  15. package/src/components/FireCMSAppBar.tsx +3 -3
  16. package/src/components/HomePage/NavigationCard.tsx +2 -2
  17. package/src/components/HomePage/SmallNavigationCard.tsx +2 -2
  18. package/src/components/ReferenceWidget.tsx +2 -2
  19. package/src/components/VirtualTable/VirtualTable.tsx +5 -3
  20. package/src/components/VirtualTable/VirtualTableHeader.tsx +4 -4
  21. package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +2 -2
  22. package/src/components/VirtualTable/VirtualTableProps.tsx +5 -0
  23. package/src/components/VirtualTable/VirtualTableRow.tsx +2 -2
  24. package/src/core/Drawer.tsx +2 -2
  25. package/src/core/DrawerNavigationItem.tsx +3 -3
  26. package/src/core/EntityEditView.tsx +3 -3
  27. package/src/core/Scaffold.tsx +4 -4
  28. package/src/form/EntityForm.tsx +2 -2
  29. package/src/form/components/StorageItemPreview.tsx +2 -2
  30. package/src/form/components/StorageUploadProgress.tsx +2 -2
  31. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +2 -2
  32. package/src/form/field_bindings/BlockFieldBinding.tsx +2 -2
  33. package/src/form/field_bindings/KeyValueFieldBinding.tsx +4 -4
  34. package/src/form/field_bindings/MarkdownFieldBinding.tsx +2 -2
  35. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +2 -2
  36. package/src/form/field_bindings/SelectFieldBinding.tsx +2 -2
  37. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +4 -4
  38. package/src/preview/components/BooleanPreview.tsx +2 -2
  39. package/src/preview/property_previews/ArrayOneOfPreview.tsx +2 -2
  40. package/src/preview/property_previews/ArrayPropertyPreview.tsx +2 -2
  41. package/src/preview/property_previews/MapPropertyPreview.tsx +5 -5
  42. 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.57",
4
+ "version": "3.0.0-canary.59",
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.57",
50
- "@firecms/ui": "^3.0.0-canary.57",
49
+ "@firecms/formex": "^3.0.0-canary.59",
50
+ "@firecms/ui": "^3.0.0-canary.59",
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": "54c0d79d2648c937d055bacab2d7d92fbd294c7b",
114
+ "gitHead": "870435eb903576cd282b2c22165ec3afa84c9340",
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, cn, IconButton, Menu, MenuItem, MoreVertIcon, Skeleton, Tooltip, Typography } from "@firecms/ui";
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={cn(
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 { cn } from "@firecms/ui";
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={cn("h-full w-full flex flex-col bg-white dark:bg-gray-950", 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 { cn, EditIcon, IconButton, Typography } from "@firecms/ui";
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={cn(dropZoneClasses,
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
- cn,
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={cn(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")}>
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 { cn, RemoveCircleIcon, Tooltip } from "@firecms/ui";
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={cn("flex flex-col max-h-full w-full",
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={cn(
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
- cn,
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={cn("overflow-hidden h-full w-full rounded-md", 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 { cn, defaultBorderMixin, IconButton, KeyboardTabIcon, Skeleton, Tooltip, Typography } from "@firecms/ui";
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={cn("w-10 h-10 mr-2 shrink-0 grow-0", size === "tiny" ? "my-0.5" : "m-2 self-start")}>
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={cn(
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 { cn, defaultBorderMixin, IconButton, OpenInNewIcon } from "@firecms/ui";
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={cn(defaultBorderMixin, "flex justify-between py-2 border-b last:border-b-0")}>
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={cn(defaultBorderMixin, "flex justify-between py-2 border-b last:border-b-0")}>
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
- cn,
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={cn("pr-2",
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={cn("w-[32px] h-[32px]")}/>
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, cn, Markdown, Typography, } from "@firecms/ui";
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={cn("h-full p-4 cursor-pointer min-h-[230px]")}
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, cn, focusedMixin, Typography, } from "@firecms/ui";
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={cn(cardMixin,
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, cn } from "@firecms/ui";
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={cn("text-sm font-medium",
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, cn, Typography } from "@firecms/ui";
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";
@@ -107,6 +107,7 @@ export const VirtualTable = React.memo<VirtualTableProps<any>>(
107
107
  hoverRow,
108
108
  createFilterField,
109
109
  rowClassName,
110
+ style,
110
111
  className,
111
112
  endAdornment,
112
113
  AddColumnComponent
@@ -239,7 +240,7 @@ export const VirtualTable = React.memo<VirtualTableProps<any>>(
239
240
  const empty = !loading && (data?.length ?? 0) === 0;
240
241
  const customView = error
241
242
  ? <CenteredView maxWidth={"2xl"}
242
- className="flex flex-col gap-2">
243
+ className="flex flex-col gap-2">
243
244
 
244
245
  <Typography variant={"h6"}>
245
246
  {"Error fetching data from the data source"}
@@ -275,7 +276,8 @@ export const VirtualTable = React.memo<VirtualTableProps<any>>(
275
276
  return (
276
277
  <div
277
278
  ref={measureRef}
278
- className={cn("h-full w-full", className)}>
279
+ style={style}
280
+ className={cls("h-full w-full", className)}>
279
281
  <VirtualListContext.Provider
280
282
  value={virtualListController}>
281
283
 
@@ -7,7 +7,7 @@ import {
7
7
  ArrowUpwardIcon,
8
8
  Badge,
9
9
  Button,
10
- cn,
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={cn("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900",
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={cn(
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={cn(defaultBorderMixin, "py-4 px-6 text-xs font-semibold uppercase border-b")}>
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 { cn, defaultBorderMixin } from "@firecms/ui";
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={cn(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")}>
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
 
@@ -131,6 +131,11 @@ export interface VirtualTableProps<T extends Record<string, any>> {
131
131
  */
132
132
  className?: string;
133
133
 
134
+ /**
135
+ * Style applied to the table
136
+ */
137
+ style?: React.CSSProperties;
138
+
134
139
  /**
135
140
  * Component rendered at the end of the table, after scroll
136
141
  */
@@ -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 { cn } from "@firecms/ui";
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={cn(
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
  {
@@ -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 { cn, IconButton, Menu, MenuItem, MoreVertIcon, Tooltip, Typography } from "@firecms/ui";
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={cn(
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 { cn, Tooltip } from "@firecms/ui";
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) => cn("rounded-r-lg truncate",
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={cn(
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, cn, defaultBorderMixin, IconButton, Tab, Tabs, Typography } from "@firecms/ui";
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={cn(defaultBorderMixin,
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={cn(defaultBorderMixin, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950")}>
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">
@@ -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, cn, defaultBorderMixin, IconButton, MenuIcon, Sheet, Tooltip } from "@firecms/ui";
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={cn(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")}>
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={cn("cursor-pointer")}>
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={cn("max-w-full max-h-full",
231
+ className={cls("max-w-full max-h-full",
232
232
  props.open ?? "w-[112px] h-[112px]")}/>
233
233
  : <FireCMSLogo/>}
234
234
 
@@ -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, cn, DialogActions, IconButton, Tooltip, Typography } from "@firecms/ui";
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={cn("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")}>
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 { cn, IconButton, paperMixin, RemoveIcon, Tooltip } from "@firecms/ui";
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={cn(paperMixin,
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 { cn, paperMixin, Skeleton } from "@firecms/ui";
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={cn(paperMixin,
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, cn, ExpandablePanel, fieldBackgroundMixin } from "@firecms/ui";
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={cn("px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2", fieldBackgroundMixin)}
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 { cn, ExpandablePanel, paperMixin, Select, SelectItem, Typography } from "@firecms/ui";
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={cn(paperMixin, "bg-transparent p-4 my-4 py-8")}>
196
+ <div className={cls(paperMixin, "bg-transparent p-4 my-4 py-8")}>
197
197
 
198
198
  <Field
199
199
  name={typeFieldName}