@cgi-learning-hub/ui 1.3.4-dev.1736331547 → 1.3.4-dev.1736334416

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.
@@ -1 +1 @@
1
- "use strict";const n=require("react/jsx-runtime"),o=require("@mui/material"),t=require("react"),x=({children:r,tooltipProps:l,typographyProps:c})=>{const[u,f]=t.useState(!1),e=t.useRef(null);return t.useEffect(()=>{const s=()=>{if(e.current){const{scrollWidth:p,clientWidth:a}=e.current;f(p>a)}},i=new ResizeObserver(()=>{s()});return e.current&&i.observe(e.current),s(),()=>{e.current&&i.unobserve(e.current)}},[]),n.jsx(o.Tooltip,{disableHoverListener:!u,title:r,...l,children:n.jsx(o.Typography,{ref:e,...c,noWrap:!0,overflow:"hidden",textOverflow:"ellipsis",children:r})})};module.exports=x;
1
+ "use strict";const o=require("react/jsx-runtime"),n=require("@mui/material"),t=require("react"),x=({children:r,tooltipProps:l,typographyProps:c={}})=>{const[u,p]=t.useState(!1),e=t.useRef(null);t.useEffect(()=>{const s=()=>{if(e.current){const{scrollWidth:a,clientWidth:v}=e.current;p(a>v)}},i=new ResizeObserver(()=>{s()});return e.current&&i.observe(e.current),s(),()=>{e.current&&i.unobserve(e.current)}},[]);const{noWrap:d,overflow:h,textOverflow:T,...f}=c;return o.jsx(n.Tooltip,{disableHoverListener:!u,title:r,...l,children:o.jsx(n.Typography,{ref:e,noWrap:!0,overflow:"hidden",textOverflow:"ellipsis",...f,children:r})})};module.exports=x;
@@ -1,44 +1,46 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { Tooltip as p, Typography as d } from "@mui/material";
3
- import { useState as a, useRef as v, useEffect as h } from "react";
4
- const E = ({
5
- children: t,
6
- tooltipProps: o,
7
- typographyProps: l
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { Tooltip as a, Typography as v } from "@mui/material";
3
+ import { useState as d, useRef as h, useEffect as x } from "react";
4
+ const y = ({
5
+ children: r,
6
+ tooltipProps: i,
7
+ typographyProps: l = {}
8
8
  }) => {
9
- const [n, c] = a(!1), e = v(null);
10
- return h(() => {
11
- const r = () => {
9
+ const [n, c] = d(!1), e = h(null);
10
+ x(() => {
11
+ const t = () => {
12
12
  if (e.current) {
13
13
  const { scrollWidth: f, clientWidth: u } = e.current;
14
14
  c(f > u);
15
15
  }
16
- }, s = new ResizeObserver(() => {
17
- r();
16
+ }, o = new ResizeObserver(() => {
17
+ t();
18
18
  });
19
- return e.current && s.observe(e.current), r(), () => {
20
- e.current && s.unobserve(e.current);
19
+ return e.current && o.observe(e.current), t(), () => {
20
+ e.current && o.unobserve(e.current);
21
21
  };
22
- }, []), /* @__PURE__ */ i(
23
- p,
22
+ }, []);
23
+ const { noWrap: m, overflow: T, textOverflow: b, ...p } = l;
24
+ return /* @__PURE__ */ s(
25
+ a,
24
26
  {
25
27
  disableHoverListener: !n,
26
- title: t,
27
- ...o,
28
- children: /* @__PURE__ */ i(
29
- d,
28
+ title: r,
29
+ ...i,
30
+ children: /* @__PURE__ */ s(
31
+ v,
30
32
  {
31
33
  ref: e,
32
- ...l,
33
34
  noWrap: !0,
34
35
  overflow: "hidden",
35
36
  textOverflow: "ellipsis",
36
- children: t
37
+ ...p,
38
+ children: r
37
39
  }
38
40
  )
39
41
  }
40
42
  );
41
43
  };
42
44
  export {
43
- E as default
45
+ y as default
44
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.3.4-dev.1736331547",
3
+ "version": "1.3.4-dev.1736334416",
4
4
  "private": false,
5
5
  "author": "CGI Learning-hub Team",
6
6
  "description": "@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features",