@factorialco/f0-react 7.0.0 → 7.1.1

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.
@@ -2,7 +2,7 @@ import { cQ as Nk, cR as T0, cS as Zk, cT as Kk, cU as zA, cV as Wk, cW as zk, c
2
2
  import { jsx as h, jsxs as q, Fragment as li } from "react/jsx-runtime";
3
3
  import Wt, { forwardRef as bi, useRef as be, useTransition as HD, useState as Ee, useLayoutEffect as Rn, useId as uo, useContext as fg, createContext as Pn, useEffect as it, useCallback as Ge, useMemo as Qt, useImperativeHandle as OD, Fragment as Mg, isValidElement as Um, cloneElement as N1, Suspense as cl, lazy as Pr, createElement as $c, memo as dl, Children as Qm } from "react";
4
4
  import { d as fe, T as JD, a as jD, b as LD, f as $i, c as XD, g as Z1 } from "./tooltip-CMBdJvJA.js";
5
- import { C as qD, P as $D, c as Wd, n as K1, E as eS, a as tS, u as iS, b as W1, e as nS, f as gS, g as aS, h as oS, i as W0, M as rS, p as sS, j as z1, R as z0, k as Y1, l as IS, m as CS, o as AS, q as lS, r as cS, t as H1, s as dS, O as O1, v as J1, w as uS, W as Ss, A as fS, B as hS, L as mS, x as pS, V as BS, y as FS, z as yS, D as US, G as wm, S as QS, H as j1, I as L1, J as wS, K as vS, N as bS, Q as _S, T as kS, U as xS, X as DS, Y as SS, Z as RS, _ as Y0, $ as MS, a0 as PS } from "./CoachmarkProvider-DnRFYjW-.js";
5
+ import { C as qD, P as $D, c as Wd, n as K1, E as eS, a as tS, u as iS, b as W1, e as nS, f as gS, g as aS, h as oS, i as W0, M as rS, p as sS, j as z1, R as z0, k as Y1, l as IS, m as CS, o as AS, q as lS, r as cS, t as H1, s as dS, O as O1, v as J1, w as uS, W as Ss, A as fS, B as hS, L as mS, x as pS, V as BS, y as FS, z as yS, D as US, G as wm, S as QS, H as j1, I as L1, J as wS, K as vS, N as bS, Q as _S, T as kS, U as xS, X as DS, Y as SS, Z as RS, _ as Y0, $ as MS, a0 as PS } from "./CoachmarkProvider-CudC1Eoe.js";
6
6
  import VS, { createPortal as ud } from "react-dom";
7
7
  import { g as GS } from "./_commonjsHelpers-ByX85dGu.js";
8
8
  import './experimental.css';const ES = Nk("Search", [
@@ -38747,7 +38747,7 @@ const RE = /* @__PURE__ */ new Set(["blob:", "data:"]), ME = /* @__PURE__ */ new
38747
38747
  ),
38748
38748
  children: g
38749
38749
  }
38750
- ), TE = () => import("./ChatPdfThumbnail-Dw1R3THd.js"), NE = () => import("./ChatSheetThumbnail-D8aN1W_0.js"), ZE = () => import("./ChatDocxThumbnail-D5hDwmp7.js"), KE = () => import("./ChatTextThumbnail-B53pSYUy.js"), WE = Pr(TE), zE = Pr(NE), YE = Pr(ZE), HE = Pr(KE), OE = 384, JE = 160, jE = ({
38750
+ ), TE = () => import("./ChatPdfThumbnail-C4b_Sulj.js"), NE = () => import("./ChatSheetThumbnail-D8aN1W_0.js"), ZE = () => import("./ChatDocxThumbnail-D5hDwmp7.js"), KE = () => import("./ChatTextThumbnail-B53pSYUy.js"), WE = Pr(TE), zE = Pr(NE), YE = Pr(ZE), HE = Pr(KE), OE = 384, JE = 160, jE = ({
38751
38751
  kind: g,
38752
38752
  url: s,
38753
38753
  width: c,
@@ -38941,7 +38941,7 @@ const RE = /* @__PURE__ */ new Set(["blob:", "data:"]), ME = /* @__PURE__ */ new
38941
38941
  });
38942
38942
  y.observe(v), c.current = y;
38943
38943
  }, []), shouldMount: g };
