@ssa-ui-kit/core 3.26.2 → 3.26.3

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
@@ -70768,13 +70768,14 @@ const CollapsibleNavBar = props => {
70768
70768
  const showHeader = hasHeaderContent(header);
70769
70769
 
70770
70770
  // Collapse whenever the viewport changes size — but not on mount, which
70771
- // would immediately undo `defaultExpanded`.
70772
- const hasMeasured = (0,external_react_.useRef)(false);
70771
+ // would immediately undo `defaultExpanded`. Compared against the last width
70772
+ // rather than a run-once flag, so StrictMode's repeated mount run is a no-op.
70773
+ const lastWidth = (0,external_react_.useRef)(width);
70773
70774
  (0,external_react_.useEffect)(() => {
70774
- if (!hasMeasured.current) {
70775
- hasMeasured.current = true;
70775
+ if (lastWidth.current === width) {
70776
70776
  return;
70777
70777
  }
70778
+ lastWidth.current = width;
70778
70779
  setChecked(false);
70779
70780
  }, [width]);
70780
70781
  (0,external_react_.useEffect)(() => {
package/dist/index.mjs CHANGED
@@ -70428,13 +70428,14 @@ const CollapsibleNavBar = props => {
70428
70428
  const showHeader = hasHeaderContent(header);
70429
70429
 
70430
70430
  // Collapse whenever the viewport changes size — but not on mount, which
70431
- // would immediately undo `defaultExpanded`.
70432
- const hasMeasured = (0,external_react_.useRef)(false);
70431
+ // would immediately undo `defaultExpanded`. Compared against the last width
70432
+ // rather than a run-once flag, so StrictMode's repeated mount run is a no-op.
70433
+ const lastWidth = (0,external_react_.useRef)(width);
70433
70434
  (0,external_react_.useEffect)(() => {
70434
- if (!hasMeasured.current) {
70435
- hasMeasured.current = true;
70435
+ if (lastWidth.current === width) {
70436
70436
  return;
70437
70437
  }
70438
+ lastWidth.current = width;
70438
70439
  setChecked(false);
70439
70440
  }, [width]);
70440
70441
  (0,external_react_.useEffect)(() => {