@dotss/tictoccroc 0.3.3 → 0.4.1
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/dist/index.d.ts +2 -0
- package/dist/index.mjs +36 -32
- package/dist/parent/b2b/utils/convertMdToHtml/convertMdToHtml.mjs +645 -1194
- package/dist/parent/notification/components/NotificationCard/NotificationCard.d.ts +19 -0
- package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +106 -0
- package/dist/parent/notification/components/NotificationCard/index.d.ts +3 -0
- package/dist/parent/notification/components/NotificationCard/index.mjs +4 -0
- package/dist/parent/notification/components/index.d.ts +2 -0
- package/dist/parent/notification/components/index.mjs +4 -0
- package/dist/parent/notification/utils/index.d.ts +1 -0
- package/dist/parent/notification/utils/index.mjs +4 -0
- package/dist/parent/notification/utils/sanitize/sanitize.d.ts +1 -0
- package/dist/parent/notification/utils/sanitize/sanitize.mjs +7 -0
- package/dist/parent/notification/utils/sanitize/sanitize.test.d.ts +1 -0
- package/dist/purify.es-BGaRrCfO.js +553 -0
- package/package.json +18 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { ButtonProps } from '@dotss/ui/Button';
|
|
3
|
+
import { CollapseProps } from '@dotss/ui/Collapse';
|
|
4
|
+
import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
|
|
5
|
+
export interface NotificationCardProps {
|
|
6
|
+
id: number;
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
regDate: string;
|
|
11
|
+
isNew: boolean;
|
|
12
|
+
collapseProps?: CollapseProps;
|
|
13
|
+
wrapperProps?: FlexboxProps;
|
|
14
|
+
buttonProps?: ButtonProps;
|
|
15
|
+
collapseDuration?: number;
|
|
16
|
+
onClick: (e: MouseEvent<HTMLButtonElement>, id: number, isCollapsed: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
declare function NotificationCard({ id, collapsed, title, description, regDate, isNew, collapseProps, wrapperProps, buttonProps, onClick, collapseDuration }: NotificationCardProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default NotificationCard;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as S, Typography as c, Icon as k, Collapse as v, Box as H } from "@dotss/ui";
|
|
3
|
+
import j from "@dotss/ui/core/useTheme";
|
|
4
|
+
import n from "@dotss/ui/Flexbox";
|
|
5
|
+
import { useCheckHoverPossible as w } from "@dotss/ui/hooks";
|
|
6
|
+
import z from "dayjs";
|
|
7
|
+
function M({
|
|
8
|
+
id: s,
|
|
9
|
+
collapsed: r,
|
|
10
|
+
title: g,
|
|
11
|
+
description: m,
|
|
12
|
+
regDate: a,
|
|
13
|
+
isNew: p,
|
|
14
|
+
collapseProps: d,
|
|
15
|
+
wrapperProps: h,
|
|
16
|
+
buttonProps: f,
|
|
17
|
+
onClick: u,
|
|
18
|
+
collapseDuration: l = 400
|
|
19
|
+
}) {
|
|
20
|
+
const { palette: o, spacing: b, typography: t } = j(), { isHoverPossible: C } = w(), x = (y) => u(y, s, !r);
|
|
21
|
+
return /* @__PURE__ */ i(n, { flexDirection: "column", inlineCSS: { width: "100%" }, ...h, children: [
|
|
22
|
+
/* @__PURE__ */ i(
|
|
23
|
+
n,
|
|
24
|
+
{
|
|
25
|
+
tag: "button",
|
|
26
|
+
p: 4,
|
|
27
|
+
gap: 4,
|
|
28
|
+
justifyContent: "space-between",
|
|
29
|
+
inlineCSS: {
|
|
30
|
+
"&:active": {
|
|
31
|
+
backgroundColor: o.background.primary
|
|
32
|
+
},
|
|
33
|
+
...C ? {
|
|
34
|
+
"&:hover": {
|
|
35
|
+
backgroundColor: o.background.primary
|
|
36
|
+
}
|
|
37
|
+
} : {}
|
|
38
|
+
},
|
|
39
|
+
onClick: x,
|
|
40
|
+
"aria-expanded": !r,
|
|
41
|
+
...f,
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ i(n, { gap: 2, children: [
|
|
44
|
+
p && /* @__PURE__ */ e(
|
|
45
|
+
S,
|
|
46
|
+
{
|
|
47
|
+
size: "large",
|
|
48
|
+
color: "pink",
|
|
49
|
+
position: "static",
|
|
50
|
+
content: "N",
|
|
51
|
+
"aria-label": "새 알림",
|
|
52
|
+
inlineCSS: {
|
|
53
|
+
marginTop: b.content(1)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ i(n, { flexDirection: "column", gap: 1, alignItems: "flex-start", children: [
|
|
58
|
+
/* @__PURE__ */ e(c, { tag: "span", variant: "h4B", textAlign: "left", children: g }),
|
|
59
|
+
a && /* @__PURE__ */ e(c, { tag: "span", variant: "b5R", color: "grey.50", children: z(a).format("YYYY.MM.DD") })
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
n,
|
|
64
|
+
{
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
style: {
|
|
67
|
+
willChange: "transform",
|
|
68
|
+
transition: `transform ${l}ms ease-in-out`,
|
|
69
|
+
transform: r ? "rotate(0deg)" : "rotate(180deg)"
|
|
70
|
+
},
|
|
71
|
+
children: /* @__PURE__ */ e(k, { name: "ChevronDownLine", size: "xSmall", color: "grey.50" })
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ e(
|
|
78
|
+
v,
|
|
79
|
+
{
|
|
80
|
+
isCollapsed: r,
|
|
81
|
+
duration: l,
|
|
82
|
+
role: "region",
|
|
83
|
+
...d,
|
|
84
|
+
children: /* @__PURE__ */ e(
|
|
85
|
+
H,
|
|
86
|
+
{
|
|
87
|
+
p: 4,
|
|
88
|
+
inlineCSS: {
|
|
89
|
+
backgroundColor: o.background.primary,
|
|
90
|
+
"& *": {
|
|
91
|
+
fontSize: t.b3R.size,
|
|
92
|
+
lineHeight: t.b3R.lineHeight,
|
|
93
|
+
letterSpacing: t.b3R.letterSpacing
|
|
94
|
+
},
|
|
95
|
+
"& img": { maxWidth: "100% !important" }
|
|
96
|
+
},
|
|
97
|
+
dangerouslySetInnerHTML: { __html: m }
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] });
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
M as default
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as sanitize } from './sanitize/sanitize';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function sanitize(html: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|