@edu-tosel/design 1.0.154 → 1.0.156

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 (41) hide show
  1. package/asset/SVG.d.ts +11 -9
  2. package/asset/SVG.js +2 -0
  3. package/asset/SVG.tsx +4 -2
  4. package/asset/svg/Eye.d.ts +12 -0
  5. package/asset/svg/Eye.js +13 -0
  6. package/asset/svg/Eye.tsx +48 -0
  7. package/asset/svg/Icon.d.ts +7 -6
  8. package/asset/svg/Icon.js +10 -10
  9. package/asset/svg/Icon.tsx +17 -16
  10. package/card/design/Card.design.js +4 -2
  11. package/card/design/RollCard.design.js +1 -1
  12. package/card/template/InfoCard/Finance.js +1 -1
  13. package/card/template/InfoCard/Student.d.ts +2 -2
  14. package/card/template/InfoCard/Student.js +6 -11
  15. package/card/template/NavCard.js +1 -1
  16. package/card/template/ProgressCard/Large.js +1 -1
  17. package/interface/Property.d.ts +1 -1
  18. package/layout/design/Row.design/index.js +1 -0
  19. package/layout/index.d.ts +1 -0
  20. package/layout/index.js +1 -0
  21. package/layout/template/Archive/Header.js +66 -41
  22. package/layout/template/BbsLayout.js +3 -1
  23. package/layout/template/Event/One.js +39 -1
  24. package/layout/template/MonthlyProgressReport/Report.d.ts +36 -0
  25. package/layout/template/MonthlyProgressReport/Report.js +80 -0
  26. package/layout/template/MonthlyProgressReport/index.d.ts +5 -0
  27. package/layout/template/MonthlyProgressReport/index.js +5 -0
  28. package/layout/template/home/layout/Header.js +72 -15
  29. package/layout/template/home/layout/Navigation.d.ts +4 -2
  30. package/layout/template/home/layout/Navigation.js +56 -20
  31. package/package.json +2 -1
  32. package/tailwind.config.ts +20 -0
  33. package/util/compareDates.d.ts +4 -0
  34. package/util/compareDates.js +32 -0
  35. package/util/convertDateToString.d.ts +1 -0
  36. package/util/convertDateToString.js +6 -0
  37. package/util/index.d.ts +2 -0
  38. package/util/index.js +2 -0
  39. package/version.txt +1 -1
  40. package/widget/template/Input/Form.js +10 -2
  41. package/widget/template/Select/Select.js +30 -17
@@ -18,13 +18,14 @@ const heightSize = {
18
18
  export default function Select({ state, selectOptions: selectOptionsInput, placeholder, option, }) {
19
19
  const selectOptions = selectOptionsInput?.map(toSelectOption);
20
20
  const id = useId();
21
- const { setIsOwn, setIsOwnId } = useActionStore();
21
+ const { flag } = useActionStore();
22
22
  const [value, setValue] = state;
23
23
  const [text, setText] = useState("");
24
24
  const [search, setSearch] = useState("");
25
25
  const [isOpen, setIsOpen] = useState(false);
26
26
  const [isHover, setIsHover] = useState(false);
27
27
  const [index, setIndex] = useState();
28
+ const [uniqueKey] = useState(Math.floor(Math.random() * 1000000));
28
29
  useFlag({ state: [false, setIsOpen], safe: "overlay" });
29
30
  // scrollIntoViews
30
31
  const listRef = useRef(null);
@@ -36,33 +37,40 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
36
37
  }, [index]);
37
38
  const isLong = selectOptions && selectOptions.length >= 4;
38
39
  const container = {
39
- positions: "relative ",
40
- displays: "flex flex-col",
40
+ positions: "",
41
+ displays: "flex flex-col gap-2",
41
42
  };
42
43
  const button = {
43
44
  displays: "flex items-center",
44
45
  sizes: `${widthSize[option?.width ?? "md"]} ${heightSize[option?.height ?? "sm"]}`,
45
46
  styles: "px-1 rounded-md outline-none duration-100 text-gray-400",
46
- shadow: isOpen || isHover ? "box-shadow" : "shadow-main",
47
+ shadow: "hover:shadow-green",
48
+ totalaction: isOpen ? "shadow-main" : "shadow-main-small",
49
+ animations: "duration-300",
47
50
  };
