@reopt-ai/opt-ui-primitives 1.5.1 → 1.5.2
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/index.cjs +1080 -589
- package/dist/index.d.cts +137 -21
- package/dist/index.d.ts +137 -21
- package/dist/index.js +1080 -591
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -85,10 +85,37 @@ declare function useRovingTabindex(options?: RovingTabindexOptions): {
|
|
|
85
85
|
//#region src/hooks/use-floating.d.ts
|
|
86
86
|
/** Why an overlay's open state changed, forwarded to `onOpenChange`. */
|
|
87
87
|
type DismissReason = "escape-key" | "outside-press" | "ancestor-scroll";
|
|
88
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Dismissal behavior. `true` enables outside-press + escape-key.
|
|
90
|
+
*
|
|
91
|
+
* ## Which dismissals to delegate — the overlay policy
|
|
92
|
+
*
|
|
93
|
+
* Delegating to floating-ui's `useDismiss` gets shadow-DOM-safe,
|
|
94
|
+
* reference-aware document listeners for free, so it is the default choice.
|
|
95
|
+
* An overlay keeps a dismissal for ITSELF only when closing also has to move
|
|
96
|
+
* focus, because the keydown handler is where the focus target is known:
|
|
97
|
+
*
|
|
98
|
+
* | Overlay | outsidePress | escapeKey | why |
|
|
99
|
+
* | ----------------- | ------------ | --------- | -------------------------------------- |
|
|
100
|
+
* | Popover | delegated | delegated | `FloatingFocusManager` restores focus |
|
|
101
|
+
* | Tooltip | n/a | delegated | never holds focus |
|
|
102
|
+
* | Menu | delegated | OWN | Escape must refocus the trigger |
|
|
103
|
+
* | Select / Combobox | delegated | OWN | Escape keeps focus on trigger/input |
|
|
104
|
+
*
|
|
105
|
+
* `outsidePress` is delegated everywhere: the press target should receive
|
|
106
|
+
* focus, so no overlay needs to intervene. When adding an overlay, follow this
|
|
107
|
+
* table rather than inventing a third pattern — and if a new one is genuinely
|
|
108
|
+
* needed, add a row here.
|
|
109
|
+
*/
|
|
89
110
|
type DismissConfig = boolean | {
|
|
111
|
+
/** Close on a press outside the reference/floating elements. */
|
|
90
112
|
outsidePress?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Close on Escape. Set `false` when the overlay handles Escape itself
|
|
115
|
+
* because it also has to restore focus — see the table above.
|
|
116
|
+
*/
|
|
91
117
|
escapeKey?: boolean;
|
|
118
|
+
/** Close when an ancestor scroller scrolls. Off by default. */
|
|
92
119
|
ancestorScroll?: boolean;
|
|
93
120
|
};
|
|
94
121
|
/** Physical side a popup is placed on, derived from the resolved placement. */
|
|
@@ -389,9 +416,34 @@ declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & impo
|
|
|
389
416
|
/** Where a portaled overlay mounts: an element, an element id, or body. */
|
|
390
417
|
type PortalRoot = HTMLElement | string | null;
|
|
391
418
|
//#endregion
|
|
419
|
+
//#region src/internal/render-element.d.ts
|
|
420
|
+
/**
|
|
421
|
+
* The `render` prop contract: swap the element a part renders while keeping all
|
|
422
|
+
* of its behavior, props and refs. Either a React element to clone, or a
|
|
423
|
+
* function receiving the merged props.
|
|
424
|
+
*/
|
|
425
|
+
type RenderProp = ReactElement | ((props: Record<string, unknown>) => ReactElement);
|
|
426
|
+
//#endregion
|
|
392
427
|
//#region src/primitives/tooltip.d.ts
|
|
393
|
-
/** Props for `
|
|
394
|
-
interface
|
|
428
|
+
/** Props for `TooltipGroup`. */
|
|
429
|
+
interface TooltipGroupProps {
|
|
430
|
+
children: ReactNode;
|
|
431
|
+
/**
|
|
432
|
+
* How long after a tooltip in this group closes its siblings still open
|
|
433
|
+
* INSTANTLY (no show delay). Default 300ms. Set 0 to disable skipping.
|
|
434
|
+
*/
|
|
435
|
+
skipDelay?: number;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Groups sibling tooltips so moving between them does not re-pay the show
|
|
439
|
+
* delay — the APG/desktop convention for toolbars and icon rows, where waiting
|
|
440
|
+
* 700ms per button makes the row feel broken.
|
|
441
|
+
*
|
|
442
|
+
* Optional: a `TooltipProvider` outside any group keeps its own delay.
|
|
443
|
+
*/
|
|
444
|
+
declare function TooltipGroup({ children, skipDelay }: TooltipGroupProps): React$1.JSX.Element;
|
|
445
|
+
/** Props for `TooltipRoot`. */
|
|
446
|
+
interface TooltipRootProps {
|
|
395
447
|
children: ReactNode;
|
|
396
448
|
timeout?: number;
|
|
397
449
|
showTimeout?: number;
|
|
@@ -403,8 +455,27 @@ interface TooltipProviderProps {
|
|
|
403
455
|
/** Portal mount target (element or element id). Defaults to document.body. */
|
|
404
456
|
portalRoot?: PortalRoot;
|
|
405
457
|
}
|
|
406
|
-
/**
|
|
407
|
-
|
|
458
|
+
/**
|
|
459
|
+
* Owns ONE tooltip: its open state, delays, placement and portal.
|
|
460
|
+
*
|
|
461
|
+
* Wrap several of these in a {@link TooltipGroup} to share a skip-delay window.
|
|
462
|
+
*/
|
|
463
|
+
declare function TooltipRoot({ children, timeout, showTimeout, hideTimeout, placement, animated, portal, portalRoot }: TooltipRootProps): React$1.JSX.Element;
|
|
464
|
+
/**
|
|
465
|
+
* Props for `TooltipProvider`.
|
|
466
|
+
*
|
|
467
|
+
* @deprecated Use `TooltipRootProps`.
|
|
468
|
+
*/
|
|
469
|
+
type TooltipProviderProps = TooltipRootProps;
|
|
470
|
+
/**
|
|
471
|
+
* A single tooltip.
|
|
472
|
+
*
|
|
473
|
+
* @deprecated Renamed to {@link TooltipRoot}. Despite the name this component
|
|
474
|
+
* never provided anything to a subtree of tooltips — it IS one tooltip. The
|
|
475
|
+
* delay-sharing provider is {@link TooltipGroup}. Kept as an alias for
|
|
476
|
+
* back-compat; scheduled for removal in the next major.
|
|
477
|
+
*/
|
|
478
|
+
declare const TooltipProvider: typeof TooltipRoot;
|
|
408
479
|
/** Props for `TooltipAnchor`. */
|
|
409
480
|
interface TooltipAnchorProps extends ComponentPropsWithoutRef<"div"> {
|
|
410
481
|
/** Render a custom element instead of a wrapper div. The element receives tooltip props. */
|
|
@@ -412,9 +483,12 @@ interface TooltipAnchorProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
412
483
|
}
|
|
413
484
|
declare const TooltipAnchor: React$1.ForwardRefExoticComponent<TooltipAnchorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
414
485
|
/** Props for `Tooltip`. */
|
|
415
|
-
interface TooltipProps extends ComponentPropsWithoutRef<"div"> {
|
|
486
|
+
interface TooltipProps extends ComponentPropsWithoutRef<"div"> {
|
|
487
|
+
/** Render a custom element instead of the default `div`. */
|
|
488
|
+
render?: RenderProp;
|
|
489
|
+
}
|
|
416
490
|
/** Renders the `Tooltip` component. */
|
|
417
|
-
declare function Tooltip({ children, onMouseEnter, onMouseLeave, ...props }: TooltipProps): React$1.JSX.Element | null;
|
|
491
|
+
declare function Tooltip({ children, onMouseEnter, onMouseLeave, render, ...props }: TooltipProps): React$1.JSX.Element | null;
|
|
418
492
|
//#endregion
|
|
419
493
|
//#region src/primitives/popover.d.ts
|
|
420
494
|
/** Props for `PopoverRoot`. */
|
|
@@ -448,9 +522,12 @@ declare function PopoverRoot({ children, open: controlledOpen, defaultOpen, onOp
|
|
|
448
522
|
interface PopoverTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
449
523
|
declare const PopoverTrigger: import("react").ForwardRefExoticComponent<PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
450
524
|
/** Props for `PopoverContent`. */
|
|
451
|
-
interface PopoverContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
525
|
+
interface PopoverContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
526
|
+
/** Render a custom element instead of the default `div`. */
|
|
527
|
+
render?: RenderProp;
|
|
528
|
+
}
|
|
452
529
|
/** Renders the `PopoverContent` component. */
|
|
453
|
-
declare function PopoverContent({ children, ...props }: PopoverContentProps): import("react").JSX.Element | null;
|
|
530
|
+
declare function PopoverContent({ children, render, ...props }: PopoverContentProps): import("react").JSX.Element | null;
|
|
454
531
|
/** Props for `PopoverClose`. */
|
|
455
532
|
interface PopoverCloseProps extends ComponentPropsWithoutRef<"button"> {}
|
|
456
533
|
declare const PopoverClose: import("react").ForwardRefExoticComponent<PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -468,6 +545,12 @@ interface SelectRootProps {
|
|
|
468
545
|
setValue?: (value: string | string[]) => void;
|
|
469
546
|
/** Allow selecting more than one option. The value becomes a `string[]`. */
|
|
470
547
|
multiple?: boolean;
|
|
548
|
+
/**
|
|
549
|
+
* Present the current value without allowing changes. Unlike `disabled` the
|
|
550
|
+
* trigger stays focusable and the listbox still OPENS and can be browsed —
|
|
551
|
+
* only committing a new value is blocked. Reflected as `aria-readonly`.
|
|
552
|
+
*/
|
|
553
|
+
readOnly?: boolean;
|
|
471
554
|
/** Form field name. Renders hidden input(s) so the value submits with a form. */
|
|
472
555
|
name?: string;
|
|
473
556
|
open?: boolean;
|
|
@@ -482,7 +565,7 @@ interface SelectRootProps {
|
|
|
482
565
|
portalRoot?: PortalRoot;
|
|
483
566
|
}
|
|
484
567
|
/** Renders the `SelectRoot` component. */
|
|
485
|
-
declare function SelectRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, multiple, name, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: SelectRootProps): import("react").JSX.Element;
|
|
568
|
+
declare function SelectRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, multiple, readOnly, name, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: SelectRootProps): import("react").JSX.Element;
|
|
486
569
|
/** Props for `SelectLabel`. */
|
|
487
570
|
interface SelectLabelProps extends ComponentPropsWithoutRef<"label"> {}
|
|
488
571
|
/** Renders the `SelectLabel` component. */
|
|
@@ -491,9 +574,12 @@ declare function SelectLabel(props: SelectLabelProps): import("react").JSX.Eleme
|
|
|
491
574
|
interface SelectTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
492
575
|
declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
493
576
|
/** Props for `SelectPopover`. */
|
|
494
|
-
interface SelectPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
577
|
+
interface SelectPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
578
|
+
/** Render a custom element instead of the default `div`. */
|
|
579
|
+
render?: RenderProp;
|
|
580
|
+
}
|
|
495
581
|
/** Renders the `SelectPopover` component. */
|
|
496
|
-
declare function SelectPopover({ children, ...props }: SelectPopoverProps): import("react").JSX.Element | null;
|
|
582
|
+
declare function SelectPopover({ children, render, ...props }: SelectPopoverProps): import("react").JSX.Element | null;
|
|
497
583
|
/** Props for `SelectItem`. */
|
|
498
584
|
interface SelectItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
499
585
|
value: string;
|
|
@@ -512,6 +598,13 @@ interface ComboboxRootProps {
|
|
|
512
598
|
onValueChange?: (value: string) => void;
|
|
513
599
|
/** @deprecated Use `onValueChange`. */
|
|
514
600
|
setValue?: (value: string) => void;
|
|
601
|
+
/**
|
|
602
|
+
* Present the current value without allowing changes. Unlike `disabled` the
|
|
603
|
+
* input stays focusable and the listbox still OPENS and can be browsed —
|
|
604
|
+
* only editing the query and committing a new value are blocked. Reflected
|
|
605
|
+
* as the input's native `readonly` plus `aria-readonly`.
|
|
606
|
+
*/
|
|
607
|
+
readOnly?: boolean;
|
|
515
608
|
open?: boolean;
|
|
516
609
|
/** Called when the open state changes. */
|
|
517
610
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -524,14 +617,17 @@ interface ComboboxRootProps {
|
|
|
524
617
|
portalRoot?: PortalRoot;
|
|
525
618
|
}
|
|
526
619
|
/** Renders the `ComboboxRoot` component. */
|
|
527
|
-
declare function ComboboxRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: ComboboxRootProps): import("react").JSX.Element;
|
|
620
|
+
declare function ComboboxRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, readOnly, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: ComboboxRootProps): import("react").JSX.Element;
|
|
528
621
|
/** Props for `ComboboxInput`. */
|
|
529
622
|
interface ComboboxInputProps extends Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange"> {}
|
|
530
623
|
declare const ComboboxInput: import("react").ForwardRefExoticComponent<ComboboxInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
531
624
|
/** Props for `ComboboxPopover`. */
|
|
532
|
-
interface ComboboxPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
625
|
+
interface ComboboxPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
626
|
+
/** Render a custom element instead of the default `div`. */
|
|
627
|
+
render?: RenderProp;
|
|
628
|
+
}
|
|
533
629
|
/** Renders the `ComboboxPopover` component. */
|
|
534
|
-
declare function ComboboxPopover({ children, ...props }: ComboboxPopoverProps): import("react").JSX.Element | null;
|
|
630
|
+
declare function ComboboxPopover({ children, render, ...props }: ComboboxPopoverProps): import("react").JSX.Element | null;
|
|
535
631
|
/** Props for `ComboboxItem`. */
|
|
536
632
|
interface ComboboxItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
537
633
|
value: string;
|
|
@@ -588,7 +684,15 @@ interface CommandGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
588
684
|
declare function CommandGroup({ heading, children, ...props }: CommandGroupProps): import("react").JSX.Element;
|
|
589
685
|
/** Props for `CommandSeparator`. */
|
|
590
686
|
interface CommandSeparatorProps extends ComponentPropsWithoutRef<"div"> {}
|
|
591
|
-
/**
|
|
687
|
+
/**
|
|
688
|
+
* Renders the `CommandSeparator` component.
|
|
689
|
+
*
|
|
690
|
+
* Rendered with `role="presentation"`: the separator is a child of
|
|
691
|
+
* `CommandList` (`role="listbox"`), whose only permitted children are `option`
|
|
692
|
+
* and `group`. A real `role="separator"` there fails
|
|
693
|
+
* `aria-required-children` and corrupts the option count announced by screen
|
|
694
|
+
* readers. (Menu separators keep `role="separator"` — `menu` permits it.)
|
|
695
|
+
*/
|
|
592
696
|
declare function CommandSeparator(props: CommandSeparatorProps): import("react").JSX.Element;
|
|
593
697
|
/** Props for `CommandItem`. */
|
|
594
698
|
interface CommandItemProps extends Omit<ComponentPropsWithoutRef<"div">, "onSelect"> {
|
|
@@ -646,9 +750,12 @@ declare function MenuRoot({ children, open: controlledOpen, onOpenChange, setOpe
|
|
|
646
750
|
interface MenuTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
647
751
|
declare const MenuTrigger: import("react").ForwardRefExoticComponent<MenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
648
752
|
/** Props for `MenuPopover`. */
|
|
649
|
-
interface MenuPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
753
|
+
interface MenuPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
754
|
+
/** Render a custom element instead of the default `div`. */
|
|
755
|
+
render?: RenderProp;
|
|
756
|
+
}
|
|
650
757
|
/** Renders the `MenuPopover` component. */
|
|
651
|
-
declare function MenuPopover({ children, onKeyDown, ...props }: MenuPopoverProps): import("react").JSX.Element | null;
|
|
758
|
+
declare function MenuPopover({ children, onKeyDown, render, ...props }: MenuPopoverProps): import("react").JSX.Element | null;
|
|
652
759
|
/** Props for `MenuItem`. */
|
|
653
760
|
interface MenuItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
654
761
|
disabled?: boolean;
|
|
@@ -907,9 +1014,18 @@ interface AccordionTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
|
907
1014
|
/** Renders the `AccordionTrigger` component. */
|
|
908
1015
|
declare function AccordionTrigger({ onClick, disabled, ...props }: AccordionTriggerProps): import("react").JSX.Element;
|
|
909
1016
|
/** Props for `AccordionContent`. */
|
|
910
|
-
interface AccordionContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
1017
|
+
interface AccordionContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
1018
|
+
/**
|
|
1019
|
+
* When collapsed, keep the content in the DOM as `hidden="until-found"`
|
|
1020
|
+
* (instead of unmounting) so browser find-in-page can reveal it. Chromium
|
|
1021
|
+
* progressive enhancement; disables the enter/leave animation for this
|
|
1022
|
+
* content. On reveal a `beforematch` event expands the item so state stays
|
|
1023
|
+
* consistent.
|
|
1024
|
+
*/
|
|
1025
|
+
hiddenUntilFound?: boolean;
|
|
1026
|
+
}
|
|
911
1027
|
/** Renders the `AccordionContent` component. */
|
|
912
|
-
declare function AccordionContent({ style, ...props }: AccordionContentProps): import("react").JSX.Element | null;
|
|
1028
|
+
declare function AccordionContent({ hiddenUntilFound, style, ...props }: AccordionContentProps): import("react").JSX.Element | null;
|
|
913
1029
|
//#endregion
|
|
914
1030
|
//#region src/form/form-store.d.ts
|
|
915
1031
|
/** Field name → error message map. Keys can be dot-paths (e.g. "items.0"). */
|
|
@@ -1148,4 +1264,4 @@ interface FormGroupLabelProps extends ComponentPropsWithoutRef<"legend"> {}
|
|
|
1148
1264
|
/** Renders the `FormGroupLabel` component. */
|
|
1149
1265
|
declare function FormGroupLabel(props: FormGroupLabelProps): import("react").JSX.Element;
|
|
1150
1266
|
//#endregion
|
|
1151
|
-
export { AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionRoot, type AccordionRootProps, AccordionTrigger, type AccordionTriggerProps, AlertDialogPanel, type AlertDialogPanelProps, type Align, Button, type ButtonProps, Checkbox, type CheckboxProps, ComboboxGroup, ComboboxGroupLabel, type ComboboxGroupLabelProps, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxPopover, type ComboboxPopoverProps, ComboboxRoot, type ComboboxRootProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, Composite, CompositeItem, type CompositeItemProps, type CompositeProps, CompositeProvider, type CompositeProviderProps, CompositeRow, type CompositeRowProps, DialogDescription, type DialogDescriptionProps, DialogDisclosure, type DialogDisclosureProps, DialogDismiss, type DialogDismissProps, DialogHeading, type DialogHeadingProps, DialogPanel, type DialogPanelProps, DialogRoot, type DialogRootProps, DisclosureContent, type DisclosureContentProps, DisclosureRoot, type DisclosureRootProps, DisclosureTrigger, type DisclosureTriggerProps, type FocusableWhenDisabledOptions, type FocusableWhenDisabledProps, FormCheckbox, type FormCheckboxProps, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormErrors, FormField, type FormFieldProps, FormGroup, FormGroupLabel, type FormGroupLabelProps, type FormGroupProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormProvider, FormPush, type FormPushProps, FormRadio, FormRadioGroup, type FormRadioGroupProps, type FormRadioProps, FormRemove, type FormRemoveProps, FormReset, type FormResetProps, FormRoot, type FormRootProps, FormSelect, type FormSelectProps, type FormStoreInstance, type FormStoreOptions, FormSubmit, type FormSubmitProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, MenuButtonArrow, type MenuButtonArrowProps, MenuItem, MenuItemCheckbox, type MenuItemCheckboxProps, type MenuItemProps, MenuItemRadio, type MenuItemRadioProps, MenuPopover, type MenuPopoverProps, MenuRoot, type MenuRootProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MenubarContainer, type MenubarContainerProps, MenubarRoot, type MenubarRootProps, Meter, type MeterProps, type OffsetArgs, type OffsetValue, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroupRoot, type RadioGroupRootProps, type RadioProps, type RovingTabindexOptions, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectPopover, type SelectPopoverProps, SelectRoot, type SelectRootProps, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, type Side, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabsRoot, type TabsRootProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, ToolbarButton, type ToolbarButtonProps, ToolbarContainer, type ToolbarContainerProps, ToolbarRoot, type ToolbarRootProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipAnchor, type TooltipAnchorProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, type UseFloatingOptions, type ValidateOn, useCommandState, useControllableState, useDialogClose, useEnterLeave, useFieldValue, useFloating, useFocusVisible, useFocusableWhenDisabled, useFormContext, useFormStore, useId, useMenubarContext, useRadioGroupContext, useRovingTabindex, useScrollActiveDescendantIntoView };
|
|
1267
|
+
export { AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionRoot, type AccordionRootProps, AccordionTrigger, type AccordionTriggerProps, AlertDialogPanel, type AlertDialogPanelProps, type Align, Button, type ButtonProps, Checkbox, type CheckboxProps, ComboboxGroup, ComboboxGroupLabel, type ComboboxGroupLabelProps, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxPopover, type ComboboxPopoverProps, ComboboxRoot, type ComboboxRootProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, Composite, CompositeItem, type CompositeItemProps, type CompositeProps, CompositeProvider, type CompositeProviderProps, CompositeRow, type CompositeRowProps, DialogDescription, type DialogDescriptionProps, DialogDisclosure, type DialogDisclosureProps, DialogDismiss, type DialogDismissProps, DialogHeading, type DialogHeadingProps, DialogPanel, type DialogPanelProps, DialogRoot, type DialogRootProps, DisclosureContent, type DisclosureContentProps, DisclosureRoot, type DisclosureRootProps, DisclosureTrigger, type DisclosureTriggerProps, type FocusableWhenDisabledOptions, type FocusableWhenDisabledProps, FormCheckbox, type FormCheckboxProps, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormErrors, FormField, type FormFieldProps, FormGroup, FormGroupLabel, type FormGroupLabelProps, type FormGroupProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormProvider, FormPush, type FormPushProps, FormRadio, FormRadioGroup, type FormRadioGroupProps, type FormRadioProps, FormRemove, type FormRemoveProps, FormReset, type FormResetProps, FormRoot, type FormRootProps, FormSelect, type FormSelectProps, type FormStoreInstance, type FormStoreOptions, FormSubmit, type FormSubmitProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, MenuButtonArrow, type MenuButtonArrowProps, MenuItem, MenuItemCheckbox, type MenuItemCheckboxProps, type MenuItemProps, MenuItemRadio, type MenuItemRadioProps, MenuPopover, type MenuPopoverProps, MenuRoot, type MenuRootProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MenubarContainer, type MenubarContainerProps, MenubarRoot, type MenubarRootProps, Meter, type MeterProps, type OffsetArgs, type OffsetValue, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroupRoot, type RadioGroupRootProps, type RadioProps, type RovingTabindexOptions, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectPopover, type SelectPopoverProps, SelectRoot, type SelectRootProps, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, type Side, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabsRoot, type TabsRootProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, ToolbarButton, type ToolbarButtonProps, ToolbarContainer, type ToolbarContainerProps, ToolbarRoot, type ToolbarRootProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipAnchor, type TooltipAnchorProps, TooltipGroup, type TooltipGroupProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipRoot, type TooltipRootProps, type UseFloatingOptions, type ValidateOn, useCommandState, useControllableState, useDialogClose, useEnterLeave, useFieldValue, useFloating, useFocusVisible, useFocusableWhenDisabled, useFormContext, useFormStore, useId, useMenubarContext, useRadioGroupContext, useRovingTabindex, useScrollActiveDescendantIntoView };
|
package/dist/index.d.ts
CHANGED
|
@@ -85,10 +85,37 @@ declare function useRovingTabindex(options?: RovingTabindexOptions): {
|
|
|
85
85
|
//#region src/hooks/use-floating.d.ts
|
|
86
86
|
/** Why an overlay's open state changed, forwarded to `onOpenChange`. */
|
|
87
87
|
type DismissReason = "escape-key" | "outside-press" | "ancestor-scroll";
|
|
88
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Dismissal behavior. `true` enables outside-press + escape-key.
|
|
90
|
+
*
|
|
91
|
+
* ## Which dismissals to delegate — the overlay policy
|
|
92
|
+
*
|
|
93
|
+
* Delegating to floating-ui's `useDismiss` gets shadow-DOM-safe,
|
|
94
|
+
* reference-aware document listeners for free, so it is the default choice.
|
|
95
|
+
* An overlay keeps a dismissal for ITSELF only when closing also has to move
|
|
96
|
+
* focus, because the keydown handler is where the focus target is known:
|
|
97
|
+
*
|
|
98
|
+
* | Overlay | outsidePress | escapeKey | why |
|
|
99
|
+
* | ----------------- | ------------ | --------- | -------------------------------------- |
|
|
100
|
+
* | Popover | delegated | delegated | `FloatingFocusManager` restores focus |
|
|
101
|
+
* | Tooltip | n/a | delegated | never holds focus |
|
|
102
|
+
* | Menu | delegated | OWN | Escape must refocus the trigger |
|
|
103
|
+
* | Select / Combobox | delegated | OWN | Escape keeps focus on trigger/input |
|
|
104
|
+
*
|
|
105
|
+
* `outsidePress` is delegated everywhere: the press target should receive
|
|
106
|
+
* focus, so no overlay needs to intervene. When adding an overlay, follow this
|
|
107
|
+
* table rather than inventing a third pattern — and if a new one is genuinely
|
|
108
|
+
* needed, add a row here.
|
|
109
|
+
*/
|
|
89
110
|
type DismissConfig = boolean | {
|
|
111
|
+
/** Close on a press outside the reference/floating elements. */
|
|
90
112
|
outsidePress?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Close on Escape. Set `false` when the overlay handles Escape itself
|
|
115
|
+
* because it also has to restore focus — see the table above.
|
|
116
|
+
*/
|
|
91
117
|
escapeKey?: boolean;
|
|
118
|
+
/** Close when an ancestor scroller scrolls. Off by default. */
|
|
92
119
|
ancestorScroll?: boolean;
|
|
93
120
|
};
|
|
94
121
|
/** Physical side a popup is placed on, derived from the resolved placement. */
|
|
@@ -389,9 +416,34 @@ declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & impo
|
|
|
389
416
|
/** Where a portaled overlay mounts: an element, an element id, or body. */
|
|
390
417
|
type PortalRoot = HTMLElement | string | null;
|
|
391
418
|
//#endregion
|
|
419
|
+
//#region src/internal/render-element.d.ts
|
|
420
|
+
/**
|
|
421
|
+
* The `render` prop contract: swap the element a part renders while keeping all
|
|
422
|
+
* of its behavior, props and refs. Either a React element to clone, or a
|
|
423
|
+
* function receiving the merged props.
|
|
424
|
+
*/
|
|
425
|
+
type RenderProp = ReactElement | ((props: Record<string, unknown>) => ReactElement);
|
|
426
|
+
//#endregion
|
|
392
427
|
//#region src/primitives/tooltip.d.ts
|
|
393
|
-
/** Props for `
|
|
394
|
-
interface
|
|
428
|
+
/** Props for `TooltipGroup`. */
|
|
429
|
+
interface TooltipGroupProps {
|
|
430
|
+
children: ReactNode;
|
|
431
|
+
/**
|
|
432
|
+
* How long after a tooltip in this group closes its siblings still open
|
|
433
|
+
* INSTANTLY (no show delay). Default 300ms. Set 0 to disable skipping.
|
|
434
|
+
*/
|
|
435
|
+
skipDelay?: number;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Groups sibling tooltips so moving between them does not re-pay the show
|
|
439
|
+
* delay — the APG/desktop convention for toolbars and icon rows, where waiting
|
|
440
|
+
* 700ms per button makes the row feel broken.
|
|
441
|
+
*
|
|
442
|
+
* Optional: a `TooltipProvider` outside any group keeps its own delay.
|
|
443
|
+
*/
|
|
444
|
+
declare function TooltipGroup({ children, skipDelay }: TooltipGroupProps): React$1.JSX.Element;
|
|
445
|
+
/** Props for `TooltipRoot`. */
|
|
446
|
+
interface TooltipRootProps {
|
|
395
447
|
children: ReactNode;
|
|
396
448
|
timeout?: number;
|
|
397
449
|
showTimeout?: number;
|
|
@@ -403,8 +455,27 @@ interface TooltipProviderProps {
|
|
|
403
455
|
/** Portal mount target (element or element id). Defaults to document.body. */
|
|
404
456
|
portalRoot?: PortalRoot;
|
|
405
457
|
}
|
|
406
|
-
/**
|
|
407
|
-
|
|
458
|
+
/**
|
|
459
|
+
* Owns ONE tooltip: its open state, delays, placement and portal.
|
|
460
|
+
*
|
|
461
|
+
* Wrap several of these in a {@link TooltipGroup} to share a skip-delay window.
|
|
462
|
+
*/
|
|
463
|
+
declare function TooltipRoot({ children, timeout, showTimeout, hideTimeout, placement, animated, portal, portalRoot }: TooltipRootProps): React$1.JSX.Element;
|
|
464
|
+
/**
|
|
465
|
+
* Props for `TooltipProvider`.
|
|
466
|
+
*
|
|
467
|
+
* @deprecated Use `TooltipRootProps`.
|
|
468
|
+
*/
|
|
469
|
+
type TooltipProviderProps = TooltipRootProps;
|
|
470
|
+
/**
|
|
471
|
+
* A single tooltip.
|
|
472
|
+
*
|
|
473
|
+
* @deprecated Renamed to {@link TooltipRoot}. Despite the name this component
|
|
474
|
+
* never provided anything to a subtree of tooltips — it IS one tooltip. The
|
|
475
|
+
* delay-sharing provider is {@link TooltipGroup}. Kept as an alias for
|
|
476
|
+
* back-compat; scheduled for removal in the next major.
|
|
477
|
+
*/
|
|
478
|
+
declare const TooltipProvider: typeof TooltipRoot;
|
|
408
479
|
/** Props for `TooltipAnchor`. */
|
|
409
480
|
interface TooltipAnchorProps extends ComponentPropsWithoutRef<"div"> {
|
|
410
481
|
/** Render a custom element instead of a wrapper div. The element receives tooltip props. */
|
|
@@ -412,9 +483,12 @@ interface TooltipAnchorProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
412
483
|
}
|
|
413
484
|
declare const TooltipAnchor: React$1.ForwardRefExoticComponent<TooltipAnchorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
414
485
|
/** Props for `Tooltip`. */
|
|
415
|
-
interface TooltipProps extends ComponentPropsWithoutRef<"div"> {
|
|
486
|
+
interface TooltipProps extends ComponentPropsWithoutRef<"div"> {
|
|
487
|
+
/** Render a custom element instead of the default `div`. */
|
|
488
|
+
render?: RenderProp;
|
|
489
|
+
}
|
|
416
490
|
/** Renders the `Tooltip` component. */
|
|
417
|
-
declare function Tooltip({ children, onMouseEnter, onMouseLeave, ...props }: TooltipProps): React$1.JSX.Element | null;
|
|
491
|
+
declare function Tooltip({ children, onMouseEnter, onMouseLeave, render, ...props }: TooltipProps): React$1.JSX.Element | null;
|
|
418
492
|
//#endregion
|
|
419
493
|
//#region src/primitives/popover.d.ts
|
|
420
494
|
/** Props for `PopoverRoot`. */
|
|
@@ -448,9 +522,12 @@ declare function PopoverRoot({ children, open: controlledOpen, defaultOpen, onOp
|
|
|
448
522
|
interface PopoverTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
449
523
|
declare const PopoverTrigger: import("react").ForwardRefExoticComponent<PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
450
524
|
/** Props for `PopoverContent`. */
|
|
451
|
-
interface PopoverContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
525
|
+
interface PopoverContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
526
|
+
/** Render a custom element instead of the default `div`. */
|
|
527
|
+
render?: RenderProp;
|
|
528
|
+
}
|
|
452
529
|
/** Renders the `PopoverContent` component. */
|
|
453
|
-
declare function PopoverContent({ children, ...props }: PopoverContentProps): import("react").JSX.Element | null;
|
|
530
|
+
declare function PopoverContent({ children, render, ...props }: PopoverContentProps): import("react").JSX.Element | null;
|
|
454
531
|
/** Props for `PopoverClose`. */
|
|
455
532
|
interface PopoverCloseProps extends ComponentPropsWithoutRef<"button"> {}
|
|
456
533
|
declare const PopoverClose: import("react").ForwardRefExoticComponent<PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -468,6 +545,12 @@ interface SelectRootProps {
|
|
|
468
545
|
setValue?: (value: string | string[]) => void;
|
|
469
546
|
/** Allow selecting more than one option. The value becomes a `string[]`. */
|
|
470
547
|
multiple?: boolean;
|
|
548
|
+
/**
|
|
549
|
+
* Present the current value without allowing changes. Unlike `disabled` the
|
|
550
|
+
* trigger stays focusable and the listbox still OPENS and can be browsed —
|
|
551
|
+
* only committing a new value is blocked. Reflected as `aria-readonly`.
|
|
552
|
+
*/
|
|
553
|
+
readOnly?: boolean;
|
|
471
554
|
/** Form field name. Renders hidden input(s) so the value submits with a form. */
|
|
472
555
|
name?: string;
|
|
473
556
|
open?: boolean;
|
|
@@ -482,7 +565,7 @@ interface SelectRootProps {
|
|
|
482
565
|
portalRoot?: PortalRoot;
|
|
483
566
|
}
|
|
484
567
|
/** Renders the `SelectRoot` component. */
|
|
485
|
-
declare function SelectRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, multiple, name, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: SelectRootProps): import("react").JSX.Element;
|
|
568
|
+
declare function SelectRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, multiple, readOnly, name, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: SelectRootProps): import("react").JSX.Element;
|
|
486
569
|
/** Props for `SelectLabel`. */
|
|
487
570
|
interface SelectLabelProps extends ComponentPropsWithoutRef<"label"> {}
|
|
488
571
|
/** Renders the `SelectLabel` component. */
|
|
@@ -491,9 +574,12 @@ declare function SelectLabel(props: SelectLabelProps): import("react").JSX.Eleme
|
|
|
491
574
|
interface SelectTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
492
575
|
declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
493
576
|
/** Props for `SelectPopover`. */
|
|
494
|
-
interface SelectPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
577
|
+
interface SelectPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
578
|
+
/** Render a custom element instead of the default `div`. */
|
|
579
|
+
render?: RenderProp;
|
|
580
|
+
}
|
|
495
581
|
/** Renders the `SelectPopover` component. */
|
|
496
|
-
declare function SelectPopover({ children, ...props }: SelectPopoverProps): import("react").JSX.Element | null;
|
|
582
|
+
declare function SelectPopover({ children, render, ...props }: SelectPopoverProps): import("react").JSX.Element | null;
|
|
497
583
|
/** Props for `SelectItem`. */
|
|
498
584
|
interface SelectItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
499
585
|
value: string;
|
|
@@ -512,6 +598,13 @@ interface ComboboxRootProps {
|
|
|
512
598
|
onValueChange?: (value: string) => void;
|
|
513
599
|
/** @deprecated Use `onValueChange`. */
|
|
514
600
|
setValue?: (value: string) => void;
|
|
601
|
+
/**
|
|
602
|
+
* Present the current value without allowing changes. Unlike `disabled` the
|
|
603
|
+
* input stays focusable and the listbox still OPENS and can be browsed —
|
|
604
|
+
* only editing the query and committing a new value are blocked. Reflected
|
|
605
|
+
* as the input's native `readonly` plus `aria-readonly`.
|
|
606
|
+
*/
|
|
607
|
+
readOnly?: boolean;
|
|
515
608
|
open?: boolean;
|
|
516
609
|
/** Called when the open state changes. */
|
|
517
610
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -524,14 +617,17 @@ interface ComboboxRootProps {
|
|
|
524
617
|
portalRoot?: PortalRoot;
|
|
525
618
|
}
|
|
526
619
|
/** Renders the `ComboboxRoot` component. */
|
|
527
|
-
declare function ComboboxRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: ComboboxRootProps): import("react").JSX.Element;
|
|
620
|
+
declare function ComboboxRoot({ children, value: controlledValue, defaultValue, onValueChange, setValue: setValueDeprecated, readOnly, open: controlledOpen, onOpenChange, setOpen: setOpenDeprecated, animated, portal, portalRoot }: ComboboxRootProps): import("react").JSX.Element;
|
|
528
621
|
/** Props for `ComboboxInput`. */
|
|
529
622
|
interface ComboboxInputProps extends Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange"> {}
|
|
530
623
|
declare const ComboboxInput: import("react").ForwardRefExoticComponent<ComboboxInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
531
624
|
/** Props for `ComboboxPopover`. */
|
|
532
|
-
interface ComboboxPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
625
|
+
interface ComboboxPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
626
|
+
/** Render a custom element instead of the default `div`. */
|
|
627
|
+
render?: RenderProp;
|
|
628
|
+
}
|
|
533
629
|
/** Renders the `ComboboxPopover` component. */
|
|
534
|
-
declare function ComboboxPopover({ children, ...props }: ComboboxPopoverProps): import("react").JSX.Element | null;
|
|
630
|
+
declare function ComboboxPopover({ children, render, ...props }: ComboboxPopoverProps): import("react").JSX.Element | null;
|
|
535
631
|
/** Props for `ComboboxItem`. */
|
|
536
632
|
interface ComboboxItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
537
633
|
value: string;
|
|
@@ -588,7 +684,15 @@ interface CommandGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
588
684
|
declare function CommandGroup({ heading, children, ...props }: CommandGroupProps): import("react").JSX.Element;
|
|
589
685
|
/** Props for `CommandSeparator`. */
|
|
590
686
|
interface CommandSeparatorProps extends ComponentPropsWithoutRef<"div"> {}
|
|
591
|
-
/**
|
|
687
|
+
/**
|
|
688
|
+
* Renders the `CommandSeparator` component.
|
|
689
|
+
*
|
|
690
|
+
* Rendered with `role="presentation"`: the separator is a child of
|
|
691
|
+
* `CommandList` (`role="listbox"`), whose only permitted children are `option`
|
|
692
|
+
* and `group`. A real `role="separator"` there fails
|
|
693
|
+
* `aria-required-children` and corrupts the option count announced by screen
|
|
694
|
+
* readers. (Menu separators keep `role="separator"` — `menu` permits it.)
|
|
695
|
+
*/
|
|
592
696
|
declare function CommandSeparator(props: CommandSeparatorProps): import("react").JSX.Element;
|
|
593
697
|
/** Props for `CommandItem`. */
|
|
594
698
|
interface CommandItemProps extends Omit<ComponentPropsWithoutRef<"div">, "onSelect"> {
|
|
@@ -646,9 +750,12 @@ declare function MenuRoot({ children, open: controlledOpen, onOpenChange, setOpe
|
|
|
646
750
|
interface MenuTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
647
751
|
declare const MenuTrigger: import("react").ForwardRefExoticComponent<MenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
648
752
|
/** Props for `MenuPopover`. */
|
|
649
|
-
interface MenuPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
753
|
+
interface MenuPopoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
754
|
+
/** Render a custom element instead of the default `div`. */
|
|
755
|
+
render?: RenderProp;
|
|
756
|
+
}
|
|
650
757
|
/** Renders the `MenuPopover` component. */
|
|
651
|
-
declare function MenuPopover({ children, onKeyDown, ...props }: MenuPopoverProps): import("react").JSX.Element | null;
|
|
758
|
+
declare function MenuPopover({ children, onKeyDown, render, ...props }: MenuPopoverProps): import("react").JSX.Element | null;
|
|
652
759
|
/** Props for `MenuItem`. */
|
|
653
760
|
interface MenuItemProps extends ComponentPropsWithoutRef<"div"> {
|
|
654
761
|
disabled?: boolean;
|
|
@@ -907,9 +1014,18 @@ interface AccordionTriggerProps extends ComponentPropsWithoutRef<"button"> {}
|
|
|
907
1014
|
/** Renders the `AccordionTrigger` component. */
|
|
908
1015
|
declare function AccordionTrigger({ onClick, disabled, ...props }: AccordionTriggerProps): import("react").JSX.Element;
|
|
909
1016
|
/** Props for `AccordionContent`. */
|
|
910
|
-
interface AccordionContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
1017
|
+
interface AccordionContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
1018
|
+
/**
|
|
1019
|
+
* When collapsed, keep the content in the DOM as `hidden="until-found"`
|
|
1020
|
+
* (instead of unmounting) so browser find-in-page can reveal it. Chromium
|
|
1021
|
+
* progressive enhancement; disables the enter/leave animation for this
|
|
1022
|
+
* content. On reveal a `beforematch` event expands the item so state stays
|
|
1023
|
+
* consistent.
|
|
1024
|
+
*/
|
|
1025
|
+
hiddenUntilFound?: boolean;
|
|
1026
|
+
}
|
|
911
1027
|
/** Renders the `AccordionContent` component. */
|
|
912
|
-
declare function AccordionContent({ style, ...props }: AccordionContentProps): import("react").JSX.Element | null;
|
|
1028
|
+
declare function AccordionContent({ hiddenUntilFound, style, ...props }: AccordionContentProps): import("react").JSX.Element | null;
|
|
913
1029
|
//#endregion
|
|
914
1030
|
//#region src/form/form-store.d.ts
|
|
915
1031
|
/** Field name → error message map. Keys can be dot-paths (e.g. "items.0"). */
|
|
@@ -1148,4 +1264,4 @@ interface FormGroupLabelProps extends ComponentPropsWithoutRef<"legend"> {}
|
|
|
1148
1264
|
/** Renders the `FormGroupLabel` component. */
|
|
1149
1265
|
declare function FormGroupLabel(props: FormGroupLabelProps): import("react").JSX.Element;
|
|
1150
1266
|
//#endregion
|
|
1151
|
-
export { AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionRoot, type AccordionRootProps, AccordionTrigger, type AccordionTriggerProps, AlertDialogPanel, type AlertDialogPanelProps, type Align, Button, type ButtonProps, Checkbox, type CheckboxProps, ComboboxGroup, ComboboxGroupLabel, type ComboboxGroupLabelProps, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxPopover, type ComboboxPopoverProps, ComboboxRoot, type ComboboxRootProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, Composite, CompositeItem, type CompositeItemProps, type CompositeProps, CompositeProvider, type CompositeProviderProps, CompositeRow, type CompositeRowProps, DialogDescription, type DialogDescriptionProps, DialogDisclosure, type DialogDisclosureProps, DialogDismiss, type DialogDismissProps, DialogHeading, type DialogHeadingProps, DialogPanel, type DialogPanelProps, DialogRoot, type DialogRootProps, DisclosureContent, type DisclosureContentProps, DisclosureRoot, type DisclosureRootProps, DisclosureTrigger, type DisclosureTriggerProps, type FocusableWhenDisabledOptions, type FocusableWhenDisabledProps, FormCheckbox, type FormCheckboxProps, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormErrors, FormField, type FormFieldProps, FormGroup, FormGroupLabel, type FormGroupLabelProps, type FormGroupProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormProvider, FormPush, type FormPushProps, FormRadio, FormRadioGroup, type FormRadioGroupProps, type FormRadioProps, FormRemove, type FormRemoveProps, FormReset, type FormResetProps, FormRoot, type FormRootProps, FormSelect, type FormSelectProps, type FormStoreInstance, type FormStoreOptions, FormSubmit, type FormSubmitProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, MenuButtonArrow, type MenuButtonArrowProps, MenuItem, MenuItemCheckbox, type MenuItemCheckboxProps, type MenuItemProps, MenuItemRadio, type MenuItemRadioProps, MenuPopover, type MenuPopoverProps, MenuRoot, type MenuRootProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MenubarContainer, type MenubarContainerProps, MenubarRoot, type MenubarRootProps, Meter, type MeterProps, type OffsetArgs, type OffsetValue, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroupRoot, type RadioGroupRootProps, type RadioProps, type RovingTabindexOptions, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectPopover, type SelectPopoverProps, SelectRoot, type SelectRootProps, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, type Side, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabsRoot, type TabsRootProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, ToolbarButton, type ToolbarButtonProps, ToolbarContainer, type ToolbarContainerProps, ToolbarRoot, type ToolbarRootProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipAnchor, type TooltipAnchorProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, type UseFloatingOptions, type ValidateOn, useCommandState, useControllableState, useDialogClose, useEnterLeave, useFieldValue, useFloating, useFocusVisible, useFocusableWhenDisabled, useFormContext, useFormStore, useId, useMenubarContext, useRadioGroupContext, useRovingTabindex, useScrollActiveDescendantIntoView };
|
|
1267
|
+
export { AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionRoot, type AccordionRootProps, AccordionTrigger, type AccordionTriggerProps, AlertDialogPanel, type AlertDialogPanelProps, type Align, Button, type ButtonProps, Checkbox, type CheckboxProps, ComboboxGroup, ComboboxGroupLabel, type ComboboxGroupLabelProps, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxPopover, type ComboboxPopoverProps, ComboboxRoot, type ComboboxRootProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, Composite, CompositeItem, type CompositeItemProps, type CompositeProps, CompositeProvider, type CompositeProviderProps, CompositeRow, type CompositeRowProps, DialogDescription, type DialogDescriptionProps, DialogDisclosure, type DialogDisclosureProps, DialogDismiss, type DialogDismissProps, DialogHeading, type DialogHeadingProps, DialogPanel, type DialogPanelProps, DialogRoot, type DialogRootProps, DisclosureContent, type DisclosureContentProps, DisclosureRoot, type DisclosureRootProps, DisclosureTrigger, type DisclosureTriggerProps, type FocusableWhenDisabledOptions, type FocusableWhenDisabledProps, FormCheckbox, type FormCheckboxProps, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormErrors, FormField, type FormFieldProps, FormGroup, FormGroupLabel, type FormGroupLabelProps, type FormGroupProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormProvider, FormPush, type FormPushProps, FormRadio, FormRadioGroup, type FormRadioGroupProps, type FormRadioProps, FormRemove, type FormRemoveProps, FormReset, type FormResetProps, FormRoot, type FormRootProps, FormSelect, type FormSelectProps, type FormStoreInstance, type FormStoreOptions, FormSubmit, type FormSubmitProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, MenuButtonArrow, type MenuButtonArrowProps, MenuItem, MenuItemCheckbox, type MenuItemCheckboxProps, type MenuItemProps, MenuItemRadio, type MenuItemRadioProps, MenuPopover, type MenuPopoverProps, MenuRoot, type MenuRootProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MenubarContainer, type MenubarContainerProps, MenubarRoot, type MenubarRootProps, Meter, type MeterProps, type OffsetArgs, type OffsetValue, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroupRoot, type RadioGroupRootProps, type RadioProps, type RovingTabindexOptions, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectPopover, type SelectPopoverProps, SelectRoot, type SelectRootProps, SelectTrigger, type SelectTriggerProps, Separator, type SeparatorProps, type Side, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabsRoot, type TabsRootProps, Toggle, ToggleGroup, type ToggleGroupProps, type ToggleProps, ToolbarButton, type ToolbarButtonProps, ToolbarContainer, type ToolbarContainerProps, ToolbarRoot, type ToolbarRootProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, TooltipAnchor, type TooltipAnchorProps, TooltipGroup, type TooltipGroupProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipRoot, type TooltipRootProps, type UseFloatingOptions, type ValidateOn, useCommandState, useControllableState, useDialogClose, useEnterLeave, useFieldValue, useFloating, useFocusVisible, useFocusableWhenDisabled, useFormContext, useFormStore, useId, useMenubarContext, useRadioGroupContext, useRovingTabindex, useScrollActiveDescendantIntoView };
|