@edu-tosel/design 1.0.2 → 1.0.4
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 +44 -30
- package/board/index.d.ts +2 -2
- package/board/index.js +2 -2
- package/board/template/CanvasBoard.d.ts +2 -0
- package/board/template/CanvasBoard.js +10 -0
- package/board/template/ManageBoard.d.ts +4 -0
- package/board/template/ManageBoard.js +28 -0
- package/board/widget/Board.d.ts +2 -0
- package/board/widget/Board.js +16 -0
- package/board/widget/DataField.d.ts +6 -0
- package/board/widget/DataField.js +24 -0
- package/board/widget/Header.d.ts +2 -0
- package/board/widget/Header.js +22 -0
- package/board/widget/Tab.d.ts +4 -0
- package/board/widget/Tab.js +17 -0
- package/board/widget/Tags.d.ts +3 -0
- package/board/widget/Tags.js +30 -0
- package/card/index.d.ts +5 -4
- package/card/index.js +5 -4
- package/card/template/ChartCard.d.ts +2 -0
- package/card/{ChartCard.js → template/ChartCard.js} +2 -3
- package/card/{ProfileCard.d.ts → template/ProfileCard.d.ts} +1 -1
- package/card/{ProfileCard.js → template/ProfileCard.js} +3 -3
- package/card/template/RowCard.d.ts +5 -0
- package/card/template/RowCard.js +26 -0
- package/card/template/TableCard.d.ts +2 -0
- package/card/{TableCard.js → template/TableCard.js} +2 -3
- package/card/template/TrumpCard.d.ts +2 -0
- package/card/{TrumpCard.js → template/TrumpCard.js} +3 -3
- package/card/{Card.d.ts → widget/Card.d.ts} +1 -2
- package/card/widget/Card.js +45 -0
- package/deck/Deck.d.ts +1 -0
- package/deck/Deck.js +11 -10
- package/globals.css +2 -2
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/interaction/Exception.d.ts +2 -0
- package/interaction/Exception.js +9 -0
- package/interaction/LoadingSpinner.d.ts +1 -0
- package/interaction/LoadingSpinner.js +5 -0
- package/interaction/index.d.ts +2 -0
- package/interaction/index.js +2 -0
- package/interface/Board.d.ts +52 -5
- package/interface/Card.d.ts +3 -0
- package/interface/HTMLElement.d.ts +13 -0
- package/interface/HTMLElement.js +1 -0
- package/interface/Interaction.d.ts +5 -0
- package/interface/Interaction.js +1 -0
- package/interface/Property.d.ts +3 -1
- package/interface/Property.js +2 -0
- package/interface/index.d.ts +0 -1
- package/interface/index.js +0 -1
- package/layout/dashboard/index.js +1 -1
- package/menu/SideMenu.d.ts +1 -0
- package/menu/SideMenu.js +14 -0
- package/menu/index.d.ts +1 -0
- package/menu/index.js +1 -0
- package/modal/Modal.js +2 -0
- package/navigation/Navigation.js +3 -5
- package/package.json +4 -2
- package/shelf/Shelf.d.ts +1 -1
- package/shelf/Shelf.js +2 -2
- package/shelf/index.d.ts +1 -1
- package/shelf/index.js +1 -1
- package/store/index.d.ts +6 -0
- package/store/index.js +21 -0
- package/tailwind.config.ts +166 -51
- package/version.txt +1 -1
- package/board/Board.d.ts +0 -2
- package/board/Board.js +0 -14
- package/board/CanvasBoard.d.ts +0 -2
- package/board/CanvasBoard.js +0 -11
- package/board/Header.d.ts +0 -6
- package/board/Header.js +0 -12
- package/board/ListBoard.d.ts +0 -7
- package/board/ListBoard.js +0 -7
- package/card/Card.js +0 -34
- package/card/ChartCard.d.ts +0 -3
- package/card/TableCard.d.ts +0 -3
- package/card/TrumpCard.d.ts +0 -2
package/interface/Board.d.ts
CHANGED
|
@@ -1,10 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import { Button, Size } from "./Property";
|
|
3
|
+
interface OptionsProps {
|
|
4
|
+
color?: string;
|
|
5
|
+
}
|
|
6
|
+
interface WidgetsProps {
|
|
7
|
+
exceptions?: [boolean, React.ReactNode][];
|
|
8
|
+
components?: [boolean | string, React.ReactNode][];
|
|
9
|
+
tabs?: Button[];
|
|
10
|
+
}
|
|
2
11
|
export interface BoardProps {
|
|
3
|
-
children
|
|
4
|
-
|
|
5
|
-
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
widgets?: WidgetsProps;
|
|
14
|
+
options?: OptionsProps;
|
|
15
|
+
}
|
|
16
|
+
export interface BoardHeaderProps {
|
|
17
|
+
title?: string;
|
|
18
|
+
tags?: {
|
|
19
|
+
selects?: {
|
|
20
|
+
title: string;
|
|
21
|
+
onChange: Dispatch<string>;
|
|
22
|
+
options: [string | number, string][];
|
|
23
|
+
width?: Size;
|
|
24
|
+
}[];
|
|
25
|
+
inputs?: {
|
|
26
|
+
title: string;
|
|
27
|
+
onChange: Dispatch<string>;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
width?: Size;
|
|
30
|
+
}[];
|
|
6
31
|
};
|
|
7
32
|
options?: {
|
|
8
|
-
|
|
33
|
+
colors?: {
|
|
34
|
+
bgColor?: string;
|
|
35
|
+
textColor?: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface ManageBoardProps<T> extends BoardProps {
|
|
40
|
+
data: {
|
|
41
|
+
dataSets: {
|
|
42
|
+
title?: string;
|
|
43
|
+
items: T[];
|
|
44
|
+
renderItem: (items: T) => React.ReactNode;
|
|
45
|
+
}[];
|
|
46
|
+
dataField?: {
|
|
47
|
+
fields: Record<string, string>;
|
|
48
|
+
sizes: Record<string, string>;
|
|
49
|
+
};
|
|
50
|
+
gap?: number;
|
|
9
51
|
};
|
|
52
|
+
header?: BoardHeaderProps;
|
|
53
|
+
widgets?: {
|
|
54
|
+
menu?: React.ReactNode;
|
|
55
|
+
} & WidgetsProps;
|
|
10
56
|
}
|
|
57
|
+
export {};
|
package/interface/Card.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ import { ImageSize, Size } from "./Property";
|
|
|
15
15
|
export interface CardProps {
|
|
16
16
|
children: React.ReactNode;
|
|
17
17
|
options?: {
|
|
18
|
+
boundary?: "shadow" | "border" | "none";
|
|
19
|
+
rounded?: string;
|
|
18
20
|
height?: Size;
|
|
19
21
|
width?: Size;
|
|
20
22
|
text?: {
|
|
@@ -22,6 +24,7 @@ export interface CardProps {
|
|
|
22
24
|
color?: string;
|
|
23
25
|
};
|
|
24
26
|
onClick?: () => unknown | (() => Promise<unknown>);
|
|
27
|
+
overflow?: "hiden" | "auto";
|
|
25
28
|
};
|
|
26
29
|
}
|
|
27
30
|
export interface ChartCardProps {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import { Size } from "./Property";
|
|
3
|
+
export interface HTMLElement {
|
|
4
|
+
title: string;
|
|
5
|
+
onChange: Dispatch<string>;
|
|
6
|
+
width?: Size;
|
|
7
|
+
}
|
|
8
|
+
export interface HTMLSelectElement extends HTMLElement {
|
|
9
|
+
selectOptions?: [string | number, string][];
|
|
10
|
+
}
|
|
11
|
+
export interface HTMLInputElement extends HTMLElement {
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/interface/Property.d.ts
CHANGED
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* @property {"md"} md - Medium size
|
|
9
9
|
* @property {"lg"} lg - Large size
|
|
10
10
|
* @property {"xl"} xl - Extra large size
|
|
11
|
+
* @property {"2xl"} 2xl - Double extra large size
|
|
12
|
+
* @property {"full"} full - Full size
|
|
11
13
|
*/
|
|
12
|
-
export type Size = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
14
|
+
export type Size = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
13
15
|
/**
|
|
14
16
|
* Image size type
|
|
15
17
|
* @enum {string}
|
package/interface/Property.js
CHANGED
package/interface/index.d.ts
CHANGED
package/interface/index.js
CHANGED
|
@@ -6,5 +6,5 @@ import { cn } from "../../util";
|
|
|
6
6
|
export function DashboardLayout({ subject, colors, navigations, children, }) {
|
|
7
7
|
const [title, image, imageUrl] = subject ?? ["", "", ""];
|
|
8
8
|
const [bgColor, textColor] = colors ?? ["white", "black"];
|
|
9
|
-
return (_jsxs("div", { className: cn(`bg-${bgColor}`, `text-${textColor}`, `min-h-screen font-pretendard-medium`), children: [_jsx(Header, { title: title, image: [image, imageUrl] }), _jsxs("div", { className: "flex gap-12 xl:gap-8 xl:pl-2 2xl:px-9 xl:pt-
|
|
9
|
+
return (_jsxs("div", { className: cn(`bg-${bgColor}`, `text-${textColor}`, `min-h-screen h-screen xl:h-auto font-pretendard-medium`), children: [_jsx(Header, { title: title, image: [image, imageUrl] }), _jsxs("div", { className: "h-full flex gap-12 pt-20 xl:gap-8 xl:pl-2 2xl:px-9 xl:pt-10 xl:m-0 ", children: [_jsx(NavigationContainer, { children: navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index))) }), children] })] }));
|
|
10
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SideMenu(): import("react/jsx-runtime").JSX.Element;
|
package/menu/SideMenu.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useWidgetStore } from "../store";
|
|
3
|
+
import { cn } from "../util";
|
|
4
|
+
export default function SideMenu() {
|
|
5
|
+
const { tempData, clearTempData, events, removeView } = useWidgetStore();
|
|
6
|
+
const isOpen = events.some(({ event }) => event === "sideMenu");
|
|
7
|
+
const positions = "absolute top-20 right-0";
|
|
8
|
+
const sizes = `${isOpen ? "w-160" : "w-0"} h-full bg-gray-200`;
|
|
9
|
+
const styles = `${isOpen ? "opacity-100 z-30" : "opacity-0 z-0"} bg-gray-200 duration-500 `;
|
|
10
|
+
return (_jsx("div", { className: cn(positions, sizes, styles), children: _jsxs("div", { className: "relative w-full h-full", children: [_jsx("div", { children: Object.entries(tempData).map(([key, value]) => (_jsxs("div", { className: "text-2xl font-bold", children: [key, ": ", value] }, key))) }), _jsx("button", { onClick: () => {
|
|
11
|
+
clearTempData();
|
|
12
|
+
return removeView("sideMenu");
|
|
13
|
+
}, className: "absolute left-0 top-2/5 text-3xl font-bold", children: ">" })] }) }));
|
|
14
|
+
}
|
package/menu/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SideMenu } from "./SideMenu";
|
package/menu/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SideMenu } from "./SideMenu";
|
package/modal/Modal.js
CHANGED
|
@@ -9,6 +9,7 @@ const widthSize = {
|
|
|
9
9
|
lg: "w-full min-w-76 max-w-360",
|
|
10
10
|
xl: "w-2/3 min-w-76 max-w-176",
|
|
11
11
|
"2xl": "w-2/3 min-w-76 max-w-176",
|
|
12
|
+
full: "w-full",
|
|
12
13
|
};
|
|
13
14
|
const heightSize = {
|
|
14
15
|
xs: "",
|
|
@@ -17,6 +18,7 @@ const heightSize = {
|
|
|
17
18
|
lg: "h-120",
|
|
18
19
|
xl: "h-180",
|
|
19
20
|
"2xl": "w-2/3 min-w-76 max-w-176",
|
|
21
|
+
full: "h-full",
|
|
20
22
|
};
|
|
21
23
|
export function Modal({ children, options }) {
|
|
22
24
|
const { buttons, width, height } = options ?? {};
|
package/navigation/Navigation.js
CHANGED
|
@@ -8,9 +8,7 @@ export const buttonClassNames = (href, nowPath, color) => {
|
|
|
8
8
|
"font-bold w-full xl:w-50 h-11 xl:rounded-2xl flex justify-center xl:justify-start xl:pl-5",
|
|
9
9
|
].join(" ");
|
|
10
10
|
const checkPathMatch = (href, nowPath) => {
|
|
11
|
-
|
|
12
|
-
return !nowPath.slice(1).includes("/");
|
|
13
|
-
return nowPath.includes(href);
|
|
11
|
+
return href.split("/").pop() === nowPath.split("/").pop();
|
|
14
12
|
};
|
|
15
13
|
const toggle = checkPathMatch(href, nowPath)
|
|
16
14
|
? `bg-${bg}`
|
|
@@ -18,9 +16,9 @@ export const buttonClassNames = (href, nowPath, color) => {
|
|
|
18
16
|
return [classNames, toggle].join(" ");
|
|
19
17
|
};
|
|
20
18
|
export function NavigationContainer({ children, }) {
|
|
21
|
-
const
|
|
19
|
+
const displays = "flex flex-row xl:flex-col z-40";
|
|
22
20
|
const positions = "fixed bottom-0 left-0 xl:static";
|
|
23
21
|
const sizes = "w-full xl:w-auto";
|
|
24
22
|
const styles = "";
|
|
25
|
-
return (_jsx("div", { className: cn(
|
|
23
|
+
return (_jsx("div", { className: cn(displays, positions, sizes, styles), children: children }));
|
|
26
24
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edu-tosel/design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "UI components for International TOSEL Committee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jsx",
|
|
7
|
+
"tsx",
|
|
7
8
|
"tailwindcss",
|
|
8
|
-
"ui"
|
|
9
|
+
"ui",
|
|
10
|
+
"design system"
|
|
9
11
|
],
|
|
10
12
|
"author": "International TOSEL Committee",
|
|
11
13
|
"license": "MIT",
|
package/shelf/Shelf.d.ts
CHANGED
package/shelf/Shelf.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export function Shelf({ children }) {
|
|
3
|
-
return
|
|
2
|
+
export default function Shelf({ children }) {
|
|
3
|
+
return _jsx("div", { className: "inline-flex flex-col gap-8 xl:w-auto", children: children });
|
|
4
4
|
}
|
package/shelf/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as Shelf } from "./Shelf";
|
package/shelf/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as Shelf } from "./Shelf";
|
package/store/index.d.ts
CHANGED
|
@@ -2,9 +2,15 @@ import { WidgetEvent } from "../interface/Widget";
|
|
|
2
2
|
interface WidgetProps {
|
|
3
3
|
events: WidgetEvent[];
|
|
4
4
|
setView: (prop: string) => void;
|
|
5
|
+
removeView: (prop: string) => void;
|
|
5
6
|
setModal: (prop: string) => void;
|
|
6
7
|
removeModal: (prop: string) => void;
|
|
7
8
|
clearModal: () => void;
|
|
9
|
+
order: [string, "asc" | "desc"];
|
|
10
|
+
setOrder: (prop: string) => void;
|
|
11
|
+
tempData: Record<string, string | number>;
|
|
12
|
+
setTempData: (prop: Record<string, string | number>) => void;
|
|
13
|
+
clearTempData: () => void;
|
|
8
14
|
}
|
|
9
15
|
export declare const useWidgetStore: import("zustand").UseBoundStore<import("zustand").StoreApi<WidgetProps>>;
|
|
10
16
|
export {};
|
package/store/index.js
CHANGED
|
@@ -4,6 +4,24 @@ export const useWidgetStore = create((set) => ({
|
|
|
4
4
|
setView: (prop) => set((state) => ({
|
|
5
5
|
events: [...state.events, { event: prop, type: "view" }],
|
|
6
6
|
})),
|
|
7
|
+
removeView: (prop) => {
|
|
8
|
+
set((state) => ({
|
|
9
|
+
events: state.events.filter(({ event }) => event !== prop),
|
|
10
|
+
}));
|
|
11
|
+
},
|
|
12
|
+
order: ["", "asc"],
|
|
13
|
+
setOrder: (prop) => {
|
|
14
|
+
set((state) => {
|
|
15
|
+
if (state.order[0] !== prop) {
|
|
16
|
+
return {
|
|
17
|
+
order: [prop, "asc"],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
order: [prop, state.order[1] === "asc" ? "desc" : "asc"],
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
},
|
|
7
25
|
setModal: (prop) => set((state) => ({
|
|
8
26
|
events: [...state.events, { event: prop, type: "modal" }],
|
|
9
27
|
})),
|
|
@@ -15,4 +33,7 @@ export const useWidgetStore = create((set) => ({
|
|
|
15
33
|
clearModal: () => set((state) => ({
|
|
16
34
|
events: state.events.filter(({ type }) => type !== "modal"),
|
|
17
35
|
})),
|
|
36
|
+
tempData: {},
|
|
37
|
+
setTempData: (prop) => set((state) => ({ tempData: { ...state.tempData, ...prop } })),
|
|
38
|
+
clearTempData: () => set({ tempData: {} }),
|
|
18
39
|
}));
|
package/tailwind.config.ts
CHANGED
|
@@ -56,57 +56,7 @@ export default {
|
|
|
56
56
|
"hj-blue": "#385EAB",
|
|
57
57
|
"hj-blue-light": "#A8BFE5",
|
|
58
58
|
},
|
|
59
|
-
|
|
60
|
-
"1/20": "5%",
|
|
61
|
-
"1/10": "10%",
|
|
62
|
-
"2/10": "5%",
|
|
63
|
-
"1/5": "20%",
|
|
64
|
-
"2/5": "40%",
|
|
65
|
-
"1/4": "25%",
|
|
66
|
-
"1/3": "33.3333333%",
|
|
67
|
-
"5/100": "5%",
|
|
68
|
-
"10/100": "10%",
|
|
69
|
-
"15/100": "15%",
|
|
70
|
-
"43/100": "43%",
|
|
71
|
-
"46/100": "46%",
|
|
72
|
-
},
|
|
73
|
-
width: {
|
|
74
|
-
"2/3": "66.6666667%",
|
|
75
|
-
"1/7": "14.2857143%",
|
|
76
|
-
"2/7": "28.5714286%",
|
|
77
|
-
"3/7": "42.8571429%",
|
|
78
|
-
"4/7": "57.1428571%",
|
|
79
|
-
"1/8": "12.5%",
|
|
80
|
-
"3/10": "30%",
|
|
81
|
-
"1/10": "10%",
|
|
82
|
-
"4/10": "40%",
|
|
83
|
-
"6/10": "60%",
|
|
84
|
-
"7/10": "70%",
|
|
85
|
-
"9/10": "90%",
|
|
86
|
-
"10/100": "10%",
|
|
87
|
-
"12/100": "12%",
|
|
88
|
-
"15/100": "15%",
|
|
89
|
-
"35/100": "35%",
|
|
90
|
-
"45/100": "45%",
|
|
91
|
-
"55/100": "55%",
|
|
92
|
-
"65/100": "65%",
|
|
93
|
-
"85/100": "85%",
|
|
94
|
-
90: "22.5rem",
|
|
95
|
-
120: "30rem",
|
|
96
|
-
176: "44rem",
|
|
97
|
-
478: "478px",
|
|
98
|
-
},
|
|
99
|
-
height: {
|
|
100
|
-
"4/7": "57.1428571%",
|
|
101
|
-
"3/7": "42.8571429%",
|
|
102
|
-
"5/12": "41.6666667%",
|
|
103
|
-
"1/10": "10%",
|
|
104
|
-
"3/10": "30%",
|
|
105
|
-
"4/10": "40%",
|
|
106
|
-
"6/10": "60%",
|
|
107
|
-
"7/10": "70%",
|
|
108
|
-
"9/10": "90%",
|
|
109
|
-
},
|
|
59
|
+
|
|
110
60
|
maxHeight: {
|
|
111
61
|
44: "11rem",
|
|
112
62
|
"9/10": "90%",
|
|
@@ -116,17 +66,23 @@ export default {
|
|
|
116
66
|
1: "0.25rem",
|
|
117
67
|
7: "1.75rem",
|
|
118
68
|
7.5: "1.875rem",
|
|
69
|
+
8: "2rem",
|
|
70
|
+
9: "2.25rem",
|
|
119
71
|
11: "2.75rem",
|
|
120
72
|
12: "3rem",
|
|
73
|
+
14: "3.5rem",
|
|
121
74
|
15: "3.75rem",
|
|
75
|
+
16: "4rem",
|
|
122
76
|
18: "4.5rem",
|
|
123
77
|
19: "4.75rem",
|
|
124
78
|
22: "5.5rem",
|
|
79
|
+
23: "5.75rem",
|
|
125
80
|
25: "6.25rem",
|
|
126
81
|
26: "6.5rem",
|
|
127
82
|
27: "6.75rem",
|
|
128
83
|
30: "7.5rem",
|
|
129
84
|
34: "8.5rem",
|
|
85
|
+
36: "9rem",
|
|
130
86
|
38: "9.5rem",
|
|
131
87
|
40: "10rem",
|
|
132
88
|
42: "10.5rem",
|
|
@@ -175,16 +131,21 @@ export default {
|
|
|
175
131
|
140: "35rem",
|
|
176
132
|
144: "36rem",
|
|
177
133
|
148: "37rem",
|
|
134
|
+
158: "39.5rem",
|
|
178
135
|
160: "40rem",
|
|
179
136
|
164: "41rem",
|
|
180
137
|
168: "42rem",
|
|
181
138
|
172: "43rem",
|
|
182
139
|
176: "44rem",
|
|
140
|
+
178: "44.5rem",
|
|
183
141
|
180: "45rem",
|
|
184
142
|
182: "45.5rem",
|
|
143
|
+
184: "46rem",
|
|
185
144
|
186: "46.5rem",
|
|
186
145
|
187.5: "46.875rem",
|
|
146
|
+
188: "47rem",
|
|
187
147
|
190: "47.5rem",
|
|
148
|
+
192: "48rem",
|
|
188
149
|
200: "50rem",
|
|
189
150
|
216: "54rem",
|
|
190
151
|
220: "55rem",
|
|
@@ -248,10 +209,21 @@ export default {
|
|
|
248
209
|
},
|
|
249
210
|
transitionDuration: {
|
|
250
211
|
300: "300ms",
|
|
212
|
+
1000: "1000ms",
|
|
251
213
|
2000: "2000ms",
|
|
252
214
|
60000: "60000ms",
|
|
253
215
|
300000: "300000ms",
|
|
254
216
|
},
|
|
217
|
+
borderWidth: {
|
|
218
|
+
1: "1px",
|
|
219
|
+
2: "2px",
|
|
220
|
+
3: "3px",
|
|
221
|
+
4: "4px",
|
|
222
|
+
5: "5px",
|
|
223
|
+
6: "6px",
|
|
224
|
+
7: "7px",
|
|
225
|
+
8: "8px",
|
|
226
|
+
},
|
|
255
227
|
opacity: {
|
|
256
228
|
32: ".32",
|
|
257
229
|
},
|
|
@@ -301,6 +273,149 @@ export default {
|
|
|
301
273
|
xl: "1280px",
|
|
302
274
|
"2xl": "1536px",
|
|
303
275
|
},
|
|
276
|
+
inset: {
|
|
277
|
+
"1/20": "5%",
|
|
278
|
+
"1/10": "10%",
|
|
279
|
+
"2/10": "5%",
|
|
280
|
+
"1/5": "20%",
|
|
281
|
+
"2/5": "40%",
|
|
282
|
+
"1/4": "25%",
|
|
283
|
+
"1/3": "33.3333333%",
|
|
284
|
+
"5/100": "5%",
|
|
285
|
+
"10/100": "10%",
|
|
286
|
+
"15/100": "15%",
|
|
287
|
+
"43/100": "43%",
|
|
288
|
+
"46/100": "46%",
|
|
289
|
+
},
|
|
290
|
+
width: {
|
|
291
|
+
90: "22.5rem",
|
|
292
|
+
120: "30rem",
|
|
293
|
+
176: "44rem",
|
|
294
|
+
"2/3": "66.6666667%",
|
|
295
|
+
"1/7": "14.2857143%",
|
|
296
|
+
"2/7": "28.5714286%",
|
|
297
|
+
"3/7": "42.8571429%",
|
|
298
|
+
"4/7": "57.1428571%",
|
|
299
|
+
"1/8": "12.5%",
|
|
300
|
+
"3/10": "30%",
|
|
301
|
+
"1/10": "10%",
|
|
302
|
+
"4/10": "40%",
|
|
303
|
+
"6/10": "60%",
|
|
304
|
+
"7/10": "70%",
|
|
305
|
+
"9/10": "90%",
|
|
306
|
+
// percentile width
|
|
307
|
+
"1/100": "1%",
|
|
308
|
+
"2/100": "2%",
|
|
309
|
+
"3/100": "3%",
|
|
310
|
+
"4/100": "4%",
|
|
311
|
+
"5/100": "5%",
|
|
312
|
+
"6/100": "6%",
|
|
313
|
+
"7/100": "7%",
|
|
314
|
+
"8/100": "8%",
|
|
315
|
+
"9/100": "9%",
|
|
316
|
+
"10/100": "10%",
|
|
317
|
+
"11/100": "11%",
|
|
318
|
+
"12/100": "12%",
|
|
319
|
+
"13/100": "13%",
|
|
320
|
+
"14/100": "14%",
|
|
321
|
+
"15/100": "15%",
|
|
322
|
+
"16/100": "16%",
|
|
323
|
+
"17/100": "17%",
|
|
324
|
+
"18/100": "18%",
|
|
325
|
+
"19/100": "19%",
|
|
326
|
+
"20/100": "20%",
|
|
327
|
+
"21/100": "21%",
|
|
328
|
+
"22/100": "22%",
|
|
329
|
+
"23/100": "23%",
|
|
330
|
+
"24/100": "24%",
|
|
331
|
+
"25/100": "25%",
|
|
332
|
+
"26/100": "26%",
|
|
333
|
+
"27/100": "27%",
|
|
334
|
+
"28/100": "28%",
|
|
335
|
+
"29/100": "29%",
|
|
336
|
+
"30/100": "30%",
|
|
337
|
+
"31/100": "31%",
|
|
338
|
+
"32/100": "32%",
|
|
339
|
+
"33/100": "33%",
|
|
340
|
+
"34/100": "34%",
|
|
341
|
+
"35/100": "35%",
|
|
342
|
+
"36/100": "36%",
|
|
343
|
+
"37/100": "37%",
|
|
344
|
+
"38/100": "38%",
|
|
345
|
+
"39/100": "39%",
|
|
346
|
+
"40/100": "40%",
|
|
347
|
+
"41/100": "41%",
|
|
348
|
+
"42/100": "42%",
|
|
349
|
+
"43/100": "43%",
|
|
350
|
+
"44/100": "44%",
|
|
351
|
+
"45/100": "45%",
|
|
352
|
+
"46/100": "46%",
|
|
353
|
+
"47/100": "47%",
|
|
354
|
+
"48/100": "48%",
|
|
355
|
+
"49/100": "49%",
|
|
356
|
+
"50/100": "50%",
|
|
357
|
+
"51/100": "51%",
|
|
358
|
+
"52/100": "52%",
|
|
359
|
+
"53/100": "53%",
|
|
360
|
+
"54/100": "54%",
|
|
361
|
+
"55/100": "55%",
|
|
362
|
+
"56/100": "56%",
|
|
363
|
+
"57/100": "57%",
|
|
364
|
+
"58/100": "58%",
|
|
365
|
+
"59/100": "59%",
|
|
366
|
+
"60/100": "60%",
|
|
367
|
+
"61/100": "61%",
|
|
368
|
+
"62/100": "62%",
|
|
369
|
+
"63/100": "63%",
|
|
370
|
+
"64/100": "64%",
|
|
371
|
+
"65/100": "65%",
|
|
372
|
+
"66/100": "66%",
|
|
373
|
+
"67/100": "67%",
|
|
374
|
+
"68/100": "68%",
|
|
375
|
+
"69/100": "69%",
|
|
376
|
+
"70/100": "70%",
|
|
377
|
+
"71/100": "71%",
|
|
378
|
+
"72/100": "72%",
|
|
379
|
+
"73/100": "73%",
|
|
380
|
+
"74/100": "74%",
|
|
381
|
+
"75/100": "75%",
|
|
382
|
+
"76/100": "76%",
|
|
383
|
+
"77/100": "77%",
|
|
384
|
+
"78/100": "78%",
|
|
385
|
+
"79/100": "79%",
|
|
386
|
+
"80/100": "80%",
|
|
387
|
+
"81/100": "81%",
|
|
388
|
+
"82/100": "82%",
|
|
389
|
+
"83/100": "83%",
|
|
390
|
+
"84/100": "84%",
|
|
391
|
+
"85/100": "85%",
|
|
392
|
+
"86/100": "86%",
|
|
393
|
+
"87/100": "87%",
|
|
394
|
+
"88/100": "88%",
|
|
395
|
+
"89/100": "89%",
|
|
396
|
+
"90/100": "90%",
|
|
397
|
+
"91/100": "91%",
|
|
398
|
+
"92/100": "92%",
|
|
399
|
+
"93/100": "93%",
|
|
400
|
+
"94/100": "94%",
|
|
401
|
+
"95/100": "95%",
|
|
402
|
+
"96/100": "96%",
|
|
403
|
+
"97/100": "97%",
|
|
404
|
+
"98/100": "98%",
|
|
405
|
+
"99/100": "99%",
|
|
406
|
+
"100/100": "100%",
|
|
407
|
+
},
|
|
408
|
+
height: {
|
|
409
|
+
"4/7": "57.1428571%",
|
|
410
|
+
"3/7": "42.8571429%",
|
|
411
|
+
"5/12": "41.6666667%",
|
|
412
|
+
"1/10": "10%",
|
|
413
|
+
"3/10": "30%",
|
|
414
|
+
"4/10": "40%",
|
|
415
|
+
"6/10": "60%",
|
|
416
|
+
"7/10": "70%",
|
|
417
|
+
"9/10": "90%",
|
|
418
|
+
},
|
|
304
419
|
},
|
|
305
420
|
},
|
|
306
421
|
safelist: [
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.4
|
package/board/Board.d.ts
DELETED
package/board/Board.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useWidgetStore } from "../store";
|
|
3
|
-
export function Board({ children, widget, options }) {
|
|
4
|
-
const { events } = useWidgetStore();
|
|
5
|
-
const { height } = options ?? {};
|
|
6
|
-
const { widgets } = widget ?? {};
|
|
7
|
-
const classNames = [
|
|
8
|
-
`min-h-screen xl:min-h-0 xl:h-186 `,
|
|
9
|
-
"xl:rounded-xl bg-white/80 relative w-full ",
|
|
10
|
-
].join(" ");
|
|
11
|
-
return (_jsxs("div", { className: classNames + "", children: [children, widgets?.map(([widgetEvent, Component]) => {
|
|
12
|
-
return events?.some(({ event }) => event === widgetEvent) ? (_jsx(_Fragment, { children: Component })) : null;
|
|
13
|
-
})] }));
|
|
14
|
-
}
|
package/board/CanvasBoard.d.ts
DELETED
package/board/CanvasBoard.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../util";
|
|
3
|
-
import { Board } from "./Board";
|
|
4
|
-
export function CanvasBoard({ children, widget, options }) {
|
|
5
|
-
const { height } = options ?? {};
|
|
6
|
-
const layouts = "flex flex-col lg:flex-row lg:flex-wrap gap-7.5 ";
|
|
7
|
-
const sizes = "h-full ";
|
|
8
|
-
const paddings = "pb-36 xl:pb-12 px-2 xs:px-4 xl:pl-8 xl:pr-2 pt-2 xs:pt-4 xl:pt-8";
|
|
9
|
-
const styles = "xl:overflow-y-scroll ";
|
|
10
|
-
return (_jsx(Board, { widget: widget, options: { height }, children: _jsx("div", { className: cn(layouts, sizes, paddings, styles), children: children }) }));
|
|
11
|
-
}
|
package/board/Header.d.ts
DELETED
package/board/Header.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { between, center } from "../util";
|
|
3
|
-
export function Header({ title, colors, childrens, }) {
|
|
4
|
-
const [bgColor, textColor] = colors ?? ["bg", "text"];
|
|
5
|
-
const headerClassNames = [
|
|
6
|
-
center.row + between.row,
|
|
7
|
-
`bg-${bgColor || "white-off"}`,
|
|
8
|
-
`text-${textColor || "black"}`,
|
|
9
|
-
"w-full h-22 px-12 ",
|
|
10
|
-
].join(" ");
|
|
11
|
-
return (_jsxs("div", { className: headerClassNames, children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsx("div", { className: "flex", children: childrens?.map((children) => children) })] }));
|
|
12
|
-
}
|