@wistia/ui 0.14.20 → 0.14.21
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 +491 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +165 -2
- package/dist/index.d.ts +165 -2
- package/dist/index.mjs +488 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1809,7 +1809,7 @@ type EllipsisProps = ComponentPropsWithoutRef<'span'> & {
|
|
|
1809
1809
|
/**
|
|
1810
1810
|
* The number that will be truncated with an ellipsis
|
|
1811
1811
|
*/
|
|
1812
|
-
lines?: number;
|
|
1812
|
+
lines?: number | undefined;
|
|
1813
1813
|
};
|
|
1814
1814
|
/**
|
|
1815
1815
|
* Truncate text with an ellispsis visble at the end
|
|
@@ -3911,6 +3911,169 @@ type ContextMenuProps = {
|
|
|
3911
3911
|
*/
|
|
3912
3912
|
declare const ContextMenu: ({ position, triggerRef, children, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
3913
3913
|
|
|
3914
|
+
declare const typographicVariantStyleMap: {
|
|
3915
|
+
hero: styled_components.FlattenSimpleInterpolation;
|
|
3916
|
+
heading1: styled_components.FlattenSimpleInterpolation;
|
|
3917
|
+
heading2: styled_components.FlattenSimpleInterpolation;
|
|
3918
|
+
heading3: styled_components.FlattenSimpleInterpolation;
|
|
3919
|
+
heading4: styled_components.FlattenSimpleInterpolation;
|
|
3920
|
+
heading5: styled_components.FlattenSimpleInterpolation;
|
|
3921
|
+
heading6: styled_components.FlattenSimpleInterpolation;
|
|
3922
|
+
body1: styled_components.FlattenSimpleInterpolation;
|
|
3923
|
+
body2: styled_components.FlattenSimpleInterpolation;
|
|
3924
|
+
body3: styled_components.FlattenSimpleInterpolation;
|
|
3925
|
+
body4: styled_components.FlattenSimpleInterpolation;
|
|
3926
|
+
body1Mono: styled_components.FlattenSimpleInterpolation;
|
|
3927
|
+
body2Mono: styled_components.FlattenSimpleInterpolation;
|
|
3928
|
+
body3Mono: styled_components.FlattenSimpleInterpolation;
|
|
3929
|
+
body4Mono: styled_components.FlattenSimpleInterpolation;
|
|
3930
|
+
label1: styled_components.FlattenSimpleInterpolation;
|
|
3931
|
+
label2: styled_components.FlattenSimpleInterpolation;
|
|
3932
|
+
label3: styled_components.FlattenSimpleInterpolation;
|
|
3933
|
+
label4: styled_components.FlattenSimpleInterpolation;
|
|
3934
|
+
};
|
|
3935
|
+
type TypographicVariant = keyof typeof typographicVariantStyleMap;
|
|
3936
|
+
|
|
3937
|
+
type EditableTextRootProps = Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
|
|
3938
|
+
/**
|
|
3939
|
+
* The children of the editable text root.
|
|
3940
|
+
*/
|
|
3941
|
+
children: ReactNode;
|
|
3942
|
+
/**
|
|
3943
|
+
* The initial value for the editable text
|
|
3944
|
+
*/
|
|
3945
|
+
defaultValue?: string;
|
|
3946
|
+
/**
|
|
3947
|
+
* The current value for the editable text
|
|
3948
|
+
*/
|
|
3949
|
+
value?: string;
|
|
3950
|
+
/**
|
|
3951
|
+
* Callback fired when the value changes
|
|
3952
|
+
*/
|
|
3953
|
+
onValueChange?: (value: string) => void;
|
|
3954
|
+
/**
|
|
3955
|
+
* Callback fired when editing is committed (e.g., save button clicked, Enter pressed)
|
|
3956
|
+
*/
|
|
3957
|
+
onValueCommit?: (value: string) => void;
|
|
3958
|
+
/**
|
|
3959
|
+
* Callback fired when editing is cancelled (e.g., cancel button clicked, Escape pressed)
|
|
3960
|
+
*/
|
|
3961
|
+
onValueRevert?: (originalValue: string) => void;
|
|
3962
|
+
/**
|
|
3963
|
+
* Callback fired when the editing state changes (editing starts or stops)
|
|
3964
|
+
*/
|
|
3965
|
+
onEditingChange?: (isEditing: boolean) => void;
|
|
3966
|
+
/**
|
|
3967
|
+
* The typographic variant to use for the display component
|
|
3968
|
+
*/
|
|
3969
|
+
typographicVariant?: TypographicVariant;
|
|
3970
|
+
/**
|
|
3971
|
+
* The action(s) that trigger submit or dismiss in edit mode:
|
|
3972
|
+
* - "enter": Trigger submit when the enter key is pressed, or dismiss when the esc key is pressed
|
|
3973
|
+
* - "blur": Trigger submit when the editable is blurred, or dismiss when the esc key is pressed
|
|
3974
|
+
* - "none": No action will trigger submit or dismiss. You need to use the submit or dismiss buttons
|
|
3975
|
+
* - "both": Pressing Enter and blurring the input will trigger submit, or dismiss when the esc key is pressed
|
|
3976
|
+
*/
|
|
3977
|
+
submitMode?: 'blur' | 'both' | 'enter' | 'none';
|
|
3978
|
+
/**
|
|
3979
|
+
* Whether the editable text is read only. If true, the editable text will not be editable and the trigger will not be shown.
|
|
3980
|
+
*/
|
|
3981
|
+
readOnly?: boolean;
|
|
3982
|
+
/**
|
|
3983
|
+
* The id of the editable text.
|
|
3984
|
+
*/
|
|
3985
|
+
id?: string;
|
|
3986
|
+
/**
|
|
3987
|
+
* The label of the editable text.
|
|
3988
|
+
*/
|
|
3989
|
+
label: string;
|
|
3990
|
+
/**
|
|
3991
|
+
* Placeholder text for the input field and display
|
|
3992
|
+
*/
|
|
3993
|
+
placeholder?: string;
|
|
3994
|
+
/**
|
|
3995
|
+
* Minimum number of lines to display.
|
|
3996
|
+
*/
|
|
3997
|
+
minLines?: number;
|
|
3998
|
+
/**
|
|
3999
|
+
* Maximum number of lines to display. If not set, there is no maximum.
|
|
4000
|
+
*/
|
|
4001
|
+
maxLines?: number | undefined;
|
|
4002
|
+
/**
|
|
4003
|
+
* The element to receive focus when the editable is closed.
|
|
4004
|
+
*/
|
|
4005
|
+
finalFocusEl?: () => HTMLElement | null;
|
|
4006
|
+
};
|
|
4007
|
+
type EditableTextContextValues = {
|
|
4008
|
+
isEditing: boolean;
|
|
4009
|
+
setIsEditing: (editing: boolean) => void;
|
|
4010
|
+
value: string;
|
|
4011
|
+
setValue: (value: string) => void;
|
|
4012
|
+
originalValue: string;
|
|
4013
|
+
onValueCommit: ((value: string) => void) | undefined;
|
|
4014
|
+
onValueRevert: ((originalValue: string) => void) | undefined;
|
|
4015
|
+
typographicVariant: TypographicVariant;
|
|
4016
|
+
submitMode: 'blur' | 'both' | 'enter' | 'none';
|
|
4017
|
+
readOnly: boolean;
|
|
4018
|
+
id: string;
|
|
4019
|
+
label: string;
|
|
4020
|
+
placeholder: string;
|
|
4021
|
+
minLines: number;
|
|
4022
|
+
maxLines: number | undefined;
|
|
4023
|
+
finalFocusEl: (() => HTMLElement | null) | undefined;
|
|
4024
|
+
};
|
|
4025
|
+
declare const EditableTextContext: react.Context<EditableTextContextValues | null>;
|
|
4026
|
+
declare const EditableTextRoot: ({ children, defaultValue, value: controlledValue, onValueChange, onValueCommit, onValueRevert, onEditingChange, typographicVariant, submitMode, readOnly, id, label, placeholder, minLines, maxLines, finalFocusEl, ...props }: EditableTextRootProps) => JSX.Element;
|
|
4027
|
+
|
|
4028
|
+
type EditableTextProps = Omit<EditableTextRootProps, 'children'> & {
|
|
4029
|
+
/**
|
|
4030
|
+
* Whether to visually hide the label.
|
|
4031
|
+
*/
|
|
4032
|
+
hideLabel?: boolean;
|
|
4033
|
+
};
|
|
4034
|
+
/**
|
|
4035
|
+
* Used for inline editing of text.
|
|
4036
|
+
*/
|
|
4037
|
+
declare const EditableText: {
|
|
4038
|
+
({ hideLabel, ...props }: EditableTextProps): JSX.Element;
|
|
4039
|
+
displayName: string;
|
|
4040
|
+
};
|
|
4041
|
+
|
|
4042
|
+
type EditableTextDisplayProps = ComponentPropsWithoutRef<'div'> & {
|
|
4043
|
+
/**
|
|
4044
|
+
* When true, the user can click on the display to edit the text
|
|
4045
|
+
*/
|
|
4046
|
+
asTrigger?: boolean;
|
|
4047
|
+
renderAs?: ElementType;
|
|
4048
|
+
};
|
|
4049
|
+
declare const EditableTextDisplay: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, EditableTextDisplayProps>) => react.ReactElement | null) & UnknownRecord;
|
|
4050
|
+
|
|
4051
|
+
type EditableTextLabelProps = Omit<LabelProps, 'disabled' | 'htmlFor' | 'required'>;
|
|
4052
|
+
declare const EditableTextLabel: ({ ...props }: EditableTextLabelProps) => react_jsx_runtime.JSX.Element;
|
|
4053
|
+
|
|
4054
|
+
declare const EditableTextSubmitButton: ({ children, }: {
|
|
4055
|
+
children: ReactElement;
|
|
4056
|
+
}) => JSX.Element | null;
|
|
4057
|
+
|
|
4058
|
+
type EditableTextCancelButtonProps = {
|
|
4059
|
+
/**
|
|
4060
|
+
* A cancel button, typically a [Button]() that will revert the value when clicked.
|
|
4061
|
+
*/
|
|
4062
|
+
children: ReactElement;
|
|
4063
|
+
};
|
|
4064
|
+
declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => React.JSX.Element | null;
|
|
4065
|
+
|
|
4066
|
+
type EditableTextTriggerProps = {
|
|
4067
|
+
/**
|
|
4068
|
+
* A trigger element, typically a [Button]() that will enter editing mode when clicked.
|
|
4069
|
+
*/
|
|
4070
|
+
children: ReactElement;
|
|
4071
|
+
};
|
|
4072
|
+
declare const EditableTextTrigger: ({ children, ...props }: EditableTextTriggerProps) => JSX.Element | null;
|
|
4073
|
+
|
|
4074
|
+
type EditableTextInputProps = Pick<InputProps, 'autoSelect'>;
|
|
4075
|
+
declare const EditableTextInput: (props: EditableTextInputProps) => JSX.Element | null;
|
|
4076
|
+
|
|
3914
4077
|
type DataListProps = ComponentPropsWithoutRef<'dl'> & {
|
|
3915
4078
|
/**
|
|
3916
4079
|
* Should only contain `DataListItem` components.
|
|
@@ -3967,4 +4130,4 @@ declare const DataListItemValue: {
|
|
|
3967
4130
|
displayName: string;
|
|
3968
4131
|
};
|
|
3969
4132
|
|
|
3970
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
|
4133
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -1809,7 +1809,7 @@ type EllipsisProps = ComponentPropsWithoutRef<'span'> & {
|
|
|
1809
1809
|
/**
|
|
1810
1810
|
* The number that will be truncated with an ellipsis
|
|
1811
1811
|
*/
|
|
1812
|
-
lines?: number;
|
|
1812
|
+
lines?: number | undefined;
|
|
1813
1813
|
};
|
|
1814
1814
|
/**
|
|
1815
1815
|
* Truncate text with an ellispsis visble at the end
|
|
@@ -3911,6 +3911,169 @@ type ContextMenuProps = {
|
|
|
3911
3911
|
*/
|
|
3912
3912
|
declare const ContextMenu: ({ position, triggerRef, children, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
3913
3913
|
|
|
3914
|
+
declare const typographicVariantStyleMap: {
|
|
3915
|
+
hero: styled_components.FlattenSimpleInterpolation;
|
|
3916
|
+
heading1: styled_components.FlattenSimpleInterpolation;
|
|
3917
|
+
heading2: styled_components.FlattenSimpleInterpolation;
|
|
3918
|
+
heading3: styled_components.FlattenSimpleInterpolation;
|
|
3919
|
+
heading4: styled_components.FlattenSimpleInterpolation;
|
|
3920
|
+
heading5: styled_components.FlattenSimpleInterpolation;
|
|
3921
|
+
heading6: styled_components.FlattenSimpleInterpolation;
|
|
3922
|
+
body1: styled_components.FlattenSimpleInterpolation;
|
|
3923
|
+
body2: styled_components.FlattenSimpleInterpolation;
|
|
3924
|
+
body3: styled_components.FlattenSimpleInterpolation;
|
|
3925
|
+
body4: styled_components.FlattenSimpleInterpolation;
|
|
3926
|
+
body1Mono: styled_components.FlattenSimpleInterpolation;
|
|
3927
|
+
body2Mono: styled_components.FlattenSimpleInterpolation;
|
|
3928
|
+
body3Mono: styled_components.FlattenSimpleInterpolation;
|
|
3929
|
+
body4Mono: styled_components.FlattenSimpleInterpolation;
|
|
3930
|
+
label1: styled_components.FlattenSimpleInterpolation;
|
|
3931
|
+
label2: styled_components.FlattenSimpleInterpolation;
|
|
3932
|
+
label3: styled_components.FlattenSimpleInterpolation;
|
|
3933
|
+
label4: styled_components.FlattenSimpleInterpolation;
|
|
3934
|
+
};
|
|
3935
|
+
type TypographicVariant = keyof typeof typographicVariantStyleMap;
|
|
3936
|
+
|
|
3937
|
+
type EditableTextRootProps = Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
|
|
3938
|
+
/**
|
|
3939
|
+
* The children of the editable text root.
|
|
3940
|
+
*/
|
|
3941
|
+
children: ReactNode;
|
|
3942
|
+
/**
|
|
3943
|
+
* The initial value for the editable text
|
|
3944
|
+
*/
|
|
3945
|
+
defaultValue?: string;
|
|
3946
|
+
/**
|
|
3947
|
+
* The current value for the editable text
|
|
3948
|
+
*/
|
|
3949
|
+
value?: string;
|
|
3950
|
+
/**
|
|
3951
|
+
* Callback fired when the value changes
|
|
3952
|
+
*/
|
|
3953
|
+
onValueChange?: (value: string) => void;
|
|
3954
|
+
/**
|
|
3955
|
+
* Callback fired when editing is committed (e.g., save button clicked, Enter pressed)
|
|
3956
|
+
*/
|
|
3957
|
+
onValueCommit?: (value: string) => void;
|
|
3958
|
+
/**
|
|
3959
|
+
* Callback fired when editing is cancelled (e.g., cancel button clicked, Escape pressed)
|
|
3960
|
+
*/
|
|
3961
|
+
onValueRevert?: (originalValue: string) => void;
|
|
3962
|
+
/**
|
|
3963
|
+
* Callback fired when the editing state changes (editing starts or stops)
|
|
3964
|
+
*/
|
|
3965
|
+
onEditingChange?: (isEditing: boolean) => void;
|
|
3966
|
+
/**
|
|
3967
|
+
* The typographic variant to use for the display component
|
|
3968
|
+
*/
|
|
3969
|
+
typographicVariant?: TypographicVariant;
|
|
3970
|
+
/**
|
|
3971
|
+
* The action(s) that trigger submit or dismiss in edit mode:
|
|
3972
|
+
* - "enter": Trigger submit when the enter key is pressed, or dismiss when the esc key is pressed
|
|
3973
|
+
* - "blur": Trigger submit when the editable is blurred, or dismiss when the esc key is pressed
|
|
3974
|
+
* - "none": No action will trigger submit or dismiss. You need to use the submit or dismiss buttons
|
|
3975
|
+
* - "both": Pressing Enter and blurring the input will trigger submit, or dismiss when the esc key is pressed
|
|
3976
|
+
*/
|
|
3977
|
+
submitMode?: 'blur' | 'both' | 'enter' | 'none';
|
|
3978
|
+
/**
|
|
3979
|
+
* Whether the editable text is read only. If true, the editable text will not be editable and the trigger will not be shown.
|
|
3980
|
+
*/
|
|
3981
|
+
readOnly?: boolean;
|
|
3982
|
+
/**
|
|
3983
|
+
* The id of the editable text.
|
|
3984
|
+
*/
|
|
3985
|
+
id?: string;
|
|
3986
|
+
/**
|
|
3987
|
+
* The label of the editable text.
|
|
3988
|
+
*/
|
|
3989
|
+
label: string;
|
|
3990
|
+
/**
|
|
3991
|
+
* Placeholder text for the input field and display
|
|
3992
|
+
*/
|
|
3993
|
+
placeholder?: string;
|
|
3994
|
+
/**
|
|
3995
|
+
* Minimum number of lines to display.
|
|
3996
|
+
*/
|
|
3997
|
+
minLines?: number;
|
|
3998
|
+
/**
|
|
3999
|
+
* Maximum number of lines to display. If not set, there is no maximum.
|
|
4000
|
+
*/
|
|
4001
|
+
maxLines?: number | undefined;
|
|
4002
|
+
/**
|
|
4003
|
+
* The element to receive focus when the editable is closed.
|
|
4004
|
+
*/
|
|
4005
|
+
finalFocusEl?: () => HTMLElement | null;
|
|
4006
|
+
};
|
|
4007
|
+
type EditableTextContextValues = {
|
|
4008
|
+
isEditing: boolean;
|
|
4009
|
+
setIsEditing: (editing: boolean) => void;
|
|
4010
|
+
value: string;
|
|
4011
|
+
setValue: (value: string) => void;
|
|
4012
|
+
originalValue: string;
|
|
4013
|
+
onValueCommit: ((value: string) => void) | undefined;
|
|
4014
|
+
onValueRevert: ((originalValue: string) => void) | undefined;
|
|
4015
|
+
typographicVariant: TypographicVariant;
|
|
4016
|
+
submitMode: 'blur' | 'both' | 'enter' | 'none';
|
|
4017
|
+
readOnly: boolean;
|
|
4018
|
+
id: string;
|
|
4019
|
+
label: string;
|
|
4020
|
+
placeholder: string;
|
|
4021
|
+
minLines: number;
|
|
4022
|
+
maxLines: number | undefined;
|
|
4023
|
+
finalFocusEl: (() => HTMLElement | null) | undefined;
|
|
4024
|
+
};
|
|
4025
|
+
declare const EditableTextContext: react.Context<EditableTextContextValues | null>;
|
|
4026
|
+
declare const EditableTextRoot: ({ children, defaultValue, value: controlledValue, onValueChange, onValueCommit, onValueRevert, onEditingChange, typographicVariant, submitMode, readOnly, id, label, placeholder, minLines, maxLines, finalFocusEl, ...props }: EditableTextRootProps) => JSX.Element;
|
|
4027
|
+
|
|
4028
|
+
type EditableTextProps = Omit<EditableTextRootProps, 'children'> & {
|
|
4029
|
+
/**
|
|
4030
|
+
* Whether to visually hide the label.
|
|
4031
|
+
*/
|
|
4032
|
+
hideLabel?: boolean;
|
|
4033
|
+
};
|
|
4034
|
+
/**
|
|
4035
|
+
* Used for inline editing of text.
|
|
4036
|
+
*/
|
|
4037
|
+
declare const EditableText: {
|
|
4038
|
+
({ hideLabel, ...props }: EditableTextProps): JSX.Element;
|
|
4039
|
+
displayName: string;
|
|
4040
|
+
};
|
|
4041
|
+
|
|
4042
|
+
type EditableTextDisplayProps = ComponentPropsWithoutRef<'div'> & {
|
|
4043
|
+
/**
|
|
4044
|
+
* When true, the user can click on the display to edit the text
|
|
4045
|
+
*/
|
|
4046
|
+
asTrigger?: boolean;
|
|
4047
|
+
renderAs?: ElementType;
|
|
4048
|
+
};
|
|
4049
|
+
declare const EditableTextDisplay: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, EditableTextDisplayProps>) => react.ReactElement | null) & UnknownRecord;
|
|
4050
|
+
|
|
4051
|
+
type EditableTextLabelProps = Omit<LabelProps, 'disabled' | 'htmlFor' | 'required'>;
|
|
4052
|
+
declare const EditableTextLabel: ({ ...props }: EditableTextLabelProps) => react_jsx_runtime.JSX.Element;
|
|
4053
|
+
|
|
4054
|
+
declare const EditableTextSubmitButton: ({ children, }: {
|
|
4055
|
+
children: ReactElement;
|
|
4056
|
+
}) => JSX.Element | null;
|
|
4057
|
+
|
|
4058
|
+
type EditableTextCancelButtonProps = {
|
|
4059
|
+
/**
|
|
4060
|
+
* A cancel button, typically a [Button]() that will revert the value when clicked.
|
|
4061
|
+
*/
|
|
4062
|
+
children: ReactElement;
|
|
4063
|
+
};
|
|
4064
|
+
declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => React.JSX.Element | null;
|
|
4065
|
+
|
|
4066
|
+
type EditableTextTriggerProps = {
|
|
4067
|
+
/**
|
|
4068
|
+
* A trigger element, typically a [Button]() that will enter editing mode when clicked.
|
|
4069
|
+
*/
|
|
4070
|
+
children: ReactElement;
|
|
4071
|
+
};
|
|
4072
|
+
declare const EditableTextTrigger: ({ children, ...props }: EditableTextTriggerProps) => JSX.Element | null;
|
|
4073
|
+
|
|
4074
|
+
type EditableTextInputProps = Pick<InputProps, 'autoSelect'>;
|
|
4075
|
+
declare const EditableTextInput: (props: EditableTextInputProps) => JSX.Element | null;
|
|
4076
|
+
|
|
3914
4077
|
type DataListProps = ComponentPropsWithoutRef<'dl'> & {
|
|
3915
4078
|
/**
|
|
3916
4079
|
* Should only contain `DataListItem` components.
|
|
@@ -3967,4 +4130,4 @@ declare const DataListItemValue: {
|
|
|
3967
4130
|
displayName: string;
|
|
3968
4131
|
};
|
|
3969
4132
|
|
|
3970
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
|
4133
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|