@edu-tosel/design 1.0.11 → 1.0.12

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.
@@ -4,7 +4,7 @@ import { Board } from "../widget/Board";
4
4
  export default function PaperBoard({ children, debug }) {
5
5
  const container = {
6
6
  displays: "flex flex-col items-center gap-7.5",
7
- paddings: "px-4 pt-3 pb-16",
7
+ paddings: "px-4 pt-5 pb-16",
8
8
  };
9
9
  return (_jsx(Board, { options: { width: "lg", height: "full", isRounded: false }, debug: debug, children: _jsx("div", { className: cn(container), children: children }) }));
10
10
  }
@@ -1,7 +1,7 @@
1
1
  import { Titles } from "../../interface";
2
2
  export default function ReportCard({ titles, type, dataSets, dataField, }: {
3
3
  titles: Titles;
4
- type: "table" | "chart";
4
+ type: "text" | "table" | "chart";
5
5
  dataSets: {
6
6
  items: Record<string, string | number>[];
7
7
  average?: {
@@ -14,7 +14,7 @@ export default function ReportCard({ titles, type, dataSets, dataField, }) {
14
14
  title: "text-lg font-bold",
15
15
  subtitle: "text-sm",
16
16
  };
17
- return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(titleBox.container), children: [_jsx("div", { className: cn(titleBox.title), children: title }), _jsx(LineBreaks, { className: cn(titleBox.subtitle), texts: subtitle })] }), type === "table" && sizes ? (_jsx(TableCard, { sizes: sizes, fields: fields, data: dataSets.items, options: {
17
+ return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(titleBox.container), children: [_jsx("div", { className: cn(titleBox.title), children: title }), _jsx(LineBreaks, { className: cn(titleBox.subtitle), texts: subtitle })] }), type === "text" ? (_jsx("div", { children: "text" })) : type === "table" && sizes ? (_jsx(TableCard, { sizes: sizes, fields: fields, data: dataSets.items, options: {
18
18
  width: "full",
19
19
  height: "auto",
20
20
  } })) : axis && type === "chart" ? (_jsx(ChartCard, { data: dataSets.items, xAxis: axis.x, yAxis: axis.y, lines: lines, bars: bars, areas: areas, average: dataSets.average, options: {
@@ -13,5 +13,5 @@ export default function TableCard({ data, fields, sizes, options, }) {
13
13
  `flex h-11 items-center font-bold pl-4`,
14
14
  `bg-${bgColor ?? "gray-300"} text-${textColor ?? "black"}`,
15
15
  ].join(" ");
16
- return (_jsx(Card, { options: { width: width ?? "lg", height: height ?? "lg", overflow }, children: _jsxs("div", { className: cn(container), children: [_jsx("div", { className: fieldsClassNames, children: keys.map((key) => (_jsx("div", { className: `w-${sizes[key]}`, children: fields[key] }, key))) }), data.map((row, index) => (_jsx("div", { className: "flex items-center pl-4 h-11 ", children: keys.map((key) => (_jsx("div", { className: `truncate w-${sizes[key] ?? "auto"}`, children: row[key] }, key))) }, index)))] }) }));
16
+ return (_jsx(Card, { options: { width: width ?? "lg", height: height ?? "lg", overflow }, children: _jsxs("div", { className: cn(container), children: [_jsx("div", { className: fieldsClassNames, children: keys.map((key) => (_jsx("div", { className: `w-${sizes[key]}/100`, children: fields[key] }, key))) }), data.map((row, index) => (_jsx("div", { className: "flex items-center pl-4 h-11 ", children: keys.map((key) => (_jsx("div", { className: `truncate w-${sizes[key] ?? "auto"}`, children: row[key] }, key))) }, index)))] }) }));
17
17
  }
@@ -1,4 +1,5 @@
1
1
  export { default as Exception } from "./template/Exception";
2
2
  export { default as LoadingSpinner } from "./widget/LoadingSpinner";
3
3
  export { default as LoadingJumper } from "./widget/LoadingJumper";
4
+ export { default as LoadingWorm } from "./widget/LoadingWorm";
4
5
  export { default as NoData } from "./widget/NoData";
@@ -1,4 +1,5 @@
1
1
  export { default as Exception } from "./template/Exception";
2
2
  export { default as LoadingSpinner } from "./widget/LoadingSpinner";
3
3
  export { default as LoadingJumper } from "./widget/LoadingJumper";
4
+ export { default as LoadingWorm } from "./widget/LoadingWorm";
4
5
  export { default as NoData } from "./widget/NoData";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -14,6 +14,7 @@
14
14
  "type": "module",
15
15
  "scripts": {},
16
16
  "dependencies": {
17
+ "@edu-tosel/design": "^1.0.11",
17
18
  "react": "^18.2.0",
18
19
  "react-dom": "^18.2.0",
19
20
  "react-lottie-player": "^1.5.6",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.11
1
+ 1.0.12