@edu-tosel/design 1.0.168 → 1.0.169

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.
@@ -18,5 +18,5 @@ export default function BoardHeader({ titles, tag, option, }) {
18
18
  displays: "xl:hidden block ",
19
19
  sizes: "w-full h-19",
20
20
  };
21
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [icon && _jsx("img", { src: icon, className: "fill-blue-500" }), _jsx("div", { className: `text-2xl font-pretendard-bold ${titleColor}`, children: title })] }), _jsxs("div", { className: "flex items-center ml-auto gap-4", children: [selects?.map(({ selectOptions, option, state }, index) => (_jsx("div", { className: "flex items-center gap-2", children: _jsx(Select, { option: option, selectOptions: selectOptions, state: state }, title) }, index))), inputs?.map((prop, index) => (_jsx(Input, { ...prop }, index)))] })] }), _jsx("div", { className: cn(block) })] }));
21
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [icon && _jsx("img", { src: icon, className: "fill-blue-500" }), _jsx("div", { className: `text-2xl font-pretendard-bold ${titleColor}`, children: title })] }), _jsxs("div", { className: "relative flex items-center ml-auto gap-4", children: [selects?.map(({ selectOptions, option, state }) => (_jsx(Select, { option: option, selectOptions: selectOptions, state: state }, title))), inputs?.map((prop, index) => (_jsx(Input, { ...prop }, index)))] })] }), _jsx("div", { className: cn(block) })] }));
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.168",
3
+ "version": "1.0.169",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.168
1
+ 1.0.169
@@ -27,7 +27,6 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
27
27
  const [index, setIndex] = useState();
28
28
  const [uniqueKey] = useState(Math.floor(Math.random() * 1000000));
29
29
  useFlag({ state: [false, setIsOpen], safe: "overlay" });
30
- // scrollIntoViews
31
30
  const listRef = useRef(null);
32
31
  const itemRefs = useRef([]);
33
32
  useEffect(() => {
@@ -37,7 +36,7 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
37
36
  }, [index]);
38
37
  const isLong = selectOptions && selectOptions.length >= 4;
39
38
  const container = {
40
- positions: "",
39
+ positions: "relative",
41
40
  displays: "flex flex-col gap-2",
42
41
  };
43
42
  const button = {
@@ -49,12 +48,12 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
49
48
  animations: "duration-300",
50
49
  };
51
50
  const input = {
52
- positions: "z-30",
53
- layouts: cn(button),
51
+ positions: "absolute z-30",
52
+ layout: cn(button),
54
53
  styles: "focus:outline-1 outline-0 outline-green-dark text-xs pl-1.5 text-gray-medium",
55
54
  };
56
55
  const body = {
57
- positions: "z-30",
56
+ positions: "absolute z-30",
58
57
  displays: "flex flex-col gap-1 shadow-main hover:shadow-green",
59
58
  sizes: `${widthSize[option?.width ?? "md"]} min-h-6.5 max-h-[170px]`,
60
59
  paddings: "px-1 py-1",
@@ -88,13 +87,13 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
88
87
  });
89
88
  const bodyTransitions = useTransition(isOpen, {
90
89
  from: {
91
- top: isLong ? 64 : 32,
90
+ top: isLong ? 48 : 32,
92
91
  },
93
92
  enter: {
94
- top: isLong ? 64 : 32,
93
+ top: isLong ? 48 : 32,
95
94
  },
96
95
  leave: {
97
- top: isLong ? 64 : 32,
96
+ top: isLong ? 48 : 32,
98
97
  },
99
98
  config: {
100
99
  duration: 0,
@@ -105,8 +104,7 @@ export default function Select({ state, selectOptions: selectOptionsInput, place
105
104
  }, [flag]);
106
105
  return (_jsxs("div", { className: cn(container), id: `select-box-${uniqueKey}`, onClick: (e) => e.stopPropagation(), children: [_jsx("button", { onClick: () => {
107
106
  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) => {
107
+ }, 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 ?? "선택해주세요" })) }), bodyTransitions((styles, item) => {
110
108
  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: () => {
111
109
  setValue(value);
112
110
  setText(String(title));