ublo-lib 1.42.29 → 1.42.30

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
- {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../../src/common/components/collapsible/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAqBF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,aAAsB,EACtB,MAAY,EACZ,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,EAAE,KAAK,2CAqEP"}
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../../src/common/components/collapsible/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAqBF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,aAAsB,EACtB,MAAY,EACZ,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,EAAE,KAAK,2CAsEP"}
@@ -52,8 +52,9 @@ export default function Collapsible({ gradientColor = "#fff", height = 150, lang
52
52
  }, [lang, path]);
53
53
  React.useEffect(() => {
54
54
  if (opened || !hasOverflow) {
55
- const childrenHeight = childrenRef.current?.offsetHeight + 80;
56
- setContainerHeight(childrenHeight);
55
+ const childrenHeight = childrenRef.current?.offsetHeight;
56
+ const patchedHeight = childrenHeight ? childrenHeight + 80 : 0;
57
+ setContainerHeight(patchedHeight);
57
58
  }
58
59
  else {
59
60
  setContainerHeight(height);
@@ -62,6 +63,6 @@ export default function Collapsible({ gradientColor = "#fff", height = 150, lang
62
63
  const key = !isConnected ? lang + path : undefined;
63
64
  return (_jsxs("div", { ref: parentRef, className: classes, style: {
64
65
  "--gradient-color": gradientColor,
65
- height: containerHeight,
66
+ height: isConnected ? "auto" : containerHeight,
66
67
  }, children: [_jsx("div", { ref: childrenRef, children: children }), hasOverflow && (_jsxs(Button, { className: styles.message, onClick: toggleOpen, children: [message, _jsx(Icon, {})] }))] }, key));
67
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.42.29",
3
+ "version": "1.42.30",
4
4
  "peerDependencies": {
5
5
  "classnames": "^2.5.1",
6
6
  "dt-design-system": "^3.10.8",