@firecms/ui 3.0.0-canary.78 → 3.0.0-canary.79

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
@@ -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 G, useCallback as un, useRef as cn, useMemo as Hn, useLayoutEffect as Wn, useDeferredValue as zn } from "react";
3
+ import k, { useEffect as R, useState as j, 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 ", 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";
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 ", G = "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", U = "dark:bg-gray-800 bg-opacity-80 dark:bg-opacity-90", V = "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] = G(n);
135
+ const [r, i] = j(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 && V,
449
- !i && (s ? j : U),
448
+ !i && G,
449
+ !i && (s ? U : V),
450
450
  s ? "cursor-default" : "cursor-pointer",
451
451
  "rounded-md 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 && V,
14942
- i ? j : U,
14941
+ !f && G,
14942
+ i ? U : V,
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] = G(!1);
15893
+ const [I, f] = j(!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] = G(i !== void 0 ? i : a), [I, f] = G(d);
16030
+ const [d, m] = j(i !== void 0 ? i : a), [I, f] = j(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
- _ && V,
16059
+ _ && G,
16060
16060
  l
16061
16061
  ),
16062
16062
  children: [
@@ -16115,7 +16115,7 @@ function Don({
16115
16115
  {
16116
16116
  ...I(),
16117
16117
  className: u(
16118
- V,
16118
+ G,
16119
16119
  P,
16120
16120
  "flex gap-2",
16121
16121
  "p-4 box-border relative items-center border-2 border-solid border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",
@@ -16123,7 +16123,7 @@ function Don({
16123
16123
  "h-44": m === "medium",
16124
16124
  "h-28": m === "small",
16125
16125
  "cursor-pointer": !c,
16126
- fieldBackgroundHoverMixin: !h,
16126
+ [V]: !h,
16127
16127
  "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-red-500": v,
16128
16128
  "transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-green-500": K
16129
16129
  }
@@ -16553,8 +16553,8 @@ function Zon({
16553
16553
  "flex flex-row",
16554
16554
  i === "small" ? "min-h-[42px]" : "min-h-[64px]",
16555
16555
  "select-none rounded-md text-sm",
16556
- V,
16557
- a ? j : U,
16556
+ G,
16557
+ a ? U : V,
16558
16558
  "relative flex items-center",
16559
16559
  "p-4",
16560
16560
  f ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
@@ -16706,7 +16706,7 @@ function etn({
16706
16706
  loading: d,
16707
16707
  inputRef: m
16708
16708
  }) {
16709
- const [I, f] = G(""), [h, K] = G(!1), v = re(I, 200);
16709
+ const [I, f] = j(""), [h, K] = j(!1), v = re(I, 200);
16710
16710
  k.useEffect(() => {
16711
16711
  t && t(v || void 0);
16712
16712
  }, [v]);
@@ -16830,8 +16830,8 @@ function otn({
16830
16830
  className: u(
16831
16831
  v === "small" ? "min-h-[42px]" : "min-h-[64px]",
16832
16832
  "select-none rounded-md text-sm",
16833
- W ? vn : V,
16834
- D ? j : U,
16833
+ W ? vn : G,
16834
+ D ? U : V,
16835
16835
  "relative flex items-center",
16836
16836
  d
16837
16837
  ),
@@ -17271,7 +17271,7 @@ function Ge({
17271
17271
  "w-full outline-none bg-transparent leading-normal px-3",
17272
17272
  "rounded-md",
17273
17273
  a ? gn : P,
17274
- _ ? j : U,
17274
+ _ ? U : V,
17275
17275
  f === "smallest" ? "min-h-[32px]" : f === "small" ? "min-h-[48px]" : "min-h-[64px]",
17276
17276
  r ? f === "medium" ? "pt-[28px] pb-2" : "pt-4 pb-2" : "py-2",
17277
17277
  F ? "text-text-primary dark:text-text-primary-dark" : "",
@@ -17293,8 +17293,8 @@ function Ge({
17293
17293
  {
17294
17294
  className: u(
17295
17295
  "rounded-md relative max-w-full",
17296
- a ? vn : V,
17297
- _ ? j : U,
17296
+ a ? vn : G,
17297
+ _ ? U : V,
17298
17298
  s ? "border border-red-500 dark:border-red-600" : "",
17299
17299
  {
17300
17300
  "min-h-[32px]": !a && f === "smallest",
@@ -21282,10 +21282,10 @@ export {
21282
21282
  Ko as coolIconKeys,
21283
21283
  ee as debounce,
21284
21284
  Q as defaultBorderMixin,
21285
- j as fieldBackgroundDisabledMixin,
21286
- U as fieldBackgroundHoverMixin,
21285
+ U as fieldBackgroundDisabledMixin,
21286
+ V as fieldBackgroundHoverMixin,
21287
21287
  vn as fieldBackgroundInvisibleMixin,
21288
- V as fieldBackgroundMixin,
21288
+ G as fieldBackgroundMixin,
21289
21289
  Kn as focusedClasses,
21290
21290
  gn as focusedInvisibleMixin,
21291
21291
  P as focusedMixin,