maru_design2 2.22.0 → 2.22.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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.22.2](https://github.com/42maru-ai/maru-design2/compare/v2.22.1...v2.22.2) (2025-02-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* :bug: SearchInput - update search & close logic [#480](https://github.com/42maru-ai/maru-design2/issues/480) ([8813b80](https://github.com/42maru-ai/maru-design2/commit/8813b80cb3f647b9b320d7371b8700112c99a323))
|
|
9
|
+
|
|
10
|
+
## [2.22.1](https://github.com/42maru-ai/maru-design2/compare/v2.22.0...v2.22.1) (2025-02-07)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* :bug: Table - col key [#459](https://github.com/42maru-ai/maru-design2/issues/459) ([ca714cc](https://github.com/42maru-ai/maru-design2/commit/ca714cc5314eded458c2ee528bbc3d5b329fd0a2))
|
|
16
|
+
|
|
3
17
|
## [2.22.0](https://github.com/42maru-ai/maru-design2/compare/v2.21.1...v2.22.0) (2025-02-06)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -12,6 +12,7 @@ interface Props {
|
|
|
12
12
|
searchButtonContent?: string;
|
|
13
13
|
onSearch: () => void;
|
|
14
14
|
inputWrapperRef: React.RefObject<HTMLDivElement>;
|
|
15
|
+
onClose: () => void;
|
|
15
16
|
}
|
|
16
|
-
declare function Filter({ on, formats, hoverContent, resetButtonContent, onReset, searchButtonContent, onSearch, inputWrapperRef, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function Filter({ on, formats, hoverContent, resetButtonContent, onReset, searchButtonContent, onSearch, inputWrapperRef, onClose, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default Filter;
|
|
@@ -29,6 +29,7 @@ export interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInp
|
|
|
29
29
|
resetButtonContent?: string;
|
|
30
30
|
onSearch: () => void;
|
|
31
31
|
searchButtonContent?: string;
|
|
32
|
+
onClose: () => void;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
export declare function SearchInput({ hiddenClearButton, className, filter, ...props }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -26531,13 +26531,18 @@ function Filter(_a) {
|
|
|
26531
26531
|
onReset = _a.onReset,
|
|
26532
26532
|
searchButtonContent = _a.searchButtonContent,
|
|
26533
26533
|
onSearch = _a.onSearch,
|
|
26534
|
-
inputWrapperRef = _a.inputWrapperRef
|
|
26534
|
+
inputWrapperRef = _a.inputWrapperRef,
|
|
26535
|
+
onClose = _a.onClose;
|
|
26535
26536
|
var _b = useState(false),
|
|
26536
26537
|
open = _b[0],
|
|
26537
26538
|
setOpen = _b[1];
|
|
26538
|
-
var
|
|
26539
|
-
onSearch();
|
|
26539
|
+
var handleClose = function handleClose() {
|
|
26540
26540
|
setOpen(false);
|
|
26541
|
+
onClose();
|
|
26542
|
+
};
|
|
26543
|
+
var handleSearch = function handleSearch() {
|
|
26544
|
+
onSearch();
|
|
26545
|
+
handleClose();
|
|
26541
26546
|
};
|
|
26542
26547
|
return jsxs(Fragment, {
|
|
26543
26548
|
children: [jsx("button", __assign({
|
|
@@ -26561,7 +26566,7 @@ function Filter(_a) {
|
|
|
26561
26566
|
})), jsx(Popover, __assign({
|
|
26562
26567
|
anchorEl: inputWrapperRef.current,
|
|
26563
26568
|
open: open,
|
|
26564
|
-
onClose:
|
|
26569
|
+
onClose: handleClose,
|
|
26565
26570
|
direction: "bottom-end",
|
|
26566
26571
|
className: "maru-search-input-filter-popover"
|
|
26567
26572
|
}, {
|
|
@@ -26589,7 +26594,7 @@ function Filter(_a) {
|
|
|
26589
26594
|
}, {
|
|
26590
26595
|
children: resetButtonContent
|
|
26591
26596
|
})), jsx(Button, __assign({
|
|
26592
|
-
onClick:
|
|
26597
|
+
onClick: handleSearch
|
|
26593
26598
|
}, {
|
|
26594
26599
|
children: searchButtonContent
|
|
26595
26600
|
}))]
|
|
@@ -26624,7 +26629,8 @@ function SearchInput(_a) {
|
|
|
26624
26629
|
resetButtonContent: filter.resetButtonContent,
|
|
26625
26630
|
onSearch: filter.onSearch,
|
|
26626
26631
|
searchButtonContent: filter.searchButtonContent,
|
|
26627
|
-
inputWrapperRef: inputWrapperRef
|
|
26632
|
+
inputWrapperRef: inputWrapperRef,
|
|
26633
|
+
onClose: filter.onClose
|
|
26628
26634
|
}) : undefined,
|
|
26629
26635
|
hiddenClearButton: hiddenClearButton
|
|
26630
26636
|
}));
|
|
@@ -26881,7 +26887,7 @@ function Tr(_a) {
|
|
|
26881
26887
|
if (format.isHide) return null;
|
|
26882
26888
|
return jsx("td", {
|
|
26883
26889
|
children: format.customColumn ? format.customColumn(row[format.columnIdKey], rowId) : row[format.columnIdKey]
|
|
26884
|
-
},
|
|
26890
|
+
}, format.columnIdKey + (format.key || ''));
|
|
26885
26891
|
}), (kebabMenu === null || kebabMenu === void 0 ? void 0 : kebabMenu.show(rowId)) === 'always' || (kebabMenu === null || kebabMenu === void 0 ? void 0 : kebabMenu.show(rowId)) === 'hover' && hoveredRowId === rowId ? jsx(KebabMenuTd, {
|
|
26886
26892
|
rowId: rowId,
|
|
26887
26893
|
kebabContent: kebabMenu.content
|