@wistia/ui 0.5.7 → 0.6.0-beta.1ca5cd23.8077d2d

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.mts CHANGED
@@ -1,10 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
4
+ import * as react_router from 'react-router';
4
5
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
5
6
  import { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
6
7
  import * as styled_components from 'styled-components';
7
8
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
9
+ import { PopoverContentProps } from '@radix-ui/react-popover';
8
10
  import { ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
9
11
 
10
12
  type UIProviderProps = {
@@ -260,7 +262,7 @@ type BaseButtonProps = {
260
262
  */
261
263
  variant?: ButtonVariants;
262
264
  };
263
- type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & {
265
+ type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & LinkProps & {
264
266
  href: string | undefined;
265
267
  children: ReactNode;
266
268
  /**
@@ -286,7 +288,63 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
286
288
  * action, or performing a delete operation. It replaces the HTML `<button>` element,
287
289
  * unless an `href` attribute is passed, in which it will render an `<a>` element.
288
290
  */
289
- declare const Button: react.ForwardRefExoticComponent<(Omit<ButtonAsLinkProps, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
291
+ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
292
+ ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
293
+ } & {
294
+ beforeAction?: (() => Promise<void>) | (() => void);
295
+ children: ReactNode;
296
+ colorScheme?: ColorSchemeTypes;
297
+ disabled?: boolean;
298
+ leftIcon?: JSX.Element | undefined;
299
+ rightIcon?: JSX.Element | undefined;
300
+ type?: LinkTypes | undefined;
301
+ underline?: boolean;
302
+ } & Omit<react_router.LinkProps, "to"> & {
303
+ href: string | undefined;
304
+ type?: LinkTypes;
305
+ } & {
306
+ href: string | undefined;
307
+ children: ReactNode;
308
+ /**
309
+ * This just allows pathrough to beforeAction for link
310
+ * @ignore
311
+ */
312
+ beforeAction?: (() => Promise<void>) | (() => void);
313
+ /**
314
+ * This just allows pathrough to beforeAction for link
315
+ * @ignore
316
+ */
317
+ type?: LinkTypes;
318
+ }, "ref"> | Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
319
+ ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
320
+ } & {
321
+ beforeAction?: (() => Promise<void>) | (() => void);
322
+ children: ReactNode;
323
+ colorScheme?: ColorSchemeTypes;
324
+ disabled?: boolean;
325
+ leftIcon?: JSX.Element | undefined;
326
+ rightIcon?: JSX.Element | undefined;
327
+ type?: LinkTypes | undefined;
328
+ underline?: boolean;
329
+ } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
330
+ ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
331
+ } & {
332
+ href?: never;
333
+ type?: "button" | "reset" | "submit";
334
+ } & {
335
+ href: string | undefined;
336
+ children: ReactNode;
337
+ /**
338
+ * This just allows pathrough to beforeAction for link
339
+ * @ignore
340
+ */
341
+ beforeAction?: (() => Promise<void>) | (() => void);
342
+ /**
343
+ * This just allows pathrough to beforeAction for link
344
+ * @ignore
345
+ */
346
+ type?: LinkTypes;
347
+ }, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
290
348
 
291
349
  type ToastProps = ComponentPropsWithoutRef<'div'> & {
292
350
  /**
@@ -622,13 +680,18 @@ type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
622
680
  * Force ButtonGroup to fill the width of it's container
623
681
  */
624
682
  fullWidth?: boolean;
683
+ /**
684
+ * If true, the button group will collapse to a single column on small screens
685
+ * and the buttons will be stacked on top of each other.
686
+ */
687
+ collapseOnSmallScreens?: boolean;
625
688
  };
626
689
  /**
627
690
  * ButtonGroup is a layout component that groups buttons together,
628
691
  * with a standardized gap between them.
629
692
  */
630
693
  declare const ButtonGroup: {
631
- ({ children, align, fullWidth, ...otherProps }: ButtonGroupProps): JSX.Element | null;
694
+ ({ children, align, fullWidth, collapseOnSmallScreens, ...otherProps }: ButtonGroupProps): JSX.Element | null;
632
695
  displayName: string;
633
696
  };
634
697
 
@@ -984,6 +1047,11 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
984
1047
  * The action to be performed when the form is submitted. It can be asynchronous.
985
1048
  */
986
1049
  action?: Action;
1050
+ /**
1051
+ * Sets the default label position for all `FormFields` within the form. Will be ignored if labelPosition
1052
+ * is set on the `FormField` itself.
1053
+ */
1054
+ labelPosition?: 'block' | 'inline';
987
1055
  /**
988
1056
  * The form elements used in the form
989
1057
  */
@@ -1009,7 +1077,7 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
1009
1077
  * x
1010
1078
  */
1011
1079
  declare const FormComponent: {
1012
- <T>({ children, action, values, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1080
+ <T>({ children, action, values, labelPosition, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1013
1081
  displayName: string;
1014
1082
  };
1015
1083
  declare const Form: <T>(props: FormProps<T> & {
@@ -1046,12 +1114,16 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
1046
1114
  * A value that overrides the basic value. This should pair with `onChange`.
1047
1115
  */
1048
1116
  value?: string;
1117
+ /**
1118
+ * Setting to `inline` will have the label and input appear on the same line. Setting to `block` will have the label above the input.
1119
+ */
1120
+ labelPosition?: 'block' | 'inline';
1049
1121
  };
1050
1122
  /**
1051
1123
  * Component description goes here
1052
1124
  */
1053
1125
  declare const FormField: {
1054
- ({ children, label, name, error, value, ...props }: FormFieldProps): JSX.Element;
1126
+ ({ children, label, name, error, value, labelPosition, id, ...props }: FormFieldProps): JSX.Element;
1055
1127
  displayName: string;
1056
1128
  };
1057
1129
 
@@ -1627,6 +1699,57 @@ type MenuItemButtonProps = ButtonProps & {
1627
1699
 
1628
1700
  declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1629
1701
  ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1702
+ } & {
1703
+ beforeAction?: (() => Promise<void>) | (() => void);
1704
+ children: react.ReactNode;
1705
+ colorScheme?: ColorSchemeTypes;
1706
+ disabled?: boolean;
1707
+ leftIcon?: react.JSX.Element | undefined;
1708
+ rightIcon?: react.JSX.Element | undefined;
1709
+ type?: LinkTypes | undefined;
1710
+ underline?: boolean;
1711
+ } & Omit<react_router.LinkProps, "to"> & {
1712
+ href: string | undefined;
1713
+ type?: LinkTypes;
1714
+ } & {
1715
+ href: string | undefined;
1716
+ children: react.ReactNode;
1717
+ beforeAction?: (() => Promise<void>) | (() => void);
1718
+ type?: LinkTypes;
1719
+ } & {
1720
+ appearance?: "dangerous" | "default" | "gated";
1721
+ badge?: react.JSX.Element;
1722
+ children?: react.ReactNode;
1723
+ command?: react.ReactNode;
1724
+ icon?: ButtonProps["leftIcon"];
1725
+ leftIcon?: ButtonProps["leftIcon"];
1726
+ rightIcon?: ButtonProps["rightIcon"];
1727
+ fullWidth?: never;
1728
+ asChild?: never;
1729
+ variant?: never;
1730
+ size?: never;
1731
+ unstyled?: never;
1732
+ } & {
1733
+ /**
1734
+ * Treats the menu item as a link when provided
1735
+ */
1736
+ href?: MenuItemButtonProps["href"];
1737
+ }, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1738
+ ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1739
+ } & {
1740
+ beforeAction?: (() => Promise<void>) | (() => void);
1741
+ children: react.ReactNode;
1742
+ colorScheme?: ColorSchemeTypes;
1743
+ disabled?: boolean;
1744
+ leftIcon?: react.JSX.Element | undefined;
1745
+ rightIcon?: react.JSX.Element | undefined;
1746
+ type?: LinkTypes | undefined;
1747
+ underline?: boolean;
1748
+ } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1749
+ ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
1750
+ } & {
1751
+ href?: never;
1752
+ type?: "button" | "reset" | "submit";
1630
1753
  } & {
1631
1754
  href: string | undefined;
1632
1755
  children: react.ReactNode;
@@ -1913,6 +2036,45 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
1913
2036
  width?: string;
1914
2037
  } & react.RefAttributes<HTMLDivElement>>;
1915
2038
 
2039
+ type ControlledPopoverProps = {
2040
+ /**
2041
+ * Is the popover open.
2042
+ * Must be used with `onOpenChange`.
2043
+ * */
2044
+ isOpen: boolean;
2045
+ /** When an attempt to toggle the popover is triggered.
2046
+ * Must be used with `isOpen`.
2047
+ */
2048
+ onOpenChange: (isOpen: boolean) => void;
2049
+ };
2050
+ type UncontrolledPopoverProps = {
2051
+ isOpen?: never;
2052
+ onOpenChange?: never;
2053
+ };
2054
+ type PopoverControlProps = ControlledPopoverProps | UncontrolledPopoverProps;
2055
+ type ContentProps = Omit<PopoverContentProps, 'alignOffset' | 'arrowPadding' | 'asChild' | 'collisionPadding' | 'hideWhenDetached' | 'sideOffset' | 'updatePositionStrategy'>;
2056
+ type PopoverProps = ContentProps & PopoverControlProps & {
2057
+ /**
2058
+ * The content of the popover
2059
+ */
2060
+ children: ReactNode;
2061
+ /**
2062
+ * Determines if the close button is visible (if false, `esc` will still close the Modal)
2063
+ */
2064
+ hideCloseButton?: boolean;
2065
+ /**
2066
+ * An interactive element. Most commonly a [Button](?path=/docs/components-button--docs) or [IconButton]([Button](?path=/docs/components-iconbutton--docs)).
2067
+ * */
2068
+ trigger: JSX.Element;
2069
+ };
2070
+ /**
2071
+ * Displays rich content in a portal, triggered by a button.
2072
+ */
2073
+ declare const Popover: {
2074
+ ({ children, trigger, isOpen, hideCloseButton, onOpenChange, ...props }: PopoverProps): JSX.Element;
2075
+ displayName: string;
2076
+ };
2077
+
1916
2078
  type RadioProps = ComponentPropsWithoutRef<'input'> & {
1917
2079
  /**
1918
2080
  * Indicates the state of the radio
@@ -2380,7 +2542,7 @@ type SelectOptionProps = {
2380
2542
  */
2381
2543
  children: ReactNode;
2382
2544
  /**
2383
- * The value to set
2545
+ * The value to set. Leave this empty to define a placeholder option.
2384
2546
  */
2385
2547
  value: string;
2386
2548
  /**
@@ -2405,4 +2567,4 @@ type SelectOptionGroupProps = {
2405
2567
  };
2406
2568
  declare const SelectOptionGroup: ({ children, label, ...props }: SelectOptionGroupProps) => react_jsx_runtime.JSX.Element;
2407
2569
 
2408
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tab, type TabProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
2570
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tab, type TabProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
4
+ import * as react_router from 'react-router';
4
5
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
5
6
  import { CollapsibleContentProps as CollapsibleContentProps$1 } from '@radix-ui/react-collapsible';
6
7
  import * as styled_components from 'styled-components';
7
8
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
9
+ import { PopoverContentProps } from '@radix-ui/react-popover';
8
10
  import { ToggleGroupSingleProps } from '@radix-ui/react-toggle-group';
9
11
 
10
12
  type UIProviderProps = {
@@ -260,7 +262,7 @@ type BaseButtonProps = {
260
262
  */
261
263
  variant?: ButtonVariants;
262
264
  };
263
- type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & {
265
+ type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & LinkProps & {
264
266
  href: string | undefined;
265
267
  children: ReactNode;
266
268
  /**
@@ -286,7 +288,63 @@ type ButtonProps = ButtonAsButtonProps | ButtonAsLinkProps;
286
288
  * action, or performing a delete operation. It replaces the HTML `<button>` element,
287
289
  * unless an `href` attribute is passed, in which it will render an `<a>` element.
288
290
  */
289
- declare const Button: react.ForwardRefExoticComponent<(Omit<ButtonAsLinkProps, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
291
+ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
292
+ ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
293
+ } & {
294
+ beforeAction?: (() => Promise<void>) | (() => void);
295
+ children: ReactNode;
296
+ colorScheme?: ColorSchemeTypes;
297
+ disabled?: boolean;
298
+ leftIcon?: JSX.Element | undefined;
299
+ rightIcon?: JSX.Element | undefined;
300
+ type?: LinkTypes | undefined;
301
+ underline?: boolean;
302
+ } & Omit<react_router.LinkProps, "to"> & {
303
+ href: string | undefined;
304
+ type?: LinkTypes;
305
+ } & {
306
+ href: string | undefined;
307
+ children: ReactNode;
308
+ /**
309
+ * This just allows pathrough to beforeAction for link
310
+ * @ignore
311
+ */
312
+ beforeAction?: (() => Promise<void>) | (() => void);
313
+ /**
314
+ * This just allows pathrough to beforeAction for link
315
+ * @ignore
316
+ */
317
+ type?: LinkTypes;
318
+ }, "ref"> | Omit<BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
319
+ ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
320
+ } & {
321
+ beforeAction?: (() => Promise<void>) | (() => void);
322
+ children: ReactNode;
323
+ colorScheme?: ColorSchemeTypes;
324
+ disabled?: boolean;
325
+ leftIcon?: JSX.Element | undefined;
326
+ rightIcon?: JSX.Element | undefined;
327
+ type?: LinkTypes | undefined;
328
+ underline?: boolean;
329
+ } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
330
+ ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
331
+ } & {
332
+ href?: never;
333
+ type?: "button" | "reset" | "submit";
334
+ } & {
335
+ href: string | undefined;
336
+ children: ReactNode;
337
+ /**
338
+ * This just allows pathrough to beforeAction for link
339
+ * @ignore
340
+ */
341
+ beforeAction?: (() => Promise<void>) | (() => void);
342
+ /**
343
+ * This just allows pathrough to beforeAction for link
344
+ * @ignore
345
+ */
346
+ type?: LinkTypes;
347
+ }, "ref"> | Omit<ButtonAsButtonProps, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
290
348
 
291
349
  type ToastProps = ComponentPropsWithoutRef<'div'> & {
292
350
  /**
@@ -622,13 +680,18 @@ type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
622
680
  * Force ButtonGroup to fill the width of it's container
623
681
  */
624
682
  fullWidth?: boolean;
683
+ /**
684
+ * If true, the button group will collapse to a single column on small screens
685
+ * and the buttons will be stacked on top of each other.
686
+ */
687
+ collapseOnSmallScreens?: boolean;
625
688
  };
626
689
  /**
627
690
  * ButtonGroup is a layout component that groups buttons together,
628
691
  * with a standardized gap between them.
629
692
  */
630
693
  declare const ButtonGroup: {
631
- ({ children, align, fullWidth, ...otherProps }: ButtonGroupProps): JSX.Element | null;
694
+ ({ children, align, fullWidth, collapseOnSmallScreens, ...otherProps }: ButtonGroupProps): JSX.Element | null;
632
695
  displayName: string;
633
696
  };
634
697
 
@@ -984,6 +1047,11 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
984
1047
  * The action to be performed when the form is submitted. It can be asynchronous.
985
1048
  */
986
1049
  action?: Action;
1050
+ /**
1051
+ * Sets the default label position for all `FormFields` within the form. Will be ignored if labelPosition
1052
+ * is set on the `FormField` itself.
1053
+ */
1054
+ labelPosition?: 'block' | 'inline';
987
1055
  /**
988
1056
  * The form elements used in the form
989
1057
  */
@@ -1009,7 +1077,7 @@ type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-labe
1009
1077
  * x
1010
1078
  */
1011
1079
  declare const FormComponent: {
1012
- <T>({ children, action, values, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1080
+ <T>({ children, action, values, labelPosition, validate, fullWidth, ...props }: FormProps<T>, forwardedRef?: Ref<HTMLFormElement>): JSX.Element;
1013
1081
  displayName: string;
1014
1082
  };
1015
1083
  declare const Form: <T>(props: FormProps<T> & {
@@ -1046,12 +1114,16 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
1046
1114
  * A value that overrides the basic value. This should pair with `onChange`.
1047
1115
  */
1048
1116
  value?: string;
1117
+ /**
1118
+ * Setting to `inline` will have the label and input appear on the same line. Setting to `block` will have the label above the input.
1119
+ */
1120
+ labelPosition?: 'block' | 'inline';
1049
1121
  };
1050
1122
  /**
1051
1123
  * Component description goes here
1052
1124
  */
1053
1125
  declare const FormField: {
1054
- ({ children, label, name, error, value, ...props }: FormFieldProps): JSX.Element;
1126
+ ({ children, label, name, error, value, labelPosition, id, ...props }: FormFieldProps): JSX.Element;
1055
1127
  displayName: string;
1056
1128
  };
1057
1129
 
@@ -1627,6 +1699,57 @@ type MenuItemButtonProps = ButtonProps & {
1627
1699
 
1628
1700
  declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1629
1701
  ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1702
+ } & {
1703
+ beforeAction?: (() => Promise<void>) | (() => void);
1704
+ children: react.ReactNode;
1705
+ colorScheme?: ColorSchemeTypes;
1706
+ disabled?: boolean;
1707
+ leftIcon?: react.JSX.Element | undefined;
1708
+ rightIcon?: react.JSX.Element | undefined;
1709
+ type?: LinkTypes | undefined;
1710
+ underline?: boolean;
1711
+ } & Omit<react_router.LinkProps, "to"> & {
1712
+ href: string | undefined;
1713
+ type?: LinkTypes;
1714
+ } & {
1715
+ href: string | undefined;
1716
+ children: react.ReactNode;
1717
+ beforeAction?: (() => Promise<void>) | (() => void);
1718
+ type?: LinkTypes;
1719
+ } & {
1720
+ appearance?: "dangerous" | "default" | "gated";
1721
+ badge?: react.JSX.Element;
1722
+ children?: react.ReactNode;
1723
+ command?: react.ReactNode;
1724
+ icon?: ButtonProps["leftIcon"];
1725
+ leftIcon?: ButtonProps["leftIcon"];
1726
+ rightIcon?: ButtonProps["rightIcon"];
1727
+ fullWidth?: never;
1728
+ asChild?: never;
1729
+ variant?: never;
1730
+ size?: never;
1731
+ unstyled?: never;
1732
+ } & {
1733
+ /**
1734
+ * Treats the menu item as a link when provided
1735
+ */
1736
+ href?: MenuItemButtonProps["href"];
1737
+ }, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
1738
+ ref?: ((instance: HTMLAnchorElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLAnchorElement> | null | undefined;
1739
+ } & {
1740
+ beforeAction?: (() => Promise<void>) | (() => void);
1741
+ children: react.ReactNode;
1742
+ colorScheme?: ColorSchemeTypes;
1743
+ disabled?: boolean;
1744
+ leftIcon?: react.JSX.Element | undefined;
1745
+ rightIcon?: react.JSX.Element | undefined;
1746
+ type?: LinkTypes | undefined;
1747
+ underline?: boolean;
1748
+ } & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
1749
+ ref?: ((instance: HTMLButtonElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLButtonElement> | null | undefined;
1750
+ } & {
1751
+ href?: never;
1752
+ type?: "button" | "reset" | "submit";
1630
1753
  } & {
1631
1754
  href: string | undefined;
1632
1755
  children: react.ReactNode;
@@ -1913,6 +2036,45 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
1913
2036
  width?: string;
1914
2037
  } & react.RefAttributes<HTMLDivElement>>;
1915
2038
 
2039
+ type ControlledPopoverProps = {
2040
+ /**
2041
+ * Is the popover open.
2042
+ * Must be used with `onOpenChange`.
2043
+ * */
2044
+ isOpen: boolean;
2045
+ /** When an attempt to toggle the popover is triggered.
2046
+ * Must be used with `isOpen`.
2047
+ */
2048
+ onOpenChange: (isOpen: boolean) => void;
2049
+ };
2050
+ type UncontrolledPopoverProps = {
2051
+ isOpen?: never;
2052
+ onOpenChange?: never;
2053
+ };
2054
+ type PopoverControlProps = ControlledPopoverProps | UncontrolledPopoverProps;
2055
+ type ContentProps = Omit<PopoverContentProps, 'alignOffset' | 'arrowPadding' | 'asChild' | 'collisionPadding' | 'hideWhenDetached' | 'sideOffset' | 'updatePositionStrategy'>;
2056
+ type PopoverProps = ContentProps & PopoverControlProps & {
2057
+ /**
2058
+ * The content of the popover
2059
+ */
2060
+ children: ReactNode;
2061
+ /**
2062
+ * Determines if the close button is visible (if false, `esc` will still close the Modal)
2063
+ */
2064
+ hideCloseButton?: boolean;
2065
+ /**
2066
+ * An interactive element. Most commonly a [Button](?path=/docs/components-button--docs) or [IconButton]([Button](?path=/docs/components-iconbutton--docs)).
2067
+ * */
2068
+ trigger: JSX.Element;
2069
+ };
2070
+ /**
2071
+ * Displays rich content in a portal, triggered by a button.
2072
+ */
2073
+ declare const Popover: {
2074
+ ({ children, trigger, isOpen, hideCloseButton, onOpenChange, ...props }: PopoverProps): JSX.Element;
2075
+ displayName: string;
2076
+ };
2077
+
1916
2078
  type RadioProps = ComponentPropsWithoutRef<'input'> & {
1917
2079
  /**
1918
2080
  * Indicates the state of the radio
@@ -2380,7 +2542,7 @@ type SelectOptionProps = {
2380
2542
  */
2381
2543
  children: ReactNode;
2382
2544
  /**
2383
- * The value to set
2545
+ * The value to set. Leave this empty to define a placeholder option.
2384
2546
  */
2385
2547
  value: string;
2386
2548
  /**
@@ -2405,4 +2567,4 @@ type SelectOptionGroupProps = {
2405
2567
  };
2406
2568
  declare const SelectOptionGroup: ({ children, label, ...props }: SelectOptionGroupProps) => react_jsx_runtime.JSX.Element;
2407
2569
 
2408
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tab, type TabProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
2570
+ export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tab, type TabProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };