@darajs/core 1.0.0-a.1 → 1.0.0
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/README.md +83 -7
- package/dist/assets/dara-dark.svg +20 -0
- package/dist/assets/dara-light.svg +15 -0
- package/dist/components/side-bar-frame/side-bar-frame.d.ts.map +1 -1
- package/dist/components/side-bar-frame/side-bar-frame.js +10 -1
- package/dist/components/side-bar-frame/side-bar-frame.js.map +1 -1
- package/dist/components/top-bar-frame/top-bar-frame.d.ts.map +1 -1
- package/dist/components/top-bar-frame/top-bar-frame.js +19 -4
- package/dist/components/top-bar-frame/top-bar-frame.js.map +1 -1
- package/dist/{dara_core-1.0.0a1-py3-none-any.whl → dara_core-1.0.0-py3-none-any.whl} +0 -0
- package/dist/umd/dara.core.umd.js +257 -143
- package/package.json +9 -9
- package/dist/assets/login-background.svg +0 -11
- package/dist/assets/logo.svg +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-bar-frame.d.ts","sourceRoot":"","sources":["../../../js/components/side-bar-frame/side-bar-frame.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"side-bar-frame.d.ts","sourceRoot":"","sources":["../../../js/components/side-bar-frame/side-bar-frame.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA6E5C,UAAU,iBAAiB;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,KAAK,GAAG,QAAQ,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAmC3D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -3,6 +3,8 @@ import { transparentize } from 'polished';
|
|
|
3
3
|
import styled, { ThemeContext, useTheme } from '@darajs/styled-components';
|
|
4
4
|
import { Button } from '@darajs/ui-components';
|
|
5
5
|
import { useConfig } from '../../api';
|
|
6
|
+
import DaraDark from '../../assets/dara-dark.svg';
|
|
7
|
+
import DaraLight from '../../assets/dara-light.svg';
|
|
6
8
|
import { DirectionCtx, DynamicComponent, Wrapper, getIcon, resolveTheme } from '../../shared';
|
|
7
9
|
const shouldForwardProp = (prop) => !['width'].includes(prop);
|
|
8
10
|
const SideBar = styled.div.withConfig({ shouldForwardProp }) `
|
|
@@ -40,6 +42,12 @@ const LogoutButton = styled(Button) `
|
|
|
40
42
|
color: ${(props) => props.theme.colors.blue1};
|
|
41
43
|
}
|
|
42
44
|
`;
|
|
45
|
+
const BuiltWithSpan = styled.span `
|
|
46
|
+
display: flex;
|
|
47
|
+
gap: 0.2rem;
|
|
48
|
+
align-items: center;
|
|
49
|
+
font-size: 0.75rem;
|
|
50
|
+
`;
|
|
43
51
|
const LogoImage = styled.img `
|
|
44
52
|
width: ${(props) => props.width};
|
|
45
53
|
max-width: 200px;
|
|
@@ -57,7 +65,8 @@ function SideBarFrame(props) {
|
|
|
57
65
|
const theme = useTheme();
|
|
58
66
|
const { data: config } = useConfig();
|
|
59
67
|
const logo = props.logo_path && _jsx(LogoImage, { alt: "Logo", src: props.logo_path, width: props.logo_width });
|
|
60
|
-
|
|
68
|
+
const daraLogo = theme.themeType === 'dark' ? _jsx("img", { alt: "Dara", src: DaraDark }) : _jsx("img", { alt: "Dara", src: DaraLight });
|
|
69
|
+
return (_jsxs(Wrapper, { backgroundColor: theme.colors.background, children: [props.side_bar_position === 'right' && (_jsx(Wrapper, { children: props.content && _jsx(DynamicComponent, { component: props.content }) })), _jsx(ThemeContext.Provider, { value: resolveTheme((_a = config === null || config === void 0 ? void 0 : config.theme) === null || _a === void 0 ? void 0 : _a.main, (_b = config === null || config === void 0 ? void 0 : config.theme) === null || _b === void 0 ? void 0 : _b.base), children: _jsxs(SideBar, { style: { padding: props.side_bar_padding }, width: props.side_bar_width, children: [!props.hide_logo && props.logo_position !== 'bottom' && logo, _jsx(Wrapper, { direction: "column", children: _jsx(DirectionCtx.Provider, { value: { direction: 'column' }, children: props.side_bar && _jsx(DynamicComponent, { component: props.side_bar }) }) }), !props.hide_logo && props.logo_position === 'bottom' && logo, _jsxs(LogoutButton, { href: "/logout", styling: "error", children: [_jsx(LogoutArrow, { style: { marginRight: '0.5rem' } }), "Logout"] }), _jsxs(BuiltWithSpan, { children: ["Built with ", daraLogo] })] }) }), props.side_bar_position !== 'right' && (_jsx(Wrapper, { style: { padding: '2rem 3rem' }, children: props.content && _jsx(DynamicComponent, { component: props.content }) }))] }));
|
|
61
70
|
}
|
|
62
71
|
export default SideBarFrame;
|
|
63
72
|
//# sourceMappingURL=side-bar-frame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-bar-frame.js","sourceRoot":"","sources":["../../../js/components/side-bar-frame/side-bar-frame.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAO1F,MAAM,iBAAiB,GAAG,CAAC,IAAS,EAAW,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC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E,WAAW,EAAE,QAAQ,EAAE,GAAI,cAEtC,EACf,MAAC,aAAa,8BAAa,QAAQ,IAAiB,IAC9C,GACU,EACvB,KAAK,CAAC,iBAAiB,KAAK,OAAO,IAAI,CACpC,KAAC,OAAO,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,YACnC,KAAK,CAAC,OAAO,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAE,KAAK,CAAC,OAAO,GAAI,GAC1D,CACb,IACK,CACb,CAAC;AACN,CAAC;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-bar-frame.d.ts","sourceRoot":"","sources":["../../../js/components/top-bar-frame/top-bar-frame.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"top-bar-frame.d.ts","sourceRoot":"","sources":["../../../js/components/top-bar-frame/top-bar-frame.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAyF5C,UAAU,gBAAgB;IACtB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;GAEG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAkC1D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -3,12 +3,15 @@ import { transparentize } from 'polished';
|
|
|
3
3
|
import styled, { ThemeContext, useTheme } from '@darajs/styled-components';
|
|
4
4
|
import { Button } from '@darajs/ui-components';
|
|
5
5
|
import { useConfig } from '../../api';
|
|
6
|
+
import DaraDark from '../../assets/dara-dark.svg';
|
|
7
|
+
import DaraLight from '../../assets/dara-light.svg';
|
|
6
8
|
import { DirectionCtx, DynamicComponent, Wrapper, getIcon, resolveTheme } from '../../shared';
|
|
7
9
|
const shouldForwardProp = (prop) => !['width'].includes(prop);
|
|
8
10
|
const TopBar = styled.div.withConfig({ shouldForwardProp }) `
|
|
9
11
|
display: flex;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: 0.5rem;
|
|
14
|
+
align-items: flex-end;
|
|
12
15
|
|
|
13
16
|
width: 100%;
|
|
14
17
|
height: ${(props) => props.height || '124px'};
|
|
@@ -26,6 +29,12 @@ const TopBar = styled.div.withConfig({ shouldForwardProp }) `
|
|
|
26
29
|
}};
|
|
27
30
|
box-shadow: rgba(20, 20, 25, 0.15) 0px 4px 16px, rgba(20, 20, 25, 0.15) 0px 8px 32px;
|
|
28
31
|
`;
|
|
32
|
+
const TopBarContent = styled.div `
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
width: 100%;
|
|
37
|
+
`;
|
|
29
38
|
const LogoutButton = styled(Button) `
|
|
30
39
|
width: 7rem;
|
|
31
40
|
height: 3rem;
|
|
@@ -48,7 +57,12 @@ const LogoutButton = styled(Button) `
|
|
|
48
57
|
const RouteButtons = styled(Wrapper) `
|
|
49
58
|
gap: 0.5rem;
|
|
50
59
|
align-items: center;
|
|
51
|
-
|
|
60
|
+
`;
|
|
61
|
+
const BuiltWithSpan = styled.span `
|
|
62
|
+
display: flex;
|
|
63
|
+
gap: 0.2rem;
|
|
64
|
+
align-items: center;
|
|
65
|
+
font-size: 0.75rem;
|
|
52
66
|
`;
|
|
53
67
|
const LogoImage = styled.img `
|
|
54
68
|
width: ${(props) => props.width};
|
|
@@ -64,7 +78,8 @@ function SideBarFrame(props) {
|
|
|
64
78
|
const theme = useTheme();
|
|
65
79
|
const { data: config } = useConfig();
|
|
66
80
|
const logo = props.logo_path && _jsx(LogoImage, { alt: "Logo", src: props.logo_path, width: props.logo_width });
|
|
67
|
-
|
|
81
|
+
const daraLogo = theme.themeType === 'dark' ? _jsx("img", { alt: "Dara", src: DaraDark }) : _jsx("img", { alt: "Dara", src: DaraLight });
|
|
82
|
+
return (_jsxs(Wrapper, { backgroundColor: theme.colors.background, direction: "column", children: [_jsx(ThemeContext.Provider, { value: resolveTheme((_a = config === null || config === void 0 ? void 0 : config.theme) === null || _a === void 0 ? void 0 : _a.main, (_b = config === null || config === void 0 ? void 0 : config.theme) === null || _b === void 0 ? void 0 : _b.base), children: _jsxs(TopBar, { height: props.top_bar_height, style: { padding: props.top_bar_padding }, children: [_jsxs(TopBarContent, { children: [!props.hide_logo && logo, props.top_bar && (_jsx(RouteButtons, { direction: "row", children: _jsx(DirectionCtx.Provider, { value: { direction: 'row' }, children: props.top_bar && _jsx(DynamicComponent, { component: props.top_bar }) }) })), _jsxs(LogoutButton, { href: "/logout", styling: "error", children: [_jsx(LogoutArrow, { style: { marginRight: '0.5rem' } }), "Logout"] })] }), _jsxs(BuiltWithSpan, { children: ["Built with ", daraLogo] })] }) }), _jsx(Wrapper, { style: { padding: '2rem 3rem' }, children: props.content && _jsx(DynamicComponent, { component: props.content }) })] }));
|
|
68
83
|
}
|
|
69
84
|
export default SideBarFrame;
|
|
70
85
|
//# sourceMappingURL=top-bar-frame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-bar-frame.js","sourceRoot":"","sources":["../../../js/components/top-bar-frame/top-bar-frame.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"top-bar-frame.js","sourceRoot":"","sources":["../../../js/components/top-bar-fr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