@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/dist/index.umd.js CHANGED
@@ -399,7 +399,7 @@
399
399
  ...props,
400
400
  className: cls(
401
401
  "rounded-full flex items-center justify-center overflow-hidden",
402
- "p-1 hover:bg-slate-200 hover:dark:bg-slate-700 w-12 h-12",
402
+ "p-1 hover:bg-slate-200 hover:dark:bg-slate-700 w-12 h-12 min-w-12 min-h-12",
403
403
  outerClassName
404
404
  ),
405
405
  children: src ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -13927,7 +13927,7 @@
13927
13927
  clearable ? "pr-14" : "pr-12",
13928
13928
  "rounded-md",
13929
13929
  size === "small" ? "min-h-[48px]" : "min-h-[64px]",
13930
- label ? "pt-[28px] pb-2" : "py-2",
13930
+ label ? "pt-8 pb-2" : "py-2",
13931
13931
  inputClassName,
13932
13932
  disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-slate-600 dark:text-slate-500"
13933
13933
  )
@@ -14941,7 +14941,7 @@
14941
14941
  return /* @__PURE__ */ jsxRuntime.jsx(
14942
14942
  "div",
14943
14943
  {
14944
- className: cls("py-6 px-6 h-full flex-grow", className),
14944
+ className: cls("my-6 mx-6 h-full flex-grow", className),
14945
14945
  children
14946
14946
  }
14947
14947
  );
@@ -14950,14 +14950,14 @@
14950
14950
  children,
14951
14951
  hidden,
14952
14952
  className,
14953
- variant = "h4",
14953
+ variant = "subtitle2",
14954
14954
  ...props
14955
14955
  }) {
14956
14956
  const title = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
14957
14957
  Typography,
14958
14958
  {
14959
14959
  variant,
14960
- className,
14960
+ className: cls("mt-8 mb-6 mx-6", className),
14961
14961
  ...props,
14962
14962
  children
14963
14963
  }
@@ -15044,6 +15044,8 @@
15044
15044
  "rounded-t flex items-center justify-between w-full min-h-[52px]",
15045
15045
  "hover:bg-slate-200 hover:bg-opacity-20 dark:hover:bg-gray-800 dark:hover:bg-opacity-20",
15046
15046
  invisible ? "border-b px-2" : "p-4",
15047
+ open ? "py-6" : "py-4",
15048
+ "transition-all duration-200",
15047
15049
  invisible && defaultBorderMixin,
15048
15050
  asField && fieldBackgroundMixin,
15049
15051
  titleClassName
@@ -15579,7 +15581,7 @@
15579
15581
  invisible,
15580
15582
  disabled,
15581
15583
  placeholder,
15582
- modalPopover = false,
15584
+ modalPopover = true,
15583
15585
  includeClear = true,
15584
15586
  useChips = true,
15585
15587
  className,
@@ -16047,7 +16049,7 @@
16047
16049
  onChange(event);
16048
16050
  }
16049
16051
  }, [onChange, value, onValueChange]);
