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

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.umd.js CHANGED
@@ -5177,7 +5177,7 @@
5177
5177
  hover: disabled ? void 0 : hover,
5178
5178
  size,
5179
5179
  children: [
5180
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("w-10 h-10 mr-2 shrink-0 grow-0", size === "smallest" ? "my-0.5" : "m-2 self-start"), children: [
5180
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("flex w-10 h-10 mr-2 shrink-0", size === "smallest" ? "my-0.5" : "m-2 self-start"), children: [
5181
5181
  imageProperty && /* @__PURE__ */ jsxRuntime.jsx(
5182
5182
  PropertyPreview,
5183
5183
  {
@@ -5187,9 +5187,9 @@
5187
5187
  value: getValueInPath(entity.values, imagePropertyKey)
5188
5188
  }
5189
5189
  ),
5190
- !imageProperty && /* @__PURE__ */ jsxRuntime.jsx(IconForView, { collectionOrView: collection, size, className: "mr-2" })
5190
+ !imageProperty && /* @__PURE__ */ jsxRuntime.jsx(IconForView, { collectionOrView: collection, size, className: "m-auto" })
5191
5191
  ] }),
5192
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-grow w-full m-1", children: [
5192
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col grow-1 w-full max-w-full m-1", children: [
5193
5193
  size !== "smallest" && includeId && (entity ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${size !== "medium" ? "block whitespace-nowrap overflow-hidden truncate" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(
5194
5194
  ui.Typography,
5195
5195
  {
@@ -5293,7 +5293,7 @@
5293
5293
  fullwidth ? "w-full" : "",
5294
5294
  "items-center",
5295
5295
  hover ? "hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800" : "",
5296
- size === "smallest" ? "p-1" : "p-2",
5296
+ size === "smallest" ? "p-1" : "px-2 py-1",
5297
5297
  "flex border rounded-lg",
5298
5298
  onClick ? "cursor-pointer" : "",
5299
5299
  ui.defaultBorderMixin,
@@ -7247,7 +7247,7 @@
7247
7247
  EntityPreviewContainer,
7248
7248
  {
7249
7249
  className: ui.cls(
7250
- "p-4 text-sm font-medium flex items-center uppercase",
7250
+ "px-4 py-2 text-sm font-medium flex items-center uppercase",
7251
7251
  multiselect ? "gap-4" : "gap-6",
7252
7252
  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"
7253
7253
  ),
@@ -12851,6 +12851,9 @@
12851
12851
  {
12852
12852
  open: openPopup,
12853
12853
  onOpenChange: setOpenPopup,
12854
+ sideOffset: 0,
12855
+ align: "start",
12856
+ alignOffset: -117,
12854
12857
  trigger: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(ui.SearchIcon, { size: "small" }) }),
12855
12858
  children: /* @__PURE__ */ jsxRuntime.jsx(
12856
12859
  "form",
@@ -12878,7 +12881,7 @@
12878
12881
  setSearchString(e.target.value);
12879
12882
  },
12880
12883
  value: searchString,
12881
- className: "flex-grow bg-transparent outline-none p-1"
12884
+ className: "flex-grow bg-transparent outline-none p-1 " + ui.focusedDisabled
12882
12885
  }
12883
12886
  ),
12884
12887
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -19323,7 +19326,7 @@
19323
19326
  children: /* @__PURE__ */ jsxRuntime.jsx(
19324
19327
  "div",
19325
19328
  {
19326
- className: "fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
19329
+ className: "ml-2 fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
19327
19330
  children: /* @__PURE__ */ jsxRuntime.jsx(
19328
19331
  ui.IconButton,
19329
19332
  {
@@ -19369,7 +19372,7 @@
19369
19372
  "aria-label": "Open drawer",
19370
19373
  onClick: () => props.setDrawerOpen(true),
19371
19374
  size: "large",
19372
- className: "absolute top-2 left-6",
19375
+ className: "absolute top-2 left-5",
19373
19376
  children: /* @__PURE__ */ jsxRuntime.jsx(ui.MenuIcon, {})
19374
19377
  }
19375
19378
  ),
@@ -19423,18 +19426,18 @@
19423
19426
  {
19424
19427
  onClick,
19425
19428
  style: {
19426
- width: !drawerOpen ? "72px" : "280px",
19429
+ width: "100%",
19427
19430
  transition: drawerOpen ? "width 150ms ease-in" : void 0
19428
19431
  },
19429
19432
  className: ({ isActive }) => ui.cls(
19430
- "rounded-r-lg truncate",
19431
- "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",
19433
+ "rounded-lg truncate",
19434
+ "hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-slate-800 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white",
19432
19435
  "flex flex-row items-center mr-8",
19433
19436
  // "transition-all ease-in-out delay-100 duration-300",
19434
19437
  // drawerOpen ? "w-full" : "w-18",
19435
- drawerOpen ? "pl-8 h-12" : "pl-6 h-11",
19438
+ drawerOpen ? "pl-4 h-12" : "pl-4 h-11",
19436
19439
  "font-medium text-sm",
19437
- isActive ? "bg-slate-200 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-30" : ""
19440
+ isActive ? "bg-slate-200 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-50" : ""
19438
19441
  ),
19439
19442
  to: url,
19440
19443
  children: [
@@ -19487,11 +19490,11 @@
19487
19490
  const adminViews = navigationEntries.filter((e) => e.type === "admin") ?? [];
19488
19491
  const groupsWithoutAdmin = groups.filter((g) => g !== "Admin");
19489
19492
  const buildGroupHeader = React.useCallback((group) => {
19490
- if (!drawerOpen) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 w-full" });
19493
+ if (!drawerOpen) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full" });
19491
19494
  return /* @__PURE__ */ jsxRuntime.jsx(
19492
19495
  "div",
19493
19496
  {
19494
- className: "pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",
19497
+ className: "pl-6 pr-8 py-4 flex flex-row items-center",
19495
19498
  children: /* @__PURE__ */ jsxRuntime.jsx(
19496
19499
  ui.Typography,
19497
19500
  {
@@ -19512,28 +19515,38 @@
19512
19515
  };
19513
19516
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("flex flex-col h-full relative flex-grow w-full", className), style, children: [
19514
19517
  /* @__PURE__ */ jsxRuntime.jsx(DrawerLogo, { logo }),
19515
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow overflow-scroll no-scrollbar", children: groupsWithoutAdmin.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(
19516
- React.Fragment,
19518
+ /* @__PURE__ */ jsxRuntime.jsx(
19519
+ "div",
19517
19520
  {
19518
- children: [
19519
- buildGroupHeader(group),
19520
- Object.values(navigationEntries).filter((e) => e.group === group).map((view, index) => /* @__PURE__ */ jsxRuntime.jsx(
19521
- DrawerNavigationItem,
19522
- {
19523
- icon: /* @__PURE__ */ jsxRuntime.jsx(IconForView, { collectionOrView: view.collection ?? view.view }),
19524
- tooltipsOpen,
19525
- adminMenuOpen,
19526
- drawerOpen,
19527
- onClick: () => onClick(view),
19528
- url: view.url,
19529
- name: view.name
19530
- },
19531
- `navigation_${index}`
19532
- ))
19533
- ]
19534
- },
19535
- `drawer_group_${group}`
19536
- )) }),
19521
+ className: "mt-4 flex-grow overflow-scroll no-scrollbar",
19522
+ style: {
19523
+ maskImage: "linear-gradient(to bottom, transparent 0, black 20px, black calc(100% - 20px), transparent 100%)"
19524
+ },
19525
+ children: groupsWithoutAdmin.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(
19526
+ "div",
19527
+ {
19528
+ className: "bg-gray-50 dark:bg-gray-800 dark:bg-opacity-30 my-4 rounded-lg ml-4",
19529
+ children: [
19530
+ buildGroupHeader(group),
19531
+ Object.values(navigationEntries).filter((e) => e.group === group).map((view, index) => /* @__PURE__ */ jsxRuntime.jsx(
19532
+ DrawerNavigationItem,
19533
+ {
19534
+ icon: /* @__PURE__ */ jsxRuntime.jsx(IconForView, { collectionOrView: view.collection ?? view.view }),
19535
+ tooltipsOpen,
19536
+ adminMenuOpen,
19537
+ drawerOpen,
19538
+ onClick: () => onClick(view),
19539
+ url: view.url,
19540
+ name: view.name
19541
+ },
19542
+ `navigation_${index}`
19543
+ ))
19544
+ ]
19545
+ },
19546
+ `drawer_group_${group}`
19547
+ ))
19548
+ }
19549
+ ),
19537
19550
  adminViews.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
19538
19551
  ui.Menu,
19539
19552
  {
@@ -19595,9 +19608,9 @@
19595
19608
  {
19596
19609
  style: {
19597
19610
  transition: "padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
19598
- padding: drawerOpen ? "32px 144px 0px 24px" : "72px 16px 0px"
19611
+ padding: drawerOpen ? "32px 144px 0px 24px" : "72px 12px 0px 12px"
19599
19612
  },
19600
- className: ui.cls("cursor-pointer"),
19613
+ className: ui.cls("cursor-pointer ml-4"),
19601
19614
  children: /* @__PURE__ */ jsxRuntime.jsx(
19602
19615
  ui.Tooltip,
19603
19616
  {