@aircall/blocks 0.9.0 → 0.10.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/globals.css +1 -1
- package/dist/index.d.ts +116 -75
- package/dist/index.js +27 -17
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React$1 from "react";
|
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import * as _tanstack_react_form0 from "@tanstack/react-form";
|
|
6
|
-
import { DeepKeys, DeepKeysOfType, FieldAsyncValidateOrFn, FieldValidateOrFn } from "@tanstack/react-form";
|
|
6
|
+
import { DeepKeys, DeepKeysOfType, DeepValue, FieldAsyncValidateOrFn, FieldListeners, FieldValidateOrFn, FieldValidators } from "@tanstack/react-form";
|
|
7
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
8
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
9
9
|
|
|
@@ -1284,17 +1284,33 @@ declare const useForm: <TFormData, TOnMount extends _tanstack_react_form0.FormVa
|
|
|
1284
1284
|
readonly CardSaveBar: typeof CardSaveBar;
|
|
1285
1285
|
}>;
|
|
1286
1286
|
declare const withForm: <TFormData, TOnMount extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnChange extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends object = {}>({
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
}: _tanstack_react_form0.WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {}, {
|
|
1290
|
-
readonly SubmitButton: typeof SubmitButton;
|
|
1291
|
-
readonly CardSaveBar: typeof CardSaveBar;
|
|
1292
|
-
}, TRenderProps>) => React$1.FunctionComponent<React$1.PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
1293
|
-
form: _tanstack_react_form0.AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {}, {
|
|
1287
|
+
render,
|
|
1288
|
+
props
|
|
1289
|
+
}: _tanstack_react_form0.WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {}, {
|
|
1294
1290
|
readonly SubmitButton: typeof SubmitButton;
|
|
1295
1291
|
readonly CardSaveBar: typeof CardSaveBar;
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1292
|
+
}, TRenderProps>) => React$1.FunctionComponent<React$1.PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
1293
|
+
form: _tanstack_react_form0.AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (_tanstack_react_form0.FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {}, {
|
|
1294
|
+
readonly SubmitButton: typeof SubmitButton;
|
|
1295
|
+
readonly CardSaveBar: typeof CardSaveBar;
|
|
1296
|
+
}>;
|
|
1297
|
+
}>>, withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps extends object = {}>({
|
|
1298
|
+
render,
|
|
1299
|
+
props,
|
|
1300
|
+
defaultValues
|
|
1301
|
+
}: _tanstack_react_form0.WithFieldGroupProps<TFieldGroupData, {}, {
|
|
1302
|
+
readonly SubmitButton: typeof SubmitButton;
|
|
1303
|
+
readonly CardSaveBar: typeof CardSaveBar;
|
|
1304
|
+
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends _tanstack_react_form0.DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | _tanstack_react_form0.FieldsMap<TFormData, TFieldGroupData>, TOnMount extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnChange extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends _tanstack_react_form0.FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends _tanstack_react_form0.FormAsyncValidateOrFn<TFormData> | undefined, TFormSubmitMeta>(params: React$1.PropsWithChildren<NoInfer<TRenderProps> & {
|
|
1305
|
+
form: _tanstack_react_form0.AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {}, {
|
|
1306
|
+
readonly SubmitButton: typeof SubmitButton;
|
|
1307
|
+
readonly CardSaveBar: typeof CardSaveBar;
|
|
1308
|
+
}> | _tanstack_react_form0.AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | _tanstack_react_form0.FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {}, {
|
|
1309
|
+
readonly SubmitButton: typeof SubmitButton;
|
|
1310
|
+
readonly CardSaveBar: typeof CardSaveBar;
|
|
1311
|
+
}>;
|
|
1312
|
+
fields: TFields;
|
|
1313
|
+
}>) => ReturnType<React$1.FunctionComponent>;
|
|
1298
1314
|
//#endregion
|
|
1299
1315
|
//#region src/form/form-context.d.ts
|
|
1300
1316
|
/**
|
|
@@ -1344,26 +1360,62 @@ type BoundForm = {
|
|
|
1344
1360
|
};
|
|
1345
1361
|
AppField: (...args: never[]) => unknown;
|
|
1346
1362
|
};
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1363
|
+
/**
|
|
1364
|
+
* Field validators typed against the field's value — the `validators` prop of every wrapper.
|
|
1365
|
+
*
|
|
1366
|
+
* Reuses TanStack's own `FieldValidators` (the exact interface `AppField` accepts) instead of a
|
|
1367
|
+
* hand-rolled mirror, so every slot AppField supports is exposed with identical typing:
|
|
1368
|
+
* `onMount`, `onChange`/`onChangeAsync`/`onChangeListenTo`, `onBlur`/`onBlurAsync`/`onBlurListenTo`,
|
|
1369
|
+
* `onSubmit`/`onSubmitAsync`, `onDynamic`/`onDynamicAsync`, plus the `*DebounceMs` knobs.
|
|
1370
|
+
*
|
|
1371
|
+
* The per-slot validator generics can't be inferred here (the wrapper is generic over `TForm`/
|
|
1372
|
+
* `TName`, not a generic *function* like `AppField`), so each is instantiated to its widest
|
|
1373
|
+
* `FieldValidateOrFn`/`FieldAsyncValidateOrFn`. `value` still infers as the field's real type
|
|
1374
|
+
* because `TData` (`DeepValue<TFormData, TName>`) is concrete. The outer conditional keeps `TName`
|
|
1375
|
+
* unconstrained at the boundary so `DeepKeysOfType` subsets (e.g. the string-only Select keys)
|
|
1376
|
+
* resolve without a constraint clash, exactly like the previous guard.
|
|
1377
|
+
*/
|
|
1378
|
+
type FormFieldValidators<TFormData, TName> = TName extends DeepKeys<TFormData> ? FieldValidators<TFormData, TName, DeepValue<TFormData, TName>, FieldValidateOrFn<TFormData, TName>, FieldValidateOrFn<TFormData, TName>, FieldAsyncValidateOrFn<TFormData, TName>, FieldValidateOrFn<TFormData, TName>, FieldAsyncValidateOrFn<TFormData, TName>, FieldValidateOrFn<TFormData, TName>, FieldAsyncValidateOrFn<TFormData, TName>, FieldValidateOrFn<TFormData, TName>, FieldAsyncValidateOrFn<TFormData, TName>> : never;
|
|
1379
|
+
/**
|
|
1380
|
+
* The full `AppField` binding surface every wrapper forwards, typed against the field's value.
|
|
1381
|
+
*
|
|
1382
|
+
* This is the **single source of truth** for which `form.AppField` props the `Form*Field` wrappers
|
|
1383
|
+
* pass through — spread it into each wrapper's props so the set can't drift per-wrapper. The
|
|
1384
|
+
* `app-field-coverage` type test asserts this stays in sync with `AppField`'s real prop surface:
|
|
1385
|
+
* every `AppField` prop must be forwarded here or appear in that test's explicit omission list.
|
|
1386
|
+
*
|
|
1387
|
+
* Forwarded: `validators`, `listeners`, `defaultValue`, `asyncDebounceMs`, `asyncAlways`.
|
|
1388
|
+
* Deliberately omitted (see the coverage test): `name`/`children` (owned by the wrapper),
|
|
1389
|
+
* `defaultMeta`/`disableErrorFlat` (advanced escape hatches that fight the shared shell).
|
|
1390
|
+
*/
|
|
1391
|
+
type FieldBindingProps<TFormData, TName> = TName extends DeepKeys<TFormData> ? {
|
|
1392
|
+
validators?: FormFieldValidators<TFormData, TName>;
|
|
1393
|
+
listeners?: FieldListeners<TFormData, TName>;
|
|
1394
|
+
defaultValue?: DeepValue<TFormData, TName>;
|
|
1395
|
+
asyncDebounceMs?: number;
|
|
1396
|
+
asyncAlways?: boolean;
|
|
1397
|
+
} : never;
|
|
1398
|
+
/**
|
|
1399
|
+
* Presentational necessity props every wrapper exposes, forwarded to the DS `FieldLabel` to mark a
|
|
1400
|
+
* field required/optional in the label. Enforcement stays in `validators` — this is label-only.
|
|
1401
|
+
* Shared so the set can't drift per-wrapper.
|
|
1402
|
+
*/
|
|
1403
|
+
type NecessityProps = {
|
|
1404
|
+
required?: boolean;
|
|
1405
|
+
necessityIndicator?: 'icon' | 'label';
|
|
1360
1406
|
};
|
|
1361
1407
|
type FormFieldBaseProps<TData, TControl> = {
|
|
1362
1408
|
form: Pick<BoundForm, 'AppField'>;
|
|
1363
1409
|
name: string;
|
|
1364
1410
|
validators?: unknown;
|
|
1365
|
-
|
|
1366
|
-
|
|
1411
|
+
listeners?: unknown;
|
|
1412
|
+
defaultValue?: unknown;
|
|
1413
|
+
asyncDebounceMs?: number;
|
|
1414
|
+
asyncAlways?: boolean;
|
|
1415
|
+
label?: string;
|
|
1416
|
+
description?: string;
|
|
1417
|
+
required?: boolean;
|
|
1418
|
+
necessityIndicator?: 'icon' | 'label'; /** Builds the primitive-specific wiring bundle handed to `children`. */
|
|
1367
1419
|
buildControl: (field: TypedField<TData>) => TControl;
|
|
1368
1420
|
children: (field: TypedField<TData>, control: TControl) => React$1.ReactNode;
|
|
1369
1421
|
};
|
|
@@ -1393,11 +1445,10 @@ type SelectControl = {
|
|
|
1393
1445
|
type FormSelectFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>> = {
|
|
1394
1446
|
/** The form instance from `useForm()` — threaded as a prop so `name`/`validators` are typed. */form: TForm;
|
|
1395
1447
|
name: TName;
|
|
1396
|
-
label
|
|
1397
|
-
description?: string;
|
|
1398
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>; /** Compose the Select yourself; spread the bundles. Trigger/content stay fully customizable. */
|
|
1448
|
+
label?: string;
|
|
1449
|
+
description?: string; /** Compose the Select yourself; spread the bundles. Trigger/content stay fully customizable. */
|
|
1399
1450
|
children: (field: TypedField<string>, control: SelectControl) => React$1.ReactNode;
|
|
1400
|
-
};
|
|
1451
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1401
1452
|
/**
|
|
1402
1453
|
* Select field wrapper. Owns the binding + shared `Field/Label/Error` shell, and hands the
|
|
1403
1454
|
* consumer pre-wired `selectProps` / `selectTriggerProps` to spread onto `@aircall/ds` Select
|
|
@@ -1434,11 +1485,10 @@ type InputControl = {
|
|
|
1434
1485
|
type FormInputFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>> = {
|
|
1435
1486
|
form: TForm;
|
|
1436
1487
|
name: TName;
|
|
1437
|
-
label
|
|
1488
|
+
label?: string;
|
|
1438
1489
|
description?: string;
|
|
1439
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1440
1490
|
children: (field: TypedField<string>, control: InputControl) => React$1.ReactNode;
|
|
1441
|
-
};
|
|
1491
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1442
1492
|
/**
|
|
1443
1493
|
* Text-input field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1444
1494
|
* with an `inputProps` bundle. Compose the input yourself (add adornments, counters, prefixes).
|
|
@@ -1470,11 +1520,10 @@ type ComboboxControl = {
|
|
|
1470
1520
|
type FormComboboxFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>> = {
|
|
1471
1521
|
form: TForm;
|
|
1472
1522
|
name: TName;
|
|
1473
|
-
label
|
|
1523
|
+
label?: string;
|
|
1474
1524
|
description?: string;
|
|
1475
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1476
1525
|
children: (field: TypedField<string>, control: ComboboxControl) => React$1.ReactNode;
|
|
1477
|
-
};
|
|
1526
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1478
1527
|
/**
|
|
1479
1528
|
* Combobox (searchable single-select) field wrapper for **string-valued** fields. Same threaded-
|
|
1480
1529
|
* `form` typing and shared shell as the other wrappers; the render-prop hands you `comboboxProps`
|
|
@@ -1515,11 +1564,10 @@ type MultiComboboxControl = {
|
|
|
1515
1564
|
type FormMultiComboboxFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string[]>> = {
|
|
1516
1565
|
form: TForm;
|
|
1517
1566
|
name: TName;
|
|
1518
|
-
label
|
|
1567
|
+
label?: string;
|
|
1519
1568
|
description?: string;
|
|
1520
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1521
1569
|
children: (field: TypedField<string[]>, control: MultiComboboxControl) => React$1.ReactNode;
|
|
1522
|
-
};
|
|
1570
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1523
1571
|
/**
|
|
1524
1572
|
* Multi-select combobox field wrapper — same threaded-`form` typing and shared shell as
|
|
1525
1573
|
* `FormSelectField`, with `comboboxProps` / `comboboxInputProps` bundles. `name` is restricted
|
|
@@ -1552,11 +1600,10 @@ type TextareaControl = {
|
|
|
1552
1600
|
type FormTextareaFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>> = {
|
|
1553
1601
|
form: TForm;
|
|
1554
1602
|
name: TName;
|
|
1555
|
-
label
|
|
1603
|
+
label?: string;
|
|
1556
1604
|
description?: string;
|
|
1557
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1558
1605
|
children: (field: TypedField<string>, control: TextareaControl) => React$1.ReactNode;
|
|
1559
|
-
};
|
|
1606
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1560
1607
|
/**
|
|
1561
1608
|
* Multiline text-input field wrapper — same threaded-`form` typing and shared shell as
|
|
1562
1609
|
* `FormSelectField`, with a `textareaProps` bundle. Compose the textarea yourself (rows,
|
|
@@ -1586,11 +1633,10 @@ type RadioGroupControl = {
|
|
|
1586
1633
|
type FormRadioGroupFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>> = {
|
|
1587
1634
|
form: TForm;
|
|
1588
1635
|
name: TName;
|
|
1589
|
-
label
|
|
1636
|
+
label?: string;
|
|
1590
1637
|
description?: string;
|
|
1591
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1592
1638
|
children: (field: TypedField<string>, control: RadioGroupControl) => React$1.ReactNode;
|
|
1593
|
-
};
|
|
1639
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1594
1640
|
/**
|
|
1595
1641
|
* Radio-group field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1596
1642
|
* with a `radioGroupProps` bundle. Compose the items yourself. `name` is restricted to the
|
|
@@ -1623,11 +1669,10 @@ type OTPControl = {
|
|
|
1623
1669
|
type FormOTPFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>> = {
|
|
1624
1670
|
form: TForm;
|
|
1625
1671
|
name: TName;
|
|
1626
|
-
label
|
|
1672
|
+
label?: string;
|
|
1627
1673
|
description?: string;
|
|
1628
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1629
1674
|
children: (field: TypedField<string>, control: OTPControl) => React$1.ReactNode;
|
|
1630
|
-
};
|
|
1675
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1631
1676
|
/**
|
|
1632
1677
|
* One-time-code field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1633
1678
|
* with an `otpProps` bundle. Compose the slots yourself. `name` is restricted to the form's
|
|
@@ -1656,11 +1701,10 @@ type SwitchControl = {
|
|
|
1656
1701
|
type FormSwitchFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], boolean>> = {
|
|
1657
1702
|
form: TForm;
|
|
1658
1703
|
name: TName;
|
|
1659
|
-
label
|
|
1704
|
+
label?: string;
|
|
1660
1705
|
description?: string;
|
|
1661
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1662
1706
|
children: (field: TypedField<boolean>, control: SwitchControl) => React$1.ReactNode;
|
|
1663
|
-
};
|
|
1707
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1664
1708
|
/**
|
|
1665
1709
|
* Toggle field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1666
1710
|
* with a `switchProps` bundle. `name` is restricted to the form's **boolean** fields — a
|
|
@@ -1673,38 +1717,37 @@ type FormSwitchFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<
|
|
|
1673
1717
|
*/
|
|
1674
1718
|
declare function FormSwitchField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], boolean>>(props: FormSwitchFieldProps<TForm, TName>): react_jsx_runtime0.JSX.Element;
|
|
1675
1719
|
//#endregion
|
|
1676
|
-
//#region src/components/form-
|
|
1720
|
+
//#region src/components/form-numeric-field.d.ts
|
|
1677
1721
|
/**
|
|
1678
|
-
* Wiring bundle handed to a `
|
|
1679
|
-
*
|
|
1722
|
+
* Wiring bundle handed to a `FormNumericField` child. Spread `numericProps` onto a DS
|
|
1723
|
+
* `NumericInput` — value/onValueChange/onBlur/aria are pre-wired (a cleared input coerces to `0`).
|
|
1680
1724
|
*/
|
|
1681
|
-
type
|
|
1682
|
-
|
|
1725
|
+
type NumericControl = {
|
|
1726
|
+
numericProps: {
|
|
1683
1727
|
value: number;
|
|
1684
|
-
|
|
1728
|
+
onValueChange: (value: number | null) => void;
|
|
1685
1729
|
onBlur: () => void;
|
|
1686
1730
|
'aria-invalid': true | undefined;
|
|
1687
1731
|
};
|
|
1688
1732
|
};
|
|
1689
|
-
type
|
|
1733
|
+
type FormNumericFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], number>> = {
|
|
1690
1734
|
form: TForm;
|
|
1691
1735
|
name: TName;
|
|
1692
|
-
label
|
|
1736
|
+
label?: string;
|
|
1693
1737
|
description?: string;
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
};
|
|
1738
|
+
children: (field: TypedField<number>, control: NumericControl) => React$1.ReactNode;
|
|
1739
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1697
1740
|
/**
|
|
1698
|
-
* Numeric
|
|
1699
|
-
* with a `
|
|
1700
|
-
* string/boolean `name` is a type error.
|
|
1741
|
+
* Numeric field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1742
|
+
* with a `numericProps` bundle for the DS `NumericInput` (prefer it over `Input type="number"`).
|
|
1743
|
+
* `name` is restricted to the form's **number** fields — a string/boolean `name` is a type error.
|
|
1701
1744
|
*
|
|
1702
1745
|
* @example
|
|
1703
|
-
* <
|
|
1704
|
-
* {(field, {
|
|
1705
|
-
* </
|
|
1746
|
+
* <FormNumericField form={form} name="age" label="Age" validators={{ onChange }}>
|
|
1747
|
+
* {(field, { numericProps }) => <NumericInput {...numericProps} />}
|
|
1748
|
+
* </FormNumericField>
|
|
1706
1749
|
*/
|
|
1707
|
-
declare function
|
|
1750
|
+
declare function FormNumericField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], number>>(props: FormNumericFieldProps<TForm, TName>): react_jsx_runtime0.JSX.Element;
|
|
1708
1751
|
//#endregion
|
|
1709
1752
|
//#region src/components/form-slider-field.d.ts
|
|
1710
1753
|
/**
|
|
@@ -1721,11 +1764,10 @@ type SliderControl = {
|
|
|
1721
1764
|
type FormSliderFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], number>> = {
|
|
1722
1765
|
form: TForm;
|
|
1723
1766
|
name: TName;
|
|
1724
|
-
label
|
|
1767
|
+
label?: string;
|
|
1725
1768
|
description?: string;
|
|
1726
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1727
1769
|
children: (field: TypedField<number>, control: SliderControl) => React$1.ReactNode;
|
|
1728
|
-
};
|
|
1770
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1729
1771
|
/**
|
|
1730
1772
|
* Slider field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1731
1773
|
* with a `sliderProps` bundle. `name` is restricted to the form's **number** fields; the bundle
|
|
@@ -1754,11 +1796,10 @@ type ToggleGroupControl = {
|
|
|
1754
1796
|
type FormToggleGroupFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string | null>> = {
|
|
1755
1797
|
form: TForm;
|
|
1756
1798
|
name: TName;
|
|
1757
|
-
label
|
|
1799
|
+
label?: string;
|
|
1758
1800
|
description?: string;
|
|
1759
|
-
validators?: FormFieldValidators<TForm['state']['values'], TName>;
|
|
1760
1801
|
children: (field: TypedField<string | null>, control: ToggleGroupControl) => React$1.ReactNode;
|
|
1761
|
-
};
|
|
1802
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1762
1803
|
/**
|
|
1763
1804
|
* Single-select toggle-group field wrapper — same threaded-`form` typing and shared shell as
|
|
1764
1805
|
* `FormSelectField`, with a `toggleGroupProps` bundle. `name` is restricted to the form's
|
|
@@ -2006,4 +2047,4 @@ declare namespace DashboardSidebarSubmenuSeparator {
|
|
|
2006
2047
|
type Props = DashboardSidebarSubmenuSeparatorProps;
|
|
2007
2048
|
}
|
|
2008
2049
|
//#endregion
|
|
2009
|
-
export { BetaBadge, type BoundForm, CardSaveBar, type CardSaveBarProps, ChatbotExpandSuggestion, type ChatbotExpandSuggestionProps, ChatbotInput, type ChatbotInputProps, ChatbotPage, ChatbotPageBody, type ChatbotPageBodyProps, ChatbotPageContent, type ChatbotPageContentProps, ChatbotPageConversation, type ChatbotPageConversationProps, ChatbotPageFooter, type ChatbotPageFooterProps, ChatbotPageHeading, type ChatbotPageHeadingProps, ChatbotPageInputBar, type ChatbotPageInputBarProps, type ChatbotPageProps, ChatbotPanel, ChatbotPanelHeader, type ChatbotPanelHeaderProps, type ChatbotPanelProps, ChatbotPanelSuggestion, type ChatbotPanelSuggestionItem, type ChatbotPanelSuggestionProps, ChatbotPanelTrigger, type ChatbotPanelTriggerProps, ChatbotResponseBlock, type ChatbotResponseBlockFeedback, type ChatbotResponseBlockProps, ChatbotSidebar, type ChatbotSidebarConversation, ChatbotUserMessage, type ChatbotUserMessageProps, type ComboboxControl, ComingSoonDescription, ComingSoonEmptyState, ComingSoonMedia, ComingSoonTitle, CommonForm, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, type DashboardSidebarNavGroup, type DashboardSidebarNavItem, type DashboardSidebarNavItemAction, type DashboardSidebarNavItemLink, type DashboardSidebarNavItemSubmenu, type DashboardSidebarNavSubmenuItem, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DashboardStandalonePage, DashboardStandalonePageAction, DashboardStandalonePageActions, DashboardStandalonePageContent, DashboardStandalonePageHeader, DashboardStandalonePageTitle, DeprecatedBadge, EmptyState, EmptyStateActions, EmptyStateButton, EmptyStateDescription, EmptyStateExternalLink, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, FormComboboxField, type FormComboboxFieldProps, FormFieldBase, type FormFieldValidators, FormInputField, type FormInputFieldProps, FormMultiComboboxField, type FormMultiComboboxFieldProps,
|
|
2050
|
+
export { BetaBadge, type BoundForm, CardSaveBar, type CardSaveBarProps, ChatbotExpandSuggestion, type ChatbotExpandSuggestionProps, ChatbotInput, type ChatbotInputProps, ChatbotPage, ChatbotPageBody, type ChatbotPageBodyProps, ChatbotPageContent, type ChatbotPageContentProps, ChatbotPageConversation, type ChatbotPageConversationProps, ChatbotPageFooter, type ChatbotPageFooterProps, ChatbotPageHeading, type ChatbotPageHeadingProps, ChatbotPageInputBar, type ChatbotPageInputBarProps, type ChatbotPageProps, ChatbotPanel, ChatbotPanelHeader, type ChatbotPanelHeaderProps, type ChatbotPanelProps, ChatbotPanelSuggestion, type ChatbotPanelSuggestionItem, type ChatbotPanelSuggestionProps, ChatbotPanelTrigger, type ChatbotPanelTriggerProps, ChatbotResponseBlock, type ChatbotResponseBlockFeedback, type ChatbotResponseBlockProps, ChatbotSidebar, type ChatbotSidebarConversation, ChatbotUserMessage, type ChatbotUserMessageProps, type ComboboxControl, ComingSoonDescription, ComingSoonEmptyState, ComingSoonMedia, ComingSoonTitle, CommonForm, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, type DashboardSidebarNavGroup, type DashboardSidebarNavItem, type DashboardSidebarNavItemAction, type DashboardSidebarNavItemLink, type DashboardSidebarNavItemSubmenu, type DashboardSidebarNavSubmenuItem, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DashboardStandalonePage, DashboardStandalonePageAction, DashboardStandalonePageActions, DashboardStandalonePageContent, DashboardStandalonePageHeader, DashboardStandalonePageTitle, DeprecatedBadge, EmptyState, EmptyStateActions, EmptyStateButton, EmptyStateDescription, EmptyStateExternalLink, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, type FieldBindingProps, FormComboboxField, type FormComboboxFieldProps, FormFieldBase, type FormFieldValidators, FormInputField, type FormInputFieldProps, FormMultiComboboxField, type FormMultiComboboxFieldProps, FormNumericField, type FormNumericFieldProps, FormOTPField, type FormOTPFieldProps, FormRadioGroupField, type FormRadioGroupFieldProps, FormSelectField, type FormSelectFieldProps, FormSliderField, type FormSliderFieldProps, FormSwitchField, type FormSwitchFieldProps, FormTextareaField, type FormTextareaFieldProps, FormToggleGroupField, type FormToggleGroupFieldProps, type InputControl, type MultiComboboxControl, type NecessityProps, NewBadge, NoDataDescription, NoDataEmptyState, NoDataMedia, NoDataTitle, NoSupportDescription, NoSupportEmptyState, NoSupportMedia, NoSupportTitle, NotFoundDescription, NotFoundEmptyState, NotFoundMedia, NotFoundTitle, type NumericControl, type OTPControl, ProfessionalBadge, type RadioGroupControl, RestrictedAccessDescription, RestrictedAccessEmptyState, RestrictedAccessMedia, RestrictedAccessTitle, RoleBadge, type RoleBadgeRole, SaveBar, type SaveBarProps, type SelectControl, type SliderControl, SubmitButton, type SubmitButtonProps, type SwitchControl, type TextareaControl, type ToggleGroupControl, TrialBadge, type TypedField, UnknownErrorDescription, UnknownErrorEmptyState, UnknownErrorMedia, UnknownErrorTitle, fieldContext, formContext, toFieldErrors, useCopyToClipboard, useSidebar as useDashboardSidebar, useFieldContext, useForm, useFormContext, withFieldGroup, withForm };
|
package/dist/index.js
CHANGED
|
@@ -1930,7 +1930,7 @@ const CommonForm = createFormHook({
|
|
|
1930
1930
|
}
|
|
1931
1931
|
});
|
|
1932
1932
|
const useForm = CommonForm.useAppForm;
|
|
1933
|
-
const { withForm } = CommonForm;
|
|
1933
|
+
const { withForm, withFieldGroup } = CommonForm;
|
|
1934
1934
|
|
|
1935
1935
|
//#endregion
|
|
1936
1936
|
//#region src/form/field-errors.ts
|
|
@@ -1950,12 +1950,16 @@ function toFieldErrors(errors) {
|
|
|
1950
1950
|
|
|
1951
1951
|
//#endregion
|
|
1952
1952
|
//#region src/components/form-field.tsx
|
|
1953
|
-
function FormFieldShell({ label, description, children }) {
|
|
1953
|
+
function FormFieldShell({ label, description, required, necessityIndicator, children }) {
|
|
1954
1954
|
const errors = useFieldContext().state.meta.errors;
|
|
1955
1955
|
return /* @__PURE__ */ jsxs(Field, {
|
|
1956
1956
|
"data-invalid": errors.length > 0 ? true : void 0,
|
|
1957
1957
|
children: [
|
|
1958
|
-
/* @__PURE__ */ jsx(FieldLabel, {
|
|
1958
|
+
label && /* @__PURE__ */ jsx(FieldLabel, {
|
|
1959
|
+
required,
|
|
1960
|
+
necessityIndicator,
|
|
1961
|
+
children: label
|
|
1962
|
+
}),
|
|
1959
1963
|
description && /* @__PURE__ */ jsx(FieldDescription, { children: description }),
|
|
1960
1964
|
children,
|
|
1961
1965
|
/* @__PURE__ */ jsx(FieldError, { errors: toFieldErrors(errors) })
|
|
@@ -1968,14 +1972,20 @@ function FormFieldShell({ label, description, children }) {
|
|
|
1968
1972
|
* the AppField + shared shell. `TData`/`TControl` carry the precise field + bundle shapes through.
|
|
1969
1973
|
*/
|
|
1970
1974
|
function FormFieldBase(props) {
|
|
1971
|
-
const { form, name, validators, label, description, buildControl, children } = props;
|
|
1975
|
+
const { form, name, validators, listeners, defaultValue, asyncDebounceMs, asyncAlways, label, description, required, necessityIndicator, buildControl, children } = props;
|
|
1972
1976
|
const AppField = form.AppField;
|
|
1973
1977
|
return /* @__PURE__ */ jsx(AppField, {
|
|
1974
1978
|
name,
|
|
1975
1979
|
validators,
|
|
1980
|
+
listeners,
|
|
1981
|
+
defaultValue,
|
|
1982
|
+
asyncDebounceMs,
|
|
1983
|
+
asyncAlways,
|
|
1976
1984
|
children: (field) => /* @__PURE__ */ jsx(FormFieldShell, {
|
|
1977
1985
|
label,
|
|
1978
1986
|
description,
|
|
1987
|
+
required,
|
|
1988
|
+
necessityIndicator,
|
|
1979
1989
|
children: children(field, buildControl(field))
|
|
1980
1990
|
})
|
|
1981
1991
|
});
|
|
@@ -2235,29 +2245,29 @@ function FormSwitchField(props) {
|
|
|
2235
2245
|
}
|
|
2236
2246
|
|
|
2237
2247
|
//#endregion
|
|
2238
|
-
//#region src/components/form-
|
|
2239
|
-
function
|
|
2240
|
-
return {
|
|
2248
|
+
//#region src/components/form-numeric-field.tsx
|
|
2249
|
+
function numericControl(field) {
|
|
2250
|
+
return { numericProps: {
|
|
2241
2251
|
value: field.state.value,
|
|
2242
|
-
|
|
2252
|
+
onValueChange: (value) => field.handleChange(value ?? 0),
|
|
2243
2253
|
onBlur: field.handleBlur,
|
|
2244
2254
|
"aria-invalid": field.state.meta.errors.length > 0 ? true : void 0
|
|
2245
2255
|
} };
|
|
2246
2256
|
}
|
|
2247
2257
|
/**
|
|
2248
|
-
* Numeric
|
|
2249
|
-
* with a `
|
|
2250
|
-
* string/boolean `name` is a type error.
|
|
2258
|
+
* Numeric field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
2259
|
+
* with a `numericProps` bundle for the DS `NumericInput` (prefer it over `Input type="number"`).
|
|
2260
|
+
* `name` is restricted to the form's **number** fields — a string/boolean `name` is a type error.
|
|
2251
2261
|
*
|
|
2252
2262
|
* @example
|
|
2253
|
-
* <
|
|
2254
|
-
* {(field, {
|
|
2255
|
-
* </
|
|
2263
|
+
* <FormNumericField form={form} name="age" label="Age" validators={{ onChange }}>
|
|
2264
|
+
* {(field, { numericProps }) => <NumericInput {...numericProps} />}
|
|
2265
|
+
* </FormNumericField>
|
|
2256
2266
|
*/
|
|
2257
|
-
function
|
|
2267
|
+
function FormNumericField(props) {
|
|
2258
2268
|
return /* @__PURE__ */ jsx(FormFieldBase, {
|
|
2259
2269
|
...props,
|
|
2260
|
-
buildControl:
|
|
2270
|
+
buildControl: numericControl
|
|
2261
2271
|
});
|
|
2262
2272
|
}
|
|
2263
2273
|
|
|
@@ -2651,4 +2661,4 @@ function DashboardSidebarNav({ groups, renderLink }) {
|
|
|
2651
2661
|
}
|
|
2652
2662
|
|
|
2653
2663
|
//#endregion
|
|
2654
|
-
export { BetaBadge, CardSaveBar, ChatbotExpandSuggestion, ChatbotInput, ChatbotPage, ChatbotPageBody, ChatbotPageContent, ChatbotPageConversation, ChatbotPageFooter, ChatbotPageHeading, ChatbotPageInputBar, ChatbotPanel, ChatbotPanelHeader, ChatbotPanelSuggestion, ChatbotPanelTrigger, ChatbotResponseBlock, ChatbotSidebar, ChatbotUserMessage, ComingSoonDescription, ComingSoonEmptyState, ComingSoonMedia, ComingSoonTitle, CommonForm, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DashboardStandalonePage, DashboardStandalonePageAction, DashboardStandalonePageActions, DashboardStandalonePageContent, DashboardStandalonePageHeader, DashboardStandalonePageTitle, DeprecatedBadge, EmptyState, EmptyStateActions, EmptyStateButton, EmptyStateDescription, EmptyStateExternalLink, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, FormComboboxField, FormFieldBase, FormInputField, FormMultiComboboxField,
|
|
2664
|
+
export { BetaBadge, CardSaveBar, ChatbotExpandSuggestion, ChatbotInput, ChatbotPage, ChatbotPageBody, ChatbotPageContent, ChatbotPageConversation, ChatbotPageFooter, ChatbotPageHeading, ChatbotPageInputBar, ChatbotPanel, ChatbotPanelHeader, ChatbotPanelSuggestion, ChatbotPanelTrigger, ChatbotResponseBlock, ChatbotSidebar, ChatbotUserMessage, ComingSoonDescription, ComingSoonEmptyState, ComingSoonMedia, ComingSoonTitle, CommonForm, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DashboardStandalonePage, DashboardStandalonePageAction, DashboardStandalonePageActions, DashboardStandalonePageContent, DashboardStandalonePageHeader, DashboardStandalonePageTitle, DeprecatedBadge, EmptyState, EmptyStateActions, EmptyStateButton, EmptyStateDescription, EmptyStateExternalLink, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, FormComboboxField, FormFieldBase, FormInputField, FormMultiComboboxField, FormNumericField, FormOTPField, FormRadioGroupField, FormSelectField, FormSliderField, FormSwitchField, FormTextareaField, FormToggleGroupField, NewBadge, NoDataDescription, NoDataEmptyState, NoDataMedia, NoDataTitle, NoSupportDescription, NoSupportEmptyState, NoSupportMedia, NoSupportTitle, NotFoundDescription, NotFoundEmptyState, NotFoundMedia, NotFoundTitle, ProfessionalBadge, RestrictedAccessDescription, RestrictedAccessEmptyState, RestrictedAccessMedia, RestrictedAccessTitle, RoleBadge, SaveBar, SubmitButton, TrialBadge, UnknownErrorDescription, UnknownErrorEmptyState, UnknownErrorMedia, UnknownErrorTitle, fieldContext, formContext, toFieldErrors, useCopyToClipboard, useSidebar as useDashboardSidebar, useFieldContext, useForm, useFormContext, withFieldGroup, withForm };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aircall/blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": [
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"vite": "7.3.1",
|
|
82
82
|
"vitest": "4.0.17",
|
|
83
83
|
"zod": "4.4.3",
|
|
84
|
-
"@aircall/ds": "0.
|
|
84
|
+
"@aircall/ds": "0.17.0",
|
|
85
85
|
"@aircall/hooks": "0.5.1"
|
|
86
86
|
},
|
|
87
87
|
"keywords": [
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"sb:dev": "storybook dev -p 6009",
|
|
103
103
|
"sb:build": "storybook build",
|
|
104
104
|
"sb:build:chromatic": "storybook build --test --stats-json",
|
|
105
|
+
"test": "vitest --project=unit",
|
|
105
106
|
"sb:test": "vitest --project=storybook",
|
|
106
107
|
"chromatic": "chromatic --storybook-build-dir=./storybook-static"
|
|
107
108
|
},
|