@connectif/ui-components 6.0.1 → 6.0.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/CHANGELOG.md +17 -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 +46 -18
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.0.3] - 2026-03-24
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Fixed min width in `input` variant on `DateIntervalPicker` component.
|
|
8
|
+
|
|
9
|
+
## [6.0.2] - 2026-03-24
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixed an issue with style in `input` variant on `DateIntervalPicker` component.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added optional `onEntered` prop to the `CollapsiblePanel` component.
|
|
18
|
+
- Added optional `size` prop to the `Autocomplete` component.
|
|
19
|
+
|
|
3
20
|
## [6.0.1] - 2026-03-24
|
|
4
21
|
|
|
5
22
|
### 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,9 @@ var DateIntervalPickerInputButton = ({
|
|
|
21341
21342
|
{
|
|
21342
21343
|
ref: inputRef,
|
|
21343
21344
|
placeholder: dateInputFormatPlaceholder,
|
|
21344
|
-
|
|
21345
|
+
inputSx: {
|
|
21346
|
+
minWidth: "166px"
|
|
21347
|
+
},
|
|
21345
21348
|
endAdornment: /* @__PURE__ */ jsx115(
|
|
21346
21349
|
Icon_default,
|
|
21347
21350
|
{
|
|
@@ -22567,21 +22570,26 @@ var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
|
22567
22570
|
onSelect,
|
|
22568
22571
|
onScrollToItem
|
|
22569
22572
|
}) {
|
|
22573
|
+
const itemRef = React68.useRef(null);
|
|
22574
|
+
const shouldScrollRef = React68.useRef(false);
|
|
22570
22575
|
const [isCollapsed, setCollapsed] = React68.useState(
|
|
22571
22576
|
!searchText && !option.options.some(
|
|
22572
22577
|
(opt) => opt.categorizedPickerItemType === "option" && opt.id === selectedId
|
|
22573
22578
|
)
|
|
22574
22579
|
);
|
|
22580
|
+
const handleClick = () => {
|
|
22581
|
+
setCollapsed(!isCollapsed);
|
|
22582
|
+
shouldScrollRef.current = isCollapsed;
|
|
22583
|
+
};
|
|
22575
22584
|
return /* @__PURE__ */ jsx125(
|
|
22576
22585
|
CollapsiblePanel_default,
|
|
22577
22586
|
{
|
|
22578
22587
|
header: /* @__PURE__ */ jsx125(
|
|
22579
22588
|
ListItemButton_default,
|
|
22580
22589
|
{
|
|
22590
|
+
ref: itemRef,
|
|
22581
22591
|
selected: selectedId === option.id,
|
|
22582
|
-
onClick:
|
|
22583
|
-
setCollapsed(!isCollapsed);
|
|
22584
|
-
},
|
|
22592
|
+
onClick: handleClick,
|
|
22585
22593
|
baseSx: {
|
|
22586
22594
|
height: "auto",
|
|
22587
22595
|
minHeight: "44px",
|
|
@@ -22609,6 +22617,14 @@ var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
|
22609
22617
|
),
|
|
22610
22618
|
isCollapsed,
|
|
22611
22619
|
onToggle: () => setCollapsed(!isCollapsed),
|
|
22620
|
+
onEntered: () => {
|
|
22621
|
+
if (shouldScrollRef.current && itemRef.current) {
|
|
22622
|
+
itemRef.current.scrollIntoView({
|
|
22623
|
+
behavior: "smooth"
|
|
22624
|
+
});
|
|
22625
|
+
shouldScrollRef.current = false;
|
|
22626
|
+
}
|
|
22627
|
+
},
|
|
22612
22628
|
children: /* @__PURE__ */ jsx125(List_default, { disablePadding: true, children: option.options.map((opt, idx) => /* @__PURE__ */ jsx125(
|
|
22613
22629
|
CategorizedPickerItem_default,
|
|
22614
22630
|
{
|
|
@@ -23832,8 +23848,17 @@ var AutocompleteInputSelection_default = AutocompleteInputSelection;
|
|
|
23832
23848
|
|
|
23833
23849
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
23834
23850
|
import { Fragment as Fragment31, jsx as jsx133, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
23835
|
-
var INPUT_MIN_WIDTH = 80;
|
|
23836
23851
|
var CLEAR_BUTTON_WIDTH = 36;
|
|
23852
|
+
var sizes6 = {
|
|
23853
|
+
XS: {
|
|
23854
|
+
inputMinWidth: 32,
|
|
23855
|
+
minWidth: 248
|
|
23856
|
+
},
|
|
23857
|
+
S: {
|
|
23858
|
+
inputMinWidth: 80,
|
|
23859
|
+
minWidth: 328
|
|
23860
|
+
}
|
|
23861
|
+
};
|
|
23837
23862
|
var AutocompleteInput = function AutocompleteInput2({
|
|
23838
23863
|
variant = "default",
|
|
23839
23864
|
value,
|
|
@@ -23855,6 +23880,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23855
23880
|
setInputValue,
|
|
23856
23881
|
placeholder,
|
|
23857
23882
|
startIconId,
|
|
23883
|
+
size,
|
|
23858
23884
|
onSearchValueChange,
|
|
23859
23885
|
onPressEnter,
|
|
23860
23886
|
onRemoveValue
|
|
@@ -23871,7 +23897,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23871
23897
|
...textFieldProps,
|
|
23872
23898
|
sx: {
|
|
23873
23899
|
...textFieldProps?.sx,
|
|
23874
|
-
minWidth:
|
|
23900
|
+
minWidth: `${sizes6[size].minWidth}px`,
|
|
23875
23901
|
padding: "1px 1px 1px 6px",
|
|
23876
23902
|
...variant === "text" && {
|
|
23877
23903
|
border: "none",
|
|
@@ -23890,7 +23916,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23890
23916
|
inputSx: {
|
|
23891
23917
|
...textFieldProps?.inputSx,
|
|
23892
23918
|
flex: "1 1 auto",
|
|
23893
|
-
minWidth: showClearButton ? `${
|
|
23919
|
+
minWidth: showClearButton ? `${sizes6[size].inputMinWidth}px` : `${sizes6[size].inputMinWidth + CLEAR_BUTTON_WIDTH}px`,
|
|
23894
23920
|
...disabled && {
|
|
23895
23921
|
color: palette2.grey[500]
|
|
23896
23922
|
},
|
|
@@ -24223,7 +24249,8 @@ var Autocomplete = function Autocomplete2({
|
|
|
24223
24249
|
startIconId,
|
|
24224
24250
|
onClose = () => ({}),
|
|
24225
24251
|
onOpen = () => ({}),
|
|
24226
|
-
disableClear
|
|
24252
|
+
disableClear,
|
|
24253
|
+
size = "S"
|
|
24227
24254
|
}) {
|
|
24228
24255
|
const anchorRef = React75.useRef(null);
|
|
24229
24256
|
const inputRef = React75.useRef(null);
|
|
@@ -24544,6 +24571,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
24544
24571
|
inputValue,
|
|
24545
24572
|
setInputValue,
|
|
24546
24573
|
placeholder,
|
|
24574
|
+
size,
|
|
24547
24575
|
onRemoveValue: onRemoveInputValue
|
|
24548
24576
|
}
|
|
24549
24577
|
),
|
|
@@ -27680,7 +27708,7 @@ import MuiTabs from "@mui/material/Tabs";
|
|
|
27680
27708
|
|
|
27681
27709
|
// src/components/layout/SwipeableViews.tsx
|
|
27682
27710
|
import * as React93 from "react";
|
|
27683
|
-
import { useEffect as useEffect26, useRef as
|
|
27711
|
+
import { useEffect as useEffect26, useRef as useRef32, useState as useState38 } from "react";
|
|
27684
27712
|
import { jsx as jsx165 } from "react/jsx-runtime";
|
|
27685
27713
|
var styles = {
|
|
27686
27714
|
container: {
|
|
@@ -27714,11 +27742,11 @@ function SwipeableViews({
|
|
|
27714
27742
|
disableScroll = false,
|
|
27715
27743
|
...rootProps
|
|
27716
27744
|
}) {
|
|
27717
|
-
const containerRef =
|
|
27718
|
-
const scrollTimeout =
|
|
27719
|
-
const scrollingMethod =
|
|
27745
|
+
const containerRef = useRef32(null);
|
|
27746
|
+
const scrollTimeout = useRef32(null);
|
|
27747
|
+
const scrollingMethod = useRef32("none");
|
|
27720
27748
|
const [previousIndex, setPreviousIndex] = useState38(index);
|
|
27721
|
-
const hideScrollAnimation =
|
|
27749
|
+
const hideScrollAnimation = useRef32(true);
|
|
27722
27750
|
useEffect26(() => {
|
|
27723
27751
|
if (containerRef.current) {
|
|
27724
27752
|
if (scrollingMethod.current === "manual") {
|
|
@@ -28599,7 +28627,7 @@ var WidgetTitle_default = WidgetTitle;
|
|
|
28599
28627
|
// src/components/window/MinimizableWindow.tsx
|
|
28600
28628
|
import * as React98 from "react";
|
|
28601
28629
|
import { Fragment as Fragment43, jsx as jsx185, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
28602
|
-
var
|
|
28630
|
+
var sizes7 = {
|
|
28603
28631
|
M: 400,
|
|
28604
28632
|
L: 500,
|
|
28605
28633
|
XL: 640
|
|
@@ -28741,7 +28769,7 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
|
|
|
28741
28769
|
position: "absolute",
|
|
28742
28770
|
zIndex: 999998,
|
|
28743
28771
|
bottom: "8px",
|
|
28744
|
-
left: window.innerWidth / 2 -
|
|
28772
|
+
left: window.innerWidth / 2 - sizes7[size] / 2,
|
|
28745
28773
|
height: "fit-content",
|
|
28746
28774
|
background: `linear-gradient(to left, ${cornflowerBlue}, ${electricLavender})`,
|
|
28747
28775
|
borderRadius: "16px",
|
|
@@ -28758,7 +28786,7 @@ var MinimizableWindow = React98.forwardRef(function MinimizableWindow2({
|
|
|
28758
28786
|
...sx
|
|
28759
28787
|
},
|
|
28760
28788
|
ref: windowRef,
|
|
28761
|
-
width: `${
|
|
28789
|
+
width: `${sizes7[size]}px`,
|
|
28762
28790
|
height: contentHeight !== void 0 && headerRef.current ? `${contentHeight + contentPadding + headerRef.current.scrollHeight}px` : void 0,
|
|
28763
28791
|
children: [
|
|
28764
28792
|
/* @__PURE__ */ jsxs89(
|