@fileverse/ui 4.1.1-patch-1 → 4.1.1-patch-3

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.css CHANGED
@@ -1433,6 +1433,9 @@ video {
1433
1433
  .w-\[8px\] {
1434
1434
  width: 8px;
1435
1435
  }
1436
+ .w-auto {
1437
+ width: auto;
1438
+ }
1436
1439
  .w-fit {
1437
1440
  width: -moz-fit-content;
1438
1441
  width: fit-content;
@@ -2070,6 +2073,9 @@ video {
2070
2073
  font-size: 0.875rem;
2071
2074
  line-height: 1.25rem;
2072
2075
  }
2076
+ .\!font-bold {
2077
+ font-weight: 700 !important;
2078
+ }
2073
2079
  .font-\[700\] {
2074
2080
  font-weight: 700;
2075
2081
  }
@@ -83,7 +83,12 @@ declare const avatarVariants: (props?: ({
83
83
  content?: "image" | "text" | null | undefined;
84
84
  } & ClassProp) | undefined) => string;
85
85
 
86
- export declare const BottomDrawer: ({ open, onOpenChange, title, description, content, primaryAction, secondaryAction, className, contentClassName, hasCloseIcon, }: DynamicModalProps) => JSX_2.Element;
86
+ export declare const BottomDrawer: ({ open, onOpenChange, title, description, content, primaryAction, secondaryAction, className, contentClassName, hasCloseIcon, headerClassName, footerClassName, }: BottomDrawerProps) => JSX_2.Element;
87
+
88
+ export declare interface BottomDrawerProps extends DynamicModalProps {
89
+ headerClassName?: string;
90
+ footerClassName?: string;
91
+ }
87
92
 
88
93
  export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
89
94
 
@@ -237,6 +242,12 @@ export declare const CommandShortcut: {
237
242
  displayName: string;
238
243
  };
239
244
 
245
+ export declare const Counter: default_2.ForwardRefExoticComponent<CounterProps & default_2.RefAttributes<HTMLDivElement>>;
246
+
247
+ export declare interface CounterProps {
248
+ count: number;
249
+ }
250
+
240
251
  export declare const Dialog: React_2.FC<DialogPrimitive.DialogProps>;
241
252
 
242
253
  export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React_2.RefAttributes<HTMLButtonElement>>;
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as y from "react";
2
- import D, { forwardRef as Ve, createElement as I, useLayoutEffect as Dn, useEffect as se, createContext as Ct, useContext as Me, useRef as ee, useInsertionEffect as Al, useCallback as Te, useMemo as Qe, Fragment as $1, useId as Gi, Component as Sl, useState as ke, cloneElement as ao, Children as p1, isValidElement as yn, memo as Il, createRef as f1, Suspense as h6, useReducer as p6 } from "react";
2
+ import D, { forwardRef as Re, createElement as I, useLayoutEffect as Dn, useEffect as se, createContext as Ct, useContext as Me, useRef as ee, useInsertionEffect as Al, useCallback as Te, useMemo as Qe, Fragment as $1, useId as Gi, Component as Sl, useState as ke, cloneElement as ao, Children as p1, isValidElement as yn, memo as Il, createRef as f1, Suspense as h6, useReducer as p6 } from "react";
3
3
  import * as zn from "react-dom";
4
4
  import Tl, { flushSync as Nl } from "react-dom";
5
5
  var fr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -263,18 +263,18 @@ function g6() {
263
263
  if (st && _ && typeof st.stack == "string") {
264
264
  for (var de = st.stack.split(`
265
265
  `), tt = _.stack.split(`
266
- `), He = de.length - 1, qe = tt.length - 1; He >= 1 && qe >= 0 && de[He] !== tt[qe]; )
266
+ `), Oe = de.length - 1, qe = tt.length - 1; Oe >= 1 && qe >= 0 && de[Oe] !== tt[qe]; )
267
267
  qe--;
268
- for (; He >= 1 && qe >= 0; He--, qe--)
269
- if (de[He] !== tt[qe]) {
270
- if (He !== 1 || qe !== 1)
268
+ for (; Oe >= 1 && qe >= 0; Oe--, qe--)
269
+ if (de[Oe] !== tt[qe]) {
270
+ if (Oe !== 1 || qe !== 1)
271
271
  do
272
- if (He--, qe--, qe < 0 || de[He] !== tt[qe]) {
272
+ if (Oe--, qe--, qe < 0 || de[Oe] !== tt[qe]) {
273
273
  var vt = `
274
- ` + de[He].replace(" at new ", " at ");
274
+ ` + de[Oe].replace(" at new ", " at ");
275
275
  return C.displayName && vt.includes("<anonymous>") && (vt = vt.replace("<anonymous>", C.displayName)), typeof C == "function" && R.set(C, vt), vt;
276
276
  }
277
- while (He >= 1 && qe >= 0);
277
+ while (Oe >= 1 && qe >= 0);
278
278
  break;
279
279
  }
280
280
  }
@@ -340,8 +340,8 @@ function g6() {
340
340
  throw tt.name = "Invariant Violation", tt;
341
341
  }
342
342
  de = C[pe](P, pe, _, q, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
343
- } catch (He) {
344
- de = He;
343
+ } catch (Oe) {
344
+ de = Oe;
345
345
  }
346
346
  de && !(de instanceof Error) && (Tt(we), M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", q, pe, typeof de), Tt(null)), de instanceof Error && !(de.message in Ot) && (Ot[de.message] = !0, Tt(we), M("Failed %s type: %s", q, de.message), Tt(null));
347
347
  }
@@ -458,9 +458,9 @@ function g6() {
458
458
  for (be in P)
459
459
  ot.call(P, be) && !rr.hasOwnProperty(be) && (pe[be] = P[be]);
460
460
  if (C && C.defaultProps) {
461
- var He = C.defaultProps;
462
- for (be in He)
463
- pe[be] === void 0 && (pe[be] = He[be]);
461
+ var Oe = C.defaultProps;
462
+ for (be in Oe)
463
+ pe[be] === void 0 && (pe[be] = Oe[be]);
464
464
  }
465
465
  if (de || tt) {
466
466
  var qe = typeof C == "function" ? C.displayName || C.name || "Unknown" : C;
@@ -588,8 +588,8 @@ Check the top-level render call using <` + q + ">.");
588
588
  (C === void 0 || typeof C == "object" && C !== null && Object.keys(C).length === 0) && (de += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
589
589
  var tt = Wt();
590
590
  tt ? de += tt : de += N1();
591
- var He;
592
- C === null ? He = "null" : Fa(C) ? He = "array" : C !== void 0 && C.$$typeof === t ? (He = "<" + (G(C.type) || "Unknown") + " />", de = " Did you accidentally export a JSX literal instead of a component?") : He = typeof C, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", He, de);
591
+ var Oe;
592
+ C === null ? Oe = "null" : Fa(C) ? Oe = "array" : C !== void 0 && C.$$typeof === t ? (Oe = "<" + (G(C.type) || "Unknown") + " />", de = " Did you accidentally export a JSX literal instead of a component?") : Oe = typeof C, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Oe, de);
593
593
  }
594
594
  var qe = fe(C, P, q, we, be);
595
595
  if (qe == null)
@@ -3083,7 +3083,7 @@ const _s = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, ef =
3083
3083
  )
3084
3084
  );
3085
3085
  Hr.displayName = "Avatar";
3086
- const gte = Ve(
3086
+ const gte = Re(
3087
3087
  ({
3088
3088
  avatars: e,
3089
3089
  size: t = "lg",
@@ -3755,7 +3755,7 @@ const t5 = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3755
3755
  * See the LICENSE file in the root directory of this source tree.
3756
3756
  */
3757
3757
  const i = (e, t) => {
3758
- const a = Ve(
3758
+ const a = Re(
3759
3759
  ({
3760
3760
  color: n = "currentColor",
3761
3761
  size: r = 24,
@@ -25228,7 +25228,7 @@ const qO = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25228
25228
  defaultVariants: {
25229
25229
  size: "md"
25230
25230
  }
25231
- }), Ge = Ve(
25231
+ }), Ge = Re(
25232
25232
  ({ name: e, className: t, size: a, strokeWidth: n, fill: r, stroke: o, ...s }, f) => {
25233
25233
  const c = BO[e];
25234
25234
  return c ? /* @__PURE__ */ u.jsx(
@@ -25331,7 +25331,7 @@ qt.displayName = "Button";
25331
25331
  const vte = ({ children: e, className: t }) => {
25332
25332
  const a = z("flex space-x-2", t);
25333
25333
  return /* @__PURE__ */ u.jsx("div", { className: a, children: e });
25334
- }, Yi = Ve(
25334
+ }, Yi = Re(
25335
25335
  ({
25336
25336
  icon: e,
25337
25337
  variant: t,
@@ -28119,7 +28119,7 @@ function sB({ preloadedFeatures: e, createVisualElement: t, useRender: a, useVis
28119
28119
  }
28120
28120
  return u.jsxs(uo.Provider, { value: p, children: [l && p.visualElement ? u.jsx(l, { visualElement: p.visualElement, ...d }) : null, a(r, f, aB(m, p.visualElement, c), m, h, p.visualElement)] });
28121
28121
  }
28122
- const s = Ve(o);
28122
+ const s = Re(o);
28123
28123
  return s[iB] = r, s;
28124
28124
  }
28125
28125
  function fB({ layoutId: e }) {
@@ -30866,7 +30866,7 @@ const $f = () => ({
30866
30866
  }), pa = () => ({
30867
30867
  x: $f(),
30868
30868
  y: $f()
30869
- }), _f = () => ({ min: 0, max: 0 }), Oe = () => ({
30869
+ }), _f = () => ({ min: 0, max: 0 }), Ve = () => ({
30870
30870
  x: _f(),
30871
30871
  y: _f()
30872
30872
  });
@@ -30958,7 +30958,7 @@ function uG(e, t, a) {
30958
30958
  const Bu = ({ current: e }) => e ? e.ownerDocument.defaultView : null, hG = /* @__PURE__ */ new WeakMap();
30959
30959
  class pG {
30960
30960
  constructor(t) {
30961
- this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Oe(), this.visualElement = t;
30961
+ this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Ve(), this.visualElement = t;
30962
30962
  }
30963
30963
  start(t, { snapToCursor: a = !1 } = {}) {
30964
30964
  const { presenceContext: n } = this.visualElement;
@@ -31662,7 +31662,7 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31662
31662
  for (let c = 0; c < this.path.length; c++)
31663
31663
  this.path[c].updateScroll();
31664
31664
  const s = this.layout;
31665
- this.layout = this.measure(!1), this.layoutCorrected = Oe(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
31665
+ this.layout = this.measure(!1), this.layoutCorrected = Ve(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
31666
31666
  const { visualElement: f } = this.options;
31667
31667
  f && f.notify("LayoutMeasure", this.layout.layoutBox, s ? s.layoutBox : void 0);
31668
31668
  }
@@ -31700,7 +31700,7 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31700
31700
  var s;
31701
31701
  const { visualElement: f } = this.options;
31702
31702
  if (!f)
31703
- return Oe();
31703
+ return Ve();
31704
31704
  const c = f.measureViewportBox();
31705
31705
  if (!(((s = this.scroll) === null || s === void 0 ? void 0 : s.wasRoot) || this.path.some(eU))) {
31706
31706
  const { scroll: d } = this.root;
@@ -31710,7 +31710,7 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31710
31710
  }
31711
31711
  removeElementScroll(s) {
31712
31712
  var f;
31713
- const c = Oe();
31713
+ const c = Ve();
31714
31714
  if (kt(c, s), !((f = this.scroll) === null || f === void 0) && f.wasRoot)
31715
31715
  return c;
31716
31716
  for (let l = 0; l < this.path.length; l++) {
@@ -31720,7 +31720,7 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31720
31720
  return c;
31721
31721
  }
31722
31722
  applyTransform(s, f = !1) {
31723
- const c = Oe();
31723
+ const c = Ve();
31724
31724
  kt(c, s);
31725
31725
  for (let l = 0; l < this.path.length; l++) {
31726
31726
  const d = this.path[l];
@@ -31732,14 +31732,14 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31732
31732
  return O1(this.latestValues) && ma(c, this.latestValues), c;
31733
31733
  }
31734
31734
  removeTransform(s) {
31735
- const f = Oe();
31735
+ const f = Ve();
31736
31736
  kt(f, s);
31737
31737
  for (let c = 0; c < this.path.length; c++) {
31738
31738
  const l = this.path[c];
31739
31739
  if (!l.instance || !O1(l.latestValues))
31740
31740
  continue;
31741
31741
  pi(l.latestValues) && l.updateSnapshot();
31742
- const d = Oe(), h = l.measurePageBox();
31742
+ const d = Ve(), h = l.measurePageBox();
31743
31743
  kt(d, h), pc(f, l.latestValues, l.snapshot ? l.snapshot.layoutBox : void 0, d);
31744
31744
  }
31745
31745
  return O1(this.latestValues) && pc(f, this.latestValues), f;
@@ -31771,13 +31771,13 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31771
31771
  if (!(!this.layout || !(h || p))) {
31772
31772
  if (this.resolvedRelativeTargetAt = We.timestamp, !this.targetDelta && !this.relativeTarget) {
31773
31773
  const m = this.getClosestProjectingParent();
31774
- m && m.layout && this.animationProgress !== 1 ? (this.relativeParent = m, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Oe(), this.relativeTargetOrigin = Oe(), ln(this.relativeTargetOrigin, this.layout.layoutBox, m.layout.layoutBox), kt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
31774
+ m && m.layout && this.animationProgress !== 1 ? (this.relativeParent = m, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Ve(), this.relativeTargetOrigin = Ve(), ln(this.relativeTargetOrigin, this.layout.layoutBox, m.layout.layoutBox), kt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
31775
31775
  }
31776
31776
  if (!(!this.relativeTarget && !this.targetDelta)) {
31777
- if (this.target || (this.target = Oe(), this.targetWithTransforms = Oe()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), aG(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : kt(this.target, this.layout.layoutBox), Vu(this.target, this.targetDelta)) : kt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
31777
+ if (this.target || (this.target = Ve(), this.targetWithTransforms = Ve()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), aG(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : kt(this.target, this.layout.layoutBox), Vu(this.target, this.targetDelta)) : kt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
31778
31778
  this.attemptToResolveRelativeTarget = !1;
31779
31779
  const m = this.getClosestProjectingParent();
31780
- m && !!m.resumingFrom == !!this.resumingFrom && !m.options.layoutScroll && m.target && this.animationProgress !== 1 ? (this.relativeParent = m, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Oe(), this.relativeTargetOrigin = Oe(), ln(this.relativeTargetOrigin, this.target, m.target), kt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
31780
+ m && !!m.resumingFrom == !!this.resumingFrom && !m.options.layoutScroll && m.target && this.animationProgress !== 1 ? (this.relativeParent = m, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Ve(), this.relativeTargetOrigin = Ve(), ln(this.relativeTargetOrigin, this.target, m.target), kt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
31781
31781
  }
31782
31782
  nn && V1.resolvedTargetDeltas++;
31783
31783
  }
@@ -31801,7 +31801,7 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31801
31801
  return;
31802
31802
  kt(this.layoutCorrected, this.layout.layoutBox);
31803
31803
  const p = this.treeScale.x, m = this.treeScale.y;
31804
- dG(this.layoutCorrected, this.treeScale, this.path, c), f.layout && !f.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (f.target = f.layout.layoutBox, f.targetWithTransforms = Oe());
31804
+ dG(this.layoutCorrected, this.treeScale, this.path, c), f.layout && !f.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (f.target = f.layout.layoutBox, f.targetWithTransforms = Ve());
31805
31805
  const { target: v } = f;
31806
31806
  if (!v) {
31807
31807
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
@@ -31829,12 +31829,12 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31829
31829
  setAnimationOrigin(s, f = !1) {
31830
31830
  const c = this.snapshot, l = c ? c.latestValues : {}, d = { ...this.latestValues }, h = pa();
31831
31831
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !f;
31832
- const p = Oe(), m = c ? c.source : void 0, v = this.layout ? this.layout.source : void 0, g = m !== v, k = this.getStack(), w = !k || k.members.length <= 1, M = !!(g && !w && this.options.crossfade === !0 && !this.path.some(XG));
31832
+ const p = Ve(), m = c ? c.source : void 0, v = this.layout ? this.layout.source : void 0, g = m !== v, k = this.getStack(), w = !k || k.members.length <= 1, M = !!(g && !w && this.options.crossfade === !0 && !this.path.some(XG));
31833
31833
  this.animationProgress = 0;
31834
31834
  let x;
31835
31835
  this.mixTargetDelta = (b) => {
31836
31836
  const L = b / 1e3;
31837
- bc(h.x, s.x, L), bc(h.y, s.y, L), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ln(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox), KG(this.relativeTarget, this.relativeTargetOrigin, p, L), x && IG(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = Oe()), kt(x, this.relativeTarget)), g && (this.animationValues = d, bG(d, l, this.latestValues, L, M, w)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = L;
31837
+ bc(h.x, s.x, L), bc(h.y, s.y, L), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ln(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox), KG(this.relativeTarget, this.relativeTargetOrigin, p, L), x && IG(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = Ve()), kt(x, this.relativeTarget)), g && (this.animationValues = d, bG(d, l, this.latestValues, L, M, w)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = L;
31838
31838
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
31839
31839
  }
31840
31840
  startAnimation(s) {
@@ -31863,7 +31863,7 @@ function Qu({ attachResizeListener: e, defaultParent: t, measureScroll: a, check
31863
31863
  let { targetWithTransforms: f, target: c, layout: l, latestValues: d } = s;
31864
31864
  if (!(!f || !c || !l)) {
31865
31865
  if (this !== s && this.layout && l && Ju(this.options.animationType, this.layout.layoutBox, l.layoutBox)) {
31866
- c = this.target || Oe();
31866
+ c = this.target || Ve();
31867
31867
  const h = pt(this.layout.layoutBox.x);
31868
31868
  c.x.min = s.target.x.min, c.x.max = c.x.min + h;
31869
31869
  const p = pt(this.layout.layoutBox.y);
@@ -31995,9 +31995,9 @@ function qG(e) {
31995
31995
  if (h && !h.resumeFrom) {
31996
31996
  const { snapshot: p, layout: m } = h;
31997
31997
  if (p && m) {
31998
- const v = Oe();
31998
+ const v = Ve();
31999
31999
  ln(v, a.layoutBox, p.layoutBox);
32000
- const g = Oe();
32000
+ const g = Ve();
32001
32001
  ln(g, n, m.layoutBox), Wu(v, g) || (d = !0), h.options.layoutRoot && (e.relativeTarget = g, e.relativeTargetOrigin = v, e.relativeParent = h);
32002
32002
  }
32003
32003
  }
@@ -32222,7 +32222,7 @@ class fU {
32222
32222
  * removed with a re-render to work.
32223
32223
  */
32224
32224
  measureViewportBox() {
32225
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Oe();
32225
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ve();
32226
32226
  }
32227
32227
  getStaticValue(t) {
32228
32228
  return this.latestValues[t];
@@ -32404,7 +32404,7 @@ class lU extends $u {
32404
32404
  }
32405
32405
  class dU extends $u {
32406
32406
  constructor() {
32407
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Oe;
32407
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ve;
32408
32408
  }
32409
32409
  getBaseTargetFromProps(t, a) {
32410
32410
  return t[a];
@@ -34010,7 +34010,7 @@ const DU = {
34010
34010
  defaultVariants: {
34011
34011
  size: "md"
34012
34012
  }
34013
- }), wo = Ve(
34013
+ }), wo = Re(
34014
34014
  ({
34015
34015
  name: e,
34016
34016
  size: t = "md",
@@ -39206,7 +39206,7 @@ const QJ = ({
39206
39206
  ),
39207
39207
  /* @__PURE__ */ u.jsx(xU, { initial: !1, children: o && n === r && /* @__PURE__ */ u.jsx(JJ, { content: o }) })
39208
39208
  ] });
39209
- }, qte = Ve(
39209
+ }, qte = Re(
39210
39210
  ({ items: e, className: t, size: a = "lg", content: n, selectedValue: r, setSelectedValue: o }, s) => !e || e.length === 0 ? null : /* @__PURE__ */ u.jsx(
39211
39211
  rp,
39212
39212
  {
@@ -39244,7 +39244,7 @@ const QJ = ({
39244
39244
  children: /* @__PURE__ */ u.jsx("div", { className: "p-4 flex flex-col gap-4", children: e })
39245
39245
  }
39246
39246
  );
39247
- }, Bte = Ve(({ label: e, description: t, checked: a, onChange: n, size: r = "lg" }, o) => /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-2 w-full", ref: o, children: [
39247
+ }, Bte = Re(({ label: e, description: t, checked: a, onChange: n, size: r = "lg" }, o) => /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-2 w-full", ref: o, children: [
39248
39248
  /* @__PURE__ */ u.jsxs("div", { className: "flex justify-between items-center", children: [
39249
39249
  /* @__PURE__ */ u.jsx(
39250
39250
  Da,
@@ -39470,12 +39470,12 @@ const _J = Et(
39470
39470
  onTouchStart: d,
39471
39471
  onTouchEnd: h,
39472
39472
  children: [
39473
- n && /* @__PURE__ */ u.jsx(
39473
+ /* @__PURE__ */ u.jsx(
39474
39474
  So,
39475
39475
  {
39476
39476
  ref: f,
39477
39477
  className: "absolute right-4 top-3 rounded-sm ring-offset-white hover:color-bg-default-hover p-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focused focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:color-bg-default-selected data-[state=open]:color-text-default",
39478
- children: /* @__PURE__ */ u.jsx(wo, { name: "Close", className: "h-5 w-5", fill: "#363B3F" })
39478
+ children: n && /* @__PURE__ */ u.jsx(wo, { name: "Close", className: "h-5 w-5", fill: "#363B3F" })
39479
39479
  }
39480
39480
  ),
39481
39481
  r
@@ -56783,7 +56783,7 @@ function aX(e) {
56783
56783
  Np(n, e) || r(Xc(e));
56784
56784
  }, [(t = e.customEmojis) == null ? void 0 : t.length, e.open, e.emojiVersion, e.reactionsDefaultOpen, e.searchPlaceHolder, e.searchPlaceholder, e.defaultSkinTone, e.skinTonesDisabled, e.autoFocusSearch, e.emojiStyle, e.theme, e.suggestedEmojisMode, e.lazyLoadEmojis, e.className, e.height, e.width, e.searchDisabled, e.skinTonePickerLocation, e.allowExpandReactions]), n;
56785
56785
  }
56786
- function Re() {
56786
+ function He() {
56787
56787
  return Me(Vp);
56788
56788
  }
56789
56789
  var qp = /* @__PURE__ */ D.createContext({});
@@ -56810,41 +56810,41 @@ var jn;
56810
56810
  e.REACTIONS = "reactions", e.PICKER = "picker";
56811
56811
  })(jn || (jn = {}));
56812
56812
  function rX() {
56813
- var e, t = Re(), a = t.searchPlaceHolder, n = t.searchPlaceholder;
56813
+ var e, t = He(), a = t.searchPlaceHolder, n = t.searchPlaceholder;
56814
56814
  return (e = [a, n].find(function(r) {
56815
56815
  return r !== _r;
56816
56816
  })) != null ? e : _r;
56817
56817
  }
56818
56818
  function oX() {
56819
- var e = Re(), t = e.defaultSkinTone;
56819
+ var e = He(), t = e.defaultSkinTone;
56820
56820
  return t;
56821
56821
  }
56822
56822
  function Zp() {
56823
- var e = Re(), t = e.allowExpandReactions;
56823
+ var e = He(), t = e.allowExpandReactions;
56824
56824
  return t;
56825
56825
  }
56826
56826
  function Fp() {
56827
- var e = Re(), t = e.skinTonesDisabled;
56827
+ var e = He(), t = e.skinTonesDisabled;
56828
56828
  return t;
56829
56829
  }
56830
56830
  function ea() {
56831
- var e = Re(), t = e.emojiStyle;
56831
+ var e = He(), t = e.emojiStyle;
56832
56832
  return t;
56833
56833
  }
56834
56834
  function iX() {
56835
- var e = Re(), t = e.autoFocusSearch;
56835
+ var e = He(), t = e.autoFocusSearch;
56836
56836
  return t;
56837
56837
  }
56838
56838
  function Gp() {
56839
- var e = Re(), t = e.categories;
56839
+ var e = He(), t = e.categories;
56840
56840
  return t;
56841
56841
  }
56842
56842
  function sX() {
56843
- var e = Re(), t = e.customEmojis;
56843
+ var e = He(), t = e.customEmojis;
56844
56844
  return t;
56845
56845
  }
56846
56846
  function fX() {
56847
- var e = Re(), t = e.open;
56847
+ var e = He(), t = e.open;
56848
56848
  return t;
56849
56849
  }
56850
56850
  function cX(e) {
@@ -56858,58 +56858,58 @@ function lX() {
56858
56858
  };
56859
56859
  }
56860
56860
  function Up() {
56861
- var e = Re(), t = e.previewConfig;
56861
+ var e = He(), t = e.previewConfig;
56862
56862
  return t;
56863
56863
  }
56864
56864
  function dX() {
56865
- var e = Re(), t = e.theme;
56865
+ var e = He(), t = e.theme;
56866
56866
  return t;
56867
56867
  }
56868
56868
  function uX() {
56869
- var e = Re(), t = e.suggestedEmojisMode;
56869
+ var e = He(), t = e.suggestedEmojisMode;
56870
56870
  return t;
56871
56871
  }
56872
56872
  function hX() {
56873
- var e = Re(), t = e.lazyLoadEmojis;
56873
+ var e = He(), t = e.lazyLoadEmojis;
56874
56874
  return t;
56875
56875
  }
56876
56876
  function pX() {
56877
- var e = Re(), t = e.className;
56877
+ var e = He(), t = e.className;
56878
56878
  return t;
56879
56879
  }
56880
56880
  function yX() {
56881
- var e = Re(), t = e.height, a = e.width, n = e.style;
56881
+ var e = He(), t = e.height, a = e.width, n = e.style;
56882
56882
  return Ee({
56883
56883
  height: $c(t),
56884
56884
  width: $c(a)
56885
56885
  }, n);
56886
56886
  }
56887
56887
  function mX() {
56888
- var e = Re(), t = e.reactionsDefaultOpen;
56888
+ var e = He(), t = e.reactionsDefaultOpen;
56889
56889
  return t;
56890
56890
  }
56891
56891
  function gX() {
56892
- var e = Re(), t = e.emojiVersion;
56892
+ var e = He(), t = e.emojiVersion;
56893
56893
  return t;
56894
56894
  }
56895
56895
  function Wp() {
56896
- var e = Re(), t = e.searchDisabled;
56896
+ var e = He(), t = e.searchDisabled;
56897
56897
  return t;
56898
56898
  }
56899
56899
  function Yp() {
56900
- var e = Re(), t = e.skinTonePickerLocation;
56900
+ var e = He(), t = e.skinTonePickerLocation;
56901
56901
  return t;
56902
56902
  }
56903
56903
  function vX() {
56904
- var e = Re(), t = e.unicodeToHide;
56904
+ var e = He(), t = e.unicodeToHide;
56905
56905
  return t;
56906
56906
  }
56907
56907
  function kX() {
56908
- var e = Re(), t = e.reactions;
56908
+ var e = He(), t = e.reactions;
56909
56909
  return t;
56910
56910
  }
56911
56911
  function Ba() {
56912
- var e = Re(), t = e.getEmojiUrl;
56912
+ var e = He(), t = e.getEmojiUrl;
56913
56913
  return t;
56914
56914
  }
56915
56915
  function $c(e) {
@@ -59491,7 +59491,7 @@ function z_(e) {
59491
59491
  value: t
59492
59492
  }, I(N_, Object.assign({}, e))));
59493
59493
  }
59494
- const Kte = Ve(
59494
+ const Kte = Re(
59495
59495
  ({ handleEmojiClick: e, handleAvatarInput: t, onRemove: a, className: n, ...r }, o) => {
59496
59496
  const [s, f] = ke("emojiPicker"), c = ee(null), l = () => {
59497
59497
  c.current && c.current.click();
@@ -59584,9 +59584,11 @@ const Kte = Ve(
59584
59584
  secondaryAction: s,
59585
59585
  className: f,
59586
59586
  contentClassName: c,
59587
- hasCloseIcon: l
59588
- }) => /* @__PURE__ */ u.jsx(cs, { open: e, onOpenChange: (d) => t(d), children: /* @__PURE__ */ u.jsxs(ds, { className: z("w-full", f), hasCloseIcon: l, children: [
59589
- /* @__PURE__ */ u.jsx(us, { className: "px-6 pt-6", children: /* @__PURE__ */ u.jsx(ps, { className: "text-left text-heading-md", children: a }) }),
59587
+ hasCloseIcon: l,
59588
+ headerClassName: d,
59589
+ footerClassName: h
59590
+ }) => /* @__PURE__ */ u.jsx(cs, { open: e, onOpenChange: (p) => t(p), children: /* @__PURE__ */ u.jsxs(ds, { className: z("w-full", f), hasCloseIcon: l, children: [
59591
+ /* @__PURE__ */ u.jsx(us, { className: z("px-6 pt-6", d), children: /* @__PURE__ */ u.jsx(ps, { className: "text-left text-heading-md", children: a }) }),
59590
59592
  /* @__PURE__ */ u.jsxs(
59591
59593
  "div",
59592
59594
  {
@@ -59603,7 +59605,7 @@ const Kte = Ve(
59603
59605
  ]
59604
59606
  }
59605
59607
  ),
59606
- /* @__PURE__ */ u.jsxs(hs, { className: "px-5 pb-5 gap-2 w-full", children: [
59608
+ /* @__PURE__ */ u.jsxs(hs, { className: z("px-5 pb-5 gap-2 w-full", h), children: [
59607
59609
  s && /* @__PURE__ */ u.jsx(ls, { asChild: !0, children: /* @__PURE__ */ u.jsx(
59608
59610
  qt,
59609
59611
  {
@@ -59805,7 +59807,7 @@ function J_({ defaultProp: e, onChange: t }) {
59805
59807
  o
59806
59808
  ]), a;
59807
59809
  }
59808
- const Zs = /* @__PURE__ */ Ve((e, t) => {
59810
+ const Zs = /* @__PURE__ */ Re((e, t) => {
59809
59811
  const { children: a, ...n } = e, r = p1.toArray(a), o = r.find(X_);
59810
59812
  if (o) {
59811
59813
  const s = o.props.children, f = r.map((c) => c === o ? p1.count(s) > 1 ? p1.only(null) : /* @__PURE__ */ yn(s) ? s.props.children : null : c);
@@ -59818,7 +59820,7 @@ const Zs = /* @__PURE__ */ Ve((e, t) => {
59818
59820
  }), a);
59819
59821
  });
59820
59822
  Zs.displayName = "Slot";
59821
- const Oi = /* @__PURE__ */ Ve((e, t) => {
59823
+ const Oi = /* @__PURE__ */ Re((e, t) => {
59822
59824
  const { children: a, ...n } = e;
59823
59825
  return /* @__PURE__ */ yn(a) ? /* @__PURE__ */ ao(a, {
59824
59826
  ...$_(n, a.props),
@@ -59869,7 +59871,7 @@ const __ = [
59869
59871
  "svg",
59870
59872
  "ul"
59871
59873
  ], It = __.reduce((e, t) => {
59872
- const a = /* @__PURE__ */ Ve((n, r) => {
59874
+ const a = /* @__PURE__ */ Re((n, r) => {
59873
59875
  const { asChild: o, ...s } = n, f = o ? Zs : t;
59874
59876
  return se(() => {
59875
59877
  window[Symbol.for("radix-ui")] = !0;
@@ -59905,7 +59907,7 @@ const ree = /* @__PURE__ */ Ct({
59905
59907
  layers: /* @__PURE__ */ new Set(),
59906
59908
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
59907
59909
  branches: /* @__PURE__ */ new Set()
59908
- }), oee = /* @__PURE__ */ Ve((e, t) => {
59910
+ }), oee = /* @__PURE__ */ Re((e, t) => {
59909
59911
  var a;
59910
59912
  const { disableOutsidePointerEvents: n = !1, onEscapeKeyDown: r, onPointerDownOutside: o, onFocusOutside: s, onInteractOutside: f, onDismiss: c, ...l } = e, d = Me(ree), [h, p] = ke(null), m = (a = h == null ? void 0 : h.ownerDocument) !== null && a !== void 0 ? a : globalThis == null ? void 0 : globalThis.document, [, v] = ke({}), g = er(
59911
59913
  t,
@@ -60028,7 +60030,7 @@ function Oy(e, t, a, { discrete: n }) {
60028
60030
  const F2 = "focusScope.autoFocusOnMount", G2 = "focusScope.autoFocusOnUnmount", vl = {
60029
60031
  bubbles: !1,
60030
60032
  cancelable: !0
60031
- }, fee = /* @__PURE__ */ Ve((e, t) => {
60033
+ }, fee = /* @__PURE__ */ Re((e, t) => {
60032
60034
  const { loop: a = !1, trapped: n = !1, onMountAutoFocus: r, onUnmountAutoFocus: o, ...s } = e, [f, c] = ke(null), l = J1(r), d = J1(o), h = ee(null), p = er(
60033
60035
  t,
60034
60036
  (g) => c(g)
@@ -60195,7 +60197,7 @@ function pee(e) {
60195
60197
  (t) => t.tagName !== "A"
60196
60198
  );
60197
60199
  }
60198
- const yee = /* @__PURE__ */ Ve((e, t) => {
60200
+ const yee = /* @__PURE__ */ Re((e, t) => {
60199
60201
  var a;
60200
60202
  const { container: n = globalThis == null || (a = globalThis.document) === null || a === void 0 ? void 0 : a.body, ...r } = e;
60201
60203
  return n ? /* @__PURE__ */ Tl.createPortal(/* @__PURE__ */ I(It.div, nt({}, r, {
@@ -60528,14 +60530,14 @@ const Uy = "Dialog", [Wy, $te] = G_(Uy), [Nee, na] = Wy(Uy), Dee = (e) => {
60528
60530
  container: r
60529
60531
  }, s))
60530
60532
  ));
60531
- }, Bi = "DialogOverlay", Eee = /* @__PURE__ */ Ve((e, t) => {
60533
+ }, Bi = "DialogOverlay", Eee = /* @__PURE__ */ Re((e, t) => {
60532
60534
  const a = Qy(Bi, e.__scopeDialog), { forceMount: n = a.forceMount, ...r } = e, o = na(Bi, e.__scopeDialog);
60533
60535
  return o.modal ? /* @__PURE__ */ I(Ko, {
60534
60536
  present: n || o.open
60535
60537
  }, /* @__PURE__ */ I(Ree, nt({}, r, {
60536
60538
  ref: t
60537
60539
  }))) : null;
60538
- }), Ree = /* @__PURE__ */ Ve((e, t) => {
60540
+ }), Ree = /* @__PURE__ */ Re((e, t) => {
60539
60541
  const { __scopeDialog: a, ...n } = e, r = na(Bi, a);
60540
60542
  return (
60541
60543
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
@@ -60556,7 +60558,7 @@ const Uy = "Dialog", [Wy, $te] = G_(Uy), [Nee, na] = Wy(Uy), Dee = (e) => {
60556
60558
  }
60557
60559
  })))
60558
60560
  );
60559
- }), Tn = "DialogContent", Hee = /* @__PURE__ */ Ve((e, t) => {
60561
+ }), Tn = "DialogContent", Hee = /* @__PURE__ */ Re((e, t) => {
60560
60562
  const a = Qy(Tn, e.__scopeDialog), { forceMount: n = a.forceMount, ...r } = e, o = na(Tn, e.__scopeDialog);
60561
60563
  return /* @__PURE__ */ I(Ko, {
60562
60564
  present: n || o.open
@@ -60565,7 +60567,7 @@ const Uy = "Dialog", [Wy, $te] = G_(Uy), [Nee, na] = Wy(Uy), Dee = (e) => {
60565
60567
  })) : /* @__PURE__ */ I(Vee, nt({}, r, {
60566
60568
  ref: t
60567
60569
  })));
60568
- }), Oee = /* @__PURE__ */ Ve((e, t) => {
60570
+ }), Oee = /* @__PURE__ */ Re((e, t) => {
60569
60571
  const a = na(Tn, e.__scopeDialog), n = ee(null), r = er(t, a.contentRef, n);
60570
60572
  return se(() => {
60571
60573
  const o = n.current;
@@ -60587,7 +60589,7 @@ const Uy = "Dialog", [Wy, $te] = G_(Uy), [Nee, na] = Wy(Uy), Dee = (e) => {
60587
60589
  (o) => o.preventDefault()
60588
60590
  )
60589
60591
  }));
60590
- }), Vee = /* @__PURE__ */ Ve((e, t) => {
60592
+ }), Vee = /* @__PURE__ */ Re((e, t) => {
60591
60593
  const a = na(Tn, e.__scopeDialog), n = ee(!1), r = ee(!1);
60592
60594
  return /* @__PURE__ */ I(Jy, nt({}, e, {
60593
60595
  ref: t,
@@ -60608,7 +60610,7 @@ const Uy = "Dialog", [Wy, $te] = G_(Uy), [Nee, na] = Wy(Uy), Dee = (e) => {
60608
60610
  ((f = a.triggerRef.current) === null || f === void 0 ? void 0 : f.contains(c)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && r.current && o.preventDefault();
60609
60611
  }
60610
60612
  }));
60611
- }), Jy = /* @__PURE__ */ Ve((e, t) => {
60613
+ }), Jy = /* @__PURE__ */ Re((e, t) => {
60612
60614
  const { __scopeDialog: a, trapFocus: n, onOpenAutoFocus: r, onCloseAutoFocus: o, ...s } = e, f = na(Tn, a), c = ee(null), l = er(t, c);
60613
60615
  return vee(), /* @__PURE__ */ I($1, null, /* @__PURE__ */ I(fee, {
60614
60616
  asChild: !0,
@@ -61022,7 +61024,23 @@ const dte = ({
61022
61024
  }
61023
61025
  );
61024
61026
  dte.displayName = "CommandShortcut";
61025
- const r6 = ({
61027
+ const e1e = Re(({ count: e = 0 }, t) => {
61028
+ const a = e > 9;
61029
+ return /* @__PURE__ */ u.jsx(
61030
+ "div",
61031
+ {
61032
+ ref: t,
61033
+ className: z(
61034
+ "color-bg-tertiary color-text-default rounded-full h-[18px] !font-bold text-helper-text-sm flex justify-center items-center",
61035
+ {
61036
+ "aspect-square": !a,
61037
+ "w-auto p-2": a
61038
+ }
61039
+ ),
61040
+ children: e
61041
+ }
61042
+ );
61043
+ }), r6 = ({
61026
61044
  direction: e = "horizontal",
61027
61045
  size: t = "lg",
61028
61046
  className: a,
@@ -61073,7 +61091,7 @@ const ute = ({
61073
61091
  isActive: t
61074
61092
  };
61075
61093
  };
61076
- function e1e(e, t) {
61094
+ function t1e(e, t) {
61077
61095
  const [a, n] = ke(e), [r, o] = ke({
61078
61096
  keyName: (t == null ? void 0 : t.keyName) || null,
61079
61097
  order: (t == null ? void 0 : t.order) || "default"
@@ -61119,6 +61137,7 @@ export {
61119
61137
  ite as CommandList,
61120
61138
  cte as CommandSeparator,
61121
61139
  dte as CommandShortcut,
61140
+ e1e as Counter,
61122
61141
  z3 as Dialog,
61123
61142
  P3 as DialogClose,
61124
61143
  fs as DialogContent,
@@ -61206,5 +61225,5 @@ export {
61206
61225
  yte as formatCounter,
61207
61226
  mte as getTrimmedName,
61208
61227
  ute as useHoverAndLongPress,
61209
- e1e as useSortableData
61228
+ t1e as useSortableData
61210
61229
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse/ui",
3
- "version": "4.1.1-patch-1",
3
+ "version": "4.1.1-patch-3",
4
4
  "files": [
5
5
  "/dist"
6
6
  ],