kurtosis-ui-components 0.87.1 → 0.87.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/build/AppLayout.js
CHANGED
|
@@ -12,7 +12,7 @@ export const AppPageLayout = ({ preventPageScroll, children }) => {
|
|
|
12
12
|
const { hasNavbar } = useContext(AppLayoutContext);
|
|
13
13
|
const numberOfChildren = Array.isArray(children) ? children.length : 1;
|
|
14
14
|
if (numberOfChildren === 1) {
|
|
15
|
-
return (_jsx(Flex, { w: "100%", h: preventPageScroll ? `100vh` : "100%", flex: "1", justifyContent: "center", alignItems: "center", children: _jsxs(Flex, { position: "absolute", top: "0", bottom: "0", flexDirection: "column", w: "100%", h: "100%", minH: "100%", maxWidth: MAIN_APP_MAX_WIDTH, pl: hasNavbar ? MAIN_APP_LEFT_PADDING_WITH_NAV : MAIN_APP_LEFT_PADDING_WITHOUT_NAV, pr: MAIN_APP_RIGHT_PADDING, children: [_jsx(KurtosisBreadcrumbs, {}), _jsx(Flex, { w: "100%", h: "100%", minH: preventPageScroll ? "0" : undefined, pt: MAIN_APP_TOP_PADDING, pb: MAIN_APP_BOTTOM_PADDING, flexDirection: "column", flex: "1", children: children })] }) }));
|
|
15
|
+
return (_jsx(Flex, { w: "100%", h: preventPageScroll ? `100vh` : "100%", flex: "1", justifyContent: "center", alignItems: "center", children: _jsxs(Flex, { position: "absolute", top: "0", bottom: "0", flexDirection: "column", w: "100%", h: "100%", minH: "100%", maxWidth: MAIN_APP_MAX_WIDTH, pl: hasNavbar ? MAIN_APP_LEFT_PADDING_WITH_NAV : MAIN_APP_LEFT_PADDING_WITHOUT_NAV, pr: MAIN_APP_RIGHT_PADDING, children: [_jsx(KurtosisBreadcrumbs, {}), _jsx(Flex, { w: "100%", h: "100%", minH: preventPageScroll ? "0" : undefined, pt: MAIN_APP_TOP_PADDING, pb: MAIN_APP_BOTTOM_PADDING, flexDirection: "column", flex: "1", gap: "16px", children: children })] }) }));
|
|
16
16
|
}
|
|
17
17
|
// TS cannot infer that children is an array if numberOfChildren === 2
|
|
18
18
|
if (numberOfChildren === 2 && Array.isArray(children)) {
|
|
@@ -336,13 +336,6 @@ const theme = extendTheme({
|
|
|
336
336
|
icon: { color: "gray.400", fontSize: "18px !important" },
|
|
337
337
|
},
|
|
338
338
|
},
|
|
339
|
-
Popover: {
|
|
340
|
-
baseStyle: {
|
|
341
|
-
content: {
|
|
342
|
-
bg: "gray.500",
|
|
343
|
-
},
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
339
|
Progress: progressTheme,
|
|
347
340
|
Switch: {
|
|
348
341
|
defaultProps: {
|
|
@@ -420,7 +413,7 @@ const theme = extendTheme({
|
|
|
420
413
|
},
|
|
421
414
|
});
|
|
422
415
|
export const KurtosisThemeProvider = ({ children, ...chakraProps }) => {
|
|
423
|
-
return (_jsxs(ChakraProvider, { theme: theme, toastOptions: { defaultOptions: { position: "top" } }, ...chakraProps, children: [_jsx(ColorModeFixer, {}), _jsx(Fonts, {}), children] }));
|
|
416
|
+
return (_jsxs(ChakraProvider, { theme: theme, toastOptions: { defaultOptions: { position: "top" } }, portalZIndex: 40 /* https://github.com/chakra-ui/chakra-ui/issues/3269 */, ...chakraProps, children: [_jsx(ColorModeFixer, {}), _jsx(Fonts, {}), children] }));
|
|
424
417
|
};
|
|
425
418
|
// This component handles legacy local storage settings on browsers that used the old
|
|
426
419
|
// emui, where the color mode may be set to 'light'.
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export function parsePackageUrl(packageUrl) {
|
|
2
|
-
const components = packageUrl
|
|
2
|
+
const components = packageUrl
|
|
3
|
+
.replace(/https?:\/\//, "")
|
|
4
|
+
.replace(/(?<=github\.com\/[^/]+\/[^/]+)\/tree\/([^/]+)/, "")
|
|
5
|
+
.split("/");
|
|
3
6
|
if (components.length < 3) {
|
|
4
7
|
throw Error(`Illegal url, invalid number of components: ${packageUrl}`);
|
|
5
8
|
}
|
|
6
9
|
if (components[1].length < 1 || components[2].length < 1) {
|
|
7
10
|
throw Error(`Illegal url, empty components: ${packageUrl}`);
|
|
8
11
|
}
|
|
12
|
+
const branchMatches = packageUrl.match(/(?<=github\.com\/[^/]+\/[^/]+)\/tree\/([^/]+)/);
|
|
13
|
+
const defaultBranch = branchMatches ? branchMatches[1] : undefined;
|
|
9
14
|
return {
|
|
10
15
|
baseUrl: "github.com",
|
|
11
16
|
owner: components[1],
|
|
12
17
|
name: components[2],
|
|
13
18
|
rootPath: components.filter((v, i) => i > 2 && v.length > 0).join("/") + "/",
|
|
19
|
+
defaultBranch,
|
|
14
20
|
};
|
|
15
21
|
}
|