@edu-tosel/design 1.0.45 → 1.0.47
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 +42 -42
- package/asset/SVG.d.ts +5 -0
- package/asset/SVG.js +2 -0
- package/asset/SVG.tsx +23 -21
- package/asset/svg/Close.tsx +32 -32
- package/asset/svg/Direction.tsx +36 -36
- package/asset/svg/Email.tsx +20 -20
- package/asset/svg/Image.tsx +24 -24
- package/asset/svg/Notification.tsx +34 -34
- package/asset/svg/Operation.d.ts +11 -0
- package/asset/svg/Operation.js +16 -0
- package/asset/svg/Operation.tsx +66 -0
- package/asset/svg/Phone.tsx +20 -20
- package/asset/svg/Profile.tsx +27 -27
- package/asset/svg/TOSEL.tsx +63 -63
- package/board/design/Board.design.d.ts +1 -1
- package/board/design/Board.design.js +4 -4
- package/board/template/CanvasBoard.d.ts +1 -1
- package/board/template/CanvasBoard.js +3 -3
- package/board/template/ManageBoard.d.ts +1 -1
- package/board/template/ManageBoard.js +6 -6
- package/board/widget/Header.js +1 -1
- package/card/design/Card.design.js +4 -3
- package/card/design/NavCard.design.js +1 -1
- package/card/design/RollCard.design.d.ts +2 -0
- package/card/design/RollCard.design.js +13 -0
- package/card/design/TableCard.design.js +9 -8
- package/card/index.d.ts +1 -0
- package/card/index.js +1 -0
- package/card/template/InfoCard/Academy.js +1 -1
- package/card/template/InfoCard/Exam.js +1 -1
- package/card/template/InfoCard/ExamData.js +3 -3
- package/card/template/InfoCard/Finance.js +1 -1
- package/card/template/InfoCard/Grade.js +1 -1
- package/card/template/InfoCard/Student.js +1 -1
- package/card/template/RollCard.d.ts +2 -0
- package/card/template/RollCard.js +5 -0
- package/globals.css +226 -226
- package/hook/useFlag.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/interaction/template/Loading.d.ts +3 -3
- package/interaction/template/Loading.js +3 -3
- package/interaction/template/NoData.js +2 -2
- package/interface/{Widget.d.ts → Action.d.ts} +3 -3
- package/interface/Board.d.ts +2 -2
- package/interface/Card.d.ts +9 -2
- package/interface/HTMLElement.d.ts +0 -4
- package/interface/Layout.d.ts +3 -3
- package/interface/Modal.d.ts +5 -2
- package/interface/Overlay.d.ts +2 -2
- package/interface/Property.d.ts +4 -4
- package/interface/Shelf.d.ts +2 -2
- package/interface/UtilityType.d.ts +2 -0
- package/interface/UtilityType.js +1 -0
- package/interface/index.d.ts +2 -1
- package/interface/index.js +2 -1
- package/interface/widget/Switch.d.ts +19 -0
- package/interface/widget/Switch.js +1 -0
- package/interface/widget/index.d.ts +1 -0
- package/interface/widget/index.js +1 -0
- package/layout/design/DataField.design.js +2 -2
- package/layout/design/Row.design.js +1 -1
- package/layout/index.d.ts +2 -1
- package/layout/index.js +2 -1
- package/layout/template/Action.d.ts +8 -0
- package/layout/template/{Events.js → Action.js} +12 -12
- package/layout/template/Gallery.d.ts +2 -2
- package/layout/template/Gallery.js +11 -4
- package/layout/template/Shelf.js +3 -1
- package/layout/template/Tab.d.ts +16 -0
- package/layout/template/Tab.js +37 -0
- package/layout/widget/dashboard/Header.js +5 -5
- package/layout/widget/dashboard/Layout.js +2 -2
- package/layout/widget/dashboard/Menu.d.ts +1 -1
- package/layout/widget/dashboard/Menu.js +5 -5
- package/layout/widget/dashboard/Notification.d.ts +1 -1
- package/layout/widget/dashboard/Notification.js +4 -4
- package/layout/widget/dashboard/buttonClassNames.js +2 -2
- package/layout/widget/dashboard/mypage/Layout.js +2 -2
- package/layout/widget/dashboard/mypage/Profile.js +1 -1
- package/layout/widget/sign/WithTitle.js +1 -1
- package/modal/design/ConfirmModal.design.d.ts +1 -1
- package/modal/design/ConfirmModal.design.js +3 -3
- package/modal/design/Modal.design.d.ts +1 -1
- package/modal/design/Modal.design.js +8 -7
- package/modal/template/Alert.d.ts +1 -1
- package/modal/template/Alert.js +2 -2
- package/modal/template/ConfirmModal/Input.js +1 -1
- package/modal/template/ConfirmModal/Switch.d.ts +11 -0
- package/modal/template/ConfirmModal/Switch.js +19 -0
- package/modal/template/ConfirmModal/Tag.d.ts +13 -0
- package/modal/template/ConfirmModal/Tag.js +19 -0
- package/modal/template/ConfirmModal/index.d.ts +2 -0
- package/modal/template/ConfirmModal/index.js +4 -0
- package/modal/template/Input.d.ts +1 -1
- package/modal/template/Input.js +2 -2
- package/overlay/design/Overlay.design.d.ts +1 -1
- package/overlay/design/Overlay.design.js +4 -4
- package/overlay/template/Info.d.ts +1 -1
- package/overlay/template/Info.js +2 -2
- package/overlay/template/Manage.d.ts +1 -1
- package/overlay/template/Manage.js +2 -2
- package/package.json +1 -1
- package/store/index.d.ts +4 -4
- package/store/index.js +1 -1
- package/tailwind.config.ts +605 -602
- package/util/select.d.ts +10 -0
- package/util/select.js +10 -0
- package/version.txt +1 -1
- package/{html/widget → widget}/CheckBox.d.ts +1 -1
- package/{html/widget → widget}/DatePicker.d.ts +1 -1
- package/{html/widget → widget}/EmailInput.d.ts +1 -1
- package/{html/widget → widget}/EmailInput.js +1 -1
- package/{html/widget → widget}/Obstacle.d.ts +1 -1
- package/{html/widget → widget}/Obstacle.js +1 -1
- package/widget/Toggle.d.ts +6 -0
- package/{html/widget → widget}/Toggle.js +1 -10
- package/{html → widget}/design/Label.design.js +1 -1
- package/{html → widget}/design/Select.design.js +2 -2
- package/widget/design/Tag.design.d.ts +0 -0
- package/widget/design/Tag.design.js +1 -0
- package/{html → widget}/index.d.ts +3 -2
- package/{html → widget}/index.js +3 -2
- package/{html → widget}/template/Input.js +1 -1
- package/widget/template/Switch/Handle.d.ts +2 -0
- package/widget/template/Switch/Handle.js +26 -0
- package/widget/template/Switch/Switch.d.ts +3 -0
- package/widget/template/Switch/Switch.js +44 -0
- package/widget/template/Switch/index.d.ts +6 -0
- package/widget/template/Switch/index.js +4 -0
- package/html/widget/Toggle.d.ts +0 -2
- package/layout/design/Tab.design.d.ts +0 -5
- package/layout/design/Tab.design.js +0 -22
- package/layout/template/Events.d.ts +0 -8
- /package/interaction/{widget → design}/Jumper.design.d.ts +0 -0
- /package/interaction/{widget → design}/Jumper.design.js +0 -0
- /package/interaction/{widget → design}/Script.design.d.ts +0 -0
- /package/interaction/{widget → design}/Script.design.js +0 -0
- /package/interaction/{widget → design}/Sign.design.d.ts +0 -0
- /package/interaction/{widget → design}/Sign.design.js +0 -0
- /package/interaction/{widget → design}/Spinner.design.d.ts +0 -0
- /package/interaction/{widget → design}/Spinner.design.js +0 -0
- /package/interaction/{widget → design}/Worm.design.d.ts +0 -0
- /package/interaction/{widget → design}/Worm.design.js +0 -0
- /package/interface/{Widget.js → Action.js} +0 -0
- /package/{html/widget → widget}/CheckBox.js +0 -0
- /package/{html/widget → widget}/DatePicker.js +0 -0
- /package/{html → widget}/design/Label.design.d.ts +0 -0
- /package/{html → widget}/design/Select.design.d.ts +0 -0
- /package/{html → widget}/template/Input.d.ts +0 -0
- /package/{html → widget}/template/Label.d.ts +0 -0
- /package/{html → widget}/template/Label.js +0 -0
- /package/{html → widget}/template/Select.d.ts +0 -0
- /package/{html → widget}/template/Select.js +0 -0
package/util/select.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { State } from "../interface";
|
|
2
|
+
declare function selectPlural<T>({ state, key }: {
|
|
3
|
+
state: State<T[]>;
|
|
4
|
+
key: T;
|
|
5
|
+
}): void;
|
|
6
|
+
declare function selectOne<T>({ state, key }: {
|
|
7
|
+
state: State<T[]>;
|
|
8
|
+
key: T;
|
|
9
|
+
}): void;
|
|
10
|
+
export { selectPlural, selectOne };
|
package/util/select.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function selectPlural({ state, key }) {
|
|
2
|
+
if (state[0].includes(key)) {
|
|
3
|
+
return state[1](state[0].filter((v) => v !== key));
|
|
4
|
+
}
|
|
5
|
+
return state[1]([...state[0], key]);
|
|
6
|
+
}
|
|
7
|
+
function selectOne({ state, key }) {
|
|
8
|
+
return state[1]([key]);
|
|
9
|
+
}
|
|
10
|
+
export { selectPlural, selectOne };
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.47
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLCheckBoxElement } from "
|
|
1
|
+
import { HTMLCheckBoxElement } from "../interface";
|
|
2
2
|
export default function Checkbox({ state: [checked, setChecked], labels, options, color, }: HTMLCheckBoxElement): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HTMLInput } from "
|
|
1
|
+
import { HTMLInput } from "../interface";
|
|
2
2
|
export default function EmailInput({ state, placeholder, options }: HTMLInput): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLElement, State } from "../interface";
|
|
2
|
+
export interface HTMLToggleElement extends HTMLElement {
|
|
3
|
+
state: State<boolean>;
|
|
4
|
+
labels?: [[true, string], [false, string]];
|
|
5
|
+
}
|
|
6
|
+
export default function Toggle({ state: [chekced, setChecked], labels, options, }: HTMLToggleElement): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "
|
|
3
|
-
const widthSize = {
|
|
4
|
-
xs: "w-32",
|
|
5
|
-
sm: "w-48",
|
|
6
|
-
md: "w-64",
|
|
7
|
-
lg: "w-96",
|
|
8
|
-
xl: "w-128",
|
|
9
|
-
"2xl": "w-144",
|
|
10
|
-
full: "w-full",
|
|
11
|
-
};
|
|
2
|
+
import { cn } from "../util";
|
|
12
3
|
export default function Toggle({ state: [chekced, setChecked], labels, options, }) {
|
|
13
4
|
const { disabled, className } = options ?? {};
|
|
14
5
|
const container = {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useId, useState } from "react";
|
|
3
3
|
import { cn, useFlag } from "../../util";
|
|
4
4
|
import { useTransition, animated } from "react-spring";
|
|
5
|
-
import {
|
|
5
|
+
import { useActionStore } from "../../store";
|
|
6
6
|
const widthSize = {
|
|
7
7
|
xs: "w-10",
|
|
8
8
|
sm: "w-22.5",
|
|
@@ -14,7 +14,7 @@ const heightSize = {
|
|
|
14
14
|
};
|
|
15
15
|
export default function SelectDesign({ state, selectOptions, placeholder, options, }) {
|
|
16
16
|
const id = useId();
|
|
17
|
-
const { setIsOwn, setIsOwnId } =
|
|
17
|
+
const { setIsOwn, setIsOwnId } = useActionStore();
|
|
18
18
|
const [value, setValue] = state;
|
|
19
19
|
const [text, setText] = useState("");
|
|
20
20
|
const [search, setSearch] = useState("");
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Input } from "./template/Input";
|
|
2
2
|
export { default as Select } from "./template/Select";
|
|
3
|
-
export { default as DatePicker } from "./
|
|
3
|
+
export { default as DatePicker } from "./DatePicker";
|
|
4
4
|
export { default as Label } from "./template/Label";
|
|
5
|
-
export { default as
|
|
5
|
+
export { default as Switch } from "./template/Switch";
|
|
6
|
+
export { default as Toggle } from "./Toggle";
|
package/{html → widget}/index.js
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Input } from "./template/Input";
|
|
2
2
|
export { default as Select } from "./template/Select";
|
|
3
|
-
export { default as DatePicker } from "./
|
|
3
|
+
export { default as DatePicker } from "./DatePicker";
|
|
4
4
|
export { default as Label } from "./template/Label";
|
|
5
|
-
export { default as
|
|
5
|
+
export { default as Switch } from "./template/Switch";
|
|
6
|
+
export { default as Toggle } from "./Toggle";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState, useRef } from "react";
|
|
3
3
|
import { cn, gradient } from "../../util";
|
|
4
|
-
import Obstacle from "../
|
|
4
|
+
import Obstacle from "../Obstacle";
|
|
5
5
|
import Label from "./Label";
|
|
6
6
|
const widthSize = {
|
|
7
7
|
xs: "w-28",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn, gradient } from "../../../util";
|
|
3
|
+
export default function Handle({ state, values, options, }) {
|
|
4
|
+
const { className } = options ?? {};
|
|
5
|
+
const valueIndex = values?.indexOf(state?.[0]);
|
|
6
|
+
const container = {
|
|
7
|
+
positions: "relative",
|
|
8
|
+
sizes: "w-102.5 h-10",
|
|
9
|
+
styles: "rounded-full bg-gray-light p-1.25",
|
|
10
|
+
className,
|
|
11
|
+
};
|
|
12
|
+
const area = {
|
|
13
|
+
sizes: `w-${20 * (valueIndex + 1)} h-7.5`,
|
|
14
|
+
displays: "flex justify-end",
|
|
15
|
+
background: gradient.bg.greenToRed,
|
|
16
|
+
styles: "rounded-full p-1.25",
|
|
17
|
+
animations: "duration-200",
|
|
18
|
+
};
|
|
19
|
+
const handle = {
|
|
20
|
+
sizes: "w-5 h-5",
|
|
21
|
+
styles: "rounded-full bg-white",
|
|
22
|
+
};
|
|
23
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(area), children: _jsx("div", { className: cn(handle) }) }), _jsx("div", { className: "absolute flex w-full h-full top-0 left-0", children: values?.map((value) => (_jsx("button", { onClick: () => {
|
|
24
|
+
return state?.[1](value);
|
|
25
|
+
}, className: "flex flex-1 h-10 " }, value))) })] }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../util";
|
|
3
|
+
const paddingSize = {
|
|
4
|
+
md: "p-1.5",
|
|
5
|
+
lg: "p-2.5",
|
|
6
|
+
};
|
|
7
|
+
const widthSize = {
|
|
8
|
+
md: "w-25",
|
|
9
|
+
lg: "w-47.5",
|
|
10
|
+
};
|
|
11
|
+
const heightSize = {
|
|
12
|
+
md: "h-7.5",
|
|
13
|
+
lg: "h-15",
|
|
14
|
+
};
|
|
15
|
+
const gapSize = {
|
|
16
|
+
md: "gap-x-1.5",
|
|
17
|
+
lg: "gap-x-2.5",
|
|
18
|
+
};
|
|
19
|
+
const textSize = {
|
|
20
|
+
md: "text-sm",
|
|
21
|
+
lg: "text-base",
|
|
22
|
+
};
|
|
23
|
+
function Switch({ state, values, display, options }) {
|
|
24
|
+
const { text, size, className } = options ?? {};
|
|
25
|
+
const container = {
|
|
26
|
+
displays: `flex ${gapSize[size ?? "md"]}`,
|
|
27
|
+
paddings: paddingSize[size ?? "md"],
|
|
28
|
+
styles: "rounded-full bg-gray-light p-2.5",
|
|
29
|
+
className,
|
|
30
|
+
};
|
|
31
|
+
const button = (flag) => ({
|
|
32
|
+
sizes: `${widthSize[size ?? "md"]} ${heightSize[size ?? "md"]}`,
|
|
33
|
+
displays: "flex flex-1 gap-x-3 justify-center items-center",
|
|
34
|
+
backgrounds: flag ? "bg-white" : "bg-transparent",
|
|
35
|
+
text,
|
|
36
|
+
textSizes: textSize[size ?? "md"],
|
|
37
|
+
styles: "rounded-full ",
|
|
38
|
+
});
|
|
39
|
+
return (_jsx("div", { className: cn(container), children: values?.map((value) => {
|
|
40
|
+
const { title, icon } = (display && display[value]) ?? {};
|
|
41
|
+
return (_jsxs("button", { onClick: () => state[1](value), className: cn(button(value === state[0])), children: [icon && _jsx("img", { src: icon }), _jsx("div", { children: title })] }));
|
|
42
|
+
}) }));
|
|
43
|
+
}
|
|
44
|
+
export default Switch;
|
package/html/widget/Toggle.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { cn } from "../../util";
|
|
4
|
-
export default function Tab({ tabs, textColor, }) {
|
|
5
|
-
const [tabsSelection, setTabsSelection] = useState(tabs.map((_, i) => i === 0));
|
|
6
|
-
const container = {
|
|
7
|
-
positions: "xl:absolute xl:-bottom-18 xl:left-0 z-5",
|
|
8
|
-
displays: "hidden xl:flex xl:items-center xl:gap-2.5",
|
|
9
|
-
sizes: "xl:h-14.5",
|
|
10
|
-
paddings: "px-2.5",
|
|
11
|
-
styles: "bg-white/30 rounded-xl ",
|
|
12
|
-
};
|
|
13
|
-
const button = {
|
|
14
|
-
styles: "rounded-md duration-500 ",
|
|
15
|
-
sizes: "h-9 w-32 ",
|
|
16
|
-
font: textColor ?? "text-green-dark",
|
|
17
|
-
};
|
|
18
|
-
return (_jsx("div", { className: cn(container), children: tabs.map(({ title, onClick }, index) => (_jsx("button", { onClick: () => {
|
|
19
|
-
setTabsSelection(tabsSelection.map((_, i) => i === index));
|
|
20
|
-
return onClick && onClick();
|
|
21
|
-
}, className: cn(button, `${tabsSelection[index] && "bg-white rounded-2xl"}`), children: title }, title))) }));
|
|
22
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReplaceProps, ShowProps } from "../../interface/Widget";
|
|
2
|
-
declare function Show({ widgets, children }: ShowProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare function Replace({ widgets, children }: ReplaceProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare const Events: {
|
|
5
|
-
Show: typeof Show;
|
|
6
|
-
Replace: typeof Replace;
|
|
7
|
-
};
|
|
8
|
-
export default Events;
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|