@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.
@@ -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,3 @@
1
+ import { default as NotificationCard } from './NotificationCard';
2
+ export type { NotificationCardProps } from './NotificationCard';
3
+ export default NotificationCard;
@@ -0,0 +1,4 @@
1
+ import t from "./NotificationCard.mjs";
2
+ export {
3
+ t as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as NotificationCard } from './NotificationCard';
2
+ export * from './NotificationCard';
@@ -0,0 +1,4 @@
1
+ import { default as t } from "./NotificationCard/NotificationCard.mjs";
2
+ export {
3
+ t as NotificationCard
4
+ };
@@ -0,0 +1 @@
1
+ export { default as sanitize } from './sanitize/sanitize';
@@ -0,0 +1,4 @@
1
+ import { default as t } from "./sanitize/sanitize.mjs";
2
+ export {
3
+ t as sanitize
4
+ };
@@ -0,0 +1 @@
1
+ export default function sanitize(html: string): string;
@@ -0,0 +1,7 @@
1
+ import { p as t } from "../../../../purify.es-BGaRrCfO.js";
2
+ function a(i) {
3
+ return t.sanitize(i);
4
+ }
5
+ export {
6
+ a as default
7
+ };