@factorialco/f0-react 1.310.0 → 1.311.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/README.md +1 -1
- package/dist/experimental.d.ts +5 -11
- package/dist/experimental.js +8000 -8053
- package/dist/f0.d.ts +161 -14
- package/dist/f0.js +942 -895
- package/dist/{hooks-BxHngDSH.js → hooks-BivGRF9G.js} +17035 -16958
- package/dist/i18n-provider-defaults.d.ts +5 -5
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/f0.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { AvatarListCellValue as AvatarListCellValue_2 } from './types/avatarList
|
|
|
10
10
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
11
11
|
import { AvatarProps as AvatarProps_2 } from '@radix-ui/react-avatar';
|
|
12
12
|
import { baseColors } from '@factorialco/f0-core';
|
|
13
|
+
import { BigNumberProps as BigNumberProps_2 } from './types';
|
|
13
14
|
import { BlockContentExtraProps } from './blocks/BlockContent';
|
|
14
15
|
import { BlockProps } from './blocks/Block';
|
|
15
16
|
import { CategoryBarProps } from './CategoryBarChart';
|
|
@@ -561,6 +562,14 @@ declare type BaseTag<T extends {
|
|
|
561
562
|
type: string;
|
|
562
563
|
}> = T & WithTooltipDescription;
|
|
563
564
|
|
|
565
|
+
export declare type BigNumberProps = {
|
|
566
|
+
value: Numeric | NumberWithFormatter | number;
|
|
567
|
+
label?: string;
|
|
568
|
+
trend?: boolean | TrendConfig;
|
|
569
|
+
comparisonHint?: string;
|
|
570
|
+
comparison: Numeric | NumberWithFormatter | number;
|
|
571
|
+
};
|
|
572
|
+
|
|
564
573
|
export declare const buildTranslations: (translations: TranslationsType) => TranslationsType;
|
|
565
574
|
|
|
566
575
|
/**
|
|
@@ -2212,6 +2221,13 @@ export declare type F0AvatarTeamProps = {
|
|
|
2212
2221
|
badge?: AvatarBadge;
|
|
2213
2222
|
} & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
|
|
2214
2223
|
|
|
2224
|
+
export declare const F0BigNumber: {
|
|
2225
|
+
({ label, ...props }: BigNumberProps_2): JSX_2.Element;
|
|
2226
|
+
displayName: string;
|
|
2227
|
+
} & {
|
|
2228
|
+
Skeleton: () => JSX_2.Element;
|
|
2229
|
+
};
|
|
2230
|
+
|
|
2215
2231
|
export declare const F0Button: ForwardRefExoticComponent<Omit<ButtonInternalProps, "style" | "className" | "variant" | "pressed" | "append" | "compact" | "noAutoTooltip" | "noTitle"> & {
|
|
2216
2232
|
variant?: Exclude<ButtonInternalProps["variant"], "ai">;
|
|
2217
2233
|
} & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
@@ -3373,13 +3389,128 @@ declare type NumberFilterValue = {
|
|
|
3373
3389
|
};
|
|
3374
3390
|
} | undefined;
|
|
3375
3391
|
|
|
3376
|
-
declare
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3392
|
+
export declare type NumberWithFormatter = NumericWithFormatter & {
|
|
3393
|
+
animated?: boolean;
|
|
3394
|
+
};
|
|
3395
|
+
|
|
3396
|
+
declare type Numeric = NumericValue | number | undefined | null;
|
|
3397
|
+
|
|
3398
|
+
/**
|
|
3399
|
+
* Formats a numeric value according to the provided options.
|
|
3400
|
+
*
|
|
3401
|
+
* @param value - The numeric value to format.
|
|
3402
|
+
* @param options - The formatting options.
|
|
3403
|
+
* @returns The formatted value as a string.
|
|
3404
|
+
*/
|
|
3405
|
+
declare type NumericFormatter = (value: Numeric, options?: NumericFormatterOptions) => string;
|
|
3406
|
+
|
|
3407
|
+
/**
|
|
3408
|
+
* Configuration options for the numeric formatter.
|
|
3409
|
+
*/
|
|
3410
|
+
declare type NumericFormatterOptions = {
|
|
3411
|
+
/**
|
|
3412
|
+
* Locale string for number formatting (e.g., "en-US", "es-ES", "de-DE").
|
|
3413
|
+
* Determines the decimal separator and other locale-specific formatting rules.
|
|
3414
|
+
*
|
|
3415
|
+
* @default "en-US"
|
|
3416
|
+
*/
|
|
3381
3417
|
locale?: string;
|
|
3382
|
-
|
|
3418
|
+
/**
|
|
3419
|
+
* Maximum number of decimal places to display.
|
|
3420
|
+
* The formatter will round the number to this precision.
|
|
3421
|
+
*
|
|
3422
|
+
* @default 2
|
|
3423
|
+
*/
|
|
3424
|
+
decimalPlaces?: number;
|
|
3425
|
+
/**
|
|
3426
|
+
* Whether to hide the units from the formatted value.
|
|
3427
|
+
*
|
|
3428
|
+
* @default false
|
|
3429
|
+
*/
|
|
3430
|
+
hideUnits?: boolean;
|
|
3431
|
+
/**
|
|
3432
|
+
* Whether to space the units from the formatted value.
|
|
3433
|
+
*
|
|
3434
|
+
* @default false
|
|
3435
|
+
*/
|
|
3436
|
+
unitsSpaced?: boolean;
|
|
3437
|
+
/**
|
|
3438
|
+
* Whether to use compact notation for the formatted value.
|
|
3439
|
+
*
|
|
3440
|
+
* @default false
|
|
3441
|
+
*/
|
|
3442
|
+
compact?: boolean;
|
|
3443
|
+
/**
|
|
3444
|
+
* Placeholder text to return when value is undefined or null.
|
|
3445
|
+
*/
|
|
3446
|
+
emptyPlaceholder?: string;
|
|
3447
|
+
/**
|
|
3448
|
+
* Whether to use grouping for the formatted value.
|
|
3449
|
+
*
|
|
3450
|
+
* @default true
|
|
3451
|
+
*/
|
|
3452
|
+
useGrouping?: boolean;
|
|
3453
|
+
};
|
|
3454
|
+
|
|
3455
|
+
/**
|
|
3456
|
+
* Represents a numeric value that can be formatted with optional units.
|
|
3457
|
+
*
|
|
3458
|
+
* The value can be provided in two formats:
|
|
3459
|
+
* - `value`: Direct numeric value (e.g., 123.45)
|
|
3460
|
+
* - `value_x100`: Value stored as integer multiplied by 100 (e.g., 12345 represents 123.45)
|
|
3461
|
+
*
|
|
3462
|
+
* @example
|
|
3463
|
+
* ```ts
|
|
3464
|
+
* // Direct value
|
|
3465
|
+
* const directValue: NumericValue = { value: 123.45, units: "€" }
|
|
3466
|
+
*
|
|
3467
|
+
* // Value stored as x100 (useful for avoiding floating point precision issues)
|
|
3468
|
+
* const x100Value: NumericValue = { value_x100: 12345, units: "€" }
|
|
3469
|
+
* ```
|
|
3470
|
+
*/
|
|
3471
|
+
declare type NumericValue = {
|
|
3472
|
+
/**
|
|
3473
|
+
* Optional unit string to append or prepend to the formatted number.
|
|
3474
|
+
* Common examples: "€", "$", "kg", "%", etc.
|
|
3475
|
+
*/
|
|
3476
|
+
units?: string;
|
|
3477
|
+
/**
|
|
3478
|
+
* Position of the units relative to the number.
|
|
3479
|
+
* - "prepend": Units appear before the number (e.g., "$123.45")
|
|
3480
|
+
* - "append": Units appear after the number (e.g., "123.45€")
|
|
3481
|
+
*
|
|
3482
|
+
* @default "append"
|
|
3483
|
+
*/
|
|
3484
|
+
unitsPosition?: "prepend" | "append";
|
|
3485
|
+
} & ({
|
|
3486
|
+
/**
|
|
3487
|
+
* Direct numeric value to format.
|
|
3488
|
+
*/
|
|
3489
|
+
value: number | undefined;
|
|
3490
|
+
} | {
|
|
3491
|
+
/**
|
|
3492
|
+
* Numeric value stored as an integer multiplied by 100.
|
|
3493
|
+
* This format is useful for avoiding floating-point precision issues.
|
|
3494
|
+
* The formatter will automatically divide by 100 before formatting.
|
|
3495
|
+
*
|
|
3496
|
+
* @example
|
|
3497
|
+
* value_x100: 12345 represents 123.45
|
|
3498
|
+
*/
|
|
3499
|
+
value_x100: number | undefined;
|
|
3500
|
+
});
|
|
3501
|
+
|
|
3502
|
+
/**
|
|
3503
|
+
* A numeric value that can be formatted with an optional formatter and options.
|
|
3504
|
+
*
|
|
3505
|
+
* @param value - The numeric value to format.
|
|
3506
|
+
* @param formatter - The formatter to use.
|
|
3507
|
+
* @param formatterOptions - The formatting options.
|
|
3508
|
+
*/
|
|
3509
|
+
declare type NumericWithFormatter = {
|
|
3510
|
+
numericValue: NumericValue;
|
|
3511
|
+
formatter?: NumericFormatter;
|
|
3512
|
+
formatterOptions?: NumericFormatterOptions;
|
|
3513
|
+
};
|
|
3383
3514
|
|
|
3384
3515
|
declare type OnBulkActionCallback<Record extends RecordType, Filters extends FiltersDefinition> = (...args: [
|
|
3385
3516
|
action: BulkAction,
|
|
@@ -3788,6 +3919,14 @@ declare type RegularAction = BaseAction & {
|
|
|
3788
3919
|
variant: ButtonVariant;
|
|
3789
3920
|
};
|
|
3790
3921
|
|
|
3922
|
+
/**
|
|
3923
|
+
* A numeric value that can be formatted with an optional formatter and options.
|
|
3924
|
+
* This is a relaxed version of NumericWithFormatter that allows the numeric value to be a Numeric.
|
|
3925
|
+
*/
|
|
3926
|
+
declare type RelaxedNumericWithFormatter = Omit<NumericWithFormatter, "numericValue"> & {
|
|
3927
|
+
numericValue: Numeric;
|
|
3928
|
+
};
|
|
3929
|
+
|
|
3791
3930
|
declare type RendererDefinition = ValueDisplayRendererDefinition;
|
|
3792
3931
|
|
|
3793
3932
|
export declare type ResolvedRecordType<R> = R extends RecordType ? R : RecordType;
|
|
@@ -4095,13 +4234,16 @@ export declare type TagBalanceProps = {
|
|
|
4095
4234
|
*/
|
|
4096
4235
|
nullText?: string;
|
|
4097
4236
|
/**
|
|
4098
|
-
*
|
|
4237
|
+
* Value to display next to the tag can be a number, a Numeric or a NumericWithFormatter
|
|
4099
4238
|
*/
|
|
4100
|
-
amount
|
|
4239
|
+
amount: RelaxedNumericWithFormatter | Numeric;
|
|
4101
4240
|
} & ({
|
|
4102
|
-
percentage:
|
|
4241
|
+
percentage: (Omit<RelaxedNumericWithFormatter, "value"> & {
|
|
4242
|
+
value: Omit<Numeric, "units" | "unitsPosition">;
|
|
4243
|
+
}) | Omit<Numeric, "units" | "unitsPosition">;
|
|
4103
4244
|
} | {
|
|
4104
4245
|
percentage?: null;
|
|
4246
|
+
formatterOptions?: undefined;
|
|
4105
4247
|
});
|
|
4106
4248
|
|
|
4107
4249
|
export declare interface TagCompanyProps {
|
|
@@ -4293,6 +4435,11 @@ declare type TranslationShape<T> = {
|
|
|
4293
4435
|
|
|
4294
4436
|
export declare type TranslationsType = TranslationShape<typeof defaultTranslations>;
|
|
4295
4437
|
|
|
4438
|
+
export declare type TrendConfig = {
|
|
4439
|
+
show?: boolean;
|
|
4440
|
+
invertStatus?: boolean;
|
|
4441
|
+
};
|
|
4442
|
+
|
|
4296
4443
|
export declare const TwoColumnLayout: ForwardRefExoticComponent<Omit<TwoColumnLayoutProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|
|
4297
4444
|
|
|
4298
4445
|
export declare interface TwoColumnLayoutProps {
|
|
@@ -4802,6 +4949,11 @@ declare module "@tiptap/core" {
|
|
|
4802
4949
|
}
|
|
4803
4950
|
|
|
4804
4951
|
|
|
4952
|
+
declare namespace Calendar {
|
|
4953
|
+
var displayName: string;
|
|
4954
|
+
}
|
|
4955
|
+
|
|
4956
|
+
|
|
4805
4957
|
declare module "@tiptap/core" {
|
|
4806
4958
|
interface Commands<ReturnType> {
|
|
4807
4959
|
moodTracker: {
|
|
@@ -4809,8 +4961,3 @@ declare module "@tiptap/core" {
|
|
|
4809
4961
|
};
|
|
4810
4962
|
}
|
|
4811
4963
|
}
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
declare namespace Calendar {
|
|
4815
|
-
var displayName: string;
|
|
4816
|
-
}
|