@antscorp/antsomi-ui 1.3.5-beta.336 → 1.3.5-beta.337
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.
|
@@ -27,7 +27,6 @@ import { handleError } from '@antscorp/antsomi-ui/es/utils';
|
|
|
27
27
|
import { CATEGORY_DEBOUNCE, CATEGORY_LISTING_WITH } from '../../constants';
|
|
28
28
|
const PATH = 'src/components/template/TemplateListing/components/CategoryListing/index.tsx';
|
|
29
29
|
export const CategoryListing = memo(props => {
|
|
30
|
-
var _a;
|
|
31
30
|
const { width = CATEGORY_LISTING_WITH, items = [], loading = false, show = true, checkedCategories = {}, emptyProps, debounceChangeMenu = CATEGORY_DEBOUNCE, header, footer, onMenuChange } = props, restOfProps = __rest(props, ["width", "items", "loading", "show", "checkedCategories", "emptyProps", "debounceChangeMenu", "header", "footer", "onMenuChange"]);
|
|
32
31
|
const [checkedState, setCheckedState] = useState({});
|
|
33
32
|
useEffect(() => {
|
|
@@ -118,7 +117,27 @@ export const CategoryListing = memo(props => {
|
|
|
118
117
|
React.createElement(Scrollbars, { className: "category__listing" },
|
|
119
118
|
React.createElement(Spin, { spinning: loading, wrapperClassName: "template-listing__loading" },
|
|
120
119
|
isEmpty(menuItems) && !loading ? (React.createElement("div", { className: "empty-wrapper" },
|
|
121
|
-
React.createElement(Empty, Object.assign({}, emptyProps)))) : (React.createElement(Menu, Object.assign({ selectedKeys: [], items: menuItems, inlineIndent: 0, mode: "inline", defaultOpenKeys: items === null || items === void 0 ? void 0 : items.map(item => String(item.key)), expandIcon:
|
|
120
|
+
React.createElement(Empty, Object.assign({}, emptyProps)))) : (React.createElement(Menu, Object.assign({ selectedKeys: [], items: menuItems, inlineIndent: 0, mode: "inline", defaultOpenKeys: items === null || items === void 0 ? void 0 : items.map(item => String(item.key)), expandIcon: ({ isOpen }) => {
|
|
121
|
+
var _a;
|
|
122
|
+
return (React.createElement(Icon, { type: "icon-ants-expand-more", style: {
|
|
123
|
+
fontSize: 20,
|
|
124
|
+
color: (_a = THEME === null || THEME === void 0 ? void 0 : THEME.token) === null || _a === void 0 ? void 0 : _a.bw8,
|
|
125
|
+
transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
126
|
+
insetInlineEnd: 5,
|
|
127
|
+
position: 'absolute',
|
|
128
|
+
} }));
|
|
129
|
+
},
|
|
130
|
+
// expandIcon={
|
|
131
|
+
// <Icon
|
|
132
|
+
// type="icon-ants-expand-more"
|
|
133
|
+
// style={{
|
|
134
|
+
// fontSize: 20,
|
|
135
|
+
// color: THEME?.token?.bw8,
|
|
136
|
+
// // transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
137
|
+
// }}
|
|
138
|
+
// />
|
|
139
|
+
// }
|
|
140
|
+
onClick: handleClickMenu }, restOfProps))),
|
|
122
141
|
footer)))) : null;
|
|
123
142
|
});
|
|
124
143
|
CategoryListing.displayName = 'CategoryListing';
|
|
@@ -48,6 +48,18 @@ export const MenuWrapper = styled.div `
|
|
|
48
48
|
margin-top: 10px;
|
|
49
49
|
margin-bottom: 10px;
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
.antsomi-menu-submenu-open {
|
|
53
|
+
.antsomi-menu-submenu-title {
|
|
54
|
+
margin-bottom: 0px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.antsomi-menu-sub {
|
|
59
|
+
> li.antsomi-menu-item:first-child {
|
|
60
|
+
margin-top: 0;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
51
63
|
}
|
|
52
64
|
|
|
53
65
|
.category-loading {
|