@connectif/ui-components 6.0.7 → 7.0.1
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 +13 -0
- package/dist/components/input/autocomplete/Autocomplete.d.ts +6 -1
- package/dist/components/window/MinimizableWindow.d.ts +6 -22
- package/dist/i18n/en.d.ts +0 -1
- package/dist/i18n/es.d.ts +0 -1
- package/dist/i18n/fr.d.ts +0 -1
- package/dist/i18n/it.d.ts +0 -1
- package/dist/i18n/pt.d.ts +0 -1
- package/dist/index.js +13 -53
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [7.0.1] - 2026-04-24
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Added picker to select base or custom theme in storybook.
|
|
8
|
+
- Added optional `disableCloseOnClickAway` prop to the `Autocomplete` component.
|
|
9
|
+
|
|
10
|
+
## [7.0.0] - 2026-04-10
|
|
11
|
+
|
|
12
|
+
### Removed
|
|
13
|
+
|
|
14
|
+
- Removed `minimizeIconId` and `onMinimize` props in the `MinimizableWindow` component.
|
|
15
|
+
|
|
3
16
|
## [6.0.7] - 2026-04-09
|
|
4
17
|
|
|
5
18
|
### Fixed
|
|
@@ -101,6 +101,11 @@ export type AutocompleteProps<T extends string, Multiple extends boolean | undef
|
|
|
101
101
|
* Disables clear button at the end of the component when field is dirty.
|
|
102
102
|
*/
|
|
103
103
|
disableClear?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Prevents the popover from closing when clicking outside of the autocomplete.
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
disableCloseOnClickAway?: boolean;
|
|
104
109
|
/**
|
|
105
110
|
* start icon in autocomplete
|
|
106
111
|
*/
|
|
@@ -117,5 +122,5 @@ export type AutocompleteProps<T extends string, Multiple extends boolean | undef
|
|
|
117
122
|
/**
|
|
118
123
|
* Powered TextField with the ability to select from a predefined list of options, allowing to select one or multiple values.
|
|
119
124
|
*/
|
|
120
|
-
declare const Autocomplete: <T extends string, Multiple extends boolean | undefined = undefined, Value = AutocompleteValue<T, Multiple>>({ variant, value, multiple, textFieldProps, options, disabled, mode, isCaseSensitive, isDiacriticSensitive, onChange, renderLabel, isLoading, onSearch, loadingText, noOptionsText, allowFreeText, addNewValueText, closeOnSelect, maxValueLength, maxValues, maxValuesText, startIconId, onClose, onOpen, disableClear, size }: AutocompleteProps<T, Multiple, Value>) => import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
declare const Autocomplete: <T extends string, Multiple extends boolean | undefined = undefined, Value = AutocompleteValue<T, Multiple>>({ variant, value, multiple, textFieldProps, options, disabled, mode, isCaseSensitive, isDiacriticSensitive, onChange, renderLabel, isLoading, onSearch, loadingText, noOptionsText, allowFreeText, addNewValueText, closeOnSelect, maxValueLength, maxValues, maxValuesText, startIconId, onClose, onOpen, disableClear, disableCloseOnClickAway, size }: AutocompleteProps<T, Multiple, Value>) => import("react/jsx-runtime").JSX.Element;
|
|
121
126
|
export default Autocomplete;
|
|
@@ -27,7 +27,7 @@ export type MinimizableWindowProps = React.PropsWithChildren<{
|
|
|
27
27
|
*/
|
|
28
28
|
backButton?: React.ReactNode;
|
|
29
29
|
/**
|
|
30
|
-
* Coords to the element to
|
|
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
|
|
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
|
|
75
|
-
* The window
|
|
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
|
|
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
|
|
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
package/dist/i18n/es.d.ts
CHANGED
package/dist/i18n/fr.d.ts
CHANGED
package/dist/i18n/it.d.ts
CHANGED
package/dist/i18n/pt.d.ts
CHANGED
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
|
|
@@ -24320,6 +24315,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
24320
24315
|
onClose = () => ({}),
|
|
24321
24316
|
onOpen = () => ({}),
|
|
24322
24317
|
disableClear,
|
|
24318
|
+
disableCloseOnClickAway = false,
|
|
24323
24319
|
size = "S"
|
|
24324
24320
|
}) {
|
|
24325
24321
|
const anchorRef = React75.useRef(null);
|
|
@@ -24594,6 +24590,9 @@ var Autocomplete = function Autocomplete2({
|
|
|
24594
24590
|
onSelectValue(option, event);
|
|
24595
24591
|
};
|
|
24596
24592
|
const onClickAwayPopover = (event) => {
|
|
24593
|
+
if (disableCloseOnClickAway) {
|
|
24594
|
+
return;
|
|
24595
|
+
}
|
|
24597
24596
|
if (!elementIsDescendantOrEqual(
|
|
24598
24597
|
anchorRef.current,
|
|
24599
24598
|
event.target
|
|
@@ -28734,11 +28733,9 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
|
|
|
28734
28733
|
targetElement,
|
|
28735
28734
|
contentHeight,
|
|
28736
28735
|
iconSizes: iconSizes4 = "S",
|
|
28737
|
-
minimizeIconId = "minus",
|
|
28738
28736
|
closeIconId = "close",
|
|
28739
28737
|
backIconId = "arrow-left",
|
|
28740
28738
|
rightActions,
|
|
28741
|
-
onMinimize,
|
|
28742
28739
|
onClose,
|
|
28743
28740
|
onBack
|
|
28744
28741
|
}, ref) {
|
|
@@ -28795,26 +28792,6 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
|
|
|
28795
28792
|
overlayRef.current.style.opacity = "0";
|
|
28796
28793
|
}
|
|
28797
28794
|
};
|
|
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
28795
|
return /* @__PURE__ */ jsxs89(Fragment44, { children: [
|
|
28819
28796
|
isDraggingState && /* @__PURE__ */ jsx185(
|
|
28820
28797
|
Box_default2,
|
|
@@ -28918,44 +28895,27 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
|
|
|
28918
28895
|
onMouseDown: (ev) => ev.stopPropagation(),
|
|
28919
28896
|
children: [
|
|
28920
28897
|
rightActions,
|
|
28921
|
-
/* @__PURE__ */ jsx185(Box_default2, { children: /* @__PURE__ */ jsx185(
|
|
28898
|
+
closeable && /* @__PURE__ */ jsx185(Box_default2, { children: /* @__PURE__ */ jsx185(
|
|
28922
28899
|
Tooltip_default,
|
|
28923
28900
|
{
|
|
28924
|
-
title: t("MINIMIZABLE_WINDOW.
|
|
28901
|
+
title: t("MINIMIZABLE_WINDOW.CLOSE"),
|
|
28925
28902
|
zIndex: 999999,
|
|
28926
28903
|
placement: "top",
|
|
28927
28904
|
children: /* @__PURE__ */ jsx185(
|
|
28928
28905
|
IconButton_default,
|
|
28929
28906
|
{
|
|
28930
28907
|
size: iconSizes4,
|
|
28931
|
-
iconId:
|
|
28908
|
+
iconId: closeIconId,
|
|
28932
28909
|
onClick: () => {
|
|
28933
28910
|
applyMinimizeTransition();
|
|
28934
28911
|
setTimeout(() => {
|
|
28935
|
-
|
|
28912
|
+
onClose && onClose();
|
|
28936
28913
|
}, 500);
|
|
28937
28914
|
},
|
|
28938
28915
|
sx: iconButtonsStyles
|
|
28939
28916
|
}
|
|
28940
28917
|
)
|
|
28941
28918
|
}
|
|
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
28919
|
) })
|
|
28960
28920
|
]
|
|
28961
28921
|
}
|