@edu-tosel/design 0.1.4 → 0.1.6

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 (72) hide show
  1. package/README.md +32 -31
  2. package/board/Board.d.ts +7 -0
  3. package/board/Board.js +9 -0
  4. package/board/CanvasBoard.d.ts +7 -0
  5. package/board/CanvasBoard.js +11 -0
  6. package/board/Header.d.ts +6 -0
  7. package/board/Header.js +12 -0
  8. package/board/ListBoard.d.ts +7 -0
  9. package/board/ListBoard.js +7 -0
  10. package/board/index.d.ts +3 -19
  11. package/board/index.js +3 -47
  12. package/card/Card.d.ts +15 -14
  13. package/card/Card.js +30 -32
  14. package/card/ChartCard.d.ts +20 -0
  15. package/card/ChartCard.js +7 -0
  16. package/card/ProfileCard.d.ts +14 -14
  17. package/card/ProfileCard.js +8 -20
  18. package/card/TableCard.d.ts +12 -0
  19. package/card/TableCard.js +13 -0
  20. package/card/TrumpCard.d.ts +19 -0
  21. package/card/TrumpCard.js +19 -0
  22. package/card/index.d.ts +4 -1
  23. package/card/index.js +4 -1
  24. package/deck/Deck.d.ts +15 -0
  25. package/deck/Deck.js +14 -0
  26. package/deck/index.d.ts +1 -18
  27. package/deck/index.js +1 -28
  28. package/{style.css → globals.css} +40 -41
  29. package/index.d.ts +9 -0
  30. package/index.js +9 -0
  31. package/{header/index.d.ts → layout/dashboard/Header.d.ts} +5 -5
  32. package/layout/dashboard/Header.js +19 -0
  33. package/layout/dashboard/index.d.ts +7 -0
  34. package/layout/dashboard/index.js +10 -0
  35. package/layout/index.d.ts +1 -0
  36. package/layout/index.js +1 -0
  37. package/modal/Modal.d.ts +8 -0
  38. package/modal/Modal.js +21 -0
  39. package/modal/index.d.ts +1 -9
  40. package/modal/index.js +1 -35
  41. package/navigation/Navigation.d.ts +5 -0
  42. package/navigation/Navigation.js +26 -0
  43. package/navigation/index.d.ts +1 -6
  44. package/navigation/index.js +1 -24
  45. package/package.json +6 -30
  46. package/shelf/Shelf.d.ts +4 -0
  47. package/shelf/Shelf.js +4 -0
  48. package/shelf/index.d.ts +1 -0
  49. package/shelf/index.js +1 -0
  50. package/tailwind.config.js +389 -319
  51. package/text/LineBreaks.d.ts +4 -0
  52. package/text/LineBreaks.js +5 -0
  53. package/text/index.d.ts +1 -5
  54. package/text/index.js +1 -18
  55. package/util/classNames.d.ts +1 -1
  56. package/util/classNames.js +4 -8
  57. package/util/colors.d.ts +10 -10
  58. package/util/colors.js +10 -10
  59. package/util/display.d.ts +25 -25
  60. package/util/display.js +25 -55
  61. package/util/displayResponsive.d.ts +3 -3
  62. package/util/displayResponsive.js +15 -15
  63. package/util/index.d.ts +7 -7
  64. package/util/index.js +7 -7
  65. package/util/pattern.d.ts +7 -7
  66. package/util/pattern.js +15 -15
  67. package/util/position.d.ts +14 -14
  68. package/util/position.js +44 -56
  69. package/util/shape.d.ts +1 -1
  70. package/util/shape.js +3 -3
  71. package/version.txt +1 -1
  72. package/header/index.js +0 -25
@@ -0,0 +1,4 @@
1
+ export declare function LineBreaks({ texts, gap }: {
2
+ texts: string[];
3
+ gap?: number;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { col } from "../util";
3
+ export function LineBreaks({ texts, gap }) {
4
+ return (_jsx("div", { className: col(gap), children: texts.map((text, index) => (_jsx("div", { className: "leading-tight", children: text }, index))) }));
5
+ }
package/text/index.d.ts CHANGED
@@ -1,5 +1 @@
1
- import "../style.css";
2
- export declare function LineBreaks({ texts, gap }: {
3
- texts: string[];
4
- gap?: number;
5
- }): import("react/jsx-runtime").JSX.Element;
1
+ export * from "./LineBreaks";
package/text/index.js CHANGED
@@ -1,18 +1 @@
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 { col } from "../util";
15
- export function LineBreaks(_a) {
16
- var texts = _a.texts, gap = _a.gap;
17
- return (_jsx("div", __assign({ className: col(gap) }, { children: texts.map(function (text, index) { return (_jsx("div", { children: text }, index)); }) })));
18
- }
1
+ export * from "./LineBreaks";
@@ -1 +1 @@
1
- export default function classNames(...props: string[]): string;
1
+ export default function classNames(...props: string[]): string;
@@ -1,8 +1,4 @@
1
- export default function classNames() {
2
- var props = [];
3
- for (var _i = 0; _i < arguments.length; _i++) {
4
- props[_i] = arguments[_i];
5
- }
6
- var array = props.map(function (prop) { return prop.split(" "); });
7
- return array.flat().join(" ");
8
- }
1
+ export default function classNames(...props) {
2
+ const array = props.map((prop) => prop.split(" "));
3
+ return array.flat().join(" ");
4
+ }
package/util/colors.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export declare const colorsByLevel: {
2
- PS: string;
3
- ST: string;
4
- BA: string;
5
- JR: string;
6
- HJ: string;
7
- };
8
- export declare const gradient: {
9
- lab: string;
10
- };
1
+ export declare const colorsByLevel: {
2
+ PS: string;
3
+ ST: string;
4
+ BA: string;
5
+ JR: string;
6
+ HJ: string;
7
+ };
8
+ export declare const gradient: {
9
+ lab: string;
10
+ };
package/util/colors.js CHANGED
@@ -1,10 +1,10 @@
1
- export var colorsByLevel = {
2
- PS: "ps-pink",
3
- ST: "st-orange",
4
- BA: "ba-yellow",
5
- JR: "jr-blue",
6
- HJ: "hj-blue",
7
- };
8
- export var gradient = {
9
- lab: "bg-gradient-to-br from-violet-light/20 to-blue-sky/40 ",
10
- };
1
+ export const colorsByLevel = {
2
+ PS: "ps-pink",
3
+ ST: "st-orange",
4
+ BA: "ba-yellow",
5
+ JR: "jr-blue",
6
+ HJ: "hj-blue",
7
+ };
8
+ export const gradient = {
9
+ lab: "gradient-to-br from-violet-light/20 to-blue-sky/40 ",
10
+ };
package/util/display.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- export declare const row: (gap?: number) => string;
2
- export declare const col: (gap?: number, width?: number | string) => string;
3
- export declare const between: {
4
- row: string;
5
- col: string;
6
- };
7
- export declare const center: {
8
- col: (gap?: number) => string;
9
- row: (gap?: number) => string;
10
- colO: (gap?: number) => string;
11
- rowO: (gap?: number) => string;
12
- screen: {
13
- default: string;
14
- col: (gap?: number) => string;
15
- row: (gap?: number) => string;
16
- };
17
- };
18
- export declare const grid: {
19
- col: (col: number, gap?: number) => string;
20
- row: (row: number, gap?: number) => string;
21
- };
22
- export declare const box: {
23
- row: (height: number, gap?: number) => string;
24
- col: (width: number, gap?: number) => string;
25
- };
1
+ export declare const row: (gap?: number) => string;
2
+ export declare const col: (gap?: number, width?: number | string) => string;
3
+ export declare const between: {
4
+ row: string;
5
+ col: string;
6
+ };
7
+ export declare const center: {
8
+ col: (gap?: number) => string;
9
+ row: (gap?: number) => string;
10
+ colO: (gap?: number) => string;
11
+ rowO: (gap?: number) => string;
12
+ screen: {
13
+ default: string;
14
+ col: (gap?: number) => string;
15
+ row: (gap?: number) => string;
16
+ };
17
+ };
18
+ export declare const grid: {
19
+ col: (col: number, gap?: number) => string;
20
+ row: (row: number, gap?: number) => string;
21
+ };
22
+ export declare const box: {
23
+ row: (height: number, gap?: number) => string;
24
+ col: (width: number, gap?: number) => string;
25
+ };
package/util/display.js CHANGED
@@ -1,55 +1,25 @@
1
- export var row = function (gap) {
2
- if (gap === void 0) { gap = 8; }
3
- return "flex flex-row gap-".concat(gap, " ");
4
- };
5
- export var col = function (gap, width) {
6
- if (gap === void 0) { gap = 8; }
7
- return "flex flex-col gap-".concat(gap, " ").concat(width ? "w-".concat(width) : "w-full", " ");
8
- };
9
- export var between = {
10
- row: "flex flex-row justify-between items-center ",
11
- col: "flex flex-col justify-between items-center ",
12
- };
13
- export var center = {
14
- col: function (gap) {
15
- if (gap === void 0) { gap = 0; }
16
- return "gap-".concat(gap, " flex flex-col items-center ");
17
- },
18
- row: function (gap) {
19
- if (gap === void 0) { gap = 0; }
20
- return "gap-".concat(gap, " flex flex-row items-center ");
21
- },
22
- colO: function (gap) {
23
- if (gap === void 0) { gap = 0; }
24
- return "gap-".concat(gap, " flex flex-col justify-center items-center ");
25
- },
26
- rowO: function (gap) {
27
- if (gap === void 0) { gap = 0; }
28
- return "gap-".concat(gap, " flex flex-row justify-center items-center ");
29
- },
30
- screen: {
31
- default: "flex justify-center items-center min-h-screen w-full overflow-hidden min-h-screen relative ",
32
- col: function (gap) {
33
- if (gap === void 0) { gap = 0; }
34
- return "gap-".concat(gap, " flex flex-col justify-center items-center min-h-screen w-full ");
35
- },
36
- row: function (gap) {
37
- if (gap === void 0) { gap = 0; }
38
- return "gap-".concat(gap, " flex flex-row justify-center items-center min-h-screen w-full ");
39
- },
40
- },
41
- };
42
- export var grid = {
43
- col: function (col, gap) {
44
- if (gap === void 0) { gap = 12; }
45
- return "grid grid-cols-".concat(col, " gap-").concat(gap, " ");
46
- },
47
- row: function (row, gap) {
48
- if (gap === void 0) { gap = 12; }
49
- return "grid grid-rows-".concat(row, " gap-").concat(gap);
50
- },
51
- };
52
- export var box = {
53
- row: function (height, gap) { return "h-".concat(height, " gap-").concat(gap, " flex flex-row "); },
54
- col: function (width, gap) { return "w-".concat(width, " gap-").concat(gap, " flex flex-col "); },
55
- };
1
+ export const row = (gap = 8) => `flex flex-row gap-${gap} `;
2
+ export const col = (gap = 8, width) => `flex flex-col gap-${gap} ${width ? `w-${width}` : "w-full"} `;
3
+ export const between = {
4
+ row: "flex flex-row justify-between items-center ",
5
+ col: "flex flex-col justify-between items-center ",
6
+ };
7
+ export const center = {
8
+ col: (gap = 0) => `gap-${gap} flex flex-col items-center `,
9
+ row: (gap = 0) => `gap-${gap} flex flex-row items-center `,
10
+ colO: (gap = 0) => `gap-${gap} flex flex-col justify-center items-center `,
11
+ rowO: (gap = 0) => `gap-${gap} flex flex-row justify-center items-center `,
12
+ screen: {
13
+ default: "flex justify-center items-center min-h-screen w-full overflow-hidden min-h-screen relative ",
14
+ col: (gap = 0) => `gap-${gap} flex flex-col justify-center items-center min-h-screen w-full `,
15
+ row: (gap = 0) => `gap-${gap} flex flex-row justify-center items-center min-h-screen w-full `,
16
+ },
17
+ };
18
+ export const grid = {
19
+ col: (col, gap = 12) => `grid grid-cols-${col} gap-${gap} `,
20
+ row: (row, gap = 12) => `grid grid-rows-${row} gap-${gap}`,
21
+ };
22
+ export const box = {
23
+ row: (height, gap) => `h-${height} gap-${gap} flex flex-row `,
24
+ col: (width, gap) => `w-${width} gap-${gap} flex flex-col `,
25
+ };
@@ -1,3 +1,3 @@
1
- export declare const responsiveColToRow: () => string;
2
- export declare const responsiveRowToCol: () => string;
3
- export declare const responsiveGridToCol: (gridCell: number) => string;
1
+ export declare const responsiveColToRow: () => string;
2
+ export declare const responsiveRowToCol: () => string;
3
+ export declare const responsiveGridToCol: (gridCell: number) => string;
@@ -1,15 +1,15 @@
1
- export var responsiveColToRow = function () {
2
- var df = "flex flex-col";
3
- var mark = "md:flex-row";
4
- return [df, mark].join(" ");
5
- };
6
- export var responsiveRowToCol = function () {
7
- var df = "flex flex-row";
8
- var md = "md:flex-col";
9
- return [df, md].join(" ");
10
- };
11
- export var responsiveGridToCol = function (gridCell) {
12
- var df = "grid grid-cols-".concat(gridCell);
13
- var md = "md:flex md:flex-col";
14
- return [df, md].join(" ");
15
- };
1
+ export const responsiveColToRow = () => {
2
+ const df = "flex flex-col";
3
+ const mark = "md:flex-row";
4
+ return [df, mark].join(" ");
5
+ };
6
+ export const responsiveRowToCol = () => {
7
+ const df = "flex flex-row";
8
+ const md = "md:flex-col";
9
+ return [df, md].join(" ");
10
+ };
11
+ export const responsiveGridToCol = (gridCell) => {
12
+ const df = `grid grid-cols-${gridCell}`;
13
+ const md = "md:flex md:flex-col";
14
+ return [df, md].join(" ");
15
+ };
package/util/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { default as cn } from "./classNames";
2
- export * from "./colors";
3
- export * from "./display";
4
- export * from "./displayResponsive";
5
- export * from "./pattern";
6
- export * from "./position";
7
- export * from "./shape";
1
+ export { default as cn } from "./classNames";
2
+ export * from "./colors";
3
+ export * from "./display";
4
+ export * from "./displayResponsive";
5
+ export * from "./pattern";
6
+ export * from "./position";
7
+ export * from "./shape";
package/util/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { default as cn } from "./classNames";
2
- export * from "./colors";
3
- export * from "./display";
4
- export * from "./displayResponsive";
5
- export * from "./pattern";
6
- export * from "./position";
7
- export * from "./shape";
1
+ export { default as cn } from "./classNames";
2
+ export * from "./colors";
3
+ export * from "./display";
4
+ export * from "./displayResponsive";
5
+ export * from "./pattern";
6
+ export * from "./position";
7
+ export * from "./shape";
package/util/pattern.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- type Color = [string, string];
2
- export declare const buttonStyle: {
3
- default: (colorSet: [Color, Color] | [Color], size?: {
4
- width: number;
5
- } | undefined) => string;
6
- };
7
- export {};
1
+ type Color = [string, string];
2
+ export declare const buttonStyle: {
3
+ default: (colorSet: [Color, Color] | [Color], size?: {
4
+ width: number;
5
+ }) => string;
6
+ };
7
+ export {};
package/util/pattern.js CHANGED
@@ -1,15 +1,15 @@
1
- export var buttonStyle = {
2
- default: function (colorSet, size) {
3
- var colors = colorSet[0], hoverColors = colorSet[1];
4
- var bgColor = colors[0], textColor = colors[1];
5
- var _a = hoverColors || ["", ""], bgHoverColor = _a[0], textHoverColor = _a[1];
6
- var width = (size || { width: 32 }).width;
7
- var classNames = [
8
- "w-".concat(width),
9
- "bg-".concat(bgColor, " ").concat(bgHoverColor ? "hover:bg-".concat(bgHoverColor) : ""),
10
- "text-".concat(textColor, " ").concat(textHoverColor ? "hover:text-".concat(textHoverColor) : ""),
11
- "font-bold py-2 px-4 rounded",
12
- ];
13
- return classNames.join(" ");
14
- },
15
- };
1
+ export const buttonStyle = {
2
+ default: (colorSet, size) => {
3
+ const [colors, hoverColors] = colorSet;
4
+ const [bgColor, textColor] = colors;
5
+ const [bgHoverColor, textHoverColor] = hoverColors || ["", ""];
6
+ const { width } = size || { width: 32 };
7
+ const classNames = [
8
+ `w-${width}`,
9
+ `bg-${bgColor} ${bgHoverColor ? `hover:bg-${bgHoverColor}` : ""}`,
10
+ `text-${textColor} ${textHoverColor ? `hover:text-${textHoverColor}` : ""}`,
11
+ "font-bold py-2 px-4 rounded",
12
+ ];
13
+ return classNames.join(" ");
14
+ },
15
+ };
@@ -1,14 +1,14 @@
1
- export declare const fixed: {
2
- tl: (top: number | string, left: number | string) => string;
3
- br: (bottom: number | string, right: number | string) => string;
4
- };
5
- export declare const absolute: {
6
- tl: (top?: number | string, left?: number | string) => string;
7
- tr: (top?: number | string, right?: number | string) => string;
8
- br: (bottom?: number, right?: number) => string;
9
- bl: (bottom?: number, left?: number) => string;
10
- full: {
11
- tl: (top?: number | string, left?: number | string) => string;
12
- bl: (bottom?: number | string, left?: number | string) => string;
13
- };
14
- };
1
+ export declare const fixed: {
2
+ tl: (top: number | string, left: number | string) => string;
3
+ br: (bottom: number | string, right: number | string) => string;
4
+ };
5
+ export declare const absolute: {
6
+ tl: (top?: number | string, left?: number | string) => string;
7
+ tr: (top?: number | string, right?: number | string) => string;
8
+ br: (bottom?: number, right?: number) => string;
9
+ bl: (bottom?: number, left?: number) => string;
10
+ full: {
11
+ tl: (top?: number | string, left?: number | string) => string;
12
+ bl: (bottom?: number | string, left?: number | string) => string;
13
+ };
14
+ };
package/util/position.js CHANGED
@@ -1,56 +1,44 @@
1
- export var fixed = {
2
- tl: function (top, left) { return "fixed top-".concat(top, " left-").concat(left, " z-50 "); },
3
- br: function (bottom, right) {
4
- return "fixed bottom-".concat(bottom, " right-").concat(right, " z-50 ");
5
- },
6
- };
7
- export var absolute = {
8
- tl: function (top, left) {
9
- var topClass = function () {
10
- if (typeof top === "number" && top < 0)
11
- return "-top-".concat(Math.abs(top));
12
- return "top-".concat(top);
13
- };
14
- var leftClass = function () {
15
- if (typeof left === "number" && left < 0)
16
- return "-left-".concat(Math.abs(left));
17
- return "left-".concat(left);
18
- };
19
- return "absolute ".concat(topClass(), " ").concat(leftClass(), " ");
20
- },
21
- tr: function (top, right) {
22
- var topClass = function () {
23
- if (typeof top === "number" && top < 0)
24
- return "-top-".concat(Math.abs(top), " ");
25
- return "top-".concat(top);
26
- };
27
- var rightClass = function () {
28
- if (typeof right === "number" && right < 0)
29
- return "-right-".concat(Math.abs(right), " ");
30
- return "right-".concat(right);
31
- };
32
- return "absolute ".concat(topClass(), " ").concat(rightClass(), " ");
33
- },
34
- br: function (bottom, right) {
35
- if (bottom === void 0) { bottom = 0; }
36
- if (right === void 0) { right = 0; }
37
- return "absolute bottom-".concat(bottom, " right-").concat(right, " ");
38
- },
39
- bl: function (bottom, left) {
40
- if (bottom === void 0) { bottom = 0; }
41
- if (left === void 0) { left = 0; }
42
- return "absolute bottom-".concat(bottom, " left-").concat(left, " ");
43
- },
44
- full: {
45
- tl: function (top, left) {
46
- if (!(typeof top === "number") || !(typeof left === "number"))
47
- return "absolute top-".concat(top, " left-").concat(left, " w-full ");
48
- var topClass = top >= 0 ? "top-".concat(top) : "-top-".concat(Math.abs(top));
49
- var leftClass = left >= 0 ? "left-".concat(left) : "-left-".concat(Math.abs(left));
50
- return "absolute w-full ".concat(topClass, " ").concat(leftClass, " ");
51
- },
52
- bl: function (bottom, left) {
53
- return "absolute bottom-".concat(bottom !== null && bottom !== void 0 ? bottom : 0, " left-").concat(left !== null && left !== void 0 ? left : 0, " w-full ");
54
- },
55
- },
56
- };
1
+ export const fixed = {
2
+ tl: (top, left) => `fixed top-${top} left-${left} z-50 `,
3
+ br: (bottom, right) => `fixed bottom-${bottom} right-${right} z-50 `,
4
+ };
5
+ export const absolute = {
6
+ tl: (top, left) => {
7
+ const topClass = () => {
8
+ if (typeof top === "number" && top < 0)
9
+ return `-top-${Math.abs(top)}`;
10
+ return `top-${top}`;
11
+ };
12
+ const leftClass = () => {
13
+ if (typeof left === "number" && left < 0)
14
+ return `-left-${Math.abs(left)}`;
15
+ return `left-${left}`;
16
+ };
17
+ return `absolute ${topClass()} ${leftClass()} `;
18
+ },
19
+ tr: (top, right) => {
20
+ const topClass = () => {
21
+ if (typeof top === "number" && top < 0)
22
+ return `-top-${Math.abs(top)} `;
23
+ return `top-${top}`;
24
+ };
25
+ const rightClass = () => {
26
+ if (typeof right === "number" && right < 0)
27
+ return `-right-${Math.abs(right)} `;
28
+ return `right-${right}`;
29
+ };
30
+ return `absolute ${topClass()} ${rightClass()} `;
31
+ },
32
+ br: (bottom = 0, right = 0) => `absolute bottom-${bottom} right-${right} `,
33
+ bl: (bottom = 0, left = 0) => `absolute bottom-${bottom} left-${left} `,
34
+ full: {
35
+ tl: (top, left) => {
36
+ if (!(typeof top === "number") || !(typeof left === "number"))
37
+ return `absolute top-${top} left-${left} w-full `;
38
+ const topClass = top >= 0 ? `top-${top}` : `-top-${Math.abs(top)}`;
39
+ const leftClass = left >= 0 ? `left-${left}` : `-left-${Math.abs(left)}`;
40
+ return `absolute w-full ${topClass} ${leftClass} `;
41
+ },
42
+ bl: (bottom, left) => `absolute bottom-${bottom ?? 0} left-${left ?? 0} w-full `,
43
+ },
44
+ };
package/util/shape.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const circle: (radius: number) => string;
1
+ export declare const circle: (radius: number) => string;
package/util/shape.js CHANGED
@@ -1,3 +1,3 @@
1
- export var circle = function (radius) {
2
- return "rounded-full w-".concat(radius, " h-").concat(radius, " overflow-hidden ");
3
- };
1
+ export const circle = (radius) => {
2
+ return `rounded-full w-${radius} h-${radius} overflow-hidden `;
3
+ };
package/version.txt CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.6
package/header/index.js DELETED
@@ -1,25 +0,0 @@
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 { useState } from "react";
15
- import { circle } from "../util";
16
- function Menu() {
17
- var classNames = ["absolute -left-24 z-40 h-80 w-48 border-2 bg-white "].join(" ");
18
- return (_jsxs("div", __assign({ className: classNames + " fade-in-100 animate-in" }, { children: [_jsx("div", { children: "\u314E\u3147" }), _jsx("div", { children: "\u314E\u3147" })] })));
19
- }
20
- export function DashboardHeader(_a) {
21
- var title = _a.title, image = _a.image;
22
- var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
23
- var _c = image !== null && image !== void 0 ? image : [], src = _c[0], href = _c[1];
24
- return (_jsxs("div", __assign({ className: "relative flex h-20 w-full items-center justify-between bg-white px-19 shadow-black/10 shadow-b-md" }, { children: [_jsxs("div", __assign({ className: "flex h-12 items-center gap-9" }, { children: [src && href ? (_jsx("a", __assign({ href: href }, { children: _jsx("img", { src: src, alt: "logo", className: "h-12" }) }))) : (_jsx("div", { children: "TOSEL Lab" })), _jsx("div", __assign({ className: "text-3xl font-bold" }, { children: title }))] })), _jsxs("div", __assign({ className: "relative" }, { children: [_jsx("button", __assign({ onClick: function () { return setIsOpen(!isOpen); }, className: circle(9) + "border-2" }, { children: "+" })), isOpen ? _jsx(Menu, {}) : null] }))] })));
25
- }