@firecms/ui 3.0.0-canary.136 → 3.0.0-canary.137

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/README.md CHANGED
@@ -89,7 +89,7 @@ navigating through **subcollections** and accessing custom views (such as custom
89
89
  forms or blog previews). This functionality can also be accessed
90
90
  programmatically using the `useSideEntityController` hook.
91
91
 
92
- FireCMS includes **over 15 built-in fields** with numerous customization and
92
+ FireCMS includes **over 20 built-in fields** with numerous customization and
93
93
  validation options. The components have been carefully designed for an
94
94
  outstanding user experience, including advanced features like **references** to
95
95
  other collections, **markdown**, and **array reordering**.
package/dist/index.css CHANGED
@@ -71,7 +71,3 @@
71
71
  a {
72
72
  @apply text-blue-600 dark:text-blue-400 dark:hover:text-blue-600 hover:text-blue-800
73
73
  }
74
-
75
- body {
76
- @apply w-full min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col items-center justify-center;
77
- }
package/dist/index.es.js CHANGED
@@ -389,7 +389,7 @@ const AvatarInner = ({
389
389
  ...props,
390
390
  className: cls(
391
391
  "rounded-full flex items-center justify-center overflow-hidden",
392
- "p-1 hover:bg-slate-200 hover:dark:bg-slate-700 w-12 h-12",
392
+ "p-1 hover:bg-slate-200 hover:dark:bg-slate-700 w-12 h-12 min-w-12 min-h-12",
393
393
  outerClassName
394
394
  ),
395
395
  children: src ? /* @__PURE__ */ jsx(
@@ -13917,7 +13917,7 @@ const DateTimeField = ({
13917
13917
  clearable ? "pr-14" : "pr-12",
13918
13918
  "rounded-md",
13919
13919
  size === "small" ? "min-h-[48px]" : "min-h-[64px]",
13920
- label ? "pt-[28px] pb-2" : "py-2",
13920
+ label ? "pt-8 pb-2" : "py-2",
13921
13921
  inputClassName,
13922
13922
  disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-slate-600 dark:text-slate-500"
13923
13923
  )
@@ -14931,7 +14931,7 @@ function DialogContent({
14931
14931
  return /* @__PURE__ */ jsx(
14932
14932
  "div",
14933
14933
  {
14934
- className: cls("py-6 px-6 h-full flex-grow", className),
14934
+ className: cls("my-6 mx-6 h-full flex-grow", className),
14935
14935
  children
14936
14936
  }
14937
14937
  );
@@ -14940,14 +14940,14 @@ function DialogTitle({
14940
14940
  children,
14941
14941
  hidden,
14942
14942
  className,
14943
- variant = "h4",
14943
+ variant = "subtitle2",
14944
14944
  ...props
14945
14945
  }) {
14946
14946
  const title = /* @__PURE__ */ jsx(DialogPrimitive.Title, { asChild: true, children: /* @__PURE__ */ jsx(
14947
14947
  Typography,
14948
14948
  {
14949
14949
  variant,
14950
- className,
14950
+ className: cls("mt-8 mb-6 mx-6", className),
14951
14951
  ...props,
14952
14952
  children
14953
14953
  }
@@ -15034,6 +15034,8 @@ function ExpandablePanel({
15034
15034
  "rounded-t flex items-center justify-between w-full min-h-[52px]",
15035
15035
  "hover:bg-slate-200 hover:bg-opacity-20 dark:hover:bg-gray-800 dark:hover:bg-opacity-20",
15036
15036
  invisible ? "border-b px-2" : "p-4",
15037
+ open ? "py-6" : "py-4",
15038
+ "transition-all duration-200",
15037
15039
  invisible && defaultBorderMixin,
15038
15040
  asField && fieldBackgroundMixin,
15039
15041
  titleClassName
@@ -15569,7 +15571,7 @@ const MultiSelect = React.forwardRef(
15569
15571
  invisible,
15570
15572
  disabled,
15571
15573
  placeholder,
15572
- modalPopover = false,
15574
+ modalPopover = true,
15573
15575
  includeClear = true,
15574
15576
  useChips = true,
15575
15577
  className,
@@ -16037,7 +16039,7 @@ const Select = forwardRef(({
16037
16039
  onChange(event);
16038
16040
  }
16039
16041
  }, [onChange, value, onValueChange]);
16040
- const hasValue = Array.isArray(value) ? value.length > 0 : value != null;
16042
+ const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
16041
16043
  return /* @__PURE__ */ jsxs(
16042
16044
  SelectPrimitive.Root,
16043
16045
  {
@@ -16053,84 +16055,78 @@ const Select = forwardRef(({
16053
16055
  ...props,
16054
16056
  children: [
16055
16057
  typeof label === "string" ? /* @__PURE__ */ jsx(SelectInputLabel, { error, children: label }) : label,
16056
- /* @__PURE__ */ jsxs(
16057
- "div",
16058
+ /* @__PURE__ */ jsx("div", { className: cls(
16059
+ size === "small" ? "min-h-[42px]" : "min-h-[64px]",
16060
+ "select-none rounded-md text-sm",
16061
+ invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
16062
+ disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16063
+ "relative flex items-center",
16064
+ className
16065
+ ), children: /* @__PURE__ */ jsxs(
16066
+ SelectPrimitive.Trigger,
16058
16067
  {
16068
+ ref: inputRef,
16069
+ id,
16059
16070
  className: cls(
16060
- size === "small" ? "min-h-[42px]" : "min-h-[64px]",
16071
+ "w-full h-full",
16072
+ size === "small" ? "h-[42px]" : "h-[64px]",
16073
+ padding ? "px-4 " : "",
16074
+ "outline-none focus:outline-none",
16061
16075
  "select-none rounded-md text-sm",
16062
- invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
16063
- disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16064
- "relative flex items-center",
16065
- className
16076
+ error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
16077
+ error ? "border border-red-500 dark:border-red-600" : "",
16078
+ disabled ? "text-slate-600 dark:text-slate-400" : "text-slate-800 dark:text-white",
16079
+ "relative flex flex-row items-center",
16080
+ inputClassName
16066
16081
  ),
16067
16082
  children: [
16068
- /* @__PURE__ */ jsxs(
16069
- SelectPrimitive.Trigger,
16083
+ /* @__PURE__ */ jsx(
16084
+ "div",
16070
16085
  {
16071
- ref: inputRef,
16072
- id,
16086
+ ref,
16073
16087
  className: cls(
16074
- "w-full h-full",
16075
- size === "small" ? "h-[42px]" : "h-[64px]",
16076
- padding ? "px-4 " : "",
16077
- "outline-none focus:outline-none",
16078
- "select-none rounded-md text-sm",
16079
- error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
16080
- error ? "border border-red-500 dark:border-red-600" : "",
16081
- disabled ? "text-slate-600 dark:text-slate-400" : "text-slate-800 dark:text-white",
16082
- "relative flex items-center",
16083
- inputClassName
16088
+ "flex-grow w-full max-w-full flex flex-row gap-2 items-center",
16089
+ "overflow-visible",
16090
+ size === "small" ? "h-[42px]" : "h-[64px]"
16084
16091
  ),
16085
- onClick: (e) => {
16086
- e.preventDefault();
16087
- e.stopPropagation();
16088
- },
16089
- children: [
16090
- /* @__PURE__ */ jsx(
16091
- "div",
16092
- {
16093
- ref,
16094
- className: cls(
16095
- "flex-grow w-full max-w-full flex flex-row gap-2 items-center",
16096
- "overflow-visible",
16097
- size === "small" ? "h-[42px]" : "h-[64px]"
16098
- ),
16099
- children: /* @__PURE__ */ jsxs(
16100
- SelectPrimitive.Value,
16101
- {
16102
- onClick: (e) => {
16103
- e.preventDefault();
16104
- e.stopPropagation();
16105
- },
16106
- placeholder,
16107
- className: "w-full",
16108
- children: [
16109
- hasValue && value && renderValue ? renderValue(value) : placeholder,
16110
- hasValue && !renderValue && value
16111
- ]
16112
- }
16113
- )
16114
- }
16115
- ),
16116
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsx(ExpandMoreIcon, { size: "small", className: cls("transition", open ? "rotate-180" : "") }) })
16117
- ]
16092
+ children: /* @__PURE__ */ jsxs(
16093
+ SelectPrimitive.Value,
16094
+ {
16095
+ onClick: (e) => {
16096
+ e.preventDefault();
16097
+ e.stopPropagation();
16098
+ },
16099
+ placeholder,
16100
+ className: "w-full",
16101
+ children: [
16102
+ hasValue && value && renderValue ? renderValue(value) : placeholder,
16103
+ hasValue && !renderValue && value
16104
+ ]
16105
+ }
16106
+ )
16118
16107
  }
16119
16108
  ),
16120
16109
  endAdornment && /* @__PURE__ */ jsx(
16121
16110
  "div",
16122
16111
  {
16123
- className: cls("absolute h-full flex items-center", size === "small" ? "right-10" : "right-14"),
16112
+ className: cls("h-full flex items-center"),
16124
16113
  onClick: (e) => {
16125
16114
  e.preventDefault();
16126
16115
  e.stopPropagation();
16127
16116
  },
16128
16117
  children: endAdornment
16129
16118
  }
16130
- )
16119
+ ),
16120
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(
16121
+ ExpandMoreIcon,
16122
+ {
16123
+ size: "small",
16124
+ className: cls("px-2 transition", open ? "rotate-180" : "")
16125
+ }
16126
+ ) })
16131
16127
  ]
16132
16128
  }
16133
- ),
16129
+ ) }),
16134
16130
  /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
16135
16131
  SelectPrimitive.Content,
16136
16132
  {
@@ -16162,10 +16158,6 @@ function SelectItem({
16162
16158
  {
16163
16159
  value,
16164
16160
  disabled,
16165
- onClick: (e) => {
16166
- e.preventDefault();
16167
- e.stopPropagation();
16168
- },
16169
16161
  className: cls(
16170
16162
  "w-full",
16171
16163
  "relative flex items-center p-2 rounded-md text-sm text-slate-700 dark:text-slate-300",
@@ -16345,8 +16337,7 @@ const Sheet = ({
16345
16337
  ),
16346
16338
  style: {
16347
16339
  pointerEvents: displayed ? "auto" : "none"
16348
- },
16349
- onClick: () => onOpenChange && onOpenChange(false)
16340
+ }
16350
16341
  }
16351
16342
  ),
16352
16343
  /* @__PURE__ */ jsx(
@@ -16661,7 +16652,7 @@ function TextField({
16661
16652
  style: inputStyle,
16662
16653
  className: cls(
16663
16654
  invisible ? focusedInvisibleMixin : "",
16664
- "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-[28px]",
16655
+ "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8",
16665
16656
  disabled && "border border-transparent outline-none opacity-50 text-slate-600 dark:text-slate-500"
16666
16657
  )
16667
16658
  }
@@ -16679,7 +16670,7 @@ function TextField({
16679
16670
  invisible ? focusedInvisibleMixin : "",
16680
16671
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16681
16672
  size === "smallest" ? "min-h-[32px]" : size === "small" ? "min-h-[48px]" : "min-h-[64px]",
16682
- label ? size === "medium" ? "pt-[28px] pb-2" : "pt-4 pb-2" : "py-2",
16673
+ label ? size === "medium" ? "pt-8 pb-2" : "pt-4 pb-2" : "py-2",
16683
16674
  focused ? "text-text-primary dark:text-text-primary-dark" : "",
16684
16675
  endAdornment ? "pr-10" : "pr-3",
16685
16676
  disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-slate-800 dark:text-white",