48
51
  const input = {
49
- positions: "absolute z-30",
52
+ positions: "z-30",
50
53
  layouts: cn(button),
51
- styles: "outline-none text-xs pl-1.5",
54
+ styles: "focus:outline-1 outline-0 outline-green-dark text-xs pl-1.5 text-gray-medium",
52
55
  };
53
56
  const body = {
54
- positions: "absolute z-30",
55
- displays: "flex flex-col gap-1",
56
- sizes: `${widthSize[option?.width ?? "md"]} min-h-6.5 max-h-23.75`,
57
+ positions: "z-30",
58
+ displays: "flex flex-col gap-1 shadow-main hover:shadow-green",
59
+ sizes: `${widthSize[option?.width ?? "md"]} min-h-6.5 max-h-[170px]`,
57
60
  paddings: "px-1 py-1",
58
- styles: "bg-white box-shadow rounded-md box-shadow overflow-y-scroll",
61
+ styles: "bg-white rounded-md overflow-y-scroll",
62
+ };
63
+ const labelCoating = {
64
+ displays: "flex overflow-hidden",
65
+ siezes: "h-fit w-full rounded-md hover:bg-gray-light/50",
66
+ animations: "duration-300",
59
67
  };
60
68
  const label = {
61
69
  displays: "flex",
62
- sizes: "h-fit w-fit hover:w-full",
63
- paddings: "px-1",
70
+ sizes: "h-fit w-fit",
71
+ paddings: "px-2 py-1",
64
72
  styles: "rounded-md duration-500",
65
- fonts: "text-sm text-gray-dim bg-gray-light",
73
+ fonts: "text-xs text-gray-dim bg-gray-light",
66
74
  };
67
75
  const inputTransition = useTransition(isOpen, {
68
76
  from: {
@@ -92,12 +100,17 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
92
100
  duration: 0,
93
101
  },
94
102
  });
95
- return (_jsxs("div", { className: cn(container), onClick: () => setIsOwn(true), children: [_jsx("button", { onClick: () => setIsOpen(!isOpen), className: cn(button), onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), children: value ? (_jsx("div", { className: cn(label), children: selectOptions?.find((option) => value === option.value)?.title })) : (_jsx("div", { className: "text-xs pl-1", children: placeholder ?? "선택해주세요" })) }), inputTransition((styles, item) => isLong &&
96
- 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) => {
97
- return (item && (_jsx(animated.div, { style: styles, className: cn(body), ref: listRef, children: selectOptions?.map(({ value, title }, order) => (_jsx("section", { children: _jsx("button", { ref: (el) => (itemRefs.current[order] = el), onClick: () => {
103
+ useEffect(() => {
104
+ setIsOpen(false);
105
+ }, [flag]);
106
+ return (_jsxs("div", { className: cn(container), id: `select-box-${uniqueKey}`, onClick: (e) => e.stopPropagation(), children: [_jsx("button", { onClick: () => {
107
+ setIsOpen(!isOpen), console.log(uniqueKey);
108
+ }, className: cn(button, "border-1 border-gray-light hover:border-none"), onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), children: value ? (_jsx("div", { className: cn(label, "bg-white/0"), children: selectOptions?.find((option) => value === option.value)?.title })) : (_jsx("div", { className: "text-xs pl-1", children: placeholder ?? "선택해주세요" })) }), inputTransition((styles, item) => isLong &&
109
+ item && (_jsx(animated.input, { style: styles, placeholder: "\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694", className: cn(input, "shadow-main bg-[#f6f6f6]/50"), onChange: (e) => setSearch(e.target.value) }))), bodyTransitions((styles, item) => {
110
+ return (item && (_jsx(animated.div, { style: styles, className: cn(body), ref: listRef, children: selectOptions?.map(({ value, title }, order) => (_jsx("section", { children: _jsx("div", { className: cn(labelCoating), onClick: () => {
98
111
  setValue(value);
99
112
  setText(String(title));
100
113
  return setIsOpen(false);
101
- }, className: cn(label, order === index ? "w-full" : "w-auto"), children: title }) }, id + value))) })));
114
+ }, children: _jsx("button", { ref: (el) => (itemRefs.current[order] = el), className: cn(label, order === index ? "w-full" : "w-auto"), children: title }) }) }, id + value))) })));
102
115
  })] }));
103
116
  }