@connectif/ui-components 6.0.1 → 6.0.2
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 +11 -0
- package/dist/components/input/autocomplete/Autocomplete.d.ts +5 -1
- package/dist/components/input/autocomplete/AutocompleteInput.d.ts +2 -1
- package/dist/components/layout/CollapsiblePanel.d.ts +5 -1
- package/dist/index.js +43 -18
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.0.2] - 2026-03-24
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Fixed an issue with style in `input` variant on `DateIntervalPicker` component.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added optional `onEntered` prop to the `CollapsiblePanel` component.
|
|
12
|
+
- Added optional `size` prop to the `Autocomplete` component.
|
|
13
|
+
|
|
3
14
|
## [6.0.1] - 2026-03-24
|
|
4
15
|
|
|
5
16
|
### Added
|
|
@@ -105,6 +105,10 @@ export type AutocompleteProps<T extends string, Multiple extends boolean | undef
|
|
|
105
105
|
* start icon in autocomplete
|
|
106
106
|
*/
|
|
107
107
|
startIconId?: IconId;
|
|
108
|
+
/**
|
|
109
|
+
* Define min with that autocomplete can have. S => 328px. XS => 248px. @default 'S'
|
|
110
|
+
*/
|
|
111
|
+
size?: 'S' | 'XS';
|
|
108
112
|
/**
|
|
109
113
|
* Ref to the inner HTMLInputElement
|
|
110
114
|
*/
|
|
@@ -113,5 +117,5 @@ export type AutocompleteProps<T extends string, Multiple extends boolean | undef
|
|
|
113
117
|
/**
|
|
114
118
|
* Powered TextField with the ability to select from a predefined list of options, allowing to select one or multiple values.
|
|
115
119
|
*/
|
|
116
|
-
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 }: AutocompleteProps<T, Multiple, Value>) => import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
117
121
|
export default Autocomplete;
|
|
@@ -61,6 +61,7 @@ export type AutocompleteInputProps<T extends string, Multiple extends boolean |
|
|
|
61
61
|
inputValue: string;
|
|
62
62
|
setInputValue: (value: string) => void;
|
|
63
63
|
placeholder: string;
|
|
64
|
+
size: 'S' | 'XS';
|
|
64
65
|
onClosePopover: () => void;
|
|
65
66
|
onOpenPopover: () => void;
|
|
66
67
|
onSearchValueChange: (event: React.SyntheticEvent, searchValue: string) => void;
|
|
@@ -70,5 +71,5 @@ export type AutocompleteInputProps<T extends string, Multiple extends boolean |
|
|
|
70
71
|
/**
|
|
71
72
|
* Powered TextField Input.
|
|
72
73
|
*/
|
|
73
|
-
declare const AutocompleteInput: <T extends string, Multiple extends boolean | undefined = undefined, Value = AutocompleteValue<T, Multiple>>({ variant, value, multiple, textFieldProps, hasFilteredOptions, disabled, renderLabel, maxValueLength, canAddValues, maxValuesText, disableClear, containerRef, inputRef, onClosePopover, onOpenPopover, isOpenPopover, inputValue, setInputValue, placeholder, startIconId, onSearchValueChange, onPressEnter, onRemoveValue }: AutocompleteInputProps<T, Multiple, Value>) => import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
declare const AutocompleteInput: <T extends string, Multiple extends boolean | undefined = undefined, Value = AutocompleteValue<T, Multiple>>({ variant, value, multiple, textFieldProps, hasFilteredOptions, disabled, renderLabel, maxValueLength, canAddValues, maxValuesText, disableClear, containerRef, inputRef, onClosePopover, onOpenPopover, isOpenPopover, inputValue, setInputValue, placeholder, startIconId, size, onSearchValueChange, onPressEnter, onRemoveValue }: AutocompleteInputProps<T, Multiple, Value>) => import("react/jsx-runtime").JSX.Element;
|
|
74
75
|
export default AutocompleteInput;
|
|
@@ -43,6 +43,10 @@ export type CollapsiblePanelProps = React.PropsWithChildren<{
|
|
|
43
43
|
* Props for divider
|
|
44
44
|
*/
|
|
45
45
|
dividerProps?: DividerProps;
|
|
46
|
+
/**
|
|
47
|
+
* Method to call when transition end
|
|
48
|
+
*/
|
|
49
|
+
onEntered?: () => void;
|
|
46
50
|
}> & Pick<ListItemButtonProps, 'disabled'>;
|
|
47
|
-
declare const CollapsiblePanel: ({ sx, children, isCollapsed, onToggle, header, headerText, headerBaseSx, collapseDirection, disabled, withDivider, dividerProps }: CollapsiblePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare const CollapsiblePanel: ({ sx, children, isCollapsed, onToggle, header, headerText, headerBaseSx, collapseDirection, disabled, withDivider, dividerProps, onEntered }: CollapsiblePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
52
|
export default CollapsiblePanel;
|
package/dist/index.js
CHANGED
|
@@ -8330,7 +8330,8 @@ var CollapsiblePanel = ({
|
|
|
8330
8330
|
collapseDirection = "down",
|
|
8331
8331
|
disabled,
|
|
8332
8332
|
withDivider = false,
|
|
8333
|
-
dividerProps
|
|
8333
|
+
dividerProps,
|
|
8334
|
+
onEntered
|
|
8334
8335
|
}) => /* @__PURE__ */ jsxs3(
|
|
8335
8336
|
Box_default2,
|
|
8336
8337
|
{
|
|
@@ -8351,7 +8352,7 @@ var CollapsiblePanel = ({
|
|
|
8351
8352
|
}
|
|
8352
8353
|
),
|
|
8353
8354
|
withDivider && !isCollapsed && /* @__PURE__ */ jsx10(Divider_default, { ...dividerProps }),
|
|
8354
|
-
/* @__PURE__ */ jsx10(Collapse, { in: !isCollapsed, children })
|
|
8355
|
+
/* @__PURE__ */ jsx10(Collapse, { in: !isCollapsed, onEntered, children })
|
|
8355
8356
|
]
|
|
8356
8357
|
}
|
|
8357
8358
|
);
|
|
@@ -21341,7 +21342,6 @@ var DateIntervalPickerInputButton = ({
|
|
|
21341
21342
|
{
|
|
21342
21343
|
ref: inputRef,
|
|
21343
21344
|
placeholder: dateInputFormatPlaceholder,
|
|
21344
|
-
readOnly: true,
|
|
21345
21345
|
endAdornment: /* @__PURE__ */ jsx115(
|
|
21346
21346
|
Icon_default,
|
|
21347
21347
|
{
|
|
@@ -22567,21 +22567,26 @@ var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
|
22567
22567
|
onSelect,
|
|
22568
22568
|
onScrollToItem
|
|
22569
22569
|
}) {
|
|
22570
|
+
const itemRef = React68.useRef(null);
|
|
22571
|
+
const shouldScrollRef = React68.useRef(false);
|
|
22570
22572
|
const [isCollapsed, setCollapsed] = React68.useState(
|
|
22571
22573
|
!searchText && !option.options.some(
|
|
22572
22574
|
(opt) => opt.categorizedPickerItemType === "option" && opt.id === selectedId
|
|
22573
22575
|
)
|
|
22574
22576
|
);
|
|
22577
|
+
const handleClick = () => {
|
|
22578
|
+
setCollapsed(!isCollapsed);
|
|
22579
|
+
shouldScrollRef.current = isCollapsed;
|
|
22580
|
+
};
|
|
22575
22581
|
return /* @__PURE__ */ jsx125(
|
|
22576
22582
|
CollapsiblePanel_default,
|
|
22577
22583
|
{
|
|
22578
22584
|
header: /* @__PURE__ */ jsx125(
|
|
22579
22585
|
ListItemButton_default,
|
|
22580
22586
|
{
|
|
22587
|
+
ref: itemRef,
|
|
22581
22588
|
selected: selectedId === option.id,
|
|
22582
|
-
onClick:
|
|
22583
|
-
setCollapsed(!isCollapsed);
|
|
22584
|
-
},
|
|
22589
|
+
onClick: handleClick,
|
|
22585
22590
|
baseSx: {
|
|
22586
22591
|
height: "auto",
|
|
22587
22592
|
minHeight: "44px",
|
|
@@ -22609,6 +22614,14 @@ var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
|
22609
22614
|
),
|
|
22610
22615
|
isCollapsed,
|
|
22611
22616
|
onToggle: () => setCollapsed(!isCollapsed),
|
|
22617
|
+
onEntered: () => {
|
|
22618
|
+
if (shouldScrollRef.current && itemRef.current) {
|
|
22619
|
+
itemRef.current.scrollIntoView({
|
|
22620
|
+
behavior: "smooth"
|
|
22621
|
+
});
|
|
22622
|
+
shouldScrollRef.current = false;
|
|
22623
|
+
}
|
|
22624
|
+
},
|
|
22612
22625
|
children: /* @__PURE__ */ jsx125(List_default, { disablePadding: true, children: option.options.map((opt, idx) => /* @__PURE__ */ jsx125(
|
|
22613
22626
|
CategorizedPickerItem_default,
|
|
22614
22627
|
{
|
|
@@ -23832,8 +23845,17 @@ var AutocompleteInputSelection_default = AutocompleteInputSelection;
|
|
|
23832
23845
|
|
|
23833
23846
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
23834
23847
|
import { Fragment as Fragment31, jsx as jsx133, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
23835
|
-
var INPUT_MIN_WIDTH = 80;
|
|
23836
23848
|
var CLEAR_BUTTON_WIDTH = 36;
|
|
23849
|
+
var sizes6 = {
|
|
23850
|
+
XS: {
|
|
23851
|
+
inputMinWidth: 32,
|
|
23852
|
+
minWidth: 248
|
|
23853
|
+
},
|
|
23854
|
+
S: {
|
|
23855
|
+
inputMinWidth: 80,
|
|
23856
|
+
minWidth: 328
|
|
23857
|
+
}
|
|
23858
|
+
};
|
|
23837
23859
|
var AutocompleteInput = function AutocompleteInput2({
|
|
23838
23860
|
variant = "default",
|
|
23839
23861
|
value,
|
|
@@ -23855,6 +23877,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23855
23877
|
setInputValue,
|
|
23856
23878
|
placeholder,
|
|
23857
23879
|
startIconId,
|
|
23880
|
+
size,
|
|
23858
23881
|
onSearchValueChange,
|
|
23859
23882
|
onPressEnter,
|
|
23860
23883
|
onRemoveValue
|
|
@@ -23871,7 +23894,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23871
23894
|
...textFieldProps,
|
|
23872
23895
|
sx: {
|
|
23873
23896
|
...textFieldProps?.sx,
|
|
23874
|
-
minWidth:
|
|
23897
|
+
minWidth: `${sizes6[size].minWidth}px`,
|
|
23875
23898
|
padding: "1px 1px 1px 6px",
|
|
23876
23899
|
...variant === "text" && {
|
|
23877
23900
|
border: "none",
|
|
@@ -23890,7 +23913,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23890
23913
|
inputSx: {
|
|
23891
23914
|
...textFieldProps?.inputSx,
|
|
23892
23915
|
flex: "1 1 auto",
|
|
23893
|
-
minWidth: showClearButton ? `${
|
|
23916
|
+
minWidth: showClearButton ? `${sizes6[size].inputMinWidth}px` : `${sizes6[size].inputMinWidth + CLEAR_BUTTON_WIDTH}px`,
|
|
23894
23917
|
...disabled && {
|
|
23895
23918
|
color: palette2.grey[500]
|
|
23896
23919
|
},
|
|
@@ -24223,7 +24246,8 @@ var Autocomplete = function Autocomplete2({
|
|
|
24223
24246
|
startIconId,
|
|
24224
24247
|
onClose = () => ({}),
|
|
24225
24248
|
onOpen = () => ({}),
|
|
24226
|
-
disableClear
|
|
24249
|
+
disableClear,
|
|
24250
|
+
size = "S"
|
|
24227
24251
|
}) {
|
|
24228
24252
|
const anchorRef = React75.useRef(null);
|
|
24229
24253
|
const inputRef = React75.useRef(null);
|
|
@@ -24544,6 +24568,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
24544
24568
|
inputValue,
|
|
24545
24569
|
setInputValue,
|
|
24546
24570
|
placeholder,
|
|
24571
|
+
size,
|
|
24547
24572
|
onRemoveValue: onRemoveInputValue
|
|
24548
24573
|
}
|
|
24549
24574
|
),
|
|
@@ -27680,7 +27705,7 @@ import MuiTabs from "@mui/material/Tabs";
|
|
|
27680
27705
|
|
|
27681
27706
|
// src/components/layout/SwipeableViews.tsx
|
|
27682
27707
|
import * as React93 from "react";
|
|
27683
|
-
import { useEffect as useEffect26, useRef as
|
|
27708
|
+
import { useEffect as useEffect26, useRef as useRef32, useState as useState38 } from "react";
|
|
27684
27709
|
import { jsx as jsx165 } from "react/jsx-runtime";
|
|
27685
27710
|
var styles = {
|
|
27686
27711
|
container: {
|
|
@@ -27714,11 +27739,11 @@ function SwipeableViews({
|
|
|
27714
27739
|
disableScroll = false,
|
|
27715
27740
|
...rootProps
|
|
27716
27741
|
}) {
|
|
27717
|
-
const containerRef =
|
|
27718
|
-
const scrollTimeout =
|
|
27719
|
-
const scrollingMethod =
|
|
27742
|
+
const containerRef = useRef32(null);
|
|
27743
|
+
const scrollTimeout = useRef32(null);
|
|
27744
|
+
const scrollingMethod = useRef32("none");
|
|
27720
27745
|
const [previousIndex, setPreviousIndex] = useState38(index);
|
|
27721
|
-
const hideScrollAnimation =
|
|
27746
|
+
const hideScrollAnimation = useRef32(true);
|
|
27722
27747
|
useEffect26(() => {
|
|
27723
27748
|
if (containerRef.current) {
|
|
27724
27749
|
if (scrollingMethod.current === "manual") {
|
|
@@ -28599,7 +28624,7 @@ var WidgetTitle_default = WidgetTitle;
|
|
|
28599
28624
|
// src/components/window/MinimizableWindow.tsx
|
|
28600
28625
|
import * as React98 from "react";
|
|
28601
28626
|
import { Fragment as Fragment43, jsx as jsx185, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
28602
|
-
var
|
|
28627
|
+
var sizes7 = {
|
|
28603
28628
|
M: 400,
|
|
28604
28629
|
L: 500,
|
|
28605
28630
|
XL: 640
|
|
@@ -28741,7 +28766,7 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
|
|
|
28741
28766
|
position: "absolute",
|
|
28742
28767
|
zIndex: 999998,
|
|
28743
28768
|
bottom: "8px",
|
|
28744
|
-
left: window.innerWidth / 2 -
|
|
28769
|
+
left: window.innerWidth / 2 - sizes7[size] / 2,
|
|
28745
28770
|
height: "fit-content",
|
|
28746
28771
|
background: `linear-gradient(to left, ${cornflowerBlue}, ${electricLavender})`,
|
|
28747
28772
|
borderRadius: "16px",
|
|
@@ -28758,7 +28783,7 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
|
|
|
28758
28783
|
...sx
|
|
28759
28784
|
},
|
|
28760
28785
|
ref: windowRef,
|
|
28761
|
-
width: `${
|
|
28786
|
+
width: `${sizes7[size]}px`,
|
|
28762
28787
|
height: contentHeight !== void 0 && headerRef.current ? `${contentHeight + contentPadding + headerRef.current.scrollHeight}px` : void 0,
|
|
28763
28788
|
children: [
|
|
28764
28789
|
/* @__PURE__ */ jsxs89(
|