@humain/ui 2.1.62 → 2.1.65
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/components/organisms/ai/AIToolCall/AIToolCall.d.ts +9 -3
- package/dist/components/organisms/ai/AIToolRun/index.d.ts +1 -1
- package/dist/components/organisms/ai/AIToolRun/validation.d.ts +24 -3
- package/dist/components/organisms/ai/_shared/format-ai-duration.d.ts +1 -0
- package/dist/components/organisms/ai/_shared/workflow-step-renderer.d.ts +1 -0
- package/dist/index.js +52 -52
- package/dist/index151.js +1 -1
- package/dist/index174.js +10 -333
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +310 -137
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +148 -174
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +186 -78
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +74 -124
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +133 -1
- package/dist/index179.js.map +1 -0
- package/dist/index180.js +2 -201
- package/dist/index181.js +201 -0
- package/dist/{index180.js.map → index181.js.map} +1 -1
- package/dist/index183.js +130 -166
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +195 -983
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +1069 -369
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +395 -197
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +198 -243
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +263 -3
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +3 -209
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +190 -777
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +771 -252
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +250 -65
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +72 -523
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +537 -144
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +139 -720
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +707 -167
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +175 -151
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +152 -487
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +472 -225
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +236 -260
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +265 -215
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +207 -307
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +302 -135
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +140 -271
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +263 -253
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +244 -137
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +100 -238
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +278 -74
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +56 -97
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +142 -47
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +38 -84
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +72 -252
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +274 -26
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +29 -94
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +98 -25
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +20 -565
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +564 -17
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +20 -23
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +20 -95
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +92 -88
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +97 -29
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +24 -470
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +446 -196
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +199 -729
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +750 -61
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +58 -181
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +175 -259
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +246 -172
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +195 -32
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +12 -40
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +23 -26
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +45 -22
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +27 -48
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +52 -26
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +40 -225
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +217 -39
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +50 -0
- package/dist/index237.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/wc/AIToolCall.js +218 -0
- package/dist/wc/AIToolCall.js.map +1 -0
- package/dist/wc/hf-ai-tool-call.js +34 -219
- package/dist/wc/hf-ai-tool-call.js.map +1 -1
- package/dist/wc/hf-ai-tool-run.js +673 -576
- package/dist/wc/hf-ai-tool-run.js.map +1 -1
- package/dist/wc/workflow-step-renderer.js +94 -86
- package/dist/wc/workflow-step-renderer.js.map +1 -1
- package/dist/wc-react/AIToolCall.js +218 -0
- package/dist/wc-react/AIToolCall.js.map +1 -0
- package/dist/wc-react/hf-ai-tool-call.js +32 -217
- package/dist/wc-react/hf-ai-tool-call.js.map +1 -1
- package/dist/wc-react/hf-ai-tool-run.js +698 -601
- package/dist/wc-react/hf-ai-tool-run.js.map +1 -1
- package/dist/wc-react/workflow-step-renderer.js +76 -68
- package/dist/wc-react/workflow-step-renderer.js.map +1 -1
- package/package.json +1 -1
- package/skills/humain-ui/SKILL.md +1 -1
- package/skills/humain-ui-wc/SKILL.md +1 -1
- package/skills/humain-ui-wc.skill +0 -0
- package/skills/humain-ui.skill +0 -0
- package/dist/index182.js +0 -143
- package/dist/index182.js.map +0 -1
- package/dist/wc/wrench.js +0 -10
- package/dist/wc/wrench.js.map +0 -1
- package/dist/wc-react/wrench.js +0 -10
- package/dist/wc-react/wrench.js.map +0 -1
package/dist/index200.js
CHANGED
|
@@ -1,282 +1,258 @@
|
|
|
1
1
|
import { cn } from "./index2.js";
|
|
2
|
-
import {
|
|
3
|
-
import { ScrollArea } from "./index50.js";
|
|
2
|
+
import { Progress } from "./index17.js";
|
|
4
3
|
import { Avatar } from "./index70.js";
|
|
5
4
|
import { cva } from "class-variance-authority";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
5
|
+
import { AlertCircle, AlertTriangle, CheckCircle, Info, X } from "lucide-react";
|
|
6
|
+
import * as React from "react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
//#region src/components/organisms/content/NotificationItem/NotificationItem.tsx
|
|
9
|
+
var notificationItemVariants = cva("relative flex gap-4 items-start overflow-hidden p-4 rounded-xl border bg-card shadow-sm", {
|
|
10
|
+
variants: { variant: {
|
|
11
|
+
primary: "",
|
|
12
|
+
success: "",
|
|
13
|
+
warning: "",
|
|
14
|
+
error: "",
|
|
15
|
+
gray: "",
|
|
16
|
+
avatar: "",
|
|
17
|
+
image: "",
|
|
18
|
+
progress: "",
|
|
19
|
+
none: ""
|
|
15
20
|
} },
|
|
16
|
-
defaultVariants: {
|
|
21
|
+
defaultVariants: { variant: "primary" }
|
|
17
22
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
23
|
+
var outlineIconVariants = cva("", {
|
|
24
|
+
variants: { variant: {
|
|
25
|
+
primary: "border-primary text-primary",
|
|
26
|
+
success: "border-success text-success",
|
|
27
|
+
warning: "border-warning text-warning",
|
|
28
|
+
error: "border-destructive text-destructive"
|
|
29
|
+
} },
|
|
30
|
+
defaultVariants: { variant: "primary" }
|
|
31
|
+
});
|
|
32
|
+
/** Featured icon with concentric circle outlines */
|
|
33
|
+
var OutlineIcon = ({ variant }) => {
|
|
34
|
+
const iconClasses = outlineIconVariants({ variant });
|
|
35
|
+
const Icon = {
|
|
36
|
+
primary: Info,
|
|
37
|
+
success: CheckCircle,
|
|
38
|
+
warning: AlertTriangle,
|
|
39
|
+
error: AlertCircle
|
|
40
|
+
}[variant];
|
|
41
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
42
|
+
className: "relative size-5 shrink-0",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: cn("absolute -inset-[45%] rounded-full border-2 opacity-10", iconClasses) }),
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: cn("absolute -inset-[20%] rounded-full border-2 opacity-30", iconClasses) }),
|
|
46
|
+
/* @__PURE__ */ jsx(Icon, { className: cn("size-5", iconClasses) })
|
|
47
|
+
]
|
|
48
|
+
});
|
|
44
49
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
children
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"aria-hidden": "true"
|
|
77
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
78
|
-
type: "button",
|
|
79
|
-
className: cn("text-sm font-bold text-secondary-foreground text-start", "cursor-pointer bg-transparent border-0 p-0", "after:absolute after:inset-0 after:rounded-lg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:rounded-sm"),
|
|
80
|
-
onClick,
|
|
81
|
-
"aria-label": [
|
|
82
|
-
unread && "Unread",
|
|
83
|
-
type !== "message" && type,
|
|
84
|
-
"notification:",
|
|
85
|
-
title
|
|
86
|
-
].filter(Boolean).join(" "),
|
|
87
|
-
children: title
|
|
88
|
-
})]
|
|
89
|
-
}),
|
|
90
|
-
description && !highlightedSegments && /* @__PURE__ */ jsx("p", {
|
|
91
|
-
className: "text-sm text-muted-foreground line-clamp-2",
|
|
92
|
-
children: description
|
|
93
|
-
}),
|
|
94
|
-
highlightedSegments && /* @__PURE__ */ jsx("p", {
|
|
95
|
-
className: "text-sm text-muted-foreground line-clamp-2",
|
|
96
|
-
children: highlightedSegments.map((segment, position) => segment.highlighted ? /* @__PURE__ */ jsx("span", {
|
|
97
|
-
className: "font-medium text-primary",
|
|
98
|
-
children: segment.text
|
|
99
|
-
}, getHighlightedSegmentKey(highlightedSegments, position)) : /* @__PURE__ */ jsx("span", { children: segment.text }, getHighlightedSegmentKey(highlightedSegments, position)))
|
|
100
|
-
})
|
|
101
|
-
]
|
|
102
|
-
}),
|
|
103
|
-
type === "meeting" && (meetingDate || meetingTime) && /* @__PURE__ */ jsxs("div", {
|
|
104
|
-
className: "flex items-center gap-1 flex-wrap",
|
|
105
|
-
children: [meetingDate && /* @__PURE__ */ jsxs("div", {
|
|
106
|
-
className: "flex items-center gap-2 flex-1 min-w-0",
|
|
107
|
-
children: [/* @__PURE__ */ jsx(Calendar, { className: "size-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
108
|
-
className: "text-sm text-muted-foreground truncate",
|
|
109
|
-
children: meetingDate
|
|
110
|
-
})]
|
|
111
|
-
}), meetingTime && /* @__PURE__ */ jsxs("div", {
|
|
112
|
-
className: "flex items-center gap-2 flex-1 min-w-0",
|
|
113
|
-
children: [/* @__PURE__ */ jsx(Clock, { className: "size-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
114
|
-
className: "text-sm text-muted-foreground truncate",
|
|
115
|
-
children: meetingTime
|
|
116
|
-
})]
|
|
117
|
-
})]
|
|
118
|
-
}),
|
|
119
|
-
actions && actions.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
120
|
-
className: "flex items-center gap-3 relative z-10",
|
|
121
|
-
children: actions.map((action) => /* @__PURE__ */ jsx(Button, {
|
|
122
|
-
appearance: "link",
|
|
123
|
-
variant: "primary",
|
|
124
|
-
size: "sm",
|
|
125
|
-
className: cn("min-h-11 px-1", action.primary ? "text-primary font-semibold" : "text-secondary-foreground font-semibold"),
|
|
126
|
-
onClick: action.onClick,
|
|
127
|
-
children: action.label
|
|
128
|
-
}, getNotificationActionKey(action)))
|
|
129
|
-
})
|
|
130
|
-
]
|
|
50
|
+
/** Modern boxed featured icon */
|
|
51
|
+
var BoxedIcon = ({ children }) => /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: "flex size-10 shrink-0 items-center justify-center rounded-lg border border-border bg-card shadow-sm",
|
|
53
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: "text-secondary-foreground",
|
|
55
|
+
children
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
/** Close button */
|
|
59
|
+
var CloseButton = ({ onClick }) => /* @__PURE__ */ jsx("button", {
|
|
60
|
+
type: "button",
|
|
61
|
+
onClick,
|
|
62
|
+
className: "absolute end-1 top-1 flex size-11 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-muted-foreground",
|
|
63
|
+
"aria-label": "Close notification",
|
|
64
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-5" })
|
|
65
|
+
});
|
|
66
|
+
/** Action buttons */
|
|
67
|
+
var ActionButtons = ({ primaryAction, secondaryAction, stacked = false }) => {
|
|
68
|
+
if (!primaryAction && !secondaryAction) return null;
|
|
69
|
+
if (stacked) return /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
className: "flex flex-col gap-2",
|
|
71
|
+
children: [primaryAction && /* @__PURE__ */ jsx("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
onClick: primaryAction.onClick,
|
|
74
|
+
className: "w-full rounded-lg bg-primary px-3 py-2 text-sm font-semibold text-primary-foreground hover:bg-primary/90 transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
75
|
+
children: primaryAction.label
|
|
76
|
+
}), secondaryAction && /* @__PURE__ */ jsx("button", {
|
|
77
|
+
type: "button",
|
|
78
|
+
onClick: secondaryAction.onClick,
|
|
79
|
+
className: "w-full rounded-lg border border-border bg-card px-3 py-2 text-sm font-semibold text-secondary-foreground hover:bg-surface-2 transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
80
|
+
children: secondaryAction.label
|
|
131
81
|
})]
|
|
132
82
|
});
|
|
133
|
-
}
|
|
134
|
-
NotificationPanelItem.displayName = "NotificationPanelItem";
|
|
135
|
-
function NotificationSection({ title, children, className }) {
|
|
136
|
-
const prefersReducedMotion = useReducedMotion();
|
|
137
|
-
const sectionVariants = useMemo(() => ({ visible: { transition: { staggerChildren: prefersReducedMotion ? 0 : .05 } } }), [prefersReducedMotion]);
|
|
138
83
|
return /* @__PURE__ */ jsxs("div", {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}), /* @__PURE__ */ jsx(motion.ul, {
|
|
151
|
-
className: "flex flex-col gap-6",
|
|
152
|
-
initial: "hidden",
|
|
153
|
-
animate: "visible",
|
|
154
|
-
variants: sectionVariants,
|
|
155
|
-
children
|
|
84
|
+
className: "flex items-center gap-3",
|
|
85
|
+
children: [primaryAction && /* @__PURE__ */ jsx("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
onClick: primaryAction.onClick,
|
|
88
|
+
className: "min-h-9 py-1.5 text-sm font-semibold text-primary hover:text-primary/80 rounded-sm transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
89
|
+
children: primaryAction.label
|
|
90
|
+
}), secondaryAction && /* @__PURE__ */ jsx("button", {
|
|
91
|
+
type: "button",
|
|
92
|
+
onClick: secondaryAction.onClick,
|
|
93
|
+
className: "min-h-9 py-1.5 text-sm font-semibold text-secondary-foreground hover:text-foreground rounded-sm transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
94
|
+
children: secondaryAction.label
|
|
156
95
|
})]
|
|
157
96
|
});
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
"aria-label": title,
|
|
173
|
-
className: cn(notificationPanelVariants({ variant }), className),
|
|
174
|
-
style: {
|
|
175
|
-
width: variant === "desktop" ? width : "100%",
|
|
176
|
-
maxWidth: "100%",
|
|
177
|
-
height: variant === "desktop" ? height : "100%"
|
|
178
|
-
},
|
|
179
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
180
|
-
className: "flex flex-col pb-4",
|
|
181
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
182
|
-
className: "flex flex-col gap-6 px-6",
|
|
183
|
-
children: [
|
|
184
|
-
/* @__PURE__ */ jsxs("div", {
|
|
185
|
-
className: "flex gap-4 items-start pt-6",
|
|
186
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
187
|
-
className: "shrink-0 size-10 flex items-center justify-center bg-card/60 border border-border rounded-lg shadow-sm",
|
|
188
|
-
children: /* @__PURE__ */ jsx(motion.span, {
|
|
189
|
-
animate: prefersReducedMotion ? void 0 : { rotate: [
|
|
190
|
-
0,
|
|
191
|
-
12,
|
|
192
|
-
-10,
|
|
193
|
-
6,
|
|
194
|
-
-3,
|
|
195
|
-
0
|
|
196
|
-
] },
|
|
197
|
-
transition: {
|
|
198
|
-
duration: .6,
|
|
199
|
-
delay: .3,
|
|
200
|
-
ease: "easeOut"
|
|
201
|
-
},
|
|
202
|
-
className: "flex",
|
|
203
|
-
children: /* @__PURE__ */ jsx(BellRing, { className: "size-5 text-secondary-foreground" })
|
|
204
|
-
})
|
|
205
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
206
|
-
className: "flex-1 flex flex-col gap-0.5 justify-center",
|
|
207
|
-
children: /* @__PURE__ */ jsx("h2", {
|
|
208
|
-
className: "text-xl font-semibold text-foreground",
|
|
209
|
-
children: title
|
|
210
|
-
})
|
|
211
|
-
})]
|
|
212
|
-
}),
|
|
213
|
-
/* @__PURE__ */ jsxs("div", {
|
|
214
|
-
className: "flex items-start justify-between",
|
|
215
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
216
|
-
appearance: "link",
|
|
217
|
-
variant: "primary",
|
|
218
|
-
size: "sm",
|
|
219
|
-
className: headerLinkButtonClass,
|
|
220
|
-
startIcon: /* @__PURE__ */ jsx(Settings, { className: "size-5" }),
|
|
221
|
-
onClick: onSettingsClick,
|
|
222
|
-
children: "Settings"
|
|
223
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
224
|
-
className: "flex items-start gap-1",
|
|
225
|
-
children: [
|
|
226
|
-
/* @__PURE__ */ jsx(Button, {
|
|
227
|
-
appearance: "link",
|
|
228
|
-
variant: "primary",
|
|
229
|
-
size: "sm",
|
|
230
|
-
className: headerLinkButtonClass,
|
|
231
|
-
onClick: onMarkAllRead,
|
|
232
|
-
children: "Mark all read"
|
|
233
|
-
}),
|
|
234
|
-
/* @__PURE__ */ jsx("div", {
|
|
235
|
-
className: "size-6 flex items-center justify-center self-center",
|
|
236
|
-
children: /* @__PURE__ */ jsx("div", { className: "w-px h-5 bg-surface-2" })
|
|
237
|
-
}),
|
|
238
|
-
/* @__PURE__ */ jsx(Button, {
|
|
239
|
-
appearance: "link",
|
|
240
|
-
variant: "primary",
|
|
241
|
-
size: "sm",
|
|
242
|
-
className: headerLinkButtonClass,
|
|
243
|
-
onClick: onClearAll,
|
|
244
|
-
children: "Clear all"
|
|
245
|
-
})
|
|
246
|
-
]
|
|
247
|
-
})]
|
|
248
|
-
}),
|
|
249
|
-
/* @__PURE__ */ jsx(Button, {
|
|
250
|
-
appearance: "ghost",
|
|
251
|
-
variant: "secondary",
|
|
252
|
-
size: "icon",
|
|
253
|
-
"aria-label": "Close notifications",
|
|
254
|
-
className: "absolute top-3 end-4 size-10 text-muted-foreground hover:text-foreground transition-colors duration-150 ease-out [&_svg]:transition-transform [&_svg]:duration-200 [&_svg]:ease-out hover:[&_svg]:rotate-90 motion-reduce:[&_svg]:transition-none",
|
|
255
|
-
onClick: onClose,
|
|
256
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-5" })
|
|
257
|
-
})
|
|
258
|
-
]
|
|
97
|
+
};
|
|
98
|
+
function NotificationLeadingElement({ variant, icon, avatarProps, imageSrc, imageAlt }) {
|
|
99
|
+
switch (variant) {
|
|
100
|
+
case "primary":
|
|
101
|
+
case "success":
|
|
102
|
+
case "warning":
|
|
103
|
+
case "error": return /* @__PURE__ */ jsx(OutlineIcon, { variant });
|
|
104
|
+
case "gray": return icon ? /* @__PURE__ */ jsx(BoxedIcon, { children: icon }) : /* @__PURE__ */ jsx(BoxedIcon, { children: /* @__PURE__ */ jsx(Info, { className: "size-5" }) });
|
|
105
|
+
case "avatar": return /* @__PURE__ */ jsx("div", {
|
|
106
|
+
className: "relative",
|
|
107
|
+
children: /* @__PURE__ */ jsx(Avatar, {
|
|
108
|
+
size: "md",
|
|
109
|
+
indicator: "online",
|
|
110
|
+
...avatarProps
|
|
259
111
|
})
|
|
260
|
-
})
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
112
|
+
});
|
|
113
|
+
case "image": return imageSrc ? /* @__PURE__ */ jsx("div", {
|
|
114
|
+
className: "size-[72px] shrink-0 overflow-hidden rounded-lg",
|
|
115
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
116
|
+
src: imageSrc,
|
|
117
|
+
alt: imageAlt || "Notification image",
|
|
118
|
+
loading: "lazy",
|
|
119
|
+
className: "size-full object-cover"
|
|
120
|
+
})
|
|
121
|
+
}) : null;
|
|
122
|
+
case "progress": return icon ? /* @__PURE__ */ jsx(BoxedIcon, { children: icon }) : /* @__PURE__ */ jsx(BoxedIcon, { children: /* @__PURE__ */ jsx(Info, { className: "size-5" }) });
|
|
123
|
+
default: return null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function NotificationContent({ variant, title, supportingText, timestamp, imageSrc, imageAlt, progressValue, progressLabel, primaryAction, secondaryAction, stackedActions }) {
|
|
127
|
+
const hasActions = primaryAction || secondaryAction;
|
|
128
|
+
if (variant === "progress") return /* @__PURE__ */ jsxs("div", {
|
|
129
|
+
className: "flex min-w-0 flex-1 flex-col gap-4 pe-10",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ jsxs("div", {
|
|
132
|
+
className: "flex flex-col gap-1",
|
|
133
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
134
|
+
className: "text-sm font-semibold text-foreground",
|
|
135
|
+
children: title
|
|
136
|
+
}), supportingText && /* @__PURE__ */ jsx("p", {
|
|
137
|
+
className: "text-sm text-secondary-foreground",
|
|
138
|
+
children: supportingText
|
|
139
|
+
})]
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ jsx(Progress, {
|
|
142
|
+
value: progressValue,
|
|
143
|
+
size: "md",
|
|
144
|
+
showValue: true,
|
|
145
|
+
labelPosition: "inline",
|
|
146
|
+
valueFormat: (value) => progressLabel || `${value}%`
|
|
147
|
+
}),
|
|
148
|
+
hasActions && /* @__PURE__ */ jsx(ActionButtons, {
|
|
149
|
+
primaryAction,
|
|
150
|
+
secondaryAction,
|
|
151
|
+
stacked: stackedActions
|
|
266
152
|
})
|
|
153
|
+
]
|
|
154
|
+
});
|
|
155
|
+
if (variant === "avatar") return /* @__PURE__ */ jsxs("div", {
|
|
156
|
+
className: "flex min-w-0 flex-1 flex-col gap-3 pe-10",
|
|
157
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
158
|
+
className: "flex flex-col gap-1",
|
|
159
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
160
|
+
className: "flex items-center gap-2",
|
|
161
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
162
|
+
className: "text-sm font-semibold text-foreground",
|
|
163
|
+
children: title
|
|
164
|
+
}), timestamp && /* @__PURE__ */ jsx("span", {
|
|
165
|
+
className: "text-sm text-text-quaternary",
|
|
166
|
+
children: timestamp
|
|
167
|
+
})]
|
|
168
|
+
}), supportingText && /* @__PURE__ */ jsx("p", {
|
|
169
|
+
className: "text-sm text-secondary-foreground",
|
|
170
|
+
children: supportingText
|
|
171
|
+
})]
|
|
172
|
+
}), hasActions && /* @__PURE__ */ jsx(ActionButtons, {
|
|
173
|
+
primaryAction,
|
|
174
|
+
secondaryAction,
|
|
175
|
+
stacked: stackedActions
|
|
267
176
|
})]
|
|
268
177
|
});
|
|
269
|
-
if (variant === "
|
|
270
|
-
className: "
|
|
271
|
-
children: [
|
|
272
|
-
|
|
273
|
-
|
|
178
|
+
if (variant === "image") return /* @__PURE__ */ jsxs("div", {
|
|
179
|
+
className: "flex min-w-0 flex-1 flex-col gap-3 pe-10",
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ jsxs("div", {
|
|
182
|
+
className: "flex flex-col gap-1",
|
|
183
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
184
|
+
className: "text-sm font-semibold text-foreground",
|
|
185
|
+
children: title
|
|
186
|
+
}), supportingText && /* @__PURE__ */ jsx("p", {
|
|
187
|
+
className: "text-sm text-secondary-foreground",
|
|
188
|
+
children: supportingText
|
|
189
|
+
})]
|
|
190
|
+
}),
|
|
191
|
+
imageSrc && /* @__PURE__ */ jsx("div", {
|
|
192
|
+
className: "w-full aspect-video overflow-hidden rounded-lg",
|
|
193
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
194
|
+
src: imageSrc,
|
|
195
|
+
alt: imageAlt || "Notification image",
|
|
196
|
+
loading: "lazy",
|
|
197
|
+
className: "size-full object-cover"
|
|
198
|
+
})
|
|
199
|
+
}),
|
|
200
|
+
hasActions && /* @__PURE__ */ jsx(ActionButtons, {
|
|
201
|
+
primaryAction,
|
|
202
|
+
secondaryAction,
|
|
203
|
+
stacked: stackedActions
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
});
|
|
207
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
208
|
+
className: "flex min-w-0 flex-1 flex-col gap-3 pe-10 pt-0.5",
|
|
209
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
210
|
+
className: "flex flex-col gap-1",
|
|
211
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
212
|
+
className: "text-sm font-semibold text-foreground",
|
|
213
|
+
children: title
|
|
214
|
+
}), supportingText && /* @__PURE__ */ jsx("p", {
|
|
215
|
+
className: "text-sm text-secondary-foreground",
|
|
216
|
+
children: supportingText
|
|
217
|
+
})]
|
|
218
|
+
}), hasActions && /* @__PURE__ */ jsx(ActionButtons, {
|
|
219
|
+
primaryAction,
|
|
220
|
+
secondaryAction
|
|
274
221
|
})]
|
|
275
222
|
});
|
|
276
|
-
return panelContent;
|
|
277
223
|
}
|
|
278
|
-
|
|
224
|
+
var NotificationItem = React.memo(function NotificationItem({ variant = "primary", title, supportingText, showCloseButton = true, onClose, primaryAction, secondaryAction, icon, avatarProps, timestamp, imageSrc, imageAlt, progressValue = 0, progressLabel, stackedActions = false, className, ...props }) {
|
|
225
|
+
return /* @__PURE__ */ jsxs("article", {
|
|
226
|
+
"data-slot": "notification-item",
|
|
227
|
+
className: cn(notificationItemVariants({ variant }), "transition-shadow duration-200 ease-out hover:shadow-md motion-reduce:transition-none", className),
|
|
228
|
+
...props,
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ jsx(NotificationLeadingElement, {
|
|
231
|
+
variant,
|
|
232
|
+
icon,
|
|
233
|
+
avatarProps,
|
|
234
|
+
imageSrc,
|
|
235
|
+
imageAlt
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ jsx(NotificationContent, {
|
|
238
|
+
variant,
|
|
239
|
+
title,
|
|
240
|
+
supportingText,
|
|
241
|
+
timestamp,
|
|
242
|
+
imageSrc,
|
|
243
|
+
imageAlt,
|
|
244
|
+
progressValue,
|
|
245
|
+
progressLabel,
|
|
246
|
+
primaryAction,
|
|
247
|
+
secondaryAction,
|
|
248
|
+
stackedActions
|
|
249
|
+
}),
|
|
250
|
+
showCloseButton && /* @__PURE__ */ jsx(CloseButton, { onClick: onClose })
|
|
251
|
+
]
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
NotificationItem.displayName = "NotificationItem";
|
|
279
255
|
//#endregion
|
|
280
|
-
export {
|
|
256
|
+
export { NotificationItem, notificationItemVariants };
|
|
281
257
|
|
|
282
258
|
//# sourceMappingURL=index200.js.map
|
package/dist/index200.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index200.js","names":[],"sources":["../src/components/organisms/content/NotificationPanel/NotificationPanel.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { BellRing, Calendar, Clock, Settings, X } from 'lucide-react';\nimport { motion, useReducedMotion } from 'motion/react';\nimport type * as React from 'react';\nimport { useMemo } from 'react';\nimport { Button } from '@/components/atoms/buttons/Button';\nimport { ScrollArea } from '@/components/atoms/layout/ScrollArea';\nimport { Avatar } from '@/components/molecules/data/Avatar';\nimport { cn } from '@/lib/utils';\n\n// Notification dot variant\nconst notificationDotVariants = cva('rounded-full shrink-0 bg-primary', {\n variants: {\n size: {\n sm: 'size-2',\n md: 'size-2.5',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n});\n\n// Notification item types\nexport type NotificationPanelItemType =\n | 'message'\n | 'meeting'\n | 'task'\n | 'system';\n\nexport interface NotificationPanelAction {\n /** Label for the action button */\n label: string;\n /** Callback when action is clicked */\n onClick?: () => void;\n /** Whether this is the primary action */\n primary?: boolean;\n}\n\nexport interface NotificationPanelItemProps {\n /** Unique identifier for the notification */\n id: string;\n /** Avatar image source */\n avatarSrc?: string;\n /** Avatar fallback text (for initials) */\n avatarFallback?: string;\n /** Name of the sender/source */\n name: string;\n /** Time since notification was received */\n time: string;\n /** Title/heading of the notification */\n title: string;\n /** Description/body text */\n description?: string;\n /** Whether the notification is unread */\n unread?: boolean;\n /** Show online status indicator on avatar */\n showOnlineStatus?: boolean;\n /** Type of notification */\n type?: NotificationPanelItemType;\n /** Meeting date (for meeting type) */\n meetingDate?: string;\n /** Meeting time (for meeting type) */\n meetingTime?: string;\n /** Actions available for this notification */\n actions?: NotificationPanelAction[];\n /** Highlighted text segments in description */\n highlightedSegments?: Array<{\n text: string;\n highlighted: boolean;\n }>;\n /** Callback when notification item is clicked */\n onClick?: () => void;\n /** Additional CSS classes */\n className?: string;\n}\n\ntype NotificationHighlightedSegment = NonNullable<\n NotificationPanelItemProps['highlightedSegments']\n>[number];\n\nfunction getHighlightedSegmentKey(\n segments: NotificationHighlightedSegment[],\n position: number,\n): React.Key {\n const offset = segments\n .slice(0, position)\n .reduce((total, segment) => total + segment.text.length, 0);\n const segment = segments[position];\n\n return `${offset}:${segment.highlighted ? 'highlight' : 'plain'}:${segment.text}`;\n}\n\nfunction getNotificationActionKey(action: NotificationPanelAction): React.Key {\n return `${action.primary ? 'primary' : 'secondary'}:${action.label}`;\n}\n\nconst notificationItemVariants = {\n hidden: { opacity: 0, y: 8 },\n visible: {\n opacity: 1,\n y: 0,\n transition: { duration: 0.2, ease: [0, 0, 0.2, 1] as const },\n },\n};\n\nfunction NotificationPanelItem({\n avatarSrc,\n avatarFallback,\n name,\n time,\n title,\n description,\n unread = true,\n showOnlineStatus = true,\n type = 'message',\n meetingDate,\n meetingTime,\n actions,\n highlightedSegments,\n onClick,\n className,\n}: NotificationPanelItemProps) {\n return (\n <motion.li\n data-slot=\"notification-panel-item\"\n className={cn(\n 'relative flex gap-3 items-start w-full rounded-lg list-none',\n 'transition-colors duration-150 ease-out hover:bg-accent/50 motion-reduce:transition-none',\n className,\n )}\n variants={notificationItemVariants}\n >\n {/* Avatar */}\n <Avatar\n src={avatarSrc}\n fallback={avatarFallback || name}\n size=\"lg\"\n indicator={showOnlineStatus ? 'online' : undefined}\n className=\"shrink-0\"\n />\n\n {/* Content */}\n <div className=\"flex-1 min-w-0 flex flex-col gap-3\">\n {/* Text content */}\n <div className=\"flex flex-col gap-1\">\n {/* Name and time row */}\n <div className=\"flex items-center gap-2 flex-wrap\">\n <span className=\"text-sm font-medium text-secondary-foreground\">\n {name}\n </span>\n <span className=\"text-xs text-muted-foreground\">{time}</span>\n </div>\n\n {/* Title — card-link pattern: button stretches over item via ::after */}\n <div className=\"flex items-center gap-2\">\n {unread && (\n <span\n className={cn(\n notificationDotVariants(),\n 'animate-pulse motion-reduce:animate-none',\n )}\n aria-hidden=\"true\"\n />\n )}\n <button\n type=\"button\"\n className={cn(\n 'text-sm font-bold text-secondary-foreground text-start',\n 'cursor-pointer bg-transparent border-0 p-0',\n 'after:absolute after:inset-0 after:rounded-lg',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:rounded-sm',\n )}\n onClick={onClick}\n aria-label={[\n unread && 'Unread',\n type !== 'message' && type,\n 'notification:',\n title,\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {title}\n </button>\n </div>\n\n {/* Description */}\n {description && !highlightedSegments && (\n <p className=\"text-sm text-muted-foreground line-clamp-2\">\n {description}\n </p>\n )}\n\n {/* Highlighted description */}\n {highlightedSegments && (\n <p className=\"text-sm text-muted-foreground line-clamp-2\">\n {highlightedSegments.map((segment, position) =>\n segment.highlighted ? (\n <span\n key={getHighlightedSegmentKey(\n highlightedSegments,\n position,\n )}\n className=\"font-medium text-primary\"\n >\n {segment.text}\n </span>\n ) : (\n <span\n key={getHighlightedSegmentKey(\n highlightedSegments,\n position,\n )}\n >\n {segment.text}\n </span>\n ),\n )}\n </p>\n )}\n </div>\n\n {/* Meeting details (for meeting type) */}\n {type === 'meeting' && (meetingDate || meetingTime) && (\n <div className=\"flex items-center gap-1 flex-wrap\">\n {meetingDate && (\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n <Calendar className=\"size-5 text-muted-foreground shrink-0\" />\n <span className=\"text-sm text-muted-foreground truncate\">\n {meetingDate}\n </span>\n </div>\n )}\n {meetingTime && (\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n <Clock className=\"size-5 text-muted-foreground shrink-0\" />\n <span className=\"text-sm text-muted-foreground truncate\">\n {meetingTime}\n </span>\n </div>\n )}\n </div>\n )}\n\n {/* Actions — elevated above the card-link overlay */}\n {actions && actions.length > 0 && (\n <div className=\"flex items-center gap-3 relative z-10\">\n {actions.map((action) => (\n <Button\n key={getNotificationActionKey(action)}\n appearance=\"link\"\n variant=\"primary\"\n size=\"sm\"\n className={cn(\n 'min-h-11 px-1',\n action.primary\n ? 'text-primary font-semibold'\n : 'text-secondary-foreground font-semibold',\n )}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n </motion.li>\n );\n}\n\nNotificationPanelItem.displayName = 'NotificationPanelItem';\n\n// Notification section for grouping notifications by date\nexport interface NotificationSectionProps {\n /** Section title (e.g., \"Today\", \"Previous\") */\n title: string;\n /** Notifications in this section */\n children: React.ReactNode;\n /** Additional CSS classes */\n className?: string;\n}\n\nfunction NotificationSection({\n title,\n children,\n className,\n}: NotificationSectionProps) {\n const prefersReducedMotion = useReducedMotion();\n\n const sectionVariants = useMemo(\n () => ({\n visible: {\n transition: {\n staggerChildren: prefersReducedMotion ? 0 : 0.05,\n },\n },\n }),\n [prefersReducedMotion],\n );\n\n return (\n <div\n data-slot=\"notification-section\"\n className={cn('flex flex-col gap-4', className)}\n >\n <div className=\"flex flex-col gap-3\">\n <h3 className=\"text-sm font-medium text-secondary-foreground\">\n {title}\n </h3>\n <div className=\"h-px bg-surface-2\" aria-hidden=\"true\" />\n </div>\n <motion.ul\n className=\"flex flex-col gap-6\"\n initial=\"hidden\"\n animate=\"visible\"\n variants={sectionVariants}\n >\n {children}\n </motion.ul>\n </div>\n );\n}\n\nNotificationSection.displayName = 'NotificationSection';\n\nconst headerLinkButtonClass = 'min-h-11 px-1 text-primary font-normal';\n\n// Main NotificationPanel component\nconst notificationPanelVariants = cva(\n 'relative flex flex-col overflow-hidden',\n {\n variants: {\n variant: {\n desktop: 'bg-muted border border-border rounded-3xl shadow-3xl',\n mobile: 'bg-background shadow-xl',\n },\n },\n defaultVariants: {\n variant: 'desktop',\n },\n },\n);\n\nexport interface NotificationPanelProps\n extends VariantProps<typeof notificationPanelVariants> {\n /** Title of the panel */\n title?: string;\n /** Callback when settings button is clicked */\n onSettingsClick?: () => void;\n /** Callback when \"Mark all read\" is clicked */\n onMarkAllRead?: () => void;\n /** Callback when \"Clear all\" is clicked */\n onClearAll?: () => void;\n /** Callback when close button is clicked */\n onClose?: () => void;\n /** Panel content (NotificationSection or NotificationItem components) */\n children: React.ReactNode;\n /** Whether to show overlay background (mobile variant) */\n showOverlay?: boolean;\n /** Fixed width for desktop variant */\n width?: number;\n /** Fixed height for the panel */\n height?: number;\n /** Additional CSS classes */\n className?: string;\n}\n\nfunction NotificationPanel({\n title = 'Notifications',\n variant = 'desktop',\n onSettingsClick,\n onMarkAllRead,\n onClearAll,\n onClose,\n children,\n showOverlay = false,\n width = 573,\n height = 675,\n className,\n}: NotificationPanelProps) {\n const prefersReducedMotion = useReducedMotion();\n const panelContent = (\n <section\n data-slot=\"notification-panel\"\n aria-label={title}\n className={cn(notificationPanelVariants({ variant }), className)}\n style={{\n width: variant === 'desktop' ? width : '100%',\n maxWidth: '100%',\n height: variant === 'desktop' ? height : '100%',\n }}\n >\n {/* Header */}\n <div className=\"flex flex-col pb-4\">\n <div className=\"flex flex-col gap-6 px-6\">\n {/* Title row */}\n <div className=\"flex gap-4 items-start pt-6\">\n {/* Featured icon */}\n <div className=\"shrink-0 size-10 flex items-center justify-center bg-card/60 border border-border rounded-lg shadow-sm\">\n <motion.span\n animate={\n prefersReducedMotion\n ? undefined\n : { rotate: [0, 12, -10, 6, -3, 0] }\n }\n transition={{ duration: 0.6, delay: 0.3, ease: 'easeOut' }}\n className=\"flex\"\n >\n <BellRing className=\"size-5 text-secondary-foreground\" />\n </motion.span>\n </div>\n {/* Title */}\n <div className=\"flex-1 flex flex-col gap-0.5 justify-center\">\n <h2 className=\"text-xl font-semibold text-foreground\">{title}</h2>\n </div>\n </div>\n\n {/* Actions row */}\n <div className=\"flex items-start justify-between\">\n <Button\n appearance=\"link\"\n variant=\"primary\"\n size=\"sm\"\n className={headerLinkButtonClass}\n startIcon={<Settings className=\"size-5\" />}\n onClick={onSettingsClick}\n >\n Settings\n </Button>\n <div className=\"flex items-start gap-1\">\n <Button\n appearance=\"link\"\n variant=\"primary\"\n size=\"sm\"\n className={headerLinkButtonClass}\n onClick={onMarkAllRead}\n >\n Mark all read\n </Button>\n <div className=\"size-6 flex items-center justify-center self-center\">\n <div className=\"w-px h-5 bg-surface-2\" />\n </div>\n <Button\n appearance=\"link\"\n variant=\"primary\"\n size=\"sm\"\n className={headerLinkButtonClass}\n onClick={onClearAll}\n >\n Clear all\n </Button>\n </div>\n </div>\n\n {/* Close button */}\n <Button\n appearance=\"ghost\"\n variant=\"secondary\"\n size=\"icon\"\n aria-label=\"Close notifications\"\n className=\"absolute top-3 end-4 size-10 text-muted-foreground hover:text-foreground transition-colors duration-150 ease-out [&_svg]:transition-transform [&_svg]:duration-200 [&_svg]:ease-out hover:[&_svg]:rotate-90 motion-reduce:[&_svg]:transition-none\"\n onClick={onClose}\n >\n <X className=\"size-5\" />\n </Button>\n </div>\n </div>\n\n {/* Content */}\n <ScrollArea className=\"flex-1 min-h-0\">\n <div className=\"flex flex-col gap-4 px-6 pb-6\" aria-live=\"polite\">\n {children}\n </div>\n </ScrollArea>\n </section>\n );\n\n // For mobile with overlay\n if (variant === 'mobile' && showOverlay) {\n return (\n <div className=\"relative flex items-start ps-6 h-full w-full\">\n {/* Backdrop overlay */}\n <div className=\"absolute inset-0 bg-foreground/70 backdrop-blur\" />\n {/* Panel */}\n <div className=\"relative flex-1 h-full\">{panelContent}</div>\n </div>\n );\n }\n\n return panelContent;\n}\n\nNotificationPanel.displayName = 'NotificationPanel';\n\nexport {\n NotificationPanel,\n NotificationPanelItem,\n NotificationSection,\n notificationDotVariants,\n notificationPanelVariants,\n};\n"],"mappings":";;;;;;;;;;AAWA,IAAM,0BAA0B,IAAI,oCAAoC;CACtE,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;CACN,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC;AA4DD,SAAS,yBACP,UACA,UACW;CACX,MAAM,SAAS,SACZ,MAAM,GAAG,QAAQ,CAAC,CAClB,QAAQ,OAAO,YAAY,QAAQ,QAAQ,KAAK,QAAQ,CAAC;CAC5D,MAAM,UAAU,SAAS;CAEzB,OAAO,GAAG,OAAO,GAAG,QAAQ,cAAc,cAAc,QAAQ,GAAG,QAAQ;AAC7E;AAEA,SAAS,yBAAyB,QAA4C;CAC5E,OAAO,GAAG,OAAO,UAAU,YAAY,YAAY,GAAG,OAAO;AAC/D;AAEA,IAAM,2BAA2B;CAC/B,Q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R,qBAAC,OAAD;OAAK,WAAU;iBAAf;QACE,oBAAC,QAAD;SACE,YAAW;SACX,SAAQ;SACR,MAAK;SACL,WAAW;SACX,SAAS;mBACV;QAEO,CAAA;QACR,oBAAC,OAAD;SAAK,WAAU;mBACb,oBAAC,OAAD,EAAK,WAAU,wBAAyB,CAAA;QACrC,CAAA;QACL,oBAAC,QAAD;SACE,YAAW;SACX,SAAQ;SACR,MAAK;SACL,WAAW;SACX,SAAS;mBACV;QAEO,CAAA;OACL;QACF;;KAGL,oBAAC,QAAD;MACE,YAAW;MACX,SAAQ;MACR,MAAK;MACL,cAAW;MACX,WAAU;MACV,SAAS;gBAET,oBAAC,GAAD,EAAG,WAAU,SAAU,CAAA;KACjB,CAAA;IACL;;EACF,CAAA,GAGL,oBAAC,YAAD;GAAY,WAAU;aACpB,oBAAC,OAAD;IAAK,WAAU;IAAgC,aAAU;IACtD;GACE,CAAA;EACK,CAAA,CACL;;CAIX,IAAI,YAAY,YAAY,aAC1B,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CAEE,oBAAC,OAAD,EAAK,WAAU,kDAAmD,CAAA,GAElE,oBAAC,OAAD;GAAK,WAAU;aAA0B;EAAkB,CAAA,CACxD;;CAIT,OAAO;AACT;AAEA,kBAAkB,cAAc"}
|
|
1
|
+
{"version":3,"file":"index200.js","names":[],"sources":["../src/components/organisms/content/NotificationItem/NotificationItem.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { AlertCircle, AlertTriangle, CheckCircle, Info, X } from 'lucide-react';\nimport * as React from 'react';\nimport { Progress } from '@/components/atoms/display/Progress';\nimport type { AvatarProps } from '@/components/molecules/data/Avatar';\nimport { Avatar } from '@/components/molecules/data/Avatar';\nimport { cn } from '@/lib/utils';\n\nconst notificationItemVariants = cva(\n 'relative flex gap-4 items-start overflow-hidden p-4 rounded-xl border bg-card shadow-sm',\n {\n variants: {\n variant: {\n primary: '',\n success: '',\n warning: '',\n error: '',\n gray: '',\n avatar: '',\n image: '',\n progress: '',\n none: '',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n },\n);\n\n// Featured icon with concentric circle outlines (for primary, success, warning, error)\nconst outlineIconVariants = cva('', {\n variants: {\n variant: {\n primary: 'border-primary text-primary',\n success: 'border-success text-success',\n warning: 'border-warning text-warning',\n error: 'border-destructive text-destructive',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n});\n\nexport type NotificationVariant = NonNullable<\n VariantProps<typeof notificationItemVariants>['variant']\n>;\n\nexport interface NotificationAction {\n /** Button label */\n label: string;\n /** Click handler */\n onClick?: () => void;\n}\n\nexport interface NotificationItemProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Visual style variant */\n variant?: NotificationVariant;\n /** Notification title */\n title: string;\n /** Supporting description text */\n supportingText?: string;\n /** Show the close button */\n showCloseButton?: boolean;\n /** Callback when close button is clicked */\n onClose?: () => void;\n /** Primary action (displayed first, brand color) */\n primaryAction?: NotificationAction;\n /** Secondary action (displayed second, neutral color) */\n secondaryAction?: NotificationAction;\n /** Custom icon for gray variant */\n icon?: React.ReactNode;\n /** Avatar props for avatar variant */\n avatarProps?: AvatarProps;\n /** Timestamp for avatar variant */\n timestamp?: string;\n /** Image source for image variant */\n imageSrc?: string;\n /** Image alt text */\n imageAlt?: string;\n /** Progress value (0-100) for progress variant */\n progressValue?: number;\n /** Progress label for progress variant */\n progressLabel?: string;\n /** Stack action buttons vertically instead of horizontally */\n stackedActions?: boolean;\n}\n\n/** Featured icon with concentric circle outlines */\nconst OutlineIcon = ({\n variant,\n}: {\n variant: 'primary' | 'success' | 'warning' | 'error';\n}) => {\n const iconClasses = outlineIconVariants({ variant });\n\n const Icon = {\n primary: Info,\n success: CheckCircle,\n warning: AlertTriangle,\n error: AlertCircle,\n }[variant];\n\n return (\n <div className=\"relative size-5 shrink-0\">\n {/* Outer ring */}\n <div\n className={cn(\n 'absolute -inset-[45%] rounded-full border-2 opacity-10',\n iconClasses,\n )}\n />\n {/* Inner ring */}\n <div\n className={cn(\n 'absolute -inset-[20%] rounded-full border-2 opacity-30',\n iconClasses,\n )}\n />\n {/* Icon */}\n <Icon className={cn('size-5', iconClasses)} />\n </div>\n );\n};\n\n/** Modern boxed featured icon */\nconst BoxedIcon = ({ children }: { children: React.ReactNode }) => (\n <div className=\"flex size-10 shrink-0 items-center justify-center rounded-lg border border-border bg-card shadow-sm\">\n <div className=\"text-secondary-foreground\">{children}</div>\n </div>\n);\n\n/** Close button */\nconst CloseButton = ({ onClick }: { onClick?: () => void }) => (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"absolute end-1 top-1 flex size-11 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-muted-foreground\"\n aria-label=\"Close notification\"\n >\n <X className=\"size-5\" />\n </button>\n);\n\n/** Action buttons */\nconst ActionButtons = ({\n primaryAction,\n secondaryAction,\n stacked = false,\n}: {\n primaryAction?: NotificationAction;\n secondaryAction?: NotificationAction;\n stacked?: boolean;\n}) => {\n if (!primaryAction && !secondaryAction) return null;\n\n if (stacked) {\n return (\n <div className=\"flex flex-col gap-2\">\n {primaryAction && (\n <button\n type=\"button\"\n onClick={primaryAction.onClick}\n className=\"w-full rounded-lg bg-primary px-3 py-2 text-sm font-semibold text-primary-foreground hover:bg-primary/90 transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n {primaryAction.label}\n </button>\n )}\n {secondaryAction && (\n <button\n type=\"button\"\n onClick={secondaryAction.onClick}\n className=\"w-full rounded-lg border border-border bg-card px-3 py-2 text-sm font-semibold text-secondary-foreground hover:bg-surface-2 transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n {secondaryAction.label}\n </button>\n )}\n </div>\n );\n }\n\n return (\n <div className=\"flex items-center gap-3\">\n {primaryAction && (\n <button\n type=\"button\"\n onClick={primaryAction.onClick}\n className=\"min-h-9 py-1.5 text-sm font-semibold text-primary hover:text-primary/80 rounded-sm transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n {primaryAction.label}\n </button>\n )}\n {secondaryAction && (\n <button\n type=\"button\"\n onClick={secondaryAction.onClick}\n className=\"min-h-9 py-1.5 text-sm font-semibold text-secondary-foreground hover:text-foreground rounded-sm transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n {secondaryAction.label}\n </button>\n )}\n </div>\n );\n};\n\ninterface NotificationLeadingElementProps {\n variant: NotificationVariant;\n icon?: React.ReactNode;\n avatarProps?: AvatarProps;\n imageSrc?: string;\n imageAlt?: string;\n}\n\nfunction NotificationLeadingElement({\n variant,\n icon,\n avatarProps,\n imageSrc,\n imageAlt,\n}: NotificationLeadingElementProps) {\n switch (variant) {\n case 'primary':\n case 'success':\n case 'warning':\n case 'error':\n return <OutlineIcon variant={variant} />;\n\n case 'gray':\n return icon ? (\n <BoxedIcon>{icon}</BoxedIcon>\n ) : (\n <BoxedIcon>\n <Info className=\"size-5\" />\n </BoxedIcon>\n );\n\n case 'avatar':\n return (\n <div className=\"relative\">\n <Avatar size=\"md\" indicator=\"online\" {...avatarProps} />\n </div>\n );\n\n case 'image':\n return imageSrc ? (\n <div className=\"size-[72px] shrink-0 overflow-hidden rounded-lg\">\n <img\n src={imageSrc}\n alt={imageAlt || 'Notification image'}\n loading=\"lazy\"\n className=\"size-full object-cover\"\n />\n </div>\n ) : null;\n\n case 'progress':\n return icon ? (\n <BoxedIcon>{icon}</BoxedIcon>\n ) : (\n <BoxedIcon>\n <Info className=\"size-5\" />\n </BoxedIcon>\n );\n\n default:\n return null;\n }\n}\n\ninterface NotificationContentProps {\n variant: NotificationVariant;\n title: string;\n supportingText?: string;\n timestamp?: string;\n imageSrc?: string;\n imageAlt?: string;\n progressValue: number;\n progressLabel?: string;\n primaryAction?: NotificationAction;\n secondaryAction?: NotificationAction;\n stackedActions: boolean;\n}\n\nfunction NotificationContent({\n variant,\n title,\n supportingText,\n timestamp,\n imageSrc,\n imageAlt,\n progressValue,\n progressLabel,\n primaryAction,\n secondaryAction,\n stackedActions,\n}: NotificationContentProps) {\n const hasActions = primaryAction || secondaryAction;\n\n if (variant === 'progress') {\n return (\n <div className=\"flex min-w-0 flex-1 flex-col gap-4 pe-10\">\n <div className=\"flex flex-col gap-1\">\n <h3 className=\"text-sm font-semibold text-foreground\">{title}</h3>\n {supportingText && (\n <p className=\"text-sm text-secondary-foreground\">\n {supportingText}\n </p>\n )}\n </div>\n\n <Progress\n value={progressValue}\n size=\"md\"\n showValue\n labelPosition=\"inline\"\n valueFormat={(value) => progressLabel || `${value}%`}\n />\n\n {hasActions && (\n <ActionButtons\n primaryAction={primaryAction}\n secondaryAction={secondaryAction}\n stacked={stackedActions}\n />\n )}\n </div>\n );\n }\n\n if (variant === 'avatar') {\n return (\n <div className=\"flex min-w-0 flex-1 flex-col gap-3 pe-10\">\n <div className=\"flex flex-col gap-1\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"text-sm font-semibold text-foreground\">{title}</h3>\n {timestamp && (\n <span className=\"text-sm text-text-quaternary\">{timestamp}</span>\n )}\n </div>\n {supportingText && (\n <p className=\"text-sm text-secondary-foreground\">\n {supportingText}\n </p>\n )}\n </div>\n\n {hasActions && (\n <ActionButtons\n primaryAction={primaryAction}\n secondaryAction={secondaryAction}\n stacked={stackedActions}\n />\n )}\n </div>\n );\n }\n\n if (variant === 'image') {\n return (\n <div className=\"flex min-w-0 flex-1 flex-col gap-3 pe-10\">\n <div className=\"flex flex-col gap-1\">\n <h3 className=\"text-sm font-semibold text-foreground\">{title}</h3>\n {supportingText && (\n <p className=\"text-sm text-secondary-foreground\">\n {supportingText}\n </p>\n )}\n </div>\n\n {imageSrc && (\n <div className=\"w-full aspect-video overflow-hidden rounded-lg\">\n <img\n src={imageSrc}\n alt={imageAlt || 'Notification image'}\n loading=\"lazy\"\n className=\"size-full object-cover\"\n />\n </div>\n )}\n\n {hasActions && (\n <ActionButtons\n primaryAction={primaryAction}\n secondaryAction={secondaryAction}\n stacked={stackedActions}\n />\n )}\n </div>\n );\n }\n\n return (\n <div className=\"flex min-w-0 flex-1 flex-col gap-3 pe-10 pt-0.5\">\n <div className=\"flex flex-col gap-1\">\n <h3 className=\"text-sm font-semibold text-foreground\">{title}</h3>\n {supportingText && (\n <p className=\"text-sm text-secondary-foreground\">{supportingText}</p>\n )}\n </div>\n\n {hasActions && (\n <ActionButtons\n primaryAction={primaryAction}\n secondaryAction={secondaryAction}\n />\n )}\n </div>\n );\n}\n\nconst NotificationItem = React.memo(function NotificationItem({\n variant = 'primary',\n title,\n supportingText,\n showCloseButton = true,\n onClose,\n primaryAction,\n secondaryAction,\n icon,\n avatarProps,\n timestamp,\n imageSrc,\n imageAlt,\n progressValue = 0,\n progressLabel,\n stackedActions = false,\n className,\n ...props\n}: NotificationItemProps) {\n return (\n <article\n data-slot=\"notification-item\"\n className={cn(\n notificationItemVariants({ variant }),\n 'transition-shadow duration-200 ease-out hover:shadow-md motion-reduce:transition-none',\n className,\n )}\n {...props}\n >\n <NotificationLeadingElement\n variant={variant}\n icon={icon}\n avatarProps={avatarProps}\n imageSrc={imageSrc}\n imageAlt={imageAlt}\n />\n <NotificationContent\n variant={variant}\n title={title}\n supportingText={supportingText}\n timestamp={timestamp}\n imageSrc={imageSrc}\n imageAlt={imageAlt}\n progressValue={progressValue}\n progressLabel={progressLabel}\n primaryAction={primaryAction}\n secondaryAction={secondaryAction}\n stackedActions={stackedActions}\n />\n {showCloseButton && <CloseButton onClick={onClose} />}\n </article>\n );\n});\n\nNotificationItem.displayName = 'NotificationItem';\n\nexport { NotificationItem, notificationItemVariants };\n"],"mappings":";;;;;;;;AAQA,IAAM,2BAA2B,IAC/B,2FAC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