@firecms/core 3.0.0-canary.104 → 3.0.0-canary.106

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 (36) hide show
  1. package/dist/form/PropertyFieldBinding.d.ts +1 -1
  2. package/dist/form/field_bindings/MultiSelectBinding.d.ts +1 -1
  3. package/dist/form/field_bindings/SelectFieldBinding.d.ts +1 -1
  4. package/dist/form/field_bindings/TextFieldBinding.d.ts +1 -1
  5. package/dist/index.es.js +68 -55
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/index.umd.js +67 -54
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/preview/PropertyPreviewProps.d.ts +1 -1
  10. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  11. package/dist/types/fields.d.ts +8 -0
  12. package/package.json +5 -5
  13. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +11 -10
  14. package/src/components/EntityCollectionView/EntityCollectionView.tsx +1 -1
  15. package/src/components/EntityPreview.tsx +7 -7
  16. package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +1 -5
  17. package/src/form/PropertyFieldBinding.tsx +11 -4
  18. package/src/form/field_bindings/MultiSelectBinding.tsx +2 -0
  19. package/src/form/field_bindings/ReferenceFieldBinding.tsx +17 -13
  20. package/src/form/field_bindings/SelectFieldBinding.tsx +5 -3
  21. package/src/form/field_bindings/SwitchFieldBinding.tsx +2 -2
  22. package/src/form/field_bindings/TextFieldBinding.tsx +3 -1
  23. package/src/preview/PropertyPreviewProps.tsx +1 -1
  24. package/src/preview/components/BooleanPreview.tsx +1 -1
  25. package/src/preview/components/EnumValuesChip.tsx +1 -1
  26. package/src/preview/components/ImagePreview.tsx +1 -1
  27. package/src/preview/components/UrlComponentPreview.tsx +1 -1
  28. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +1 -1
  29. package/src/preview/property_previews/ArrayOfStorageComponentsPreview.tsx +1 -1
  30. package/src/preview/property_previews/ArrayOneOfPreview.tsx +1 -1
  31. package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
  32. package/src/preview/property_previews/MapPropertyPreview.tsx +1 -1
  33. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +2 -2
  34. package/src/preview/property_previews/StringPropertyPreview.tsx +2 -2
  35. package/src/preview/util.ts +2 -2
  36. package/src/types/fields.tsx +10 -0
@@ -26,5 +26,5 @@ import { CMSType, PropertyFieldBindingProps } from "../types";
26
26
  * @group Form custom fields
27
27
  */
28
28
  export declare const PropertyFieldBinding: typeof PropertyFieldBindingInternal;
29
- declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = Record<string, any>>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled, partOfArray, minimalistView, autoFocus, index, }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
29
+ declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = Record<string, any>>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled, partOfArray, minimalistView, autoFocus, index, size }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
30
30
  export {};
@@ -6,4 +6,4 @@ import { EnumType, FieldProps } from "../../types";
6
6
  * and tables to the specified properties.
7
7
  * @group Form fields
8
8
  */
