cetec-design-system 4.0.0-0 → 4.0.1-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.js CHANGED
@@ -19239,8 +19239,11 @@ const Menu = (props) => {
19239
19239
  return;
19240
19240
  }
19241
19241
  const updateWrapperSize = () => {
19242
- const nextWidth = Math.ceil(sizeProbe.scrollWidth);
19243
- const nextHeight = Math.ceil(sizeProbe.scrollHeight);
19242
+ const rect = sizeProbe.getBoundingClientRect();
19243
+ const activeLevelEl = activeLevelRef.current;
19244
+ const scrollbarWidth = activeLevelEl && !shouldUsePanelDiginProbeFill ? activeLevelEl.offsetWidth - activeLevelEl.clientWidth : 0;
19245
+ const nextWidth = Math.ceil(rect.width) + scrollbarWidth;
19246
+ const nextHeight = Math.ceil(rect.height);
19244
19247
  setWrapperSize((previous) => {
19245
19248
  if (previous.width === nextWidth && previous.height === nextHeight) {
19246
19249
  return previous;
@@ -19254,6 +19257,9 @@ const Menu = (props) => {
19254
19257
  updateWrapperSize();
19255
19258
  const resizeObserver = new ResizeObserver(updateWrapperSize);
19256
19259
  resizeObserver.observe(sizeProbe);
19260
+ if (activeLevelRef.current) {
19261
+ resizeObserver.observe(activeLevelRef.current);
19262
+ }
19257
19263
  return () => {
19258
19264
  resizeObserver.disconnect();
19259
19265
  };
@@ -19265,7 +19271,8 @@ const Menu = (props) => {
19265
19271
  diginDepth,
19266
19272
  hasVisibleResults,
19267
19273
  isMenuVisible,
19268
- shouldUseDiginSizing
19274
+ shouldUseDiginSizing,
19275
+ shouldUsePanelDiginProbeFill
19269
19276
  ]);
19270
19277
  useLayoutEffect(() => {
19271
19278
  var _a2;