@factorialco/f0-react 1.238.0 → 1.239.0

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.
@@ -29,6 +29,7 @@ import { DotTagCellValue } from './types/dotTag.tsx';
29
29
  import { DotTagCellValue as DotTagCellValue_2 } from '../../value-display/types/dotTag';
30
30
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
31
31
  import { Editor } from '@tiptap/react';
32
+ import { f1Colors } from '@factorialco/f0-core';
32
33
  import { FC } from 'react';
33
34
  import { FieldPath } from 'react-hook-form';
34
35
  import { FieldValues } from 'react-hook-form';
@@ -564,6 +565,13 @@ declare type BaseAvatarProps = {
564
565
  * This is a workaround until we implement the ability to deal with images
565
566
  */
566
567
  flag?: ReactElement;
568
+ /**
569
+ * Optional icon to display on the avatar. Will override the name or image if provided.
570
+ */
571
+ icon?: {
572
+ icon: IconType;
573
+ color?: F0IconProps["color"];
574
+ };
567
575
  /**
568
576
  * The color of the avatar.
569
577
  * @default "random"
@@ -2194,6 +2202,10 @@ declare type F0AvatarPersonProps = {
2194
2202
  * The badge to display on the avatar. Can be a module badge or a custom badge.
2195
2203
  */
2196
2204
  badge?: AvatarBadge;
2205
+ /**
2206
+ * Whether the person is deactivated. If true, the avatar will display an icon instead of the person's name or picture.
2207
+ */
2208
+ deactivated?: boolean;
2197
2209
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
2198
2210
 
2199
2211
  declare const F0AvatarPulse: {
@@ -2260,6 +2272,13 @@ export declare const F0Callout: ForwardRefExoticComponent<CalloutInternalProps &
2260
2272
 
2261
2273
  export declare type F0CalloutProps = CalloutInternalProps;
2262
2274
 
2275
+ declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
2276
+ icon: IconType;
2277
+ size?: "lg" | "md" | "sm" | "xs";
2278
+ state?: "normal" | "animate";
2279
+ color?: "default" | "currentColor" | `#${string}` | Lowercase<NestedKeyOf<typeof f1Colors.icon>>;
2280
+ }
2281
+
2263
2282
  export declare function F0TableOfContent(props: TOCProps): JSX_2.Element;
2264
2283
 
2265
2284
  declare const F0TagAlert: ForwardRefExoticComponent<Props_8 & RefAttributes<HTMLDivElement>>;
@@ -2642,6 +2661,16 @@ declare type IconType = ForwardRefExoticComponent<SVGProps<SVGSVGElement> & RefA
2642
2661
  animate?: "normal" | "animate";
2643
2662
  }>;
2644
2663
 
2664
+ declare const iconVariants: (props?: ({
2665
+ size?: "lg" | "md" | "sm" | "xs" | undefined;
2666
+ } & ({
2667
+ class?: ClassValue;
2668
+ className?: never;
2669
+ } | {
2670
+ class?: never;
2671
+ className?: ClassValue;
2672
+ })) | undefined) => string;
2673
+
2645
2674
  declare type IdStructure = {
2646
2675
  id: string;
2647
2676
  children?: IdStructure[];
@@ -3254,6 +3283,17 @@ declare type NavigationProps = {
3254
3283
  };
3255
3284
  };
3256
3285
 
3286
+ /**
3287
+ * Utility type to extract all possible paths from nested object.
3288
+ * Generates hyphenated paths from nested object structure
3289
+ * Only includes parent key if it has a DEFAULT property
3290
+ */
3291
+ declare type NestedKeyOf<T> = {
3292
+ [K in keyof T & string]: T[K] extends object ? K extends "DEFAULT" ? never : T[K] extends {
3293
+ DEFAULT: string;
3294
+ } ? `${K}` | `${K}-${NestedKeyOf<T[K]>}` : `${K}-${NestedKeyOf<T[K]>}` : K extends "DEFAULT" ? never : `${K}`;
3295
+ }[keyof T & string];
3296
+
3257
3297
  declare type NewColor = Extract<BaseColor, "viridian" | "malibu" | "yellow" | "purple" | "lilac" | "barbie" | "smoke" | "army" | "flubber" | "indigo" | "camel">;
