@firecms/ui 3.0.0-canary.68 → 3.0.0-canary.69
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 +22 -23
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +2 -2
- package/package.json +2 -2
- package/src/components/FileUpload.tsx +3 -5
- package/src/styles.ts +2 -2
package/dist/index.es.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as e, jsxs as p, Fragment as J } from "react/jsx-runtime";
|
2
2
|
import * as g from "react";
|
3
|
-
import k, { useEffect as R, useState as
|
3
|
+
import k, { useEffect as R, useState as G, useCallback as un, useRef as cn, useMemo as Hn, useLayoutEffect as Wn, useDeferredValue as zn } from "react";
|
4
4
|
import * as en from "@radix-ui/react-collapsible";
|
5
5
|
import { clsx as qn } from "clsx";
|
6
6
|
import { twMerge as Vn } from "tailwind-merge";
|
@@ -23,7 +23,7 @@ import * as Zn from "react-dom";
|
|
23
23
|
import * as Y from "@radix-ui/react-tooltip";
|
24
24
|
import * as dn from "@radix-ui/react-tabs";
|
25
25
|
import * as Z from "@radix-ui/react-popover";
|
26
|
-
const P = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-transparent", gn = "focus:bg-opacity-70 focus:bg-slate-100 focus:dark:bg-gray-800 focus:dark:bg-opacity-60", Kn = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ",
|
26
|
+
const P = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-transparent", gn = "focus:bg-opacity-70 focus:bg-slate-100 focus:dark:bg-gray-800 focus:dark:bg-opacity-60", Kn = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ", V = "bg-opacity-50 bg-slate-200 dark:bg-gray-800 dark:bg-opacity-60", vn = "bg-opacity-0 bg-slate-100 dark:bg-gray-800 dark:bg-opacity-0", j = "dark:bg-gray-800 bg-opacity-80 dark:bg-opacity-90", U = "hover:bg-opacity-70 dark:hover:bg-gray-700 dark:hover:bg-opacity-60", Q = "border-gray-100 dark:border-gray-800 dark:border-opacity-80", $ = "bg-white rounded-md dark:bg-gray-950 border dark:border-gray-800 dark:border-opacity-80 border-gray-100", Xn = "bg-white border border-gray-100 dark:border-transparent rounded-md dark:bg-gray-950 dark:border-gray-800 dark:border-opacity-50 m-1 -p-1", ne = "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", co = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
|
27
27
|
function u(...n) {
|
28
28
|
return Vn(qn(n));
|
29
29
|
}
|
@@ -132,7 +132,7 @@ function Sn(n) {
|
|
132
132
|
return n instanceof HTMLElement ? n.getAttribute("role") === "presentation" ? !0 : Sn(n.parentNode) : !1;
|
133
133
|
}
|
134
134
|
function re(n, t = 300) {
|
135
|
-
const [r, i] =
|
135
|
+
const [r, i] = G(n);
|
136
136
|
return R(
|
137
137
|
() => {
|
138
138
|
const c = setTimeout(() => {
|
@@ -445,8 +445,8 @@ const ce = (n) => {
|
|
445
445
|
onBlur: A,
|
446
446
|
tabIndex: -1,
|
447
447
|
className: u(
|
448
|
-
!i &&
|
449
|
-
!i && (s ?
|
448
|
+
!i && V,
|
449
|
+
!i && (s ? j : U),
|
450
450
|
s ? "cursor-default" : "cursor-pointer",
|
451
451
|
"rounded-md relative max-w-full justify-between w-full box-border relative inline-flex items-center",
|
452
452
|
!i && w && !s ? Kn : "",
|
@@ -14938,8 +14938,8 @@ const xon = ({
|
|
14938
14938
|
{
|
14939
14939
|
className: u(
|
14940
14940
|
"rounded-md relative max-w-full",
|
14941
|
-
!f &&
|
14942
|
-
i ?
|
14941
|
+
!f && V,
|
14942
|
+
i ? j : U,
|
14943
14943
|
{
|
14944
14944
|
"min-h-[48px]": _ === "small",
|
14945
14945
|
"min-h-[64px]": _ === "medium"
|
@@ -15890,7 +15890,7 @@ const xon = ({
|
|
15890
15890
|
modal: d = !0,
|
15891
15891
|
onOpenAutoFocus: m
|
15892
15892
|
}) => {
|
15893
|
-
const [I, f] =
|
15893
|
+
const [I, f] = G(!1);
|
15894
15894
|
return R(() => {
|
15895
15895
|
if (n)
|
15896
15896
|
return f(!0), () => {
|
@@ -16027,7 +16027,7 @@ function Pon({
|
|
16027
16027
|
height: 0;
|
16028
16028
|
}
|
16029
16029
|
}`);
|
16030
|
-
const [d, m] =
|
16030
|
+
const [d, m] = G(i !== void 0 ? i : a), [I, f] = G(d);
|
16031
16031
|
return R(() => {
|
16032
16032
|
d ? setTimeout(() => {
|
16033
16033
|
f(!0);
|
@@ -16056,7 +16056,7 @@ function Pon({
|
|
16056
16056
|
"hover:bg-slate-50 dark:hover:bg-gray-800 dark:hover:bg-opacity-10",
|
16057
16057
|
r ? "border-b px-2" : "p-4",
|
16058
16058
|
r && Q,
|
16059
|
-
_ &&
|
16059
|
+
_ && V,
|
16060
16060
|
l
|
16061
16061
|
),
|
16062
16062
|
children: [
|
@@ -16115,7 +16115,6 @@ function Don({
|
|
16115
16115
|
{
|
16116
16116
|
...I(),
|
16117
16117
|
className: u(
|
16118
|
-
G,
|
16119
16118
|
V,
|
16120
16119
|
P,
|
16121
16120
|
"flex gap-2",
|
@@ -16124,7 +16123,7 @@ function Don({
|
|
16124
16123
|
"h-44": m === "medium",
|
16125
16124
|
"h-28": m === "small",
|
16126
16125
|
"cursor-pointer": !c,
|
16127
|
-
|
16126
|
+
fieldBackgroundHoverMixin: !h,
|
16128
16127
|
"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-red-500": v,
|
16129
16128
|
"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-green-500": K
|
16130
16129
|
}
|
@@ -16554,8 +16553,8 @@ function Zon({
|
|
16554
16553
|
"flex flex-row",
|
16555
16554
|
i === "small" ? "min-h-[42px]" : "min-h-[64px]",
|
16556
16555
|
"select-none rounded-md text-sm",
|
16557
|
-
|
16558
|
-
a ?
|
16556
|
+
V,
|
16557
|
+
a ? j : U,
|
16559
16558
|
"relative flex items-center",
|
16560
16559
|
"p-4",
|
16561
16560
|
f ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
|
@@ -16708,7 +16707,7 @@ function etn({
|
|
16708
16707
|
loading: d,
|
16709
16708
|
inputRef: m
|
16710
16709
|
}) {
|
16711
|
-
const [I, f] =
|
16710
|
+
const [I, f] = G(""), [h, K] = G(!1), v = re(I, 200);
|
16712
16711
|
k.useEffect(() => {
|
16713
16712
|
t && t(v || void 0);
|
16714
16713
|
}, [v]);
|
@@ -16832,8 +16831,8 @@ function otn({
|
|
16832
16831
|
className: u(
|
16833
16832
|
v === "small" ? "min-h-[42px]" : "min-h-[64px]",
|
16834
16833
|
"select-none rounded-md text-sm",
|
16835
|
-
W ? vn :
|
16836
|
-
D ?
|
16834
|
+
W ? vn : V,
|
16835
|
+
D ? j : U,
|
16837
16836
|
"relative flex items-center",
|
16838
16837
|
d
|
16839
16838
|
),
|
@@ -17274,7 +17273,7 @@ function Ge({
|
|
17274
17273
|
"w-full outline-none bg-transparent leading-normal px-3",
|
17275
17274
|
"rounded-md",
|
17276
17275
|
a ? gn : P,
|
17277
|
-
_ ?
|
17276
|
+
_ ? j : U,
|
17278
17277
|
f === "smallest" ? "min-h-[32px]" : f === "small" ? "min-h-[48px]" : "min-h-[64px]",
|
17279
17278
|
r ? f === "medium" ? "pt-[28px] pb-2" : "pt-4 pb-2" : "py-2",
|
17280
17279
|
F ? "text-text-primary dark:text-text-primary-dark" : "",
|
@@ -17296,8 +17295,8 @@ function Ge({
|
|
17296
17295
|
{
|
17297
17296
|
className: u(
|
17298
17297
|
"rounded-md relative max-w-full",
|
17299
|
-
a ? vn :
|
17300
|
-
_ ?
|
17298
|
+
a ? vn : V,
|
17299
|
+
_ ? j : U,
|
17301
17300
|
s ? "border border-red-500 dark:border-red-600" : "",
|
17302
17301
|
{
|
17303
17302
|
"min-h-[32px]": !a && f === "smallest",
|
@@ -21285,10 +21284,10 @@ export {
|
|
21285
21284
|
Ko as coolIconKeys,
|
21286
21285
|
ee as debounce,
|
21287
21286
|
Q as defaultBorderMixin,
|
21288
|
-
|
21289
|
-
|
21287
|
+
j as fieldBackgroundDisabledMixin,
|
21288
|
+
U as fieldBackgroundHoverMixin,
|
21290
21289
|
vn as fieldBackgroundInvisibleMixin,
|
21291
|
-
|
21290
|
+
V as fieldBackgroundMixin,
|
21292
21291
|
Kn as focusedClasses,
|
21293
21292
|
gn as focusedInvisibleMixin,
|
21294
21293
|
P as focusedMixin,
|