@fileverse/ui 4.1.8 → 4.1.9-patch-100

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.
@@ -444,6 +444,7 @@ export declare interface DynamicModalProps {
444
444
  variant?: "default" | "secondary" | "ghost" | "danger";
445
445
  className?: string;
446
446
  isLoading?: boolean;
447
+ isDisabled?: boolean;
447
448
  };
448
449
  secondaryAction?: {
449
450
  label: string;
@@ -451,6 +452,7 @@ export declare interface DynamicModalProps {
451
452
  variant?: "default" | "secondary" | "ghost" | "danger";
452
453
  className?: string;
453
454
  isLoading?: boolean;
455
+ isDisabled?: boolean;
454
456
  };
455
457
  className?: string;
456
458
  contentClassName?: string;
@@ -1013,6 +1015,7 @@ export declare const Tooltip: React_2.ForwardRefExoticComponent<TooltipProps & R
1013
1015
  export declare interface TooltipProps extends React_2.HTMLAttributes<HTMLElement>, VariantProps<typeof tooltipVariants> {
1014
1016
  text: string | React_2.ReactNode;
1015
1017
  sideOffset?: number;
1018
+ open?: boolean;
1016
1019
  }
1017
1020
 
1018
1021
  declare const tooltipVariants: (props?: ({
package/dist/index.es.js CHANGED
@@ -36567,21 +36567,30 @@ const M7e = (e, t) => fs(e) ? new k7e(t) : new g7e(t, {
36567
36567
  exit: { opacity: 0, x: 0, transition: { ease: "easeInOut", duration: 0.1 } }
36568
36568
  }
36569
36569
  }, zs = y.forwardRef(
36570
- ({ children: e, className: t, text: n, position: a, beakAlignment: o, sideOffset: r = 5, ...s }, c) => {
36571
- const d = ({
36572
- position: l,
36573
- beakAlignment: u
36570
+ ({
36571
+ children: e,
36572
+ className: t,
36573
+ text: n,
36574
+ position: a,
36575
+ beakAlignment: o,
36576
+ sideOffset: r = 5,
36577
+ open: s,
36578
+ ...c
36579
+ }, d) => {
36580
+ const l = ({
36581
+ position: u,
36582
+ beakAlignment: h
36574
36583
  }) => {
36575
- const h = l === "bottom" || l === "top", p = l === "right" || l === "left";
36576
- return h && u === "start" ? "[&>span]:!left-[10%]" : p && u === "start" ? "[&>span]:!top-[20%]" : h && u === "end" ? "[&>span]:!left-[80%]" : p && u === "end" ? "[&>span]:!top-[60%]" : p && u === "center" ? "my-0 -mx-1" : "-my-1";
36584
+ const p = u === "bottom" || u === "top", m = u === "right" || u === "left";
36585
+ return p && h === "start" ? "[&>span]:!left-[10%]" : m && h === "start" ? "[&>span]:!top-[20%]" : p && h === "end" ? "[&>span]:!left-[80%]" : m && h === "end" ? "[&>span]:!top-[60%]" : m && h === "center" ? "my-0 -mx-1" : "-my-1";
36577
36586
  };
36578
- return /* @__PURE__ */ f.jsx(x7e, { children: /* @__PURE__ */ f.jsxs(C7e, { children: [
36587
+ return /* @__PURE__ */ f.jsx(x7e, { children: /* @__PURE__ */ f.jsxs(C7e, { open: s, children: [
36579
36588
  /* @__PURE__ */ f.jsx(
36580
36589
  b7e,
36581
36590
  {
36582
36591
  "data-testid": "tooltip-trigger",
36583
- onClick: (l) => {
36584
- l.currentTarget.blur();
36592
+ onClick: (u) => {
36593
+ u.currentTarget.blur();
36585
36594
  },
36586
36595
  children: e
36587
36596
  }
@@ -36589,7 +36598,7 @@ const M7e = (e, t) => fs(e) ? new k7e(t) : new g7e(t, {
36589
36598
  /* @__PURE__ */ f.jsx(j7e, { children: /* @__PURE__ */ f.jsx(
36590
36599
  Kt.div,
36591
36600
  {
36592
- ref: c,
36601
+ ref: d,
36593
36602
  initial: fi[a || "top"].initial,
36594
36603
  animate: fi[a || "top"].animate,
36595
36604
  exit: fi[a || "top"].exit,
@@ -36607,10 +36616,10 @@ const M7e = (e, t) => fs(e) ? new k7e(t) : new g7e(t, {
36607
36616
  className: T(
36608
36617
  "max-w-sm min-h-[2vh] overflow-hidden rounded color-bg-default-inverse dark:bg-[#000] p-2 text-helper-text-sm color-text-inverse",
36609
36618
  A7e({ position: a, className: t }),
36610
- d({ position: a, beakAlignment: o }),
36619
+ l({ position: a, beakAlignment: o }),
36611
36620
  t
36612
36621
  ),
36613
- ...s,
36622
+ ...c,
36614
36623
  side: a || "top",
36615
36624
  align: o || "center",
36616
36625
  children: [
@@ -43781,7 +43790,7 @@ const pke = ({
43781
43790
  s && /* @__PURE__ */ f.jsx(dc, { asChild: !0, children: /* @__PURE__ */ f.jsx(
43782
43791
  D1,
43783
43792
  {
43784
- disabled: s == null ? void 0 : s.isLoading,
43793
+ disabled: (s == null ? void 0 : s.isLoading) || (r == null ? void 0 : r.isDisabled),
43785
43794
  isLoading: s == null ? void 0 : s.isLoading,
43786
43795
  className: s == null ? void 0 : s.className,
43787
43796
  variant: (s == null ? void 0 : s.variant) || "ghost",
@@ -43792,7 +43801,7 @@ const pke = ({
43792
43801
  r && /* @__PURE__ */ f.jsx(
43793
43802
  D1,
43794
43803
  {
43795
- disabled: r == null ? void 0 : r.isLoading,
43804
+ disabled: (r == null ? void 0 : r.isLoading) || (r == null ? void 0 : r.isDisabled),
43796
43805
  isLoading: r == null ? void 0 : r.isLoading,
43797
43806
  className: r == null ? void 0 : r.className,
43798
43807
  variant: (r == null ? void 0 : r.variant) || "default",
@@ -43835,7 +43844,7 @@ const pke = ({
43835
43844
  s && /* @__PURE__ */ f.jsx(E5, { asChild: !0, children: /* @__PURE__ */ f.jsx(
43836
43845
  D1,
43837
43846
  {
43838
- disabled: s == null ? void 0 : s.isLoading,
43847
+ disabled: (s == null ? void 0 : s.isLoading) || (s == null ? void 0 : s.isDisabled),
43839
43848
  isLoading: s == null ? void 0 : s.isLoading,
43840
43849
  className: s == null ? void 0 : s.className,
43841
43850
  variant: (s == null ? void 0 : s.variant) || "ghost",
@@ -43846,7 +43855,7 @@ const pke = ({
43846
43855
  r && /* @__PURE__ */ f.jsx(
43847
43856
  D1,
43848
43857
  {
43849
- disabled: r == null ? void 0 : r.isLoading,
43858
+ disabled: (r == null ? void 0 : r.isLoading) || (r == null ? void 0 : r.isDisabled),
43850
43859
  isLoading: r == null ? void 0 : r.isLoading,
43851
43860
  className: r == null ? void 0 : r.className,
43852
43861
  variant: (r == null ? void 0 : r.variant) || "default",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse/ui",
3
- "version": "4.1.8",
3
+ "version": "4.1.9-patch-100",
4
4
  "files": [
5
5
  "/dist"
6
6
  ],
@@ -113,4 +113,4 @@
113
113
  ],
114
114
  "*.css": "stylelint --fix"
115
115
  }
116
- }
116
+ }