@lumx/react 3.7.6-alpha.8 → 3.7.6-test.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 +1 -63
- package/index.js +551 -1286
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/heading/Heading.test.tsx +3 -1
- package/src/components/heading/Heading.tsx +3 -2
- package/src/components/image-block/ImageBlock.stories.tsx +74 -63
- package/src/components/image-block/ImageBlock.tsx +1 -0
- package/src/components/image-block/ImageCaption.tsx +7 -7
- package/src/components/thumbnail/useFocusPointStyle.tsx +4 -3
- package/src/hooks/useOnResize.ts +41 -0
- package/src/index.ts +0 -1
- package/src/utils/type.ts +0 -15
- package/src/components/image-lightbox/ImageLightbox.stories.tsx +0 -165
- package/src/components/image-lightbox/ImageLightbox.test.tsx +0 -252
- package/src/components/image-lightbox/ImageLightbox.tsx +0 -72
- package/src/components/image-lightbox/constants.ts +0 -11
- package/src/components/image-lightbox/index.ts +0 -2
- package/src/components/image-lightbox/internal/ImageSlide.tsx +0 -106
- package/src/components/image-lightbox/internal/ImageSlideshow.tsx +0 -173
- package/src/components/image-lightbox/internal/useAnimateScroll.ts +0 -55
- package/src/components/image-lightbox/internal/usePointerZoom.ts +0 -148
- package/src/components/image-lightbox/types.ts +0 -47
- package/src/components/image-lightbox/useImageLightbox.tsx +0 -135
- package/src/hooks/useElementSizeDependentOfWindowSize.ts +0 -32
- package/src/hooks/useImageSize.ts +0 -17
- package/src/stories/generated/ImageLightbox/Demos.stories.tsx +0 -6
- package/src/utils/findImage.tsx +0 -3
- package/src/utils/getPrefersReducedMotion.ts +0 -6
- package/src/utils/startViewTransition.ts +0 -54
- package/src/utils/unref.ts +0 -6
package/index.d.ts
CHANGED
|
@@ -1376,68 +1376,6 @@ interface ImageBlockProps extends GenericProps, HasTheme, ImageCaptionMetadata {
|
|
|
1376
1376
|
*/
|
|
1377
1377
|
declare const ImageBlock: Comp<ImageBlockProps, HTMLDivElement>;
|
|
1378
1378
|
|
|
1379
|
-
type InheritedSlideShowProps = Pick<SlideshowProps, 'slideshowControlsProps' | 'slideGroupLabel'>;
|
|
1380
|
-
interface ZoomButtonProps {
|
|
1381
|
-
/** Zoom in button props */
|
|
1382
|
-
zoomInButtonProps?: IconButtonProps;
|
|
1383
|
-
/** Zoom out button props */
|
|
1384
|
-
zoomOutButtonProps?: IconButtonProps;
|
|
1385
|
-
}
|
|
1386
|
-
type InheritedThumbnailProps = Pick<ThumbnailProps, 'image' | 'alt' | 'imgProps' | 'imgRef'>;
|
|
1387
|
-
type InheritedImageMetadata = Pick<ImageCaptionMetadata, 'title' | 'description' | 'tags'>;
|
|
1388
|
-
type ImageProps = InheritedThumbnailProps & InheritedImageMetadata;
|
|
1389
|
-
interface ImagesProps {
|
|
1390
|
-
/** Index of the active image to show on open */
|
|
1391
|
-
activeImageIndex?: number;
|
|
1392
|
-
/** List of images to display */
|
|
1393
|
-
images: Array<ImageProps>;
|
|
1394
|
-
/** Ref of the active image when the lightbox is open */
|
|
1395
|
-
activeImageRef?: React.Ref<HTMLImageElement>;
|
|
1396
|
-
}
|
|
1397
|
-
type InheritedLightboxProps = Pick<LightboxProps, 'isOpen' | 'parentElement' | 'onClose' | 'closeButtonProps' | 'aria-label' | 'aria-labelledby'>;
|
|
1398
|
-
type ForwardedProps = React.ComponentPropsWithoutRef<'div'>;
|
|
1399
|
-
/**
|
|
1400
|
-
* ImageLightbox component props
|
|
1401
|
-
*/
|
|
1402
|
-
interface ImageLightboxProps extends HasClassName, ZoomButtonProps, ImagesProps, InheritedSlideShowProps, InheritedLightboxProps, ForwardedProps {
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
/** Subset of the ImageLightboxProps managed by the useImageLightbox hook */
|
|
1406
|
-
type ManagedProps = Pick<ImageLightboxProps, 'isOpen' | 'images' | 'parentElement' | 'activeImageRef' | 'onClose' | 'activeImageIndex'>;
|
|
1407
|
-
type TriggerOptions = Pick<ImageLightboxProps, 'activeImageIndex'>;
|
|
1408
|
-
/**
|
|
1409
|
-
* Set up an ImageLightbox with images and triggers.
|
|
1410
|
-
*
|
|
1411
|
-
* - Associate a trigger with the lightbox to properly focus the trigger on close
|
|
1412
|
-
* - Associate a trigger with an image to display on open
|
|
1413
|
-
* - Automatically provide a view transition between an image trigger and the displayed image on open & close
|
|
1414
|
-
*
|
|
1415
|
-
* @param initialProps Images to display in the image lightbox
|
|
1416
|
-
*/
|
|
1417
|
-
declare function useImageLightbox<P extends Partial<ImageLightboxProps>>(initialProps: P): {
|
|
1418
|
-
/**
|
|
1419
|
-
* Generates trigger props
|
|
1420
|
-
* @param index Provide an index to choose which image to display when the image lightbox opens.
|
|
1421
|
-
* */
|
|
1422
|
-
getTriggerProps: (options?: TriggerOptions) => {
|
|
1423
|
-
onClick: React.MouseEventHandler;
|
|
1424
|
-
ref: React.Ref<any>;
|
|
1425
|
-
};
|
|
1426
|
-
/** Props to forward to the ImageLightbox */
|
|
1427
|
-
imageLightboxProps: P & ManagedProps;
|
|
1428
|
-
};
|
|
1429
|
-
|
|
1430
|
-
/**
|
|
1431
|
-
* ImageLightbox component.
|
|
1432
|
-
*
|
|
1433
|
-
* @param props Component props.
|
|
1434
|
-
* @param ref Component ref.
|
|
1435
|
-
* @return React element.
|
|
1436
|
-
*/
|
|
1437
|
-
declare const ImageLightbox: Comp<ImageLightboxProps, HTMLDivElement> & {
|
|
1438
|
-
useImageLightbox: typeof useImageLightbox;
|
|
1439
|
-
};
|
|
1440
|
-
|
|
1441
1379
|
/**
|
|
1442
1380
|
* Defines the props of the component.
|
|
1443
1381
|
*/
|
|
@@ -2977,4 +2915,4 @@ interface UserBlockProps extends GenericProps, HasTheme {
|
|
|
2977
2915
|
*/
|
|
2978
2916
|
declare const UserBlock: Comp<UserBlockProps, HTMLDivElement>;
|
|
2979
2917
|
|
|
2980
|
-
export { AlertDialog, AlertDialogProps, Autocomplete, AutocompleteMultiple, AutocompleteMultipleProps, AutocompleteProps, Avatar, AvatarProps, AvatarSize, Badge, BadgeProps, BaseButtonProps, Button, ButtonEmphasis, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, Checkbox, CheckboxProps, Chip, ChipGroup, ChipGroupProps, ChipProps, CommentBlock, CommentBlockProps, CommentBlockVariant, DatePicker, DatePickerControlled, DatePickerControlledProps, DatePickerField, DatePickerFieldProps, DatePickerProps, Dialog, DialogProps, DialogSizes, Divider, DividerProps, DragHandle, DragHandleProps, Dropdown, DropdownProps, Elevation, ExpansionPanel, ExpansionPanelProps, Flag, FlagProps, FlexBox, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, GapSize, GenericBlock, GenericBlockGapSize, GenericBlockProps, Grid, GridColumn, GridColumnGapSize, GridColumnProps, GridItem, GridItemProps, GridProps, Heading, HeadingLevelProvider, HeadingLevelProviderProps, HeadingProps, Icon, IconButton, IconButtonProps, IconProps, IconSizes, ImageBlock, ImageBlockCaptionPosition, ImageBlockProps, ImageBlockSize,
|
|
2918
|
+
export { AlertDialog, AlertDialogProps, Autocomplete, AutocompleteMultiple, AutocompleteMultipleProps, AutocompleteProps, Avatar, AvatarProps, AvatarSize, Badge, BadgeProps, BaseButtonProps, Button, ButtonEmphasis, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, Checkbox, CheckboxProps, Chip, ChipGroup, ChipGroupProps, ChipProps, CommentBlock, CommentBlockProps, CommentBlockVariant, DatePicker, DatePickerControlled, DatePickerControlledProps, DatePickerField, DatePickerFieldProps, DatePickerProps, Dialog, DialogProps, DialogSizes, Divider, DividerProps, DragHandle, DragHandleProps, Dropdown, DropdownProps, Elevation, ExpansionPanel, ExpansionPanelProps, Flag, FlagProps, FlexBox, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, GapSize, GenericBlock, GenericBlockGapSize, GenericBlockProps, Grid, GridColumn, GridColumnGapSize, GridColumnProps, GridItem, GridItemProps, GridProps, Heading, HeadingLevelProvider, HeadingLevelProviderProps, HeadingProps, Icon, IconButton, IconButtonProps, IconProps, IconSizes, ImageBlock, ImageBlockCaptionPosition, ImageBlockProps, ImageBlockSize, InlineList, InlineListProps, InputHelper, InputHelperProps, InputLabel, InputLabelProps, Lightbox, LightboxProps, Link, LinkPreview, LinkPreviewProps, LinkProps, List, ListDivider, ListDividerProps, ListItem, ListItemProps, ListItemSize, ListProps, ListSubheader, ListSubheaderProps, MarginAutoAlignment, Message, MessageProps, Mosaic, MosaicProps, Navigation, NavigationProps, Notification, NotificationProps, Offset, Placement, Popover, PopoverDialog, PopoverDialogProps, PopoverProps, PostBlock, PostBlockProps, Progress, ProgressCircular, ProgressCircularProps, ProgressCircularSize, ProgressLinear, ProgressLinearProps, ProgressProps, ProgressTracker, ProgressTrackerProps, ProgressTrackerProvider, ProgressTrackerProviderProps, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, ProgressVariant, RadioButton, RadioButtonProps, RadioGroup, RadioGroupProps, Select, SelectMultiple, SelectMultipleField, SelectMultipleProps, SelectProps, SelectVariant, SideNavigation, SideNavigationItem, SideNavigationItemProps, SideNavigationProps, SkeletonCircle, SkeletonCircleProps, SkeletonRectangle, SkeletonRectangleProps, SkeletonRectangleVariant, SkeletonTypography, SkeletonTypographyProps, Slider, SliderProps, Slides, SlidesProps, Slideshow, SlideshowControls, SlideshowControlsProps, SlideshowItem, SlideshowItemProps, SlideshowProps, Switch, SwitchProps, Tab, TabList, TabListLayout, TabListProps, TabPanel, TabPanelProps, TabProps, TabProvider, TabProviderProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableCellVariant, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, Text, TextField, TextFieldProps, TextProps, ThOrder, Thumbnail, ThumbnailProps, Toolbar, ToolbarProps, Tooltip, TooltipPlacement, TooltipProps, Uploader, UploaderProps, UploaderSize, UploaderVariant, UserBlock, UserBlockProps, UserBlockSize, clamp, isClickable, useFocusPointStyle, useHeadingLevel };
|