@edu-tosel/design 1.0.157 → 1.0.159

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.
@@ -46,14 +46,13 @@ export default function Navigation({ browser, calendar, notice, event, }) {
46
46
  positions: "fixed top-0 left-0 z-40 ",
47
47
  sizes: "h-screen w-[400px]",
48
48
  boundaries: "md:pl-[56px]",
49
- styles: "overflow-hidden bg-black/20 backdrop-blur-sm",
49
+ styles: "bg-black/20 backdrop-blur-sm",
50
50
  shadows: "shadow-main",
51
51
  };
52
52
  const itemBody = {
53
- positions: "absolute bottom-16 md:static md:bottom-auto ",
54
- sizes: "w-full md:w-[556px] h-80 md:h-screen",
55
- boundaries: "p-5",
56
- styles: "bg-white overflow-hidden",
53
+ positions: "absolute bottom-16 md:static md:bottom-auto md:flex md:flex-col",
54
+ sizes: "w-full md:w-[400px] h-80 md:h-screen",
55
+ styles: "bg-white ",
57
56
  };
58
57
  const iconWrapper = {
59
58
  displays: "flex justify-center items-center",
@@ -67,8 +66,15 @@ export default function Navigation({ browser, calendar, notice, event, }) {
67
66
  leave: { width: "0%" },
68
67
  config: { duration: isMobile ? 100 : 0 },
69
68
  });
69
+ const scrollTitleWrapper = {
70
+ displays: "w-full h-fit",
71
+ spacings: "p-5",
72
+ };
73
+ const scrollTitle = {
74
+ textStyles: "text-lg font-bold text-green-dark",
75
+ };
70
76
  return (_jsxs(_Fragment, { children: [overlayCoverTransition((styles, item) => item && (_jsxs(animated.div, { style: styles, className: "bg-white h-screen fixed top-0 left-0 z-40 flex flex-col justify-center items-center overflow-hidden gap-y-14 ", children: [_jsx("img", { src: "/images/logos/tosel.png", alt: "tosel", width: 368.56, height: 80.07 }), _jsx("div", { children: "dashboard loading..." })] }))), overlayPopTransition((styles, item) => type &&
71
- item && (_jsx(animated.div, { style: styles, className: cn(itemContainer), children: _jsxs("div", { className: cn(itemBody), children: [_jsx("div", { className: "text-[20px] font-bold text-green-dark ", children: navigationTypeString[type] }), _jsx(NavigationItem, { type: type, calendar: calendar, notice: notice, event: event })] }) }))), _jsx("div", { className: "fixed bottom-0 md:top-1/2 md:-translate-y-1/2 flex justify-center items-center z-45", children: _jsxs("div", { onClick: (e) => e.stopPropagation(), className: cn(container), children: [_jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("calendar"), children: _jsx(SVG.Icon.Calendar, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("notification"), children: _jsx(SVG.Icon.Notification, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("search"), children: _jsx(SVG.Icon.Search, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("browser"), children: _jsx(SVG.Icon.Browser, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("event"), children: _jsx(SVG.Icon.Event, { size: isMobile ? "md" : "lg" }) })] }) })] }));
77
+ item && (_jsx(animated.div, { style: styles, className: cn(itemContainer), children: _jsxs("div", { className: cn(itemBody), children: [_jsx("div", { className: cn(scrollTitleWrapper), children: _jsx("div", { className: cn(scrollTitle), children: navigationTypeString[type] }) }), _jsx(NavigationItem, { type: type, calendar: calendar, notice: notice, event: event })] }) }))), _jsx("div", { className: "fixed bottom-0 md:top-1/2 md:-translate-y-1/2 flex justify-center items-center z-45", children: _jsxs("div", { onClick: (e) => e.stopPropagation(), className: cn(container), children: [_jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("calendar"), children: _jsx(SVG.Icon.Calendar, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("notification"), children: _jsx(SVG.Icon.Notification, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("search"), children: _jsx(SVG.Icon.Search, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("browser"), children: _jsx(SVG.Icon.Browser, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("event"), children: _jsx(SVG.Icon.Event, { size: isMobile ? "md" : "lg" }) })] }) })] }));
72
78
  }
