@connectif/ui-components 6.0.7 → 7.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.0.0] - 2026-04-10
4
+
5
+ ### Deprecated
6
+
7
+ - Deprecated `minimizeIconId` and `onMinimize` props in the `MinimizableWindow` component.
8
+
3
9
  ## [6.0.7] - 2026-04-09
4
10
 
5
11
  ### Fixed
@@ -27,7 +27,7 @@ export type MinimizableWindowProps = React.PropsWithChildren<{
27
27
  */
28
28
  backButton?: React.ReactNode;
29
29
  /**
30
- * Coords to the element to minimize window
30
+ * Coords to the element to close window
31
31
  */
32
32
  targetElement: {
33
33
  x: number;
@@ -41,10 +41,6 @@ export type MinimizableWindowProps = React.PropsWithChildren<{
41
41
  * To change icon sizes. Default S
42
42
  */
43
43
  iconSizes?: IconButtonProps['size'];
44
- /**
45
- * The icon ID for the minimize button.
46
- */
47
- minimizeIconId?: IconButtonProps['iconId'];
48
44
  /**
49
45
  * The icon ID for the close button.
50
46
  */
@@ -54,13 +50,9 @@ export type MinimizableWindowProps = React.PropsWithChildren<{
54
50
  */
55
51
  backIconId?: IconButtonProps['iconId'];
56
52
  /**
57
- * Custom actions to display on the right side of the header, next to the minimize and close buttons.
53
+ * Custom actions to display on the right side of the header, next to the close button.
58
54
  */
59
55
  rightActions?: React.ReactNode;
60
- /**
61
- * Callback fired when the component requests to be minimized.
62
- */
63
- onMinimize: () => void;
64
56
  /**
65
57
  * Callback fired when the component requests to be closed.
66
58
  */
@@ -71,8 +63,8 @@ export type MinimizableWindowProps = React.PropsWithChildren<{
71
63
  onBack?: () => void;
72
64
  } & Pick<StackProps, 'sx'>>;
73
65
  /**
74
- * A component that displays a window with a title, a minimize button, and a close button.
75
- * The window can be minimized and closed.
66
+ * A component that displays a window with a title and a close button.
67
+ * The window closes by shrinking towards a target element.
76
68
  * The window can have a back button.
77
69
  * The ref object exposes the window and header elements.
78
70
  */
@@ -97,7 +89,7 @@ declare const MinimizableWindow: React.ForwardRefExoticComponent<{
97
89
  */
98
90
  backButton?: React.ReactNode;
99
91
  /**
100
- * Coords to the element to minimize window
92
+ * Coords to the element to close window
101
93
  */
102
94
  targetElement: {
103
95
  x: number;
@@ -111,10 +103,6 @@ declare const MinimizableWindow: React.ForwardRefExoticComponent<{
111
103
  * To change icon sizes. Default S
112
104
  */
113
105
  iconSizes?: IconButtonProps["size"];
114
- /**
115
- * The icon ID for the minimize button.
116
- */
117
- minimizeIconId?: IconButtonProps["iconId"];
118
106
  /**
119
107
  * The icon ID for the close button.
120
108
  */
@@ -124,13 +112,9 @@ declare const MinimizableWindow: React.ForwardRefExoticComponent<{
124
112
  */
125
113
  backIconId?: IconButtonProps["iconId"];
126
114
  /**
127
- * Custom actions to display on the right side of the header, next to the minimize and close buttons.
115
+ * Custom actions to display on the right side of the header, next to the close button.
128
116
  */
129
117
  rightActions?: React.ReactNode;
130
- /**
131
- * Callback fired when the component requests to be minimized.
132
- */
133
- onMinimize: () => void;
134
118
  /**
135
119
  * Callback fired when the component requests to be closed.
136
120
  */
package/dist/i18n/en.d.ts CHANGED
@@ -2,7 +2,6 @@ export declare const en: {
2
2
  MINIMIZABLE_WINDOW: {
3
3
  CLOSE: string;
4
4
  GO_BACK: string;
5
- MINIMIZE: string;
6
5
  };
7
6
  IMAGE_EDITOR: {
8
7
  ACTUAL_SIZE: string;
package/dist/i18n/es.d.ts CHANGED
@@ -2,7 +2,6 @@ export declare const es: {
2
2
  MINIMIZABLE_WINDOW: {
3
3
  CLOSE: string;
4
4
  GO_BACK: string;
5
- MINIMIZE: string;
6
5
  };
7
6
  IMAGE_EDITOR: {
8
7
  ACTUAL_SIZE: string;
package/dist/i18n/fr.d.ts CHANGED
@@ -2,7 +2,6 @@ export declare const fr: {
2
2
  MINIMIZABLE_WINDOW: {
3
3
  CLOSE: string;
4
4
  GO_BACK: string;
5
- MINIMIZE: string;
6
5
  };
7
6
  IMAGE_EDITOR: {
8
7
  ACTUAL_SIZE: string;
package/dist/i18n/it.d.ts CHANGED
@@ -2,7 +2,6 @@ export declare const it: {
2
2
  MINIMIZABLE_WINDOW: {
3
3
  CLOSE: string;
4
4
  GO_BACK: string;
5
- MINIMIZE: string;
6
5
  };
7
6
  IMAGE_EDITOR: {
8
7
  ACTUAL_SIZE: string;
package/dist/i18n/pt.d.ts CHANGED
@@ -2,7 +2,6 @@ export declare const pt: {
2
2
  MINIMIZABLE_WINDOW: {
3
3
  CLOSE: string;
4
4
  GO_BACK: string;
5
- MINIMIZE: string;
6
5
  };
7
6
  IMAGE_EDITOR: {
8
7
  ACTUAL_SIZE: string;
package/dist/index.js CHANGED
@@ -15103,8 +15103,7 @@ __export(en_exports6, {
15103
15103
  });
15104
15104
  var MINIMIZABLE_WINDOW = {
15105
15105
  CLOSE: "Close",
15106
- GO_BACK: "Go back",
15107
- MINIMIZE: "Minimize"
15106
+ GO_BACK: "Go back"
15108
15107
  };
15109
15108
  var en_default6 = {
15110
15109
  MINIMIZABLE_WINDOW
@@ -15390,8 +15389,7 @@ __export(es_exports6, {
15390
15389
  });
15391
15390
  var MINIMIZABLE_WINDOW2 = {
15392
15391
  CLOSE: "Cerrar",
15393
- GO_BACK: "Ir atr\xE1s",
15394
- MINIMIZE: "Minimizar"
15392
+ GO_BACK: "Ir atr\xE1s"
15395
15393
  };
15396
15394
  var es_default6 = {
15397
15395
  MINIMIZABLE_WINDOW: MINIMIZABLE_WINDOW2
@@ -15677,8 +15675,7 @@ __export(fr_exports6, {
15677
15675
  });
15678
15676
  var MINIMIZABLE_WINDOW3 = {
15679
15677
  CLOSE: "Fermer",
15680
- GO_BACK: "Retourner en arri\xE8re",
15681
- MINIMIZE: "R\xE9duire"
15678
+ GO_BACK: "Retourner en arri\xE8re"
15682
15679
  };
15683
15680
  var fr_default6 = {
15684
15681
  MINIMIZABLE_WINDOW: MINIMIZABLE_WINDOW3
@@ -15964,8 +15961,7 @@ __export(it_exports6, {
15964
15961
  });
15965
15962
  var MINIMIZABLE_WINDOW4 = {
15966
15963
  CLOSE: "Chiudere",
15967
- GO_BACK: "Torna indietro",
15968
- MINIMIZE: "Ridurre al minimo"
15964
+ GO_BACK: "Torna indietro"
15969
15965
  };
15970
15966
  var it_default6 = {
15971
15967
  MINIMIZABLE_WINDOW: MINIMIZABLE_WINDOW4
@@ -16251,8 +16247,7 @@ __export(pt_exports6, {
16251
16247
  });
16252
16248
  var MINIMIZABLE_WINDOW5 = {
16253
16249
  CLOSE: "Fechar",
16254
- GO_BACK: "Voltar atr\xE1s",
16255
- MINIMIZE: "Minimizar"
16250
+ GO_BACK: "Voltar atr\xE1s"
16256
16251
  };
16257
16252
  var pt_default6 = {
16258
16253
  MINIMIZABLE_WINDOW: MINIMIZABLE_WINDOW5
@@ -28734,11 +28729,9 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
28734
28729
  targetElement,
28735
28730
  contentHeight,
28736
28731
  iconSizes: iconSizes4 = "S",
28737
- minimizeIconId = "minus",
28738
28732
  closeIconId = "close",
28739
28733
  backIconId = "arrow-left",
28740
28734
  rightActions,
28741
- onMinimize,
28742
28735
  onClose,
28743
28736
  onBack
28744
28737
  }, ref) {
@@ -28795,26 +28788,6 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
28795
28788
  overlayRef.current.style.opacity = "0";
28796
28789
  }
28797
28790
  };
28798
- const onCloseModal = (ev) => {
28799
- ev.preventDefault();
28800
- ev.stopPropagation();
28801
- setTimeout(() => {
28802
- onClose && onClose();
28803
- }, 200);
28804
- setTimeout(() => {
28805
- if (overlayRef.current) {
28806
- overlayRef.current.style.display = "none";
28807
- }
28808
- }, 500);
28809
- setTimeout(() => {
28810
- if (overlayRef.current) {
28811
- overlayRef.current.style.removeProperty("left");
28812
- overlayRef.current.style.removeProperty("top");
28813
- overlayRef.current.style.removeProperty("display");
28814
- overlayRef.current.style.removeProperty("transition");
28815
- }
28816
- }, 750);
28817
- };
28818
28791
  return /* @__PURE__ */ jsxs89(Fragment44, { children: [
28819
28792
  isDraggingState && /* @__PURE__ */ jsx185(
28820
28793
  Box_default2,
@@ -28918,44 +28891,27 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
28918
28891
  onMouseDown: (ev) => ev.stopPropagation(),
28919
28892
  children: [
28920
28893
  rightActions,
28921
- /* @__PURE__ */ jsx185(Box_default2, { children: /* @__PURE__ */ jsx185(
28894
+ closeable && /* @__PURE__ */ jsx185(Box_default2, { children: /* @__PURE__ */ jsx185(
28922
28895
  Tooltip_default,
28923
28896
  {
28924
- title: t("MINIMIZABLE_WINDOW.MINIMIZE"),
28897
+ title: t("MINIMIZABLE_WINDOW.CLOSE"),
28925
28898
  zIndex: 999999,
28926
28899
  placement: "top",
28927
28900
  children: /* @__PURE__ */ jsx185(
28928
28901
  IconButton_default,
28929
28902
  {
28930
28903
  size: iconSizes4,
28931
- iconId: minimizeIconId,
28904
+ iconId: closeIconId,
28932
28905
  onClick: () => {
28933
28906
  applyMinimizeTransition();
28934
28907
  setTimeout(() => {
28935
- onMinimize();
28908
+ onClose && onClose();
28936
28909
  }, 500);
28937
28910
  },
28938
28911
  sx: iconButtonsStyles
28939
28912
  }
28940
28913
  )
28941
28914
  }
28942
- ) }),
28943
- closeable && /* @__PURE__ */ jsx185(Box_default2, { sx: { padding: "0 8px" }, children: /* @__PURE__ */ jsx185(
28944
- Tooltip_default,
28945
- {
28946
- title: t("MINIMIZABLE_WINDOW.CLOSE"),
28947
- zIndex: 999999,
28948
- placement: "top",
28949
- children: /* @__PURE__ */ jsx185(
28950
- IconButton_default,
28951
- {
28952
- size: iconSizes4,
28953
- iconId: closeIconId,
28954
- onClick: onCloseModal,
28955
- sx: iconButtonsStyles
28956
- }
28957
- )
28958
- }
28959
28915
  ) })
28960
28916
  ]
28961
28917
  }