@agentiffai/design 0.1.0

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +21 -0
  3. package/README.md +187 -0
  4. package/assets/layout/main-pane-section.png +0 -0
  5. package/assets/layout/nav-complete.png +0 -0
  6. package/assets/layout/nav-horizontal-section.png +0 -0
  7. package/assets/layout/nav-vertical-section.png +0 -0
  8. package/assets/layout/pane-section-dropdowns.png +0 -0
  9. package/assets/layout/pane-section-header.png +0 -0
  10. package/dist/Window-B6e_UfLV.d.ts +429 -0
  11. package/dist/Window-CgGFIYHS.d.cts +429 -0
  12. package/dist/chunk-CNVJ5UF2.js +2069 -0
  13. package/dist/chunk-CNVJ5UF2.js.map +1 -0
  14. package/dist/chunk-CVHHTWDQ.cjs +72 -0
  15. package/dist/chunk-CVHHTWDQ.cjs.map +1 -0
  16. package/dist/chunk-H4VHCHCP.cjs +1268 -0
  17. package/dist/chunk-H4VHCHCP.cjs.map +1 -0
  18. package/dist/chunk-JQ6Q7MDQ.js +67 -0
  19. package/dist/chunk-JQ6Q7MDQ.js.map +1 -0
  20. package/dist/chunk-KNSPBTTJ.cjs +2158 -0
  21. package/dist/chunk-KNSPBTTJ.cjs.map +1 -0
  22. package/dist/chunk-MNXQDDWP.js +2143 -0
  23. package/dist/chunk-MNXQDDWP.js.map +1 -0
  24. package/dist/chunk-P4Q3MHIY.cjs +2093 -0
  25. package/dist/chunk-P4Q3MHIY.cjs.map +1 -0
  26. package/dist/chunk-PAOXD7DF.js +1253 -0
  27. package/dist/chunk-PAOXD7DF.js.map +1 -0
  28. package/dist/copilotkit/index.cjs +611 -0
  29. package/dist/copilotkit/index.cjs.map +1 -0
  30. package/dist/copilotkit/index.d.cts +162 -0
  31. package/dist/copilotkit/index.d.ts +162 -0
  32. package/dist/copilotkit/index.js +538 -0
  33. package/dist/copilotkit/index.js.map +1 -0
  34. package/dist/icons/index.cjs +48 -0
  35. package/dist/icons/index.cjs.map +1 -0
  36. package/dist/icons/index.d.cts +375 -0
  37. package/dist/icons/index.d.ts +375 -0
  38. package/dist/icons/index.js +3 -0
  39. package/dist/icons/index.js.map +1 -0
  40. package/dist/index.cjs +536 -0
  41. package/dist/index.cjs.map +1 -0
  42. package/dist/index.d-DYU1eVeb.d.cts +252 -0
  43. package/dist/index.d-DYU1eVeb.d.ts +252 -0
  44. package/dist/index.d.cts +185 -0
  45. package/dist/index.d.ts +185 -0
  46. package/dist/index.js +358 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/layout/index.cjs +48 -0
  49. package/dist/layout/index.cjs.map +1 -0
  50. package/dist/layout/index.d.cts +206 -0
  51. package/dist/layout/index.d.ts +206 -0
  52. package/dist/layout/index.js +3 -0
  53. package/dist/layout/index.js.map +1 -0
  54. package/dist/theme/index.cjs +24 -0
  55. package/dist/theme/index.cjs.map +1 -0
  56. package/dist/theme/index.d.cts +95 -0
  57. package/dist/theme/index.d.ts +95 -0
  58. package/dist/theme/index.js +3 -0
  59. package/dist/theme/index.js.map +1 -0
  60. package/package.json +148 -0
  61. package/public/assets/bg-set/brand-logos/Google.svg +1 -0
  62. package/public/assets/bg-set/brand-logos/Google2.svg +1 -0
  63. package/public/assets/bg-set/brand-logos/Microsoft.svg +1 -0
  64. package/public/assets/bg-set/brand-logos/Microsoft2.svg +1 -0
  65. package/public/assets/bg-set/brand-logos/Slack.svg +1 -0
  66. package/public/assets/bg-set/brand-logos/Slack2.svg +1 -0
  67. package/public/assets/bg-set/brand-logos/YouTube.svg +1 -0
  68. package/public/assets/bg-set/brand-logos/YouTube2.svg +1 -0
  69. package/public/assets/bg-set/pattern/Size=lg, Type=Waves Rays2.svg +1 -0
  70. package/public/assets/bg-set/pattern/Size=md, Type=Waves Rays2.svg +1 -0
  71. package/public/assets/bg-set/pattern/Size=sm, Type=Waves Rays2.svg +1 -0
  72. package/public/assets/bg-set/pattern/Size=xl, Type=Waves Rays2.svg +1 -0
  73. package/public/assets/bg-set/pattern/Size=xs, Type=Waves Rays2.svg +1 -0
  74. package/public/assets/icon-set/Icon-add-circle-fill.svg +1 -0
  75. package/public/assets/icon-set/Icon-calendar-fill.svg +1 -0
  76. package/public/assets/icon-set/Icon-chat-1-fill.svg +1 -0
  77. package/public/assets/icon-set/Icon-download-2-fill.svg +1 -0
  78. package/public/assets/icon-set/Icon-home-fill.svg +1 -0
  79. package/public/assets/icon-set/Icon-mic-fill.svg +1 -0
  80. package/public/assets/icon-set/Icon-settings-3-fill.svg +1 -0
  81. package/public/assets/icon-set/Icon-settings-fill.svg +1 -0
  82. package/public/assets/icon-set/Icon-settings-line.svg +1 -0