73
79
  const navigationTypeString = {
74
80
  calendar: "시험 접수 일정",
@@ -76,12 +82,30 @@ const navigationTypeString = {
76
82
  event: "이벤트",
77
83
  };
78
84
  function NavigationItem({ type, calendar, notice, event, }) {
79
- const cardWrapper = {
80
- displays: "flex flex-col gap-y-5",
85
+ //scroll action
86
+ const container = {
87
+ displays: "relative flex flex-row md:flex-col",
88
+ sizss: "h-full",
89
+ scrollActions: "scrollbar-hidden overflow-x-scroll md:overflow-y-scroll snap-x md:snap-none",
90
+ spacings: "p-5 gap-5 scroll-pl-5",
91
+ };
92
+ //card title styling
93
+ const titleWrapper = {
94
+ displays: "flex flex-row justify-between",
95
+ sizes: "w-full h-fit",
81
96
  };
82
- const cardBox = {
83
- displays: "",
84
- sizes: "",
97
+ const titleText = {
98
+ textstyles: "font-bold text-base text-gray-dark",
99
+ };
100
+ const tag = {
101
+ displays: "flex flex-row px-2 py-0.5",
102
+ sizes: "w-fit h-fit rounded-md",
103
+ textstyles: "font-medium text-xs text-white",
104
+ };
105
+ const CardBox = {
106
+ displays: "flex flex-row",
107
+ sizes: "w-[360px] h-[fit] rounded-[8px]",
108
+ spacings: "p-5",
85
109
  };
86
110
  const dateWrapper = {
87
111
  displays: "flex flex-row gap-3",
@@ -90,16 +114,18 @@ function NavigationItem({ type, calendar, notice, event, }) {
90
114
  textStyles: "font-bold font-pretendar-var font-sm font-gray-dark",
91
115
  spacings: "leading-normal",
92
116
  };
93
- const container = {
94
- styles: "relative mt-[34px] scrollbar-hidden flex flex-row md:flex-col gap-y-[15px] md:h-screen overflow-x-scroll md:overflow-y-scroll",
95
- };
117
+ const iconWrapper = {};
96
118
  const item = {
97
- displays: "flex-shrink-0 flex flex-col md:justify-between ",
119
+ displays: "flex-shrink-0 flex flex-col md:justify-between snap-start",
98
120
  };
99
121
  if (type === "calendar")
100
- return (_jsx("div", { className: cn(container), children: calendar.schedules.map(({ applyDay, onClick }) => {
101
- const { isBefore, } = compareDates(applyDay);
102
- return (_jsx("div", { onClick: onClick, className: cn(item, "w-[400px] md:w-full h-[184px] shadow-main rounded-[10px] p-7.5"), children: _jsxs("div", { children: [_jsx("div", { className: "text-[16px] font-bold text-gray-dark", children: convertDateToString(applyDay) }), _jsx("div", { children: isBefore && _jsx("p", { children: "\uC811\uC218\uC911" }) })] }) }));
122
+ return (_jsx("div", { className: cn(container), children: calendar.schedules.map(({ applyEnd, applyStart, title, onClick }) => {
123
+ const { isBefore: isbefore1, dDay: dDay1 } = compareDates(applyStart);
124
+ const { isBefore: isbefore2, dDay: dDay2 } = compareDates(applyEnd);
125
+ return (_jsxs("div", { onClick: onClick, className: cn(item, "w-[360px] h-[184px] rounded-[8px] p-5 bg-gray-light/30 border-1 border-gray-light"), children: [_jsxs("div", { className: cn(titleWrapper), children: [_jsx("div", { className: cn(titleText), children: title }), _jsx("div", { children: isbefore1 ?
126
+ _jsxs("div", { className: cn(tag, "bg-red-burgundy"), children: ["\uC811\uC218 ", dDay1] }) :
127
+ (isbefore2 ?
128
+ _jsx("div", { className: cn(tag, "bg-green-dark"), children: "\uC811\uC218\uC911" }) : _jsx("div", { className: cn(tag, "bg-gray-medium/30"), children: "\uB9C8\uAC10" })) })] }), !isbefore1 && isbefore2 ? _jsxs("div", { className: "text-xs", children: ["\uC811\uC218 \uB9C8\uAC10\uAE4C\uC9C0 ", dDay2] }) : "", _jsx("div", { children: _jsx("div", { className: "text-[16px] font-bold text-gray-dark", children: convertDateToString(applyEnd) }) })] }));
103
129
  }) }));
104
130
  if (type === "notification")
105
131
  return (_jsx("div", { className: cn(container), children: notice.announcements.map(({ title, date, description, onClick }) => (_jsxs("div", { onClick: onClick, className: cn(item, "h-[140px] box-shadow rounded-[10px] p-7.5"), children: [_jsxs("div", { children: [_jsx("div", { className: "text-[15px] text-gray-medium", children: date }), _jsx("div", { className: "text-[20px] font-bold text-gray-dark", children: title })] }), _jsx(LineBreaks, { texts: description, className: "text-gray-dark text-[18px]" })] }))) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.157",
3
+ "version": "1.0.159",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",