@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.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", size === "smallest" ? "my-0.5" : "m-2 self-start"), children: [
5177
5177
  imageProperty && /* @__PURE__ */ jsx(
5178
5178
  PropertyPreview,
5179
5179
  {
@@ -5183,9 +5183,9 @@ 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
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-grow w-full m-1", children: [
5188
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col grow-1 w-full max-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(
5190
5190
  Typography,
5191
5191
  {
@@ -5289,7 +5289,7 @@ const EntityPreviewContainer = React.forwardRef(({
5289
5289
  fullwidth ? "w-full" : "",
5290
5290
  "items-center",
5291
5291
  hover ? "hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800" : "",
5292
- size === "smallest" ? "p-1" : "p-2",
5292
+ size === "smallest" ? "p-1" : "px-2 py-1",
5293
5293
  "flex border rounded-lg",
5294
5294
  onClick ? "cursor-pointer" : "",
5295
5295
  defaultBorderMixin,
@@ -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
  ),
@@ -12847,6 +12847,9 @@ function EntityIdHeaderWidget({
12847
12847
  {
12848
12848
  open: openPopup,
12849
12849
  onOpenChange: setOpenPopup,
12850
+ sideOffset: 0,
12851
+ align: "start",
12852
+ alignOffset: -117,
12850
12853
  trigger: /* @__PURE__ */ jsx(IconButton, { size: "small", children: /* @__PURE__ */ jsx(SearchIcon, { size: "small" }) }),
12851
12854
  children: /* @__PURE__ */ jsx(
12852
12855
  "form",
@@ -12874,7 +12877,7 @@ function EntityIdHeaderWidget({
12874
12877
  setSearchString(e.target.value);
12875
12878
  },
12876
12879
  value: searchString,
12877
- className: "flex-grow bg-transparent outline-none p-1"
12880
+ className: "flex-grow bg-transparent outline-none p-1 " + focusedDisabled
12878
12881
  }
12879
12882
  ),
12880
12883
  /* @__PURE__ */ jsx(
@@ -19319,7 +19322,7 @@ function DrawerWrapper(props) {
19319
19322
  children: /* @__PURE__ */ jsx(
19320
19323
  "div",
19321
19324
  {
19322
- className: "fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
19325
+ className: "ml-2 fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit z-20",
19323
19326
  children: /* @__PURE__ */ jsx(
19324
19327
  IconButton,
19325
19328
  {
@@ -19365,7 +19368,7 @@ function DrawerWrapper(props) {
19365
19368
  "aria-label": "Open drawer",
19366
19369
  onClick: () => props.setDrawerOpen(true),
19367
19370
  size: "large",
19368
- className: "absolute top-2 left-6",
19371
+ className: "absolute top-2 left-5",
19369
19372
  children: /* @__PURE__ */ jsx(MenuIcon, {})
19370
19373
  }
19371
19374
  ),
@@ -19419,18 +19422,18 @@ function DrawerNavigationItem({
19419
19422
  {
19420
19423
  onClick,
19421
19424
  style: {
19422
- width: !drawerOpen ? "72px" : "280px",
19425
+ width: "100%",
19423
19426
  transition: drawerOpen ? "width 150ms ease-in" : void 0
19424
19427
  },
19425
19428
  className: ({ isActive }) => cls(
19426
- "rounded-r-lg truncate",
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",
19429
+ "rounded-lg truncate",
19430
+ "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",
19428
19431
  "flex flex-row items-center mr-8",
19429
19432
  // "transition-all ease-in-out delay-100 duration-300",
19430
19433
  // drawerOpen ? "w-full" : "w-18",
19431
- drawerOpen ? "pl-8 h-12" : "pl-6 h-11",
19434
+ drawerOpen ? "pl-4 h-12" : "pl-4 h-11",
19432
19435
  "font-medium text-sm",
19433
- isActive ? "bg-slate-200 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-30" : ""
19436
+ isActive ? "bg-slate-200 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-50" : ""
19434
19437
  ),
19435
19438
  to: url,
19436
19439
  children: [
@@ -19483,11 +19486,11 @@ function DefaultDrawer({
19483
19486
  const adminViews = navigationEntries.filter((e) => e.type === "admin") ?? [];
19484
19487
  const groupsWithoutAdmin = groups.filter((g) => g !== "Admin");
19485
19488
  const buildGroupHeader = useCallback((group) => {
19486
- if (!drawerOpen) return /* @__PURE__ */ jsx("div", { className: "h-12 w-full" });
19489
+ if (!drawerOpen) return /* @__PURE__ */ jsx("div", { className: "w-full" });
19487
19490
  return /* @__PURE__ */ jsx(
19488
19491
  "div",
19489
19492
  {
19490
- className: "pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",
19493
+ className: "pl-6 pr-8 py-4 flex flex-row items-center",
19491
19494
  children: /* @__PURE__ */ jsx(
19492
19495
  Typography,
19493
19496
  {
@@ -19508,28 +19511,38 @@ function DefaultDrawer({
19508
19511
  };
19509
19512
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cls("flex flex-col h-full relative flex-grow w-full", className), style, children: [
19510
19513
  /* @__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,
19514
+ /* @__PURE__ */ jsx(
19515
+ "div",
19513
19516
  {
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
- )) }),
19517
+ className: "mt-4 flex-grow overflow-scroll no-scrollbar",
19518
+ style: {
19519
+ maskImage: "linear-gradient(to bottom, transparent 0, black 20px, black calc(100% - 20px), transparent 100%)"
19520
+ },
19521
+ children: groupsWithoutAdmin.map((group) => /* @__PURE__ */ jsxs(
19522
+ "div",
19523
+ {
19524
+ className: "bg-gray-50 dark:bg-gray-800 dark:bg-opacity-30 my-4 rounded-lg ml-4",
19525
+ children: [
19526
+ buildGroupHeader(group),
19527
+ Object.values(navigationEntries).filter((e) => e.group === group).map((view, index) => /* @__PURE__ */ jsx(
19528
+ DrawerNavigationItem,
19529
+ {
19530
+ icon: /* @__PURE__ */ jsx(IconForView, { collectionOrView: view.collection ?? view.view }),
19531
+ tooltipsOpen,
19532
+ adminMenuOpen,
19533
+ drawerOpen,
19534
+ onClick: () => onClick(view),
19535
+ url: view.url,
19536
+ name: view.name
19537
+ },
19538
+ `navigation_${index}`
19539
+ ))
19540
+ ]
19541
+ },
19542
+ `drawer_group_${group}`
19543
+ ))
19544
+ }
19545
+ ),
19533
19546
  adminViews.length > 0 && /* @__PURE__ */ jsx(
19534
19547
  Menu,
19535
19548
  {
@@ -19591,9 +19604,9 @@ function DrawerLogo({ logo }) {
19591
19604
  {
19592
19605
  style: {
19593
19606
  transition: "padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",
19594
- padding: drawerOpen ? "32px 144px 0px 24px" : "72px 16px 0px"
19607
+ padding: drawerOpen ? "32px 144px 0px 24px" : "72px 12px 0px 12px"
19595
19608
  },
19596
- className: cls("cursor-pointer"),
19609
+ className: cls("cursor-pointer ml-4"),
19597
19610
  children: /* @__PURE__ */ jsx(
19598
19611
  Tooltip,
19599
19612
  {