@lumx/react 2.1.2 → 2.1.6-alpha.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/esm/_internal/Avatar2.js +5 -1
- package/esm/_internal/Avatar2.js.map +1 -1
- package/esm/_internal/ClickAwayProvider.js +1 -1
- package/esm/_internal/Dialog2.js +13 -8
- package/esm/_internal/Dialog2.js.map +1 -1
- package/esm/_internal/DragHandle.js +1 -1
- package/esm/_internal/DragHandle.js.map +1 -1
- package/esm/_internal/Flag2.js +1 -3
- package/esm/_internal/Flag2.js.map +1 -1
- package/esm/_internal/List2.js +16 -9
- package/esm/_internal/List2.js.map +1 -1
- package/esm/_internal/Message2.js +2 -2
- package/esm/_internal/Message2.js.map +1 -1
- package/esm/_internal/SlideshowControls.js +3 -3
- package/esm/_internal/SlideshowControls.js.map +1 -1
- package/esm/_internal/Thumbnail2.js +29 -34
- package/esm/_internal/Thumbnail2.js.map +1 -1
- package/esm/_internal/Tooltip2.js +1 -1
- package/esm/_internal/UserBlock.js +44 -14
- package/esm/_internal/UserBlock.js.map +1 -1
- package/esm/_internal/getRootClassName.js +17 -1
- package/esm/_internal/getRootClassName.js.map +1 -1
- package/esm/_internal/user-block.js +1 -0
- package/esm/_internal/user-block.js.map +1 -1
- package/package.json +16 -17
- package/src/components/avatar/Avatar.tsx +8 -0
- package/src/components/dialog/Dialog.stories.tsx +44 -2
- package/src/components/dialog/Dialog.tsx +15 -11
- package/src/components/dialog/__snapshots__/Dialog.test.tsx.snap +76 -0
- package/src/components/drag-handle/DragHandle.tsx +5 -1
- package/src/components/flag/Flag.test.tsx +1 -2
- package/src/components/flag/Flag.tsx +2 -10
- package/src/components/flag/__snapshots__/Flag.test.tsx.snap +0 -15
- package/src/components/list/List.stories.tsx +7 -1
- package/src/components/list/ListItem.stories.tsx +28 -3
- package/src/components/list/ListItem.tsx +25 -7
- package/src/components/list/__snapshots__/List.test.tsx.snap +23 -3
- package/src/components/list/__snapshots__/ListItem.test.tsx.snap +84 -11
- package/src/components/list/useInteractiveList.tsx +1 -1
- package/src/components/message/Message.tsx +2 -2
- package/src/components/slideshow/useKeyNavigate.ts +2 -2
- package/src/components/thumbnail/Thumbnail.stories.tsx +21 -0
- package/src/components/thumbnail/Thumbnail.test.tsx +20 -2
- package/src/components/thumbnail/Thumbnail.tsx +40 -15
- package/src/components/thumbnail/__snapshots__/Thumbnail.test.tsx.snap +53 -6
- package/src/components/user-block/UserBlock.stories.tsx +27 -4
- package/src/components/user-block/UserBlock.tsx +40 -16
- package/src/components/user-block/__snapshots__/UserBlock.test.tsx.snap +244 -145
- package/src/utils/MaterialThemeSwitcher/MaterialThemeSwitcher.tsx +54 -0
- package/src/utils/MaterialThemeSwitcher/index.ts +1 -0
- package/types.d.ts +14 -0
package/types.d.ts
CHANGED
|
@@ -440,6 +440,10 @@ export interface AvatarProps extends GenericProps {
|
|
|
440
440
|
theme?: Theme;
|
|
441
441
|
/** Props to pass to the thumbnail (minus those already set by the Avatar props). */
|
|
442
442
|
thumbnailProps?: Omit<ThumbnailProps, "image" | "alt" | "size" | "theme" | "align" | "fillHeight" | "variant" | "aspectRatio">;
|
|
443
|
+
/** Props to pass to the link wrapping the thumbnail. */
|
|
444
|
+
linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
445
|
+
/** Custom react component for the link (can be used to inject react router Link). */
|
|
446
|
+
linkAs?: "a" | any;
|
|
443
447
|
}
|
|
444
448
|
/**
|
|
445
449
|
* Avatar component.
|
|
@@ -1245,6 +1249,10 @@ export interface ThumbnailProps extends GenericProps {
|
|
|
1245
1249
|
theme?: Theme;
|
|
1246
1250
|
/** Variant of the component. */
|
|
1247
1251
|
variant?: ThumbnailVariant;
|
|
1252
|
+
/** Props to pass to the link wrapping the thumbnail. */
|
|
1253
|
+
linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
1254
|
+
/** Custom react component for the link (can be used to inject react router Link). */
|
|
1255
|
+
linkAs?: "a" | any;
|
|
1248
1256
|
}
|
|
1249
1257
|
/**
|
|
1250
1258
|
* Thumbnail component.
|
|
@@ -1487,6 +1495,8 @@ export interface ListItemProps extends GenericProps {
|
|
|
1487
1495
|
isHighlighted?: boolean;
|
|
1488
1496
|
/** Whether the component is selected or not. */
|
|
1489
1497
|
isSelected?: boolean;
|
|
1498
|
+
/** Whether link/button is disabled or not. */
|
|
1499
|
+
isDisabled?: boolean;
|
|
1490
1500
|
/** Reference to the <li> element. */
|
|
1491
1501
|
listItemRef?: Ref<HTMLLIElement>;
|
|
1492
1502
|
/** Custom react component for the link (can be used to inject react router Link). */
|
|
@@ -2519,6 +2529,10 @@ export declare type UserBlockSize = Extract<Size, "s" | "m" | "l">;
|
|
|
2519
2529
|
export interface UserBlockProps extends GenericProps {
|
|
2520
2530
|
/** Props to pass to the avatar. */
|
|
2521
2531
|
avatarProps?: AvatarProps;
|
|
2532
|
+
/** Props to pass to the link wrapping the avatar thumbnail. */
|
|
2533
|
+
linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
2534
|
+
/** Custom react component for the link (can be used to inject react router Link). */
|
|
2535
|
+
linkAs?: "a" | any;
|
|
2522
2536
|
/** Simple action toolbar content. */
|
|
2523
2537
|
simpleAction?: ReactNode;
|
|
2524
2538
|
/** Multiple action toolbar content. */
|