3258
3298
 
3259
3299
  declare type NextDepth<T> = T extends 1 ? 2 : T extends 2 ? 3 : T extends 3 ? 4 : never;
@@ -5354,8 +5394,8 @@ declare module "@tiptap/core" {
5354
5394
 
5355
5395
  declare module "@tiptap/core" {
5356
5396
  interface Commands<ReturnType> {
5357
- liveCompanion: {
5358
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5397
+ transcript: {
5398
+ insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5359
5399
  };
5360
5400
  }
5361
5401
  }
@@ -5363,8 +5403,8 @@ declare module "@tiptap/core" {
5363
5403
 
5364
5404
  declare module "@tiptap/core" {
5365
5405
  interface Commands<ReturnType> {
5366
- transcript: {
5367
- insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5406
+ liveCompanion: {
5407
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5368
5408
  };
5369
5409
  }
5370
5410
  }
@@ -1,5 +1,5 @@
1
- import { aN as l6, aO as c6, aP as Ey, aQ as xl, aR as cS, aS as dS, aT as fS, aU as l1, aV as uS, aW as hS, aX as pS, aY as oe, aZ as d6, a_ as mS, a$ as gS, b0 as yS, b1 as co, b2 as Va, b3 as Zc, b4 as f6, b5 as Yl, b6 as vS, b7 as c1, b8 as bS, b9 as kS, ba as Zl, bb as xS, bc as wS, bd as _S, be as Ly, bf as CS, bg as My, bh as SS, bi as u6, bj as h6, bk as NS, bl as Vo, q as Ft, a as M, bm as Ho, P as Zt, bn as Jt, s as xe, k as ct, y as pe, bo as wl, bp as p6, L as Qi, bq as Ve, $ as m6, w as un, x as $n, br as Xe, bs as Fm, c as Pm, bt as Bm, bu as _l, bv as Wo, bw as Xc, aJ as zs, bx as zh, by as Kr, bz as Qc, bA as ed, bB as ES, n as qo, bC as Br, bD as g6, bE as ne, bF as Fi, bG as xt, bH as y6, bI as v6, t as Af, f as LS, bJ as MS, bK as TS, bL as AS, g as Ty, bM as Ay, bN as OS, bO as IS, bP as ci, ac as td, az as Oy, bQ as $s, bR as zm, bS as pn, bT as Iy, bU as $h, bV as Xt, bW as or, bX as b6, bY as jh, bZ as DS, b_ as RS, b$ as zt, c0 as FS, c1 as PS, c2 as BS, c3 as zS, c4 as $S, c5 as jS, c6 as VS, S as ri, c7 as Of, c8 as k6, ad as x6, c9 as HS, at as WS, av as w6, aq as _6, ca as C6, aw as If, cb as $m, a0 as Cl, r as ar, cc as qS, a9 as Pi, cd as bn, ce as Df, cf as Ha, cg as US, ch as S6, ci as KS, i as Rf, j as Ff, l as Pf, cj as jm, ck as GS, C as Vn, cl as N6, cm as JS, cn as E6, co as YS, G as ZS, cp as L6, cq as Vh, cr as M6, a6 as nd, cs as XS, ct as QS, cu as eN, cv as tN, cw as nN, aK as Bf, a3 as Hh, F as Vm, aM as iN, cx as ti, aL as rN, cy as T6, cz as mn, cA as sN, cB as oN, cC as Tn, cD as id, cE as A6, ah as zf, a7 as Hm, am as Ss, cF as $f, cG as Wm, cH as O6, cI as aN, aa as lN, a2 as I6, cJ as qm, cK as cN, cL as dN, cM as fN, D as D6, u as R6, cN as F6, cO as ss, cP as uN, cQ as Dy, cR as hN, cS as pN, cT as mN, cU as jf, K as gN, m as yN, cV as Wh, cW as P6, cX as B6, cY as z6, cZ as $6, c_ as vN, c$ as bN, d0 as kN, d1 as xN, d2 as wN, d3 as _N, d4 as CN, d5 as SN, p as NN, ao as EN, d6 as j6, d7 as Vf, v as qh, d8 as Ry, Z as V6, d9 as Sl, da as H6, db as W6, dc as LN, a1 as Uo, a4 as q6, I as MN, dd as TN, ar as AN, ay as Hf, z as Wf, de as qf, df as Uf, E as Kf, ax as U6, ab as Um, dg as ON, aD as IN, dh as Uh, di as DN, dj as rd, dk as RN, as as sd, aE as FN, dl as PN, aC as K6, dm as BN, aB as zN, aA as $N, dn as jN, dp as Ct, dq as Fy, dr as VN, ds as HN, dt as WN, du as d1, dv as qN, dw as UN, dx as KN, dy as GN, dz as JN, dA as YN, a5 as ZN, dB as Nl, dC as Km, dD as Gm, dE as El, dF as G6, dG as XN, dH as J6, dI as QN, aF as Y6, dJ as Z6, ae as X6, dK as eE, dL as tE, dM as nE, H as iE, A as rE, B as sE, d as oE, e as aE, V as lE, b as cE, dN as Py, dO as dE, dP as fE, dQ as uE, dR as Q6, dS as hE } from "./hooks-Cut8s-iM.js";
2
- import { J as Kae, dV as Gae, dU as Jae, a8 as Yae, dT as Zae } from "./hooks-Cut8s-iM.js";
1
+ import { aN as l6, aO as c6, aP as Ey, aQ as xl, aR as cS, aS as dS, aT as fS, aU as l1, aV as uS, aW as hS, aX as pS, aY as oe, aZ as d6, a_ as mS, a$ as gS, b0 as yS, b1 as co, b2 as Va, b3 as Zc, b4 as f6, b5 as Yl, b6 as vS, b7 as c1, b8 as bS, b9 as kS, ba as Zl, bb as xS, bc as wS, bd as _S, be as Ly, bf as CS, bg as My, bh as SS, bi as u6, bj as h6, bk as NS, bl as Vo, q as Ft, a as M, bm as Ho, P as Zt, bn as Jt, s as xe, k as ct, y as pe, bo as wl, bp as p6, L as Qi, bq as Ve, $ as m6, w as un, x as $n, br as Xe, bs as Fm, c as Pm, bt as Bm, bu as _l, bv as Wo, bw as Xc, aJ as zs, bx as zh, by as Kr, bz as Qc, bA as ed, bB as ES, n as qo, bC as Br, bD as g6, bE as ne, bF as Fi, bG as xt, bH as y6, bI as v6, t as Af, f as LS, bJ as MS, bK as TS, bL as AS, g as Ty, bM as Ay, bN as OS, bO as IS, bP as ci, ac as td, az as Oy, bQ as $s, bR as zm, bS as pn, bT as Iy, bU as $h, bV as Xt, bW as or, bX as b6, bY as jh, bZ as DS, b_ as RS, b$ as zt, c0 as FS, c1 as PS, c2 as BS, c3 as zS, c4 as $S, c5 as jS, c6 as VS, S as ri, c7 as Of, c8 as k6, ad as x6, c9 as HS, at as WS, av as w6, aq as _6, ca as C6, aw as If, cb as $m, a0 as Cl, r as ar, cc as qS, a9 as Pi, cd as bn, ce as Df, cf as Ha, cg as US, ch as S6, ci as KS, i as Rf, j as Ff, l as Pf, cj as jm, ck as GS, C as Vn, cl as N6, cm as JS, cn as E6, co as YS, G as ZS, cp as L6, cq as Vh, cr as M6, a6 as nd, cs as XS, ct as QS, cu as eN, cv as tN, cw as nN, aK as Bf, a3 as Hh, F as Vm, aM as iN, cx as ti, aL as rN, cy as T6, cz as mn, cA as sN, cB as oN, cC as Tn, cD as id, cE as A6, ah as zf, a7 as Hm, am as Ss, cF as $f, cG as Wm, cH as O6, cI as aN, aa as lN, a2 as I6, cJ as qm, cK as cN, cL as dN, cM as fN, D as D6, u as R6, cN as F6, cO as ss, cP as uN, cQ as Dy, cR as hN, cS as pN, cT as mN, cU as jf, K as gN, m as yN, cV as Wh, cW as P6, cX as B6, cY as z6, cZ as $6, c_ as vN, c$ as bN, d0 as kN, d1 as xN, d2 as wN, d3 as _N, d4 as CN, d5 as SN, p as NN, ao as EN, d6 as j6, d7 as Vf, v as qh, d8 as Ry, Z as V6, d9 as Sl, da as H6, db as W6, dc as LN, a1 as Uo, a4 as q6, I as MN, dd as TN, ar as AN, ay as Hf, z as Wf, de as qf, df as Uf, E as Kf, ax as U6, ab as Um, dg as ON, aD as IN, dh as Uh, di as DN, dj as rd, dk as RN, as as sd, aE as FN, dl as PN, aC as K6, dm as BN, aB as zN, aA as $N, dn as jN, dp as Ct, dq as Fy, dr as VN, ds as HN, dt as WN, du as d1, dv as qN, dw as UN, dx as KN, dy as GN, dz as JN, dA as YN, a5 as ZN, dB as Nl, dC as Km, dD as Gm, dE as El, dF as G6, dG as XN, dH as J6, dI as QN, aF as Y6, dJ as Z6, ae as X6, dK as eE, dL as tE, dM as nE, H as iE, A as rE, B as sE, d as oE, e as aE, V as lE, b as cE, dN as Py, dO as dE, dP as fE, dQ as uE, dR as Q6, dS as hE } from "./hooks-AoOsS_Tr.js";
2
+ import { J as Kae, dV as Gae, dU as Jae, a8 as Yae, dT as Zae } from "./hooks-AoOsS_Tr.js";
3
3
  import { jsxs as b, jsx as f, Fragment as Me } from "react/jsx-runtime";
4
4
  import * as z from "react";
5
5
  import ee, { forwardRef as U, createContext as Hn, useRef as me, useState as V, useCallback as Pe, useContext as an, useMemo as ce, useEffect as ie, PureComponent as pE, useId as fr, useLayoutEffect as Gf, memo as Ll, Fragment as zr, useTransition as mE, isValidElement as eb, cloneElement as Jm, useDebugValue as tb, createRef as gE, createElement as yE, version as By, useImperativeHandle as Jf, Children as nb } from "react";
@@ -15289,6 +15289,9 @@ const A8 = ({ disabled: t, open: e, onChange: n, size: i = "sm", className: r })
15289
15289
  children: f("button", {
15290
15290
  className: "flex w-full items-center justify-between",
15291
15291
  "aria-label": x || e,
15292
+ onClick: (ge) => {
15293
+ ge.preventDefault();
15294
+ },
15292
15295
  children: _e && f(Cz, {
15293
15296
  item: _e
15294
15297
  })
package/dist/f0.d.ts CHANGED
@@ -266,6 +266,13 @@ declare type BaseAvatarProps = {
266
266
  * This is a workaround until we implement the ability to deal with images
267
267
  */
268
268
  flag?: ReactElement;
269
+ /**
270
+ * Optional icon to display on the avatar. Will override the name or image if provided.
271
+ */
272
+ icon?: {
273
+ icon: IconType;
274
+ color?: F0IconProps["color"];
275
+ };
269
276
  /**
270
277
  * The color of the avatar.
271
278
  * @default "random"
@@ -1529,7 +1536,7 @@ export declare type F0AvatarModuleProps = VariantProps<typeof moduleAvatarVarian
1529
1536
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
1530
1537
 
1531
1538
  export declare const F0AvatarPerson: {
1532
- ({ firstName, lastName, src, size, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, badge, }: F0AvatarPersonProps): JSX_2.Element;
1539
+ ({ firstName, lastName, src, size, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, badge, deactivated, }: F0AvatarPersonProps): JSX_2.Element;
1533
1540
  displayName: string;
1534
1541
  };
1535
1542
 
@@ -1554,6 +1561,10 @@ export declare type F0AvatarPersonProps = {
1554
1561
  * The badge to display on the avatar. Can be a module badge or a custom badge.
1555
1562
  */
1556
1563
  badge?: AvatarBadge;
1564
+ /**
1565
+ * Whether the person is deactivated. If true, the avatar will display an icon instead of the person's name or picture.
1566
+ */
1567
+ deactivated?: boolean;
1557
1568
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
1558
1569
 
1559
1570
  export declare const F0AvatarTeam: {
@@ -3399,8 +3410,8 @@ declare module "@tiptap/core" {
3399
3410
 
3400
3411
  declare module "@tiptap/core" {
3401
3412
  interface Commands<ReturnType> {
3402
- liveCompanion: {
3403
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
3413
+ transcript: {
3414
+ insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
3404
3415
  };
3405
3416
  }
3406
3417
  }
@@ -3408,8 +3419,8 @@ declare module "@tiptap/core" {
3408
3419
 
3409
3420
  declare module "@tiptap/core" {
3410
3421
  interface Commands<ReturnType> {
3411
- transcript: {
3412
- insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
3422
+ liveCompanion: {
3423
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
3413
3424
  };
3414
3425
  }
3415
3426
  }
package/dist/f0.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as g, L as ge, c as ve, P as G, a as b, f as be, g as z, A as xe, B as Ce, b as ye, d as we, e as Ne, V as Pe, h as M, i as H, j as U, k as Le, l as J, S as Y, m as X, n as Se, O as Fe, o as K, p as ke, q as De, F as Q, r as Me, s as Te, t as Ie, D as Re, u as Be, v as Oe, w as $e, x as Z, y as w, U as ee, z as Ee, E as _e, G as A, H as je, I as ae, J as ze, K as Ae, M as Ve, N as qe, Q as We, R as Ge, X as He, T as Ue, W as Je, Y as Ye, Z as Xe, _ as Ke } from "./hooks-Cut8s-iM.js";
2
- import { az as Ja, $ as Ya, aB as Xa, aK as Ka, a0 as Qa, a1 as Za, a2 as er, a3 as ar, a4 as rr, a5 as sr, a6 as tr, a7 as lr, a9 as or, aa as nr, ab as ir, ac as dr, aG as cr, ae as ur, af as fr, ag as mr, ah as hr, ak as pr, al as gr, am as vr, an as br, ap as xr, ad as Cr, ao as yr, aj as wr, aH as Nr, aA as Pr, au as Lr, ax as Sr, at as Fr, aL as kr, as as Dr, ar as Mr, a8 as Tr, ai as Ir, aq as Rr, av as Br, aC as Or, aD as $r, aE as Er, aM as _r, aw as jr, aF as zr, aJ as Ar, ay as Vr, aI as qr } from "./hooks-Cut8s-iM.js";
1
+ import { C as g, L as ge, c as ve, P as G, a as b, f as be, g as z, A as xe, B as Ce, b as ye, d as we, e as Ne, V as Pe, h as M, i as H, j as U, k as Le, l as J, S as Y, m as X, n as Se, O as Fe, o as K, p as ke, q as De, F as Q, r as Me, s as Te, t as Ie, D as Re, u as Be, v as Oe, w as $e, x as Z, y as w, U as ee, z as Ee, E as _e, G as A, H as je, I as ae, J as ze, K as Ae, M as Ve, N as qe, Q as We, R as Ge, X as He, T as Ue, W as Je, Y as Ye, Z as Xe, _ as Ke } from "./hooks-AoOsS_Tr.js";
2
+ import { az as Ja, $ as Ya, aB as Xa, aK as Ka, a0 as Qa, a1 as Za, a2 as er, a3 as ar, a4 as rr, a5 as sr, a6 as tr, a7 as lr, a9 as or, aa as nr, ab as ir, ac as dr, aG as cr, ae as ur, af as fr, ag as mr, ah as hr, ak as pr, al as gr, am as vr, an as br, ap as xr, ad as Cr, ao as yr, aj as wr, aH as Nr, aA as Pr, au as Lr, ax as Sr, at as Fr, aL as kr, as as Dr, ar as Mr, a8 as Tr, ai as Ir, aq as Rr, av as Br, aC as Or, aD as $r, aE as Er, aM as _r, aw as jr, aF as zr, aJ as Ar, ay as Vr, aI as qr } from "./hooks-AoOsS_Tr.js";
3
3
  import { jsx as e, jsxs as c, Fragment as $ } from "react/jsx-runtime";
4
4
  import * as E from "react";
5
5
  import Qe, { useState as v, forwardRef as I, useRef as re, useImperativeHandle as Ze, Children as ea, useEffect as se, createContext as aa } from "react";