@edu-tosel/design 0.1.3 → 0.1.5
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 +32 -31
- package/board/index.d.ts +19 -19
- package/board/index.js +34 -47
- package/card/Card.d.ts +14 -14
- package/card/Card.js +19 -32
- package/card/ProfileCard.d.ts +14 -14
- package/card/ProfileCard.js +8 -20
- package/card/index.d.ts +1 -1
- package/card/index.js +1 -1
- package/deck/index.d.ts +18 -18
- package/deck/index.js +16 -28
- package/{style.css → globals.css} +40 -41
- package/header/index.d.ts +1 -5
- package/header/index.js +1 -25
- package/layout/dashboard/Header.d.ts +5 -0
- package/layout/dashboard/Header.js +15 -0
- package/layout/dashboard/index.d.ts +5 -0
- package/layout/dashboard/index.js +8 -0
- package/layout/index.d.ts +1 -0
- package/layout/index.js +1 -0
- package/modal/index.d.ts +9 -9
- package/modal/index.js +23 -35
- package/navigation/index.d.ts +6 -6
- package/navigation/index.js +16 -24
- package/package.json +5 -31
- package/tailwind.config.js +334 -319
- package/text/index.d.ts +5 -5
- package/text/index.js +6 -18
- package/util/classNames.d.ts +1 -1
- package/util/classNames.js +4 -8
- package/util/colors.d.ts +10 -10
- package/util/colors.js +10 -10
- package/util/display.d.ts +25 -25
- package/util/display.js +25 -55
- package/util/displayResponsive.d.ts +3 -3
- package/util/displayResponsive.js +15 -15
- package/util/index.d.ts +7 -7
- package/util/index.js +7 -7
- package/util/pattern.d.ts +7 -7
- package/util/pattern.js +15 -15
- package/util/position.d.ts +14 -14
- package/util/position.js +44 -56
- package/util/shape.d.ts +1 -1
- package/util/shape.js +3 -3
- package/version.txt +1 -1
- package/asset/classNames.d.ts +0 -2
- package/asset/classNames.js +0 -9
- package/asset/colors.d.ts +0 -10
- package/asset/colors.js +0 -10
- package/asset/display.d.ts +0 -25
- package/asset/display.js +0 -55
- package/asset/displayResponsive.d.ts +0 -3
- package/asset/displayResponsive.js +0 -15
- package/asset/pattern.d.ts +0 -7
- package/asset/pattern.js +0 -15
- package/asset/position.d.ts +0 -14
- package/asset/position.js +0 -56
- package/asset/shape.d.ts +0 -1
- package/asset/shape.js +0 -3
package/modal/index.js
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return (_jsx("div",
|
|
23
|
-
}
|
|
24
|
-
export function NoticeModal(_a) {
|
|
25
|
-
var titles = _a.titles, children = _a.children, buttons = _a.buttons, close = _a.close;
|
|
26
|
-
var _b = titles || ["", ""], title = _b[0], subTitle = _b[1];
|
|
27
|
-
var buttonClassNames = ["rounded-2xl bg-black px-8 py-2 text-lg font-bold text-white"].join(" ");
|
|
28
|
-
return (_jsxs(Modal, { children: [_jsxs("div", __assign({ className: col(3) + "px-25 pt-18 h-full pb-12" }, { children: [_jsxs("div", __assign({ className: col(6) }, { children: [_jsx("div", __assign({ className: "text-3xl font-bold" }, { children: title })), _jsx("div", { className: "h-2 w-14 rounded-full bg-pale-lavender" }), _jsx("div", __assign({ className: "text-xl font-bold" }, { children: subTitle }))] })), _jsx("div", { children: children }), buttons ? (_jsx("div", __assign({ className: "mt-auto flex justify-end gap-4" }, { children: buttons.map(function (_a) {
|
|
29
|
-
var text = _a[0], onClick = _a[1];
|
|
30
|
-
return (_jsx("button", __assign({ className: buttonClassNames, onClick: onClick }, { children: text }), text));
|
|
31
|
-
}) }))) : null] })), _jsx("button", { className: absolute.tl(5, 7) + "bg-black rounded-full h-9 w-9", onClick: close })] }));
|
|
32
|
-
}
|
|
33
|
-
export function AlertModal() {
|
|
34
|
-
return (_jsx("div", { children: _jsx("div", {}) }));
|
|
35
|
-
}
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "../globals.css";
|
|
3
|
+
import { col, absolute } from "../util";
|
|
4
|
+
function Modal({ children }) {
|
|
5
|
+
const classNames = [
|
|
6
|
+
absolute.tl() +
|
|
7
|
+
"z-50 flex min-h-screen w-full items-center justify-center bg-black/10 backdrop-blur-sm",
|
|
8
|
+
].join(" ");
|
|
9
|
+
const modalClassNames = [
|
|
10
|
+
"h-100 w-2/3 min-w-76 max-w-176 rounded-xl bg-white relative",
|
|
11
|
+
].join(" ");
|
|
12
|
+
return (_jsx("div", { className: classNames, children: _jsx("div", { className: modalClassNames, children: children }) }));
|
|
13
|
+
}
|
|
14
|
+
export function NoticeModal({ titles, children, buttons, close, }) {
|
|
15
|
+
const [title, subTitle] = titles || ["", ""];
|
|
16
|
+
const buttonClassNames = [
|
|
17
|
+
"rounded-2xl bg-black px-8 py-2 text-lg font-bold text-white",
|
|
18
|
+
].join(" ");
|
|
19
|
+
return (_jsxs(Modal, { children: [_jsxs("div", { className: col(3) + "px-25 pt-18 h-full pb-12", children: [_jsxs("div", { className: col(6), children: [_jsx("div", { className: "text-3xl font-bold", children: title }), _jsx("div", { className: "h-2 w-14 rounded-full bg-pale-lavender" }), _jsx("div", { className: "text-xl font-bold", children: subTitle })] }), _jsx("div", { children: children }), buttons ? (_jsx("div", { className: "mt-auto flex justify-end gap-4", children: buttons.map(([text, onClick]) => (_jsx("button", { className: buttonClassNames, onClick: onClick, children: text }, text))) })) : null] }), _jsx("button", { className: absolute.tl(5, 7) + "bg-black rounded-full h-9 w-9", onClick: close })] }));
|
|
20
|
+
}
|
|
21
|
+
export function AlertModal() {
|
|
22
|
+
return (_jsx("div", { children: _jsx("div", {}) }));
|
|
23
|
+
}
|
package/navigation/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import "../
|
|
3
|
-
export declare const buttonClassNames: (href: string, nowPath: string, color?: [string, string]) => string;
|
|
4
|
-
export declare function NavigationContainer({ children }: {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "../globals.css";
|
|
3
|
+
export declare const buttonClassNames: (href: string, nowPath: string, color?: [string, string]) => string;
|
|
4
|
+
export declare function NavigationContainer({ children, }: {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
package/navigation/index.js
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var classNames = [center.row(6), "text-".concat(text), "font-bold w-50 h-11 rounded-2xl pl-5"].join(" ");
|
|
18
|
-
var toggle = nowPath === href ? "bg-".concat(bg) : "bg-transparent";
|
|
19
|
-
return [classNames, toggle].join(" ");
|
|
20
|
-
};
|
|
21
|
-
export function NavigationContainer(_a) {
|
|
22
|
-
var children = _a.children;
|
|
23
|
-
return _jsx("div", __assign({ className: center.col() + "w-54" }, { children: children }));
|
|
24
|
-
}
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "../globals.css";
|
|
3
|
+
import { center } from "../util";
|
|
4
|
+
export const buttonClassNames = (href, nowPath, color) => {
|
|
5
|
+
const [text, bg] = color ?? ["black", "white"];
|
|
6
|
+
const classNames = [
|
|
7
|
+
center.row(6),
|
|
8
|
+
`text-${text}`,
|
|
9
|
+
"font-bold w-50 h-11 rounded-2xl pl-5",
|
|
10
|
+
].join(" ");
|
|
11
|
+
const toggle = nowPath === href ? `bg-${bg}` : "bg-transparent";
|
|
12
|
+
return [classNames, toggle].join(" ");
|
|
13
|
+
};
|
|
14
|
+
export function NavigationContainer({ children, }) {
|
|
15
|
+
return _jsx("div", { className: center.col() + "w-54", children: children });
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edu-tosel/design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "UI components for International TOSEL Committee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jsx",
|
|
@@ -9,40 +9,14 @@
|
|
|
9
9
|
],
|
|
10
10
|
"author": "International TOSEL Committee",
|
|
11
11
|
"license": "MIT",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"scripts": {},
|
|
12
14
|
"dependencies": {
|
|
13
|
-
"@testing-library/jest-dom": "^5.17.0",
|
|
14
|
-
"@testing-library/react": "^14.1.2",
|
|
15
|
-
"@testing-library/user-event": "^13.5.0",
|
|
16
15
|
"react": "^18.2.0",
|
|
17
16
|
"react-dom": "^18.2.0",
|
|
18
|
-
"react-router-dom": "^6.21.
|
|
19
|
-
"react-scripts": "5.0.1",
|
|
20
|
-
"tailwind-scrollbar-hide": "^1.1.7",
|
|
21
|
-
"tailwindcss": "^3.4.0",
|
|
17
|
+
"react-router-dom": "^6.21.3",
|
|
22
18
|
"tailwindcss-animate": "^1.0.7",
|
|
23
|
-
"
|
|
24
|
-
"tw-elements": "^1.1.0",
|
|
25
|
-
"typescript": "^4.9.5",
|
|
26
|
-
"web-vitals": "^2.1.4"
|
|
27
|
-
},
|
|
28
|
-
"scripts": {},
|
|
29
|
-
"eslintConfig": {
|
|
30
|
-
"extends": [
|
|
31
|
-
"react-app",
|
|
32
|
-
"react-app/jest"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"browserslist": {
|
|
36
|
-
"production": [
|
|
37
|
-
">0.2%",
|
|
38
|
-
"not dead",
|
|
39
|
-
"not op_mini all"
|
|
40
|
-
],
|
|
41
|
-
"development": [
|
|
42
|
-
"last 1 chrome version",
|
|
43
|
-
"last 1 firefox version",
|
|
44
|
-
"last 1 safari version"
|
|
45
|
-
]
|
|
19
|
+
"typescript": "^5.2.2"
|
|
46
20
|
},
|
|
47
21
|
"devDependencies": {}
|
|
48
22
|
}
|