@grantbii/design-system 1.0.61 → 1.0.62
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.
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoaderSizeMarginProps } from "react-spinners/helpers/props";
|
|
2
2
|
type PageLoaderProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} & LoaderSizeProps;
|
|
3
|
+
isPacman?: boolean;
|
|
4
|
+
} & LoaderSizeMarginProps;
|
|
6
5
|
/**
|
|
7
6
|
* The animation to show when loading the whole page
|
|
8
7
|
*/
|
|
9
|
-
declare const PageLoader: ({
|
|
8
|
+
declare const PageLoader: ({ isPacman, color, size, ...restOfProps }: PageLoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default PageLoader;
|
package/core/atoms/PageLoader.js
CHANGED
|
@@ -10,15 +10,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { MoonLoader } from "react-spinners";
|
|
13
|
+
import { MoonLoader, PacmanLoader } from "react-spinners";
|
|
14
14
|
import styled from "styled-components";
|
|
15
15
|
import { Colors } from "../foundations";
|
|
16
16
|
/**
|
|
17
17
|
* The animation to show when loading the whole page
|
|
18
18
|
*/
|
|
19
19
|
const PageLoader = (_a) => {
|
|
20
|
-
var {
|
|
21
|
-
return (_jsx(Background, {
|
|
20
|
+
var { isPacman = false, color = Colors.accent.blue1, size } = _a, restOfProps = __rest(_a, ["isPacman", "color", "size"]);
|
|
21
|
+
return (_jsx(Background, { children: isPacman ? (_jsx(PacmanLoader, Object.assign({ color: color, size: size ? size : 20 }, restOfProps))) : (_jsx(MoonLoader, Object.assign({ color: color, size: size ? size : 32 }, restOfProps))) }));
|
|
22
22
|
};
|
|
23
23
|
export default PageLoader;
|
|
24
24
|
const Background = styled.div `
|
|
@@ -26,6 +26,6 @@ const Background = styled.div `
|
|
|
26
26
|
align-items: center;
|
|
27
27
|
justify-content: center;
|
|
28
28
|
|
|
29
|
-
width:
|
|
30
|
-
height:
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
31
|
`;
|
package/core/molecules/Modal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
|
-
import styled from "styled-components";
|
|
3
|
+
import styled, { css } from "styled-components";
|
|
4
4
|
import { Button } from "../atoms";
|
|
5
5
|
import { Colors } from "../foundations";
|
|
6
6
|
const Modal = ({ header, content, footer, width, height, isFullScreen, onClickCancel, }) => (_jsx(Overlay, { "$isFullScreen": isFullScreen, children: _jsxs(ModalWindow, { "$isFullScreen": isFullScreen, "$width": width, "$height": height, children: [header ? _jsx(ModalHeader, { children: header }) : _jsx(_Fragment, {}), _jsx(ModalBody, { children: content }), _jsxs(ModalFooter, { children: [_jsx(CancelButton, { onClick: onClickCancel }), footer ? footer : _jsx(_Fragment, {})] })] }) }));
|
|
@@ -55,6 +55,14 @@ const ModalWindow = styled.div `
|
|
|
55
55
|
|
|
56
56
|
min-height: 100px;
|
|
57
57
|
max-height: 100vh;
|
|
58
|
+
|
|
59
|
+
${({ $isFullScreen = false }) => $isFullScreen
|
|
60
|
+
? css `
|
|
61
|
+
position: fixed;
|
|
62
|
+
bottom: 0px;
|
|
63
|
+
left: 0px;
|
|
64
|
+
`
|
|
65
|
+
: ""}
|
|
58
66
|
`;
|
|
59
67
|
const ModalHeader = styled.div `
|
|
60
68
|
font-weight: 500;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grantbii/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "Grantbii's Design System",
|
|
5
5
|
"homepage": "https://design.grantbii.com",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build-storybook": "storybook build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@grantbii/ui-base": "1.0.
|
|
21
|
+
"@grantbii/ui-base": "1.0.16",
|
|
22
22
|
"@phosphor-icons/react": "^2.1.10",
|
|
23
23
|
"country-flag-icons": "^1.5.19",
|
|
24
24
|
"next": "^15.3.5",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
-
|
|
2
|
+
type PageLoaderExampleProps = {
|
|
3
|
+
isPacman?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const PageLoaderExample: ({ isPacman }: PageLoaderExampleProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
declare const meta: Meta<typeof PageLoaderExample>;
|
|
4
7
|
export default meta;
|
|
5
8
|
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const
|
|
9
|
+
export declare const GrantbiiApp: Story;
|
|
10
|
+
export declare const AdminConsole: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PageLoader } from "@/.";
|
|
3
3
|
import styled from "styled-components";
|
|
4
|
-
const PageLoaderExample = () => (_jsx(BaseExample, { children: _jsx(PageLoader, {}) }));
|
|
4
|
+
const PageLoaderExample = ({ isPacman }) => (_jsx(BaseExample, { children: _jsx(PageLoader, { isPacman: isPacman }) }));
|
|
5
5
|
const BaseExample = styled.div `
|
|
6
6
|
width: 100vw;
|
|
7
7
|
height: 100vh;
|
|
@@ -15,6 +15,9 @@ const meta = {
|
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
export default meta;
|
|
18
|
-
export const
|
|
18
|
+
export const GrantbiiApp = {
|
|
19
19
|
args: {},
|
|
20
20
|
};
|
|
21
|
+
export const AdminConsole = {
|
|
22
|
+
args: { isPacman: true },
|
|
23
|
+
};
|