@lumx/react 4.16.1-alpha.1 → 4.17.0-next.0
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/index.d.ts +131 -6
- package/index.js +1382 -548
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HorizontalAlignment as HorizontalAlignment$1, Orientation as Orientation$1, Alignment as Alignment$1, Size as Size$1, AspectRatio as AspectRatio$1, Kind as Kind$1, Emphasis as Emphasis$1, Theme as Theme$1 } from '@lumx/core/js/constants';
|
|
1
|
+
import { HorizontalAlignment as HorizontalAlignment$1, Orientation as Orientation$1, Alignment as Alignment$1, Size as Size$1, AspectRatio as AspectRatio$1, ColorPalette as ColorPalette$1, Kind as Kind$1, Emphasis as Emphasis$1, Theme as Theme$1 } from '@lumx/core/js/constants';
|
|
2
2
|
export * from '@lumx/core/js/constants';
|
|
3
3
|
import * as _lumx_core_js_types from '@lumx/core/js/types';
|
|
4
|
-
import { ValueOf as ValueOf$1, GenericProps as GenericProps$1, HasTheme as HasTheme$1, PropsToOverride, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasClassName as HasClassName$1, HasCloseMode as HasCloseMode$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1
|
|
4
|
+
import { ValueOf as ValueOf$1, GenericProps as GenericProps$1, HasTheme as HasTheme$1, PropsToOverride, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasClassName as HasClassName$1, HasCloseMode as HasCloseMode$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, NamedProps, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1 } from '@lumx/core/js/types';
|
|
5
5
|
export * from '@lumx/core/js/types';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, RefObject, SetStateAction, Key, CSSProperties, ElementType as ElementType$1, HTMLInputTypeAttribute, ComponentProps, ImgHTMLAttributes } from 'react';
|
|
@@ -792,11 +792,11 @@ interface ButtonProps$1 extends BaseButtonProps {
|
|
|
792
792
|
/**
|
|
793
793
|
* Component display name.
|
|
794
794
|
*/
|
|
795
|
-
declare const COMPONENT_NAME$
|
|
795
|
+
declare const COMPONENT_NAME$2 = "Button";
|
|
796
796
|
/**
|
|
797
797
|
* Component default class name and class prefix.
|
|
798
798
|
*/
|
|
799
|
-
declare const CLASSNAME$
|
|
799
|
+
declare const CLASSNAME$2: LumxClassName<typeof COMPONENT_NAME$2>;
|
|
800
800
|
/**
|
|
801
801
|
* Component default props.
|
|
802
802
|
*/
|
|
@@ -3472,6 +3472,131 @@ interface LinkPreviewProps extends GenericProps$1, ReactToJSX<LinkPreviewProps$1
|
|
|
3472
3472
|
*/
|
|
3473
3473
|
declare const LinkPreview: Comp<LinkPreviewProps, HTMLDivElement>;
|
|
3474
3474
|
|
|
3475
|
+
interface MenuButtonProps$1 {
|
|
3476
|
+
label?: JSXElement;
|
|
3477
|
+
children?: JSXElement;
|
|
3478
|
+
triggerProps?: Record<string, any>;
|
|
3479
|
+
popoverProps?: Record<string, any>;
|
|
3480
|
+
onOpen?: (isOpen: boolean) => void;
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
/** MenuPopover props. */
|
|
3484
|
+
interface MenuPopoverProps$1 extends HasClassName {
|
|
3485
|
+
/** Popover content (a `Menu`). */
|
|
3486
|
+
children?: JSXElement;
|
|
3487
|
+
/** Whether the popover is open. */
|
|
3488
|
+
isOpen?: boolean;
|
|
3489
|
+
/** Placement relative to the anchor. Defaults to `'bottom-start'`. */
|
|
3490
|
+
placement?: Placement;
|
|
3491
|
+
/** Reference to the anchor element. */
|
|
3492
|
+
anchorRef?: CommonRef;
|
|
3493
|
+
/** Callback invoked when the popover requests to close (click away, escape). */
|
|
3494
|
+
handleClose?(): void;
|
|
3495
|
+
/** Whether the popover should close when clicking outside. Default: true. */
|
|
3496
|
+
closeOnClickAway?: boolean;
|
|
3497
|
+
/** Whether the popover should close on Escape. Default: true. */
|
|
3498
|
+
closeOnEscape?: boolean;
|
|
3499
|
+
/** Whether to render in a portal. Default: false (avoid stacking-context surprises). */
|
|
3500
|
+
usePortal?: boolean;
|
|
3501
|
+
/** Whether to focus the anchor on close. Default: true. */
|
|
3502
|
+
focusAnchorOnClose?: boolean;
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
/** Popover props forwarded to the inner Popover (minus managed props). */
|
|
3506
|
+
/** MenusPopover props. */
|
|
3507
|
+
interface MenuPopoverProps extends ReactToJSX<MenuPopoverProps$1, 'isOpen' | 'anchorRef' | 'handleClose'> {
|
|
3508
|
+
/** Content (should contain a `Menu`). */
|
|
3509
|
+
children: ReactNode;
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
/** Keys managed by MenuButton — omitted from the polymorphic trigger props. */
|
|
3513
|
+
type OmittedTriggerKeys = 'aria-haspopup' | 'aria-controls' | 'aria-expanded' | 'label' | 'children' | 'ref';
|
|
3514
|
+
/** Polymorphic trigger props with index signature stripped and managed keys removed. */
|
|
3515
|
+
type TriggerProps$1<E extends ElementType$1> = Omit<NamedProps<React__default.ComponentProps<E>>, OmittedTriggerKeys>;
|
|
3516
|
+
/** Menu button props */
|
|
3517
|
+
type MenuButtonProps<E extends ElementType$1 = typeof Button> = TriggerProps$1<E> & ReactToJSX<MenuButtonProps$1, 'triggerProps'> & {
|
|
3518
|
+
/** Customize the rendered trigger component. */
|
|
3519
|
+
as?: E;
|
|
3520
|
+
children?: React__default.ReactNode;
|
|
3521
|
+
popoverProps?: MenuPopoverProps;
|
|
3522
|
+
onOpen?: (isOpen: boolean) => void;
|
|
3523
|
+
};
|
|
3524
|
+
/**
|
|
3525
|
+
* MenuButton component.
|
|
3526
|
+
*
|
|
3527
|
+
* @param props Component props.
|
|
3528
|
+
* @return React element.
|
|
3529
|
+
*/
|
|
3530
|
+
declare const MenuButton: (<E extends ElementType$1 = Comp<ButtonProps, HTMLButtonElement | HTMLAnchorElement>>(props: TriggerProps$1<E> & ReactToJSX<MenuButtonProps$1, "triggerProps"> & {
|
|
3531
|
+
/** Customize the rendered trigger component. */
|
|
3532
|
+
as?: E | undefined;
|
|
3533
|
+
children?: React__default.ReactNode;
|
|
3534
|
+
popoverProps?: MenuPopoverProps;
|
|
3535
|
+
onOpen?: (isOpen: boolean) => void;
|
|
3536
|
+
} & React__default.ComponentProps<E> & {
|
|
3537
|
+
ref?: ComponentRef<E> | undefined;
|
|
3538
|
+
}) => React__default.JSX.Element) & {
|
|
3539
|
+
displayName: string;
|
|
3540
|
+
};
|
|
3541
|
+
|
|
3542
|
+
/** MenuItem props. */
|
|
3543
|
+
interface MenuItemProps$1 extends HasClassName {
|
|
3544
|
+
/** Item label content. */
|
|
3545
|
+
children?: JSXElement;
|
|
3546
|
+
/** Content rendered before the label (e.g. an icon). */
|
|
3547
|
+
before?: JSXElement;
|
|
3548
|
+
/** Content rendered after the label (e.g. a shortcut hint). */
|
|
3549
|
+
after?: JSXElement;
|
|
3550
|
+
/** Whether the item is disabled. Skipped by Tab and arrow nav. */
|
|
3551
|
+
isDisabled?: boolean;
|
|
3552
|
+
/** Click handler for the action element. */
|
|
3553
|
+
handleClick?(event: any): void;
|
|
3554
|
+
/** Extra props forwarded to the inner action element (e.g. link props when `as="a"`). */
|
|
3555
|
+
actionProps?: Record<string, any>;
|
|
3556
|
+
/** ref to the inner action element (the focusable `<button>` / `<a>`). */
|
|
3557
|
+
actionRef?: CommonRef;
|
|
3558
|
+
/** ref to the root `<li>` element. */
|
|
3559
|
+
ref?: CommonRef;
|
|
3560
|
+
}
|
|
3561
|
+
/** Props overridden by framework wrappers. */
|
|
3562
|
+
type MenuItemPropsToOverride = 'before' | 'after' | 'children' | 'handleClick' | 'actionProps' | 'actionRef';
|
|
3563
|
+
declare const COMPONENT_NAME$1 = "MenuItem";
|
|
3564
|
+
declare const CLASSNAME$1: LumxClassName<typeof COMPONENT_NAME$1>;
|
|
3565
|
+
|
|
3566
|
+
/** Props forwarded to the inner action element. */
|
|
3567
|
+
type MenuItemActionProps<E extends ElementType$1 = 'button'> = HasPolymorphicAs$1<E> & HasRequiredLinkHref$1<E>;
|
|
3568
|
+
/** MenuItem props. */
|
|
3569
|
+
interface MenuItemProps<E extends ElementType$1 = 'button'> extends GenericProps$1, ReactToJSX<MenuItemProps$1, MenuItemPropsToOverride> {
|
|
3570
|
+
/** Item label content. */
|
|
3571
|
+
children?: ReactNode;
|
|
3572
|
+
/** Click handler. Calls `event.preventDefault()` to keep the menu open. */
|
|
3573
|
+
onClick?(event: SyntheticEvent): void;
|
|
3574
|
+
/** MDI icon rendered as `<Icon size="xs" />` prepended to the `before` slot. */
|
|
3575
|
+
icon?: string;
|
|
3576
|
+
/** Foreground color applied to the icon and label text. */
|
|
3577
|
+
color?: ColorPalette$1;
|
|
3578
|
+
/** Content rendered before the label (rendered AFTER `icon` if both are provided). */
|
|
3579
|
+
before?: ReactNode;
|
|
3580
|
+
/** Content rendered after the label (e.g. a shortcut hint). */
|
|
3581
|
+
after?: ReactNode;
|
|
3582
|
+
/** Props forwarded to the inner action element (`{ as: 'a', href: '/foo' }`, etc.). */
|
|
3583
|
+
actionProps?: MenuItemActionProps<E>;
|
|
3584
|
+
}
|
|
3585
|
+
/**
|
|
3586
|
+
* MenuItem component.
|
|
3587
|
+
*
|
|
3588
|
+
* @param props Component props.
|
|
3589
|
+
* @return React element.
|
|
3590
|
+
*/
|
|
3591
|
+
declare const MenuItem: {
|
|
3592
|
+
<E extends ElementType$1 = 'button'>(props: MenuItemProps<E> & {
|
|
3593
|
+
ref?: Ref<HTMLLIElement>;
|
|
3594
|
+
}): ReactElement | null;
|
|
3595
|
+
readonly $$typeof: symbol;
|
|
3596
|
+
displayName: typeof COMPONENT_NAME$1;
|
|
3597
|
+
className: typeof CLASSNAME$1;
|
|
3598
|
+
};
|
|
3599
|
+
|
|
3475
3600
|
/**
|
|
3476
3601
|
* Defines the props of the component.
|
|
3477
3602
|
*/
|
|
@@ -5607,5 +5732,5 @@ declare const ThemeProvider: React__default.FC<{
|
|
|
5607
5732
|
/** Get the theme in the current context. */
|
|
5608
5733
|
declare function useTheme(): ThemeContextValue;
|
|
5609
5734
|
|
|
5610
|
-
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, CLASSNAME$
|
|
5611
|
-
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, ComboboxButtonProps, ComboboxInputProps, ComboboxListProps, ComboboxOptionActionProps, ComboboxOptionMoreInfoProps, ComboboxOptionProps, ComboboxOptionSkeletonProps, ComboboxPopoverComponentProps, ComboboxPopoverProps, ComboboxProviderProps, ComboboxSectionProps, ComboboxStateProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GenericBlockSectionProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps, IconProps, IconSizes, ImageBlockProps, ImageBlockSize, ImageLightboxProps, InlineListProps, InputHelperProps, InputLabelProps, LightboxProps, LinkPreviewProps, LinkProps, ListDividerProps, ListItemProps, ListItemSize, ListProps, ListSectionProps, ListSubheaderProps, MarginAutoAlignment, MessageProps, MosaicProps, MultipleSelectButtonProps, MultipleSelectTextFieldProps, NavigationProps, NotificationProps, Offset, PopoverDialogProps, PopoverProps, PostBlockProps, ProgressCircularProps, ProgressCircularSize, ProgressLinearProps, ProgressProps, ProgressTrackerProps, ProgressTrackerProviderProps, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, RadioButtonProps, RadioGroupProps, RawInputTextProps, RawInputTextareaProps, SelectButtonProps, SelectListStatus as SelectButtonStatus, SelectButtonTranslations, SelectListStatus, SelectMultipleProps, SelectProps, SelectTextFieldProps, SelectListStatus as SelectTextFieldStatus, SelectTextFieldTranslations, SelectionChipGroupProps, SideNavigationItemProps, SideNavigationProps, SingleSelectButtonProps, SingleSelectTextFieldProps, SkeletonCircleProps, SkeletonRectangleProps, SkeletonTypographyProps, SliderProps, SlidesProps, SlideshowControlsProps, SlideshowItemProps, SlideshowProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabProviderProps, TableBodyProps, TableCellProps, TableHeaderProps, TableProps, TableRowProps, TextFieldProps, TextProps, ThumbnailProps, ThumbnailSize, TimePickerFieldProps, ToolbarProps, TooltipPlacement, TooltipProps, UploaderProps, UploaderSize, UserBlockProps, UserBlockSize };
|
|
5735
|
+
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, CLASSNAME$2 as CLASSNAME, COMPONENT_NAME$2 as COMPONENT_NAME, Checkbox, Chip, ChipGroup, Combobox, CommentBlock, CommentBlockVariant, DEFAULT_PROPS, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSection, ListSubheader, MenuButton, ListDivider as MenuDivider, MenuItem, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectButton, SelectMultiple, SelectMultipleField, SelectTextField, SelectVariant, SelectionChipGroup, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, CLASSNAME as TIME_PICKER_FIELD_CLASSNAME, COMPONENT_NAME as TIME_PICKER_FIELD_COMPONENT_NAME, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableCellVariant as TableCellVariantType, TableHeader, TableRow, Text, TextField, ThOrder, ThOrder as ThOrderType, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, TimePickerField, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
5736
|
+
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, ComboboxButtonProps, ComboboxInputProps, ComboboxListProps, ComboboxOptionActionProps, ComboboxOptionMoreInfoProps, ComboboxOptionProps, ComboboxOptionSkeletonProps, ComboboxPopoverComponentProps, ComboboxPopoverProps, ComboboxProviderProps, ComboboxSectionProps, ComboboxStateProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GenericBlockSectionProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps, IconProps, IconSizes, ImageBlockProps, ImageBlockSize, ImageLightboxProps, InlineListProps, InputHelperProps, InputLabelProps, LightboxProps, LinkPreviewProps, LinkProps, ListDividerProps, ListItemProps, ListItemSize, ListProps, ListSectionProps, ListSubheaderProps, MarginAutoAlignment, MenuButtonProps, ListDividerProps as MenuDividerProps, MenuItemActionProps, MenuItemProps, MessageProps, MosaicProps, MultipleSelectButtonProps, MultipleSelectTextFieldProps, NavigationProps, NotificationProps, Offset, PopoverDialogProps, PopoverProps, PostBlockProps, ProgressCircularProps, ProgressCircularSize, ProgressLinearProps, ProgressProps, ProgressTrackerProps, ProgressTrackerProviderProps, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, RadioButtonProps, RadioGroupProps, RawInputTextProps, RawInputTextareaProps, SelectButtonProps, SelectListStatus as SelectButtonStatus, SelectButtonTranslations, SelectListStatus, SelectMultipleProps, SelectProps, SelectTextFieldProps, SelectListStatus as SelectTextFieldStatus, SelectTextFieldTranslations, SelectionChipGroupProps, SideNavigationItemProps, SideNavigationProps, SingleSelectButtonProps, SingleSelectTextFieldProps, SkeletonCircleProps, SkeletonRectangleProps, SkeletonTypographyProps, SliderProps, SlidesProps, SlideshowControlsProps, SlideshowItemProps, SlideshowProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabProviderProps, TableBodyProps, TableCellProps, TableHeaderProps, TableProps, TableRowProps, TextFieldProps, TextProps, ThumbnailProps, ThumbnailSize, TimePickerFieldProps, ToolbarProps, TooltipPlacement, TooltipProps, UploaderProps, UploaderSize, UserBlockProps, UserBlockSize };
|