16050
- const hasValue = Array.isArray(value) ? value.length > 0 : value != null;
16052
+ const hasValue = Array.isArray(value) ? value.length > 0 : value != null && value !== "" && value !== void 0;
16051
16053
  return /* @__PURE__ */ jsxRuntime.jsxs(
16052
16054
  SelectPrimitive__namespace.Root,
16053
16055
  {
@@ -16063,84 +16065,78 @@
16063
16065
  ...props,
16064
16066
  children: [
16065
16067
  typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(SelectInputLabel, { error, children: label }) : label,
16066
- /* @__PURE__ */ jsxRuntime.jsxs(
16067
- "div",
16068
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls(
16069
+ size === "small" ? "min-h-[42px]" : "min-h-[64px]",
16070
+ "select-none rounded-md text-sm",
16071
+ invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
16072
+ disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16073
+ "relative flex items-center",
16074
+ className
16075
+ ), children: /* @__PURE__ */ jsxRuntime.jsxs(
16076
+ SelectPrimitive__namespace.Trigger,
16068
16077
  {
16078
+ ref: inputRef,
16079
+ id,
16069
16080
  className: cls(
16070
- size === "small" ? "min-h-[42px]" : "min-h-[64px]",
16081
+ "w-full h-full",
16082
+ size === "small" ? "h-[42px]" : "h-[64px]",
16083
+ padding ? "px-4 " : "",
16084
+ "outline-none focus:outline-none",
16071
16085
  "select-none rounded-md text-sm",
16072
- invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin,
16073
- disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16074
- "relative flex items-center",
16075
- className
16086
+ error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
16087
+ error ? "border border-red-500 dark:border-red-600" : "",
16088
+ disabled ? "text-slate-600 dark:text-slate-400" : "text-slate-800 dark:text-white",
16089
+ "relative flex flex-row items-center",
16090
+ inputClassName
16076
16091
  ),
16077
16092
  children: [
16078
- /* @__PURE__ */ jsxRuntime.jsxs(
16079
- SelectPrimitive__namespace.Trigger,
16093
+ /* @__PURE__ */ jsxRuntime.jsx(
16094
+ "div",
16080
16095
  {
16081
- ref: inputRef,
16082
- id,
16096
+ ref,
16083
16097
  className: cls(
16084
- "w-full h-full",
16085
- size === "small" ? "h-[42px]" : "h-[64px]",
16086
- padding ? "px-4 " : "",
16087
- "outline-none focus:outline-none",
16088
- "select-none rounded-md text-sm",
16089
- error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
16090
- error ? "border border-red-500 dark:border-red-600" : "",
16091
- disabled ? "text-slate-600 dark:text-slate-400" : "text-slate-800 dark:text-white",
16092
- "relative flex items-center",
16093
- inputClassName
16098
+ "flex-grow w-full max-w-full flex flex-row gap-2 items-center",
16099
+ "overflow-visible",
16100
+ size === "small" ? "h-[42px]" : "h-[64px]"
16094
16101
  ),
16095
- onClick: (e) => {
16096
- e.preventDefault();
16097
- e.stopPropagation();
16098
- },
16099
- children: [
16100
- /* @__PURE__ */ jsxRuntime.jsx(
16101
- "div",
16102
- {
16103
- ref,
16104
- className: cls(
16105
- "flex-grow w-full max-w-full flex flex-row gap-2 items-center",
16106
- "overflow-visible",
16107
- size === "small" ? "h-[42px]" : "h-[64px]"
16108
- ),
16109
- children: /* @__PURE__ */ jsxRuntime.jsxs(
16110
- SelectPrimitive__namespace.Value,
16111
- {
16112
- onClick: (e) => {
16113
- e.preventDefault();
16114
- e.stopPropagation();
16115
- },
16116
- placeholder,
16117
- className: "w-full",
16118
- children: [
16119
- hasValue && value && renderValue ? renderValue(value) : placeholder,
16120
- hasValue && !renderValue && value
16121
- ]
16122
- }
16123
- )
16124
- }
16125
- ),
16126
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { className: cls("px-2 h-full flex items-center"), children: /* @__PURE__ */ jsxRuntime.jsx(ExpandMoreIcon, { size: "small", className: cls("transition", open ? "rotate-180" : "") }) })
16127
- ]
16102
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
16103
+ SelectPrimitive__namespace.Value,
16104
+ {
16105
+ onClick: (e) => {
16106
+ e.preventDefault();
16107
+ e.stopPropagation();
16108
+ },
16109
+ placeholder,
16110
+ className: "w-full",
16111
+ children: [
16112
+ hasValue && value && renderValue ? renderValue(value) : placeholder,
16113
+ hasValue && !renderValue && value
16114
+ ]
16115
+ }
16116
+ )
16128
16117
  }
16129
16118
  ),
16130
16119
  endAdornment && /* @__PURE__ */ jsxRuntime.jsx(
16131
16120
  "div",
16132
16121
  {
16133
- className: cls("absolute h-full flex items-center", size === "small" ? "right-10" : "right-14"),
16122
+ className: cls("h-full flex items-center"),
16134
16123
  onClick: (e) => {
16135
16124
  e.preventDefault();
16136
16125
  e.stopPropagation();
16137
16126
  },
16138
16127
  children: endAdornment
16139
16128
  }
16140
- )
16129
+ ),
16130
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
16131
+ ExpandMoreIcon,
16132
+ {
16133
+ size: "small",
16134
+ className: cls("px-2 transition", open ? "rotate-180" : "")
16135
+ }
16136
+ ) })
16141
16137
  ]
16142
16138
  }
16143
- ),
16139
+ ) }),
16144
16140
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
16145
16141
  SelectPrimitive__namespace.Content,
16146
16142
  {
@@ -16172,10 +16168,6 @@
16172
16168
  {
16173
16169
  value,
16174
16170
  disabled,
16175
- onClick: (e) => {
16176
- e.preventDefault();
16177
- e.stopPropagation();
16178
- },
16179
16171
  className: cls(
16180
16172
  "w-full",
16181
16173
  "relative flex items-center p-2 rounded-md text-sm text-slate-700 dark:text-slate-300",
@@ -16355,8 +16347,7 @@
16355
16347
  ),
16356
16348
  style: {
16357
16349
  pointerEvents: displayed ? "auto" : "none"
16358
- },
16359
- onClick: () => onOpenChange && onOpenChange(false)
16350
+ }
16360
16351
  }
16361
16352
  ),
16362
16353
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16671,7 +16662,7 @@
16671
16662
  style: inputStyle,
16672
16663
  className: cls(
16673
16664
  invisible ? focusedInvisibleMixin : "",
16674
- "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-[28px]",
16665
+ "rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8",
16675
16666
  disabled && "border border-transparent outline-none opacity-50 text-slate-600 dark:text-slate-500"
16676
16667
  )
16677
16668
  }
@@ -16689,7 +16680,7 @@
16689
16680
  invisible ? focusedInvisibleMixin : "",
16690
16681
  disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin,
16691
16682
  size === "smallest" ? "min-h-[32px]" : size === "small" ? "min-h-[48px]" : "min-h-[64px]",
16692
- label ? size === "medium" ? "pt-[28px] pb-2" : "pt-4 pb-2" : "py-2",
16683
+ label ? size === "medium" ? "pt-8 pb-2" : "pt-4 pb-2" : "py-2",
16693
16684
  focused ? "text-text-primary dark:text-text-primary-dark" : "",
16694
16685
  endAdornment ? "pr-10" : "pr-3",
16695
16686
  disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-slate-800 dark:text-white",