@firecms/core 3.0.0-canary.123 → 3.0.0-canary.124

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 CHANGED
@@ -5173,7 +5173,7 @@ function EntityPreview({
5173
5173
  hover: disabled ? void 0 : hover,
5174
5174
  size,
5175
5175
  children: [
5176
- /* @__PURE__ */ jsxs("div", { className: cls("w-10 h-10 mr-2 shrink-0 grow-0", size === "smallest" ? "my-0.5" : "m-2 self-start"), children: [
5176
+ /* @__PURE__ */ jsxs("div", { className: cls("flex w-10 h-10 mr-2 shrink-0 grow-0", size === "smallest" ? "my-0.5" : "m-2 self-start"), children: [
5177
5177
  imageProperty && /* @__PURE__ */ jsx(
5178
5178
  PropertyPreview,
5179
5179
  {
@@ -5183,7 +5183,7 @@ function EntityPreview({
5183
5183
  value: getValueInPath(entity.values, imagePropertyKey)
5184
5184
  }
5185
5185
  ),
5186
- !imageProperty && /* @__PURE__ */ jsx(IconForView, { collectionOrView: collection, size, className: "mr-2" })
5186
+ !imageProperty && /* @__PURE__ */ jsx(IconForView, { collectionOrView: collection, size, className: "m-auto" })
5187
5187
  ] }),
5188
5188
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-grow w-full m-1", children: [
5189
5189
  size !== "smallest" && includeId && (entity ? /* @__PURE__ */ jsx("div", { className: `${size !== "medium" ? "block whitespace-nowrap overflow-hidden truncate" : ""}`, children: /* @__PURE__ */ jsx(
@@ -7243,7 +7243,7 @@ const TableReferenceFieldInternal = React__default.memo(
7243
7243
  EntityPreviewContainer,
7244
7244
  {
7245
7245
  className: cls(
7246
- "p-4 text-sm font-medium flex items-center uppercase",
7246
+ "px-4 py-2 text-sm font-medium flex items-center uppercase",
7247
7247
  multiselect ? "gap-4" : "gap-6",
7248
7248
  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"
7249
7249
  ),
@@ -19419,18 +19419,18 @@ function DrawerNavigationItem({
19419
19419
  {
19420
19420
  onClick,
19421
19421
  style: {
19422
- width: !drawerOpen ? "72px" : "280px",
19422
+ width: "100%",
19423
19423
  transition: drawerOpen ? "width 150ms ease-in" : void 0
19424
19424
  },
19425
19425
  className: ({ isActive }) => cls(
19426
- "rounded-r-lg truncate",
19426
+ "rounded-lg truncate",
19427
19427
  "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",
19428
19428
  "flex flex-row items-center mr-8",
19429
19429
  // "transition-all ease-in-out delay-100 duration-300",
19430
19430
  // drawerOpen ? "w-full" : "w-18",
19431
- drawerOpen ? "pl-8 h-12" : "pl-6 h-11",
19431
+ drawerOpen ? "pl-4 h-12" : "pl-4 h-11",
19432
19432
  "font-medium text-sm",
19433
- isActive ? "bg-slate-200 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-30" : ""
19433
+ isActive ? "bg-slate-200 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-50" : ""
19434
19434
  ),
19435
19435
  to: url,
19436
19436
  children: [
@@ -19483,11 +19483,11 @@ function DefaultDrawer({
19483
19483
  const adminViews = navigationEntries.filter((e) => e.type === "admin") ?? [];
19484
19484
  const groupsWithoutAdmin = groups.filter((g) => g !== "Admin");
19485
19485
  const buildGroupHeader = useCallback((group) => {
19486
- if (!drawerOpen) return /* @__PURE__ */ jsx("div", { className: "h-12 w-full" });
19486
+ if (!drawerOpen) return /* @__PURE__ */ jsx("div", { className: "w-full" });
19487
19487
  return /* @__PURE__ */ jsx(
19488
19488
  "div",
19489
19489
  {
19490
- className: "pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",
19490
+ className: "pl-6 pr-8 py-4 flex flex-row items-center",
19491
19491
  children: /* @__PURE__ */ jsx(
19492
19492
  Typography,
19493
19493
  {
@@ -19508,28 +19508,38 @@ function DefaultDrawer({
19508
19508
  };
19509
19509
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cls("flex flex-col h-full relative flex-grow w-full", className), style, children: [
19510
19510
  /* @__PURE__ */ jsx(DrawerLogo, { logo }),
19511
- /* @__PURE__ */ jsx("div", { className: "flex-grow overflow-scroll no-scrollbar", children: groupsWithoutAdmin.map((group) => /* @__PURE__ */ jsxs(
19512
- React__default.Fragment,
19511
+ /* @__PURE__ */ jsx(
19512
+ "div",
19513
19513
  {
19514
- children: [
19515
- buildGroupHeader(group),
19516
- Object.values(navigationEntries).filter((e) => e.group === group).map((view, index) => /* @__PURE__ */ jsx(
19517
- DrawerNavigationItem,
19518
- {
19519
- icon: /* @__PURE__ */ jsx(IconForView, { collectionOrView: view.collection ?? view.view }),
19520
- tooltipsOpen,
19521
- adminMenuOpen,
19522
- drawerOpen,
19523
- onClick: () => onClick(view),
19524
- url: view.url,
19525
- name: view.name
19526
- },
19527
- `navigation_${index}`
19528
- ))
19529
- ]
19530
- },
19531
- `drawer_group_${group}`
19532
- )) }),
19514
+ className: "mt-4 flex-grow overflow-scroll no-scrollbar",
19515
+ style: {
19516
+ maskImage: "linear-gradient(to bottom, transparent 0, black 20px, black calc(100% - 20px), transparent 100%)"
19517
+ },
19518
+ children: groupsWithoutAdmin.map((group) => /* @__PURE__ */ jsxs(
19519
+ "div",
19520
+ {
19521
+ className: "bg-gray-50 dark:bg-gray-800 dark:bg-opacity-30 my-4 rounded-lg ml-4",
19522
+ children: [
19523
+ buildGroupHeader(group),
19524
+ Object.values(navigationEntries).filter((e) => e.group === group).map((view, index) => /* @__PURE__ */ jsx(
19525
+ DrawerNavigationItem,
19526
+ {
19527
+ icon: /* @__PURE__ */ jsx(IconForView, { collectionOrView: view.collection ?? view.view }),
19528
+ tooltipsOpen,
19529
+ adminMenuOpen,
19530
+ drawerOpen,
19531
+ onClick: () => onClick(view),
19532
+ url: view.url,
19533
+ name: view.name
19534
+ },
19535
+ `navigation_${index}`
19536
+ ))
19537
+ ]
19538
+ },
19539
+ `drawer_group_${group}`
19540
+ ))
19541
+ }
19542
+ ),
19533
19543
  adminViews.length > 0 && /* @__PURE__ */ jsx(
19534
19544
  Menu,
19535
19545
  {