@factorialco/f0-react 1.290.0 → 1.291.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/experimental.d.ts +124 -89
- package/dist/experimental.js +3028 -3026
- package/dist/f0.d.ts +123 -29
- package/dist/f0.js +39 -37
- package/dist/{hooks-B2MvGPG3.js → hooks-C7xcrcsI.js} +25928 -25816
- package/dist/i18n-provider-defaults.d.ts +35 -27
- package/dist/i18n-provider-defaults.js +9 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/f0.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag';
|
|
|
28
28
|
import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
|
|
29
29
|
import { F0GridStackRef as F0GridStackRef_2 } from './F0GridStack';
|
|
30
30
|
import { F0IconProps as F0IconProps_2 } from './F0Icon';
|
|
31
|
+
import { F0SelectProps as F0SelectProps_2 } from './types';
|
|
31
32
|
import { f1Colors } from '@factorialco/f0-core';
|
|
32
33
|
import { FileCellValue } from '../../value-display/types/file';
|
|
33
34
|
import { FileCellValue as FileCellValue_2 } from './types/file';
|
|
@@ -81,6 +82,14 @@ import { VariantProps } from 'cva';
|
|
|
81
82
|
export declare type Action = UpsellAction | RegularAction;
|
|
82
83
|
|
|
83
84
|
declare type Action_2 = {
|
|
85
|
+
label: string;
|
|
86
|
+
onClick: () => void;
|
|
87
|
+
icon?: IconType;
|
|
88
|
+
variant?: F0ButtonProps["variant"];
|
|
89
|
+
disabled?: boolean;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
declare type Action_3 = {
|
|
84
93
|
label: string;
|
|
85
94
|
onClick: () => void;
|
|
86
95
|
icon?: IconType;
|
|
@@ -1563,6 +1572,7 @@ export declare const defaultTranslations: {
|
|
|
1563
1572
|
readonly other: "Other actions";
|
|
1564
1573
|
readonly toggle: "Toggle";
|
|
1565
1574
|
readonly toggleDropdownMenu: "Toggle dropdown menu";
|
|
1575
|
+
readonly selectAll: "Select all";
|
|
1566
1576
|
};
|
|
1567
1577
|
readonly status: {
|
|
1568
1578
|
readonly selected: {
|
|
@@ -1571,6 +1581,13 @@ export declare const defaultTranslations: {
|
|
|
1571
1581
|
};
|
|
1572
1582
|
};
|
|
1573
1583
|
readonly filters: {
|
|
1584
|
+
readonly searchPlaceholder: "Search filters...";
|
|
1585
|
+
readonly inFilter: {
|
|
1586
|
+
readonly searchPlaceholder: "Search options...";
|
|
1587
|
+
};
|
|
1588
|
+
readonly activeFilters: "Active filters: {{filters}}";
|
|
1589
|
+
readonly filteringBy: "Filtering by {{label}}";
|
|
1590
|
+
readonly availableFilters: "Available filters";
|
|
1574
1591
|
readonly label: "Filters";
|
|
1575
1592
|
readonly applyFilters: "Apply filters";
|
|
1576
1593
|
readonly applySelection: "Apply selection";
|
|
@@ -2347,6 +2364,79 @@ export declare const F0Provider: React.FC<{
|
|
|
2347
2364
|
dataCollectionStorageHandler?: DataCollectionStorageHandler;
|
|
2348
2365
|
}>;
|
|
2349
2366
|
|
|
2367
|
+
/**
|
|
2368
|
+
* @experimental This is an experimental component use it at your own risk
|
|
2369
|
+
*/
|
|
2370
|
+
export declare const F0Select: <T extends string = string, R = unknown>(props: F0SelectProps_2<T, R> & {
|
|
2371
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
2372
|
+
}) => React.ReactElement;
|
|
2373
|
+
|
|
2374
|
+
export declare type F0SelectItemObject<T, R = unknown> = {
|
|
2375
|
+
type?: "item";
|
|
2376
|
+
value: T;
|
|
2377
|
+
label: string;
|
|
2378
|
+
description?: string;
|
|
2379
|
+
avatar?: AvatarVariant;
|
|
2380
|
+
tag?: string;
|
|
2381
|
+
icon?: IconType;
|
|
2382
|
+
item?: R;
|
|
2383
|
+
disabled?: boolean;
|
|
2384
|
+
};
|
|
2385
|
+
|
|
2386
|
+
export declare type F0SelectItemProps<T, R = unknown> = F0SelectItemObject<T, R> | {
|
|
2387
|
+
type: "separator";
|
|
2388
|
+
};
|
|
2389
|
+
|
|
2390
|
+
/**
|
|
2391
|
+
* Select component for choosing from a list of options.
|
|
2392
|
+
*
|
|
2393
|
+
* @template T - The type of the emitted value
|
|
2394
|
+
* @template R - The type of the record/item data (used with data source)
|
|
2395
|
+
*
|
|
2396
|
+
*/
|
|
2397
|
+
export declare type F0SelectProps<T extends string, R = unknown> = {
|
|
2398
|
+
onChangeSelectedOption?: (option: F0SelectItemObject<T, ResolvedRecordType<R>> | undefined, checked: boolean) => void;
|
|
2399
|
+
children?: React.ReactNode;
|
|
2400
|
+
open?: boolean;
|
|
2401
|
+
showSearchBox?: boolean;
|
|
2402
|
+
searchBoxPlaceholder?: string;
|
|
2403
|
+
onSearchChange?: (value: string) => void;
|
|
2404
|
+
searchValue?: string;
|
|
2405
|
+
onOpenChange?: (open: boolean) => void;
|
|
2406
|
+
searchEmptyMessage?: string;
|
|
2407
|
+
className?: string;
|
|
2408
|
+
selectContentClassName?: string;
|
|
2409
|
+
actions?: Action_2[];
|
|
2410
|
+
portalContainer?: HTMLElement | null;
|
|
2411
|
+
} & ({
|
|
2412
|
+
clearable?: false;
|
|
2413
|
+
multiple?: false;
|
|
2414
|
+
value?: T;
|
|
2415
|
+
defaultItem?: F0SelectItemObject<T, ResolvedRecordType<R>>;
|
|
2416
|
+
onChange?: (value: T, originalItem?: ResolvedRecordType<R> | undefined, option?: F0SelectItemObject<T, ResolvedRecordType<R>>) => void;
|
|
2417
|
+
} | {
|
|
2418
|
+
clearable: true;
|
|
2419
|
+
multiple?: false;
|
|
2420
|
+
value?: T;
|
|
2421
|
+
defaultItem?: F0SelectItemObject<T, ResolvedRecordType<R>>;
|
|
2422
|
+
onChange?: (value: T, originalItem?: ResolvedRecordType<R> | undefined, option?: F0SelectItemObject<T, ResolvedRecordType<R>>) => void;
|
|
2423
|
+
} | {
|
|
2424
|
+
multiple: true;
|
|
2425
|
+
clearable?: boolean;
|
|
2426
|
+
value?: T[];
|
|
2427
|
+
defaultItem?: F0SelectItemObject<T, ResolvedRecordType<R>>[];
|
|
2428
|
+
onChange?: (value: T[], originalItems: ResolvedRecordType<R>[], options: F0SelectItemObject<T, ResolvedRecordType<R>>[]) => void;
|
|
2429
|
+
}) & ({
|
|
2430
|
+
source: DataSourceDefinition<ResolvedRecordType<R>, FiltersDefinition, SortingsDefinition, GroupingDefinition<ResolvedRecordType<R>>>;
|
|
2431
|
+
mapOptions: (item: ResolvedRecordType<R>) => F0SelectItemProps<T, ResolvedRecordType<R>>;
|
|
2432
|
+
options?: never;
|
|
2433
|
+
} | {
|
|
2434
|
+
source?: never;
|
|
2435
|
+
mapOptions?: never;
|
|
2436
|
+
searchFn?: (option: F0SelectItemProps<T, unknown>, search?: string) => boolean | undefined;
|
|
2437
|
+
options: F0SelectItemProps<T, unknown>[];
|
|
2438
|
+
}) & Pick<InputFieldProps<T>, "required" | "loading" | "hideLabel" | "labelIcon" | "size" | "label" | "icon" | "placeholder" | "disabled" | "name" | "error" | "status" | "hint">;
|
|
2439
|
+
|
|
2350
2440
|
export declare const F0TagAlert: ForwardRefExoticComponent<TagAlertProps & RefAttributes<HTMLDivElement>>;
|
|
2351
2441
|
|
|
2352
2442
|
export declare const F0TagBalance: ForwardRefExoticComponent<TagBalanceProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -3409,8 +3499,8 @@ declare type ProductModalProps = {
|
|
|
3409
3499
|
label: string;
|
|
3410
3500
|
variant?: Variant;
|
|
3411
3501
|
};
|
|
3412
|
-
primaryAction?:
|
|
3413
|
-
secondaryAction?:
|
|
3502
|
+
primaryAction?: Action_3;
|
|
3503
|
+
secondaryAction?: Action_3;
|
|
3414
3504
|
portalContainer?: HTMLElement | null;
|
|
3415
3505
|
showResponseDialog?: boolean;
|
|
3416
3506
|
};
|
|
@@ -3549,6 +3639,8 @@ declare type RegularAction = BaseAction & {
|
|
|
3549
3639
|
|
|
3550
3640
|
declare type RendererDefinition = ValueDisplayRendererDefinition;
|
|
3551
3641
|
|
|
3642
|
+
export declare type ResolvedRecordType<R> = R extends RecordType ? R : RecordType;
|
|
3643
|
+
|
|
3552
3644
|
export declare type SearchFilterDefinition = BaseFilterDefinition<"search">;
|
|
3553
3645
|
|
|
3554
3646
|
declare type SearchOptions = {
|
|
@@ -3616,6 +3708,8 @@ export declare type SelectedItemsState = {
|
|
|
3616
3708
|
}>;
|
|
3617
3709
|
};
|
|
3618
3710
|
|
|
3711
|
+
export declare const selectSizes: readonly ["sm", "md"];
|
|
3712
|
+
|
|
3619
3713
|
/**
|
|
3620
3714
|
* Response structure for non-paginated data
|
|
3621
3715
|
*/
|
|
@@ -4410,6 +4504,31 @@ declare global {
|
|
|
4410
4504
|
}
|
|
4411
4505
|
|
|
4412
4506
|
|
|
4507
|
+
declare module "gridstack" {
|
|
4508
|
+
interface GridStackWidget {
|
|
4509
|
+
id?: string;
|
|
4510
|
+
allowedSizes?: Array<{
|
|
4511
|
+
w: number;
|
|
4512
|
+
h: number;
|
|
4513
|
+
}>;
|
|
4514
|
+
renderFn?: () => React.ReactElement | null;
|
|
4515
|
+
meta?: Record<string, unknown>;
|
|
4516
|
+
}
|
|
4517
|
+
interface GridStackNode {
|
|
4518
|
+
id?: string;
|
|
4519
|
+
w?: number;
|
|
4520
|
+
h?: number;
|
|
4521
|
+
x?: number;
|
|
4522
|
+
y?: number;
|
|
4523
|
+
allowedSizes?: Array<{
|
|
4524
|
+
w: number;
|
|
4525
|
+
h: number;
|
|
4526
|
+
}>;
|
|
4527
|
+
renderFn?: () => React.ReactElement | null;
|
|
4528
|
+
}
|
|
4529
|
+
}
|
|
4530
|
+
|
|
4531
|
+
|
|
4413
4532
|
declare module "@tiptap/core" {
|
|
4414
4533
|
interface Commands<ReturnType> {
|
|
4415
4534
|
aiBlock: {
|
|
@@ -4437,28 +4556,8 @@ declare module "@tiptap/core" {
|
|
|
4437
4556
|
}
|
|
4438
4557
|
|
|
4439
4558
|
|
|
4440
|
-
declare
|
|
4441
|
-
|
|
4442
|
-
id?: string;
|
|
4443
|
-
allowedSizes?: Array<{
|
|
4444
|
-
w: number;
|
|
4445
|
-
h: number;
|
|
4446
|
-
}>;
|
|
4447
|
-
renderFn?: () => React.ReactElement | null;
|
|
4448
|
-
meta?: Record<string, unknown>;
|
|
4449
|
-
}
|
|
4450
|
-
interface GridStackNode {
|
|
4451
|
-
id?: string;
|
|
4452
|
-
w?: number;
|
|
4453
|
-
h?: number;
|
|
4454
|
-
x?: number;
|
|
4455
|
-
y?: number;
|
|
4456
|
-
allowedSizes?: Array<{
|
|
4457
|
-
w: number;
|
|
4458
|
-
h: number;
|
|
4459
|
-
}>;
|
|
4460
|
-
renderFn?: () => React.ReactElement | null;
|
|
4461
|
-
}
|
|
4559
|
+
declare namespace Calendar {
|
|
4560
|
+
var displayName: string;
|
|
4462
4561
|
}
|
|
4463
4562
|
|
|
4464
4563
|
|
|
@@ -4469,8 +4568,3 @@ declare module "@tiptap/core" {
|
|
|
4469
4568
|
};
|
|
4470
4569
|
}
|
|
4471
4570
|
}
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
declare namespace Calendar {
|
|
4475
|
-
var displayName: string;
|
|
4476
|
-
}
|
package/dist/f0.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { S as Ge, a as Kt, f as Ce, L as J, b as Vt, A as qt, i as ae, c as tt, d as it, E as Xt, g as he, e as Yt, h as Jt, C as Zt, j as Qt, k as V, l as st, u as ei, G as ti, m as ii, n as $e, o as si, p as rt, q as ri, B as nt, X as ot, Y as ze, r as ni, s as at, t as oi, v as ai, w as li, x as hi, y as di, z as ci, D as ui, F as fi, H as Ue, I as gi, J as Z, K as Ne, M as pi, N as mi, O as vi, P as lt, Q as L, R as F, T as yi, U as bi, V as xi, W as _i, Z as wi, _ as Ei, $ as Ci, a0 as ht, a1 as Ni, a2 as de, a3 as dt, a4 as ct, a5 as Ri, a6 as ut, a7 as ft, a8 as gt, a9 as pt, aa as zi, ab as Di, ac as mt, ad as Pi, ae as Si, af as vt, ag as ki, ah as yt, ai as Oi, aj as Ai, ak as Ti, al as Li, am as Mi, an as Hi, ao as Bi, ap as Fi, aq as bt, ar as q, as as xt, at as Ii, au as Wi, av as je, aw as Gi, ax as _t, ay as $i, az as Ui, aA as ji, aB as Ki, aC as Vi, aD as qi, aE as Xi, aF as Yi, aG as Ji, aH as Zi, aI as Qi, aJ as es } from "./hooks-
|
|
2
|
-
import {
|
|
1
|
+
import { S as Ge, a as Kt, f as Ce, L as J, b as Vt, A as qt, i as ae, c as tt, d as it, E as Xt, g as he, e as Yt, h as Jt, C as Zt, j as Qt, k as V, l as st, u as ei, G as ti, m as ii, n as $e, o as si, p as rt, q as ri, B as nt, X as ot, Y as ze, r as ni, s as at, t as oi, v as ai, w as li, x as hi, y as di, z as ci, D as ui, F as fi, H as Ue, I as gi, J as Z, K as Ne, M as pi, N as mi, O as vi, P as lt, Q as L, R as F, T as yi, U as bi, V as xi, W as _i, Z as wi, _ as Ei, $ as Ci, a0 as ht, a1 as Ni, a2 as de, a3 as dt, a4 as ct, a5 as Ri, a6 as ut, a7 as ft, a8 as gt, a9 as pt, aa as zi, ab as Di, ac as mt, ad as Pi, ae as Si, af as vt, ag as ki, ah as yt, ai as Oi, aj as Ai, ak as Ti, al as Li, am as Mi, an as Hi, ao as Bi, ap as Fi, aq as bt, ar as q, as as xt, at as Ii, au as Wi, av as je, aw as Gi, ax as _t, ay as $i, az as Ui, aA as ji, aB as Ki, aC as Vi, aD as qi, aE as Xi, aF as Yi, aG as Ji, aH as Zi, aI as Qi, aJ as es } from "./hooks-C7xcrcsI.js";
|
|
2
|
+
import { bc as Fr, bp as Ir, by as Wr, aK as Gr, aL as $r, aM as Ur, aN as jr, aO as Kr, aP as Vr, aQ as qr, aR as Xr, aT as Yr, aU as Jr, aV as Zr, aW as Qr, aX as en, aY as tn, aZ as sn, bu as rn, a$ as nn, b0 as on, b3 as an, b4 as ln, b5 as hn, b6 as dn, b9 as cn, ba as un, bb as fn, be as gn, b2 as pn, bd as mn, b8 as vn, bv as yn, bo as bn, bj as xn, bm as _n, bi as wn, bz as En, bh as Cn, bg as Nn, aS as Rn, a_ as zn, b1 as Dn, b7 as Pn, bf as Sn, bk as kn, bq as On, br as An, bs as Tn, bA as Ln, bl as Mn, bt as Hn, bx as Bn, bn as Fn, bw as In } from "./hooks-C7xcrcsI.js";
|
|
3
3
|
import { jsx as g, jsxs as R, Fragment as xe } from "react/jsx-runtime";
|
|
4
4
|
import * as ke from "react";
|
|
5
5
|
import P, { PureComponent as ts, useState as M, forwardRef as U, createElement as Ke, useRef as Q, useImperativeHandle as wt, Children as is, createContext as _e, useContext as Et, useCallback as K, useEffect as ce, useLayoutEffect as Ve, useMemo as Ct } from "react";
|
|
6
6
|
import { createPortal as ss } from "react-dom";
|
|
7
|
-
import { defaultTranslations as
|
|
7
|
+
import { defaultTranslations as Gn } from "./i18n-provider-defaults.js";
|
|
8
8
|
import './f0.css';const cr = [
|
|
9
9
|
"person",
|
|
10
10
|
"team",
|
|
@@ -5154,29 +5154,30 @@ export {
|
|
|
5154
5154
|
Ti as F0Icon,
|
|
5155
5155
|
nn as F0Link,
|
|
5156
5156
|
Lr as F0Provider,
|
|
5157
|
-
on as
|
|
5158
|
-
an as
|
|
5159
|
-
ln as
|
|
5160
|
-
hn as
|
|
5161
|
-
dn as
|
|
5162
|
-
cn as
|
|
5157
|
+
on as F0Select,
|
|
5158
|
+
an as F0TagAlert,
|
|
5159
|
+
ln as F0TagBalance,
|
|
5160
|
+
hn as F0TagCompany,
|
|
5161
|
+
dn as F0TagDot,
|
|
5162
|
+
cn as F0TagList,
|
|
5163
|
+
un as F0TagPerson,
|
|
5163
5164
|
Oi as F0TagRaw,
|
|
5164
5165
|
Ai as F0TagStatus,
|
|
5165
|
-
|
|
5166
|
+
fn as F0TagTeam,
|
|
5166
5167
|
Bs as F0Text,
|
|
5167
|
-
|
|
5168
|
+
gn as GROUP_ID_SYMBOL,
|
|
5168
5169
|
kr as HomeLayout,
|
|
5169
5170
|
mr as LineChart,
|
|
5170
|
-
|
|
5171
|
+
pn as OneFilterPicker,
|
|
5171
5172
|
vr as PieChart,
|
|
5172
5173
|
Yi as PrivacyModeProvider,
|
|
5173
5174
|
$t as ProductBlankslate,
|
|
5174
|
-
|
|
5175
|
+
mn as ProductCard,
|
|
5175
5176
|
Ar as ProductModal,
|
|
5176
5177
|
ir as ProductWidget,
|
|
5177
5178
|
br as ProgressBarChart,
|
|
5178
5179
|
Pr as StandardLayout,
|
|
5179
|
-
|
|
5180
|
+
vn as TagCounter,
|
|
5180
5181
|
Sr as TwoColumnLayout,
|
|
5181
5182
|
xt as UpsellRequestResponseDialog,
|
|
5182
5183
|
sr as UpsellingBanner,
|
|
@@ -5184,36 +5185,37 @@ export {
|
|
|
5184
5185
|
Tr as UpsellingPopover,
|
|
5185
5186
|
yr as VerticalBarChart,
|
|
5186
5187
|
cr as avatarVariants,
|
|
5187
|
-
|
|
5188
|
+
yn as buildTranslations,
|
|
5188
5189
|
Cr as buttonDropdownSizes,
|
|
5189
5190
|
Er as buttonDropdownVariants,
|
|
5190
5191
|
wr as buttonSizes,
|
|
5191
5192
|
Nr as buttonToggleSizes,
|
|
5192
5193
|
_r as buttonVariants,
|
|
5193
|
-
|
|
5194
|
-
|
|
5194
|
+
bn as createAtlaskitDriver,
|
|
5195
|
+
xn as createDataSourceDefinition,
|
|
5195
5196
|
Mr as dataCollectionLocalStorageHandler,
|
|
5196
5197
|
Dr as datepickerSizes,
|
|
5197
|
-
|
|
5198
|
+
Gn as defaultTranslations,
|
|
5198
5199
|
pt as experimental,
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5200
|
+
_n as getAnimationVariants,
|
|
5201
|
+
wn as getDataSourcePaginationType,
|
|
5202
|
+
En as getEmojiLabel,
|
|
5203
|
+
Cn as isInfiniteScrollPagination,
|
|
5204
|
+
Nn as isPageBasedPagination,
|
|
5204
5205
|
Rr as linkVariants,
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5206
|
+
Rn as modules,
|
|
5207
|
+
zn as predefinedPresets,
|
|
5208
|
+
Dn as selectSizes,
|
|
5209
|
+
Pn as tagDotColors,
|
|
5210
|
+
Sn as useData,
|
|
5211
|
+
kn as useDataSource,
|
|
5212
|
+
On as useDndEvents,
|
|
5213
|
+
An as useDraggable,
|
|
5214
|
+
Tn as useDroppableList,
|
|
5215
|
+
Ln as useEmojiConfetti,
|
|
5216
|
+
Mn as useGroups,
|
|
5217
|
+
Hn as usePrivacyMode,
|
|
5218
|
+
Bn as useReducedMotion,
|
|
5219
|
+
Fn as useSelectable,
|
|
5220
|
+
In as useXRay
|
|
5219
5221
|
};
|