@aircall/blocks 0.12.0 → 0.14.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 +202 -56
- package/dist/index.js +203 -64
- package/package.json +3 -3
- package/skills/aircall-blocks/migrate-dashboard/SKILL.md +2 -1
- package/skills/aircall-blocks/migrate-dashboard/dashboard-page/SKILL.md +41 -14
- package/skills/aircall-blocks/migrate-dashboard/form-wizard/SKILL.md +113 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Badge, Button, CounterBadge, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, SidebarProvider, TabsList, useSidebar } from "@aircall/ds";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import * as _tanstack_react_form0 from "@tanstack/react-form";
|
|
6
6
|
import { DeepKeys, DeepKeysOfType, DeepValue, FieldAsyncValidateOrFn, FieldListeners, FieldValidateOrFn, FieldValidators } from "@tanstack/react-form";
|
|
@@ -119,7 +119,7 @@ declare function ChatbotResponseBlock({
|
|
|
119
119
|
sources,
|
|
120
120
|
onFeedback,
|
|
121
121
|
className
|
|
122
|
-
}: ChatbotResponseBlockProps):
|
|
122
|
+
}: ChatbotResponseBlockProps): react_jsx_runtime4.JSX.Element;
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/components/chatbot-response-loading.d.ts
|
|
125
125
|
interface ChatbotResponseLoadingProps {
|
|
@@ -146,7 +146,7 @@ interface ChatbotResponseLoadingProps {
|
|
|
146
146
|
declare function ChatbotResponseLoading({
|
|
147
147
|
text,
|
|
148
148
|
className
|
|
149
|
-
}: ChatbotResponseLoadingProps):
|
|
149
|
+
}: ChatbotResponseLoadingProps): react_jsx_runtime4.JSX.Element;
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region src/components/chatbot-page.d.ts
|
|
152
152
|
declare const ChatbotPage: React$1.ForwardRefExoticComponent<ChatbotPageProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -322,7 +322,7 @@ declare function ChatbotPanelHeader({
|
|
|
322
322
|
onClose,
|
|
323
323
|
className,
|
|
324
324
|
...props
|
|
325
|
-
}: ChatbotPanelHeaderProps):
|
|
325
|
+
}: ChatbotPanelHeaderProps): react_jsx_runtime4.JSX.Element;
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region src/components/chatbot-sidebar.d.ts
|
|
328
328
|
interface ChatbotSidebarConversation {
|
|
@@ -356,6 +356,12 @@ interface ChatbotSidebarProps {
|
|
|
356
356
|
renderConversationMenuContent?: (conversation: ChatbotSidebarConversation) => React$1.ReactNode;
|
|
357
357
|
/** Label above the conversation list. Defaults to "Recent"*/
|
|
358
358
|
recentLabel?: string;
|
|
359
|
+
/**
|
|
360
|
+
* When false, hides the "+ New Chat" entry at the top of the list.
|
|
361
|
+
* Useful in read-only history views (e.g. the `ChatbotInput` history popover).
|
|
362
|
+
* @default true
|
|
363
|
+
*/
|
|
364
|
+
showNewChat?: boolean;
|
|
359
365
|
popup?: boolean;
|
|
360
366
|
className?: string;
|
|
361
367
|
}
|
|
@@ -365,6 +371,11 @@ declare namespace ChatbotSidebar {
|
|
|
365
371
|
}
|
|
366
372
|
//#endregion
|
|
367
373
|
//#region src/components/chatbot-input.d.ts
|
|
374
|
+
interface ChatbotInputSuggestion {
|
|
375
|
+
id: string;
|
|
376
|
+
/** Text shown on the pill button. */
|
|
377
|
+
label: string;
|
|
378
|
+
}
|
|
368
379
|
declare const textareaVariants: (props?: ({
|
|
369
380
|
size?: "default" | "large" | null | undefined;
|
|
370
381
|
expanded?: boolean | null | undefined;
|
|
@@ -382,6 +393,20 @@ type ChatbotInputProps = Omit<React$1.ComponentProps<'textarea'>, 'onChange' | '
|
|
|
382
393
|
* @default false
|
|
383
394
|
*/
|
|
384
395
|
expanded?: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Optional suggestion pills shown in a row below the input.
|
|
398
|
+
* Clicking a pill calls `onSuggestionClick`. Omit to hide the row.
|
|
399
|
+
*/
|
|
400
|
+
suggestions?: ChatbotInputSuggestion[]; /** Called when the user clicks a suggestion pill. */
|
|
401
|
+
onSuggestionClick?: (suggestion: ChatbotInputSuggestion) => void;
|
|
402
|
+
/**
|
|
403
|
+
* When provided, renders a history icon button that opens a conversation list
|
|
404
|
+
* popover. Pass an empty array to show the button with an empty-state message.
|
|
405
|
+
* Omit to hide the button entirely.
|
|
406
|
+
*/
|
|
407
|
+
conversations?: ChatbotSidebarConversation[]; /** Highlights the matching row in the history popover. */
|
|
408
|
+
activeConversationId?: string; /** Called when the user selects a conversation from the history popover. */
|
|
409
|
+
onSelectConversation?: (id: string) => void;
|
|
385
410
|
};
|
|
386
411
|
declare function ChatbotInput({
|
|
387
412
|
className,
|
|
@@ -394,8 +419,13 @@ declare function ChatbotInput({
|
|
|
394
419
|
size,
|
|
395
420
|
expanded,
|
|
396
421
|
disabled,
|
|
422
|
+
suggestions,
|
|
423
|
+
onSuggestionClick,
|
|
424
|
+
conversations,
|
|
425
|
+
activeConversationId,
|
|
426
|
+
onSelectConversation,
|
|
397
427
|
...textareaProps
|
|
398
|
-
}: ChatbotInputProps):
|
|
428
|
+
}: ChatbotInputProps): react_jsx_runtime4.JSX.Element;
|
|
399
429
|
//#endregion
|
|
400
430
|
//#region src/components/copy-button.d.ts
|
|
401
431
|
declare const CopyButton: React$1.ForwardRefExoticComponent<Omit<CopyButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -431,7 +461,7 @@ type ChatbotPanelSuggestionProps = Omit<React.ComponentProps<typeof Button>, 'va
|
|
|
431
461
|
declare function ChatbotPanelSuggestion({
|
|
432
462
|
className,
|
|
433
463
|
...props
|
|
434
|
-
}: ChatbotPanelSuggestionProps):
|
|
464
|
+
}: ChatbotPanelSuggestionProps): react_jsx_runtime4.JSX.Element;
|
|
435
465
|
//#endregion
|
|
436
466
|
//#region src/components/chatbot-user-message.d.ts
|
|
437
467
|
type ChatbotUserMessageProps = React.ComponentProps<'div'>;
|
|
@@ -439,7 +469,7 @@ declare function ChatbotUserMessage({
|
|
|
439
469
|
className,
|
|
440
470
|
children,
|
|
441
471
|
...props
|
|
442
|
-
}: ChatbotUserMessageProps):
|
|
472
|
+
}: ChatbotUserMessageProps): react_jsx_runtime4.JSX.Element;
|
|
443
473
|
//#endregion
|
|
444
474
|
//#region src/components/dashboard-standalone-page.d.ts
|
|
445
475
|
declare const DashboardStandalonePage: React$1.ForwardRefExoticComponent<Omit<DashboardStandalonePageProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -447,6 +477,11 @@ interface DashboardStandalonePageProps extends React$1.ComponentProps<'div'> {}
|
|
|
447
477
|
declare namespace DashboardStandalonePage {
|
|
448
478
|
type Props = DashboardStandalonePageProps;
|
|
449
479
|
}
|
|
480
|
+
declare const DashboardStandalonePageContent: React$1.ForwardRefExoticComponent<Omit<DashboardStandalonePageContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
481
|
+
interface DashboardStandalonePageContentProps extends React$1.ComponentProps<'div'> {}
|
|
482
|
+
declare namespace DashboardStandalonePageContent {
|
|
483
|
+
type Props = DashboardStandalonePageContentProps;
|
|
484
|
+
}
|
|
450
485
|
declare const DashboardStandalonePageHeader: React$1.ForwardRefExoticComponent<Omit<DashboardStandalonePageHeaderProps, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
451
486
|
interface DashboardStandalonePageHeaderProps extends React$1.ComponentProps<'header'> {}
|
|
452
487
|
declare namespace DashboardStandalonePageHeader {
|
|
@@ -457,6 +492,11 @@ interface DashboardStandalonePageTitleProps extends React$1.ComponentProps<'h1'>
|
|
|
457
492
|
declare namespace DashboardStandalonePageTitle {
|
|
458
493
|
type Props = DashboardStandalonePageTitleProps;
|
|
459
494
|
}
|
|
495
|
+
declare const DashboardStandalonePageDescription: React$1.ForwardRefExoticComponent<Omit<DashboardStandalonePageDescriptionProps, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
496
|
+
interface DashboardStandalonePageDescriptionProps extends React$1.ComponentProps<'p'> {}
|
|
497
|
+
declare namespace DashboardStandalonePageDescription {
|
|
498
|
+
type Props = DashboardStandalonePageDescriptionProps;
|
|
499
|
+
}
|
|
460
500
|
declare const DashboardStandalonePageActions: React$1.ForwardRefExoticComponent<Omit<DashboardStandalonePageActionsProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
461
501
|
interface DashboardStandalonePageActionsProps extends React$1.ComponentProps<'div'> {
|
|
462
502
|
side?: 'start' | 'end';
|
|
@@ -469,10 +509,10 @@ interface DashboardStandalonePageActionProps extends React$1.ComponentProps<type
|
|
|
469
509
|
declare namespace DashboardStandalonePageAction {
|
|
470
510
|
type Props = DashboardStandalonePageActionProps;
|
|
471
511
|
}
|
|
472
|
-
declare const
|
|
473
|
-
interface
|
|
474
|
-
declare namespace
|
|
475
|
-
type Props =
|
|
512
|
+
declare const DashboardStandalonePageMain: React$1.ForwardRefExoticComponent<Omit<DashboardStandalonePageMainProps, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
513
|
+
interface DashboardStandalonePageMainProps extends React$1.ComponentProps<'main'> {}
|
|
514
|
+
declare namespace DashboardStandalonePageMain {
|
|
515
|
+
type Props = DashboardStandalonePageMainProps;
|
|
476
516
|
}
|
|
477
517
|
//#endregion
|
|
478
518
|
//#region src/components/dashboard-page.d.ts
|
|
@@ -604,7 +644,7 @@ declare function ChatbotPanelTrigger({
|
|
|
604
644
|
icon,
|
|
605
645
|
className,
|
|
606
646
|
...buttonProps
|
|
607
|
-
}: ChatbotPanelTriggerProps):
|
|
647
|
+
}: ChatbotPanelTriggerProps): react_jsx_runtime4.JSX.Element;
|
|
608
648
|
//#endregion
|
|
609
649
|
//#region src/components/chatbot-expand-suggestion.d.ts
|
|
610
650
|
interface ChatbotExpandSuggestionCategory {
|
|
@@ -710,7 +750,7 @@ declare function ChatbotPanel({
|
|
|
710
750
|
style,
|
|
711
751
|
children,
|
|
712
752
|
...props
|
|
713
|
-
}: ChatbotPanelProps):
|
|
753
|
+
}: ChatbotPanelProps): react_jsx_runtime4.JSX.Element;
|
|
714
754
|
//#endregion
|
|
715
755
|
//#region src/hooks/use-copy-to-clipboard.d.ts
|
|
716
756
|
interface UseCopyToClipboardOptions {
|
|
@@ -747,7 +787,7 @@ declare function CardSaveBar({
|
|
|
747
787
|
submitLabel,
|
|
748
788
|
savingLabel,
|
|
749
789
|
resetLabel
|
|
750
|
-
}: CardSaveBarProps):
|
|
790
|
+
}: CardSaveBarProps): react_jsx_runtime4.JSX.Element;
|
|
751
791
|
//#endregion
|
|
752
792
|
//#region src/components/submit-button.d.ts
|
|
753
793
|
/**
|
|
@@ -771,7 +811,7 @@ declare function SubmitButton({
|
|
|
771
811
|
loadingLabel,
|
|
772
812
|
className,
|
|
773
813
|
...buttonProps
|
|
774
|
-
}: SubmitButtonProps):
|
|
814
|
+
}: SubmitButtonProps): react_jsx_runtime4.JSX.Element;
|
|
775
815
|
//#endregion
|
|
776
816
|
//#region src/form/use-form.d.ts
|
|
777
817
|
/**
|
|
@@ -1383,18 +1423,57 @@ type DescriptionProp = string | {
|
|
|
1383
1423
|
content: React$1.ReactNode;
|
|
1384
1424
|
variant?: 'instructional' | 'contextual';
|
|
1385
1425
|
};
|
|
1426
|
+
/**
|
|
1427
|
+
* Layout props shared by every wrapper. Both default to the vertical layout (label stacked above
|
|
1428
|
+
* the control), so existing fields are unchanged.
|
|
1429
|
+
*
|
|
1430
|
+
* - `orientation`: `'vertical'` (default) stacks label → control. `'horizontal'` places the
|
|
1431
|
+
* label/description beside the control. `'responsive'` is vertical on narrow screens and
|
|
1432
|
+
* horizontal at the `@md` container width — it requires a `FieldGroup` ancestor (which provides
|
|
1433
|
+
* `@container/field-group`), matching the shadcn Field responsive pattern.
|
|
1434
|
+
* - `controlPosition`: in horizontal/responsive layouts, which side the control sits on. Defaults
|
|
1435
|
+
* per control — `FormSwitchField` → `'start'` (switch left of its label), text/select/etc. →
|
|
1436
|
+
* `'end'` (control right of its label).
|
|
1437
|
+
*/
|
|
1438
|
+
type LayoutProps = {
|
|
1439
|
+
orientation?: 'vertical' | 'horizontal' | 'responsive';
|
|
1440
|
+
controlPosition?: 'start' | 'end';
|
|
1441
|
+
};
|
|
1442
|
+
/**
|
|
1443
|
+
* How the control fills its side of a horizontal/responsive row. Internal — set by each wrapper,
|
|
1444
|
+
* not exposed to consumers.
|
|
1445
|
+
* - `'fill'` (default): the control takes a full flex column next to the label column, with the
|
|
1446
|
+
* error/contextual description stacked under it (text inputs, selects, textareas, …).
|
|
1447
|
+
* - `'inline'`: the control is a bare, natural-width element (a switch); the label, descriptions
|
|
1448
|
+
* and error share one growing column on the opposite side.
|
|
1449
|
+
*/
|
|
1450
|
+
type ControlVariant = 'inline' | 'fill';
|
|
1386
1451
|
type FormFieldShellProps = {
|
|
1387
1452
|
label?: LabelProp;
|
|
1388
1453
|
description?: DescriptionProp;
|
|
1389
1454
|
necessityIndicator?: 'required' | 'optional';
|
|
1455
|
+
/**
|
|
1456
|
+
* `htmlFor` target for the rendered `FieldLabel`, so clicking the label focuses the field's
|
|
1457
|
+
* control. Single-control wrappers set this to the same `id` they put on the control itself
|
|
1458
|
+
* (see `FormFieldBase`); group/array wrappers (RadioGroup, ToggleGroup, ArrayField) have no one
|
|
1459
|
+
* focusable target, so they pass an `id` with nothing matching it — same as omitting `htmlFor`.
|
|
1460
|
+
*/
|
|
1461
|
+
id: string;
|
|
1390
1462
|
children: React$1.ReactNode;
|
|
1463
|
+
orientation?: LayoutProps['orientation'];
|
|
1464
|
+
controlPosition?: LayoutProps['controlPosition'];
|
|
1465
|
+
controlVariant?: ControlVariant;
|
|
1391
1466
|
};
|
|
1392
1467
|
declare function FormFieldShell({
|
|
1393
1468
|
label,
|
|
1394
1469
|
description,
|
|
1395
1470
|
necessityIndicator,
|
|
1396
|
-
|
|
1397
|
-
|
|
1471
|
+
id,
|
|
1472
|
+
children,
|
|
1473
|
+
orientation,
|
|
1474
|
+
controlPosition,
|
|
1475
|
+
controlVariant
|
|
1476
|
+
}: FormFieldShellProps): react_jsx_runtime4.JSX.Element;
|
|
1398
1477
|
/**
|
|
1399
1478
|
* Precisely-typed view of the bound field handed to a wrapper's `children`.
|
|
1400
1479
|
* `TData` is `DeepValue<TFormData, TName>` — so `value` and `handleChange` are the field's
|
|
@@ -1421,10 +1500,29 @@ type TypedField<TData> = {
|
|
|
1421
1500
|
* assignable, so `TForm extends BoundForm` fails and `name` cascades to `never`. The loose form
|
|
1422
1501
|
* accepts any `createFormHook` form for any data shape; `FormFieldBase` casts `AppField` to the
|
|
1423
1502
|
* concrete component type before use, so nothing downstream relies on the precise signature.
|
|
1503
|
+
*
|
|
1504
|
+
* `state.values` is `Record<string, any>`, not `unknown`, for a separate reason: every `Form*Field`
|
|
1505
|
+
* wrapper is generic over `<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], V>>`
|
|
1506
|
+
* with no default type arguments. When TS checks whether such a generic function is a valid JSX
|
|
1507
|
+
* element type, it evaluates the *unconstrained* signature — `TForm` falls back to `BoundForm`
|
|
1508
|
+
* itself. With `values: unknown`, `DeepKeysOfType<unknown, V>` can't find any key whose value
|
|
1509
|
+
* extends `V`, so it collapses to `never`, making the unconstrained `name: never` — under
|
|
1510
|
+
* `strictFunctionTypes: true` (the TS default; this repo's shared tsconfig disables it, but most
|
|
1511
|
+
* external consumers don't) that trips `TS2786: 'FormXField' cannot be used as a JSX component`.
|
|
1512
|
+
* `Record<string, any>` fixes it because `any extends V` resolves to `true` for every `V` in a
|
|
1513
|
+
* conditional type, so no key gets filtered out — the unconstrained fallback resolves to a real,
|
|
1514
|
+
* inhabited `string` instead of `never` (same reason react-hook-form defaults
|
|
1515
|
+
* `TFieldValues = Record<string, any>`). Real call sites are unaffected: TS infers `TForm`/`TName`
|
|
1516
|
+
* from the actual threaded `form`, never from this fallback.
|
|
1517
|
+
*
|
|
1518
|
+
* Safe to tighten (unlike `AppField`): `state.values` is *data*, checked structurally/covariantly,
|
|
1519
|
+
* so any real form's values object — however deeply nested or array-shaped — is still assignable
|
|
1520
|
+
* to `Record<string, any>`. `AppField` is a *function signature*, checked contravariantly, which is
|
|
1521
|
+
* why tightening it (see above) breaks real forms but tightening `values` does not.
|
|
1424
1522
|
*/
|
|
1425
1523
|
type BoundForm = {
|
|
1426
1524
|
state: {
|
|
1427
|
-
values:
|
|
1525
|
+
values: Record<string, any>;
|
|
1428
1526
|
};
|
|
1429
1527
|
AppField: (...args: never[]) => unknown;
|
|
1430
1528
|
};
|
|
@@ -1481,8 +1579,17 @@ type FormFieldBaseProps<TData, TControl> = {
|
|
|
1481
1579
|
asyncAlways?: boolean;
|
|
1482
1580
|
label?: LabelProp;
|
|
1483
1581
|
description?: DescriptionProp;
|
|
1484
|
-
necessityIndicator?: 'required' | 'optional';
|
|
1485
|
-
|
|
1582
|
+
necessityIndicator?: 'required' | 'optional';
|
|
1583
|
+
orientation?: LayoutProps['orientation'];
|
|
1584
|
+
controlPosition?: LayoutProps['controlPosition']; /** Internal — set by the wrapper (switch → 'inline', others → 'fill'). Not a consumer prop. */
|
|
1585
|
+
controlVariant?: ControlVariant;
|
|
1586
|
+
/**
|
|
1587
|
+
* Builds the primitive-specific wiring bundle handed to `children`. `id` is `name` (see
|
|
1588
|
+
* `FormFieldBase`) — attach it to the control's actual DOM element so the shell's `FieldLabel`
|
|
1589
|
+
* (`htmlFor={id}`) focuses it on click. Group controls with no single focusable target (radio
|
|
1590
|
+
* group, toggle group) can ignore the parameter.
|
|
1591
|
+
*/
|
|
1592
|
+
buildControl: (field: TypedField<TData>, id: string) => TControl;
|
|
1486
1593
|
children: (field: TypedField<TData>, control: TControl) => React$1.ReactNode;
|
|
1487
1594
|
};
|
|
1488
1595
|
/**
|
|
@@ -1490,13 +1597,15 @@ type FormFieldBaseProps<TData, TControl> = {
|
|
|
1490
1597
|
* Field-name/value/validator typing is enforced at each wrapper's boundary; this just renders
|
|
1491
1598
|
* the AppField + shared shell. `TData`/`TControl` carry the precise field + bundle shapes through.
|
|
1492
1599
|
*/
|
|
1493
|
-
declare function FormFieldBase<TData, TControl>(props: FormFieldBaseProps<TData, TControl>):
|
|
1600
|
+
declare function FormFieldBase<TData, TControl>(props: FormFieldBaseProps<TData, TControl>): react_jsx_runtime4.JSX.Element;
|
|
1494
1601
|
//#endregion
|
|
1495
1602
|
//#region src/components/form-select-field.d.ts
|
|
1496
1603
|
/**
|
|
1497
1604
|
* Wiring bundles handed to a `FormSelectField` child. Spread each onto the matching
|
|
1498
1605
|
* primitive — this encodes the Select-specific quirks (the `'' ↔ null` value dance,
|
|
1499
|
-
* `aria-invalid`) so consumers don't re-derive them.
|
|
1606
|
+
* `aria-invalid`) so consumers don't re-derive them. `id` lands on `selectTriggerProps`, not
|
|
1607
|
+
* `selectProps` — the trigger is the actual focusable button, matching the shell's `FieldLabel`
|
|
1608
|
+
* `htmlFor`.
|
|
1500
1609
|
*/
|
|
1501
1610
|
type SelectControl = {
|
|
1502
1611
|
selectProps: {
|
|
@@ -1504,6 +1613,7 @@ type SelectControl = {
|
|
|
1504
1613
|
onValueChange: (value: string | null) => void;
|
|
1505
1614
|
};
|
|
1506
1615
|
selectTriggerProps: {
|
|
1616
|
+
id: string;
|
|
1507
1617
|
onBlur: () => void;
|
|
1508
1618
|
'aria-invalid': true | undefined;
|
|
1509
1619
|
};
|
|
@@ -1514,7 +1624,7 @@ type FormSelectFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<
|
|
|
1514
1624
|
label?: LabelProp;
|
|
1515
1625
|
description?: DescriptionProp; /** Compose the Select yourself; spread the bundles. Trigger/content stay fully customizable. */
|
|
1516
1626
|
children: (field: TypedField<string>, control: SelectControl) => React$1.ReactNode;
|
|
1517
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1627
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1518
1628
|
/**
|
|
1519
1629
|
* Select field wrapper. Owns the binding + shared `Field/Label/Error` shell, and hands the
|
|
1520
1630
|
* consumer pre-wired `selectProps` / `selectTriggerProps` to spread onto `@aircall/ds` Select
|
|
@@ -1533,15 +1643,17 @@ type FormSelectFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<
|
|
|
1533
1643
|
* )}
|
|
1534
1644
|
* </FormSelectField>
|
|
1535
1645
|
*/
|
|
1536
|
-
declare function FormSelectField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormSelectFieldProps<TForm, TName>):
|
|
1646
|
+
declare function FormSelectField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormSelectFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1537
1647
|
//#endregion
|
|
1538
1648
|
//#region src/components/form-input-field.d.ts
|
|
1539
1649
|
/**
|
|
1540
1650
|
* Wiring bundle handed to a `FormInputField` child. Spread `inputProps` onto a DS `Input`
|
|
1541
|
-
* (or any native-input-shaped control) — value/onChange/onBlur/aria are pre-wired
|
|
1651
|
+
* (or any native-input-shaped control) — value/onChange/onBlur/id/aria are pre-wired; `id`
|
|
1652
|
+
* matches the shell's `FieldLabel` `htmlFor` so clicking the label focuses the input.
|
|
1542
1653
|
*/
|
|
1543
1654
|
type InputControl = {
|
|
1544
1655
|
inputProps: {
|
|
1656
|
+
id: string;
|
|
1545
1657
|
value: string;
|
|
1546
1658
|
onChange: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
1547
1659
|
onBlur: () => void;
|
|
@@ -1554,7 +1666,7 @@ type FormInputFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<T
|
|
|
1554
1666
|
label?: LabelProp;
|
|
1555
1667
|
description?: DescriptionProp;
|
|
1556
1668
|
children: (field: TypedField<string>, control: InputControl) => React$1.ReactNode;
|
|
1557
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1669
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1558
1670
|
/**
|
|
1559
1671
|
* Text-input field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1560
1672
|
* with an `inputProps` bundle. Compose the input yourself (add adornments, counters, prefixes).
|
|
@@ -1565,13 +1677,15 @@ type FormInputFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<T
|
|
|
1565
1677
|
* {(field, { inputProps }) => <Input {...inputProps} type="email" placeholder="you@co.com" />}
|
|
1566
1678
|
* </FormInputField>
|
|
1567
1679
|
*/
|
|
1568
|
-
declare function FormInputField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormInputFieldProps<TForm, TName>):
|
|
1680
|
+
declare function FormInputField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormInputFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1569
1681
|
//#endregion
|
|
1570
1682
|
//#region src/components/form-combobox-field.d.ts
|
|
1571
1683
|
/**
|
|
1572
1684
|
* Wiring bundles handed to a `FormComboboxField` child. The Combobox is structurally different
|
|
1573
1685
|
* from a Select (search input instead of a trigger), so the bundles target its parts:
|
|
1574
|
-
* `comboboxProps` on the `<Combobox>` root, `comboboxInputProps` on `<ComboboxInput>`.
|
|
1686
|
+
* `comboboxProps` on the `<Combobox>` root, `comboboxInputProps` on `<ComboboxInput>`. `id` lands
|
|
1687
|
+
* on `comboboxInputProps` — the input is the actual focusable element, matching the shell's
|
|
1688
|
+
* `FieldLabel` `htmlFor`.
|
|
1575
1689
|
*/
|
|
1576
1690
|
type ComboboxControl = {
|
|
1577
1691
|
comboboxProps: {
|
|
@@ -1579,6 +1693,7 @@ type ComboboxControl = {
|
|
|
1579
1693
|
onValueChange: (value: string | null) => void;
|
|
1580
1694
|
};
|
|
1581
1695
|
comboboxInputProps: {
|
|
1696
|
+
id: string;
|
|
1582
1697
|
onBlur: () => void;
|
|
1583
1698
|
'aria-invalid': true | undefined;
|
|
1584
1699
|
};
|
|
@@ -1589,7 +1704,7 @@ type FormComboboxFieldProps<TForm extends BoundForm, TName extends DeepKeysOfTyp
|
|
|
1589
1704
|
label?: LabelProp;
|
|
1590
1705
|
description?: DescriptionProp;
|
|
1591
1706
|
children: (field: TypedField<string>, control: ComboboxControl) => React$1.ReactNode;
|
|
1592
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1707
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1593
1708
|
/**
|
|
1594
1709
|
* Combobox (searchable single-select) field wrapper for **string-valued** fields. Same threaded-
|
|
1595
1710
|
* `form` typing and shared shell as the other wrappers; the render-prop hands you `comboboxProps`
|
|
@@ -1609,13 +1724,14 @@ type FormComboboxFieldProps<TForm extends BoundForm, TName extends DeepKeysOfTyp
|
|
|
1609
1724
|
* )}
|
|
1610
1725
|
* </FormComboboxField>
|
|
1611
1726
|
*/
|
|
1612
|
-
declare function FormComboboxField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormComboboxFieldProps<TForm, TName>):
|
|
1727
|
+
declare function FormComboboxField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormComboboxFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1613
1728
|
//#endregion
|
|
1614
1729
|
//#region src/components/form-multi-combobox-field.d.ts
|
|
1615
1730
|
/**
|
|
1616
1731
|
* Wiring bundles handed to a `FormMultiComboboxField` child. Spread `comboboxProps` onto the
|
|
1617
1732
|
* `Combobox` root and `comboboxInputProps` onto its input — value/onValueChange live on the
|
|
1618
|
-
* root, while blur/`aria-invalid` belong to the input.
|
|
1733
|
+
* root, while blur/id/`aria-invalid` belong to the input. `id` matches the shell's `FieldLabel`
|
|
1734
|
+
* `htmlFor` so clicking the label focuses the chips input.
|
|
1619
1735
|
*/
|
|
1620
1736
|
type MultiComboboxControl = {
|
|
1621
1737
|
comboboxProps: {
|
|
@@ -1623,6 +1739,7 @@ type MultiComboboxControl = {
|
|
|
1623
1739
|
onValueChange: (value: string[]) => void;
|
|
1624
1740
|
};
|
|
1625
1741
|
comboboxInputProps: {
|
|
1742
|
+
id: string;
|
|
1626
1743
|
onBlur: () => void;
|
|
1627
1744
|
'aria-invalid': true | undefined;
|
|
1628
1745
|
};
|
|
@@ -1633,7 +1750,7 @@ type FormMultiComboboxFieldProps<TForm extends BoundForm, TName extends DeepKeys
|
|
|
1633
1750
|
label?: LabelProp;
|
|
1634
1751
|
description?: DescriptionProp;
|
|
1635
1752
|
children: (field: TypedField<string[]>, control: MultiComboboxControl) => React$1.ReactNode;
|
|
1636
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1753
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1637
1754
|
/**
|
|
1638
1755
|
* Multi-select combobox field wrapper — same threaded-`form` typing and shared shell as
|
|
1639
1756
|
* `FormSelectField`, with `comboboxProps` / `comboboxInputProps` bundles. `name` is restricted
|
|
@@ -1648,7 +1765,7 @@ type FormMultiComboboxFieldProps<TForm extends BoundForm, TName extends DeepKeys
|
|
|
1648
1765
|
* )}
|
|
1649
1766
|
* </FormMultiComboboxField>
|
|
1650
1767
|
*/
|
|
1651
|
-
declare function FormMultiComboboxField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string[]>>(props: FormMultiComboboxFieldProps<TForm, TName>):
|
|
1768
|
+
declare function FormMultiComboboxField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string[]>>(props: FormMultiComboboxFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1652
1769
|
//#endregion
|
|
1653
1770
|
//#region src/components/form-array-field.d.ts
|
|
1654
1771
|
/**
|
|
@@ -1722,15 +1839,17 @@ type FormArrayFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<T
|
|
|
1722
1839
|
* )}
|
|
1723
1840
|
* </FormArrayField>
|
|
1724
1841
|
*/
|
|
1725
|
-
declare function FormArrayField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], unknown[]>>(props: FormArrayFieldProps<TForm, TName>):
|
|
1842
|
+
declare function FormArrayField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], unknown[]>>(props: FormArrayFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1726
1843
|
//#endregion
|
|
1727
1844
|
//#region src/components/form-textarea-field.d.ts
|
|
1728
1845
|
/**
|
|
1729
1846
|
* Wiring bundle handed to a `FormTextareaField` child. Spread `textareaProps` onto a DS
|
|
1730
|
-
* `Textarea` (or any native-textarea-shaped control) — value/onChange/onBlur/aria are
|
|
1847
|
+
* `Textarea` (or any native-textarea-shaped control) — value/onChange/onBlur/id/aria are
|
|
1848
|
+
* pre-wired; `id` matches the shell's `FieldLabel` `htmlFor` so clicking the label focuses it.
|
|
1731
1849
|
*/
|
|
1732
1850
|
type TextareaControl = {
|
|
1733
1851
|
textareaProps: {
|
|
1852
|
+
id: string;
|
|
1734
1853
|
value: string;
|
|
1735
1854
|
onChange: (event: React$1.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
1736
1855
|
onBlur: () => void;
|
|
@@ -1743,7 +1862,7 @@ type FormTextareaFieldProps<TForm extends BoundForm, TName extends DeepKeysOfTyp
|
|
|
1743
1862
|
label?: LabelProp;
|
|
1744
1863
|
description?: DescriptionProp;
|
|
1745
1864
|
children: (field: TypedField<string>, control: TextareaControl) => React$1.ReactNode;
|
|
1746
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1865
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1747
1866
|
/**
|
|
1748
1867
|
* Multiline text-input field wrapper — same threaded-`form` typing and shared shell as
|
|
1749
1868
|
* `FormSelectField`, with a `textareaProps` bundle. Compose the textarea yourself (rows,
|
|
@@ -1754,13 +1873,17 @@ type FormTextareaFieldProps<TForm extends BoundForm, TName extends DeepKeysOfTyp
|
|
|
1754
1873
|
* {(field, { textareaProps }) => <Textarea {...textareaProps} rows={4} />}
|
|
1755
1874
|
* </FormTextareaField>
|
|
1756
1875
|
*/
|
|
1757
|
-
declare function FormTextareaField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormTextareaFieldProps<TForm, TName>):
|
|
1876
|
+
declare function FormTextareaField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormTextareaFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1758
1877
|
//#endregion
|
|
1759
1878
|
//#region src/components/form-radio-group-field.d.ts
|
|
1760
1879
|
/**
|
|
1761
1880
|
* Wiring bundle handed to a `FormRadioGroupField` child. Spread `radioGroupProps` onto a DS
|
|
1762
1881
|
* `RadioGroup` — this encodes the radio-specific quirks (the `'' ↔ null` value dance,
|
|
1763
1882
|
* `aria-invalid`) so consumers don't re-derive them.
|
|
1883
|
+
*
|
|
1884
|
+
* No `id` here, unlike the single-control wrappers: a radio group has several focusable items,
|
|
1885
|
+
* not one, so there's no single target for the shell's `FieldLabel` `htmlFor` to focus — native
|
|
1886
|
+
* `<label>` click-to-focus doesn't apply to grouped controls the way it does to a single input.
|
|
1764
1887
|
*/
|
|
1765
1888
|
type RadioGroupControl = {
|
|
1766
1889
|
radioGroupProps: {
|
|
@@ -1776,7 +1899,7 @@ type FormRadioGroupFieldProps<TForm extends BoundForm, TName extends DeepKeysOfT
|
|
|
1776
1899
|
label?: LabelProp;
|
|
1777
1900
|
description?: DescriptionProp;
|
|
1778
1901
|
children: (field: TypedField<string>, control: RadioGroupControl) => React$1.ReactNode;
|
|
1779
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1902
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1780
1903
|
/**
|
|
1781
1904
|
* Radio-group field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1782
1905
|
* with a `radioGroupProps` bundle. Compose the items yourself. `name` is restricted to the
|
|
@@ -1791,15 +1914,18 @@ type FormRadioGroupFieldProps<TForm extends BoundForm, TName extends DeepKeysOfT
|
|
|
1791
1914
|
* )}
|
|
1792
1915
|
* </FormRadioGroupField>
|
|
1793
1916
|
*/
|
|
1794
|
-
declare function FormRadioGroupField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormRadioGroupFieldProps<TForm, TName>):
|
|
1917
|
+
declare function FormRadioGroupField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormRadioGroupFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1795
1918
|
//#endregion
|
|
1796
1919
|
//#region src/components/form-otp-field.d.ts
|
|
1797
1920
|
/**
|
|
1798
1921
|
* Wiring bundle handed to a `FormOTPField` child. Spread `otpProps` onto a DS `InputOTP` —
|
|
1799
|
-
* value/onChange/onBlur/aria are pre-wired (`InputOTP` reports its value as a plain string
|
|
1922
|
+
* value/onChange/onBlur/id/aria are pre-wired (`InputOTP` reports its value as a plain string;
|
|
1923
|
+
* it renders one real input under its visual slots, so `id` lands there and matches the shell's
|
|
1924
|
+
* `FieldLabel` `htmlFor`).
|
|
1800
1925
|
*/
|
|
1801
1926
|
type OTPControl = {
|
|
1802
1927
|
otpProps: {
|
|
1928
|
+
id: string;
|
|
1803
1929
|
value: string;
|
|
1804
1930
|
onChange: (value: string) => void;
|
|
1805
1931
|
onBlur: () => void;
|
|
@@ -1812,7 +1938,7 @@ type FormOTPFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TFo
|
|
|
1812
1938
|
label?: LabelProp;
|
|
1813
1939
|
description?: DescriptionProp;
|
|
1814
1940
|
children: (field: TypedField<string>, control: OTPControl) => React$1.ReactNode;
|
|
1815
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1941
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1816
1942
|
/**
|
|
1817
1943
|
* One-time-code field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1818
1944
|
* with an `otpProps` bundle. Compose the slots yourself. `name` is restricted to the form's
|
|
@@ -1823,15 +1949,17 @@ type FormOTPFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<TFo
|
|
|
1823
1949
|
* {(field, { otpProps }) => <InputOTP maxLength={6} {...otpProps}>{slots}</InputOTP>}
|
|
1824
1950
|
* </FormOTPField>
|
|
1825
1951
|
*/
|
|
1826
|
-
declare function FormOTPField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormOTPFieldProps<TForm, TName>):
|
|
1952
|
+
declare function FormOTPField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string>>(props: FormOTPFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1827
1953
|
//#endregion
|
|
1828
1954
|
//#region src/components/form-switch-field.d.ts
|
|
1829
1955
|
/**
|
|
1830
1956
|
* Wiring bundle handed to a `FormSwitchField` child. Spread `switchProps` onto a DS `Switch` —
|
|
1831
|
-
* checked/onCheckedChange/onBlur/aria are pre-wired
|
|
1957
|
+
* checked/onCheckedChange/onBlur/id/aria are pre-wired; `id` matches the shell's `FieldLabel`
|
|
1958
|
+
* `htmlFor` so clicking the label toggles the switch.
|
|
1832
1959
|
*/
|
|
1833
1960
|
type SwitchControl = {
|
|
1834
1961
|
switchProps: {
|
|
1962
|
+
id: string;
|
|
1835
1963
|
checked: boolean;
|
|
1836
1964
|
onCheckedChange: (checked: boolean) => void;
|
|
1837
1965
|
onBlur: () => void;
|
|
@@ -1844,26 +1972,31 @@ type FormSwitchFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<
|
|
|
1844
1972
|
label?: LabelProp;
|
|
1845
1973
|
description?: DescriptionProp;
|
|
1846
1974
|
children: (field: TypedField<boolean>, control: SwitchControl) => React$1.ReactNode;
|
|
1847
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
1975
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1848
1976
|
/**
|
|
1849
1977
|
* Toggle field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1850
1978
|
* with a `switchProps` bundle. `name` is restricted to the form's **boolean** fields — a
|
|
1851
1979
|
* string/number `name` is a type error.
|
|
1852
1980
|
*
|
|
1981
|
+
* In a horizontal/responsive layout the switch is a bare, natural-width control beside its label
|
|
1982
|
+
* (`controlPosition` picks the side — defaults to `'start'`, i.e. switch on the left).
|
|
1983
|
+
*
|
|
1853
1984
|
* @example
|
|
1854
1985
|
* <FormSwitchField form={form} name="enabled" label="Enabled" validators={{ onChange }}>
|
|
1855
1986
|
* {(field, { switchProps }) => <Switch {...switchProps} />}
|
|
1856
1987
|
* </FormSwitchField>
|
|
1857
1988
|
*/
|
|
1858
|
-
declare function FormSwitchField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], boolean>>(props: FormSwitchFieldProps<TForm, TName>):
|
|
1989
|
+
declare function FormSwitchField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], boolean>>(props: FormSwitchFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1859
1990
|
//#endregion
|
|
1860
1991
|
//#region src/components/form-numeric-field.d.ts
|
|
1861
1992
|
/**
|
|
1862
1993
|
* Wiring bundle handed to a `FormNumericField` child. Spread `numericProps` onto a DS
|
|
1863
|
-
* `NumericInput` — value/onValueChange/onBlur/aria are pre-wired (a cleared input coerces to
|
|
1994
|
+
* `NumericInput` — value/onValueChange/onBlur/id/aria are pre-wired (a cleared input coerces to
|
|
1995
|
+
* `0`); `id` matches the shell's `FieldLabel` `htmlFor` so clicking the label focuses the input.
|
|
1864
1996
|
*/
|
|
1865
1997
|
type NumericControl = {
|
|
1866
1998
|
numericProps: {
|
|
1999
|
+
id: string;
|
|
1867
2000
|
value: number;
|
|
1868
2001
|
onValueChange: (value: number | null) => void;
|
|
1869
2002
|
onBlur: () => void;
|
|
@@ -1876,7 +2009,7 @@ type FormNumericFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType
|
|
|
1876
2009
|
label?: LabelProp;
|
|
1877
2010
|
description?: DescriptionProp;
|
|
1878
2011
|
children: (field: TypedField<number>, control: NumericControl) => React$1.ReactNode;
|
|
1879
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
2012
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1880
2013
|
/**
|
|
1881
2014
|
* Numeric field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1882
2015
|
* with a `numericProps` bundle for the DS `NumericInput` (prefer it over `Input type="number"`).
|
|
@@ -1887,17 +2020,26 @@ type FormNumericFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType
|
|
|
1887
2020
|
* {(field, { numericProps }) => <NumericInput {...numericProps} />}
|
|
1888
2021
|
* </FormNumericField>
|
|
1889
2022
|
*/
|
|
1890
|
-
declare function FormNumericField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], number>>(props: FormNumericFieldProps<TForm, TName>):
|
|
2023
|
+
declare function FormNumericField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], number>>(props: FormNumericFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1891
2024
|
//#endregion
|
|
1892
2025
|
//#region src/components/form-slider-field.d.ts
|
|
1893
2026
|
/**
|
|
1894
2027
|
* Wiring bundle handed to a `FormSliderField` child. Spread `sliderProps` onto a DS `Slider` —
|
|
1895
2028
|
* this encodes the single-value ↔ `number[]` dance the underlying range primitive expects.
|
|
2029
|
+
*
|
|
2030
|
+
* `onValueChange`'s parameter is `number | readonly number[]`, not just `number[]`: DS's
|
|
2031
|
+
* `Slider` doesn't pin the `@base-ui/react` `Value` generic, so its declared `onValueChange`
|
|
2032
|
+
* type is the union default. Always setting `value` to a 1-element array below does make the
|
|
2033
|
+
* primitive call back with an array at runtime, but a handler typed to accept only `number[]`
|
|
2034
|
+
* isn't contravariantly assignable to one the union requires — that's a real
|
|
2035
|
+
* `strictFunctionTypes` violation, not a false positive, so the handler accepts (and narrows)
|
|
2036
|
+
* both shapes instead of narrowing the prop.
|
|
1896
2037
|
*/
|
|
1897
2038
|
type SliderControl = {
|
|
1898
2039
|
sliderProps: {
|
|
2040
|
+
id: string;
|
|
1899
2041
|
value: number[];
|
|
1900
|
-
onValueChange: (value: number[]) => void;
|
|
2042
|
+
onValueChange: (value: number | readonly number[]) => void;
|
|
1901
2043
|
onBlur: () => void;
|
|
1902
2044
|
};
|
|
1903
2045
|
};
|
|
@@ -1907,7 +2049,7 @@ type FormSliderFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<
|
|
|
1907
2049
|
label?: LabelProp;
|
|
1908
2050
|
description?: DescriptionProp;
|
|
1909
2051
|
children: (field: TypedField<number>, control: SliderControl) => React$1.ReactNode;
|
|
1910
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
2052
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1911
2053
|
/**
|
|
1912
2054
|
* Slider field wrapper — same threaded-`form` typing and shared shell as `FormSelectField`,
|
|
1913
2055
|
* with a `sliderProps` bundle. `name` is restricted to the form's **number** fields; the bundle
|
|
@@ -1918,13 +2060,17 @@ type FormSliderFieldProps<TForm extends BoundForm, TName extends DeepKeysOfType<
|
|
|
1918
2060
|
* {(field, { sliderProps }) => <Slider min={0} max={100} step={1} {...sliderProps} />}
|
|
1919
2061
|
* </FormSliderField>
|
|
1920
2062
|
*/
|
|
1921
|
-
declare function FormSliderField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], number>>(props: FormSliderFieldProps<TForm, TName>):
|
|
2063
|
+
declare function FormSliderField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], number>>(props: FormSliderFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1922
2064
|
//#endregion
|
|
1923
2065
|
//#region src/components/form-toggle-group-field.d.ts
|
|
1924
2066
|
/**
|
|
1925
2067
|
* Wiring bundle handed to a `FormToggleGroupField` child. Spread `toggleGroupProps` onto a DS
|
|
1926
2068
|
* `ToggleGroup` — this encodes the single-value ↔ `string[]` dance the multi-select primitive
|
|
1927
2069
|
* expects (last pressed item wins; cleared selection maps to `null`).
|
|
2070
|
+
*
|
|
2071
|
+
* No `id` here, unlike the single-control wrappers: a toggle group has several focusable items,
|
|
2072
|
+
* not one, so there's no single target for the shell's `FieldLabel` `htmlFor` to focus — native
|
|
2073
|
+
* `<label>` click-to-focus doesn't apply to grouped controls the way it does to a single input.
|
|
1928
2074
|
*/
|
|
1929
2075
|
type ToggleGroupControl = {
|
|
1930
2076
|
toggleGroupProps: {
|
|
@@ -1939,7 +2085,7 @@ type FormToggleGroupFieldProps<TForm extends BoundForm, TName extends DeepKeysOf
|
|
|
1939
2085
|
label?: LabelProp;
|
|
1940
2086
|
description?: DescriptionProp;
|
|
1941
2087
|
children: (field: TypedField<string | null>, control: ToggleGroupControl) => React$1.ReactNode;
|
|
1942
|
-
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps;
|
|
2088
|
+
} & FieldBindingProps<TForm['state']['values'], TName> & NecessityProps & LayoutProps;
|
|
1943
2089
|
/**
|
|
1944
2090
|
* Single-select toggle-group field wrapper — same threaded-`form` typing and shared shell as
|
|
1945
2091
|
* `FormSelectField`, with a `toggleGroupProps` bundle. `name` is restricted to the form's
|
|
@@ -1955,7 +2101,7 @@ type FormToggleGroupFieldProps<TForm extends BoundForm, TName extends DeepKeysOf
|
|
|
1955
2101
|
* )}
|
|
1956
2102
|
* </FormToggleGroupField>
|
|
1957
2103
|
*/
|
|
1958
|
-
declare function FormToggleGroupField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string | null>>(props: FormToggleGroupFieldProps<TForm, TName>):
|
|
2104
|
+
declare function FormToggleGroupField<TForm extends BoundForm, TName extends DeepKeysOfType<TForm['state']['values'], string | null>>(props: FormToggleGroupFieldProps<TForm, TName>): react_jsx_runtime4.JSX.Element;
|
|
1959
2105
|
//#endregion
|
|
1960
2106
|
//#region src/form/field-errors.d.ts
|
|
1961
2107
|
/**
|
|
@@ -2003,7 +2149,7 @@ declare function SaveBar({
|
|
|
2003
2149
|
savingLabel,
|
|
2004
2150
|
resetLabel,
|
|
2005
2151
|
className
|
|
2006
|
-
}: SaveBarProps):
|
|
2152
|
+
}: SaveBarProps): react_jsx_runtime4.JSX.Element;
|
|
2007
2153
|
//#endregion
|
|
2008
2154
|
//#region src/components/dashboard-sidebar-nav.d.ts
|
|
2009
2155
|
type DashboardSidebarNavSubmenuSeparator = {
|
|
@@ -2087,7 +2233,7 @@ type DashboardSidebarNavProps = {
|
|
|
2087
2233
|
declare function DashboardSidebarNav({
|
|
2088
2234
|
groups,
|
|
2089
2235
|
renderLink
|
|
2090
|
-
}: DashboardSidebarNavProps):
|
|
2236
|
+
}: DashboardSidebarNavProps): react_jsx_runtime4.JSX.Element;
|
|
2091
2237
|
//#endregion
|
|
2092
2238
|
//#region src/components/dashboard-sidebar.d.ts
|
|
2093
2239
|
declare const DashboardSidebarProvider: React$1.ForwardRefExoticComponent<Omit<DashboardSidebarProviderProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -2187,4 +2333,4 @@ declare namespace DashboardSidebarSubmenuSeparator {
|
|
|
2187
2333
|
type Props = DashboardSidebarSubmenuSeparatorProps;
|
|
2188
2334
|
}
|
|
2189
2335
|
//#endregion
|
|
2190
|
-
export { type ArrayField, type ArrayItem, 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, ChatbotResponseLoading, type ChatbotResponseLoadingProps, 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, FormArrayField, type FormArrayFieldProps, FormComboboxField, type FormComboboxFieldProps, FormFieldBase, FormFieldShell, type FormFieldShellProps, 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 };
|
|
2336
|
+
export { type ArrayField, type ArrayItem, BetaBadge, type BoundForm, CardSaveBar, type CardSaveBarProps, ChatbotExpandSuggestion, type ChatbotExpandSuggestionProps, ChatbotInput, type ChatbotInputProps, type ChatbotInputSuggestion, 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, ChatbotResponseLoading, type ChatbotResponseLoadingProps, 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, DashboardStandalonePageDescription, DashboardStandalonePageHeader, DashboardStandalonePageMain, DashboardStandalonePageTitle, DeprecatedBadge, EmptyState, EmptyStateActions, EmptyStateButton, EmptyStateDescription, EmptyStateExternalLink, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, type FieldBindingProps, FormArrayField, type FormArrayFieldProps, FormComboboxField, type FormComboboxFieldProps, FormFieldBase, FormFieldShell, type FormFieldShellProps, 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 };
|