9
- export declare function MultiSelectBinding({ propertyKey, value, setValue, error, showError, disabled, property, includeDescription, autoFocus }: FieldProps<EnumType[], any, any>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MultiSelectBinding({ propertyKey, value, setValue, error, showError, disabled, property, includeDescription, size, autoFocus }: FieldProps<EnumType[], any, any>): import("react/jsx-runtime").JSX.Element;
@@ -8,5 +8,5 @@ type SelectProps<T extends EnumType> = FieldProps<T>;
8
8
  * and tables to the specified properties.
9
9
  * @group Form fields
10
10
  */
11
- export declare function SelectFieldBinding<T extends EnumType>({ propertyKey, value, setValue, error, showError, disabled, autoFocus, touched, property, includeDescription }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function SelectFieldBinding<T extends EnumType>({ propertyKey, value, setValue, error, showError, disabled, autoFocus, touched, property, includeDescription, size }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -8,5 +8,5 @@ interface TextFieldBindingProps<T extends string | number> extends FieldProps<T>
8
8
  * and tables to the specified properties.
9
9
  * @group Form fields
10
10
  */
11
- export declare function TextFieldBinding<T extends string | number>({ context, propertyKey, value, setValue, error, showError, disabled, autoFocus, property, includeDescription, }: TextFieldBindingProps<T>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function TextFieldBinding<T extends string | number>({ context, propertyKey, value, setValue, error, showError, disabled, autoFocus, property, includeDescription, size }: TextFieldBindingProps<T>): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
package/dist/index.es.js CHANGED
@@ -4,7 +4,7 @@ import React__default, { useRef, useEffect, useContext, useCallback, useMemo, us
4
4
  import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
5
5
  import hash from "object-hash";
6
6
  import { useCreateFormex, Formex, setIn, Field, getIn, useFormex } from "@firecms/formex";
7
- import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, ErrorIcon, Typography, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, Markdown, TextareaAutosize, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, ErrorOutlineIcon, EditIcon, Button, RemoveCircleIcon, Menu, MoreVertIcon, MenuItem, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, AssignmentIcon, CenteredView, Label, TextField, ClearIcon, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogContent, DialogActions, FileCopyIcon, ArchiveIcon, DeleteIcon, AddIcon, ExpandablePanel, Card, ArrowForwardIcon, cardMixin, cardClickableMixin, focusedMixin, StarIcon, StarBorderIcon, Collapse, Container, FilterListOffIcon, SearchIcon, LoadingButton, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, fieldBackgroundHoverMixin, HandleIcon, RemoveIcon, debounce, InfoIcon, CloseIcon, fieldBackgroundMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, Paper, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, EmailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, NotesIcon, Tab, Tabs, Alert, Sheet, useLocaleConfig, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
7
+ import { getColorSchemeForSeed, CHIP_COLORS, Tooltip, ErrorIcon, Typography, CircleIcon, FunctionsIcon, iconKeys, coolIconKeys, Icon, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, Markdown, TextareaAutosize, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, ErrorOutlineIcon, EditIcon, RemoveCircleIcon, Menu, MoreVertIcon, MenuItem, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, AssignmentIcon, CenteredView, Label, TextField, ClearIcon, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogContent, DialogActions, FileCopyIcon, ArchiveIcon, DeleteIcon, AddIcon, ExpandablePanel, Card, ArrowForwardIcon, cardMixin, cardClickableMixin, focusedMixin, StarIcon, StarBorderIcon, Collapse, Container, FilterListOffIcon, SearchIcon, LoadingButton, Avatar, DarkModeIcon, LightModeIcon, LogoutIcon, fieldBackgroundHoverMixin, HandleIcon, RemoveIcon, debounce, InfoIcon, CloseIcon, fieldBackgroundMixin, fieldBackgroundDisabledMixin, ArrowDropDownIcon, Paper, ShortTextIcon, SubjectIcon, FormatQuoteIcon, HttpIcon, EmailIcon, FlagIcon, ListIcon, ListAltIcon, NumbersIcon, FormatListNumberedIcon, UploadFileIcon, DriveFolderUploadIcon, LinkIcon, AddLinkIcon, ScheduleIcon, BallotIcon, RepeatIcon, ViewStreamIcon, NotesIcon, Tab, Tabs, Alert, Sheet, useLocaleConfig, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
8
8
  import equal from "react-fast-compare";
9
9
  import { Link, useNavigate, useLocation, UNSAFE_NavigationContext, NavLink, Route, Routes } from "react-router-dom";
10
10
  import { format } from "date-fns";
@@ -4515,7 +4515,7 @@ const TINY_THUMBNAIL = 40;
4515
4515
  const SMALL_THUMBNAIL = 100;
4516
4516
  const REGULAR_THUMBNAIL = 200;
4517
4517
  function getThumbnailMeasure(size) {
4518
- if (size === "tiny")
4518
+ if (size === "smallest")
4519
4519
  return TINY_THUMBNAIL;
4520
4520
  else if (size === "small")
4521
4521
  return SMALL_THUMBNAIL;
@@ -4527,7 +4527,7 @@ function getPreviewSizeFrom(size) {
4527
4527
  switch (size) {
4528
4528
  case "xs":
4529
4529
  case "s":
4530
- return "tiny";
4530
+ return "smallest";
4531
4531
  case "m":
4532
4532
  return "small";
4533
4533
  case "l":
@@ -4542,7 +4542,7 @@ function ImagePreview({
4542
4542
  url
4543
4543
  }) {
4544
4544
  const imageSize = useMemo(() => getThumbnailMeasure(size), [size]);
4545
- if (size === "tiny") {
4545
+ if (size === "smallest") {
4546
4546
  return /* @__PURE__ */ jsx(
4547
4547
  "img",
4548
4548
  {
@@ -4710,7 +4710,7 @@ function VideoPreview({
4710
4710
  interactive
4711
4711
  }) {
4712
4712
  const imageSize = useMemo(() => {
4713
- if (size === "tiny")
4713
+ if (size === "smallest")
4714
4714
  return "140px";
4715
4715
  else if (size === "small")
4716
4716
  return "240px";
@@ -4802,7 +4802,7 @@ function renderMap(property, size) {
4802
4802
  mapPropertyKeys = property.previewProperties || Object.keys(property.properties);
4803
4803
  if (size === "small")
4804
4804
  mapPropertyKeys = mapPropertyKeys.slice(0, 3);
4805
- else if (size === "tiny")
4805
+ else if (size === "smallest")
4806
4806
  mapPropertyKeys = mapPropertyKeys.slice(0, 1);
4807
4807
  }
4808
4808
  if (size !== "medium")
@@ -4907,7 +4907,7 @@ function renderGenericArrayCell(property, index = 0) {
4907
4907
  );
4908
4908
  }
4909
4909
  function renderSkeletonImageThumbnail(size) {
4910
- const imageSize = size === "tiny" ? 40 : size === "small" ? 100 : 200;
4910
+ const imageSize = size === "smallest" ? 40 : size === "small" ? 100 : 200;
4911
4911
  return /* @__PURE__ */ jsx(
4912
4912
  Skeleton,
4913
4913
  {
@@ -5072,10 +5072,10 @@ function StringPropertyPreview({
5072
5072
  } else {
5073
5073
  if (!value) return /* @__PURE__ */ jsx(Fragment, {});
5074
5074
  const lines = value.split("\n");
5075
- return value && value.includes("\n") ? /* @__PURE__ */ jsx("div", { className: cls("overflow-x-scroll", size === "tiny" ? "text-sm" : ""), children: lines.map((str, index) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
5075
+ return value && value.includes("\n") ? /* @__PURE__ */ jsx("div", { className: cls("overflow-x-scroll", size === "smallest" ? "text-sm" : ""), children: lines.map((str, index) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
5076
5076
  /* @__PURE__ */ jsx("span", { children: str }),
5077
5077
  index !== lines.length - 1 && /* @__PURE__ */ jsx("br", {})
5078
- ] }, `string_preview_${index}`)) }) : size === "tiny" ? /* @__PURE__ */ jsx("span", { className: "text-sm", children: value }) : /* @__PURE__ */ jsx(Fragment, { children: value });
5078
+ ] }, `string_preview_${index}`)) }) : size === "smallest" ? /* @__PURE__ */ jsx("span", { className: "text-sm", children: value }) : /* @__PURE__ */ jsx(Fragment, { children: value });
5079
5079
  }
5080
5080
  }
5081
5081
  function ArrayPropertyPreview({
@@ -5098,7 +5098,7 @@ function ArrayPropertyPreview({
5098
5098
  throw Error("Picked wrong preview component ArrayPreview");
5099
5099
  const values = value;
5100
5100
  if (!values) return null;
5101
- const childSize = size === "medium" ? "small" : "tiny";
5101
+ const childSize = size === "medium" ? "small" : "smallest";
5102
5102
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: values && values.map(
5103
5103
  (value2, index) => {
5104
5104
  const of = property.resolvedProperties[index] ?? (property.resolvedProperties[index] ?? (Array.isArray(property.of) ? property.of[index] : property.of));
@@ -5161,17 +5161,17 @@ function EntityPreview({
5161
5161
  hover: disabled ? void 0 : hover,
5162
5162
  size,
5163
5163
  children: [
5164
- imageProperty && /* @__PURE__ */ jsx("div", { className: cls("w-10 h-10 mr-2 shrink-0 grow-0", size === "tiny" ? "my-0.5" : "m-2 self-start"), children: /* @__PURE__ */ jsx(
5164
+ imageProperty && /* @__PURE__ */ jsx("div", { className: cls("w-10 h-10 mr-2 shrink-0 grow-0", size === "smallest" ? "my-0.5" : "m-2 self-start"), children: /* @__PURE__ */ jsx(
5165
5165
  PropertyPreview,
5166
5166
  {
5167
5167
  property: imageProperty,
5168
5168
  propertyKey: imagePropertyKey,
5169
- size: "tiny",
5169
+ size: "smallest",
5170
5170
  value: getValueInPath(entity.values, imagePropertyKey)
5171
5171
  }
5172
5172
  ) }),
5173
5173
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-grow w-full m-1", children: [
5174
- size !== "tiny" && includeId && (entity ? /* @__PURE__ */ jsx("div", { className: `${size !== "medium" ? "block whitespace-nowrap overflow-hidden truncate" : ""}`, children: /* @__PURE__ */ jsx(
5174
+ size !== "smallest" && includeId && (entity ? /* @__PURE__ */ jsx("div", { className: `${size !== "medium" ? "block whitespace-nowrap overflow-hidden truncate" : ""}`, children: /* @__PURE__ */ jsx(
5175
5175
  Typography,
5176
5176
  {
5177
5177
  variant: "caption",
@@ -5208,13 +5208,13 @@ function EntityPreview({
5208
5208
  propertyKey: key,
5209
5209
  value: getValueInPath(entity.values, key),
5210
5210
  property: childProperty,
5211
- size: "tiny"
5211
+ size: "smallest"
5212
5212
  }
5213
5213
  ) : /* @__PURE__ */ jsx(
5214
5214
  SkeletonPropertyComponent,
5215
5215
  {
5216
5216
  property: childProperty,
5217
- size: "tiny"
5217
+ size: "smallest"
5218
5218
  }
5219
5219
  )
5220
5220
  },
@@ -5226,7 +5226,7 @@ function EntityPreview({
5226
5226
  Tooltip,
5227
5227
  {
5228
5228
  title: `See details for ${entity.id}`,
5229
- className: size !== "tiny" ? "self-start" : "",
5229
+ className: size !== "smallest" ? "self-start" : "",
5230
5230
  children: /* @__PURE__ */ jsx(
5231
5231
  IconButton,
5232
5232
  {
@@ -5280,7 +5280,7 @@ const EntityPreviewContainerInner = React.forwardRef(({
5280
5280
  fullwidth ? "w-full" : "",
5281
5281
  "items-center",
5282
5282
  hover ? "hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800" : "",
5283
- size === "tiny" ? "p-1" : "p-2",
5283
+ size === "smallest" ? "p-1" : "p-2",
5284
5284
  "flex border rounded-lg",
5285
5285
  onClick ? "cursor-pointer" : "",
5286
5286
  defaultBorderMixin,
@@ -5461,7 +5461,7 @@ function ArrayOfReferencesPreview({
5461
5461
  }
5462
5462
  if (property?.dataType !== "array" || !property.of || property.of.dataType !== "reference")
5463
5463
  throw Error("Picked wrong preview component ArrayOfReferencesPreview");
5464
- const childSize = size === "medium" ? "small" : "tiny";
5464
+ const childSize = size === "medium" ? "small" : "smallest";
5465
5465
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col w-full", children: value && value.map(
5466
5466
  (reference, index) => {
5467
5467
  const ofProperty = property.of;
@@ -5504,7 +5504,7 @@ function ArrayOfStorageComponentsPreview({
5504
5504
  }
5505
5505
  if (property.dataType !== "array" || !property.of || property.of.dataType !== "string")
5506
5506
  throw Error("Picked wrong preview component ArrayOfStorageComponentsPreview");
5507
- const childSize = size === "medium" ? "small" : "tiny";
5507
+ const childSize = size === "medium" ? "small" : "smallest";
5508
5508
  return /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: value && value.map(
5509
5509
  (v, index) => /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(
5510
5510
  PropertyPreview,
@@ -5618,7 +5618,7 @@ function ArrayOneOfPreview({
5618
5618
  }
5619
5619
  const values = value;
5620
5620
  if (!values) return null;
5621
- const childSize = size === "medium" ? "small" : "tiny";
5621
+ const childSize = size === "medium" ? "small" : "smallest";
5622
5622
  const typeField = property.oneOf.typeField ?? DEFAULT_ONE_OF_TYPE;
5623
5623
  const valueField = property.oneOf.valueField ?? DEFAULT_ONE_OF_VALUE;
5624
5624
  const properties = property.oneOf.properties;
@@ -5656,7 +5656,7 @@ function MapPropertyPreview({
5656
5656
  }
5657
5657
  if (!value) return null;
5658
5658
  const mapPropertyKeys = Object.keys(mapProperty.properties);
5659
- if (size === "tiny")
5659
+ if (size === "smallest")
5660
5660
  return /* @__PURE__ */ jsx("div", { className: "w-full flex flex-col space-y-1 md:space-y-2", children: mapPropertyKeys.map((key, index) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
5661
5661
  ErrorBoundary,
5662
5662
  {
@@ -5816,7 +5816,7 @@ function BooleanPreview({
5816
5816
  property.name && /* @__PURE__ */ jsx(
5817
5817
  "span",
5818
5818
  {
5819
- className: cls("text-text-secondary dark:text-text-secondary-dark", size === "tiny" ? "text-sm" : ""),
5819
+ className: cls("text-text-secondary dark:text-text-secondary-dark", size === "smallest" ? "text-sm" : ""),
5820
5820
  children: property.name
5821
5821
  }
5822
5822
  )
@@ -7213,7 +7213,7 @@ const TableReferenceFieldSuccess = React__default.memo(
7213
7213
  ReferencePreview,
7214
7214
  {
7215
7215
  onClick: disabled ? void 0 : handleOpen,
7216
- size: "tiny",
7216
+ size: "smallest",
7217
7217
  reference,
7218
7218
  hover: !disabled,
7219
7219
  disabled: !path,
@@ -7235,12 +7235,14 @@ const TableReferenceFieldSuccess = React__default.memo(
7235
7235
  internalValue && !multiselect && buildSingleReferenceField(),
7236
7236
  internalValue && multiselect && buildMultipleReferenceField(),
7237
7237
  valueNotSet && /* @__PURE__ */ jsxs(
7238
- Button,
7238
+ EntityPreviewContainer,
7239
7239
  {
7240
+ className: cls(
7241
+ "p-4 text-sm font-medium flex items-center gap-4 uppercase",
7242
+ disabled ? "text-slate-500" : "cursor-pointer text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800"
7243
+ ),
7240
7244
  onClick: handleOpen,
7241
- size: "small",
7242
- variant: "outlined",
7243
- color: "primary",
7245
+ size: "medium",
7244
7246
  children: [
7245
7247
  "Edit ",
7246
7248
  title
@@ -10999,13 +11001,10 @@ function ReferenceSelectionTable({
10999
11001
  textSearchInitialised,
11000
11002
  onTextSearchClick,
11001
11003
  textSearchEnabled
11002
- } = (
11003
- // eslint-disable-next-line react-hooks/rules-of-hooks
11004
- useTableSearchHelper({
11005
- collection,
11006
- fullPath
11007
- })
11008
- );
11004
+ } = useTableSearchHelper({
11005
+ collection,
11006
+ fullPath
11007
+ });
11009
11008
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full", children: [
11010
11009
  /* @__PURE__ */ jsx("div", { className: "flex-grow", children: entitiesDisplayedFirst && /* @__PURE__ */ jsx(
11011
11010
  EntityCollectionTable,
@@ -12446,7 +12445,7 @@ const EntityCollectionView = React__default.memo(
12446
12445
  ReferencePreview,
12447
12446
  {
12448
12447
  reference,
12449
- size: "tiny"
12448
+ size: "smallest"
12450
12449
  },
12451
12450
  reference.path + "/" + reference.id
12452
12451
  );
@@ -13767,7 +13766,8 @@ function SelectFieldBinding({
13767
13766
  autoFocus,
13768
13767
  touched,
13769
13768
  property,
13770
- includeDescription
13769
+ includeDescription,
13770
+ size = "medium"
13771
13771
  }) {
13772
13772
  const enumValues = property.enumValues;
13773
13773
  useClearRestoreValue({
@@ -13784,6 +13784,7 @@ function SelectFieldBinding({
13784
13784
  /* @__PURE__ */ jsx(
13785
13785
  Select,
13786
13786
  {
13787
+ size: size === "medium" ? "medium" : "small",
13787
13788
  value: value !== void 0 && value != null ? value.toString() : "",
13788
13789
  disabled,
13789
13790
  position: "item-aligned",
@@ -13814,7 +13815,7 @@ function SelectFieldBinding({
13814
13815
  {
13815
13816
  enumKey,
13816
13817
  enumValues,
13817
- size: "medium"
13818
+ size
13818
13819
  }
13819
13820
  );
13820
13821
  },
@@ -13828,7 +13829,7 @@ function SelectFieldBinding({
13828
13829
  {
13829
13830
  enumKey: String(option.id),
13830
13831
  enumValues,
13831
- size: "medium"
13832
+ size
13832
13833
  }
13833
13834
  )
13834
13835
  },
@@ -13858,6 +13859,7 @@ function MultiSelectBinding({
13858
13859
  disabled,
13859
13860
  property,
13860
13861
  includeDescription,
13862
+ size = "medium",
13861
13863
  autoFocus
13862
13864
  }) {
13863
13865
  const of = property.of;
@@ -13916,6 +13918,7 @@ function MultiSelectBinding({
13916
13918
  /* @__PURE__ */ jsx(
13917
13919
  MultiSelect,
13918
13920
  {
13921
+ size: size === "medium" ? "medium" : "small",
13919
13922
  value: validValue ? value.map((v) => v.toString()) : [],
13920
13923
  disabled,
13921
13924
  label: /* @__PURE__ */ jsx(
@@ -14525,7 +14528,8 @@ function TextFieldBinding({
14525
14528
  disabled,
14526
14529
  autoFocus,
14527
14530
  property,
14528
- includeDescription
14531
+ includeDescription,
14532
+ size = "medium"
14529
14533
  }) {
14530
14534
  let multiline;
14531
14535
  let url;
@@ -14563,6 +14567,7 @@ function TextFieldBinding({
14563
14567
  /* @__PURE__ */ jsx(
14564
14568
  TextField,
14565
14569
  {
14570
+ size,
14566
14571
  value,
14567
14572
  onChange,
14568
14573
  autoFocus,
@@ -14608,7 +14613,7 @@ function TextFieldBinding({
14608
14613
  {
14609
14614
  value,
14610
14615
  property,
14611
- size: "medium"
14616
+ size
14612
14617
  }
14613
14618
  )
14614
14619
  }
@@ -14623,7 +14628,7 @@ const SwitchFieldBinding = React__default.forwardRef(function SwitchFieldBinding
14623
14628
  showError,
14624
14629
  autoFocus,
14625
14630
  disabled,
14626
- touched,
14631
+ size = "medium",
14627
14632
  property,
14628
14633
  includeDescription
14629
14634
  }, ref) {
@@ -14649,7 +14654,7 @@ const SwitchFieldBinding = React__default.forwardRef(function SwitchFieldBinding
14649
14654
  ),
14650
14655
  disabled,
14651
14656
  autoFocus,
14652
- size: "large"
14657
+ size
14653
14658
  }
14654
14659
  ),
14655
14660
  /* @__PURE__ */ jsx(
@@ -14783,7 +14788,7 @@ function ReferenceFieldBindingInternal({
14783
14788
  autoFocus,
14784
14789
  property,
14785
14790
  includeDescription,
14786
- context
14791
+ size = "medium"
14787
14792
  }) {
14788
14793
  if (!property.path) {
14789
14794
  throw new Error("Property path is required for ReferenceFieldBinding");
@@ -14841,7 +14846,7 @@ function ReferenceFieldBindingInternal({
14841
14846
  disabled: !property.path,
14842
14847
  previewProperties: property.previewProperties,
14843
14848
  hover: !disabled,
14844
- size: "medium",
14849
+ size,
14845
14850
  onClick: disabled || isSubmitting ? void 0 : onEntryClick,
14846
14851
  reference: value,
14847
14852
  includeEntityLink: property.includeEntityLink,
@@ -14849,15 +14854,17 @@ function ReferenceFieldBindingInternal({
14849
14854
  }
14850
14855
  ),
14851
14856
  !value && /* @__PURE__ */ jsx("div", { className: "justify-center text-left", children: /* @__PURE__ */ jsxs(
14852
- Button,
14857
+ EntityPreviewContainer,
14853
14858
  {
14854
- variant: "outlined",
14855
- color: "primary",
14856
- disabled: disabled || isSubmitting,
14859
+ className: cls(
14860
+ "px-6 h-16 text-sm font-medium flex items-center gap-6",
14861
+ disabled || isSubmitting ? "text-slate-500" : "cursor-pointer text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800"
14862
+ ),
14857
14863
  onClick: onEntryClick,
14864
+ size: "medium",
14858
14865
  children: [
14859
- "Edit ",
14860
- property.name
14866
+ /* @__PURE__ */ jsx(EmptyValue, {}),
14867
+ `Edit ${property.name}`.toUpperCase()
14861
14868
  ]
14862
14869
  }
14863
14870
  ) })
@@ -14881,6 +14888,9 @@ const PropertyFieldBinding = React__default.memo(PropertyFieldBindingInternal, (
14881
14888
  if (a.index !== b.index) {
14882
14889
  return false;
14883
14890
  }
14891
+ if (a.size !== b.size) {
14892
+ return false;
14893
+ }
14884
14894
  const aIsBuilder = isPropertyBuilder(a.property) || a.property.fromBuilder;
14885
14895
  const bIsBuilder = isPropertyBuilder(b.property) || b.property.fromBuilder;
14886
14896
  const baseCheck = (aIsBuilder === bIsBuilder || equal(a.property, b.property)) && a.disabled === b.disabled;
@@ -14902,7 +14912,8 @@ function PropertyFieldBindingInternal({
14902
14912
  partOfArray,
14903
14913
  minimalistView,
14904
14914
  autoFocus,
14905
- index
14915
+ index,
14916
+ size
14906
14917
  }) {
14907
14918
  const customizationController = useCustomizationController();
14908
14919
  return /* @__PURE__ */ jsx(
@@ -14964,7 +14975,8 @@ function PropertyFieldBindingInternal({
14964
14975
  disabled,
14965
14976
  partOfArray,
14966
14977
  minimalistView,
14967
- autoFocus
14978
+ autoFocus,
14979
+ size
14968
14980
  };
14969
14981
  return /* @__PURE__ */ jsx(
14970
14982
  FieldInternal,
@@ -14990,7 +15002,8 @@ function FieldInternal({
14990
15002
  minimalistView,
14991
15003
  autoFocus,
14992
15004
  context,
14993
- disabled
15005
+ disabled,
15006
+ size
14994
15007
  },
14995
15008
  fieldProps
14996
15009
  }) {
@@ -15021,7 +15034,6 @@ function FieldInternal({
15021
15034
  const cmsFieldProps = {
15022
15035
  propertyKey,
15023
15036
  value,
15024
- // initialValue,
15025
15037
  setValue,
15026
15038
  setFieldValue,
15027
15039
  error,
@@ -15036,7 +15048,8 @@ function FieldInternal({
15036
15048
  minimalistView: minimalistView ?? false,
15037
15049
  autoFocus: autoFocus ?? false,
15038
15050
  customProps: customFieldProps,
15039
- context
15051
+ context,
15052
+ size
15040
15053
  };
15041
15054
  return /* @__PURE__ */ jsxs(ErrorBoundary, { children: [
15042
15055
  /* @__PURE__ */ jsx(UsedComponent, { ...cmsFieldProps }),