@trackunit/react-components 1.25.1 → 1.25.4

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/index.cjs.js CHANGED
@@ -8658,6 +8658,24 @@ const useSheetLifecycle = ({ isOpen, entryAnimation, visuallyOpen, variant, cont
8658
8658
  react.useEffect(() => {
8659
8659
  onCloseCompleteRef.current = onCloseComplete;
8660
8660
  }, [onCloseComplete]);
8661
+ // In headless browsers and test environments CSS transitions are suppressed,
8662
+ // so transitionend never fires. After one animation frame we can tell whether
8663
+ // any transition actually started: if getAnimations() is empty the close should
8664
+ // complete immediately rather than waiting for the safety timeout in useModal.
8665
+ react.useEffect(() => {
8666
+ if (isOpen)
8667
+ return;
8668
+ const rafId = requestAnimationFrame(() => {
8669
+ const panel = panelRef.current;
8670
+ if (!panel || isOpenRef.current)
8671
+ return;
8672
+ if (typeof panel.getAnimations === "function" && panel.getAnimations().length === 0) {
8673
+ dispatch({ type: "UNMOUNT" });
8674
+ onCloseCompleteRef.current?.();
8675
+ }
8676
+ });
8677
+ return () => cancelAnimationFrame(rafId);
8678
+ }, [isOpen, dispatch, panelRef]);
8661
8679
  const handleTransitionEnd = react.useCallback((e) => {
8662
8680
  if (e.target !== e.currentTarget || isOpenRef.current)
8663
8681
  return;
package/index.esm.js CHANGED
@@ -8656,6 +8656,24 @@ const useSheetLifecycle = ({ isOpen, entryAnimation, visuallyOpen, variant, cont
8656
8656
  useEffect(() => {
8657
8657
  onCloseCompleteRef.current = onCloseComplete;
8658
8658
  }, [onCloseComplete]);
8659
+ // In headless browsers and test environments CSS transitions are suppressed,
8660
+ // so transitionend never fires. After one animation frame we can tell whether
8661
+ // any transition actually started: if getAnimations() is empty the close should
8662
+ // complete immediately rather than waiting for the safety timeout in useModal.
8663
+ useEffect(() => {
8664
+ if (isOpen)
8665
+ return;
8666
+ const rafId = requestAnimationFrame(() => {
8667
+ const panel = panelRef.current;
8668
+ if (!panel || isOpenRef.current)
8669
+ return;
8670
+ if (typeof panel.getAnimations === "function" && panel.getAnimations().length === 0) {
8671
+ dispatch({ type: "UNMOUNT" });
8672
+ onCloseCompleteRef.current?.();
8673
+ }
8674
+ });
8675
+ return () => cancelAnimationFrame(rafId);
8676
+ }, [isOpen, dispatch, panelRef]);
8659
8677
  const handleTransitionEnd = useCallback((e) => {
8660
8678
  if (e.target !== e.currentTarget || isOpenRef.current)
8661
8679
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "1.25.1",
3
+ "version": "1.25.4",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "migrations": "./migrations.json",
@@ -14,17 +14,17 @@
14
14
  "@floating-ui/react": "^0.26.25",
15
15
  "string-ts": "^2.0.0",
16
16
  "tailwind-merge": "^2.0.0",
17
- "@trackunit/ui-design-tokens": "1.13.5",
18
- "@trackunit/css-class-variance-utilities": "1.13.5",
19
- "@trackunit/shared-utils": "1.15.5",
20
- "@trackunit/ui-icons": "1.13.5",
17
+ "@trackunit/ui-design-tokens": "1.13.6",
18
+ "@trackunit/css-class-variance-utilities": "1.13.6",
19
+ "@trackunit/shared-utils": "1.15.6",
20
+ "@trackunit/ui-icons": "1.13.6",
21
21
  "es-toolkit": "^1.39.10",
22
22
  "@tanstack/react-virtual": "3.13.12",
23
23
  "dequal": "^2.0.3",
24
24
  "fflate": "^0.8.2",
25
25
  "superjson": "^2.2.6",
26
26
  "zod": "^3.25.76",
27
- "@trackunit/i18n-library-translation": "1.22.0"
27
+ "@trackunit/i18n-library-translation": "1.22.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^19.0.0",
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "zurück",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Schließen",
7
+ "moreMenu.buttonLabel": "Mehr anzeigen"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "powrót",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Zamknij",
7
+ "moreMenu.buttonLabel": "Pokaż więcej"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "voltar",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Fechar",
7
+ "moreMenu.buttonLabel": "Mostrar mais"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "назад",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Закрыть",
7
+ "moreMenu.buttonLabel": "Показать больше"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "înapoi",
5
+ "breadcrumb.expandButton": "extindere",
6
+ "cardHeader.closeButton": "Închidere",
7
+ "moreMenu.buttonLabel": "Afișare mai mult"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "atrás",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Cerrar",
7
+ "moreMenu.buttonLabel": "Mostrar más"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "tillbaka",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Stäng",
7
+ "moreMenu.buttonLabel": "Visa mer"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "戻る",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "閉じる",
7
+ "moreMenu.buttonLabel": "Show more"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "ย้อนกลับ",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "ปิด",
7
+ "moreMenu.buttonLabel": "แสดงเพิ่มเติม"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "tilbage",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Luk",
7
+ "moreMenu.buttonLabel": "Vis mere"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "zpět",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Zavřít",
7
+ "moreMenu.buttonLabel": "Zobrazit více"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "terug",
5
+ "breadcrumb.expandButton": "uitklappen",
6
+ "cardHeader.closeButton": "Close",
7
+ "moreMenu.buttonLabel": "Meer weergeven"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "retour",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Fermer",
7
+ "moreMenu.buttonLabel": "Afficher plus"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "takaisin",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Sulje",
7
+ "moreMenu.buttonLabel": "Näytä lisää"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "vissza",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Close",
7
+ "moreMenu.buttonLabel": "Több megjelenítése"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "indietro",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Chiudi",
7
+ "moreMenu.buttonLabel": "Mostra di più"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
-
4
+ "breadcrumb.backButton": "tilbake",
5
+ "breadcrumb.expandButton": "expand",
6
+ "cardHeader.closeButton": "Lukk",
7
+ "moreMenu.buttonLabel": "Vis mer"
5
8
  };
6
9
 
7
10
  exports.default = translation;
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "zurück",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Schließen",
5
+ "moreMenu.buttonLabel": "Mehr anzeigen"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "powrót",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Zamknij",
5
+ "moreMenu.buttonLabel": "Pokaż więcej"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "voltar",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Fechar",
5
+ "moreMenu.buttonLabel": "Mostrar mais"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "назад",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Закрыть",
5
+ "moreMenu.buttonLabel": "Показать больше"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "înapoi",
3
+ "breadcrumb.expandButton": "extindere",
4
+ "cardHeader.closeButton": "Închidere",
5
+ "moreMenu.buttonLabel": "Afișare mai mult"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "atrás",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Cerrar",
5
+ "moreMenu.buttonLabel": "Mostrar más"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "tillbaka",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Stäng",
5
+ "moreMenu.buttonLabel": "Visa mer"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "戻る",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "閉じる",
5
+ "moreMenu.buttonLabel": "Show more"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "ย้อนกลับ",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "ปิด",
5
+ "moreMenu.buttonLabel": "แสดงเพิ่มเติม"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "tilbage",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Luk",
5
+ "moreMenu.buttonLabel": "Vis mere"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "zpět",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Zavřít",
5
+ "moreMenu.buttonLabel": "Zobrazit více"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "terug",
3
+ "breadcrumb.expandButton": "uitklappen",
4
+ "cardHeader.closeButton": "Close",
5
+ "moreMenu.buttonLabel": "Meer weergeven"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "retour",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Fermer",
5
+ "moreMenu.buttonLabel": "Afficher plus"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "takaisin",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Sulje",
5
+ "moreMenu.buttonLabel": "Näytä lisää"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "vissza",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Close",
5
+ "moreMenu.buttonLabel": "Több megjelenítése"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "indietro",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Chiudi",
5
+ "moreMenu.buttonLabel": "Mostra di più"
3
6
  };
4
7
 
5
8
  export { translation as default };
@@ -1,5 +1,8 @@
1
1
  var translation = {
2
-
2
+ "breadcrumb.backButton": "tilbake",
3
+ "breadcrumb.expandButton": "expand",
4
+ "cardHeader.closeButton": "Lukk",
5
+ "moreMenu.buttonLabel": "Vis mer"
3
6
  };
4
7
 
5
8
  export { translation as default };