38944
- }, Ld = "w-[24rem] max-w-full", qE = "w-[32rem] max-w-full", $E = "gap-0.5", e3 = "pointer-events-none absolute inset-x-0 bottom-0 h-[46%] bg-[linear-gradient(to_top,rgba(0,0,0,0.5),rgba(0,0,0,0.18)_45%,transparent)]", t3 = "bg-[hsl(222_31%_11%)]", i3 = "bg-[hsl(220_39%_6%/0.72)]", n3 = "bg-[hsl(220_39%_6%/0.6)]", g3 = "bg-[hsl(220_39%_6%/0.55)]", a3 = () => import("./LocationMap-tJNhlvUk.js"), o3 = Pr(a3), r3 = 3 / 2, s3 = ({ latitude: g, longitude: s }) => `https://www.google.com/maps?q=${g},${s}`, qQ = ({
38944
+ }, Ld = "w-[24rem] max-w-full", qE = "w-[32rem] max-w-full", $E = "gap-0.5", e3 = "pointer-events-none absolute inset-x-0 bottom-0 h-[46%] bg-[linear-gradient(to_top,rgba(0,0,0,0.5),rgba(0,0,0,0.18)_45%,transparent)]", t3 = "bg-[hsl(222_31%_11%)]", i3 = "bg-[hsl(220_39%_6%/0.72)]", n3 = "bg-[hsl(220_39%_6%/0.6)]", g3 = "bg-[hsl(220_39%_6%/0.55)]", a3 = () => import("./LocationMap-VTaDXZKx.js"), o3 = Pr(a3), r3 = 3 / 2, s3 = ({ latitude: g, longitude: s }) => `https://www.google.com/maps?q=${g},${s}`, qQ = ({
38945
38945
  location: g,
38946
38946
  cornerClass: s = "rounded-xl",
38947
38947
  surfaceClassName: c,
@@ -44539,7 +44539,7 @@ const AN = {
44539
44539
  }
44540
44540
  ) }) });
