@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.
package/types.d.ts CHANGED
@@ -27,6 +27,8 @@ export declare type Comp<P, T = HTMLElement> = {
27
27
  };
28
28
  /** Union type of all heading elements */
29
29
  export declare type HeadingElement = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
30
+ /** Union type of all text elements */
31
+ export declare type TextElement = "span" | "p" | HeadingElement;
30
32
  export interface HasTheme {
31
33
  /**
32
34
  * Theme adapting the component to light or dark background.
@@ -1133,6 +1135,24 @@ export interface FlexBoxProps extends GenericProps {
1133
1135
  * @return React element.
1134
1136
  */
1135
1137
  export declare const FlexBox: Comp<FlexBoxProps, HTMLDivElement>;
1138
+ /**
1139
+ * Accepted gap sizes for the generic block.
1140
+ */
1141
+ export declare const GenericBlockGapSize: Pick<{
1142
+ readonly xxs: "xxs";
1143
+ readonly xs: "xs";
1144
+ readonly s: "s";
1145
+ readonly m: "m";
1146
+ readonly l: "l";
1147
+ readonly xl: "xl";
1148
+ readonly xxl: "xxl";
1149
+ readonly tiny: "tiny";
1150
+ readonly regular: "regular";
1151
+ readonly medium: "medium";
1152
+ readonly big: "big";
1153
+ readonly huge: "huge";
1154
+ }, "tiny" | "regular" | "medium" | "big" | "huge">;
1155
+ export declare type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
1136
1156
  export interface GenericBlockProps extends FlexBoxProps {
1137
1157
  /**
1138
1158
  * Component to use as visual element.
@@ -1172,28 +1192,37 @@ export interface GenericBlockProps extends FlexBoxProps {
1172
1192
  * props to forward to the figure element.
1173
1193
  */
1174
1194
  figureProps?: Omit<FlexBoxProps, "children">;
1195
+ /**
1196
+ * Gap space between sections.
1197
+ */
1198
+ gap?: GenericBlockGapSize;
1175
1199
  }
1176
1200
  export declare type BaseGenericBlock = Comp<GenericBlockProps, HTMLDivElement>;
1201
+ export interface GenericBlockSectionProps extends FlexBoxProps {
1202
+ /**
1203
+ * Gap space between items.
1204
+ */
1205
+ gap?: GenericBlockGapSize;
1206
+ }
1177
1207
  export interface GenericBlock extends BaseGenericBlock {
1178
1208
  /**
1179
1209
  * Use `GenericBlock.Figure` component as children of the `GenericBlock` component as an alternative way to inject
1180
1210
  * the "figure" section of the block (instead of using `figure` and `figureProps` props).
1181
1211
  */
1182
- Figure: Comp<FlexBoxProps>;
1212
+ Figure: Comp<GenericBlockSectionProps>;
1183
1213
  /**
1184
1214
  * Use `GenericBlock.Content` component as children of the `GenericBlock` component as an alternative way to inject
1185
1215
  * the "content" section of the block (instead of using `content` and `contentProps` props).
1186
1216
  */
1187
- Content: Comp<FlexBoxProps>;
1217
+ Content: Comp<GenericBlockSectionProps>;
1188
1218
  /**
1189
1219
  * Use `GenericBlock.Actions` component as children of the `GenericBlock` component as an alternative way to inject
1190
1220
  * the "actions" section of the block (instead of using `actions` and `actionsProps` props).
1191
1221
  */
1192
- Actions: Comp<FlexBoxProps>;
1222
+ Actions: Comp<GenericBlockSectionProps>;
1193
1223
  }
1194
1224
  declare const BaseGenericBlock: BaseGenericBlock;
1195
1225
  export declare const GenericBlock: GenericBlock;
1196
- export declare type TextComponents = "span" | "p" | HeadingElement;
1197
1226
  /**
1198
1227
  * Defines the props of the component.
1199
1228
  */
@@ -1201,7 +1230,7 @@ export interface TextProps extends GenericProps {
1201
1230
  /**
1202
1231
  * Color variant.
1203
1232
  */
1204
- color?: Color;
1233
+ color?: ColorPalette;
1205
1234
  /**
1206
1235
  * Lightened or darkened variant of the selected color.
1207
1236
  */
@@ -1213,7 +1242,7 @@ export interface TextProps extends GenericProps {
1213
1242
  /**
1214
1243
  * Custom component to render the text.
1215
1244
  */
1216
- as: TextComponents;
1245
+ as: TextElement;
1217
1246
  /**
1218
1247
  * Control whether the text should truncate or not.
1219
1248
  * Setting as `true` will make the text truncate on a single line.
@@ -1222,6 +1251,11 @@ export interface TextProps extends GenericProps {
1222
1251
  truncate?: boolean | {
1223
1252
  lines: number;
1224
1253
  };
1254
+ /**
1255
+ * Prevents text to wrap on multiple lines
1256
+ * (automatically activated when single line text truncate is activated).
1257
+ */
1258
+ noWrap?: boolean;
1225
1259
  }
1226
1260
  /**
1227
1261
  * Text component.
@@ -1460,6 +1494,31 @@ export interface ImageBlockProps extends GenericProps, HasTheme {
1460
1494
  * @return React element.
1461
1495
  */
1462
1496
  export declare const ImageBlock: Comp<ImageBlockProps, HTMLDivElement>;
1497
+ /**
1498
+ * Defines the props of the component.
1499
+ */
1500
+ export interface InlineListProps extends GenericProps {
1501
+ /**
1502
+ * Text color.
1503
+ */
1504
+ color?: ColorPalette;
1505
+ /**
1506
+ * Lightened or darkened variant of the selected color.
1507
+ */
1508
+ colorVariant?: ColorVariant;
1509
+ /**
1510
+ * Typography variant.
1511
+ */
1512
+ typography?: Typography;
1513
+ }
1514
+ /**
1515
+ * InlineList component.
1516
+ *
1517
+ * @param props Component props.
1518
+ * @param ref Component ref.
1519
+ * @return React element.
1520
+ */
1521
+ export declare const InlineList: Comp<InlineListProps>;
1463
1522
  /**
1464
1523
  * Defines the props of the component.
1465
1524
  */