@firecms/ui 3.0.0-canary.135 → 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 +1 -1
- package/dist/index.css +1 -5
- package/dist/index.es.js +67 -76
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +67 -76
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +3 -3
- package/package.json +2 -2
- package/src/components/Autocomplete.tsx +1 -0
- package/src/components/Avatar.tsx +1 -1
- package/src/components/BooleanSwitchWithLabel.tsx +1 -0
- package/src/components/Button.tsx +1 -1
- package/src/components/Card.tsx +1 -0
- package/src/components/Collapse.tsx +1 -0
- package/src/components/DateTimeField.tsx +2 -1
- package/src/components/DebouncedTextField.tsx +1 -0
- package/src/components/Dialog.tsx +1 -0
- package/src/components/DialogContent.tsx +1 -1
- package/src/components/DialogTitle.tsx +3 -2
- package/src/components/ExpandablePanel.tsx +3 -0
- package/src/components/FileUpload.tsx +1 -0
- package/src/components/InputLabel.tsx +0 -1
- package/src/components/Markdown.tsx +1 -0
- package/src/components/MultiSelect.tsx +2 -1
- package/src/components/Popover.tsx +1 -0
- package/src/components/SearchBar.tsx +1 -0
- package/src/components/Select.tsx +21 -28
- package/src/components/Sheet.tsx +1 -1
- package/src/components/TextField.tsx +3 -2
- package/src/components/TextareaAutosize.tsx +1 -0
- package/src/components/Tooltip.tsx +1 -0
- package/src/index.css +1 -5
- package/src/styles.ts +3 -3
- package/dist/components/_MultiSelect.d.ts +0 -0
- package/src/components/_MultiSelect.tsx +0 -222
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
|
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
@@ -60,7 +60,7 @@
|
|
60
60
|
}
|
61
61
|
|
62
62
|
.typography-button {
|
63
|
-
@apply text-sm font-
|
63
|
+
@apply text-sm font-semibold uppercase;
|
64
64
|
}
|
65
65
|
|
66
66
|
|
@@ -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
@@ -33,9 +33,9 @@ const fieldBackgroundMixin = "bg-opacity-50 bg-slate-200 dark:bg-gray-800 dark:b
|
|
33
33
|
const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-slate-100 dark:bg-gray-800 dark:bg-opacity-0";
|
34
34
|
const fieldBackgroundDisabledMixin = "dark:bg-gray-800 bg-opacity-50 dark:bg-opacity-90";
|
35
35
|
const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-gray-700 dark:hover:bg-opacity-40";
|
36
|
-
const defaultBorderMixin = "border-gray-200 border-opacity-40 dark:border-gray-700 dark:border-opacity-
|
37
|
-
const paperMixin = "bg-white rounded-md dark:bg-gray-950 border border-gray-200 border-opacity-40 dark:border-gray-700 dark:border-opacity-
|
38
|
-
const cardMixin = "bg-white border border-gray-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-gray-950 dark:border-gray-700 dark:border-opacity-
|
36
|
+
const defaultBorderMixin = "border-gray-200 border-opacity-40 dark:border-gray-700 dark:border-opacity-40";
|
37
|
+
const paperMixin = "bg-white rounded-md dark:bg-gray-950 border border-gray-200 border-opacity-40 dark:border-gray-700 dark:border-opacity-40";
|
38
|
+
const cardMixin = "bg-white border border-gray-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-gray-950 dark:border-gray-700 dark:border-opacity-40 m-1 -p-1";
|
39
39
|
const cardClickableMixin = "hover:bg-primary-bg dark:hover:bg-primary-bg hover:bg-opacity-20 dark:hover:bg-opacity-20 hover:ring-2 hover:ring-primary cursor-pointer";
|
40
40
|
const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
|
41
41
|
function cls(...classes) {
|
@@ -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(
|
@@ -571,7 +571,7 @@ const ButtonInner = React__default.forwardRef(({
|
|
571
571
|
color = "primary",
|
572
572
|
...props
|
573
573
|
}, ref) => {
|
574
|
-
const baseClasses2 = "h-fit rounded-md
|
574
|
+
const baseClasses2 = "typography-button h-fit rounded-md whitespace-nowrap inline-flex items-center justify-center p-2 px-4 focus:outline-none transition ease-in-out duration-150 gap-2";
|
575
575
|
const buttonClasses2 = cls({
|
576
576
|
"w-full": fullWidth,
|
577
577
|
"w-fit": !fullWidth,
|
@@ -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-
|
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("
|
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 = "
|
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 =
|
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__ */
|
16057
|
-
"
|
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
|
-
|
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
|
-
|
16063
|
-
|
16064
|
-
"
|
16065
|
-
|
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__ */
|
16069
|
-
|
16083
|
+
/* @__PURE__ */ jsx(
|
16084
|
+
"div",
|
16070
16085
|
{
|
16071
|
-
ref
|
16072
|
-
id,
|
16086
|
+
ref,
|
16073
16087
|
className: cls(
|
16074
|
-
"w-full
|
16075
|
-
|
16076
|
-
|
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
|
-
|
16086
|
-
|
16087
|
-
|
16088
|
-
|
16089
|
-
|
16090
|
-
|
16091
|
-
|
16092
|
-
|
16093
|
-
|
16094
|
-
|
16095
|
-
|
16096
|
-
|
16097
|
-
|
16098
|
-
|
16099
|
-
|
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("
|
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-
|
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-
|
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",
|