@factorialco/f0-react 1.233.2 → 1.233.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/f0.d.ts CHANGED
@@ -1125,12 +1125,13 @@ export declare const defaultTranslations: {
1125
1125
  readonly filters: {
1126
1126
  readonly label: "Filters";
1127
1127
  readonly applyFilters: "Apply filters";
1128
+ readonly applySelection: "Apply selection";
1128
1129
  readonly cancel: "Cancel";
1129
1130
  readonly failedToLoadOptions: "Failed to load options";
1130
1131
  readonly retry: "Retry";
1131
1132
  };
1132
1133
  readonly toc: {
1133
- readonly search: "Search";
1134
+ readonly search: "Search...";
1134
1135
  };
1135
1136
  readonly collections: {
1136
1137
  readonly sorting: {
@@ -1687,6 +1688,8 @@ export declare type FilterOptions<FilterKeys extends string> = Record<FilterKeys
1687
1688
  */
1688
1689
  export declare type FiltersDefinition<Keys extends string = string> = Record<Keys, FilterDefinition>;
1689
1690
 
1691
+ export declare type FiltersMode = "default" | "compact";
1692
+
1690
1693
  /**
1691
1694
  * Current state of all filters in a collection.
1692
1695
  * Maps filter keys to their current values.
@@ -1711,6 +1714,7 @@ declare type FilterTypeDefinition<Value = unknown, Options extends object = neve
1711
1714
  schema: Schema;
1712
1715
  value: Value;
1713
1716
  onChange: (value: Value) => void;
1717
+ isCompactMode?: boolean;
1714
1718
  }) => React.ReactNode;
1715
1719
  /**
1716
1720
  * The value label to display in the filter chips
@@ -1804,6 +1808,7 @@ declare interface GranularityDefinition {
1804
1808
  maxDate?: Date;
1805
1809
  setViewDate: (date: Date) => void;
1806
1810
  viewDate: Date;
1811
+ compact?: boolean;
1807
1812
  }) => ReactNode;
1808
1813
  add: (date: DateRangeComplete, delta: number) => DateRangeComplete;
1809
1814
  getPrevNext(date: DateRange, options: DateNavigationOptions): PrevNextDateNavigation;
@@ -2251,6 +2256,8 @@ declare type OneFilterPickerRootProps<Definition extends FiltersDefinition> = {
2251
2256
  onChange: (value: FiltersState<Definition>) => void;
2252
2257
  /** The children of the component */
2253
2258
  children?: React.ReactNode;
2259
+ /** The mode of the component */
2260
+ mode?: FiltersMode;
2254
2261
  };
2255
2262
 
2256
2263
  declare type OnLoadDataCallback<Record extends RecordType, Filters extends FiltersDefinition> = (data: {
@@ -3407,11 +3414,6 @@ declare module "@tiptap/core" {
3407
3414
  }
3408
3415
 
3409
3416
 
3410
- declare namespace Calendar {
3411
- var displayName: string;
3412
- }
3413
-
3414
-
3415
3417
  declare module "@tiptap/core" {
3416
3418
  interface Commands<ReturnType> {
3417
3419
  moodTracker: {
@@ -3419,3 +3421,8 @@ declare module "@tiptap/core" {
3419
3421
  };
3420
3422
  }
3421
3423
  }
3424
+
3425
+
3426
+ declare namespace Calendar {
3427
+ var displayName: string;
3428
+ }
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 V, H as je, I as ae, J as ze, K as Ve, M as Ae, 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-D5bAC8zc.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 Vr, ay as Ar, aI as qr } from "./hooks-D5bAC8zc.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-BSa3UINJ.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-BSa3UINJ.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";
@@ -53,12 +53,13 @@ const Fa = {
53
53
  filters: {
54
54
  label: "Filters",
55
55
  applyFilters: "Apply filters",
56
+ applySelection: "Apply selection",
56
57
  cancel: "Cancel",
57
58
  failedToLoadOptions: "Failed to load options",
58
59
  retry: "Retry"
59
60
  },
60
61
  toc: {
61
- search: "Search"
62
+ search: "Search..."
62
63
  },
63
64
  collections: {
64
65
  sorting: {
@@ -222,8 +223,8 @@ var _ = "Progress", j = 100, [ra, Ma] = ve(_), [sa, ta] = ra(_), te = E.forwardR
222
223
  getValueLabel: i = la,
223
224
  ...n
224
225
  } = a;
225
- (t || t === 0) && !A(t) && console.error(oa(`${t}`, "Progress"));
226
- const d = A(t) ? t : j;
226
+ (t || t === 0) && !V(t) && console.error(oa(`${t}`, "Progress"));
227
+ const d = V(t) ? t : j;
227
228
  l !== null && !q(l, d) && console.error(na(`${l}`, "Progress"));
228
229
  const o = q(l, d) ? l : null, f = T(o) ? i(o, d) : void 0;
229
230
  return /* @__PURE__ */ e(sa, { scope: s, value: o, max: d, children: /* @__PURE__ */ e(
@@ -269,7 +270,7 @@ function ne(a, r) {
269
270
  function T(a) {
270
271
  return typeof a == "number";
271
272
  }
272
- function A(a) {
273
+ function V(a) {
273
274
  return T(a) && !isNaN(a) && a > 0;
274
275
  }
275
276
  function q(a, r) {
@@ -511,7 +512,7 @@ const ja = g({
511
512
  }, ue), za = g({
512
513
  name: "TwoColumnLayout",
513
514
  type: "layout"
514
- }, ma), Va = g({
515
+ }, ma), Aa = g({
515
516
  name: "HomeLayout",
516
517
  type: "layout"
517
518
  }, fa), ga = ({ benefits: a }) => e("div", {
@@ -610,7 +611,7 @@ function ba({ isOpen: a, onClose: r, title: s, children: l, module: t, portalCon
610
611
  })
611
612
  });
612
613
  }
613
- function Aa({ isOpen: a, onClose: r, title: s, image: l, benefits: t, errorMessage: i, successMessage: n, loadingState: d, nextSteps: o, closeLabel: f, primaryAction: m, modalTitle: N, modalModule: P, secondaryAction: u, portalContainer: x, tag: S }) {
614
+ function Va({ isOpen: a, onClose: r, title: s, image: l, benefits: t, errorMessage: i, successMessage: n, loadingState: d, nextSteps: o, closeLabel: f, primaryAction: m, modalTitle: N, modalModule: P, secondaryAction: u, portalContainer: x, tag: S }) {
614
615
  const [R, F] = v(a), [C, y] = v(null), [L, h] = v(!1), k = async () => {
615
616
  if (m != null && m.onClick) {
616
617
  h(!0);
@@ -714,10 +715,10 @@ function xa({ mediaUrl: a, title: r, description: s, onClose: l, dismissible: t,
714
715
  }))
715
716
  }), c("div", {
716
717
  className: "flex flex-col gap-[2px] p-3",
717
- children: [e(V, {
718
+ children: [e(A, {
718
719
  className: "text-lg font-medium",
719
720
  children: r
720
- }), e(V, {
721
+ }), e(A, {
721
722
  className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary",
722
723
  children: s
723
724
  })]
@@ -774,7 +775,7 @@ const Ca = I(function({ primaryAction: r, secondaryAction: s, ...l }, t) {
774
775
  });
775
776
  });
776
777
  Ca.displayName = "UpsellingBanner";
777
- function qa({ isOpen: a, setIsOpen: r, label: s, variant: l = "promote", size: t = "md", showIcon: i = !0, side: n = "right", align: d = "center", icon: o = Ve, mediaUrl: f, title: m, description: N, width: P = "300px", trackVisibility: u, actions: x, onClick: S, hideLabel: R = !1 }) {
778
+ function qa({ isOpen: a, setIsOpen: r, label: s, variant: l = "promote", size: t = "md", showIcon: i = !0, side: n = "right", align: d = "center", icon: o = Ae, mediaUrl: f, title: m, description: N, width: P = "300px", trackVisibility: u, actions: x, onClick: S, hideLabel: R = !1 }) {
778
779
  const [F, C] = v(!1), [y, L] = v(null), [h, k] = v(null), D = (p) => {
779
780
  r(p), S && S();
780
781
  }, B = async (p) => {
@@ -855,7 +856,7 @@ const ya = aa(null), wa = ({ children: a, fullScreen: r = !0 }) => {
855
856
  reducedMotion: "user",
856
857
  children: a
857
858
  }), Wa = ({ children: a, layout: r, link: s, privacyModeInitiallyEnabled: l, image: t, i18n: i, l10n: n, isDev: d = !1, dataCollectionStorageHandler: o, showExperimentalWarnings: f = !1 }) => e(Na, {
858
- children: e(Ae, {
859
+ children: e(Ve, {
859
860
  isDev: d,
860
861
  showExperimentalWarnings: f,
861
862
  children: e(qe, {
@@ -927,7 +928,7 @@ export {
927
928
  vr as F0TagStatus,
928
929
  br as F0TagTeam,
929
930
  xr as GROUP_ID_SYMBOL,
930
- Va as HomeLayout,
931
+ Aa as HomeLayout,
931
932
  Ba as LineChart,
932
933
  ka as Link,
933
934
  Cr as OneFilterPicker,
@@ -935,7 +936,7 @@ export {
935
936
  Ue as PrivacyModeProvider,
936
937
  fe as ProductBlankslate,
937
938
  yr as ProductCard,
938
- Aa as ProductModal,
939
+ Va as ProductModal,
939
940
  xa as ProductWidget,
940
941
  Ea as ProgressBarChart,
941
942
  ja as StandardLayout,
@@ -968,7 +969,7 @@ export {
968
969
  _r as useEmojiConfetti,
969
970
  jr as useGroups,
970
971
  zr as usePrivacyMode,
971
- Vr as useReducedMotion,
972
- Ar as useSelectable,
972
+ Ar as useReducedMotion,
973
+ Vr as useSelectable,
973
974
  qr as useXRay
974
975
  };