@wistia/ui 0.0.14 → 0.0.16
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 +897 -192
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +368 -41
- package/dist/index.d.ts +368 -41
- package/dist/index.mjs +905 -190
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -21
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, JSXElementConstructor, ElementType as ElementType$1 } from 'react';
|
|
3
|
+
import { ReactNode, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ChangeEvent, JSXElementConstructor, ElementType as ElementType$1 } from 'react';
|
|
4
4
|
import { LinkProps as LinkProps$1 } from 'react-router-dom';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
|
+
import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
|
|
6
7
|
|
|
7
8
|
type UIProviderProps = {
|
|
8
9
|
children: ReactNode;
|
|
@@ -89,7 +90,7 @@ declare const Avatar: {
|
|
|
89
90
|
displayName: string;
|
|
90
91
|
};
|
|
91
92
|
|
|
92
|
-
declare const colorSchemeOptions: readonly ["inherit", "default", "info", "success", "warning", "error", "blue", "green", "orange", "pink", "purple", "yellow"];
|
|
93
|
+
declare const colorSchemeOptions: readonly ["inherit", "default", "info", "success", "warning", "error", "blue", "green", "orange", "pink", "purple", "yellow", "vendor-hubspot", "vendor-marketo", "vendor-pardot"];
|
|
93
94
|
type ColorSchemeTypes = (typeof colorSchemeOptions)[number];
|
|
94
95
|
type ColorSchemeWrapperProps = ComponentPropsWithoutRef<'div'> & {
|
|
95
96
|
/**
|
|
@@ -345,7 +346,7 @@ type BaseButtonProps = {
|
|
|
345
346
|
*/
|
|
346
347
|
isLoading?: boolean;
|
|
347
348
|
/**
|
|
348
|
-
* Icon to display on the left side of the button, Must be an instance of [Icon](?path=/docs/
|
|
349
|
+
* Icon to display on the left side of the button, Must be an instance of [Icon](?path=/docs/components-icon--docs)
|
|
349
350
|
*/
|
|
350
351
|
leftIcon?: JSX.Element | undefined;
|
|
351
352
|
/**
|
|
@@ -370,7 +371,7 @@ type BaseButtonProps = {
|
|
|
370
371
|
*/
|
|
371
372
|
unstyled?: boolean;
|
|
372
373
|
/**
|
|
373
|
-
* Icon to display on the right side of the button, Must be an instance of [Icon](?path=/docs/
|
|
374
|
+
* Icon to display on the right side of the button, Must be an instance of [Icon](?path=/docs/components-icon--docs)
|
|
374
375
|
*/
|
|
375
376
|
rightIcon?: JSX.Element | undefined;
|
|
376
377
|
/**
|
|
@@ -383,7 +384,7 @@ type BaseButtonProps = {
|
|
|
383
384
|
variant?: ButtonVariants;
|
|
384
385
|
};
|
|
385
386
|
type ButtonAsLinkProps = BaseButtonProps & ComponentPropsWithRef<'a'> & {
|
|
386
|
-
href: string;
|
|
387
|
+
href: string | undefined;
|
|
387
388
|
children: ReactNode;
|
|
388
389
|
/**
|
|
389
390
|
* This just allows pathrough to beforeAction for link
|
|
@@ -433,6 +434,51 @@ declare const ButtonGroup: {
|
|
|
433
434
|
displayName: string;
|
|
434
435
|
};
|
|
435
436
|
|
|
437
|
+
type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
|
|
438
|
+
/**
|
|
439
|
+
* Indicates the state of the checkbox
|
|
440
|
+
*/
|
|
441
|
+
checked?: boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Disables checkbox
|
|
444
|
+
*/
|
|
445
|
+
disabled?: boolean;
|
|
446
|
+
/**
|
|
447
|
+
* @ignore
|
|
448
|
+
* Force a Checkbox into a particular css state (for debugging)
|
|
449
|
+
*/
|
|
450
|
+
forceState?: 'focus' | 'hover';
|
|
451
|
+
/**
|
|
452
|
+
* Optional ID attribute
|
|
453
|
+
*/
|
|
454
|
+
id?: string | undefined;
|
|
455
|
+
/**
|
|
456
|
+
* The label for the checkbox
|
|
457
|
+
*/
|
|
458
|
+
label?: JSX.Element | string | undefined;
|
|
459
|
+
/**
|
|
460
|
+
* The description for the checkbox
|
|
461
|
+
*/
|
|
462
|
+
description?: JSX.Element | string | undefined;
|
|
463
|
+
/**
|
|
464
|
+
* The name of the checkbox. Submitted with its owning form as part of a name/value pair.
|
|
465
|
+
*/
|
|
466
|
+
name?: string | undefined;
|
|
467
|
+
/**
|
|
468
|
+
* Callback function invoked when the checkbox value changes
|
|
469
|
+
*/
|
|
470
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
471
|
+
/**
|
|
472
|
+
* Make Input a required element
|
|
473
|
+
*/
|
|
474
|
+
required?: boolean;
|
|
475
|
+
/**
|
|
476
|
+
* The value given as data when submitted with a `name`.
|
|
477
|
+
*/
|
|
478
|
+
value?: string;
|
|
479
|
+
};
|
|
480
|
+
declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
481
|
+
|
|
436
482
|
type DividerProps = ComponentPropsWithoutRef<'hr'> & {
|
|
437
483
|
/**
|
|
438
484
|
* Size of the divider. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
@@ -477,6 +523,7 @@ type ComponentProp<C> = {
|
|
|
477
523
|
* Render a different element or component
|
|
478
524
|
*
|
|
479
525
|
* @type ElementType | ComponentType
|
|
526
|
+
* @default 'div'
|
|
480
527
|
*/
|
|
481
528
|
renderAs?: C;
|
|
482
529
|
};
|
|
@@ -836,8 +883,8 @@ type IconButtonProps = {
|
|
|
836
883
|
children: JSX.Element;
|
|
837
884
|
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
838
885
|
/**
|
|
839
|
-
* IconButton behaves like a [Button](?path=/docs/
|
|
840
|
-
* but only accepts an [Icon](?path=/docs/
|
|
886
|
+
* IconButton behaves like a [Button](?path=/docs/components-button--docs),
|
|
887
|
+
* but only accepts an [Icon](?path=/docs/components-icon--docs) as a child.
|
|
841
888
|
*/
|
|
842
889
|
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
843
890
|
/**
|
|
@@ -898,59 +945,201 @@ declare const Label: {
|
|
|
898
945
|
displayName: string;
|
|
899
946
|
};
|
|
900
947
|
|
|
901
|
-
type
|
|
948
|
+
type ControlledMenuProps = {
|
|
902
949
|
/**
|
|
903
|
-
*
|
|
950
|
+
* Is the menu open.
|
|
951
|
+
* Must be used with `onOpenChange`.
|
|
952
|
+
* */
|
|
953
|
+
isOpen: boolean;
|
|
954
|
+
/** When an attempt to toggle the menu is triggered.
|
|
955
|
+
* Must be used with `isOpen`.
|
|
904
956
|
*/
|
|
905
|
-
|
|
957
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
958
|
+
};
|
|
959
|
+
type UncontrolledMenuProps = {
|
|
960
|
+
isOpen?: never;
|
|
961
|
+
onOpenChange?: never;
|
|
962
|
+
};
|
|
963
|
+
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
964
|
+
type MenuPropsWithDefaultTrigger = {
|
|
906
965
|
/**
|
|
907
|
-
*
|
|
966
|
+
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
908
967
|
*/
|
|
909
|
-
|
|
968
|
+
label: string;
|
|
969
|
+
trigger?: never;
|
|
970
|
+
};
|
|
971
|
+
type MenuPropsWithCustomTrigger = {
|
|
972
|
+
label?: never;
|
|
910
973
|
/**
|
|
911
|
-
*
|
|
912
|
-
*
|
|
974
|
+
* Replace the default trigger with a custom button or other element
|
|
975
|
+
* */
|
|
976
|
+
trigger: ReactNode;
|
|
977
|
+
};
|
|
978
|
+
type MenuTriggerProps = MenuPropsWithCustomTrigger | MenuPropsWithDefaultTrigger;
|
|
979
|
+
type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
980
|
+
/**
|
|
981
|
+
* The position of the Menu
|
|
913
982
|
*/
|
|
914
|
-
|
|
983
|
+
align?: 'center' | 'end' | 'start';
|
|
984
|
+
/**
|
|
985
|
+
* The content of the menu.
|
|
986
|
+
* Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
|
|
987
|
+
*/
|
|
988
|
+
children: ReactNode;
|
|
989
|
+
/**
|
|
990
|
+
* Callback for when the user clicks or focuses outside of the menu
|
|
991
|
+
*/
|
|
992
|
+
onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
|
|
993
|
+
/**
|
|
994
|
+
* Props to pass to the trigger component, the default trigger is Button
|
|
995
|
+
*/
|
|
996
|
+
triggerProps?: ButtonProps;
|
|
915
997
|
};
|
|
998
|
+
type MenuProps = BaseMenuProps & {};
|
|
916
999
|
/**
|
|
917
|
-
*
|
|
1000
|
+
* Displays a menu to the users with a set of actions.
|
|
918
1001
|
*/
|
|
919
|
-
declare const
|
|
920
|
-
({
|
|
1002
|
+
declare const Menu: {
|
|
1003
|
+
({ align, children, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
921
1004
|
displayName: string;
|
|
922
1005
|
};
|
|
923
1006
|
|
|
924
|
-
type
|
|
1007
|
+
type MenuLabelProps = {
|
|
1008
|
+
/**
|
|
1009
|
+
* The text of the label
|
|
1010
|
+
*/
|
|
1011
|
+
children: ReactNode | string;
|
|
1012
|
+
};
|
|
1013
|
+
declare const MenuLabel: {
|
|
1014
|
+
({ children, ...props }: MenuLabelProps): react_jsx_runtime.JSX.Element;
|
|
1015
|
+
displayName: string;
|
|
1016
|
+
};
|
|
925
1017
|
|
|
926
|
-
type
|
|
1018
|
+
type SubMenuProps = {
|
|
927
1019
|
/**
|
|
928
|
-
*
|
|
1020
|
+
* The label of the submenu
|
|
929
1021
|
*/
|
|
930
|
-
|
|
1022
|
+
label: ReactNode;
|
|
931
1023
|
/**
|
|
932
|
-
* The
|
|
933
|
-
* TODO: add link to Spacing docs
|
|
1024
|
+
* The description of the submenu
|
|
934
1025
|
*/
|
|
935
|
-
|
|
1026
|
+
description?: ReactNode;
|
|
936
1027
|
/**
|
|
937
|
-
*
|
|
938
|
-
* The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
1028
|
+
* The menu items that will appear in this submenu
|
|
939
1029
|
*/
|
|
940
|
-
|
|
941
|
-
|
|
1030
|
+
children: ReactNode[];
|
|
1031
|
+
/**
|
|
1032
|
+
* Callback when the submenu is opened or closed
|
|
1033
|
+
*/
|
|
1034
|
+
onOpenChange?: (open: boolean) => void;
|
|
942
1035
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1036
|
+
declare const SubMenu: {
|
|
1037
|
+
({ label, description, children, onOpenChange, ...props }: SubMenuProps): react_jsx_runtime.JSX.Element;
|
|
1038
|
+
displayName: string;
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
type MenuItemButtonProps = ButtonProps & {
|
|
1042
|
+
/**
|
|
1043
|
+
* Pre-defined visual treatments for the menu item
|
|
1044
|
+
*/
|
|
1045
|
+
appearance?: 'dangerous' | 'default' | 'gated';
|
|
1046
|
+
/**
|
|
1047
|
+
* A badge to display on the MenuItem
|
|
1048
|
+
*/
|
|
1049
|
+
badge?: JSX.Element;
|
|
1050
|
+
/**
|
|
1051
|
+
* The content of the MenuItem
|
|
1052
|
+
*/
|
|
1053
|
+
children?: ReactNode;
|
|
1054
|
+
/**
|
|
1055
|
+
* Keyboard shortcut to bind to the MenuItem. Won't be shown if `badge` is set.
|
|
1056
|
+
* *Note:* This is just visual, it doesn't actually bind the key command.
|
|
1057
|
+
*/
|
|
1058
|
+
command?: ReactNode;
|
|
1059
|
+
/**
|
|
1060
|
+
* Icon to show before the MenuItem text. Ignored if children is provided or if `appearance` is `gated`
|
|
1061
|
+
*/
|
|
1062
|
+
icon?: ButtonProps['leftIcon'];
|
|
1063
|
+
/**
|
|
1064
|
+
* @ignore
|
|
1065
|
+
*/
|
|
1066
|
+
leftIcon?: ButtonProps['leftIcon'];
|
|
1067
|
+
/**
|
|
1068
|
+
* @ignore
|
|
1069
|
+
*/
|
|
1070
|
+
rightIcon?: ButtonProps['rightIcon'];
|
|
1071
|
+
/**
|
|
1072
|
+
* @ignore
|
|
1073
|
+
* */
|
|
1074
|
+
fullWidth?: never;
|
|
1075
|
+
/**
|
|
1076
|
+
* @ignore
|
|
1077
|
+
* */
|
|
1078
|
+
asChild?: never;
|
|
1079
|
+
/**
|
|
1080
|
+
* @ignore
|
|
1081
|
+
* */
|
|
1082
|
+
variant?: never;
|
|
1083
|
+
/**
|
|
1084
|
+
* @ignore
|
|
1085
|
+
* */
|
|
1086
|
+
size?: never;
|
|
1087
|
+
/**
|
|
1088
|
+
* @ignore
|
|
1089
|
+
* */
|
|
1090
|
+
unstyled?: never;
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
1094
|
+
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;
|
|
1095
|
+
} & {
|
|
1096
|
+
href: string | undefined;
|
|
1097
|
+
children: react.ReactNode;
|
|
1098
|
+
beforeAction?: (() => Promise<void>) | (() => void);
|
|
1099
|
+
type?: LinkTypes;
|
|
1100
|
+
} & {
|
|
1101
|
+
appearance?: "dangerous" | "default" | "gated";
|
|
1102
|
+
badge?: react.JSX.Element;
|
|
1103
|
+
children?: react.ReactNode;
|
|
1104
|
+
command?: react.ReactNode;
|
|
1105
|
+
icon?: ButtonProps["leftIcon"];
|
|
1106
|
+
leftIcon?: ButtonProps["leftIcon"];
|
|
1107
|
+
rightIcon?: ButtonProps["rightIcon"];
|
|
1108
|
+
fullWidth?: never;
|
|
1109
|
+
asChild?: never;
|
|
1110
|
+
variant?: never;
|
|
1111
|
+
size?: never;
|
|
1112
|
+
unstyled?: never;
|
|
1113
|
+
} & {
|
|
1114
|
+
/**
|
|
1115
|
+
* Treats the menu item as a link when provided
|
|
1116
|
+
*/
|
|
1117
|
+
href?: MenuItemButtonProps["href"];
|
|
1118
|
+
}, "ref"> | Omit<DropdownMenuItemProps & BaseButtonProps & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
1119
|
+
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;
|
|
1120
|
+
} & {
|
|
1121
|
+
href?: never;
|
|
1122
|
+
type?: "button" | "reset" | "submit";
|
|
1123
|
+
children: react.ReactNode;
|
|
1124
|
+
} & {
|
|
1125
|
+
appearance?: "dangerous" | "default" | "gated";
|
|
1126
|
+
badge?: react.JSX.Element;
|
|
1127
|
+
children?: react.ReactNode;
|
|
1128
|
+
command?: react.ReactNode;
|
|
1129
|
+
icon?: ButtonProps["leftIcon"];
|
|
1130
|
+
leftIcon?: ButtonProps["leftIcon"];
|
|
1131
|
+
rightIcon?: ButtonProps["rightIcon"];
|
|
1132
|
+
fullWidth?: never;
|
|
1133
|
+
asChild?: never;
|
|
1134
|
+
variant?: never;
|
|
1135
|
+
size?: never;
|
|
1136
|
+
unstyled?: never;
|
|
1137
|
+
} & {
|
|
1138
|
+
/**
|
|
1139
|
+
* Treats the menu item as a link when provided
|
|
1140
|
+
*/
|
|
1141
|
+
href?: MenuItemButtonProps["href"];
|
|
1142
|
+
}, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
954
1143
|
|
|
955
1144
|
type AlignmentTypes = 'center' | 'justify' | 'left' | 'right';
|
|
956
1145
|
declare const variantStyleMap: {
|
|
@@ -1119,6 +1308,144 @@ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>)
|
|
|
1119
1308
|
renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
|
|
1120
1309
|
})>, never> & Record<string, never>;
|
|
1121
1310
|
|
|
1311
|
+
type MenuItemLabelProps = {
|
|
1312
|
+
/**
|
|
1313
|
+
* The content of the label
|
|
1314
|
+
*/
|
|
1315
|
+
children: ReactNode;
|
|
1316
|
+
};
|
|
1317
|
+
type MenuItemDescriptionProps = {
|
|
1318
|
+
/**
|
|
1319
|
+
* The content of the description
|
|
1320
|
+
*/
|
|
1321
|
+
children: ReactNode;
|
|
1322
|
+
};
|
|
1323
|
+
declare const MenuItemLabel: ({ children }: MenuItemLabelProps) => react_jsx_runtime.JSX.Element;
|
|
1324
|
+
declare const MenuItemDescription: ({ children }: MenuItemDescriptionProps) => react_jsx_runtime.JSX.Element;
|
|
1325
|
+
|
|
1326
|
+
type MenuRadioGroupProps = DropdownMenuRadioGroupProps & {
|
|
1327
|
+
/** The label for the radio group */
|
|
1328
|
+
label: ReactNode;
|
|
1329
|
+
/** The radio items */
|
|
1330
|
+
children: ReactNode | ReactNode[];
|
|
1331
|
+
/**
|
|
1332
|
+
* @ignore
|
|
1333
|
+
*/
|
|
1334
|
+
asChild?: never;
|
|
1335
|
+
};
|
|
1336
|
+
declare const MenuRadioGroup: {
|
|
1337
|
+
({ children, label, ...props }: MenuRadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
1338
|
+
displayName: string;
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
type RadioMenuItemProps = DropdownMenuRadioItemProps & MenuItemButtonProps & {
|
|
1342
|
+
/**
|
|
1343
|
+
* an [Icon](?path=/docs/components-icon--docs) to use as the indicator that the radio item is selected
|
|
1344
|
+
*/
|
|
1345
|
+
indicator?: JSX.Element;
|
|
1346
|
+
/**
|
|
1347
|
+
* The value of the item
|
|
1348
|
+
*/
|
|
1349
|
+
value: DropdownMenuRadioItemProps['value'];
|
|
1350
|
+
/**
|
|
1351
|
+
* @ignore
|
|
1352
|
+
*/
|
|
1353
|
+
href?: never;
|
|
1354
|
+
/**
|
|
1355
|
+
* @ignore
|
|
1356
|
+
*/
|
|
1357
|
+
isLoading?: never;
|
|
1358
|
+
/**
|
|
1359
|
+
* @ignore
|
|
1360
|
+
*/
|
|
1361
|
+
ref?: never;
|
|
1362
|
+
};
|
|
1363
|
+
declare const RadioMenuItem: {
|
|
1364
|
+
({ onSelect, value, indicator, ...props }: RadioMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
1365
|
+
displayName: string;
|
|
1366
|
+
};
|
|
1367
|
+
|
|
1368
|
+
type CheckboxMenuItemProps = DropdownMenuCheckboxItemProps & MenuItemButtonProps & {
|
|
1369
|
+
/**
|
|
1370
|
+
* an [Icon](?path=/docs/components-icon--docs) to use as the indicator that the radio item is selected
|
|
1371
|
+
*/
|
|
1372
|
+
indicator?: JSX.Element;
|
|
1373
|
+
/**
|
|
1374
|
+
* The checked state of the menu item
|
|
1375
|
+
*/
|
|
1376
|
+
checked: boolean;
|
|
1377
|
+
/**
|
|
1378
|
+
* @ignore
|
|
1379
|
+
*/
|
|
1380
|
+
href?: never;
|
|
1381
|
+
/**
|
|
1382
|
+
* @ignore
|
|
1383
|
+
*/
|
|
1384
|
+
isLoading?: never;
|
|
1385
|
+
/**
|
|
1386
|
+
* @ignore
|
|
1387
|
+
*/
|
|
1388
|
+
ref?: never;
|
|
1389
|
+
};
|
|
1390
|
+
declare const CheckboxMenuItem: {
|
|
1391
|
+
({ onSelect, checked, onCheckedChange, indicator, ...props }: CheckboxMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
1392
|
+
displayName: string;
|
|
1393
|
+
};
|
|
1394
|
+
|
|
1395
|
+
type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
|
|
1396
|
+
/**
|
|
1397
|
+
* Pass an arbitrary child node
|
|
1398
|
+
*/
|
|
1399
|
+
children?: ReactNode;
|
|
1400
|
+
/**
|
|
1401
|
+
* Display content _only_ when it's focused.
|
|
1402
|
+
*/
|
|
1403
|
+
focusable?: boolean;
|
|
1404
|
+
/**
|
|
1405
|
+
* The text that will appear to screenreaders but not be displayed on screen
|
|
1406
|
+
* (alternatively you can pass children)
|
|
1407
|
+
*/
|
|
1408
|
+
text?: ReactNode;
|
|
1409
|
+
};
|
|
1410
|
+
/**
|
|
1411
|
+
* Used to hide content from the visual client, but keep it readable for screen readers.
|
|
1412
|
+
*/
|
|
1413
|
+
declare const ScreenReaderOnly: {
|
|
1414
|
+
({ text, children, focusable, ...otherProps }: ScreenReaderOnlyProps): react_jsx_runtime.JSX.Element;
|
|
1415
|
+
displayName: string;
|
|
1416
|
+
};
|
|
1417
|
+
|
|
1418
|
+
type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09' | 'space-10' | 'space-11';
|
|
1419
|
+
|
|
1420
|
+
type StackProps = {
|
|
1421
|
+
/**
|
|
1422
|
+
* Optional children
|
|
1423
|
+
*/
|
|
1424
|
+
children?: ReactNode | undefined;
|
|
1425
|
+
/**
|
|
1426
|
+
* The gap between each item in the stack. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
1427
|
+
* TODO: add link to Spacing docs
|
|
1428
|
+
*/
|
|
1429
|
+
gap?: Spacings;
|
|
1430
|
+
/**
|
|
1431
|
+
* Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.
|
|
1432
|
+
* The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
1433
|
+
*/
|
|
1434
|
+
direction?: 'horizontal' | 'vertical';
|
|
1435
|
+
renderAs?: ElementType$1;
|
|
1436
|
+
};
|
|
1437
|
+
/**
|
|
1438
|
+
* Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
|
|
1439
|
+
* This allows for layouting children in a consistent way without needing to manually add margins or padding.
|
|
1440
|
+
*/
|
|
1441
|
+
declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, keyof StackProps> & {
|
|
1442
|
+
renderAs?: any;
|
|
1443
|
+
} & StackProps & {
|
|
1444
|
+
ref?: any;
|
|
1445
|
+
}) | (StackProps & {
|
|
1446
|
+
renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
|
|
1447
|
+
})>, never> & Record<string, never>;
|
|
1448
|
+
|
|
1122
1449
|
type TooltipProps = {
|
|
1123
1450
|
/**
|
|
1124
1451
|
* The content of the tooltip
|
|
@@ -1198,4 +1525,4 @@ declare const WistiaLogo: {
|
|
|
1198
1525
|
displayName: string;
|
|
1199
1526
|
};
|
|
1200
1527
|
|
|
1201
|
-
export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, ScreenReaderOnly, Stack, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|
|
1528
|
+
export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, RadioMenuItem, ScreenReaderOnly, Stack, SubMenu, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
|