@edu-tosel/design 1.0.16 → 1.0.18

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 (116) hide show
  1. package/board/template/CanvasBoard.js +2 -2
  2. package/board/template/ManageBoard.js +3 -4
  3. package/board/template/PaperBoard.js +1 -1
  4. package/board/widget/Header.js +1 -1
  5. package/card/index.d.ts +3 -5
  6. package/card/index.js +3 -5
  7. package/card/template/AddCard.js +1 -1
  8. package/card/template/ChartCard.js +2 -2
  9. package/card/template/InfoCard.d.ts +13 -20
  10. package/card/template/InfoCard.js +47 -40
  11. package/card/template/NavCard.d.ts +15 -0
  12. package/card/template/NavCard.js +44 -0
  13. package/card/template/TableCard.js +9 -17
  14. package/card/widget/{Card.js → Card.design.js} +12 -27
  15. package/card/{template → widget}/InfoCard.design.js +7 -7
  16. package/card/widget/NavCard.design.d.ts +2 -0
  17. package/card/widget/NavCard.design.js +32 -0
  18. package/globals.css +18 -2
  19. package/html/index.d.ts +2 -1
  20. package/html/index.js +2 -1
  21. package/html/template/Label.d.ts +8 -0
  22. package/html/template/Label.js +14 -0
  23. package/html/widget/DatePicker.js +1 -1
  24. package/html/widget/EmailInput.d.ts +2 -0
  25. package/html/widget/EmailInput.js +44 -0
  26. package/html/widget/Input.js +6 -4
  27. package/html/widget/Label.design.d.ts +2 -0
  28. package/html/widget/Label.design.js +36 -0
  29. package/html/widget/Select.js +5 -5
  30. package/html/widget/Toggle.d.ts +1 -1
  31. package/html/widget/Toggle.js +3 -2
  32. package/interaction/index.d.ts +2 -5
  33. package/interaction/index.js +2 -5
  34. package/interaction/template/Loading.d.ts +9 -0
  35. package/interaction/template/Loading.js +9 -0
  36. package/interaction/template/NoData.d.ts +5 -0
  37. package/interaction/template/NoData.js +9 -0
  38. package/interaction/widget/Jumper.design.d.ts +1 -0
  39. package/interaction/widget/{LoadingJumper.js → Jumper.design.js} +1 -1
  40. package/interaction/widget/Script.design.d.ts +3 -0
  41. package/interaction/widget/{NoData.js → Script.design.js} +2 -2
  42. package/interaction/widget/Spinner.design.d.ts +1 -0
  43. package/interaction/widget/{LoadingSpinner.js → Spinner.design.js} +1 -1
  44. package/interaction/widget/Worm.design.d.ts +1 -0
  45. package/interaction/widget/{LoadingWorm.js → Worm.design.js} +2 -2
  46. package/interface/Card.d.ts +48 -41
  47. package/interface/HTMLElement.d.ts +7 -3
  48. package/interface/Layout.d.ts +20 -0
  49. package/interface/Layout.js +1 -0
  50. package/interface/Property.d.ts +1 -1
  51. package/interface/Widget.d.ts +23 -0
  52. package/interface/index.d.ts +1 -0
  53. package/interface/index.js +1 -0
  54. package/layout/index.d.ts +3 -1
  55. package/layout/index.js +3 -1
  56. package/layout/template/DataField.d.ts +8 -0
  57. package/layout/template/DataField.js +16 -0
  58. package/layout/{widget → template}/Events.d.ts +1 -1
  59. package/layout/template/Gallery.js +2 -2
  60. package/layout/template/Row.d.ts +8 -0
  61. package/layout/template/Row.js +24 -0
  62. package/layout/template/Shelf.js +1 -1
  63. package/layout/template/dashboard/Header.d.ts +2 -4
  64. package/layout/template/dashboard/Header.js +7 -5
  65. package/layout/template/dashboard/index.d.ts +2 -6
  66. package/layout/template/dashboard/index.js +6 -6
  67. package/layout/widget/DataField.design.d.ts +2 -0
  68. package/{board/widget/DataField.js → layout/widget/DataField.design.js} +8 -8
  69. package/layout/widget/Row.design.d.ts +2 -0
  70. package/layout/widget/Row.design.js +16 -0
  71. package/modal/template/Alert.js +1 -2
  72. package/navigation/Navigation.js +2 -2
  73. package/overlay/template/Manage.js +1 -1
  74. package/package.json +1 -1
  75. package/tailwind.config.ts +15 -91
  76. package/text/Formatter.d.ts +1 -1
  77. package/text/Formatter.js +76 -13
  78. package/util/colors.d.ts +8 -1
  79. package/util/colors.js +6 -3
  80. package/util/index.d.ts +0 -3
  81. package/util/index.js +0 -3
  82. package/version.txt +1 -1
  83. package/board/widget/DataField.d.ts +0 -7
  84. package/board/widget/Tags.d.ts +0 -14
  85. package/board/widget/Tags.js +0 -30
  86. package/card/template/ProfileCard.d.ts +0 -14
  87. package/card/template/ProfileCard.js +0 -8
  88. package/card/template/ReportCard.d.ts +0 -33
  89. package/card/template/ReportCard.js +0 -15
  90. package/card/template/RowCard.d.ts +0 -2
  91. package/card/template/RowCard.js +0 -24
  92. package/card/template/TrumpCard.d.ts +0 -2
  93. package/card/template/TrumpCard.js +0 -19
  94. package/html/widget/Button.d.ts +0 -2
  95. package/html/widget/Button.js +0 -15
  96. package/interaction/template/Exception.d.ts +0 -2
  97. package/interaction/template/Exception.js +0 -10
  98. package/interaction/widget/LoadingJumper.d.ts +0 -1
  99. package/interaction/widget/LoadingSpinner.d.ts +0 -1
  100. package/interaction/widget/LoadingWorm.d.ts +0 -1
  101. package/interaction/widget/NoData.d.ts +0 -1
  102. package/util/display.d.ts +0 -25
  103. package/util/display.js +0 -25
  104. package/util/displayResponsive.d.ts +0 -3
  105. package/util/displayResponsive.js +0 -15
  106. package/util/position.d.ts +0 -14
  107. package/util/position.js +0 -44
  108. /package/board/widget/{Board.d.ts → Board.design.d.ts} +0 -0
  109. /package/board/widget/{Board.js → Board.design.js} +0 -0
  110. /package/card/widget/{Card.d.ts → Card.design.d.ts} +0 -0
  111. /package/card/{template → widget}/InfoCard.design.d.ts +0 -0
  112. /package/layout/{widget → template}/Events.js +0 -0
  113. /package/layout/widget/{Shelf.d.ts → Shelf.design.d.ts} +0 -0
  114. /package/layout/widget/{Shelf.js → Shelf.design.js} +0 -0
  115. /package/layout/widget/{Tab.d.ts → Tab.design.d.ts} +0 -0
  116. /package/layout/widget/{Tab.js → Tab.design.js} +0 -0
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useId } from "react";
3
- import { cn } from "../../util";
4
- import { Card } from "../widget/Card";
5
- import { useWidgetStore } from "../../store";
6
- export default function RowCard({ onClick, dataSet, dataField, }) {
7
- const id = useId();
8
- const { flag, setIsOwn } = useWidgetStore();
9
- const container = {
10
- displays: "flex items-center ",
11
- sizes: "h-full",
12
- paddings: "px-2 xs:px-4 xl:px-7.5 ",
13
- styles: "text-xl hover:bg-gray-100 duration-100",
14
- };
15
- return (_jsx(Card, { options: {
16
- onClick,
17
- classNames: cn(container),
18
- width: "full",
19
- height: "xs",
20
- boundary: "none",
21
- rounded: "none",
22
- }, children: dataField &&
23
- Object.keys(dataField).map((key) => (_jsx("div", { className: `w-${dataField[key]?.size}/100 truncate`, children: dataSet[key] }, id + key))) }));
24
- }
@@ -1,2 +0,0 @@
1
- import { TrumpCardProps } from "../../interface/Card";
2
- export default function TrumpCard({ titles, options }: TrumpCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LineBreaks } from "../../text";
3
- import { Card } from "../widget/Card";
4
- export default function TrumpCard({ titles, options }) {
5
- const { title, subtitle, color: titleColor } = titles;
6
- const { onClick, width, image, subButton } = options ?? {};
7
- const [buttonText, buttonBgColor, buttonAction] = subButton ?? [
8
- null,
9
- "red-crimson",
10
- () => { },
11
- ];
12
- const { path, size } = image ?? { size: "sub" };
13
- const imageClassNames = () => {
14
- if (size === "full")
15
- return "w-full h-full object-cover";
16
- return "absolute bottom-0 right-0 w-full xs:w-auto max-w-120 z-0 max-h-44 object-contain";
17
- };
18
- return (_jsxs(Card, { options: { width: width ?? "xs", onClick }, children: [_jsxs("div", { className: `absolute top-8 left-8 w-48 flex flex-col gap-2 z-10 text-${titleColor}`, children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsx(LineBreaks, { texts: subtitle ?? "" }), subButton ? (_jsx("button", { className: `text-white rounded-md bg-${buttonBgColor} w-45 h-11 flex justify-center items-center`, onClick: buttonAction, children: buttonText })) : null] }), path ? (_jsx("img", { src: path, alt: "trump-image", loading: "lazy", className: imageClassNames() })) : null] }));
19
- }
@@ -1,2 +0,0 @@
1
- import { HTMLButtonElement } from "../../interface";
2
- export default function Button({ title, onClick }: HTMLButtonElement): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "../../util";
3
- const widthSize = {
4
- md: "w-45",
5
- lg: "w-50",
6
- };
7
- const heightSize = {
8
- md: "h-11",
9
- };
10
- export default function Button({ title, onClick }) {
11
- const container = {
12
- sizes: "",
13
- };
14
- return (_jsx("button", { onClick: onClick, className: cn(container), children: title }));
15
- }
@@ -1,2 +0,0 @@
1
- import { ExceptionProps } from "../../interface/Interaction";
2
- export default function Exception({ exceptions, children }: ExceptionProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- import { Fragment } from "react";
3
- export default function Exception({ exceptions, children }) {
4
- if (!exceptions)
5
- return _jsx(_Fragment, { children: children });
6
- const trueComponents = exceptions
7
- .filter(([exception]) => exception)
8
- .map(([, Component], index) => (_jsx(Fragment, { children: Component }, index)));
9
- return _jsx(_Fragment, { children: trueComponents.length > 0 ? trueComponents : children });
10
- }
@@ -1 +0,0 @@
1
- export default function LoadingJumper(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export default function LoadingSpinner(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export default function LoadingWorm(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export default function NoData(): import("react/jsx-runtime").JSX.Element;
package/util/display.d.ts DELETED
@@ -1,25 +0,0 @@
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 DELETED
@@ -1,25 +0,0 @@
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 +0,0 @@
1
- export declare const responsiveColToRow: () => string;
2
- export declare const responsiveRowToCol: () => string;
3
- export declare const responsiveGridToCol: (gridCell: number) => string;
@@ -1,15 +0,0 @@
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
- };
@@ -1,14 +0,0 @@
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 DELETED
@@ -1,44 +0,0 @@
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
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes