@wistia/ui 0.23.0 → 0.24.0-beta.69711dfb.bc58919
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.d.ts +192 -79
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1140 -999
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -5,17 +5,10 @@ import * as _$styled_components0 from "styled-components";
|
|
|
5
5
|
import { css } from "styled-components";
|
|
6
6
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
7
|
import { FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, ImageDimensionsValidator, PersistentFileAmountLimitValidator } from "use-file-picker/validators";
|
|
8
|
-
import { CollapsibleContentProps } from "@radix-ui/react-collapsible";
|
|
9
8
|
import { Color } from "culori/fn";
|
|
10
|
-
import { ToggleGroupSingleProps } from "@radix-ui/react-toggle-group";
|
|
11
|
-
import * as _$_radix_ui_react_popover0 from "@radix-ui/react-popover";
|
|
12
|
-
import { Anchor, Close, PopoverContentProps as PopoverContentProps$1, Portal, Root as Root$2, Trigger as Trigger$1 } from "@radix-ui/react-popover";
|
|
13
9
|
import * as Ariakit from "@ariakit/react";
|
|
14
|
-
import { DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps } from "@radix-ui/react-dropdown-menu";
|
|
15
10
|
import { Schema } from "yup";
|
|
16
|
-
import { HoverCardContentProps } from "@radix-ui/react-hover-card";
|
|
17
11
|
import ReactMarkdown from "react-markdown";
|
|
18
|
-
import { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps } from "@radix-ui/react-tabs";
|
|
19
12
|
import { ExtractContentTypeFromConfig, FilePickerReturnTypes, ImperativeFilePickerReturnTypes, UseFilePickerConfig, useImperativeFilePickerConfig } from "use-file-picker/types";
|
|
20
13
|
export * from "use-file-picker/types";
|
|
21
14
|
|
|
@@ -617,7 +610,7 @@ declare const ActionButton: _$react.ForwardRefExoticComponent<(Omit<{
|
|
|
617
610
|
* Changes the secondary icon for different use cases
|
|
618
611
|
*/
|
|
619
612
|
variant?: "default" | "gated" | "menu-down" | "menu-up";
|
|
620
|
-
} & Omit<ButtonAsButtonProps, "variant" | "
|
|
613
|
+
} & Omit<ButtonAsButtonProps, "variant" | "isLoading" | "leftIcon" | "fullWidth" | "unstyled" | "rightIcon" | "size">, "ref"> | Omit<{
|
|
621
614
|
/**
|
|
622
615
|
* @override
|
|
623
616
|
* The text to display for the ActionButton
|
|
@@ -646,7 +639,7 @@ declare const ActionButton: _$react.ForwardRefExoticComponent<(Omit<{
|
|
|
646
639
|
* Changes the secondary icon for different use cases
|
|
647
640
|
*/
|
|
648
641
|
variant?: "default" | "gated" | "menu-down" | "menu-up";
|
|
649
|
-
} & Omit<ButtonAsLinkProps, "variant" | "
|
|
642
|
+
} & Omit<ButtonAsLinkProps, "variant" | "isLoading" | "leftIcon" | "fullWidth" | "unstyled" | "rightIcon" | "size">, "ref">) & _$react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
650
643
|
//#endregion
|
|
651
644
|
//#region src/components/Avatar/Avatar.d.ts
|
|
652
645
|
type AvatarInstanceType = 'image' | 'initials';
|
|
@@ -1341,7 +1334,7 @@ type CollapsibleTriggerProps = {
|
|
|
1341
1334
|
* A trigger element that will toggle the collapsible content.
|
|
1342
1335
|
* Usually a [Button](?path=/docs/components-button--docs).
|
|
1343
1336
|
*/
|
|
1344
|
-
children:
|
|
1337
|
+
children: ReactElement;
|
|
1345
1338
|
};
|
|
1346
1339
|
declare const CollapsibleTrigger: ({
|
|
1347
1340
|
children
|
|
@@ -1657,7 +1650,7 @@ declare const CollapsibleTriggerIcon: {
|
|
|
1657
1650
|
};
|
|
1658
1651
|
//#endregion
|
|
1659
1652
|
//#region src/components/Collapsible/CollapsibleContent.d.ts
|
|
1660
|
-
type CollapsibleContentProps
|
|
1653
|
+
type CollapsibleContentProps = {
|
|
1661
1654
|
/**
|
|
1662
1655
|
* The number of lines to clamp the content to when `Collapsible` is closed.
|
|
1663
1656
|
*/
|
|
@@ -1665,12 +1658,12 @@ type CollapsibleContentProps$1 = {
|
|
|
1665
1658
|
/**
|
|
1666
1659
|
* The content that will be hidden when `Collapsible` is closed.
|
|
1667
1660
|
*/
|
|
1668
|
-
children:
|
|
1661
|
+
children: ReactNode;
|
|
1669
1662
|
};
|
|
1670
1663
|
declare const CollapsibleContent: ({
|
|
1671
1664
|
clamp,
|
|
1672
1665
|
children
|
|
1673
|
-
}: CollapsibleContentProps
|
|
1666
|
+
}: CollapsibleContentProps) => _$react_jsx_runtime0.JSX.Element;
|
|
1674
1667
|
//#endregion
|
|
1675
1668
|
//#region src/components/ColorPicker/ColorGrid.d.ts
|
|
1676
1669
|
type ColorGridProps = PropsWithChildren & {
|
|
@@ -2040,7 +2033,7 @@ declare const ContextMenu: ({
|
|
|
2040
2033
|
side,
|
|
2041
2034
|
onRequestClose,
|
|
2042
2035
|
compact
|
|
2043
|
-
}: ContextMenuProps) => _$react_jsx_runtime0.JSX.Element
|
|
2036
|
+
}: ContextMenuProps) => _$react_jsx_runtime0.JSX.Element;
|
|
2044
2037
|
//#endregion
|
|
2045
2038
|
//#region src/components/CustomizableThemeWrapper/CustomizableThemeWrapper.d.ts
|
|
2046
2039
|
type CustomizableTokens = '--wui-color-backdrop' | '--wui-color-bg-app' | '--wui-color-bg-fill-active' | '--wui-color-bg-fill-hover' | '--wui-color-bg-fill-white ' | '--wui-color-bg-fill' | '--wui-color-bg-surface-active' | '--wui-color-bg-surface-disabled' | '--wui-color-bg-surface-hover' | '--wui-color-bg-surface-secondary-active' | '--wui-color-bg-surface-secondary-hover' | '--wui-color-bg-surface-secondary' | '--wui-color-bg-surface-selected-active' | '--wui-color-bg-surface-selected-hover' | '--wui-color-bg-surface-selected' | '--wui-color-bg-surface-tertiary' | '--wui-color-bg-surface' | '--wui-color-bg-tooltip' | '--wui-color-border-active-selected' | '--wui-color-border-active' | '--wui-color-border-disabled' | '--wui-color-border-hover-selected' | '--wui-color-border-hover' | '--wui-color-border-secondary-active' | '--wui-color-border-secondary-hover' | '--wui-color-border-secondary' | '--wui-color-border-selected' | '--wui-color-border' | '--wui-color-drop-shadow' | '--wui-color-focus-color' | '--wui-color-focus-ring-disabled' | '--wui-color-focus-ring' | '--wui-color-icon-disabled' | '--wui-color-icon-on-fill' | '--wui-color-icon-selected' | '--wui-color-icon' | '--wui-color-invalid-indicator' | '--wui-color-notification-pill-color' | '--wui-color-segmented-control-checked-background' | '--wui-color-text-button' | '--wui-color-text-disabled' | '--wui-color-text-link' | '--wui-color-text-on-fill-white-selected' | '--wui-color-text-on-fill' | '--wui-color-text-secondary' | '--wui-color-text-selected' | '--wui-color-text' | '--wui-typography-family-brand' | '--wui-typography-family-default' | '--wui-typography-family-mono' | '--wui-typography-weight-body-bold' | '--wui-typography-weight-body' | '--wui-typography-weight-heading' | '--wui-typography-weight-label-bold' | '--wui-typography-weight-label';
|
|
@@ -3114,8 +3107,7 @@ type GridProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
3114
3107
|
declare const Grid: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, GridProps>) => _$react.ReactElement | null) & UnknownRecord;
|
|
3115
3108
|
//#endregion
|
|
3116
3109
|
//#region src/components/PreviewCard/PreviewCard.d.ts
|
|
3117
|
-
type
|
|
3118
|
-
type PreviewCardProps = ContentProps$1 & {
|
|
3110
|
+
type PreviewCardProps = {
|
|
3119
3111
|
/**
|
|
3120
3112
|
* The content of the preview card
|
|
3121
3113
|
*/
|
|
@@ -3132,7 +3124,7 @@ type PreviewCardProps = ContentProps$1 & {
|
|
|
3132
3124
|
* The [Link](?path=/docs/components-link--docs) that opens the preview card when hovered.
|
|
3133
3125
|
* Preview cards should only be used on links—do not use on non-interactive elements (e.g. buttons or plain text).
|
|
3134
3126
|
*/
|
|
3135
|
-
trigger:
|
|
3127
|
+
trigger: ReactElement;
|
|
3136
3128
|
/**
|
|
3137
3129
|
* If true, the preview card will use the unstyled Content component instead of StyledContent
|
|
3138
3130
|
*/
|
|
@@ -3155,6 +3147,14 @@ type PreviewCardProps = ContentProps$1 & {
|
|
|
3155
3147
|
* Force the preview card to be open without user interaction (for debugging and CI)
|
|
3156
3148
|
*/
|
|
3157
3149
|
forceOpen?: boolean;
|
|
3150
|
+
/**
|
|
3151
|
+
* The preferred side of the trigger to render on
|
|
3152
|
+
*/
|
|
3153
|
+
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
3154
|
+
/**
|
|
3155
|
+
* The preferred alignment against the trigger
|
|
3156
|
+
*/
|
|
3157
|
+
align?: 'center' | 'end' | 'start';
|
|
3158
3158
|
};
|
|
3159
3159
|
/**
|
|
3160
3160
|
* Preview cards reveal content on hover. **Everything in the card must also exist at the destination**—never put information only in the preview. This pattern is for sighted-only, so treat the card as a preview, not a source of truth.
|
|
@@ -3171,6 +3171,8 @@ declare const PreviewCard: {
|
|
|
3171
3171
|
closeDelay,
|
|
3172
3172
|
colorScheme,
|
|
3173
3173
|
forceOpen,
|
|
3174
|
+
side,
|
|
3175
|
+
align,
|
|
3174
3176
|
...props
|
|
3175
3177
|
}: PreviewCardProps): JSX.Element;
|
|
3176
3178
|
displayName: string;
|
|
@@ -3200,7 +3202,7 @@ declare const IconButton: _$react.ForwardRefExoticComponent<(Omit<{
|
|
|
3200
3202
|
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
3201
3203
|
*/
|
|
3202
3204
|
children: JSX.Element;
|
|
3203
|
-
} & Omit<ButtonAsButtonProps, "
|
|
3205
|
+
} & Omit<ButtonAsButtonProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref"> | Omit<{
|
|
3204
3206
|
/**
|
|
3205
3207
|
* Accessible text for screen readers.
|
|
3206
3208
|
*/
|
|
@@ -3209,7 +3211,7 @@ declare const IconButton: _$react.ForwardRefExoticComponent<(Omit<{
|
|
|
3209
3211
|
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
3210
3212
|
*/
|
|
3211
3213
|
children: JSX.Element;
|
|
3212
|
-
} & Omit<ButtonAsLinkProps, "
|
|
3214
|
+
} & Omit<ButtonAsLinkProps, "leftIcon" | "fullWidth" | "rightIcon">, "ref">) & _$react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
3213
3215
|
//#endregion
|
|
3214
3216
|
//#region src/components/Image/Image.d.ts
|
|
3215
3217
|
type ImageProps = ComponentPropsWithoutRef<'img'> & {
|
|
@@ -3289,7 +3291,7 @@ type InputClickToCopyProps = Omit<InputProps, 'autoSelect' | 'disabled' | 'right
|
|
|
3289
3291
|
/**
|
|
3290
3292
|
* Provides a readonly input that copies the text to the clipboard when clicked.
|
|
3291
3293
|
*/
|
|
3292
|
-
declare const InputClickToCopy: _$react.ForwardRefExoticComponent<Omit<InputProps, "type" | "
|
|
3294
|
+
declare const InputClickToCopy: _$react.ForwardRefExoticComponent<Omit<InputProps, "type" | "disabled" | "rightIcon" | "value" | "autoSelect"> & {
|
|
3293
3295
|
/**
|
|
3294
3296
|
* When disabled, the copy action will not be triggered
|
|
3295
3297
|
*/
|
|
@@ -3499,10 +3501,6 @@ type MenuProps = MenuControlProps & {
|
|
|
3499
3501
|
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
3500
3502
|
*/
|
|
3501
3503
|
label?: string;
|
|
3502
|
-
/**
|
|
3503
|
-
* Callback for when the user clicks or focuses outside of the menu
|
|
3504
|
-
*/
|
|
3505
|
-
onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
|
|
3506
3504
|
/**
|
|
3507
3505
|
* The side the menu appears on, relative to the trigger
|
|
3508
3506
|
*/
|
|
@@ -3624,7 +3622,7 @@ type MenuItemButtonProps = ButtonProps & {
|
|
|
3624
3622
|
};
|
|
3625
3623
|
//#endregion
|
|
3626
3624
|
//#region src/components/Menu/MenuItem.d.ts
|
|
3627
|
-
declare const MenuItem: _$react.ForwardRefExoticComponent<(Omit<
|
|
3625
|
+
declare const MenuItem: _$react.ForwardRefExoticComponent<(Omit<BaseButtonProps & _$react.ClassAttributes<HTMLButtonElement> & _$react.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
3628
3626
|
href?: never;
|
|
3629
3627
|
type?: "button" | "reset" | "submit";
|
|
3630
3628
|
children: _$react.ReactNode;
|
|
@@ -3646,7 +3644,16 @@ declare const MenuItem: _$react.ForwardRefExoticComponent<(Omit<DropdownMenuItem
|
|
|
3646
3644
|
* Treats the menu item as a link when provided
|
|
3647
3645
|
*/
|
|
3648
3646
|
href?: MenuItemButtonProps["href"];
|
|
3649
|
-
|
|
3647
|
+
/**
|
|
3648
|
+
* Whether the menu should close when this item is clicked
|
|
3649
|
+
* @default true
|
|
3650
|
+
*/
|
|
3651
|
+
closeOnClick?: boolean;
|
|
3652
|
+
/**
|
|
3653
|
+
* Callback when the item is selected
|
|
3654
|
+
*/
|
|
3655
|
+
onSelect?: (event: SyntheticEvent) => void;
|
|
3656
|
+
}, "ref"> | Omit<BaseButtonProps & _$react.ClassAttributes<HTMLAnchorElement> & _$react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
3650
3657
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
3651
3658
|
children: _$react.ReactNode;
|
|
3652
3659
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -3682,7 +3689,16 @@ declare const MenuItem: _$react.ForwardRefExoticComponent<(Omit<DropdownMenuItem
|
|
|
3682
3689
|
* Treats the menu item as a link when provided
|
|
3683
3690
|
*/
|
|
3684
3691
|
href?: MenuItemButtonProps["href"];
|
|
3685
|
-
|
|
3692
|
+
/**
|
|
3693
|
+
* Whether the menu should close when this item is clicked
|
|
3694
|
+
* @default true
|
|
3695
|
+
*/
|
|
3696
|
+
closeOnClick?: boolean;
|
|
3697
|
+
/**
|
|
3698
|
+
* Callback when the item is selected
|
|
3699
|
+
*/
|
|
3700
|
+
onSelect?: (event: SyntheticEvent) => void;
|
|
3701
|
+
}, "ref"> | Omit<BaseButtonProps & _$react.ClassAttributes<HTMLAnchorElement> & _$react.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
3686
3702
|
beforeAction?: (() => Promise<void>) | (() => void);
|
|
3687
3703
|
children: _$react.ReactNode;
|
|
3688
3704
|
colorScheme?: ColorSchemeTypes;
|
|
@@ -3724,6 +3740,15 @@ declare const MenuItem: _$react.ForwardRefExoticComponent<(Omit<DropdownMenuItem
|
|
|
3724
3740
|
* Treats the menu item as a link when provided
|
|
3725
3741
|
*/
|
|
3726
3742
|
href?: MenuItemButtonProps["href"];
|
|
3743
|
+
/**
|
|
3744
|
+
* Whether the menu should close when this item is clicked
|
|
3745
|
+
* @default true
|
|
3746
|
+
*/
|
|
3747
|
+
closeOnClick?: boolean;
|
|
3748
|
+
/**
|
|
3749
|
+
* Callback when the item is selected
|
|
3750
|
+
*/
|
|
3751
|
+
onSelect?: (event: SyntheticEvent) => void;
|
|
3727
3752
|
}, "ref">) & _$react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
3728
3753
|
//#endregion
|
|
3729
3754
|
//#region src/components/Menu/MenuItemLabel.d.ts
|
|
@@ -3749,15 +3774,19 @@ declare const MenuItemDescription: ({
|
|
|
3749
3774
|
}: MenuItemDescriptionProps) => _$react_jsx_runtime0.JSX.Element;
|
|
3750
3775
|
//#endregion
|
|
3751
3776
|
//#region src/components/Menu/MenuRadioGroup.d.ts
|
|
3752
|
-
type MenuRadioGroupProps =
|
|
3777
|
+
type MenuRadioGroupProps = {
|
|
3753
3778
|
/**
|
|
3754
3779
|
* The radio items
|
|
3755
3780
|
*/
|
|
3756
3781
|
children: ReactNode | ReactNode[];
|
|
3757
3782
|
/**
|
|
3758
|
-
*
|
|
3783
|
+
* The value of the selected radio item
|
|
3759
3784
|
*/
|
|
3760
|
-
|
|
3785
|
+
value?: string;
|
|
3786
|
+
/**
|
|
3787
|
+
* Callback when the value changes
|
|
3788
|
+
*/
|
|
3789
|
+
onValueChange?: (value: string) => void;
|
|
3761
3790
|
};
|
|
3762
3791
|
declare const MenuRadioGroup: {
|
|
3763
3792
|
({
|
|
@@ -3768,7 +3797,7 @@ declare const MenuRadioGroup: {
|
|
|
3768
3797
|
};
|
|
3769
3798
|
//#endregion
|
|
3770
3799
|
//#region src/components/Menu/RadioMenuItem.d.ts
|
|
3771
|
-
type RadioMenuItemProps =
|
|
3800
|
+
type RadioMenuItemProps = MenuItemButtonProps & {
|
|
3772
3801
|
/**
|
|
3773
3802
|
* Optional `Icon` to use as the indicator that the radio item is selected. Must be an instance of [Icon](../?path=/docs/components-icon--docs)
|
|
3774
3803
|
*/
|
|
@@ -3776,7 +3805,7 @@ type RadioMenuItemProps = DropdownMenuRadioItemProps & MenuItemButtonProps & {
|
|
|
3776
3805
|
/**
|
|
3777
3806
|
* The value of the item
|
|
3778
3807
|
*/
|
|
3779
|
-
value:
|
|
3808
|
+
value: string;
|
|
3780
3809
|
/**
|
|
3781
3810
|
* @ignore
|
|
3782
3811
|
*/
|
|
@@ -3789,6 +3818,10 @@ type RadioMenuItemProps = DropdownMenuRadioItemProps & MenuItemButtonProps & {
|
|
|
3789
3818
|
* @ignore
|
|
3790
3819
|
*/
|
|
3791
3820
|
ref?: never;
|
|
3821
|
+
/**
|
|
3822
|
+
* Callback when the item is selected
|
|
3823
|
+
*/
|
|
3824
|
+
onSelect?: (event: SyntheticEvent) => void;
|
|
3792
3825
|
};
|
|
3793
3826
|
declare const RadioMenuItem: {
|
|
3794
3827
|
({
|
|
@@ -3801,7 +3834,7 @@ declare const RadioMenuItem: {
|
|
|
3801
3834
|
};
|
|
3802
3835
|
//#endregion
|
|
3803
3836
|
//#region src/components/Menu/CheckboxMenuItem.d.ts
|
|
3804
|
-
type CheckboxMenuItemProps =
|
|
3837
|
+
type CheckboxMenuItemProps = MenuItemButtonProps & {
|
|
3805
3838
|
/** Callback to fire when the checked status changes */onCheckedChange: (checked: boolean) => void;
|
|
3806
3839
|
/**
|
|
3807
3840
|
* Optional `Icon` to use as the indicator that the checkbox item is selected. Must be an instance of [Icon](../?path=/docs/components-icon--docs)
|
|
@@ -3823,6 +3856,10 @@ type CheckboxMenuItemProps = DropdownMenuCheckboxItemProps & MenuItemButtonProps
|
|
|
3823
3856
|
* @ignore
|
|
3824
3857
|
*/
|
|
3825
3858
|
ref?: never;
|
|
3859
|
+
/**
|
|
3860
|
+
* Callback when the item is selected
|
|
3861
|
+
*/
|
|
3862
|
+
onSelect?: (event: SyntheticEvent) => void;
|
|
3826
3863
|
};
|
|
3827
3864
|
declare const CheckboxMenuItem: {
|
|
3828
3865
|
({
|
|
@@ -4067,8 +4104,7 @@ type UncontrolledPopoverProps = {
|
|
|
4067
4104
|
onOpenChange?: never;
|
|
4068
4105
|
};
|
|
4069
4106
|
type PopoverControlProps = ControlledPopoverProps | UncontrolledPopoverProps;
|
|
4070
|
-
type
|
|
4071
|
-
type PopoverProps = ContentProps & PopoverControlProps & {
|
|
4107
|
+
type PopoverProps = PopoverControlProps & {
|
|
4072
4108
|
/**
|
|
4073
4109
|
* The content of the popover
|
|
4074
4110
|
*/
|
|
@@ -4092,13 +4128,13 @@ type PopoverProps = ContentProps & PopoverControlProps & {
|
|
|
4092
4128
|
/**
|
|
4093
4129
|
* An interactive element. Most commonly a [Button](?path=/docs/components-button--docs) or [IconButton]([Button](?path=/docs/components-iconbutton--docs)).
|
|
4094
4130
|
*/
|
|
4095
|
-
trigger:
|
|
4131
|
+
trigger: ReactElement;
|
|
4096
4132
|
/**
|
|
4097
4133
|
* If true, the popover will use the unstyled Content component instead of StyledContent
|
|
4098
4134
|
*/
|
|
4099
4135
|
unstyled?: boolean;
|
|
4100
4136
|
/**
|
|
4101
|
-
* If true, the popover will use a custom
|
|
4137
|
+
* If true, the popover will use a custom arrow on the trigger
|
|
4102
4138
|
*/
|
|
4103
4139
|
withArrow?: boolean;
|
|
4104
4140
|
/**
|
|
@@ -4110,13 +4146,24 @@ type PopoverProps = ContentProps & PopoverControlProps & {
|
|
|
4110
4146
|
* Inline styles applied to the popover popup
|
|
4111
4147
|
*/
|
|
4112
4148
|
style?: CSSProperties;
|
|
4149
|
+
/**
|
|
4150
|
+
* The preferred side of the trigger to render on
|
|
4151
|
+
*/
|
|
4152
|
+
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
4153
|
+
/**
|
|
4154
|
+
* The preferred alignment against the trigger
|
|
4155
|
+
*/
|
|
4156
|
+
align?: 'center' | 'end' | 'start';
|
|
4157
|
+
/**
|
|
4158
|
+
* Whether the trigger should be treated as a native button (default: true)
|
|
4159
|
+
*/
|
|
4160
|
+
nativeButton?: boolean;
|
|
4113
4161
|
};
|
|
4114
4162
|
/**
|
|
4115
4163
|
* Displays rich content in a portal, triggered by a button.
|
|
4116
4164
|
*
|
|
4117
|
-
* For more control — custom anchor,
|
|
4118
|
-
*
|
|
4119
|
-
* primitives directly: `PopoverRoot`, `PopoverTrigger`, `PopoverAnchor`,
|
|
4165
|
+
* For more control — custom anchor, no injected close button, etc. — compose
|
|
4166
|
+
* the primitives directly: `PopoverRoot`, `PopoverTrigger`, `PopoverAnchor`,
|
|
4120
4167
|
* `PopoverPortal`, `PopoverContent`, `PopoverClose`.
|
|
4121
4168
|
*/
|
|
4122
4169
|
declare const Popover: {
|
|
@@ -4133,19 +4180,31 @@ declare const Popover: {
|
|
|
4133
4180
|
isAnimated,
|
|
4134
4181
|
colorScheme,
|
|
4135
4182
|
style,
|
|
4183
|
+
side,
|
|
4184
|
+
align,
|
|
4185
|
+
nativeButton,
|
|
4136
4186
|
...props
|
|
4137
4187
|
}: PopoverProps): JSX.Element;
|
|
4138
4188
|
displayName: string;
|
|
4139
4189
|
};
|
|
4140
4190
|
//#endregion
|
|
4141
4191
|
//#region src/components/Popover/PopoverAnchor.d.ts
|
|
4142
|
-
type PopoverAnchorProps =
|
|
4192
|
+
type PopoverAnchorProps = {
|
|
4193
|
+
children: ReactNode;
|
|
4194
|
+
};
|
|
4143
4195
|
/**
|
|
4144
4196
|
* Positions the popover relative to an element other than the trigger. Useful
|
|
4145
4197
|
* when the element the user interacts with (e.g. a text input) is separate
|
|
4146
4198
|
* from what the popover attaches to.
|
|
4199
|
+
*
|
|
4200
|
+
* Wrap the anchor element and nest `PopoverTrigger` inside it.
|
|
4147
4201
|
*/
|
|
4148
|
-
declare const PopoverAnchor:
|
|
4202
|
+
declare const PopoverAnchor: {
|
|
4203
|
+
({
|
|
4204
|
+
children
|
|
4205
|
+
}: PopoverAnchorProps): JSX.Element;
|
|
4206
|
+
displayName: string;
|
|
4207
|
+
};
|
|
4149
4208
|
//#endregion
|
|
4150
4209
|
//#region src/components/Popover/PopoverArrow.d.ts
|
|
4151
4210
|
type PopoverArrowProps = {
|
|
@@ -4162,13 +4221,25 @@ declare const PopoverArrow: {
|
|
|
4162
4221
|
};
|
|
4163
4222
|
//#endregion
|
|
4164
4223
|
//#region src/components/Popover/PopoverClose.d.ts
|
|
4165
|
-
type PopoverCloseProps = ComponentPropsWithoutRef<
|
|
4224
|
+
type PopoverCloseProps = Omit<ComponentPropsWithoutRef<'button'>, 'render'> & {
|
|
4225
|
+
/**
|
|
4226
|
+
* A React element to merge close behavior onto.
|
|
4227
|
+
* When provided, the close button renders this element instead of a plain `<button>`.
|
|
4228
|
+
*/
|
|
4229
|
+
render?: ReactElement;
|
|
4230
|
+
};
|
|
4166
4231
|
/**
|
|
4167
4232
|
* An element that closes the popover when activated. Defaults to a `<button>`;
|
|
4168
|
-
* pass `
|
|
4233
|
+
* pass `render` to merge the close behavior onto a single child element. For
|
|
4169
4234
|
* a pre-styled icon close button, use `PopoverCloseButton`.
|
|
4170
4235
|
*/
|
|
4171
|
-
declare const PopoverClose: _$react.ForwardRefExoticComponent<Omit<_$
|
|
4236
|
+
declare const PopoverClose: _$react.ForwardRefExoticComponent<Omit<Omit<_$react.DetailedHTMLProps<_$react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "render"> & {
|
|
4237
|
+
/**
|
|
4238
|
+
* A React element to merge close behavior onto.
|
|
4239
|
+
* When provided, the close button renders this element instead of a plain `<button>`.
|
|
4240
|
+
*/
|
|
4241
|
+
render?: ReactElement;
|
|
4242
|
+
} & _$react.RefAttributes<HTMLButtonElement>>;
|
|
4172
4243
|
//#endregion
|
|
4173
4244
|
//#region src/components/Popover/PopoverCloseButton.d.ts
|
|
4174
4245
|
type PopoverCloseButtonProps = {
|
|
@@ -4186,44 +4257,48 @@ declare const PopoverCloseButton: {
|
|
|
4186
4257
|
};
|
|
4187
4258
|
//#endregion
|
|
4188
4259
|
//#region src/components/Popover/PopoverContent.d.ts
|
|
4189
|
-
type PopoverContentProps =
|
|
4260
|
+
type PopoverContentProps = {
|
|
4190
4261
|
/** Sets the [color scheme](/docs/color-schemes) applied inside the portal. */colorScheme?: ColorSchemeTypes; /** Remove the default surface styling (padding, background, border, etc.). */
|
|
4191
4262
|
unstyled?: boolean; /** Applied as `max-width` on the popover surface. Pass `"none"` to uncap. */
|
|
4192
4263
|
maxWidth?: string; /** Applied as `max-height` on the popover surface. Pass `"none"` to uncap. */
|
|
4193
|
-
maxHeight?: string;
|
|
4264
|
+
maxHeight?: string; /** Which side of the trigger to render the popover on. */
|
|
4265
|
+
side?: 'bottom' | 'left' | 'right' | 'top'; /** How to align the popover relative to the specified side. */
|
|
4266
|
+
align?: 'center' | 'end' | 'start'; /** Distance between the anchor and the popup in pixels. */
|
|
4267
|
+
sideOffset?: number; /** Inline styles applied to the popup. */
|
|
4268
|
+
style?: CSSProperties; /** The popover content. */
|
|
4269
|
+
children?: React.ReactNode; /** Role applied to the popup element. */
|
|
4270
|
+
role?: string;
|
|
4194
4271
|
};
|
|
4195
4272
|
/**
|
|
4196
4273
|
* The styled popover surface. Place inside a `PopoverRoot` (typically wrapped
|
|
4197
|
-
* in a `PopoverPortal`).
|
|
4198
|
-
* dismissal/focus event handlers such as `onPointerDownOutside`,
|
|
4199
|
-
* `onOpenAutoFocus`, and `onCloseAutoFocus`.
|
|
4274
|
+
* in a `PopoverPortal`). Wraps a `Positioner` and `Popup` internally.
|
|
4200
4275
|
*/
|
|
4201
|
-
declare const PopoverContent: _$react.ForwardRefExoticComponent<
|
|
4202
|
-
/** Sets the [color scheme](/docs/color-schemes) applied inside the portal. */colorScheme?: ColorSchemeTypes; /** Remove the default surface styling (padding, background, border, etc.). */
|
|
4203
|
-
unstyled?: boolean; /** Applied as `max-width` on the popover surface. Pass `"none"` to uncap. */
|
|
4204
|
-
maxWidth?: string; /** Applied as `max-height` on the popover surface. Pass `"none"` to uncap. */
|
|
4205
|
-
maxHeight?: string;
|
|
4206
|
-
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
4276
|
+
declare const PopoverContent: _$react.ForwardRefExoticComponent<PopoverContentProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
4207
4277
|
//#endregion
|
|
4208
4278
|
//#region src/components/Popover/PopoverPortal.d.ts
|
|
4209
|
-
type PopoverPortalProps =
|
|
4279
|
+
type PopoverPortalProps = {
|
|
4280
|
+
children: ReactNode;
|
|
4281
|
+
};
|
|
4210
4282
|
/**
|
|
4211
4283
|
* Portals the popover content out of the DOM hierarchy of its trigger so it can
|
|
4212
4284
|
* escape clipping ancestors (`overflow: hidden`, transformed containers, etc.).
|
|
4213
4285
|
*/
|
|
4214
4286
|
declare const PopoverPortal: {
|
|
4215
|
-
(
|
|
4287
|
+
({
|
|
4288
|
+
children
|
|
4289
|
+
}: PopoverPortalProps): JSX.Element;
|
|
4216
4290
|
displayName: string;
|
|
4217
4291
|
};
|
|
4218
4292
|
//#endregion
|
|
4219
4293
|
//#region src/components/Popover/PopoverRoot.d.ts
|
|
4220
|
-
type
|
|
4221
|
-
type PopoverRootProps = Omit<RadixRootProps, 'open'> & {
|
|
4294
|
+
type PopoverRootProps = {
|
|
4222
4295
|
/**
|
|
4223
4296
|
* Controlled open state. When provided, pair with `onOpenChange` to update it.
|
|
4224
|
-
* Leave unset for uncontrolled behavior
|
|
4297
|
+
* Leave unset for uncontrolled behavior.
|
|
4225
4298
|
*/
|
|
4226
|
-
isOpen?: boolean;
|
|
4299
|
+
isOpen?: boolean; /** Called when the popover open state changes. */
|
|
4300
|
+
onOpenChange?: (isOpen: boolean) => void; /** The composable popover children (Trigger, Portal, etc.). */
|
|
4301
|
+
children: ReactNode;
|
|
4227
4302
|
};
|
|
4228
4303
|
/**
|
|
4229
4304
|
* The root of a composable popover. Wrap `PopoverTrigger` (or `PopoverAnchor`)
|
|
@@ -4234,19 +4309,44 @@ type PopoverRootProps = Omit<RadixRootProps, 'open'> & {
|
|
|
4234
4309
|
declare const PopoverRoot: {
|
|
4235
4310
|
({
|
|
4236
4311
|
isOpen,
|
|
4237
|
-
|
|
4312
|
+
onOpenChange,
|
|
4313
|
+
children
|
|
4238
4314
|
}: PopoverRootProps): JSX.Element;
|
|
4239
4315
|
displayName: string;
|
|
4240
4316
|
};
|
|
4241
4317
|
//#endregion
|
|
4242
4318
|
//#region src/components/Popover/PopoverTrigger.d.ts
|
|
4243
|
-
type PopoverTriggerProps = ComponentPropsWithoutRef<
|
|
4319
|
+
type PopoverTriggerProps = Omit<ComponentPropsWithoutRef<'button'>, 'render'> & {
|
|
4320
|
+
/**
|
|
4321
|
+
* A React element to merge trigger behavior onto.
|
|
4322
|
+
* When provided, the trigger renders this element instead of a plain `<button>`.
|
|
4323
|
+
*/
|
|
4324
|
+
render?: ReactElement;
|
|
4325
|
+
/**
|
|
4326
|
+
* Whether the trigger should be treated as a native button.
|
|
4327
|
+
* Set to `false` if the rendered element is not a button (e.g. `<div>`).
|
|
4328
|
+
* @default true
|
|
4329
|
+
*/
|
|
4330
|
+
nativeButton?: boolean;
|
|
4331
|
+
};
|
|
4244
4332
|
/**
|
|
4245
4333
|
* The button that toggles the popover open and closed. By default it renders a
|
|
4246
|
-
* `<button>` wrapping its children; pass `
|
|
4334
|
+
* `<button>` wrapping its children; pass `render` to merge the trigger
|
|
4247
4335
|
* behavior onto a single child element (e.g. a `Button` or `IconButton`).
|
|
4248
4336
|
*/
|
|
4249
|
-
declare const PopoverTrigger: _$react.ForwardRefExoticComponent<Omit<_$
|
|
4337
|
+
declare const PopoverTrigger: _$react.ForwardRefExoticComponent<Omit<Omit<_$react.DetailedHTMLProps<_$react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "render"> & {
|
|
4338
|
+
/**
|
|
4339
|
+
* A React element to merge trigger behavior onto.
|
|
4340
|
+
* When provided, the trigger renders this element instead of a plain `<button>`.
|
|
4341
|
+
*/
|
|
4342
|
+
render?: ReactElement;
|
|
4343
|
+
/**
|
|
4344
|
+
* Whether the trigger should be treated as a native button.
|
|
4345
|
+
* Set to `false` if the rendered element is not a button (e.g. `<div>`).
|
|
4346
|
+
* @default true
|
|
4347
|
+
*/
|
|
4348
|
+
nativeButton?: boolean;
|
|
4349
|
+
} & _$react.RefAttributes<HTMLButtonElement>>;
|
|
4250
4350
|
//#endregion
|
|
4251
4351
|
//#region src/components/ProgressBar/ProgressBar.d.ts
|
|
4252
4352
|
type ProgressBarProps = ComponentPropsWithoutRef<'div'> & {
|
|
@@ -4602,7 +4702,7 @@ declare const ScrollArea: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLD
|
|
|
4602
4702
|
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
4603
4703
|
//#endregion
|
|
4604
4704
|
//#region src/components/SegmentedControl/SegmentedControl.d.ts
|
|
4605
|
-
type SegmentedControlProps =
|
|
4705
|
+
type SegmentedControlProps = {
|
|
4606
4706
|
/**
|
|
4607
4707
|
* `SegmentedControlItem`s that will be rendered in grouping
|
|
4608
4708
|
*/
|
|
@@ -4631,7 +4731,7 @@ type SegmentedControlProps = Omit<ToggleGroupSingleProps, 'type'> & {
|
|
|
4631
4731
|
/**
|
|
4632
4732
|
* Provides a horizontal set of segments for switching between different values
|
|
4633
4733
|
*/
|
|
4634
|
-
declare const SegmentedControl: ForwardRefExoticComponent<RefAttributes<HTMLDivElement> & SegmentedControlProps
|
|
4734
|
+
declare const SegmentedControl: ForwardRefExoticComponent<RefAttributes<HTMLDivElement> & SegmentedControlProps & HTMLAttributes<HTMLDivElement>>;
|
|
4635
4735
|
//#endregion
|
|
4636
4736
|
//#region src/components/SegmentedControl/SegmentedControlItem.d.ts
|
|
4637
4737
|
type BaseProps$1 = {
|
|
@@ -4816,7 +4916,7 @@ type SliderProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
|
|
|
4816
4916
|
* (e.g. on mouseup, touchend, or keyup). Useful for analytics or
|
|
4817
4917
|
* expensive operations where only the final value matters.
|
|
4818
4918
|
*/
|
|
4819
|
-
|
|
4919
|
+
onValueCommitted?: (value: number[]) => void;
|
|
4820
4920
|
/**
|
|
4821
4921
|
* Value to be added or subtracted on each step
|
|
4822
4922
|
*/
|
|
@@ -4836,7 +4936,7 @@ declare const Slider: {
|
|
|
4836
4936
|
max,
|
|
4837
4937
|
min,
|
|
4838
4938
|
onChange,
|
|
4839
|
-
|
|
4939
|
+
onValueCommitted,
|
|
4840
4940
|
step,
|
|
4841
4941
|
value,
|
|
4842
4942
|
"data-testid": dataTestId,
|
|
@@ -5123,7 +5223,12 @@ declare const TableRow: ({
|
|
|
5123
5223
|
}: TableRowProps) => JSX.Element;
|
|
5124
5224
|
//#endregion
|
|
5125
5225
|
//#region src/components/Tabs/Tabs.d.ts
|
|
5126
|
-
type TabsProps
|
|
5226
|
+
type TabsProps = {
|
|
5227
|
+
children?: React.ReactNode;
|
|
5228
|
+
defaultValue?: string;
|
|
5229
|
+
onValueChange?: (value: string) => void;
|
|
5230
|
+
value?: string;
|
|
5231
|
+
};
|
|
5127
5232
|
declare const Tabs: {
|
|
5128
5233
|
({
|
|
5129
5234
|
children,
|
|
@@ -5131,22 +5236,27 @@ declare const Tabs: {
|
|
|
5131
5236
|
onValueChange: onValueChangeProp,
|
|
5132
5237
|
defaultValue,
|
|
5133
5238
|
...props
|
|
5134
|
-
}: TabsProps
|
|
5239
|
+
}: TabsProps): JSX.Element;
|
|
5135
5240
|
displayName: string;
|
|
5136
5241
|
};
|
|
5137
5242
|
//#endregion
|
|
5138
5243
|
//#region src/components/Tabs/TabsContent.d.ts
|
|
5139
|
-
type TabsContentProps
|
|
5244
|
+
type TabsContentProps = {
|
|
5245
|
+
children?: ReactNode;
|
|
5246
|
+
value: string;
|
|
5247
|
+
};
|
|
5140
5248
|
declare const TabsContent: {
|
|
5141
5249
|
({
|
|
5142
5250
|
children,
|
|
5143
5251
|
value
|
|
5144
|
-
}: TabsContentProps
|
|
5252
|
+
}: TabsContentProps): JSX.Element;
|
|
5145
5253
|
displayName: string;
|
|
5146
5254
|
};
|
|
5147
5255
|
//#endregion
|
|
5148
5256
|
//#region src/components/Tabs/TabsList.d.ts
|
|
5149
|
-
type TabsListProps
|
|
5257
|
+
type TabsListProps = {
|
|
5258
|
+
'aria-label'?: string;
|
|
5259
|
+
} & PropsWithChildren<{
|
|
5150
5260
|
fullWidth?: boolean;
|
|
5151
5261
|
}>;
|
|
5152
5262
|
declare const TabsList: {
|
|
@@ -5154,12 +5264,15 @@ declare const TabsList: {
|
|
|
5154
5264
|
children,
|
|
5155
5265
|
fullWidth,
|
|
5156
5266
|
...props
|
|
5157
|
-
}: TabsListProps
|
|
5267
|
+
}: TabsListProps): JSX.Element;
|
|
5158
5268
|
displayName: string;
|
|
5159
5269
|
};
|
|
5160
5270
|
//#endregion
|
|
5161
5271
|
//#region src/components/Tabs/TabsTrigger.d.ts
|
|
5162
|
-
type BaseProps =
|
|
5272
|
+
type BaseProps = {
|
|
5273
|
+
disabled?: boolean;
|
|
5274
|
+
value: string;
|
|
5275
|
+
};
|
|
5163
5276
|
type IconWithLabel = {
|
|
5164
5277
|
/**
|
|
5165
5278
|
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
@@ -5190,8 +5303,8 @@ type NoIcon = {
|
|
|
5190
5303
|
label?: ReactNode | string;
|
|
5191
5304
|
'aria-label'?: never;
|
|
5192
5305
|
};
|
|
5193
|
-
type TabsTriggerProps
|
|
5194
|
-
declare const TabsTrigger: _$react.ForwardRefExoticComponent<TabsTriggerProps
|
|
5306
|
+
type TabsTriggerProps = BaseProps & (IconWithAriaLabel | IconWithLabel | NoIcon);
|
|
5307
|
+
declare const TabsTrigger: _$react.ForwardRefExoticComponent<TabsTriggerProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
5195
5308
|
//#endregion
|
|
5196
5309
|
//#region src/components/Tag/Tag.d.ts
|
|
5197
5310
|
type TagProps = ComponentPropsWithoutRef<'div'> & {
|