44541
44541
  }, pN = Pr(
44542
- () => import("./index-rtT704Nz.js").then((g) => g.i).then((g) => ({
44542
+ () => import("./index-CDkdzDYo.js").then((g) => g.i).then((g) => ({
44543
44543
  default: g.F0PdfViewer
44544
44544
  }))
44545
44545
  ), BN = () => {
@@ -48341,7 +48341,7 @@ const M4 = 1e3, P4 = ({
48341
48341
  }
48342
48342
  );
48343
48343
  }, oK = /* @__PURE__ */ new Set(), rK = Pr(
48344
- () => import("./ChatPostComposerDialog-DKd8Zzwt.js").then((g) => ({
48344
+ () => import("./ChatPostComposerDialog-Bs5rrpEw.js").then((g) => ({
48345
48345
  default: g.ChatPostComposerDialog
48346
48346
  }))
48347
48347
  ), sK = () => {
@@ -4709,6 +4709,10 @@ declare type DateCellConfig = {
4709
4709
  minDate?: Date;
4710
4710
  /** Latest selectable date. Dates after this are disabled in the picker. */
4711
4711
  maxDate?: Date;
4712
+ /** Show the leading calendar icon in the cell. Defaults to `true`. */
4713
+ showIcon?: boolean;
4714
+ /** Show a clear button to empty the cell's date. Defaults to `false`. */
4715
+ clearable?: boolean;
4712
4716
  };
4713
4717
 
4714
4718
  export declare type DateFilterDefinition = BaseFilterDefinition<"date"> & {
@@ -6631,7 +6635,8 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
6631
6635
  numberConfig?: NumberCellConfig<R>;
6632
6636
  /**
6633
6637
  * Configuration for `"date"` cells. Accepts `minDate` / `maxDate` to
6634
- * restrict the selectable date range in the picker.
6638
+ * restrict the selectable date range in the picker, `showIcon` to hide
6639
+ * the leading calendar icon, and `clearable` for a clear button.
6635
6640
  *
6636
6641
  * Can be a static object or a function that receives the current row item
6637
6642
  * to return a per-row range (e.g. bound one date field by another field's
@@ -1,6 +1,6 @@
1
- import { H as s, G as t, A as i, b as o, U as r, aD as n, aC as l, aE as d, D as S, I as C, M as g, W as m, aK as u, aL as b, aU as c, K as h, J as P, aJ as T, aV as p, O as F, N as I, ab as E, bf as A, bm as B, V as L, be as y, E as D, d as W, g as k, n as v, as as _, at as O, aq as f, P as N, az as R, F as M, y as x, o as H, r as V, t as G, p as w, h as z, w as U, x as j, L as K, aY as q, aZ as J, aN as Q, ay as X, b1 as Y, bc as $, aF as Z, ae as aa, aX as ea, a0 as sa, ak as ta, Q as ia, bq as oa, a1 as ra, X as na, Y as la, Z as da, aG as Sa, R as Ca, ba as ga, bg as ma, S as ua, af as ba, ag as ca, a6 as ha, a7 as Pa, a8 as Ta, a5 as pa, a9 as Fa, a2 as Ia, aa as Ea, ac as Aa, ad as Ba, ah as La, ai as ya, bk as Da, bj as Wa, aB as ka, aA as va, aI as _a, aW as Oa, aT as fa, aH as Na, aj as Ra, aO as Ma, bl as xa, bo as Ha, aM as Va, aR as Ga, aP as wa, bp as za, aS as Ua, aQ as ja, bn as Ka, e as qa, i as Ja, an as Qa, ap as Xa, bi as Ya, bh as $a, ao as Za, au as ae, f as ee, q as se, v as te, k as ie, l as oe, b4 as re, b2 as ne, ax as le, av as de, aw as Se, b0 as Ce, bd as ge, b3 as me, z as ue, B as be, j as ce, C as he, b8 as Pe, a$ as Te, b5 as pe, al as Fe, bb as Ie, c as Ee, ar as Ae, am as Be, u as Le, a_ as ye, $ as De, _ as We, T as ke, a4 as ve, a3 as _e, b9 as Oe, b7 as fe, b6 as Ne } from "./experimental-SmtCrbMW.js";
1
+ import { H as s, G as t, A as i, b as o, U as r, aD as n, aC as l, aE as d, D as S, I as C, M as g, W as m, aK as u, aL as b, aU as c, K as h, J as P, aJ as T, aV as p, O as F, N as I, ab as E, bf as A, bm as B, V as L, be as y, E as D, d as W, g as k, n as v, as as _, at as O, aq as f, P as N, az as R, F as M, y as x, o as H, r as V, t as G, p as w, h as z, w as U, x as j, L as K, aY as q, aZ as J, aN as Q, ay as X, b1 as Y, bc as $, aF as Z, ae as aa, aX as ea, a0 as sa, ak as ta, Q as ia, bq as oa, a1 as ra, X as na, Y as la, Z as da, aG as Sa, R as Ca, ba as ga, bg as ma, S as ua, af as ba, ag as ca, a6 as ha, a7 as Pa, a8 as Ta, a5 as pa, a9 as Fa, a2 as Ia, aa as Ea, ac as Aa, ad as Ba, ah as La, ai as ya, bk as Da, bj as Wa, aB as ka, aA as va, aI as _a, aW as Oa, aT as fa, aH as Na, aj as Ra, aO as Ma, bl as xa, bo as Ha, aM as Va, aR as Ga, aP as wa, bp as za, aS as Ua, aQ as ja, bn as Ka, e as qa, i as Ja, an as Qa, ap as Xa, bi as Ya, bh as $a, ao as Za, au as ae, f as ee, q as se, v as te, k as ie, l as oe, b4 as re, b2 as ne, ax as le, av as de, aw as Se, b0 as Ce, bd as ge, b3 as me, z as ue, B as be, j as ce, C as he, b8 as Pe, a$ as Te, b5 as pe, al as Fe, bb as Ie, c as Ee, ar as Ae, am as Be, u as Le, a_ as ye, $ as De, _ as We, T as ke, a4 as ve, a3 as _e, b9 as Oe, b7 as fe, b6 as Ne } from "./experimental-BQ0Ww05e.js";
2
2
  import { d_ as Me, eA as xe, ez as He, eN as Ve, ds as Ge, ex as we, ch as ze, c7 as Ue, ce as je, es as Ke, c0 as qe, c0 as Je, bV as Qe, et as Xe, ck as Ye, ee as $e, cl as Ze, eQ as as, ey as es, eJ as ss, eK as ts, db as is, eO as os, k as rs, d$ as ns, cN as ls, ew as ds, eC as Ss, eB as Cs, T as gs, h as ms, bW as us, eL as bs, eR as cs, eM as hs, eP as Ps, eI as Ts, eF as ps, eH as Fs, eD as Is, eu as Es, ev as As, eo as Bs, eG as Ls, eE as ys, dV as Ds } from "./F0CanvasPanel-C57zh5Pt.js";
3
- import { az as ks, aA as vs, a7 as _s, a8 as Os, a5 as fs, ai as Ns, C as Rs, a9 as Ms, aL as xs, ae as Hs, aK as Vs, ah as Gs, a6 as ws, ax as zs, aN as Us, aM as js, ap as Ks, aj as qs, as as Js, F as Qs, a4 as Xs, au as Ys, ar as $s, am as Zs, aR as at, an as et, av as st, aw as tt, aa as it, aO as ot, aP as rt, ao as nt, ay as lt, aH as dt, O as St, aJ as Ct, ab as gt, aT as mt, ad as ut, af as bt, as as ct, aQ as ht, at as Pt, aq as Tt, aS as pt, ac as Ft, W as It, ag as Et, a3 as At, a1 as Bt, a2 as Lt, aD as yt, aE as Dt, aB as Wt, aI as kt, al as vt, ak as _t, aF as Ot, m as ft, aC as Nt, aG as Rt, G as Mt } from "./CoachmarkProvider-DnRFYjW-.js";
3
+ import { az as ks, aA as vs, a7 as _s, a8 as Os, a5 as fs, ai as Ns, C as Rs, a9 as Ms, aL as xs, ae as Hs, aK as Vs, ah as Gs, a6 as ws, ax as zs, aN as Us, aM as js, ap as Ks, aj as qs, as as Js, F as Qs, a4 as Xs, au as Ys, ar as $s, am as Zs, aR as at, an as et, av as st, aw as tt, aa as it, aO as ot, aP as rt, ao as nt, ay as lt, aH as dt, O as St, aJ as Ct, ab as gt, aT as mt, ad as ut, af as bt, as as ct, aQ as ht, at as Pt, aq as Tt, aS as pt, ac as Ft, W as It, ag as Et, a3 as At, a1 as Bt, a2 as Lt, aD as yt, aE as Dt, aB as Wt, aI as kt, al as vt, ak as _t, aF as Ot, m as ft, aC as Nt, aG as Rt, G as Mt } from "./CoachmarkProvider-CudC1Eoe.js";
4
4
  export {
5
5
  ks as AUTO_PER_PAGE_MAX,
6
6
  vs as AUTO_PER_PAGE_MIN_RESERVED_ROWS,
package/dist/f0.d.ts CHANGED
@@ -3902,6 +3902,14 @@ export declare type DashboardChartConfig = BarChartConfig | LineChartConfig | Fu
3902
3902
  export declare interface DashboardChartData {
3903
3903
  /** Category axis labels. Required for bar/line charts. */
3904
3904
  categories?: string[];
3905
+ /**
3906
+ * Constants to draw across the plot — a peer median, a target, an average.
3907
+ *
3908
+ * Part of the DATA, not the config: a figure like this arrives with the
3909
+ * values it is compared against, and changes when they do. Bar and line
3910
+ * charts render them; every other type ignores them.
3911
+ */
3912
+ referenceLines?: F0DataChartReferenceLine[];
3905
3913
  /** X-axis category labels for heatmap charts. */
3906
3914
  xCategories?: string[];
3907
3915
  /** Y-axis category labels for heatmap charts. */
@@ -4126,6 +4134,30 @@ export declare interface DashboardMetricData {
4126
4134
  value: number;
4127
4135
  /** Optional previous value — used to compute a trend indicator */
4128
4136
  previousValue?: number;
4137
+ /**
4138
+ * A reference figure to show the value against, under the number.
4139
+ *
4140
+ * Distinct from {@link DashboardMetricData.previousValue}, which is this
4141
+ * metric at an earlier time and renders as a rise or a fall. A comparison is
4142
+ * a different quantity entirely — a peer median, a target, a company-wide
4143
+ * average — so it is stated rather than turned into a trend: an arrow next to
4144
+ * it would read as "it moved", which it did not.
4145
+ *
4146
+ * `value` is in the metric's own units and is formatted exactly like the
4147
+ * headline number, so the two can be read against each other. `label` says
4148
+ * what the figure is, in the consumer's own words and language.
4149
+ */
4150
+ comparison?: {
4151
+ value: number;
4152
+ label: string;
4153
+ /**
4154
+ * Where the figure comes from, revealed by an ⓘ icon after it — "the
4155
+ * median across all companies on Factorial", say. A string renders a
4156
+ * plain tooltip; the structured form renders a hoverable card that can
4157
+ * carry a link, the same affordance as `DashboardItemBase.info`.
4158
+ */
4159
+ info?: string | InfoHintContent;
4160
+ };
4129
4161
  }
4130
4162
 
4131
4163
  /**
@@ -4620,6 +4652,10 @@ declare type DateCellConfig = {
4620
4652
  minDate?: Date;
4621
4653
  /** Latest selectable date. Dates after this are disabled in the picker. */
4622
4654
  maxDate?: Date;
4655
+ /** Show the leading calendar icon in the cell. Defaults to `true`. */
4656
+ showIcon?: boolean;
4657
+ /** Show a clear button to empty the cell's date. Defaults to `false`. */
4658
+ clearable?: boolean;
4623
4659
  };
4624
4660
 
4625
4661
  /**
@@ -6684,7 +6720,8 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
6684
6720
  numberConfig?: NumberCellConfig<R>;
6685
6721
  /**
6686
6722
  * Configuration for `"date"` cells. Accepts `minDate` / `maxDate` to
6687
- * restrict the selectable date range in the picker.
6723
+ * restrict the selectable date range in the picker, `showIcon` to hide
6724
+ * the leading calendar icon, and `clearable` for a clear button.
6688
6725
  *
6689
6726
  * Can be a static object or a function that receives the current row item
6690
6727
  * to return a per-row range (e.g. bound one date field by another field's
@@ -9373,6 +9410,8 @@ export declare interface F0DataChartBarProps extends F0DataChartBaseProps {
9373
9410
  type: "bar";
9374
9411
  /** One or more data series to render as bars */
9375
9412
  series: F0DataChartBarSeries[];
9413
+ /** Constants drawn across the plot. See {@link F0DataChartReferenceLine}. */
9414
+ referenceLines?: F0DataChartReferenceLine[];
9376
9415
  /** Bar orientation. @default "vertical" */
9377
9416
  orientation?: "vertical" | "horizontal";
9378
9417
  /** Stack all series into a single bar per category. @default false */
@@ -9723,6 +9762,8 @@ export declare interface F0DataChartLineProps extends F0DataChartBaseProps {
9723
9762
  type: "line";
9724
9763
  /** One or more data series to render as lines */
9725
9764
  series: F0DataChartLineSeries[];
9765
+ /** Constants drawn across the plot. See {@link F0DataChartReferenceLine}. */
9766
+ referenceLines?: F0DataChartReferenceLine[];
9726
9767
  /** Line interpolation type. @default "linear" */
9727
9768
  lineType?: F0DataChartLineType;
9728
9769
  /** Show gradient area fill below lines. @default true */
@@ -9944,6 +9985,35 @@ export declare interface F0DataChartRadarSeries {
9944
9985
  color?: ChartColorToken;
9945
9986
  }
9946
9987
 
9988
+ /**
9989
+ * A constant drawn across the whole plot rather than per category.
9990
+ *
9991
+ * For a figure that does not vary with the categories — a peer median, a
9992
+ * target, an average. Drawn as one dashed line with its label at the end, so it
9993
+ * reads as a threshold the bars are measured against rather than as another
9994
+ * series: a constant repeated once per category would claim to be a quantity
9995
+ * each of them has.
9996
+ */
9997
+ export declare interface F0DataChartReferenceLine {
9998
+ /** Where on the value axis to draw it. */
9999
+ value: number;
10000
+ /** Shown at the end of the line. Omit for an unlabelled rule. */
10001
+ label?: string;
10002
+ /** Must be an F0 design token name. Falls back to a neutral line colour. */
10003
+ color?: ChartColorToken;
10004
+ /** Solid instead of dashed. @default false */
10005
+ solid?: boolean;
10006
+ /**
10007
+ * Shown when the reader hovers the line, under its label and value.
10008
+ *
10009
+ * For saying what the figure actually is — which companies a peer median
10010
+ * covers, which quarter a target belongs to, whether it is an estimate. A
10011
+ * line with no description is not hoverable: there would be nothing to add
10012
+ * beyond the label already printed beside it.
10013
+ */
10014
+ description?: string;
10015
+ }
10016
+
9947
10017
  /**
9948
10018
  * A single point in a scatter series.
9949
10019
  *