@dartech/arsenal-ui 1.4.35 → 1.4.37
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +37 -10
- package/package.json +1 -1
- package/src/lib/Sidebar/Sidebar.d.ts +3 -1
- package/src/lib/Sidebar/SidebarDrawer.d.ts +3 -1
package/index.js
CHANGED
@@ -571,7 +571,13 @@ const ControlSelect = _a => {
|
|
571
571
|
})) : null
|
572
572
|
}, textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.InputProps),
|
573
573
|
SelectProps: {
|
574
|
-
IconComponent: PopupIconComponent$2
|
574
|
+
IconComponent: PopupIconComponent$2,
|
575
|
+
sx: {
|
576
|
+
'& .MuiSelect-select .notranslate::after': textFieldProps.placeholder ? {
|
577
|
+
content: `"${textFieldProps.placeholder}"`,
|
578
|
+
opacity: 0.42
|
579
|
+
} : {}
|
580
|
+
}
|
575
581
|
}
|
576
582
|
}, {
|
577
583
|
children: options.map((option, index) => jsx(MenuItem, Object.assign({
|
@@ -7350,7 +7356,9 @@ const Header = styled(Toolbar)(({
|
|
7350
7356
|
backgroundColor: '#fff',
|
7351
7357
|
borderRight: '1px solid rgba(38, 40, 66, 0.08)',
|
7352
7358
|
position: 'relative',
|
7353
|
-
'&
|
7359
|
+
'& span': {
|
7360
|
+
paddingLeft: 10,
|
7361
|
+
paddingTop: 5,
|
7354
7362
|
fontSize: 24,
|
7355
7363
|
fontWeight: 600,
|
7356
7364
|
transition: '.3s ease .1s',
|
@@ -7367,7 +7375,11 @@ const Header = styled(Toolbar)(({
|
|
7367
7375
|
visibility: 'hidden'
|
7368
7376
|
},
|
7369
7377
|
'&.collapsed': {
|
7370
|
-
|
7378
|
+
justifyContent: 'center',
|
7379
|
+
'& img': {
|
7380
|
+
width: 40
|
7381
|
+
},
|
7382
|
+
'& span': {
|
7371
7383
|
opacity: 0,
|
7372
7384
|
visibility: 'hidden',
|
7373
7385
|
transitionDelay: '0s'
|
@@ -7831,7 +7843,9 @@ var img = "data:image/svg+xml,%3csvg width='7' height='12' viewBox='0 0 7 12' fi
|
|
7831
7843
|
const SidebarDrawer = ({
|
7832
7844
|
title,
|
7833
7845
|
routes,
|
7834
|
-
id
|
7846
|
+
id,
|
7847
|
+
logo,
|
7848
|
+
collapsedLogo
|
7835
7849
|
}) => {
|
7836
7850
|
const {
|
7837
7851
|
collapsed,
|
@@ -7856,16 +7870,25 @@ const SidebarDrawer = ({
|
|
7856
7870
|
}),
|
7857
7871
|
id: id
|
7858
7872
|
}, {
|
7859
|
-
children: [!!title && jsx(Header, Object.assign({
|
7873
|
+
children: [(!!title || !!logo) && jsx(Header, Object.assign({
|
7860
7874
|
className: classnames({
|
7861
7875
|
collapsed
|
7862
7876
|
}),
|
7863
7877
|
"data-title": title.substring(0, 1)
|
7864
7878
|
}, {
|
7865
|
-
children:
|
7866
|
-
|
7879
|
+
children: jsxs(Box, Object.assign({
|
7880
|
+
display: 'flex',
|
7881
|
+
flexDirection: 'column'
|
7867
7882
|
}, {
|
7868
|
-
children: title
|
7883
|
+
children: [!!title && jsx(Box, Object.assign({
|
7884
|
+
component: "span"
|
7885
|
+
}, {
|
7886
|
+
children: title
|
7887
|
+
})), !!logo && jsx(Box, {
|
7888
|
+
component: "img",
|
7889
|
+
src: collapsed ? collapsedLogo : logo,
|
7890
|
+
alt: "Lending Hub KZ"
|
7891
|
+
})]
|
7869
7892
|
}))
|
7870
7893
|
})), jsx(List, Object.assign({
|
7871
7894
|
sx: {
|
@@ -7885,7 +7908,9 @@ const Sidebar = ({
|
|
7885
7908
|
routes,
|
7886
7909
|
theme: _theme = theme,
|
7887
7910
|
title: _title = '',
|
7888
|
-
id
|
7911
|
+
id,
|
7912
|
+
logo,
|
7913
|
+
collapsedLogo
|
7889
7914
|
}) => {
|
7890
7915
|
return jsxs(ThemeProvider, Object.assign({
|
7891
7916
|
theme: _theme
|
@@ -7894,7 +7919,9 @@ const Sidebar = ({
|
|
7894
7919
|
children: jsx(SidebarDrawer$1, {
|
7895
7920
|
title: _title,
|
7896
7921
|
routes: routes,
|
7897
|
-
id: id
|
7922
|
+
id: id,
|
7923
|
+
logo: logo,
|
7924
|
+
collapsedLogo: collapsedLogo
|
7898
7925
|
})
|
7899
7926
|
})]
|
7900
7927
|
}));
|
package/package.json
CHANGED
@@ -5,6 +5,8 @@ type Props = {
|
|
5
5
|
theme?: any;
|
6
6
|
title?: string;
|
7
7
|
id?: string;
|
8
|
+
logo?: string;
|
9
|
+
collapsedLogo?: string;
|
8
10
|
};
|
9
|
-
export declare const Sidebar: ({ routes, theme, title, id }: Props) => JSX.Element;
|
11
|
+
export declare const Sidebar: ({ routes, theme, title, id, logo, collapsedLogo, }: Props) => JSX.Element;
|
10
12
|
export {};
|
@@ -4,6 +4,8 @@ type Props = {
|
|
4
4
|
title?: string;
|
5
5
|
routes: Route[];
|
6
6
|
id?: string;
|
7
|
+
logo?: string;
|
8
|
+
collapsedLogo?: string;
|
7
9
|
};
|
8
|
-
declare const SidebarDrawer: ({ title, routes, id }: Props) => JSX.Element;
|
10
|
+
declare const SidebarDrawer: ({ title, routes, id, logo, collapsedLogo }: Props) => JSX.Element;
|
9
11
|
export default SidebarDrawer;
|