@lumx/react 3.0.2-alpha-react-utils.3 → 3.0.3-alpha.1

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.
@@ -18,6 +18,8 @@ declare type Comp<P, T = HTMLElement> = {
18
18
  };
19
19
  /** Union type of all heading elements */
20
20
  declare type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
21
+ /** Union type of all text elements */
22
+ declare type TextElement = 'span' | 'p' | HeadingElement;
21
23
  interface HasTheme {
22
24
  /**
23
25
  * Theme adapting the component to light or dark background.
@@ -266,4 +268,4 @@ declare const ThumbnailVariant: {
266
268
  };
267
269
  declare type ThumbnailVariant = ValueOf<typeof ThumbnailVariant>;
268
270
 
269
- export { Alignment as A, Comp as C, Emphasis as E, Falsy as F, GenericProps as G, HasTheme as H, Kind as K, Orientation as O, Size as S, Typography as T, ValueOf as V, HorizontalAlignment as a, Color as b, Callback as c, ColorPalette as d, VerticalAlignment as e, ColorVariant as f, HeadingElement as g, AspectRatio as h, FocusPoint as i, ThumbnailSize as j, ThumbnailVariant as k, GlobalSize as l, TypographyInterface as m, Theme as n, TypographyTitleCustom as o, TypographyCustom as p, ThumbnailAspectRatio as q };
271
+ export { Alignment as A, Comp as C, Emphasis as E, Falsy as F, GenericProps as G, HasTheme as H, Kind as K, Orientation as O, Size as S, Typography as T, ValueOf as V, HorizontalAlignment as a, Color as b, Callback as c, ColorPalette as d, VerticalAlignment as e, ColorVariant as f, TextElement as g, HeadingElement as h, AspectRatio as i, FocusPoint as j, ThumbnailSize as k, ThumbnailVariant as l, GlobalSize as m, TypographyInterface as n, Theme as o, TypographyTitleCustom as p, TypographyCustom as q, ThumbnailAspectRatio as r };
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode, SyntheticEvent, ReactElement, MouseEventHandler, KeyboardEventHandler, AriaAttributes, DetailedHTMLProps, ButtonHTMLAttributes, InputHTMLAttributes, Ref, RefObject, ImgHTMLAttributes, CSSProperties, SetStateAction, Key } from 'react';
2
- import { K as Kind, C as Comp, G as GenericProps, H as HasTheme, a as HorizontalAlignment, S as Size, b as Color, E as Emphasis, V as ValueOf, c as Callback, d as ColorPalette, A as Alignment, e as VerticalAlignment, O as Orientation, f as ColorVariant, T as Typography, g as HeadingElement, h as AspectRatio, F as Falsy, i as FocusPoint, j as ThumbnailSize, k as ThumbnailVariant, l as GlobalSize, m as TypographyInterface } from './_internal/types.js';
3
- export { A as Alignment, h as AspectRatio, b as Color, d as ColorPalette, f as ColorVariant, E as Emphasis, i as FocusPoint, l as GlobalSize, a as HorizontalAlignment, K as Kind, O as Orientation, S as Size, n as Theme, q as ThumbnailAspectRatio, j as ThumbnailSize, k as ThumbnailVariant, T as Typography, p as TypographyCustom, m as TypographyInterface, o as TypographyTitleCustom, e as VerticalAlignment } from './_internal/types.js';
2
+ import { K as Kind, C as Comp, G as GenericProps, H as HasTheme, a as HorizontalAlignment, S as Size, b as Color, E as Emphasis, V as ValueOf, c as Callback, d as ColorPalette, A as Alignment, e as VerticalAlignment, O as Orientation, f as ColorVariant, T as Typography, g as TextElement, h as HeadingElement, i as AspectRatio, F as Falsy, j as FocusPoint, k as ThumbnailSize, l as ThumbnailVariant, m as GlobalSize, n as TypographyInterface } from './_internal/types.js';
3
+ export { A as Alignment, i as AspectRatio, b as Color, d as ColorPalette, f as ColorVariant, E as Emphasis, j as FocusPoint, m as GlobalSize, a as HorizontalAlignment, K as Kind, O as Orientation, S as Size, o as Theme, r as ThumbnailAspectRatio, k as ThumbnailSize, l as ThumbnailVariant, T as Typography, q as TypographyCustom, n as TypographyInterface, p as TypographyTitleCustom, e as VerticalAlignment } from './_internal/types.js';
4
4
 
5
5
  interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
6
6
  /** Message variant. */
@@ -923,6 +923,25 @@ interface FlexBoxProps extends GenericProps {
923
923
  */
924
924
  declare const FlexBox: Comp<FlexBoxProps, HTMLDivElement>;
925
925
 
926
+ /**
927
+ * Accepted gap sizes for the generic block.
928
+ */
929
+ declare const GenericBlockGapSize: Pick<{
930
+ readonly xxs: "xxs";
931
+ readonly xs: "xs";
932
+ readonly s: "s";
933
+ readonly m: "m";
934
+ readonly l: "l";
935
+ readonly xl: "xl";
936
+ readonly xxl: "xxl";
937
+ readonly tiny: "tiny";
938
+ readonly regular: "regular";
939
+ readonly medium: "medium";
940
+ readonly big: "big";
941
+ readonly huge: "huge";
942
+ }, "tiny" | "regular" | "medium" | "big" | "huge">;
943
+ declare type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
944
+
926
945
  interface GenericBlockProps extends FlexBoxProps {
927
946
  /**
928
947
  * Component to use as visual element.
@@ -962,6 +981,16 @@ interface GenericBlockProps extends FlexBoxProps {
962
981
  * props to forward to the figure element.
963
982
  */
964
983
  figureProps?: Omit<FlexBoxProps, 'children'>;
984
+ /**
985
+ * Gap space between sections.
986
+ */
987
+ gap?: GenericBlockGapSize;
988
+ }
989
+ interface GenericBlockSectionProps extends FlexBoxProps {
990
+ /**
991
+ * Gap space between items.
992
+ */
993
+ gap?: GenericBlockGapSize;
965
994
  }
966
995
  declare type BaseGenericBlock = Comp<GenericBlockProps, HTMLDivElement>;
967
996
  /**
@@ -981,21 +1010,20 @@ interface GenericBlock extends BaseGenericBlock {
981
1010
  * Use `GenericBlock.Figure` component as children of the `GenericBlock` component as an alternative way to inject
982
1011
  * the "figure" section of the block (instead of using `figure` and `figureProps` props).
983
1012
  */
984
- Figure: Comp<FlexBoxProps>;
1013
+ Figure: Comp<GenericBlockSectionProps>;
985
1014
  /**
986
1015
  * Use `GenericBlock.Content` component as children of the `GenericBlock` component as an alternative way to inject
987
1016
  * the "content" section of the block (instead of using `content` and `contentProps` props).
988
1017
  */
989
- Content: Comp<FlexBoxProps>;
1018
+ Content: Comp<GenericBlockSectionProps>;
990
1019
  /**
991
1020
  * Use `GenericBlock.Actions` component as children of the `GenericBlock` component as an alternative way to inject
992
1021
  * the "actions" section of the block (instead of using `actions` and `actionsProps` props).
993
1022
  */
994
- Actions: Comp<FlexBoxProps>;
1023
+ Actions: Comp<GenericBlockSectionProps>;
995
1024
  }
996
1025
  declare const GenericBlock: GenericBlock;
997
1026
 
998
- declare type TextComponents = 'span' | 'p' | HeadingElement;
999
1027
  /**
1000
1028
  * Defines the props of the component.
1001
1029
  */
@@ -1003,7 +1031,7 @@ interface TextProps extends GenericProps {
1003
1031
  /**
1004
1032
  * Color variant.
1005
1033
  */
1006
- color?: Color;
1034
+ color?: ColorPalette;
1007
1035
  /**
1008
1036
  * Lightened or darkened variant of the selected color.
1009
1037
  */
@@ -1015,7 +1043,7 @@ interface TextProps extends GenericProps {
1015
1043
  /**
1016
1044
  * Custom component to render the text.
1017
1045
  */
1018
- as: TextComponents;
1046
+ as: TextElement;
1019
1047
  /**
1020
1048
  * Control whether the text should truncate or not.
1021
1049
  * Setting as `true` will make the text truncate on a single line.
@@ -1024,6 +1052,11 @@ interface TextProps extends GenericProps {
1024
1052
  truncate?: boolean | {
1025
1053
  lines: number;
1026
1054
  };
1055
+ /**
1056
+ * Prevents text to wrap on multiple lines
1057
+ * (automatically activated when single line text truncate is activated).
1058
+ */
1059
+ noWrap?: boolean;
1027
1060
  }
1028
1061
  /**
1029
1062
  * Text component.
@@ -1247,6 +1280,32 @@ interface ImageBlockProps extends GenericProps, HasTheme {
1247
1280
  */
1248
1281
  declare const ImageBlock: Comp<ImageBlockProps, HTMLDivElement>;
1249
1282
 
1283
+ /**
1284
+ * Defines the props of the component.
1285
+ */
1286
+ interface InlineListProps extends GenericProps {
1287
+ /**
1288
+ * Text color.
1289
+ */
1290
+ color?: ColorPalette;
1291
+ /**
1292
+ * Lightened or darkened variant of the selected color.
1293
+ */
1294
+ colorVariant?: ColorVariant;
1295
+ /**
1296
+ * Typography variant.
1297
+ */
1298
+ typography?: Typography;
1299
+ }
1300
+ /**
1301
+ * InlineList component.
1302
+ *
1303
+ * @param props Component props.
1304
+ * @param ref Component ref.
1305
+ * @return React element.
1306
+ */
1307
+ declare const InlineList: Comp<InlineListProps>;
1308
+
1250
1309
  /**
1251
1310
  * Defines the props of the component.
1252
1311
  */
@@ -2624,4 +2683,4 @@ interface UserBlockProps extends GenericProps, HasTheme {
2624
2683
  */
2625
2684
  declare const UserBlock: Comp<UserBlockProps, HTMLDivElement>;
2626
2685
 
2627
- export { AlertDialog, AlertDialogProps, Autocomplete, AutocompleteMultiple, AutocompleteMultipleProps, AutocompleteProps, Avatar, AvatarProps, AvatarSize, Badge, BadgeProps, Button, ButtonEmphasis, ButtonGroup, ButtonGroupProps, ButtonProps, 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, GenericBlockProps, Grid, GridItem, GridItemProps, GridProps, Heading, HeadingLevelProvider, HeadingLevelProviderProps, HeadingProps, Icon, IconButton, IconButtonProps, IconProps, IconSizes, ImageBlock, ImageBlockCaptionPosition, ImageBlockProps, ImageBlockSize, InputHelper, InputHelperProps, InputLabel, InputLabelProps, Lightbox, LightboxProps, Link, LinkPreview, LinkPreviewProps, LinkProps, List, ListDivider, ListDividerProps, ListItem, ListItemProps, ListItemSize, ListProps, ListSubheader, ListSubheaderProps, MarginAutoAlignment, Message, MessageProps, Mosaic, MosaicProps, Notification, NotificationProps, Offset, Placement, Popover, PopoverProps, PostBlock, PostBlockProps, Progress, 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 };
2686
+ export { AlertDialog, AlertDialogProps, Autocomplete, AutocompleteMultiple, AutocompleteMultipleProps, AutocompleteProps, Avatar, AvatarProps, AvatarSize, Badge, BadgeProps, Button, ButtonEmphasis, ButtonGroup, ButtonGroupProps, ButtonProps, 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, 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, Notification, NotificationProps, Offset, Placement, Popover, PopoverProps, PostBlock, PostBlockProps, Progress, 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 };