@edu-tosel/design 1.0.328 → 1.0.330
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/board/design/Header.design.js +3 -0
- package/card/template/ProgressCard/Large.js +11 -4
- package/interface/Board.d.ts +5 -1
- package/interface/Shelf.d.ts +2 -0
- package/layout/design/Shelf.design.d.ts +1 -1
- package/layout/design/Shelf.design.js +2 -1
- package/layout/template/Shelf.d.ts +1 -1
- package/layout/template/Shelf.js +2 -2
- package/layout/template/sign/Box.js +2 -2
- package/package.json +1 -1
- package/version.txt +1 -1
- package/widget/template/Input/Form.js +2 -4
- package/widget/template/Select/Select.LG.js +2 -2
|
@@ -23,6 +23,9 @@ function HeaderWidgetRender(props) {
|
|
|
23
23
|
if (props.type === "select") {
|
|
24
24
|
return _jsx(Select, { ...props.data });
|
|
25
25
|
}
|
|
26
|
+
if (props.type === "selectLG") {
|
|
27
|
+
return _jsx(Select.LG, { ...props.data });
|
|
28
|
+
}
|
|
26
29
|
if (props.type === "button") {
|
|
27
30
|
return (_jsx(Label.Button, { ...props.data, option: {
|
|
28
31
|
...props.data.option,
|
|
@@ -26,23 +26,30 @@ export default function ProgressCardLG({ titles, checks, displays, theme, option
|
|
|
26
26
|
displays: "hidden sm:flex justify-start items-center",
|
|
27
27
|
sizes: "w-150 h-19",
|
|
28
28
|
};
|
|
29
|
-
const stepBox = (flag) => ({
|
|
29
|
+
const stepBox = (flag, isCurrent) => ({
|
|
30
30
|
displays: "flex-1 flex flex-col justify-between",
|
|
31
31
|
sizes: "h-full",
|
|
32
|
-
backgrounds:
|
|
32
|
+
backgrounds: isCurrent ? bgLight[theme ?? "green"] : "bg-transparent",
|
|
33
33
|
boundaries: "rounded-md p-2.5",
|
|
34
|
-
texts:
|
|
34
|
+
texts: isCurrent
|
|
35
|
+
? "text-gray-dark"
|
|
36
|
+
: flag
|
|
37
|
+
? "text-gray-dark"
|
|
38
|
+
: "text-gray-medium",
|
|
35
39
|
});
|
|
36
40
|
const titleBox = {
|
|
37
41
|
positions: " xl:absolute top-7.5 md:top-12 right-4 md:right-12",
|
|
38
42
|
displays: "flex flex-col sm:flex-row gap-x-5 xl:flex-col items-center xl:items-end gap-y-3",
|
|
39
43
|
};
|
|
40
44
|
const occupied = Math.round((checks.filter((value) => !!value).length / displays.length) * 100);
|
|
45
|
+
// 현재 진행 중인 단계 찾기 (첫 번째 false인 단계)
|
|
46
|
+
const currentStepIndex = checks.findIndex((check) => !check);
|
|
47
|
+
const isCurrentStep = (index) => index === currentStepIndex;
|
|
41
48
|
return (_jsx(CardDesign, { option: {
|
|
42
49
|
...option,
|
|
43
50
|
width: "full",
|
|
44
51
|
height: "2xs",
|
|
45
|
-
}, children: _jsxs("div", { className: cn(contentsWrapper), children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title }, index) => (_jsxs("div", { className: cn(stepBox(checks[index])), children: [_jsx("div", { children: title }), _jsx(SVG.Operation.Checked, { flag: checks[index], size: 25, theme: theme })] }, title))) }), _jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: `text-xl leading-none font-pretendard-bold ${text[theme ?? "green"]}`, children: titles.title }), _jsxs("div", { className: "flex gap-x-3", children: [_jsx("div", { className: "text-base leading-none", children: titles.subtitle }), titles && titles.link && (_jsx("div", { onClick: () => {
|
|
52
|
+
}, children: _jsxs("div", { className: cn(contentsWrapper), children: [_jsx("div", { className: cn(progressBox), children: displays.map(({ title }, index) => (_jsxs("div", { className: cn(stepBox(checks[index], isCurrentStep(index))), children: [_jsx("div", { children: title }), _jsx(SVG.Operation.Checked, { flag: checks[index], size: 25, theme: theme })] }, title))) }), _jsxs("div", { className: cn(titleBox), children: [_jsx("div", { className: `text-xl leading-none font-pretendard-bold ${text[theme ?? "green"]}`, children: titles.title }), _jsxs("div", { className: "flex gap-x-3", children: [_jsx("div", { className: "text-base leading-none", children: titles.subtitle }), titles && titles.link && (_jsx("div", { onClick: () => {
|
|
46
53
|
if (titles.link)
|
|
47
54
|
window.location.href = titles.link.path;
|
|
48
55
|
}, className: "text-base leading-none underline text-gray-medium", children: titles.link.title }))] })] }), _jsx("div", { className: "absolute bottom-0 left-0 bg-gray-light w-full h-2.5", children: _jsx("div", { className: `h-full ${widthSizes[occupied]} ${bg[theme ?? "green"]}` }) })] }) }));
|
package/interface/Board.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ interface HeaderSelectWidget<B> {
|
|
|
31
31
|
type: "select";
|
|
32
32
|
data: SelectWidget<B>;
|
|
33
33
|
}
|
|
34
|
+
interface HeaderSelectLGWidget<B> {
|
|
35
|
+
type: "selectLG";
|
|
36
|
+
data: SelectWidget<B>;
|
|
37
|
+
}
|
|
34
38
|
interface HeaderSelectToggleWidget<T> {
|
|
35
39
|
type: "selectToggle";
|
|
36
40
|
data: SelectToggleProps<T>;
|
|
@@ -39,7 +43,7 @@ interface HeaderButtonWidget {
|
|
|
39
43
|
type: "button";
|
|
40
44
|
data: LabelWidget;
|
|
41
45
|
}
|
|
42
|
-
export type HeaderWidgetType<B1, B2, B3, B4> = HeaderInputWidget | HeaderSelectWidget<B1> | HeaderSelectToggleWidget<B2> | HeaderButtonWidget;
|
|
46
|
+
export type HeaderWidgetType<B1, B2, B3, B4> = HeaderInputWidget | HeaderSelectWidget<B1> | HeaderSelectLGWidget<B1> | HeaderSelectToggleWidget<B2> | HeaderButtonWidget;
|
|
43
47
|
export interface BoardHeaderProps<B1, B2, B3, B4> {
|
|
44
48
|
titles?: Omit<Titles, "subtitle"> & {
|
|
45
49
|
icon?: string;
|
package/interface/Shelf.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ShelfProps } from "../../interface";
|
|
2
|
-
export default function Shelf({ children, className, option, titles, debug, }: ShelfProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function Shelf({ children, className, option, titles, debug, scrollAction, }: ShelfProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { LineBreaks } from "../../text";
|
|
3
3
|
import { cn, isDebug } from "../../util";
|
|
4
|
-
export default function Shelf({ children, className, option, titles, debug, }) {
|
|
4
|
+
export default function Shelf({ children, className, option, titles, debug, scrollAction, }) {
|
|
5
5
|
const { title, titleColor } = titles ?? {};
|
|
6
6
|
const { titleSize, subtitleSize, isSize, width, height } = option ?? {};
|
|
7
7
|
const container = {
|
|
@@ -9,6 +9,7 @@ export default function Shelf({ children, className, option, titles, debug, }) {
|
|
|
9
9
|
optionWidth: width ?? "w-full xl:w-auto",
|
|
10
10
|
optionHeight: height ?? "h-fit",
|
|
11
11
|
sizes: isSize && "w-full h-fit",
|
|
12
|
+
scrollAction: scrollAction,
|
|
12
13
|
debug: debug && isDebug(`border-2 ${debug}`),
|
|
13
14
|
};
|
|
14
15
|
const titleBox = {
|
|
@@ -5,6 +5,6 @@ declare namespace Shelf {
|
|
|
5
5
|
var Row: ({ titles, children, className, debug }: ShelfProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
var Col: ({ titles, children, debug, className }: ShelfProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
var Fourthird: ({ titles, children, debug, className }: ShelfProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
var Quarter: ({ titles, children, debug, className }: ShelfProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
var Quarter: ({ titles, children, debug, className, sticky, }: ShelfProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default Shelf;
|
package/layout/template/Shelf.js
CHANGED
|
@@ -62,12 +62,12 @@ function Fourthird({ titles, children, debug, className }) {
|
|
|
62
62
|
height: "h-fit",
|
|
63
63
|
}, debug: debug, children: children }));
|
|
64
64
|
}
|
|
65
|
-
function Quarter({ titles, children, debug, className }) {
|
|
65
|
+
function Quarter({ titles, children, debug, className, sticky = false, }) {
|
|
66
66
|
const container = {
|
|
67
67
|
displays: "flex flex-col",
|
|
68
68
|
className: className ?? "gap-y-7.5",
|
|
69
69
|
};
|
|
70
|
-
return (_jsx(ShelfDesign, { titles: titles, className: cn(container), option: {
|
|
70
|
+
return (_jsx(ShelfDesign, { titles: titles, className: cn(container), scrollAction: sticky ? "sticky top-0" : undefined, option: {
|
|
71
71
|
titleSize: "text-lg xl:text-2xl",
|
|
72
72
|
subtitleSize: "text-sm",
|
|
73
73
|
width: "flex-grow basis-[450px] max-w-full min-w-[450px]",
|
|
@@ -7,9 +7,9 @@ function Box({ children, className, texts }) {
|
|
|
7
7
|
className,
|
|
8
8
|
};
|
|
9
9
|
const alarmText = {
|
|
10
|
-
textStyles: "text-
|
|
10
|
+
textStyles: "text-red-500 font-medium text-xs leading-none",
|
|
11
11
|
};
|
|
12
|
-
return (_jsxs("div", { className: "w-full", children: [_jsx("div", { className: cn(container), children: children }), texts && (_jsx("div", { className: "mt-2", children: texts.map((text) => (_jsx("div", { className: cn(alarmText), children: text }))) }))] }));
|
|
12
|
+
return (_jsxs("div", { className: "w-full", children: [_jsx("div", { className: cn(container), children: children }), texts && (_jsx("div", { className: "mt-3 flex flex-col gap-1 px-2", children: texts.map((text) => (_jsx("div", { className: cn(alarmText), children: text }))) }))] }));
|
|
13
13
|
}
|
|
14
14
|
function Fix({ children, className }) {
|
|
15
15
|
return (_jsx(Box, { className: className, sizes: "w-full max-w-112.5 h-65 xs:h-67.5 pt-8 xs:pt-10.25 px-2.5 xs:px-5 pb-2.5 xs:pb-5", children: children }));
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.330
|
|
@@ -21,7 +21,7 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
|
|
|
21
21
|
const styleByFlag = () => {
|
|
22
22
|
const gray = "bg-gray-light/50 border-green-dark";
|
|
23
23
|
const green = "bg-green-dark/10 text-green-dark border-green-dark";
|
|
24
|
-
const red = "bg-red-50 text-red-
|
|
24
|
+
const red = "bg-red-50 text-red-500 border-red-500";
|
|
25
25
|
if (typeof isValid === "undefined")
|
|
26
26
|
return gray;
|
|
27
27
|
if (typeof isValid === "function")
|
|
@@ -42,9 +42,7 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
|
|
|
42
42
|
fonts: "text-sm",
|
|
43
43
|
boundaries: "rounded-md outline-none",
|
|
44
44
|
focuses: onFocus ? "border " : "border-0",
|
|
45
|
-
shadows: onFocus &&
|
|
46
|
-
!(isValid === false) &&
|
|
47
|
-
"shadow-[0px_0px_10px_0px_rgba(16,86,82,0.38)]",
|
|
45
|
+
shadows: onFocus && !(isValid === false) && "shadow-green",
|
|
48
46
|
};
|
|
49
47
|
useEffect(() => {
|
|
50
48
|
if (type === "password") {
|
|
@@ -114,11 +114,11 @@ export default function SelectLG({ state, selectOptions: selectOptionsInput, pla
|
|
|
114
114
|
});
|
|
115
115
|
return (_jsxs("div", { className: cn(container), onClick: () => setIsOwn(true), onKeyDown: onKeyDown, children: [_jsx("button", { onClick: () => setIsOpen(!isOpen), className: cn(button), onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), children: value ? (_jsx("div", { className: cn(label(false)), children: selectOptions?.find((option) => value === option.value)?.title })) : (_jsx("div", { className: "text-xs pl-1", children: placeholder ?? "선택해주세요" })) }), inputTransition((styles, item) => isLong &&
|
|
116
116
|
item && (_jsx(animated.input, { style: styles, placeholder: "\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694", className: cn(input), onChange: (e) => setSearch(e.target.value) }))), bodyTransitions((styles, item) => {
|
|
117
|
-
return (item && (_jsx(animated.div, { style: styles, className: cn(body), ref: listRef, children: filteredOptions
|
|
117
|
+
return (item && (_jsx(animated.div, { style: styles, className: cn(body), ref: listRef, children: filteredOptions && filteredOptions.length > 0 ? (filteredOptions.map(({ value, title }, order) => (_jsx("section", { children: _jsx("button", { ref: (el) => (itemRefs.current[order] = el), onClick: () => {
|
|
118
118
|
setIndex(order);
|
|
119
119
|
setValue(value);
|
|
120
120
|
setText(String(title));
|
|
121
121
|
return setIsOpen(false);
|
|
122
|
-
}, className: cn(label(order === index)), children: title }) }, id + value))) })));
|
|
122
|
+
}, className: cn(label(order === index)), children: title }) }, id + value)))) : (_jsx("div", { className: "flex items-center justify-center py-4 text-xs text-gray-400", children: "\uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" })) })));
|
|
123
123
|
})] }));
|
|
124
124
|
}
|