@cgi-learning-hub/ui 1.13.0-dev.1775748095 → 1.13.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/dist/index.cjs.js CHANGED
@@ -58650,7 +58650,9 @@ const Dropzone = ({
58650
58650
  };
58651
58651
  const EllipsisWithTooltip = ({
58652
58652
  children,
58653
- slotProps = {}
58653
+ slotProps = {},
58654
+ tooltipProps,
58655
+ typographyProps
58654
58656
  }) => {
58655
58657
  const [isTextEllipsized, setIsTextEllipsized] = React.useState(false);
58656
58658
  const textRef = React.useRef(null);
@@ -58679,7 +58681,7 @@ const EllipsisWithTooltip = ({
58679
58681
  {
58680
58682
  disableHoverListener: !isTextEllipsized,
58681
58683
  title: children,
58682
- ...slotProps.tooltip,
58684
+ ...slotProps.tooltip ?? tooltipProps,
58683
58685
  children: /* @__PURE__ */ jsxRuntime.jsx(
58684
58686
  Typography,
58685
58687
  {
@@ -58688,7 +58690,7 @@ const EllipsisWithTooltip = ({
58688
58690
  overflow: "hidden",
58689
58691
  textOverflow: "ellipsis",
58690
58692
  maxWidth: "100%",
58691
- ...slotProps.text,
58693
+ ...slotProps.text ?? typographyProps,
58692
58694
  children
58693
58695
  }
58694
58696
  )
@@ -58703,6 +58705,9 @@ const EmptyState = ({
58703
58705
  footer,
58704
58706
  imageHeight = 200,
58705
58707
  slotProps = {},
58708
+ imageProps,
58709
+ descriptionProps,
58710
+ titleProps,
58706
58711
  ...otherProps
58707
58712
  }) => {
58708
58713
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -58714,9 +58719,32 @@ const EmptyState = ({
58714
58719
  ...otherProps,
58715
58720
  ...slotProps.root,
58716
58721
  children: [
58717
- /* @__PURE__ */ jsxRuntime.jsx(Box, { height: imageHeight, width: "auto", children: image ?? /* @__PURE__ */ jsxRuntime.jsx("img", { src: imageSrc, height: "100%", ...slotProps.image }) }),
58718
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h2", mt: 3, ...slotProps.title, children: title }),
58719
- description ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { color: "textSecondary", mt: 2, ...slotProps.description, children: description }) : null,
58722
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { height: imageHeight, width: "auto", children: image ?? /* @__PURE__ */ jsxRuntime.jsx(
58723
+ "img",
58724
+ {
58725
+ src: imageSrc,
58726
+ height: "100%",
58727
+ ...slotProps.image ?? imageProps
58728
+ }
58729
+ ) }),
58730
+ /* @__PURE__ */ jsxRuntime.jsx(
58731
+ Typography,
58732
+ {
58733
+ variant: "h2",
58734
+ mt: 3,
58735
+ ...slotProps.title ?? titleProps,
58736
+ children: title
58737
+ }
58738
+ ),
58739
+ description ? /* @__PURE__ */ jsxRuntime.jsx(
58740
+ Typography,
58741
+ {
58742
+ color: "textSecondary",
58743
+ mt: 2,
58744
+ ...slotProps.description ?? descriptionProps,
58745
+ children: description
58746
+ }
58747
+ ) : null,
58720
58748
  footer ? /* @__PURE__ */ jsxRuntime.jsx(Box, { mt: 3, children: footer }) : null
58721
58749
  ]
58722
58750
  }
@@ -59201,6 +59229,8 @@ const Heading = ({
59201
59229
  iconColor,
59202
59230
  iconSize = 28,
59203
59231
  slotProps = {},
59232
+ iconProps,
59233
+ titleProps,
59204
59234
  ...otherProps
59205
59235
  }) => {
59206
59236
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -59222,10 +59252,18 @@ const Heading = ({
59222
59252
  color: iconColor?.[500],
59223
59253
  backgroundColor: iconColor?.[50]
59224
59254
  },
59225
- ...slotProps.icon
59255
+ ...slotProps.icon ?? iconProps
59226
59256
  }
59227
59257
  ) : null,
59228
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { component: "h3", variant: "h2", ...slotProps.text, children: title })
59258
+ /* @__PURE__ */ jsxRuntime.jsx(
59259
+ Typography,
59260
+ {
59261
+ component: "h3",
59262
+ variant: "h2",
59263
+ ...slotProps.text ?? titleProps,
59264
+ children: title
59265
+ }
59266
+ )
59229
59267
  ]
59230
59268
  }
59231
59269
  );
package/dist/index.d.ts CHANGED
@@ -298,15 +298,31 @@ export declare type EllipsisWithTooltipProps = {
298
298
  text?: Omit<TypographyProps, "noWrap" | "overflow" | "textOverflow">;
299
299
  tooltip?: Omit<TooltipProps, "children" | "title">;
300
300
  };
301
+ /**
302
+ * @deprecated Use `slotProps.tooltip` instead.
303
+ */
304
+ tooltipProps?: Omit<TooltipProps, "children" | "title">;
305
+ /**
306
+ * @deprecated Use `slotProps.text` instead.
307
+ */
308
+ typographyProps?: Omit<TypographyProps, "noWrap" | "overflow" | "textOverflow">;
301
309
  };
302
310
 
303
311
  export declare const EmptyState: FC<EmptyStateProps>;
304
312
 
305
313
  export declare type EmptyStateProps = ({
306
314
  image: ReactNode;
315
+ /**
316
+ * @deprecated Use `slotProps.image` instead.
317
+ */
318
+ imageProps?: never;
307
319
  imageSrc?: never;
308
320
  } | {
309
321
  image?: never;
322
+ /**
323
+ * @deprecated Use `slotProps.image` instead.
324
+ */
325
+ imageProps?: ImgHTMLAttributes<HTMLImageElement>;
310
326
  imageSrc: string;
311
327
  }) & {
312
328
  imageHeight?: string | number;
@@ -319,6 +335,14 @@ export declare type EmptyStateProps = ({
319
335
  title?: TypographyProps;
320
336
  description?: TypographyProps;
321
337
  };
338
+ /**
339
+ * @deprecated Use `slotProps.description` instead.
340
+ */
341
+ descriptionProps?: TypographyProps;
342
+ /**
343
+ * @deprecated Use `slotProps.title` instead.
344
+ */
345
+ titleProps?: TypographyProps;
322
346
  } & StackProps;
323
347
 
324
348
  export declare interface ExtendedTreeItemProps extends TreeItemProps {
@@ -391,6 +415,14 @@ export declare type HeadingProps = {
391
415
  text?: TypographyProps;
392
416
  };
393
417
  iconSize?: number;
418
+ /**
419
+ * @deprecated Use `slotProps.icon` instead.
420
+ */
421
+ iconProps?: SvgIconProps;
422
+ /**
423
+ * @deprecated Use `slotProps.text` instead.
424
+ */
425
+ titleProps?: TypographyProps;
394
426
  } & StackProps;
395
427
 
396
428
  export declare type HexaColor = `#${string}`;
package/dist/index.es.js CHANGED
@@ -58633,7 +58633,9 @@ const Dropzone = ({
58633
58633
  };
58634
58634
  const EllipsisWithTooltip = ({
58635
58635
  children,
58636
- slotProps = {}
58636
+ slotProps = {},
58637
+ tooltipProps,
58638
+ typographyProps
58637
58639
  }) => {
58638
58640
  const [isTextEllipsized, setIsTextEllipsized] = useState(false);
58639
58641
  const textRef = useRef(null);
@@ -58662,7 +58664,7 @@ const EllipsisWithTooltip = ({
58662
58664
  {
58663
58665
  disableHoverListener: !isTextEllipsized,
58664
58666
  title: children,
58665
- ...slotProps.tooltip,
58667
+ ...slotProps.tooltip ?? tooltipProps,
58666
58668
  children: /* @__PURE__ */ jsx(
58667
58669
  Typography,
58668
58670
  {
@@ -58671,7 +58673,7 @@ const EllipsisWithTooltip = ({
58671
58673
  overflow: "hidden",
58672
58674
  textOverflow: "ellipsis",
58673
58675
  maxWidth: "100%",
58674
- ...slotProps.text,
58676
+ ...slotProps.text ?? typographyProps,
58675
58677
  children
58676
58678
  }
58677
58679
  )
@@ -58686,6 +58688,9 @@ const EmptyState = ({
58686
58688
  footer,
58687
58689
  imageHeight = 200,
58688
58690
  slotProps = {},
58691
+ imageProps,
58692
+ descriptionProps,
58693
+ titleProps,
58689
58694
  ...otherProps
58690
58695
  }) => {
58691
58696
  return /* @__PURE__ */ jsxs(
@@ -58697,9 +58702,32 @@ const EmptyState = ({
58697
58702
  ...otherProps,
58698
58703
  ...slotProps.root,
58699
58704
  children: [
58700
- /* @__PURE__ */ jsx(Box, { height: imageHeight, width: "auto", children: image ?? /* @__PURE__ */ jsx("img", { src: imageSrc, height: "100%", ...slotProps.image }) }),
58701
- /* @__PURE__ */ jsx(Typography, { variant: "h2", mt: 3, ...slotProps.title, children: title }),
58702
- description ? /* @__PURE__ */ jsx(Typography, { color: "textSecondary", mt: 2, ...slotProps.description, children: description }) : null,
58705
+ /* @__PURE__ */ jsx(Box, { height: imageHeight, width: "auto", children: image ?? /* @__PURE__ */ jsx(
58706
+ "img",
58707
+ {
58708
+ src: imageSrc,
58709
+ height: "100%",
58710
+ ...slotProps.image ?? imageProps
58711
+ }
58712
+ ) }),
58713
+ /* @__PURE__ */ jsx(
58714
+ Typography,
58715
+ {
58716
+ variant: "h2",
58717
+ mt: 3,
58718
+ ...slotProps.title ?? titleProps,
58719
+ children: title
58720
+ }
58721
+ ),
58722
+ description ? /* @__PURE__ */ jsx(
58723
+ Typography,
58724
+ {
58725
+ color: "textSecondary",
58726
+ mt: 2,
58727
+ ...slotProps.description ?? descriptionProps,
58728
+ children: description
58729
+ }
58730
+ ) : null,
58703
58731
  footer ? /* @__PURE__ */ jsx(Box, { mt: 3, children: footer }) : null
58704
58732
  ]
58705
58733
  }
@@ -59184,6 +59212,8 @@ const Heading = ({
59184
59212
  iconColor,
59185
59213
  iconSize = 28,
59186
59214
  slotProps = {},
59215
+ iconProps,
59216
+ titleProps,
59187
59217
  ...otherProps
59188
59218
  }) => {
59189
59219
  return /* @__PURE__ */ jsxs(
@@ -59205,10 +59235,18 @@ const Heading = ({
59205
59235
  color: iconColor?.[500],
59206
59236
  backgroundColor: iconColor?.[50]
59207
59237
  },
59208
- ...slotProps.icon
59238
+ ...slotProps.icon ?? iconProps
59209
59239
  }
59210
59240
  ) : null,
59211
- /* @__PURE__ */ jsx(Typography, { component: "h3", variant: "h2", ...slotProps.text, children: title })
59241
+ /* @__PURE__ */ jsx(
59242
+ Typography,
59243
+ {
59244
+ component: "h3",
59245
+ variant: "h2",
59246
+ ...slotProps.text ?? titleProps,
59247
+ children: title
59248
+ }
59249
+ )
59212
59250
  ]
59213
59251
  }
59214
59252
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.13.0-dev.1775748095",
3
+ "version": "1.13.0",
4
4
  "description": "React component library for Hub's design system, built on Material UI with custom and extended components.",
5
5
  "keywords": [
6
6
  "cgi-learning-hub",