@@ -0,0 +1,185 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { AriaTextFieldProps } from '@react-aria/textfield';
3
+ import React__default from 'react';
4
+ export { ActionButtons, ActionButtonsProps, BrandType, Icon, IconName, IconNames, IconProps, Layout, LayoutProps, NavHorizontal, NavHorizontalProps, NavVertical, NavVerticalProps, PaneMenus, PaneMenusProps, PaneSectionHeader, PaneSectionHeaderProps, ServiceBrand, ServiceIcon, ServiceIconProps, WorkflowStatusCard, WorkflowStatusCardProps } from './layout/index.js';
5
+ import { AriaButtonProps } from '@react-aria/button';
6
+ export { GlobalStyle, darkTheme, lightTheme, tokens } from './theme/index.js';
7
+ export { A as Action, c as ActionVariant, d as Actions, a as ActionsLayout, b as ActionsProps, f as AgentState, e as AgentStateProps, q as AssistantMessage, m as AssistantMessageProps, i as Button, B as ButtonProps, g as ButtonSize, h as ButtonVariant, w as CopilotUserMessage, U as CopilotUserMessageProps, r as FileAttachment, n as FileAttachmentProps, j as Footer, F as FooterProps, k as Header, H as HeaderProps, l as Input, I as InputProps, M as Message, s as Messages, t as MessagesList, u as MessagesListContainer, v as MessagesListContent, o as MessagesListProps, p as MessagesProps, x as Response, R as ResponseProps, y as Suggestions, S as SuggestionsProps, z as Window, W as WindowProps } from './Window-B6e_UfLV.js';
8
+ export { FacebookIcon, FacebookIconProps, FacebookIconVariant, GmailIcon, GmailIconProps, GmailIconVariant, InstagramIcon, InstagramIconProps, InstagramVariant, LinkedInIcon, LinkedInIconProps, LinkedInIconVariant, RedditIcon, RedditIconProps, RedditIconVariant, SlackIcon, SlackIconProps, SlackIconVariant, TelegramIcon, TelegramIconProps, TelegramIconVariant, WhatsAppIcon, WhatsAppIconProps, WhatsAppIconVariant, XIcon, XIconProps, XIconVariant, YouTubeIcon, YouTubeIconProps, YouTubeIconVariant } from './icons/index.js';
9
+ import './index.d-DYU1eVeb.js';
10
+ import 'styled-components';
11
+ import 'styled-components/dist/types';
12
+
13
+ interface AssistantThinkingProps {
14
+ message?: string;
15
+ className?: string;
16
+ ariaLabel?: string;
17
+ }
18
+ declare function AssistantThinking({ message, className, ariaLabel, }: AssistantThinkingProps): react_jsx_runtime.JSX.Element;
19
+ declare namespace AssistantThinking {
20
+ var displayName: string;
21
+ }
22
+
23
+ interface Suggestion {
24
+ /** The text content of the suggestion */
25
+ text: string;
26
+ }
27
+ interface ChatInputProps extends Omit<AriaTextFieldProps, 'onChange'> {
28
+ /** Array of suggestion items to display above the input */
29
+ suggestions?: Suggestion[];
30
+ /** Callback when a suggestion is selected */
31
+ onSuggestionSelect?: (suggestion: string) => void;
32
+ /** Current message value */
33
+ value?: string;
34
+ /** Callback when message value changes */
35
+ onChange?: (value: string) => void;
36
+ /** Callback when message is submitted */
37
+ onSubmit?: (message: string) => void;
38
+ /** Placeholder text */
39
+ placeholder?: string;
40
+ /** Whether the input is disabled */
41
+ isDisabled?: boolean;
42
+ /** Whether the input is read-only */
43
+ isReadOnly?: boolean;
44
+ /** Whether to auto-focus the input */
45
+ autoFocus?: boolean;
46
+ /** Additional CSS class name */
47
+ className?: string;
48
+ /** ARIA label for the input */
49
+ 'aria-label'?: string;
50
+ }
51
+ /**
52
+ * ChatInput component with minimal pill-shaped suggestion buttons
53
+ *
54
+ * Features:
55
+ * - Horizontal pill-shaped suggestion buttons with minimal design
56
+ * - Single-line input with submit button
57
+ * - React ARIA for accessibility
58
+ * - Keyboard navigation support
59
+ * - Clean, modern design matching vendor image
60
+ *
61
+ * @example
62
+ * ```tsx
63
+ * <ChatInput
64
+ * suggestions={[
65
+ * { text: "Create in-depth analysis" },
66
+ * { text: "Identify actionable tasks" }
67
+ * ]}
68
+ * placeholder="Ask, write or search for anything..."
69
+ * onSubmit={(message) => console.log(message)}
70
+ * onSuggestionSelect={(suggestion) => console.log(suggestion)}
71
+ * />
72
+ * ```
73
+ */
74
+ declare const ChatInput: React__default.FC<ChatInputProps>;
75
+
76
+ interface NotificationItem {
77
+ /** Unique identifier for the item */
78
+ id: string;
79
+ /** The text content of the notification */
80
+ text: string;
81
+ /** Optional icon (can be emoji, SVG, or icon component) */
82
+ icon?: React__default.ReactNode;
83
+ /** Icon background color (for colored icons like Slack, Google Sheets) */
84
+ iconColor?: string;
85
+ /** Whether this item is currently selected/active */
86
+ isSelected?: boolean;
87
+ }
88
+ interface NotificationSection {
89
+ /** Section title (e.g., "Today", "Yesterday") */
90
+ title: string;
91
+ /** Whether the section is initially collapsed */
92
+ isCollapsed?: boolean;
93
+ /** Array of notification items in this section */
94
+ items: NotificationItem[];
95
+ }
96
+ interface NotificationCardProps {
97
+ /** Array of notification sections */
98
+ sections: NotificationSection[];
99
+ /** Callback when an item is clicked */
100
+ onItemClick?: (item: NotificationItem) => void;
101
+ /** Currently selected item ID */
102
+ selectedItemId?: string;
103
+ /** Callback when menu button is clicked (three-dot menu) */
104
+ onMenuClick?: (item: NotificationItem) => void;
105
+ /** Additional CSS class name */
106
+ className?: string;
107
+ /** ARIA label for the notification card */
108
+ 'aria-label'?: string;
109
+ }
110
+ /**
111
+ * NotificationCard component with collapsible sections
112
+ *
113
+ * Features:
114
+ * - Date-based sections with collapsible headers
115
+ * - Different item states (default, selected)
116
+ * - Icon variants (circle icon, colored app icons)
117
+ * - Three-dot menu on selected items
118
+ * - React ARIA for accessibility
119
+ * - Full keyboard navigation support
120
+ * - Clean design matching vendor image
121
+ *
122
+ * @example
123
+ * ```tsx
124
+ * <NotificationCard
125
+ * sections={[
126
+ * {
127
+ * title: "Today",
128
+ * items: [
129
+ * { id: "1", text: "Help me write a professional email." },
130
+ * { id: "2", text: "Write a letter to the work chat", icon: "💬", iconColor: "#4A90E2" }
131
+ * ]
132
+ * },
133
+ * {
134
+ * title: "Yesterday",
135
+ * items: [
136
+ * { id: "3", text: "Generate a 3D scene of robots", isSelected: true }
137
+ * ]
138
+ * }
139
+ * ]}
140
+ * selectedItemId="3"
141
+ * onItemClick={(item) => console.log(item)}
142
+ * onMenuClick={(item) => console.log("Menu clicked", item)}
143
+ * />
144
+ * ```
145
+ */
146
+ declare const NotificationCard: React__default.FC<NotificationCardProps>;
147
+
148
+ interface UserMessageProps extends AriaButtonProps {
149
+ /**
150
+ * The message text to display
151
+ */
152
+ children: React.ReactNode;
153
+ /**
154
+ * Additional CSS class name
155
+ */
156
+ className?: string;
157
+ /**
158
+ * Whether the message is in a pressed state
159
+ */
160
+ isPressed?: boolean;
161
+ /**
162
+ * Optional click handler
163
+ */
164
+ onPress?: () => void;
165
+ }
166
+ /**
167
+ * UserMessage component - Displays a user message in a gradient pill
168
+ *
169
+ * This component renders a user message with a purple-to-blue gradient background,
170
+ * pill-shaped design with fully rounded ends, and white text. It uses React ARIA
171
+ * for accessibility and supports keyboard navigation.
172
+ *
173
+ * @example
174
+ * ```tsx
175
+ * <UserMessage onPress={() => console.log('clicked')}>
176
+ * Can you export this as a CSV?
177
+ * </UserMessage>
178
+ * ```
179
+ */
180
+ declare function UserMessage({ children, className, isPressed, onPress, ...ariaProps }: UserMessageProps): react_jsx_runtime.JSX.Element;
181
+ declare namespace UserMessage {
182
+ var displayName: string;
183
+ }
184
+
185
+ export { AssistantThinking, type AssistantThinkingProps, ChatInput, type ChatInputProps, NotificationCard, type NotificationCardProps, UserMessage, type UserMessageProps };
package/dist/index.js ADDED
@@ -0,0 +1,358 @@
1
+ export { FacebookIcon, GmailIcon, InstagramIcon, LinkedInIcon, RedditIcon, SlackIcon, TelegramIcon, WhatsAppIcon, XIcon, YouTubeIcon } from './chunk-PAOXD7DF.js';
2
+ export { ActionButtons, Icon, IconNames, Layout, NavHorizontal, NavVertical, PaneMenus, PaneSectionHeader, ServiceIcon, WorkflowStatusCard } from './chunk-MNXQDDWP.js';
3
+ export { Actions, AgentState, AssistantMessage, AssistantThinking, Button, ChatInput, UserMessage2 as CopilotUserMessage, FileAttachment, Footer, Header, Input, Messages, MessagesList, MessagesListContainer, MessagesListContent, Response, Suggestions, UserMessage, Window } from './chunk-CNVJ5UF2.js';
4
+ export { GlobalStyle, darkTheme, lightTheme, tokens } from './chunk-JQ6Q7MDQ.js';
5
+ import { useButton } from '@react-aria/button';
6
+ import { useState, useRef } from 'react';
7
+ import styled from 'styled-components';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ var NotificationCardContainer = styled.div`
11
+ display: flex;
12
+ flex-direction: column;
13
+ width: 100%;
14
+ max-width: 600px;
15
+ padding: 20px;
16
+ background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
17
+ border-radius: 20px;
18
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
19
+ gap: 12px;
20
+ `;
21
+ var SectionHeader = styled.button`
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: space-between;
25
+ width: 100%;
26
+ padding: 8px 4px;
27
+ border: none;
28
+ background: transparent;
29
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
30
+ 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
31
+ font-size: 16px;
32
+ font-weight: 700;
33
+ color: #2c3e50;
34
+ text-align: left;
35
+ cursor: pointer;
36
+ transition: all 0.2s ease;
37
+
38
+ &:hover {
39
+ color: #1a252f;
40
+ }
41
+
42
+ &:focus-visible {
43
+ outline: 2px solid #5b9fff;
44
+ outline-offset: 2px;
45
+ border-radius: 8px;
46
+ }
47
+ `;
48
+ var ChevronIcon = styled.span`
49
+ display: inline-flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ transition: transform 0.2s ease;
53
+ color: #6c757d;
54
+
55
+ ${(props) => props.$isExpanded ? `
56
+ transform: rotate(0deg);
57
+ ` : `
58
+ transform: rotate(-90deg);
59
+ `}
60
+
61
+ svg {
62
+ width: 16px;
63
+ height: 16px;
64
+ }
65
+ `;
66
+ var SectionContent = styled.div`
67
+ display: flex;
68
+ flex-direction: column;
69
+ gap: 8px;
70
+ padding-left: 0;
71
+ margin-top: 4px;
72
+ `;
73
+ var NotificationItemWrapper = styled.button`
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 12px;
77
+ width: 100%;
78
+ padding: ${(props) => props.$isSelected ? "12px 16px" : "10px 12px"};
79
+ border: none;
80
+ cursor: pointer;
81
+ text-align: left;
82
+ transition: all 0.2s ease;
83
+ border-radius: ${(props) => props.$isSelected ? "12px" : "10px"};
84
+
85
+ /* Default state - transparent background */
86
+ background-color: ${(props) => props.$isSelected ? "#2c3e50" : "transparent"};
87
+
88
+ /* Hover state */
89
+ &:hover:not(:disabled) {
90
+ background-color: ${(props) => props.$isSelected ? "#1a252f" : "rgba(255, 255, 255, 0.5)"};
91
+ }
92
+
93
+ /* Active state */
94
+ &:active:not(:disabled) {
95
+ transform: scale(0.99);
96
+ }
97
+
98
+ /* Focus state */
99
+ &:focus-visible {
100
+ outline: 2px solid ${(props) => props.$isSelected ? "#ffffff" : "#5b9fff"};
101
+ outline-offset: 2px;
102
+ }
103
+
104
+ /* Disabled state */
105
+ &:disabled {
106
+ cursor: not-allowed;
107
+ opacity: 0.5;
108
+ }
109
+ `;
110
+ var ItemIcon = styled.span`
111
+ display: inline-flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ width: 24px;
115
+ height: 24px;
116
+ flex-shrink: 0;
117
+ border-radius: ${(props) => props.$hasCustomIcon ? "6px" : "50%"};
118
+ background-color: ${(props) => props.$iconColor || "transparent"};
119
+ color: ${(props) => props.$hasCustomIcon ? "#ffffff" : "#6c757d"};
120
+ font-size: ${(props) => props.$hasCustomIcon ? "16px" : "14px"};
121
+
122
+ /* Default circle icon styling */
123
+ ${(props) => !props.$hasCustomIcon && `
124
+ svg {
125
+ width: 20px;
126
+ height: 20px;
127
+ }
128
+ `}
129
+
130
+ /* Custom icon (emoji or colored icon) styling */
131
+ ${(props) => props.$hasCustomIcon && `
132
+ padding: 2px;
133
+ `}
134
+ `;
135
+ var ItemText = styled.span`
136
+ flex: 1;
137
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
138
+ 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
139
+ font-size: 15px;
140
+ font-weight: ${(props) => props.$isSelected ? "500" : "400"};
141
+ color: ${(props) => props.$isSelected ? "#ffffff" : "#5a5a5a"};
142
+ line-height: 1.5;
143
+ word-wrap: break-word;
144
+ `;
145
+ var MenuButton = styled.button`
146
+ display: inline-flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ width: 32px;
150
+ height: 32px;
151
+ padding: 0;
152
+ border: none;
153
+ border-radius: 6px;
154
+ background-color: transparent;
155
+ color: #ffffff;
156
+ cursor: pointer;
157
+ transition: all 0.2s ease;
158
+ flex-shrink: 0;
159
+
160
+ &:hover:not(:disabled) {
161
+ background-color: rgba(255, 255, 255, 0.15);
162
+ }
163
+
164
+ &:active:not(:disabled) {
165
+ background-color: rgba(255, 255, 255, 0.25);
166
+ transform: scale(0.95);
167
+ }
168
+
169
+ &:focus-visible {
170
+ outline: 2px solid #ffffff;
171
+ outline-offset: 2px;
172
+ }
173
+
174
+ svg {
175
+ width: 20px;
176
+ height: 20px;
177
+ }
178
+ `;
179
+ var NotificationCard = ({
180
+ sections,
181
+ onItemClick,
182
+ selectedItemId,
183
+ onMenuClick,
184
+ className,
185
+ "aria-label": ariaLabel = "Notification history"
186
+ }) => {
187
+ const [collapsedSections, setCollapsedSections] = useState(() => {
188
+ const initial = {};
189
+ for (const section of sections) {
190
+ initial[section.title] = section.isCollapsed || false;
191
+ }
192
+ return initial;
193
+ });
194
+ const toggleSection = (sectionTitle) => {
195
+ setCollapsedSections((prev) => ({
196
+ ...prev,
197
+ [sectionTitle]: !prev[sectionTitle]
198
+ }));
199
+ };
200
+ return /* @__PURE__ */ jsx(NotificationCardContainer, { className, "aria-label": ariaLabel, role: "region", children: sections.map((section) => /* @__PURE__ */ jsx(
201
+ SectionComponent,
202
+ {
203
+ section,
204
+ isCollapsed: collapsedSections[section.title] ?? false,
205
+ onToggle: () => toggleSection(section.title),
206
+ onItemClick,
207
+ selectedItemId,
208
+ onMenuClick
209
+ },
210
+ section.title
211
+ )) });
212
+ };
213
+ var SectionComponent = ({
214
+ section,
215
+ isCollapsed,
216
+ onToggle,
217
+ onItemClick,
218
+ selectedItemId,
219
+ onMenuClick
220
+ }) => {
221
+ const headerRef = useRef(null);
222
+ const { buttonProps } = useButton(
223
+ {
224
+ onPress: onToggle,
225
+ "aria-label": `${section.title} section, ${isCollapsed ? "collapsed" : "expanded"}`,
226
+ "aria-expanded": !isCollapsed
227
+ },
228
+ headerRef
229
+ );
230
+ return /* @__PURE__ */ jsxs("section", { "aria-label": `${section.title} notifications`, children: [
231
+ /* @__PURE__ */ jsxs(SectionHeader, { ...buttonProps, ref: headerRef, children: [
232
+ section.title,
233
+ /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: !isCollapsed, "aria-hidden": "true", children: /* @__PURE__ */ jsxs(
234
+ "svg",
235
+ {
236
+ width: "16",
237
+ height: "16",
238
+ viewBox: "0 0 16 16",
239
+ fill: "none",
240
+ xmlns: "http://www.w3.org/2000/svg",
241
+ role: "img",
242
+ "aria-label": "Expand/collapse icon",
243
+ children: [
244
+ /* @__PURE__ */ jsx("title", { children: "Expand/collapse icon" }),
245
+ /* @__PURE__ */ jsx(
246
+ "path",
247
+ {
248
+ d: "M4 6L8 10L12 6",
249
+ stroke: "currentColor",
250
+ strokeWidth: "2",
251
+ strokeLinecap: "round",
252
+ strokeLinejoin: "round"
253
+ }
254
+ )
255
+ ]
256
+ }
257
+ ) })
258
+ ] }),
259
+ !isCollapsed && /* @__PURE__ */ jsx(SectionContent, { role: "list", children: section.items.map((item) => /* @__PURE__ */ jsx(
260
+ NotificationItemComponent,
261
+ {
262
+ item,
263
+ isSelected: item.id === selectedItemId,
264
+ onItemClick,
265
+ onMenuClick
266
+ },
267
+ item.id
268
+ )) })
269
+ ] });
270
+ };
271
+ var NotificationItemComponent = ({
272
+ item,
273
+ isSelected,
274
+ onItemClick,
275
+ onMenuClick
276
+ }) => {
277
+ const itemRef = useRef(null);
278
+ const menuRef = useRef(null);
279
+ const { buttonProps: itemButtonProps } = useButton(
280
+ {
281
+ onPress: () => onItemClick?.(item),
282
+ "aria-label": `Notification: ${item.text}`,
283
+ "aria-current": isSelected ? "true" : void 0
284
+ },
285
+ itemRef
286
+ );
287
+ const { buttonProps: menuButtonProps } = useButton(
288
+ {
289
+ onPress: () => onMenuClick?.(item),
290
+ "aria-label": `Options for ${item.text}`
291
+ },
292
+ menuRef
293
+ );
294
+ const handleItemKeyDown = (e) => {
295
+ if (isSelected && e.key === "Tab" && !e.shiftKey) {
296
+ return;
297
+ }
298
+ };
299
+ return /* @__PURE__ */ jsxs(
300
+ NotificationItemWrapper,
301
+ {
302
+ ...itemButtonProps,
303
+ ref: itemRef,
304
+ $isSelected: isSelected,
305
+ $hasIcon: !!item.icon,
306
+ role: "listitem",
307
+ onKeyDown: handleItemKeyDown,
308
+ children: [
309
+ /* @__PURE__ */ jsx(ItemIcon, { $iconColor: item.iconColor, $hasCustomIcon: !!item.icon, children: item.icon || /* @__PURE__ */ jsx(
310
+ "svg",
311
+ {
312
+ width: "20",
313
+ height: "20",
314
+ viewBox: "0 0 20 20",
315
+ fill: "none",
316
+ xmlns: "http://www.w3.org/2000/svg",
317
+ "aria-hidden": "true",
318
+ children: /* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "8", stroke: "currentColor", strokeWidth: "2" })
319
+ }
320
+ ) }),
321
+ /* @__PURE__ */ jsx(ItemText, { $isSelected: isSelected, children: item.text }),
322
+ isSelected && onMenuClick && /* @__PURE__ */ jsx(
323
+ MenuButton,
324
+ {
325
+ ...menuButtonProps,
326
+ ref: menuRef,
327
+ onClick: (e) => {
328
+ e.stopPropagation();
329
+ menuButtonProps.onClick?.(e);
330
+ },
331
+ children: /* @__PURE__ */ jsxs(
332
+ "svg",
333
+ {
334
+ width: "20",
335
+ height: "20",
336
+ viewBox: "0 0 20 20",
337
+ fill: "none",
338
+ xmlns: "http://www.w3.org/2000/svg",
339
+ "aria-hidden": "true",
340
+ children: [
341
+ /* @__PURE__ */ jsx("title", { children: "More options" }),
342
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "4", r: "1.5", fill: "currentColor" }),
343
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "1.5", fill: "currentColor" }),
344
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "16", r: "1.5", fill: "currentColor" })
345
+ ]
346
+ }
347
+ )
348
+ }
349
+ )
350
+ ]
351
+ }
352
+ );
353
+ };
354
+ NotificationCard.displayName = "NotificationCard";
355
+
356
+ export { NotificationCard };
357
+ //# sourceMappingURL=index.js.map
358
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/NotificationCard/NotificationCard.styles.ts","../src/components/NotificationCard/NotificationCard.tsx"],"names":[],"mappings":";;;;;;;;;AAKO,IAAM,4BAA4B,MAAA,CAAO,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAezC,IAAM,gBAAgB,MAAA,CAAO,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;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AAG,GAAA,EAAI,CAAA,EAAE,KAAA,EAAM,IAAA,EAAK,cAAA,EAAe,CAAA;AAAA,kCACnD,GAAA,CAAC,YAAO,EAAA,EAAG,IAAA,EAAK,IAAG,IAAA,EAAK,CAAA,EAAE,KAAA,EAAM,IAAA,EAAK,cAAA,EAAe,CAAA;AAAA,kCACpD,GAAA,CAAC,YAAO,EAAA,EAAG,IAAA,EAAK,IAAG,IAAA,EAAK,CAAA,EAAE,KAAA,EAAM,IAAA,EAAK,cAAA,EAAe;AAAA;AAAA;AAAA;AACtD;AAAA;AACF;AAAA;AAAA,GAEJ;AAEJ,CAAA;AAEA,gBAAA,CAAiB,WAAA,GAAc,kBAAA","file":"index.js","sourcesContent":["import styled from 'styled-components';\n\n/**\n * Main container for the notification card with light gradient background\n */\nexport const NotificationCardContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 600px;\n padding: 20px;\n background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);\n border-radius: 20px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n gap: 12px;\n`;\n\n/**\n * Section header button (collapsible)\n */\nexport const SectionHeader = styled.button`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 8px 4px;\n border: none;\n background: transparent;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',\n 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-size: 16px;\n font-weight: 700;\n color: #2c3e50;\n text-align: left;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover {\n color: #1a252f;\n }\n\n &:focus-visible {\n outline: 2px solid #5b9fff;\n outline-offset: 2px;\n border-radius: 8px;\n }\n`;\n\n/**\n * Chevron icon for section header with rotation animation\n */\ninterface ChevronIconProps {\n $isExpanded: boolean;\n}\n\nexport const ChevronIcon = styled.span<ChevronIconProps>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.2s ease;\n color: #6c757d;\n\n ${(props) =>\n props.$isExpanded\n ? `\n transform: rotate(0deg);\n `\n : `\n transform: rotate(-90deg);\n `}\n\n svg {\n width: 16px;\n height: 16px;\n }\n`;\n\n/**\n * Container for section content (list of notification items)\n */\nexport const SectionContent = styled.div`\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding-left: 0;\n margin-top: 4px;\n`;\n\n/**\n * Individual notification item wrapper (button)\n */\ninterface NotificationItemWrapperProps {\n $isSelected: boolean;\n $hasIcon: boolean;\n}\n\nexport const NotificationItemWrapper = styled.button<NotificationItemWrapperProps>`\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: ${(props) => (props.$isSelected ? '12px 16px' : '10px 12px')};\n border: none;\n cursor: pointer;\n text-align: left;\n transition: all 0.2s ease;\n border-radius: ${(props) => (props.$isSelected ? '12px' : '10px')};\n\n /* Default state - transparent background */\n background-color: ${(props) => (props.$isSelected ? '#2c3e50' : 'transparent')};\n\n /* Hover state */\n &:hover:not(:disabled) {\n background-color: ${(props) => (props.$isSelected ? '#1a252f' : 'rgba(255, 255, 255, 0.5)')};\n }\n\n /* Active state */\n &:active:not(:disabled) {\n transform: scale(0.99);\n }\n\n /* Focus state */\n &:focus-visible {\n outline: 2px solid ${(props) => (props.$isSelected ? '#ffffff' : '#5b9fff')};\n outline-offset: 2px;\n }\n\n /* Disabled state */\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n`;\n\n/**\n * Icon container for notification items\n */\ninterface ItemIconProps {\n $iconColor?: string;\n $hasCustomIcon: boolean;\n}\n\nexport const ItemIcon = styled.span<ItemIconProps>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n border-radius: ${(props) => (props.$hasCustomIcon ? '6px' : '50%')};\n background-color: ${(props) => props.$iconColor || 'transparent'};\n color: ${(props) => (props.$hasCustomIcon ? '#ffffff' : '#6c757d')};\n font-size: ${(props) => (props.$hasCustomIcon ? '16px' : '14px')};\n\n /* Default circle icon styling */\n ${(props) =>\n !props.$hasCustomIcon &&\n `\n svg {\n width: 20px;\n height: 20px;\n }\n `}\n\n /* Custom icon (emoji or colored icon) styling */\n ${(props) =>\n props.$hasCustomIcon &&\n `\n padding: 2px;\n `}\n`;\n\n/**\n * Text content for notification items\n */\ninterface ItemTextProps {\n $isSelected: boolean;\n}\n\nexport const ItemText = styled.span<ItemTextProps>`\n flex: 1;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',\n 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-size: 15px;\n font-weight: ${(props) => (props.$isSelected ? '500' : '400')};\n color: ${(props) => (props.$isSelected ? '#ffffff' : '#5a5a5a')};\n line-height: 1.5;\n word-wrap: break-word;\n`;\n\n/**\n * Three-dot menu button (shown on selected items)\n */\nexport const MenuButton = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 6px;\n background-color: transparent;\n color: #ffffff;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n\n &:hover:not(:disabled) {\n background-color: rgba(255, 255, 255, 0.15);\n }\n\n &:active:not(:disabled) {\n background-color: rgba(255, 255, 255, 0.25);\n transform: scale(0.95);\n }\n\n &:focus-visible {\n outline: 2px solid #ffffff;\n outline-offset: 2px;\n }\n\n svg {\n width: 20px;\n height: 20px;\n }\n`;\n","import { useButton } from '@react-aria/button';\nimport React, { type KeyboardEvent, useRef, useState } from 'react';\nimport {\n ChevronIcon,\n ItemIcon,\n ItemText,\n MenuButton,\n NotificationCardContainer,\n NotificationItemWrapper,\n SectionContent,\n SectionHeader,\n} from './NotificationCard.styles';\n\nexport interface NotificationItem {\n /** Unique identifier for the item */\n id: string;\n /** The text content of the notification */\n text: string;\n /** Optional icon (can be emoji, SVG, or icon component) */\n icon?: React.ReactNode;\n /** Icon background color (for colored icons like Slack, Google Sheets) */\n iconColor?: string;\n /** Whether this item is currently selected/active */\n isSelected?: boolean;\n}\n\nexport interface NotificationSection {\n /** Section title (e.g., \"Today\", \"Yesterday\") */\n title: string;\n /** Whether the section is initially collapsed */\n isCollapsed?: boolean;\n /** Array of notification items in this section */\n items: NotificationItem[];\n}\n\nexport interface NotificationCardProps {\n /** Array of notification sections */\n sections: NotificationSection[];\n /** Callback when an item is clicked */\n onItemClick?: (item: NotificationItem) => void;\n /** Currently selected item ID */\n selectedItemId?: string;\n /** Callback when menu button is clicked (three-dot menu) */\n onMenuClick?: (item: NotificationItem) => void;\n /** Additional CSS class name */\n className?: string;\n /** ARIA label for the notification card */\n 'aria-label'?: string;\n}\n\n/**\n * NotificationCard component with collapsible sections\n *\n * Features:\n * - Date-based sections with collapsible headers\n * - Different item states (default, selected)\n * - Icon variants (circle icon, colored app icons)\n * - Three-dot menu on selected items\n * - React ARIA for accessibility\n * - Full keyboard navigation support\n * - Clean design matching vendor image\n *\n * @example\n * ```tsx\n * <NotificationCard\n * sections={[\n * {\n * title: \"Today\",\n * items: [\n * { id: \"1\", text: \"Help me write a professional email.\" },\n * { id: \"2\", text: \"Write a letter to the work chat\", icon: \"💬\", iconColor: \"#4A90E2\" }\n * ]\n * },\n * {\n * title: \"Yesterday\",\n * items: [\n * { id: \"3\", text: \"Generate a 3D scene of robots\", isSelected: true }\n * ]\n * }\n * ]}\n * selectedItemId=\"3\"\n * onItemClick={(item) => console.log(item)}\n * onMenuClick={(item) => console.log(\"Menu clicked\", item)}\n * />\n * ```\n */\nexport const NotificationCard: React.FC<NotificationCardProps> = ({\n sections,\n onItemClick,\n selectedItemId,\n onMenuClick,\n className,\n 'aria-label': ariaLabel = 'Notification history',\n}) => {\n // Track collapsed state for each section\n const [collapsedSections, setCollapsedSections] = useState<Record<string, boolean>>(() => {\n const initial: Record<string, boolean> = {};\n for (const section of sections) {\n initial[section.title] = section.isCollapsed || false;\n }\n return initial;\n });\n\n const toggleSection = (sectionTitle: string) => {\n setCollapsedSections((prev) => ({\n ...prev,\n [sectionTitle]: !prev[sectionTitle],\n }));\n };\n\n return (\n <NotificationCardContainer className={className} aria-label={ariaLabel} role=\"region\">\n {sections.map((section) => (\n <SectionComponent\n key={section.title}\n section={section}\n isCollapsed={collapsedSections[section.title] ?? false}\n onToggle={() => toggleSection(section.title)}\n onItemClick={onItemClick}\n selectedItemId={selectedItemId}\n onMenuClick={onMenuClick}\n />\n ))}\n </NotificationCardContainer>\n );\n};\n\n/**\n * Individual section component with collapsible header\n */\ninterface SectionComponentProps {\n section: NotificationSection;\n isCollapsed: boolean;\n onToggle: () => void;\n onItemClick?: (item: NotificationItem) => void;\n selectedItemId?: string;\n onMenuClick?: (item: NotificationItem) => void;\n}\n\nconst SectionComponent: React.FC<SectionComponentProps> = ({\n section,\n isCollapsed,\n onToggle,\n onItemClick,\n selectedItemId,\n onMenuClick,\n}) => {\n const headerRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n onPress: onToggle,\n 'aria-label': `${section.title} section, ${isCollapsed ? 'collapsed' : 'expanded'}`,\n 'aria-expanded': !isCollapsed,\n },\n headerRef\n );\n\n return (\n <section aria-label={`${section.title} notifications`}>\n <SectionHeader {...buttonProps} ref={headerRef}>\n {section.title}\n <ChevronIcon $isExpanded={!isCollapsed} aria-hidden=\"true\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n aria-label=\"Expand/collapse icon\"\n >\n <title>Expand/collapse icon</title>\n <path\n d=\"M4 6L8 10L12 6\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </ChevronIcon>\n </SectionHeader>\n\n {!isCollapsed && (\n <SectionContent role=\"list\">\n {section.items.map((item) => (\n <NotificationItemComponent\n key={item.id}\n item={item}\n isSelected={item.id === selectedItemId}\n onItemClick={onItemClick}\n onMenuClick={onMenuClick}\n />\n ))}\n </SectionContent>\n )}\n </section>\n );\n};\n\n/**\n * Individual notification item component\n */\ninterface NotificationItemComponentProps {\n item: NotificationItem;\n isSelected: boolean;\n onItemClick?: (item: NotificationItem) => void;\n onMenuClick?: (item: NotificationItem) => void;\n}\n\nconst NotificationItemComponent: React.FC<NotificationItemComponentProps> = ({\n item,\n isSelected,\n onItemClick,\n onMenuClick,\n}) => {\n const itemRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLButtonElement>(null);\n\n const { buttonProps: itemButtonProps } = useButton(\n {\n onPress: () => onItemClick?.(item),\n 'aria-label': `Notification: ${item.text}`,\n 'aria-current': isSelected ? 'true' : undefined,\n },\n itemRef\n );\n\n const { buttonProps: menuButtonProps } = useButton(\n {\n onPress: () => onMenuClick?.(item),\n 'aria-label': `Options for ${item.text}`,\n },\n menuRef\n );\n\n // Handle keyboard navigation between item and menu button\n const handleItemKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {\n if (isSelected && e.key === 'Tab' && !e.shiftKey) {\n // Allow natural tab to menu button\n return;\n }\n };\n\n return (\n <NotificationItemWrapper\n {...itemButtonProps}\n ref={itemRef}\n $isSelected={isSelected}\n $hasIcon={!!item.icon}\n role=\"listitem\"\n onKeyDown={handleItemKeyDown}\n >\n <ItemIcon $iconColor={item.iconColor} $hasCustomIcon={!!item.icon}>\n {item.icon || (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"10\" cy=\"10\" r=\"8\" stroke=\"currentColor\" strokeWidth=\"2\" />\n </svg>\n )}\n </ItemIcon>\n <ItemText $isSelected={isSelected}>{item.text}</ItemText>\n {isSelected && onMenuClick && (\n <MenuButton\n {...menuButtonProps}\n ref={menuRef}\n onClick={(e) => {\n e.stopPropagation();\n menuButtonProps.onClick?.(e);\n }}\n >\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <title>More options</title>\n <circle cx=\"10\" cy=\"4\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"10\" cy=\"10\" r=\"1.5\" fill=\"currentColor\" />\n <circle cx=\"10\" cy=\"16\" r=\"1.5\" fill=\"currentColor\" />\n </svg>\n </MenuButton>\n )}\n </NotificationItemWrapper>\n );\n};\n\nNotificationCard.displayName = 'NotificationCard';\n"]}
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ var chunkKNSPBTTJ_cjs = require('../chunk-KNSPBTTJ.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "ActionButtons", {
8
+ enumerable: true,
9
+ get: function () { return chunkKNSPBTTJ_cjs.ActionButtons; }
10
+ });
11
+ Object.defineProperty(exports, "Icon", {
12
+ enumerable: true,
13
+ get: function () { return chunkKNSPBTTJ_cjs.Icon; }
14
+ });
15
+ Object.defineProperty(exports, "IconNames", {
16
+ enumerable: true,
17
+ get: function () { return chunkKNSPBTTJ_cjs.IconNames; }
18
+ });
19
+ Object.defineProperty(exports, "Layout", {
20
+ enumerable: true,
21
+ get: function () { return chunkKNSPBTTJ_cjs.Layout; }
22
+ });
23
+ Object.defineProperty(exports, "NavHorizontal", {
24
+ enumerable: true,
25
+ get: function () { return chunkKNSPBTTJ_cjs.NavHorizontal; }
26
+ });
27
+ Object.defineProperty(exports, "NavVertical", {
28
+ enumerable: true,
29
+ get: function () { return chunkKNSPBTTJ_cjs.NavVertical; }
30
+ });
31
+ Object.defineProperty(exports, "PaneMenus", {
32
+ enumerable: true,
33
+ get: function () { return chunkKNSPBTTJ_cjs.PaneMenus; }
34
+ });
35
+ Object.defineProperty(exports, "PaneSectionHeader", {
36
+ enumerable: true,
37
+ get: function () { return chunkKNSPBTTJ_cjs.PaneSectionHeader; }
38
+ });
39
+ Object.defineProperty(exports, "ServiceIcon", {
40
+ enumerable: true,
41
+ get: function () { return chunkKNSPBTTJ_cjs.ServiceIcon; }
42
+ });
43
+ Object.defineProperty(exports, "WorkflowStatusCard", {
44
+ enumerable: true,
45
+ get: function () { return chunkKNSPBTTJ_cjs.WorkflowStatusCard; }
46
+ });
47
+ //# sourceMappingURL=index.cjs.map
48
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}