@edu-tosel/design 1.0.14 → 1.0.16
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 +0 -5
- package/board/template/CanvasBoard.js +1 -1
- package/board/template/ManageBoard.js +5 -5
- package/board/widget/Board.js +4 -4
- package/board/widget/DataField.d.ts +3 -5
- package/board/widget/DataField.js +16 -20
- package/board/widget/Header.d.ts +1 -1
- package/board/widget/Header.js +10 -8
- package/card/template/AddCard.d.ts +1 -1
- package/card/template/AddCard.js +11 -5
- package/card/template/InfoCard.design.js +1 -1
- package/card/template/InfoCard.js +7 -7
- package/card/template/RowCard.d.ts +2 -5
- package/card/template/RowCard.js +15 -13
- package/card/template/TableCard.js +1 -1
- package/card/widget/Card.js +11 -5
- package/globals.css +92 -0
- package/html/index.d.ts +1 -0
- package/html/index.js +1 -0
- package/html/widget/DatePicker.d.ts +3 -0
- package/html/widget/DatePicker.js +23 -0
- package/html/widget/Input.d.ts +1 -1
- package/html/widget/Input.js +2 -1
- package/html/widget/Select.d.ts +1 -1
- package/html/widget/Select.js +23 -14
- package/html/widget/Toggle.d.ts +2 -0
- package/html/widget/Toggle.js +13 -0
- package/index.d.ts +0 -2
- package/index.js +0 -2
- package/interface/Board.d.ts +9 -8
- package/interface/Card.d.ts +10 -1
- package/interface/HTMLElement.d.ts +16 -14
- package/interface/HTMLElement.js +7 -1
- package/interface/Modal.d.ts +1 -0
- package/interface/Overlay.d.ts +17 -0
- package/interface/Property.d.ts +4 -2
- package/interface/index.d.ts +1 -0
- package/interface/index.js +1 -0
- package/layout/template/Shelf.js +3 -3
- package/layout/template/dashboard/index.js +10 -4
- package/layout/widget/Events.js +6 -0
- package/layout/widget/Shelf.js +3 -2
- package/modal/template/Input.d.ts +1 -1
- package/modal/template/Input.js +2 -2
- package/modal/widget/Modal.design.d.ts +1 -1
- package/modal/widget/Modal.design.js +3 -3
- package/navigation/Navigation.js +8 -13
- package/overlay/template/Info.d.ts +2 -0
- package/overlay/template/Info.js +5 -0
- package/overlay/template/Manage.d.ts +2 -0
- package/overlay/template/Manage.js +17 -0
- package/overlay/template/index.d.ts +6 -2
- package/overlay/template/index.js +6 -5
- package/overlay/widget/Overlay.design.d.ts +2 -0
- package/overlay/widget/Overlay.design.js +25 -0
- package/package.json +4 -1
- package/store/index.d.ts +3 -0
- package/store/index.js +12 -3
- package/tailwind.config.ts +20 -0
- package/util/checkPathMatch.d.ts +2 -0
- package/util/checkPathMatch.js +8 -0
- package/util/index.d.ts +1 -0
- package/util/index.js +1 -0
- package/version.txt +1 -1
- package/deck/index.d.ts +0 -1
- package/deck/index.js +0 -1
- package/deck/template/Deck.d.ts +0 -6
- package/deck/template/Deck.design.d.ts +0 -2
- package/deck/template/Deck.design.js +0 -21
- package/deck/template/Deck.js +0 -11
- package/deck/widget/Deck.d.ts +0 -2
- package/deck/widget/Deck.js +0 -14
- package/interface/Deck.d.ts +0 -15
- package/interface/Deck.js +0 -1
- package/interface/Menu.d.ts +0 -6
- package/interface/Menu.js +0 -1
- package/menu/index.d.ts +0 -1
- package/menu/index.js +0 -1
- package/menu/template/SideMenu.d.ts +0 -2
- package/menu/template/SideMenu.js +0 -20
- package/menu/widget/HTMLElement.d.ts +0 -8
- package/menu/widget/HTMLElement.js +0 -9
- package/overlay/template/Overlay.design.d.ts +0 -2
- package/overlay/template/Overlay.design.js +0 -5
- package/overlay/widget/Overlay.d.ts +0 -2
- package/overlay/widget/Overlay.js +0 -17
package/tailwind.config.ts
CHANGED
|
@@ -84,6 +84,9 @@ export default {
|
|
|
84
84
|
"sun-calc": "calc(50% - 6rem)",
|
|
85
85
|
1: "0.25rem",
|
|
86
86
|
2.5: "0.625rem",
|
|
87
|
+
3.5: "0.875rem",
|
|
88
|
+
3.75: "0.9375rem",
|
|
89
|
+
4.75: "1.1875rem",
|
|
87
90
|
6.25: "1.5625rem",
|
|
88
91
|
6.5: "1.625rem",
|
|
89
92
|
7: "1.75rem",
|
|
@@ -93,6 +96,7 @@ export default {
|
|
|
93
96
|
11: "2.75rem",
|
|
94
97
|
12: "3rem",
|
|
95
98
|
13.25: "3.3125rem",
|
|
99
|
+
13.75: "3.4375rem",
|
|
96
100
|
14: "3.5rem",
|
|
97
101
|
14.5: "3.625rem",
|
|
98
102
|
15: "3.75rem",
|
|
@@ -100,6 +104,8 @@ export default {
|
|
|
100
104
|
18: "4.5rem",
|
|
101
105
|
18.75: "4.6875rem",
|
|
102
106
|
19: "4.75rem",
|
|
107
|
+
19.25: "4.8125rem",
|
|
108
|
+
21: "5.25rem",
|
|
103
109
|
21.75: "5.4375rem",
|
|
104
110
|
22: "5.5rem",
|
|
105
111
|
23: "5.75rem",
|
|
@@ -120,11 +126,14 @@ export default {
|
|
|
120
126
|
48: "12rem",
|
|
121
127
|
49: "12.25rem",
|
|
122
128
|
50: "12.5rem",
|
|
129
|
+
51: "12.75rem",
|
|
123
130
|
52: "13rem",
|
|
131
|
+
52.5: "13.125rem",
|
|
124
132
|
54: "13.5rem",
|
|
125
133
|
56: "14rem",
|
|
126
134
|
62: "15.5rem",
|
|
127
135
|
64: "16rem",
|
|
136
|
+
67.5: "16.875rem",
|
|
128
137
|
68: "17rem",
|
|
129
138
|
69: "17.25rem",
|
|
130
139
|
70: "17.5rem",
|
|
@@ -157,13 +166,24 @@ export default {
|
|
|
157
166
|
132: "33rem",
|
|
158
167
|
135: "33.75rem",
|
|
159
168
|
136: "34rem",
|
|
169
|
+
138.75: "34.6875rem",
|
|
160
170
|
140: "35rem",
|
|
161
171
|
144: "36rem",
|
|
172
|
+
145: "36.25rem",
|
|
173
|
+
145.25: "36.375rem",
|
|
174
|
+
146: "36.5rem",
|
|
175
|
+
147: "36.75rem",
|
|
162
176
|
148: "37rem",
|
|
177
|
+
151.5: "37.875rem",
|
|
178
|
+
151.75: "37.9375rem",
|
|
179
|
+
152: "38rem",
|
|
180
|
+
153: "38.25rem",
|
|
163
181
|
158: "39.5rem",
|
|
182
|
+
159: "39.75rem",
|
|
164
183
|
160: "40rem",
|
|
165
184
|
164: "41rem",
|
|
166
185
|
168: "42rem",
|
|
186
|
+
171.5: "42.875rem",
|
|
167
187
|
172: "43rem",
|
|
168
188
|
176: "44rem",
|
|
169
189
|
178: "44.5rem",
|
package/util/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as cn } from "./classNames";
|
|
|
2
2
|
export { default as unixToDate } from "./convertUnixTimestampToDate";
|
|
3
3
|
export { default as isDebug } from "./isDebug";
|
|
4
4
|
export { default as sortByOrder } from "./sortByOrder";
|
|
5
|
+
export { default as checkPathMatch } from "./checkPathMatch";
|
|
5
6
|
export * from "./colors";
|
|
6
7
|
export * from "./display";
|
|
7
8
|
export * from "./displayResponsive";
|
package/util/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { default as cn } from "./classNames";
|
|
|
2
2
|
export { default as unixToDate } from "./convertUnixTimestampToDate";
|
|
3
3
|
export { default as isDebug } from "./isDebug";
|
|
4
4
|
export { default as sortByOrder } from "./sortByOrder";
|
|
5
|
+
export { default as checkPathMatch } from "./checkPathMatch";
|
|
5
6
|
export * from "./colors";
|
|
6
7
|
export * from "./display";
|
|
7
8
|
export * from "./displayResponsive";
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.16
|
package/deck/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Deck } from "./template/Deck";
|
package/deck/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Deck } from "./template/Deck";
|
package/deck/template/Deck.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DeckProps } from "../../interface/Deck";
|
|
2
|
-
declare function Deck<T extends string | number>(props: DeckProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace Deck {
|
|
4
|
-
var Sub: <T extends string | number>({ titles, children, options, debug, }: DeckProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
}
|
|
6
|
-
export default Deck;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn, isDebug } from "../../util";
|
|
3
|
-
import { Deck } from "./../widget/Deck";
|
|
4
|
-
export default function DeckDesign({ children, titles, options, debug, }) {
|
|
5
|
-
const { title, subtitle, isSub } = titles ?? {};
|
|
6
|
-
const { height } = options ?? {};
|
|
7
|
-
const container = {
|
|
8
|
-
displays: "flex flex-col gap-4",
|
|
9
|
-
sizes: `w-full h-${height ?? "auto"} `,
|
|
10
|
-
debug: debug && isDebug(`border-2 border-${debug}`),
|
|
11
|
-
};
|
|
12
|
-
const titleBox = {
|
|
13
|
-
container: "flex flex-col gap-1",
|
|
14
|
-
title: {
|
|
15
|
-
text: isSub ? "text-base xl:text-lg" : "text-xl xl:text-2xl",
|
|
16
|
-
font: "font-bold",
|
|
17
|
-
},
|
|
18
|
-
subtitle: isSub ? "text-xs xl:text-sm" : "text-sm xl:text-base",
|
|
19
|
-
};
|
|
20
|
-
return (_jsxs("div", { className: cn(container), children: [titles && (_jsxs("div", { children: [_jsx("div", { className: cn(titleBox.title), children: title }), _jsx("div", { className: cn(titleBox.subtitle), children: subtitle })] })), _jsx(Deck, { children: children })] }));
|
|
21
|
-
}
|
package/deck/template/Deck.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import DeckDesign from "./Deck.design";
|
|
3
|
-
function Deck(props) {
|
|
4
|
-
return _jsx(DeckDesign, { ...props });
|
|
5
|
-
}
|
|
6
|
-
function Sub({ titles, children, options, debug, }) {
|
|
7
|
-
const { title, subtitle } = titles ?? { title: "" };
|
|
8
|
-
return (_jsx(DeckDesign, { titles: { title, subtitle, isSub: true }, debug: debug, ...options, children: children }));
|
|
9
|
-
}
|
|
10
|
-
Deck.Sub = Sub;
|
|
11
|
-
export default Deck;
|
package/deck/widget/Deck.d.ts
DELETED
package/deck/widget/Deck.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../util";
|
|
3
|
-
export function Deck({ children, options, }) {
|
|
4
|
-
const { flex, justify, gapX, gapY, overflowScroll } = options ?? {};
|
|
5
|
-
const body = {
|
|
6
|
-
displays: `flex flex-col flex-wrap gap-y-${gapY ?? 5}`,
|
|
7
|
-
flex: flex === "col" ? "sm:flex-col" : "sm:flex-row",
|
|
8
|
-
justify: `justify-${justify ?? "start"}`,
|
|
9
|
-
gapX: `${`gap-x-${gapX ?? 7.5}`}`,
|
|
10
|
-
sizes: "sm:w-full ",
|
|
11
|
-
styles: `${overflowScroll ? "overflow-x-scroll" : ""} duration-500`,
|
|
12
|
-
};
|
|
13
|
-
return _jsx("div", { className: cn(body), children: children });
|
|
14
|
-
}
|
package/interface/Deck.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Titles } from "./Property";
|
|
2
|
-
export interface DeckProps<T> {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
titles?: Titles;
|
|
5
|
-
options?: {
|
|
6
|
-
flex?: "col" | "row";
|
|
7
|
-
justify?: "between";
|
|
8
|
-
overflowScroll?: boolean;
|
|
9
|
-
width?: T;
|
|
10
|
-
height?: number;
|
|
11
|
-
gapX?: number;
|
|
12
|
-
gapY?: number;
|
|
13
|
-
};
|
|
14
|
-
debug?: string;
|
|
15
|
-
}
|
package/interface/Deck.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/interface/Menu.d.ts
DELETED
package/interface/Menu.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/menu/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SideMenu } from "./template/SideMenu";
|
package/menu/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SideMenu } from "./template/SideMenu";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useWidgetStore } from "../../store";
|
|
3
|
-
import { cn } from "../../util";
|
|
4
|
-
import HTMLElement from "../widget/HTMLElement";
|
|
5
|
-
export default function SideMenu({ log, setting, buttons, }) {
|
|
6
|
-
const { tempData, setTempData, clearTempData, events, removeView } = useWidgetStore();
|
|
7
|
-
const isOpen = events.some(({ event }) => event === "sideMenu");
|
|
8
|
-
const positions = "absolute top-20 right-0";
|
|
9
|
-
const paddings = "pt-8";
|
|
10
|
-
const sizes = `${isOpen ? "w-160" : "w-0"} h-full xl:h-158`;
|
|
11
|
-
const styles = `${isOpen ? "opacity-100 z-30" : "opacity-0 z-0"} bg-gray-200 duration-500`;
|
|
12
|
-
const { prints, logs } = log ?? {};
|
|
13
|
-
return (_jsx("div", { className: cn(positions, sizes, styles, paddings), children: _jsxs("div", { className: `relative w-full h-full flex flex-col items-center gap-12 ${isOpen ? "block" : "hidden"}`, children: [_jsxs("div", { className: "w-9/10 border-2 border-black p-2 h-80 relative", children: [_jsx("div", { className: "grid grid-cols-2", children: Object.entries(setting).map(([key, value]) => (_jsxs("div", { className: "text-base font-bold flex gap-2", children: [_jsxs("div", { className: "w-16", children: [value["label"], ":"] }), _jsx(HTMLElement, { type: value["type"], value: tempData[key], options: value["options"], onChange: (value) => setTempData({
|
|
14
|
-
...tempData,
|
|
15
|
-
[key]: value,
|
|
16
|
-
}) })] }, key))) }), _jsx("div", { className: "absolute bottom-2 right-2 flex justify-end gap-2", children: buttons?.map(([title, onClick]) => (_jsx("button", { onClick: onClick, className: "px-2 py-1 bg-blue-500 text-white", children: title }, title))) })] }), _jsx("div", { className: "border-2 border-black w-9/10 p-2 h-48 overflow-y-scroll", children: logs?.map((log, i) => (_jsx("div", { className: "text-base flex gap-2", children: prints?.map((print) => (_jsx("div", { className: "", children: log[print] }, print))) }, i))) }), _jsx("button", { onClick: () => {
|
|
17
|
-
clearTempData();
|
|
18
|
-
return removeView("sideMenu");
|
|
19
|
-
}, className: "absolute left-0 top-2/5 text-3xl font-bold", children: ">" })] }) }));
|
|
20
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Dispatch } from "react";
|
|
2
|
-
import { HTMLElementType } from "../../interface";
|
|
3
|
-
export default function HTMLElement({ type, value, options, onChange, }: {
|
|
4
|
-
type: HTMLElementType;
|
|
5
|
-
value: string | number;
|
|
6
|
-
options?: [string, string][];
|
|
7
|
-
onChange?: Dispatch<string>;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export default function HTMLElement({ type, value, options, onChange, }) {
|
|
3
|
-
if (type === "text")
|
|
4
|
-
return _jsx("div", { children: value });
|
|
5
|
-
if (type === "input")
|
|
6
|
-
return (_jsx("input", { className: "w-32", value: value, onChange: (e) => onChange?.(e.target.value) }));
|
|
7
|
-
if (type === "select")
|
|
8
|
-
return (_jsx("select", { value: value, onChange: (e) => onChange?.(e.target.value), children: options?.map(([value, label]) => (_jsx("option", { value: value, children: label }, value))) }));
|
|
9
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTransition, animated } from "react-spring";
|
|
3
|
-
import { cn } from "../../util";
|
|
4
|
-
export default function Overlay({ isVisible }) {
|
|
5
|
-
const container = {
|
|
6
|
-
positions: "absolute top-0 right-0 z-40",
|
|
7
|
-
sizes: "h-full ",
|
|
8
|
-
styles: "bg-black",
|
|
9
|
-
};
|
|
10
|
-
const transitions = useTransition(isVisible, {
|
|
11
|
-
from: { opacity: 0, width: "0%" },
|
|
12
|
-
enter: { opacity: 1, width: "33.3333%" },
|
|
13
|
-
leave: { opacity: 0, width: "0%" },
|
|
14
|
-
config: { duration: 500 },
|
|
15
|
-
});
|
|
16
|
-
return transitions((styles, item) => item && (_jsx(animated.div, { style: styles, className: cn(container), children: _jsx("div", { className: "text-white text-3xl", children: "TEST" }) })));
|
|
17
|
-
}
|