@factorialco/f0-react 1.318.0 → 1.318.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.
package/dist/f0.d.ts CHANGED
@@ -22,6 +22,7 @@ import { CompanyCellValue } from '../../value-display/types/company';
22
22
  import { CompanyCellValue as CompanyCellValue_2 } from './types/company';
23
23
  import { ComponentProps } from 'react';
24
24
  import { ComponentType } from 'react';
25
+ import { Context } from 'react';
25
26
  import { CountryCellValue } from './types/country';
26
27
  import { DashboardProps as DashboardProps_2 } from './Dashboard';
27
28
  import { DateCellValue } from '../../value-display/types/date';
@@ -30,9 +31,11 @@ import { DateFilterOptions } from './DateFilter/DateFilter';
30
31
  import { default as default_2 } from 'react';
31
32
  import { DotTagCellValue } from '../../value-display/types/dotTag';
32
33
  import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag';
34
+ import { F0DialogInternalProps } from './internal-types';
33
35
  import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
34
36
  import { F0SelectProps as F0SelectProps_2 } from './types';
35
37
  import { f1Colors } from '@factorialco/f0-core';
38
+ import { FC } from 'react';
36
39
  import { FileCellValue } from '../../value-display/types/file';
37
40
  import { FileCellValue as FileCellValue_2 } from './types/file';
38
41
  import { FolderCellValue } from '../../value-display/types/folder';
@@ -1949,6 +1952,14 @@ export declare const defaultTranslations: {
1949
1952
  };
1950
1953
  };
1951
1954
 
1955
+ export declare type DialogPosition = (typeof dialogPositions)[number];
1956
+
1957
+ declare const dialogPositions: readonly ["center", "left", "right", "fullscreen"];
1958
+
1959
+ export declare type DialogWidth = (typeof dialogWidths)[number];
1960
+
1961
+ declare const dialogWidths: readonly ["sm", "md", "lg"];
1962
+
1952
1963
  /**
1953
1964
  * Remove a property from a union of objects.
1954
1965
  * @example
@@ -2399,6 +2410,67 @@ export declare type F0DatePickerProps = Pick<DatePickerPopupProps, "granularitie
2399
2410
  value?: DatePickerValue;
2400
2411
  } & Pick<InputFieldProps<string>, InputFieldInheritedProps>;
2401
2412
 
2413
+ /**
2414
+ * @experimental This is an experimental component use it at your own risk
2415
+ */
2416
+ export declare const F0Dialog: FC<F0DialogInternalProps>;
2417
+
2418
+ export declare type F0DialogActionsProps = {
2419
+ primaryAction?: F0DialogPrimaryAction | F0DialogPrimaryActionItem[];
2420
+ secondaryAction?: F0DialogSecondaryAction;
2421
+ };
2422
+
2423
+ export declare const F0DialogContext: Context<F0DialogContextType>;
2424
+
2425
+ declare type F0DialogContextType = {
2426
+ open: boolean;
2427
+ onClose: () => void;
2428
+ shownBottomSheet: boolean;
2429
+ position: DialogPosition;
2430
+ /**
2431
+ * The dialog's content container element.
2432
+ * Use this as the `portalContainer` prop for components like F0Select
2433
+ * to ensure dropdowns render inside the dialog.
2434
+ */
2435
+ portalContainer: HTMLDivElement | null;
2436
+ };
2437
+
2438
+ export declare type F0DialogPrimaryAction = {
2439
+ label: string;
2440
+ icon?: IconType;
2441
+ onClick: () => void;
2442
+ disabled?: boolean;
2443
+ loading?: boolean;
2444
+ };
2445
+
2446
+ export declare type F0DialogPrimaryActionItem = {
2447
+ value: string;
2448
+ label: string;
2449
+ icon?: IconType;
2450
+ onClick: () => void;
2451
+ disabled?: boolean;
2452
+ loading?: boolean;
2453
+ };
2454
+
2455
+ export declare const F0DialogProvider: ({ isOpen, onClose, shownBottomSheet, position, children, portalContainer, }: F0DialogProviderProps) => JSX_2.Element;
2456
+
2457
+ declare type F0DialogProviderProps = {
2458
+ isOpen: boolean;
2459
+ onClose: () => void;
2460
+ shownBottomSheet?: boolean;
2461
+ position: DialogPosition;
2462
+ children: ReactNode;
2463
+ portalContainer: HTMLDivElement | null;
2464
+ };
2465
+
2466
+ export declare type F0DialogSecondaryAction = {
2467
+ label: string;
2468
+ icon?: IconType;
2469
+ onClick: () => void;
2470
+ disabled?: boolean;
2471
+ loading?: boolean;
2472
+ };
2473
+
2402
2474
  export declare type F0DropdownButtonProps<T = string> = {
2403
2475
  size?: ButtonDropdownSize;
2404
2476
  items: ButtonDropdownItem<T>[] | ButtonDropdownGroup<T>[] | ButtonDropdownGroup<T>;
@@ -4854,6 +4926,8 @@ export declare const useEmojiConfetti: () => {
4854
4926
  fireEmojiConfetti: (emoji: string, elementRef: RefObject<HTMLElement>) => void;
4855
4927
  };
4856
4928
 
4929
+ export declare const useF0Dialog: () => F0DialogContextType;
4930
+
4857
4931
  export declare const useGroups: <R extends RecordType>(groups: GroupRecord<R>[], defaultOpenGroups?: boolean | GroupRecord<R>["key"][]) => {
4858
4932
  openGroups: Record<string, boolean>;
4859
4933
  setGroupOpen: (key: string, open: boolean) => void;
@@ -5043,23 +5117,6 @@ declare global {
5043
5117
  }
5044
5118
  }
5045
5119
 
5046
- declare module "gridstack" {
5047
- interface GridStackWidget {
5048
- id?: string;
5049
- allowedSizes?: Array<{
5050
- w: number;
5051
- h: number;
5052
- }>;
5053
- meta?: Record<string, unknown>;
5054
- }
5055
- interface GridStackNode {
5056
- allowedSizes?: Array<{
5057
- w: number;
5058
- h: number;
5059
- }>;
5060
- }
5061
- }
5062
-
5063
5120
 
5064
5121
  declare module "@tiptap/core" {
5065
5122
  interface Commands<ReturnType> {
@@ -5087,9 +5144,21 @@ declare module "@tiptap/core" {
5087
5144
  }
5088
5145
  }
5089
5146
 
5090
-
5091
- declare namespace Calendar {
5092
- var displayName: string;
5147
+ declare module "gridstack" {
5148
+ interface GridStackWidget {
5149
+ id?: string;
5150
+ allowedSizes?: Array<{
5151
+ w: number;
5152
+ h: number;
5153
+ }>;
5154
+ meta?: Record<string, unknown>;
5155
+ }
5156
+ interface GridStackNode {
5157
+ allowedSizes?: Array<{
5158
+ w: number;
5159
+ h: number;
5160
+ }>;
5161
+ }
5093
5162
  }
5094
5163
 
5095
5164
 
@@ -5100,3 +5169,8 @@ declare module "@tiptap/core" {
5100
5169
  };
5101
5170
  }
5102
5171
  }
5172
+
5173
+
5174
+ declare namespace Calendar {
5175
+ var displayName: string;
5176
+ }
package/dist/f0.js CHANGED
@@ -1,9 +1,9 @@
1
- import { L as En, C as Kr, c as U, a as Di, u as Dn, m as Ri, i as Rn, B as Si, O as Xr, p as Yr, w as Sn, S as xe, b as Nn, F as An, d as Vr, A as qr, D as Jr, e as Zr, f as we, g as Qr, h as me, j as qi, k as es, l as di, n as lt, o as ts, q as is, r as At, s as On, E as ns, t as zt, v as rs, x as ss, y as os, z as as, G as Xe, H as kn, I as ls, J as cs, K as ds, M as Ji, N as us, P as Tn, Q as hs, R as zn, X as Pn, Y as vi, T as fs, U as Mn, V as gs, W as ps, Z as ms, _ as vs, $ as ys, a0 as bs, a1 as xs, a2 as ws, a3 as Zi, a4 as Cs, a5 as ct, a6 as ui, a7 as _s, a8 as Es, a9 as Ds, aa as Rs, ab as Ss, ac as Ns, ad as As, ae as Os, af as ks, ag as Ts, ah as zs, ai as Qi, aj as Ps, ak as Ms, al as Ln, am as Ls, an as Mt, ao as In, ap as Hn, aq as Is, ar as Bn, as as Fn, at as Wn, au as Hs, av as Bs, aw as en, ax as Fs, ay as Gn, az as Ws, aA as Gs, aB as $s, aC as Us, aD as js, aE as Ks, aF as $n, aG as qe, aH as Un, aI as Xs, aJ as Ys, aK as tn, aL as Vs, aM as jn, aN as qs, aO as Js, aP as Zs, aQ as Qs, aR as eo, aS as to, aT as io, aU as no, aV as ro, aW as so, aX as oo, aY as ao } from "./hooks-DAsEPAIb.js";
2
- import { bs as ud, bF as hd, bO as fd, aZ as gd, a_ as pd, a$ as md, b0 as vd, b1 as yd, b2 as bd, b3 as xd, b4 as wd, b6 as Cd, b7 as _d, b8 as Ed, b9 as Dd, bc as Rd, bd as Sd, be as Nd, bK as Ad, bg as Od, bh as kd, bl as Td, bm as zd, bn as Pd, bp as Md, bq as Ld, br as Id, bu as Hd, bj as Bd, bt as Fd, bk as Wd, bo as Gd, bL as $d, ba as Ud, bb as jd, bE as Kd, bz as Xd, bC as Yd, by as Vd, bP as qd, bx as Jd, bw as Zd, b5 as Qd, bf as eu, bi as tu, bv as iu, bA as nu, bG as ru, bH as su, bI as ou, bQ as au, bB as lu, bJ as cu, bN as du, bD as uu, bM as hu } from "./hooks-DAsEPAIb.js";
1
+ import { L as En, C as Kr, c as U, a as Di, u as Dn, m as Ri, i as Rn, B as Si, O as Xr, p as Yr, w as Sn, S as xe, b as Nn, F as An, d as Vr, A as qr, D as Jr, e as Zr, f as we, g as Qr, h as me, j as qi, k as es, l as di, n as lt, o as ts, q as is, r as At, s as On, E as ns, t as zt, v as rs, x as ss, y as os, z as as, G as Xe, H as kn, I as ls, J as cs, K as ds, M as Ji, N as us, P as Tn, Q as hs, R as zn, X as Pn, Y as vi, T as fs, U as Mn, V as gs, W as ps, Z as ms, _ as vs, $ as ys, a0 as bs, a1 as xs, a2 as ws, a3 as Zi, a4 as Cs, a5 as ct, a6 as ui, a7 as _s, a8 as Es, a9 as Ds, aa as Rs, ab as Ss, ac as Ns, ad as As, ae as Os, af as ks, ag as Ts, ah as zs, ai as Qi, aj as Ps, ak as Ms, al as Ln, am as Ls, an as Mt, ao as In, ap as Hn, aq as Is, ar as Bn, as as Fn, at as Wn, au as Hs, av as Bs, aw as en, ax as Fs, ay as Gn, az as Ws, aA as Gs, aB as $s, aC as Us, aD as js, aE as Ks, aF as $n, aG as qe, aH as Un, aI as Xs, aJ as Ys, aK as tn, aL as Vs, aM as jn, aN as qs, aO as Js, aP as Zs, aQ as Qs, aR as eo, aS as to, aT as io, aU as no, aV as ro, aW as so, aX as oo, aY as ao } from "./hooks-B4dLKVTc.js";
2
+ import { bw as ud, bJ as hd, bS as fd, aZ as gd, a_ as pd, a$ as md, b0 as vd, b1 as yd, b2 as bd, b3 as xd, b4 as wd, b6 as Cd, b7 as _d, b8 as Ed, b9 as Dd, bc as Rd, bd as Sd, be as Nd, bg as Ad, bh as Od, bi as kd, bO as Td, bk as zd, bl as Pd, bp as Md, bq as Ld, br as Id, bt as Hd, bu as Bd, bv as Fd, by as Wd, bn as Gd, bx as $d, bo as Ud, bs as jd, bP as Kd, ba as Xd, bb as Yd, bI as Vd, bD as qd, bG as Jd, bC as Zd, bT as Qd, bB as eu, bA as tu, b5 as iu, bf as nu, bm as ru, bz as su, bE as ou, bK as au, bL as lu, bM as cu, bU as du, bj as uu, bF as hu, bN as fu, bR as gu, bH as pu, bQ as mu } from "./hooks-B4dLKVTc.js";
3
3
  import { jsx as f, jsxs as P, Fragment as qt } from "react/jsx-runtime";
4
4
  import M, { forwardRef as oe, useRef as L, useImperativeHandle as lo, Children as Lt, createContext as Ae, useContext as _e, useState as B, useMemo as H, useEffect as I, useCallback as j, useLayoutEffect as yi, createElement as nn, isValidElement as Kn, Fragment as co, memo as uo, useReducer as ho, cloneElement as fo, PureComponent as go } from "react";
5
5
  import { createPortal as Xn, unstable_batchedUpdates as Ot } from "react-dom";
6
- import { defaultTranslations as gu } from "./i18n-provider-defaults.js";
6
+ import { defaultTranslations as yu } from "./i18n-provider-defaults.js";
7
7
  import './f0.css';const po = {
8
8
  xs: 1,
9
9
  sm: 2,
@@ -9089,39 +9089,42 @@ export {
9089
9089
  Sd as F0Checkbox,
9090
9090
  id as F0ChipList,
9091
9091
  Nd as F0DatePicker,
9092
- Ad as F0EventCatcherProvider,
9092
+ Ad as F0Dialog,
9093
+ Od as F0DialogContext,
9094
+ kd as F0DialogProvider,
9095
+ Td as F0EventCatcherProvider,
9093
9096
  bc as F0FilterPickerContent,
9094
9097
  rd as F0GridStack,
9095
9098
  xc as F0Heading,
9096
9099
  An as F0Icon,
9097
- Od as F0Link,
9100
+ zd as F0Link,
9098
9101
  ad as F0Provider,
9099
- kd as F0Select,
9100
- Td as F0TagAlert,
9102
+ Pd as F0Select,
9103
+ Md as F0TagAlert,
9101
9104
  Ps as F0TagBalance,
9102
- zd as F0TagCompany,
9103
- Pd as F0TagDot,
9104
- Md as F0TagList,
9105
- Ld as F0TagPerson,
9105
+ Ld as F0TagCompany,
9106
+ Id as F0TagDot,
9107
+ Hd as F0TagList,
9108
+ Bd as F0TagPerson,
9106
9109
  Ws as F0TagRaw,
9107
9110
  Gs as F0TagStatus,
9108
- Id as F0TagTeam,
9111
+ Fd as F0TagTeam,
9109
9112
  tr as F0Text,
9110
- Hd as GROUP_ID_SYMBOL,
9113
+ Wd as GROUP_ID_SYMBOL,
9111
9114
  Hc as HomeLayout,
9112
9115
  Mc as Layout,
9113
9116
  Gc as LineChart,
9114
- Bd as OneFilterPicker,
9117
+ Gd as OneFilterPicker,
9115
9118
  $c as PieChart,
9116
9119
  no as PrivacyModeProvider,
9117
9120
  Ir as ProductBlankslate,
9118
- Fd as ProductCard,
9121
+ $d as ProductCard,
9119
9122
  sd as ProductModal,
9120
9123
  Ec as ProductWidget,
9121
9124
  jc as ProgressBarChart,
9122
9125
  Lc as StandardLayout,
9123
- Wd as Tag,
9124
- Gd as TagCounter,
9126
+ Ud as Tag,
9127
+ jd as TagCounter,
9125
9128
  Ic as TwoColumnLayout,
9126
9129
  Un as UpsellRequestResponseDialog,
9127
9130
  Dc as UpsellingBanner,
@@ -9129,42 +9132,43 @@ export {
9129
9132
  od as UpsellingPopover,
9130
9133
  Uc as VerticalBarChart,
9131
9134
  zc as avatarVariants,
9132
- $d as buildTranslations,
9135
+ Kd as buildTranslations,
9133
9136
  Jc as buttonDropdownSizes,
9134
9137
  qc as buttonDropdownVariants,
9135
9138
  Vc as buttonSizes,
9136
9139
  Zc as buttonToggleSizes,
9137
9140
  Qc as buttonToggleVariants,
9138
9141
  Yc as buttonVariants,
9139
- Ud as cardImageFits,
9140
- jd as cardImageSizes,
9141
- Kd as createAtlaskitDriver,
9142
- Xd as createDataSourceDefinition,
9142
+ Xd as cardImageFits,
9143
+ Yd as cardImageSizes,
9144
+ Vd as createAtlaskitDriver,
9145
+ qd as createDataSourceDefinition,
9143
9146
  zo as createPageLayoutBlock,
9144
9147
  Po as createPageLayoutBlockGroup,
9145
9148
  ld as dataCollectionLocalStorageHandler,
9146
9149
  nd as datepickerSizes,
9147
- gu as defaultTranslations,
9150
+ yu as defaultTranslations,
9148
9151
  we as experimental,
9149
- Yd as getAnimationVariants,
9150
- Vd as getDataSourcePaginationType,
9151
- qd as getEmojiLabel,
9152
- Jd as isInfiniteScrollPagination,
9153
- Zd as isPageBasedPagination,
9152
+ Jd as getAnimationVariants,
9153
+ Zd as getDataSourcePaginationType,
9154
+ Qd as getEmojiLabel,
9155
+ eu as isInfiniteScrollPagination,
9156
+ tu as isPageBasedPagination,
9154
9157
  ed as linkVariants,
9155
- Qd as modules,
9156
- eu as predefinedPresets,
9157
- tu as selectSizes,
9158
+ iu as modules,
9159
+ nu as predefinedPresets,
9160
+ ru as selectSizes,
9158
9161
  td as tagDotColors,
9159
- iu as useData,
9160
- nu as useDataSource,
9161
- ru as useDndEvents,
9162
- su as useDraggable,
9163
- ou as useDroppableList,
9164
- au as useEmojiConfetti,
9165
- lu as useGroups,
9166
- cu as usePrivacyMode,
9167
- du as useReducedMotion,
9168
- uu as useSelectable,
9169
- hu as useXRay
9162
+ su as useData,
9163
+ ou as useDataSource,
9164
+ au as useDndEvents,
9165
+ lu as useDraggable,
9166
+ cu as useDroppableList,
9167
+ du as useEmojiConfetti,
9168
+ uu as useF0Dialog,
9169
+ hu as useGroups,
9170
+ fu as usePrivacyMode,
9171
+ gu as useReducedMotion,
9172
+ pu as useSelectable,
9173
+ mu as useXRay
9170
9174
  };