@edu-tosel/design 1.0.298 → 1.0.300
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.
|
@@ -10,20 +10,23 @@ export default function Many({ events }) {
|
|
|
10
10
|
const filteredEvents = events
|
|
11
11
|
.filter((event) => {
|
|
12
12
|
const now = dayjs();
|
|
13
|
-
const startedAt = dayjs(event.startedAt);
|
|
14
|
-
const expiredAt = dayjs(event.expiredAt);
|
|
13
|
+
const startedAt = event.startedAt ? dayjs(event.startedAt * 1000) : null;
|
|
14
|
+
const expiredAt = event.expiredAt ? dayjs(event.expiredAt * 1000) : null;
|
|
15
15
|
if (filter === "모두보기")
|
|
16
16
|
return true;
|
|
17
17
|
if (filter === "진행 중") {
|
|
18
|
-
return (
|
|
18
|
+
return (startedAt &&
|
|
19
|
+
expiredAt &&
|
|
20
|
+
now.isAfter(startedAt) &&
|
|
21
|
+
now.isBefore(expiredAt));
|
|
19
22
|
}
|
|
20
23
|
if (filter === "예정된") {
|
|
21
|
-
return
|
|
24
|
+
return startedAt && now.isBefore(startedAt);
|
|
22
25
|
}
|
|
23
26
|
if (filter === "토셀소식")
|
|
24
27
|
return event.category === "notice";
|
|
25
28
|
return false;
|
|
26
29
|
})
|
|
27
30
|
.filter((event) => event.title.includes(searchQuery));
|
|
28
|
-
return (_jsxs("div", { children: [_jsxs("div", { className: "flex flex-col sm:flex-row justify-between min-h-14.5 border-b-1", children: [_jsxs("div", { className: "w-full mb-5 h-9 sm:w-80 sm:h-9.5 flex items-center bg-[#f0f0f0]/10 rounded-xl", children: [_jsx(IoIosSearch, { className: "text-xl text-green-dark mr-3" }), _jsx("input", { type: "text", placeholder: "\uD0A4\uC6CC\uB4DC\uB97C \uC785\uB825\uD558\uC138\uC694.", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), className: "w-full h-full text-sm bg-[#f0f0f0]/10 placeholder:text-[#7f7f7f] placeholder:font-light outline-none" })] }), _jsx("div", { className: "flex h-9 pb-5 sm:pb-0 sm:h-9.5 items-center sm:justify-center ", children: ["모두보기", "진행 중", "예정된", "토셀소식"].map((item) => (_jsx("div", { className: `text-xs sm:text-2xs md:text-xs p-2 sm:p-3 flex items-center justify-center cursor-pointer rounded-lg ${filter === item ? "bg-green-dark/10 text-green-dark" : ""}`, onClick: () => setFilter(item), children: item }, item))) })] }), _jsx("div", { className: "pt-5 grid sm:grid-cols-2 mmd:grid-cols-3 gap-5 rounded-xl", children: filteredEvents.map((event) => (_jsxs("div", { onClick: event.onClick, className: "w-full max-h-84 shadow-md rounded-xl cursor-pointer box-shadow-green transition-all duration-500", children: [_jsx("div", { className: "w-full max-h-50 rounded-t-xl overflow-hidden relative", children: _jsx("img", { src: event.thumbnail, alt: "", className: "w-full" }) }), _jsxs("div", { className: "w-full min-h-34 p-8 gap-3 flex flex-col", children: [_jsx("div", { className: "flex items-center", children: _jsx(Tag, { event: event }) }), _jsx(LineBreaks, { className: "text-sm font-bold text-gray-dark flex flex-col items-start", texts: event.title })] })] }, event.id))) })] }));
|
|
31
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: "flex flex-col sm:flex-row justify-between min-h-14.5 border-b-1 mt-3.5 xl:mt-0", children: [_jsxs("div", { className: "w-full mb-5 h-9 sm:w-80 sm:h-9.5 flex items-center bg-[#f0f0f0]/10 rounded-xl ", children: [_jsx(IoIosSearch, { className: "text-xl text-green-dark mr-3" }), _jsx("input", { type: "text", placeholder: "\uD0A4\uC6CC\uB4DC\uB97C \uC785\uB825\uD558\uC138\uC694.", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), className: "w-full h-full text-sm bg-[#f0f0f0]/10 placeholder:text-[#7f7f7f] placeholder:font-light outline-none" })] }), _jsx("div", { className: "flex h-9 pb-5 sm:pb-0 sm:h-9.5 items-center sm:justify-center ", children: ["모두보기", "진행 중", "예정된", "토셀소식"].map((item) => (_jsx("div", { className: `text-xs sm:text-2xs md:text-xs p-2 sm:p-3 flex items-center justify-center cursor-pointer rounded-lg ${filter === item ? "bg-green-dark/10 text-green-dark" : ""}`, onClick: () => setFilter(item), children: item }, item))) })] }), _jsx("div", { className: "pt-5 grid sm:grid-cols-2 mmd:grid-cols-3 gap-5 rounded-xl", children: filteredEvents.map((event) => (_jsxs("div", { onClick: event.onClick, className: "w-full max-h-84 shadow-md rounded-xl cursor-pointer box-shadow-green transition-all duration-500", children: [_jsx("div", { className: "w-full max-h-50 rounded-t-xl overflow-hidden relative", children: _jsx("img", { src: event.thumbnail, alt: "", className: "w-full" }) }), _jsxs("div", { className: "w-full min-h-34 p-8 gap-3 flex flex-col", children: [_jsx("div", { className: "flex items-center", children: _jsx(Tag, { event: event }) }), _jsx(LineBreaks, { className: "text-sm font-bold text-gray-dark flex flex-col items-start", texts: event.title })] })] }, event.id))) })] }));
|
|
29
32
|
}
|
|
@@ -21,7 +21,7 @@ function BannerMolecule({ props }, ref) {
|
|
|
21
21
|
displays: "flex flex-col sm:flex-row xl:flex-col xl:gap-5 justify-center xl:justify-start items-center xl:items-start",
|
|
22
22
|
sizes: "w-full xl:w-[320px]",
|
|
23
23
|
};
|
|
24
|
-
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsx("div", { className: "w-full sm:max-w-[352px]
|
|
24
|
+
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsx("div", { className: "w-full sm:max-w-[352px] h-[200px] overflow-hidden bg-cover rounded-[12px]", children: _jsx("img", { src: thumbnail, className: "w-full h-full object-cover" }) }), _jsxs("div", { className: "flex flex-col gap-y-5 py-5 sm:px-5 xl:p-0 w-full sm:max-w-[320px] xl:max-w-full xl:w-full", children: [_jsxs("div", { className: "flex flex-col gap-y-3", children: [_jsx(Tag, { event: props.event }), _jsx(LineBreaks, { texts: title, className: "text-[16px] font-bold" })] }), _jsx(Label.Button, { title: button?.title, onClick: button?.onClick, option: {
|
|
25
25
|
width: "full",
|
|
26
26
|
background: button?.option?.background,
|
|
27
27
|
text: [button?.option?.text, "font-bold"].join(" "),
|
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const colors = [
|
|
2
|
+
"red",
|
|
3
|
+
"orange",
|
|
4
|
+
"amber",
|
|
5
|
+
"yellow",
|
|
6
|
+
"lime",
|
|
7
|
+
"green",
|
|
8
|
+
"emerald",
|
|
9
|
+
"teal",
|
|
10
|
+
"cyan",
|
|
11
|
+
"sky",
|
|
12
|
+
"blue",
|
|
13
|
+
"indigo",
|
|
14
|
+
"violet",
|
|
15
|
+
"purple",
|
|
16
|
+
"fuchsia",
|
|
17
|
+
"pink",
|
|
18
|
+
"rose",
|
|
19
|
+
"slate",
|
|
20
|
+
"gray",
|
|
21
|
+
"zinc",
|
|
22
|
+
"neutral",
|
|
23
|
+
"stone",
|
|
24
|
+
];
|
|
25
|
+
const intensities = [
|
|
26
|
+
"50",
|
|
27
|
+
"100",
|
|
28
|
+
"200",
|
|
29
|
+
"300",
|
|
30
|
+
"400",
|
|
31
|
+
"500",
|
|
32
|
+
"600",
|
|
33
|
+
"700",
|
|
34
|
+
"800",
|
|
35
|
+
"900",
|
|
36
|
+
];
|
|
37
|
+
const variants = ["hover"];
|
|
38
|
+
const safelist = [
|
|
39
|
+
// bg-{color}-{intensity}
|
|
40
|
+
...colors.flatMap((color) => intensities.map((intensity) => `bg-${color}-${intensity}`)),
|
|
41
|
+
// text-{color}-{intensity}
|
|
42
|
+
...colors.flatMap((color) => intensities.map((intensity) => `text-${color}-${intensity}`)),
|
|
43
|
+
// hover:bg-{color}-{intensity}
|
|
44
|
+
...variants.flatMap((variant) => colors.flatMap((color) => intensities.map((intensity) => `${variant}:bg-${color}-${intensity}`))),
|
|
45
|
+
// hover:text-{color}-{intensity}
|
|
46
|
+
...variants.flatMap((variant) => colors.flatMap((color) => intensities.map((intensity) => `${variant}:text-${color}-${intensity}`))),
|
|
47
|
+
];
|
|
48
|
+
export default safelist;
|
package/tailwind.config.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { PluginAPI } from "tailwindcss/types/config";
|
|
|
4
4
|
|
|
5
5
|
// import twElements from "tw-elements/dist/plugin";
|
|
6
6
|
// import tailwindcssDirectionalShadows from "tailwindcss-directional-shadows";
|
|
7
|
+
import safelist from "./src/style/config/safelist";
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
content: [
|
|
@@ -648,29 +649,7 @@ export default {
|
|
|
648
649
|
},
|
|
649
650
|
},
|
|
650
651
|
},
|
|
651
|
-
safelist
|
|
652
|
-
{
|
|
653
|
-
pattern: /top-.*/,
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
pattern: /-top-.*/,
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
pattern: /bottom*.*/,
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
pattern: /left-.*/,
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
pattern: /-left-.*/,
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
pattern: /right*.*/,
|
|
669
|
-
},
|
|
670
|
-
{
|
|
671
|
-
pattern: /delay-.*/,
|
|
672
|
-
},
|
|
673
|
-
],
|
|
652
|
+
safelist,
|
|
674
653
|
plugins: [
|
|
675
654
|
tailwindcssAnimate,
|
|
676
655
|
function ({ addUtilities }: PluginAPI) {
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.300
|