@factorialco/f0-react 1.418.1 → 1.419.0
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/ai.d.ts +1 -0
- package/dist/experimental.d.ts +6 -0
- package/dist/experimental.js +2 -2
- package/dist/f0.d.ts +71 -5
- package/dist/f0.js +2850 -2816
- package/dist/i18n-provider-defaults.d.ts +1 -0
- package/dist/i18n-provider-defaults.js +1 -0
- package/dist/{index-uBFHZ597.js → index-ClKgg8Ep.js} +1320 -1306
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -1296,6 +1296,7 @@ export declare const defaultTranslations: {
|
|
|
1296
1296
|
readonly fileTooLarge: "File exceeds {{maxSize}} MB limit";
|
|
1297
1297
|
readonly invalidFileType: "File type not accepted. Accepted formats: {{types}}";
|
|
1298
1298
|
};
|
|
1299
|
+
readonly moreInformation: "More information";
|
|
1299
1300
|
readonly validation: {
|
|
1300
1301
|
readonly required: "This field is required";
|
|
1301
1302
|
readonly invalidType: "Invalid value";
|
package/dist/experimental.d.ts
CHANGED
|
@@ -1351,6 +1351,11 @@ export declare interface CardSelectableItem<T extends CardSelectableValue> {
|
|
|
1351
1351
|
disabled?: boolean;
|
|
1352
1352
|
/** Whether this item is required (shows asterisk indicator) */
|
|
1353
1353
|
required?: boolean;
|
|
1354
|
+
/** Link displayed below the description, typically pointing to external documentation */
|
|
1355
|
+
moreInfoLink?: {
|
|
1356
|
+
href: string;
|
|
1357
|
+
label?: string;
|
|
1358
|
+
};
|
|
1354
1359
|
}
|
|
1355
1360
|
|
|
1356
1361
|
export declare interface CardSelectableMultipleProps<T extends CardSelectableValue> {
|
|
@@ -2859,6 +2864,7 @@ declare const defaultTranslations: {
|
|
|
2859
2864
|
readonly fileTooLarge: "File exceeds {{maxSize}} MB limit";
|
|
2860
2865
|
readonly invalidFileType: "File type not accepted. Accepted formats: {{types}}";
|
|
2861
2866
|
};
|
|
2867
|
+
readonly moreInformation: "More information";
|
|
2862
2868
|
readonly validation: {
|
|
2863
2869
|
readonly required: "This field is required";
|
|
2864
2870
|
readonly invalidType: "Invalid value";
|
package/dist/experimental.js
CHANGED
|
@@ -3,8 +3,8 @@ import { eP as WI, eO as UI, eM as GI, aI as KI, eN as qI, eX as YI, eY as JI, e
|
|
|
3
3
|
import { jsx as c, jsxs as g, Fragment as ne } from "react/jsx-runtime";
|
|
4
4
|
import * as Sn from "react";
|
|
5
5
|
import z, { PureComponent as Tp, forwardRef as P, useRef as K, useTransition as Dp, useState as L, useLayoutEffect as Ga, useContext as Hs, createContext as Vs, useCallback as X, useMemo as ee, useEffect as W, useId as Ka, useImperativeHandle as qa, memo as Ya, Fragment as Rp, isValidElement as Lp, cloneElement as Ja, Children as Xa } from "react";
|
|
6
|
-
import { f as Yt, ac as Nn, e as nr, ad as Op, L as wi, ae as Mp, A as Pp, i as rr, k as Fp, G as zp, g as Lo, af as $p, j as Oo, n as Bp, ag as Za, ah as Qa, ai as jp, C as Hp, aa as Vp, aj as je, ak as ot, al as Ee, am as Wp, an as gr, ao as Ue, ap as ec, aq as Me, ar as Ws, as as $e, at as Mo, au as Up, av as tc, aw as Ie, ax as Fe, ay as In, az as Rr, aA as nc, aB as Gp, aC as Vt, aD as Kp, aE as qp, aF as Yp, aG as Wn, aH as Un, aI as Us, aJ as Jp, aK as rc, aL as ic, aM as sc, aN as Xp, aO as oc, aP as lc, aQ as ac, aR as cc, aS as dc, aT as uc, a3 as Po, aU as Zp, aV as Fo, aW as Qp, aX as em, aY as tm, w as nm, x as rm, z as im, J as sm, K as om, s as lm, aZ as fc, a_ as am, a$ as cm, b0 as dm, b1 as hc, a7 as Ui, b2 as um, b3 as fm, b4 as hm, b5 as pm, b6 as mm, b7 as gm, b8 as bm, b9 as wm, ba as xm, bb as ym, bc as vm, bd as km, ab as pc, M as Cm, N as Sm, P as Nm, Q as Im, V as Am, O as _m, be as zo, bf as Em, bg as Tm, l as Dm } from "./index-
|
|
7
|
-
import { a5 as pA, Z as mA, a0 as gA, R as bA, $ as wA, bk as xA, bj as yA, bh as vA, bi as kA, T as CA, a4 as SA, U as NA, _ as IA, W as AA, a8 as _A, a9 as EA } from "./index-
|
|
6
|
+
import { f as Yt, ac as Nn, e as nr, ad as Op, L as wi, ae as Mp, A as Pp, i as rr, k as Fp, G as zp, g as Lo, af as $p, j as Oo, n as Bp, ag as Za, ah as Qa, ai as jp, C as Hp, aa as Vp, aj as je, ak as ot, al as Ee, am as Wp, an as gr, ao as Ue, ap as ec, aq as Me, ar as Ws, as as $e, at as Mo, au as Up, av as tc, aw as Ie, ax as Fe, ay as In, az as Rr, aA as nc, aB as Gp, aC as Vt, aD as Kp, aE as qp, aF as Yp, aG as Wn, aH as Un, aI as Us, aJ as Jp, aK as rc, aL as ic, aM as sc, aN as Xp, aO as oc, aP as lc, aQ as ac, aR as cc, aS as dc, aT as uc, a3 as Po, aU as Zp, aV as Fo, aW as Qp, aX as em, aY as tm, w as nm, x as rm, z as im, J as sm, K as om, s as lm, aZ as fc, a_ as am, a$ as cm, b0 as dm, b1 as hc, a7 as Ui, b2 as um, b3 as fm, b4 as hm, b5 as pm, b6 as mm, b7 as gm, b8 as bm, b9 as wm, ba as xm, bb as ym, bc as vm, bd as km, ab as pc, M as Cm, N as Sm, P as Nm, Q as Im, V as Am, O as _m, be as zo, bf as Em, bg as Tm, l as Dm } from "./index-ClKgg8Ep.js";
|
|
7
|
+
import { a5 as pA, Z as mA, a0 as gA, R as bA, $ as wA, bk as xA, bj as yA, bh as vA, bi as kA, T as CA, a4 as SA, U as NA, _ as IA, W as AA, a8 as _A, a9 as EA } from "./index-ClKgg8Ep.js";
|
|
8
8
|
import './experimental.css';const Rm = mf("Search", [
|
|
9
9
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
10
10
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
package/dist/f0.d.ts
CHANGED
|
@@ -3400,6 +3400,7 @@ export declare const defaultTranslations: {
|
|
|
3400
3400
|
readonly fileTooLarge: "File exceeds {{maxSize}} MB limit";
|
|
3401
3401
|
readonly invalidFileType: "File type not accepted. Accepted formats: {{types}}";
|
|
3402
3402
|
};
|
|
3403
|
+
readonly moreInformation: "More information";
|
|
3403
3404
|
readonly validation: {
|
|
3404
3405
|
readonly required: "This field is required";
|
|
3405
3406
|
readonly invalidType: "Invalid value";
|
|
@@ -4241,10 +4242,6 @@ export declare type F0AvatarTeamProps = {
|
|
|
4241
4242
|
badge?: AvatarBadge;
|
|
4242
4243
|
} & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
|
|
4243
4244
|
|
|
4244
|
-
/**
|
|
4245
|
-
* Base configuration shared across all field types.
|
|
4246
|
-
* Position is automatically derived from field declaration order in the schema.
|
|
4247
|
-
*/
|
|
4248
4245
|
export declare interface F0BaseConfig {
|
|
4249
4246
|
/** Label displayed above the field */
|
|
4250
4247
|
label: string;
|
|
@@ -4286,6 +4283,20 @@ export declare interface F0BaseConfig {
|
|
|
4286
4283
|
* renderIf: ({ values }) => values.status === 'active'
|
|
4287
4284
|
*/
|
|
4288
4285
|
renderIf?: F0BaseFieldRenderIfProp;
|
|
4286
|
+
/**
|
|
4287
|
+
* Alert displayed below the field.
|
|
4288
|
+
* Can be static props (always shown) or a callback for conditional display.
|
|
4289
|
+
* @example
|
|
4290
|
+
* // Static alert (always visible)
|
|
4291
|
+
* alert: { title: "Note", description: "This field is important" }
|
|
4292
|
+
*
|
|
4293
|
+
* // Conditional alert based on field value
|
|
4294
|
+
* alert: ({ fieldValue }) =>
|
|
4295
|
+
* fieldValue === 0
|
|
4296
|
+
* ? { title: "Heads up", description: "Value is zero", variant: "warning" }
|
|
4297
|
+
* : null
|
|
4298
|
+
*/
|
|
4299
|
+
alert?: F0FieldAlert;
|
|
4289
4300
|
/**
|
|
4290
4301
|
* Name identifying a reusable custom field type.
|
|
4291
4302
|
* When set, the form-level `renderCustomField` callback is invoked to provide
|
|
@@ -4327,6 +4338,8 @@ export declare interface F0BaseField {
|
|
|
4327
4338
|
* @default false
|
|
4328
4339
|
*/
|
|
4329
4340
|
resetOnDisable?: boolean;
|
|
4341
|
+
/** Alert displayed below the field (static props or conditional callback) */
|
|
4342
|
+
alert?: F0FieldAlert;
|
|
4330
4343
|
/**
|
|
4331
4344
|
* Name identifying a reusable custom field type.
|
|
4332
4345
|
* Used with the form-level `renderCustomField` callback.
|
|
@@ -4549,9 +4562,14 @@ declare function _F0Checkbox({ title, onCheckedChange, id, disabled, indetermina
|
|
|
4549
4562
|
|
|
4550
4563
|
/**
|
|
4551
4564
|
* F0 config options specific to checkbox fields
|
|
4552
|
-
* (checkbox has no additional options beyond base config)
|
|
4553
4565
|
*/
|
|
4554
4566
|
export declare interface F0CheckboxConfig {
|
|
4567
|
+
/**
|
|
4568
|
+
* Link displayed below the help text, typically pointing to external documentation.
|
|
4569
|
+
* @example
|
|
4570
|
+
* moreInfoLink: { href: "https://help.example.com/article", label: "Learn more" }
|
|
4571
|
+
*/
|
|
4572
|
+
moreInfoLink?: F0MoreInfoLink;
|
|
4555
4573
|
}
|
|
4556
4574
|
|
|
4557
4575
|
/**
|
|
@@ -4559,6 +4577,8 @@ export declare interface F0CheckboxConfig {
|
|
|
4559
4577
|
*/
|
|
4560
4578
|
export declare type F0CheckboxField = F0BaseField & {
|
|
4561
4579
|
type: "checkbox";
|
|
4580
|
+
/** Link displayed below the help text, typically pointing to external documentation */
|
|
4581
|
+
moreInfoLink?: F0MoreInfoLink;
|
|
4562
4582
|
/** Conditional rendering based on another field's value */
|
|
4563
4583
|
renderIf?: CheckboxFieldRenderIf;
|
|
4564
4584
|
};
|
|
@@ -5132,6 +5152,34 @@ export declare function F0EventCatcherProvider({ children, onEvent, enabled, cat
|
|
|
5132
5152
|
*/
|
|
5133
5153
|
export declare type F0Field = F0TextField | F0NumberField | F0DurationField | F0TextareaField | F0SelectField | F0CheckboxField | F0SwitchField | F0DateField | F0TimeField | F0DateTimeField | F0DateRangeField | F0RichTextField | F0FileField | F0CustomField;
|
|
5134
5154
|
|
|
5155
|
+
/**
|
|
5156
|
+
* Alert configuration for a field.
|
|
5157
|
+
* Can be static props (always shown) or a callback for conditional display.
|
|
5158
|
+
*/
|
|
5159
|
+
export declare type F0FieldAlert = F0FieldAlertProps | F0FieldAlertFunction;
|
|
5160
|
+
|
|
5161
|
+
/**
|
|
5162
|
+
* Callback that evaluates whether to show an alert below the field.
|
|
5163
|
+
* Receives the field's current value and all form values.
|
|
5164
|
+
* Return alert props to show, or null/undefined to hide.
|
|
5165
|
+
*/
|
|
5166
|
+
export declare type F0FieldAlertFunction = (context: {
|
|
5167
|
+
fieldValue: unknown;
|
|
5168
|
+
values: Record<string, unknown>;
|
|
5169
|
+
}) => F0FieldAlertProps | null | undefined;
|
|
5170
|
+
|
|
5171
|
+
/**
|
|
5172
|
+
* Base configuration shared across all field types.
|
|
5173
|
+
* Position is automatically derived from field declaration order in the schema.
|
|
5174
|
+
*/
|
|
5175
|
+
/**
|
|
5176
|
+
* Alert props returned by the field alert callback.
|
|
5177
|
+
* Derived from F0AlertProps with `variant` defaulting to "info".
|
|
5178
|
+
*/
|
|
5179
|
+
export declare type F0FieldAlertProps = Omit<F0AlertProps, "variant"> & {
|
|
5180
|
+
variant?: F0AlertProps["variant"];
|
|
5181
|
+
};
|
|
5182
|
+
|
|
5135
5183
|
/**
|
|
5136
5184
|
* Complete F0 field configuration (union of all possible configs)
|
|
5137
5185
|
* @typeParam T - The value type for select fields (string or number)
|
|
@@ -5834,6 +5882,16 @@ export declare type F0LinkProps = Omit<ActionLinkProps, "variant" | "href"> & {
|
|
|
5834
5882
|
href?: string;
|
|
5835
5883
|
};
|
|
5836
5884
|
|
|
5885
|
+
/**
|
|
5886
|
+
* Configuration for a "more info" link displayed below the help text.
|
|
5887
|
+
*/
|
|
5888
|
+
export declare interface F0MoreInfoLink {
|
|
5889
|
+
/** URL the link points to */
|
|
5890
|
+
href: string;
|
|
5891
|
+
/** Link label (defaults to "More information") */
|
|
5892
|
+
label?: string;
|
|
5893
|
+
}
|
|
5894
|
+
|
|
5837
5895
|
/**
|
|
5838
5896
|
* F0 config options specific to number fields
|
|
5839
5897
|
*
|
|
@@ -6295,6 +6353,12 @@ declare type F0StringTextConfig = F0BaseConfig & F0TextConfig & {
|
|
|
6295
6353
|
* (switch has no additional options beyond base config)
|
|
6296
6354
|
*/
|
|
6297
6355
|
export declare interface F0SwitchConfig {
|
|
6356
|
+
/**
|
|
6357
|
+
* Link displayed below the help text, typically pointing to external documentation.
|
|
6358
|
+
* @example
|
|
6359
|
+
* moreInfoLink: { href: "https://help.example.com/article", label: "Learn more" }
|
|
6360
|
+
*/
|
|
6361
|
+
moreInfoLink?: F0MoreInfoLink;
|
|
6298
6362
|
}
|
|
6299
6363
|
|
|
6300
6364
|
/**
|
|
@@ -6302,6 +6366,8 @@ export declare interface F0SwitchConfig {
|
|
|
6302
6366
|
*/
|
|
6303
6367
|
export declare type F0SwitchField = F0BaseField & {
|
|
6304
6368
|
type: "switch";
|
|
6369
|
+
/** Link displayed below the help text, typically pointing to external documentation */
|
|
6370
|
+
moreInfoLink?: F0MoreInfoLink;
|
|
6305
6371
|
/** Conditional rendering based on another field's value */
|
|
6306
6372
|
renderIf?: SwitchFieldRenderIf;
|
|
6307
6373
|
};
|