@edu-tosel/design 0.1.4 → 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.
Files changed (45) hide show
  1. package/README.md +32 -31
  2. package/board/index.d.ts +19 -19
  3. package/board/index.js +34 -47
  4. package/card/Card.d.ts +14 -14
  5. package/card/Card.js +19 -32
  6. package/card/ProfileCard.d.ts +14 -14
  7. package/card/ProfileCard.js +8 -20
  8. package/card/index.d.ts +1 -1
  9. package/card/index.js +1 -1
  10. package/deck/index.d.ts +18 -18
  11. package/deck/index.js +16 -28
  12. package/{style.css → globals.css} +40 -41
  13. package/header/index.d.ts +1 -5
  14. package/header/index.js +1 -25
  15. package/layout/dashboard/Header.d.ts +5 -0
  16. package/layout/dashboard/Header.js +15 -0
  17. package/layout/dashboard/index.d.ts +5 -0
  18. package/layout/dashboard/index.js +8 -0
  19. package/layout/index.d.ts +1 -0
  20. package/layout/index.js +1 -0
  21. package/modal/index.d.ts +9 -9
  22. package/modal/index.js +23 -35
  23. package/navigation/index.d.ts +6 -6
  24. package/navigation/index.js +16 -24
  25. package/package.json +5 -31
  26. package/tailwind.config.js +334 -319
  27. package/text/index.d.ts +5 -5
  28. package/text/index.js +6 -18
  29. package/util/classNames.d.ts +1 -1
  30. package/util/classNames.js +4 -8
  31. package/util/colors.d.ts +10 -10
  32. package/util/colors.js +10 -10
  33. package/util/display.d.ts +25 -25
  34. package/util/display.js +25 -55
  35. package/util/displayResponsive.d.ts +3 -3
  36. package/util/displayResponsive.js +15 -15
  37. package/util/index.d.ts +7 -7
  38. package/util/index.js +7 -7
  39. package/util/pattern.d.ts +7 -7
  40. package/util/pattern.js +15 -15
  41. package/util/position.d.ts +14 -14
  42. package/util/position.js +44 -56
  43. package/util/shape.d.ts +1 -1
  44. package/util/shape.js +3 -3
  45. package/version.txt +1 -1
package/modal/index.js CHANGED
@@ -1,35 +1,23 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import "../style.css";
14
- import { col, absolute } from "../util";
15
- function Modal(_a) {
16
- var children = _a.children;
17
- var classNames = [
18
- absolute.tl() +
19
- "z-50 flex min-h-screen w-full items-center justify-center bg-black/10 backdrop-blur-sm",
20
- ].join(" ");
21
- var modalClassNames = ["h-100 w-2/3 min-w-76 max-w-176 rounded-xl bg-white relative"].join(" ");
22
- return (_jsx("div", __assign({ className: classNames }, { children: _jsx("div", __assign({ className: modalClassNames }, { children: children })) })));
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
+ }
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
- import "../style.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;
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;
@@ -1,24 +1,16 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import "../style.css";
14
- import { center } from "../util";
15
- export var buttonClassNames = function (href, nowPath, color) {
16
- var _a = color !== null && color !== void 0 ? color : ["black", "white"], text = _a[0], bg = _a[1];
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.4",
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.1",
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
- "tailwindcss-directional-shadows": "^0.0.6",
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
  }