@factorialco/f0-react 1.236.1 → 1.236.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.
@@ -753,7 +753,7 @@ export declare interface ButtonConfig {
753
753
  };
754
754
  }
755
755
 
756
- declare type ButtonInternalProps = Pick<ComponentProps<typeof Button>, "variant" | "size" | "disabled" | "type" | "round" | "className" | "pressed"> & DataAttributes & {
756
+ declare type ButtonInternalProps = Pick<ComponentProps<typeof Button>, "variant" | "size" | "disabled" | "type" | "round" | "className" | "pressed" | "style"> & DataAttributes & {
757
757
  /**
758
758
  * Callback fired when the button is clicked. Supports async functions for loading state.
759
759
  */
@@ -2422,6 +2422,7 @@ export declare interface GranularityDefinition {
2422
2422
  toRangeString: (date: Date | DateRange | undefined | null, i18n: TranslationsType, format?: DateStringFormat) => DateRangeString;
2423
2423
  toRange: <T extends Date | DateRange | undefined | null>(date: T) => T extends Date | DateRange ? DateRangeComplete : T;
2424
2424
  toString: (date: Date | DateRange | undefined | null, i18n: TranslationsType, format?: DateStringFormat) => string;
2425
+ toStringMaxWidth: () => number;
2425
2426
  fromString: (dateStr: string | DateRangeString, i18n: TranslationsType) => DateRange | null;
2426
2427
  navigateUIView: (viewDate: Date, direction: -1 | 1) => Date;
2427
2428
  navigate: (date: Date, direction: -1 | 1) => Date;
@@ -1,5 +1,5 @@
1
- import { aN as n6, aO as i6, aP as wy, aQ as bl, aR as XC, aS as QC, aT as eS, aU as s1, aV as tS, aW as nS, aX as iS, aY as ue, aZ as r6, a_ as rS, a$ as sS, b0 as oS, b1 as lo, b2 as $a, b3 as Gc, b4 as s6, b5 as Kl, b6 as aS, b7 as o1, b8 as lS, b9 as cS, ba as Gl, bb as dS, bc as fS, bd as uS, be as _y, bf as hS, bg as Cy, bh as pS, bi as o6, bj as a6, bk as mS, bl as jo, q as Wt, a as M, bm as Vo, P as Zt, bn as Jt, s as xe, k as mt, y as pe, bo as Ef, bp as l6, L as Qi, bq as Ve, $ as c6, w as Xn, x as ni, br as Qe, bs as d6, c as Om, bt as Im, bu as kl, bv as Ho, bw as Jc, aJ as zs, bx as Rh, by as qr, bz as Yc, bA as Zc, bB as gS, n as Mf, bC as f6, bD as ne, bE as Fi, bF as xt, bG as u6, bH as h6, t as Tf, f as yS, bI as vS, bJ as bS, bK as kS, g as Sy, bL as Ny, bM as xS, bN as wS, bO as li, ac as Xc, az as Ly, bP as $s, bQ as Dm, bR as un, bS as Ey, bT as Fh, bU as Xt, bV as or, bW as p6, bX as Ph, bY as _S, bZ as CS, b_ as Bt, b$ as SS, c0 as NS, c1 as LS, c2 as ES, c3 as MS, c4 as TS, c5 as AS, c6 as Cs, S as ii, c7 as Af, c8 as m6, ad as g6, c9 as OS, at as IS, av as y6, aq as v6, ca as b6, aw as Of, cb as Rm, a0 as xl, r as ar, cc as DS, a9 as Pi, cd as vn, ce as If, cf as ja, cg as RS, ch as k6, ci as FS, i as Df, j as Rf, l as Ff, cj as Fm, ck as PS, C as $n, cl as x6, cm as BS, cn as w6, co as zS, G as $S, cp as _6, cq as Bh, cr as C6, a6 as Qc, cs as jS, ct as VS, cu as HS, cv as WS, cw as qS, aK as Pf, a3 as zh, F as Pm, aM as US, cx as Qn, aL as KS, cy as S6, cz as hn, cA as GS, cB as JS, cC as Mn, cD as ed, cE as N6, ah as Bf, a7 as Bm, am as Ss, cF as zf, cG as zm, cH as L6, cI as YS, aa as ZS, a2 as E6, cJ as $m, cK as XS, cL as QS, cM as eN, D as M6, u as T6, cN as A6, cO as rs, cP as tN, cQ as My, cR as nN, cS as iN, cT as rN, cU as $f, K as sN, m as oN, cV as $h, cW as aN, cX as lN, cY as cN, cZ as dN, c_ as fN, c$ as uN, d0 as hN, d1 as pN, d2 as mN, d3 as gN, d4 as yN, d5 as vN, p as bN, ao as kN, d6 as O6, d7 as jf, v as jh, d8 as Ty, Z as I6, d9 as wl, da as D6, db as R6, dc as xN, a1 as Wo, a4 as F6, I as wN, dd as _N, ar as CN, ay as Vf, z as Hf, de as Wf, df as qf, E as Uf, ax as P6, ab as jm, dg as SN, aD as NN, dh as Vh, di as LN, dj as td, dk as EN, as as nd, aE as MN, dl as TN, aC as B6, dm as AN, aB as ON, aA as IN, dn as DN, dp as Ct, dq as Ay, dr as RN, ds as FN, dt as PN, du as a1, dv as BN, dw as zN, dx as $N, dy as jN, dz as VN, dA as HN, a5 as WN, dB as _l, dC as Vm, dD as Hm, dE as Cl, dF as z6, dG as qN, dH as $6, dI as UN, aF as j6, dJ as V6, ae as H6, dK as KN, dL as GN, dM as JN, H as YN, A as ZN, B as XN, d as QN, e as eL, V as tL, b as nL, dN as Oy, dO as iL, dP as rL, dQ as sL, dR as W6, dS as oL } from "./hooks-CALHYYfS.js";
2
- import { J as Eae, dV as Mae, dU as Tae, a8 as Aae, dT as Oae } from "./hooks-CALHYYfS.js";
1
+ import { aN as n6, aO as i6, aP as wy, aQ as bl, aR as XC, aS as QC, aT as eS, aU as s1, aV as tS, aW as nS, aX as iS, aY as ue, aZ as r6, a_ as rS, a$ as sS, b0 as oS, b1 as lo, b2 as $a, b3 as Gc, b4 as s6, b5 as Kl, b6 as aS, b7 as o1, b8 as lS, b9 as cS, ba as Gl, bb as dS, bc as fS, bd as uS, be as _y, bf as hS, bg as Cy, bh as pS, bi as o6, bj as a6, bk as mS, bl as jo, q as Wt, a as M, bm as Vo, P as Zt, bn as Jt, s as xe, k as mt, y as pe, bo as Ef, bp as l6, L as Qi, bq as Ve, $ as c6, w as Xn, x as ni, br as Qe, bs as d6, c as Om, bt as Im, bu as kl, bv as Ho, bw as Jc, aJ as zs, bx as Rh, by as qr, bz as Yc, bA as Zc, bB as gS, n as Mf, bC as f6, bD as ne, bE as Fi, bF as xt, bG as u6, bH as h6, t as Tf, f as yS, bI as vS, bJ as bS, bK as kS, g as Sy, bL as Ny, bM as xS, bN as wS, bO as li, ac as Xc, az as Ly, bP as $s, bQ as Dm, bR as un, bS as Ey, bT as Fh, bU as Xt, bV as or, bW as p6, bX as Ph, bY as _S, bZ as CS, b_ as Bt, b$ as SS, c0 as NS, c1 as LS, c2 as ES, c3 as MS, c4 as TS, c5 as AS, c6 as Cs, S as ii, c7 as Af, c8 as m6, ad as g6, c9 as OS, at as IS, av as y6, aq as v6, ca as b6, aw as Of, cb as Rm, a0 as xl, r as ar, cc as DS, a9 as Pi, cd as vn, ce as If, cf as ja, cg as RS, ch as k6, ci as FS, i as Df, j as Rf, l as Ff, cj as Fm, ck as PS, C as $n, cl as x6, cm as BS, cn as w6, co as zS, G as $S, cp as _6, cq as Bh, cr as C6, a6 as Qc, cs as jS, ct as VS, cu as HS, cv as WS, cw as qS, aK as Pf, a3 as zh, F as Pm, aM as US, cx as Qn, aL as KS, cy as S6, cz as hn, cA as GS, cB as JS, cC as Mn, cD as ed, cE as N6, ah as Bf, a7 as Bm, am as Ss, cF as zf, cG as zm, cH as L6, cI as YS, aa as ZS, a2 as E6, cJ as $m, cK as XS, cL as QS, cM as eN, D as M6, u as T6, cN as A6, cO as rs, cP as tN, cQ as My, cR as nN, cS as iN, cT as rN, cU as $f, K as sN, m as oN, cV as $h, cW as aN, cX as lN, cY as cN, cZ as dN, c_ as fN, c$ as uN, d0 as hN, d1 as pN, d2 as mN, d3 as gN, d4 as yN, d5 as vN, p as bN, ao as kN, d6 as O6, d7 as jf, v as jh, d8 as Ty, Z as I6, d9 as wl, da as D6, db as R6, dc as xN, a1 as Wo, a4 as F6, I as wN, dd as _N, ar as CN, ay as Vf, z as Hf, de as Wf, df as qf, E as Uf, ax as P6, ab as jm, dg as SN, aD as NN, dh as Vh, di as LN, dj as td, dk as EN, as as nd, aE as MN, dl as TN, aC as B6, dm as AN, aB as ON, aA as IN, dn as DN, dp as Ct, dq as Ay, dr as RN, ds as FN, dt as PN, du as a1, dv as BN, dw as zN, dx as $N, dy as jN, dz as VN, dA as HN, a5 as WN, dB as _l, dC as Vm, dD as Hm, dE as Cl, dF as z6, dG as qN, dH as $6, dI as UN, aF as j6, dJ as V6, ae as H6, dK as KN, dL as GN, dM as JN, H as YN, A as ZN, B as XN, d as QN, e as eL, V as tL, b as nL, dN as Oy, dO as iL, dP as rL, dQ as sL, dR as W6, dS as oL } from "./hooks-BntTX0VH.js";
2
+ import { J as Eae, dV as Mae, dU as Tae, a8 as Aae, dT as Oae } from "./hooks-BntTX0VH.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 ci, useRef as me, useState as V, useCallback as Pe, useContext as pn, useMemo as le, useEffect as se, PureComponent as aL, useId as Ur, useLayoutEffect as Kf, memo as Sl, Fragment as Pr, useTransition as lL, isValidElement as q6, cloneElement as Wm, useDebugValue as U6, createRef as cL, createElement as dL, version as Iy, useImperativeHandle as Gf, Children as K6 } from "react";
@@ -12602,7 +12602,10 @@ function $P(t) {
12602
12602
  return !!(t && typeof t == "object" && "byteLength" in t && "byteOffset" in t);
12603
12603
  }
12604
12604
  const jP = PP().use(AF).use(eF).use(vP).use(uO), VP = U(function({ content: e, className: n, format: i = "html", ...r }, s) {
12605
- const o = le(() => f6.sanitize(i === "markdown" ? String(jP.processSync(e)) : e), [i, e]), a = /<[^>]*>/.test(o);
12605
+ const o = le(() => f6.sanitize(i === "markdown" ? String(jP.processSync(e)) : e, {
12606
+ ADD_ATTR: ["target"],
12607
+ ALLOWED_ATTR: ["href", "target", "rel"]
12608
+ }), [i, e]), a = /<[^>]*>/.test(o);
12606
12609
  return f("div", {
12607
12610
  ref: s,
12608
12611
  className: M("rich-text-display-container", !a && "whitespace-pre-wrap", n),
@@ -29411,6 +29414,9 @@ const ex = U(({ value: t, compareToValue: e, onDateChange: n, disabled: i, error
29411
29414
  label: g,
29412
29415
  onClick: a,
29413
29416
  disabled: i,
29417
+ style: {
29418
+ minWidth: c == null ? void 0 : c.toStringMaxWidth()
29419
+ },
29414
29420
  className: M(o && "bg-f1-background-secondary-hover")
29415
29421
  }), l && f(pe, {
29416
29422
  variant: "ghost",
@@ -29949,9 +29955,9 @@ const RW = (t) => "date" in t, FW = {
29949
29955
  })]
29950
29956
  })]
29951
29957
  }), e && b(HN, {
29952
- className: "px-4 pb-4 pt-2 [&_div]:w-full",
29958
+ className: "px-4 pb-4 pt-2",
29953
29959
  children: [b("div", {
29954
- className: "hidden sm:flex sm:flex-row sm:justify-between sm:gap-3",
29960
+ className: "hidden sm:flex sm:flex-row sm:justify-between sm:gap-3 [&>div]:w-full",
29955
29961
  children: [f(pe, {
29956
29962
  variant: "outline",
29957
29963
  ...e.secondary
@@ -29960,7 +29966,7 @@ const RW = (t) => "date" in t, FW = {
29960
29966
  variant: e.primary.variant || "default"
29961
29967
  })]
29962
29968
  }), b("div", {
29963
- className: "flex flex-col-reverse gap-2 sm:hidden",
29969
+ className: "flex flex-col-reverse gap-2 sm:hidden [&>div]:w-full",
29964
29970
  children: [f(pe, {
29965
29971
  variant: "outline",
29966
29972
  ...e.secondary,
package/dist/f0.d.ts CHANGED
@@ -415,7 +415,7 @@ export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttribut
415
415
 
416
416
  declare const Button_2: React_2.ForwardRefExoticComponent<ButtonProps_2 & React_2.RefAttributes<HTMLButtonElement>>;
417
417
 
418
- declare type ButtonInternalProps = Pick<ComponentProps<typeof Button_2>, "variant" | "size" | "disabled" | "type" | "round" | "className" | "pressed"> & DataAttributes & {
418
+ declare type ButtonInternalProps = Pick<ComponentProps<typeof Button_2>, "variant" | "size" | "disabled" | "type" | "round" | "className" | "pressed" | "style"> & DataAttributes & {
419
419
  /**
420
420
  * Callback fired when the button is clicked. Supports async functions for loading state.
421
421
  */
@@ -1793,6 +1793,7 @@ declare interface GranularityDefinition {
1793
1793
  toRangeString: (date: Date | DateRange | undefined | null, i18n: TranslationsType, format?: DateStringFormat) => DateRangeString;
1794
1794
  toRange: <T extends Date | DateRange | undefined | null>(date: T) => T extends Date | DateRange ? DateRangeComplete : T;
1795
1795
  toString: (date: Date | DateRange | undefined | null, i18n: TranslationsType, format?: DateStringFormat) => string;
1796
+ toStringMaxWidth: () => number;
1796
1797
  fromString: (dateStr: string | DateRangeString, i18n: TranslationsType) => DateRange | null;
1797
1798
  navigateUIView: (viewDate: Date, direction: -1 | 1) => Date;
1798
1799
  navigate: (date: Date, direction: -1 | 1) => Date;
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-CALHYYfS.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-CALHYYfS.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-BntTX0VH.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-BntTX0VH.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";
@@ -91640,6 +91640,7 @@ const dp = (e, t) => ({
91640
91640
  };
91641
91641
  return r[n] ?? r.default;
91642
91642
  },
91643
+ toStringMaxWidth: () => 160,
91643
91644
  fromString: (e) => {
91644
91645
  const t = Xs(e);
91645
91646
  if (!t)
@@ -91869,6 +91870,7 @@ const HCt = (e, t) => {
91869
91870
  };
91870
91871
  return r[n] ?? r.default;
91871
91872
  },
91873
+ toStringMaxWidth: () => 155,
91872
91874
  fromString: (e) => {
91873
91875
  const t = Xs(e);
91874
91876
  if (!t)
@@ -92637,6 +92639,7 @@ const mp = (e, t) => ({
92637
92639
  };
92638
92640
  return r[n] ?? r.default;
92639
92641
  },
92642
+ toStringMaxWidth: () => 140,
92640
92643
  fromString: (e) => {
92641
92644
  const t = Xs(e);
92642
92645
  if (!t)
@@ -92848,6 +92851,7 @@ const pp = (e, t) => ({
92848
92851
  };
92849
92852
  return r[n] ?? r.default;
92850
92853
  },
92854
+ toStringMaxWidth: () => 110,
92851
92855
  fromString: (e) => {
92852
92856
  const t = Xs(e);
92853
92857
  if (!t)
@@ -93038,6 +93042,7 @@ const vp = (e, t) => ({
93038
93042
  };
93039
93043
  return r[n] ?? r.default;
93040
93044
  },
93045
+ toStringMaxWidth: () => 240,
93041
93046
  fromString: (e) => {
93042
93047
  const t = Xs(e);
93043
93048
  if (!t)
@@ -93208,6 +93213,7 @@ const Cp = (e, t) => ({
93208
93213
  };
93209
93214
  return r[n] ?? r.default;
93210
93215
  },
93216
+ toStringMaxWidth: () => 70,
93211
93217
  fromString: (e) => {
93212
93218
  const t = Xs(e);
93213
93219
  if (!t)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/f0-react",
3
- "version": "1.236.1",
3
+ "version": "1.236.3",
4
4
  "main": "dist/f0.js",
5
5
  "typings": "dist/f0.d.ts",
6
6
  "private": false,