qt-ui-kit 1.0.113 → 1.0.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import * as React from 'react';
3
+ import React__default, { ReactNode, ReactElement } from 'react';
3
4
 
4
5
  declare enum IntegrationService {
5
6
  SLACK = "slack",
@@ -74,7 +75,7 @@ interface PreviewBadgeData {
74
75
  type: BadgeType;
75
76
  label?: string;
76
77
  }
77
- type Props$8 = {
78
+ type Props$a = {
78
79
  eventID: string;
79
80
  onSelected?: (eventID: string) => void;
80
81
  selected?: boolean;
@@ -93,28 +94,28 @@ type Props$8 = {
93
94
  eventBadges?: PreviewBadgeData[];
94
95
  onOverride?: (eventID: string, selectedItem: string) => void;
95
96
  };
96
- declare function PreviewCard({ eventID, onSelected, selected, onChecked, checked, service, subjectLine, body, sender, source, date, onClickGoToSource, eventCategory, read, overrideItems, eventBadges, onOverride, }: Props$8): react_jsx_runtime.JSX.Element;
97
+ declare function PreviewCard({ eventID, onSelected, selected, onChecked, checked, service, subjectLine, body, sender, source, date, onClickGoToSource, eventCategory, read, overrideItems, eventBadges, onOverride, }: Props$a): react_jsx_runtime.JSX.Element;
97
98
 
98
99
  type NavButtonKey = "queue" | "account" | "logout";
99
100
  type NavButtonConfig$1 = {
100
101
  active?: boolean;
101
102
  onClick?: () => void;
102
103
  };
103
- type Props$7 = {
104
+ type Props$9 = {
104
105
  buttons?: Partial<Record<NavButtonKey, NavButtonConfig$1>>;
105
106
  };
106
- declare function NavBar({ buttons }: Props$7): react_jsx_runtime.JSX.Element;
107
+ declare function NavBar({ buttons }: Props$9): react_jsx_runtime.JSX.Element;
107
108
 
108
- type Props$6 = {
109
+ type Props$8 = {
109
110
  eventType?: EventType;
110
111
  eventData?: EventGroup[];
111
112
  groupUrgency?: UrgencyLevel;
112
113
  groupUrgencyText?: string;
113
114
  groupSummary?: string;
114
115
  };
115
- declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$6): react_jsx_runtime.JSX.Element;
116
+ declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$8): react_jsx_runtime.JSX.Element;
116
117
 
117
- type Props$5 = {
118
+ type Props$7 = {
118
119
  subjectLine?: string;
119
120
  to?: string;
120
121
  date?: string;
@@ -124,9 +125,9 @@ type Props$5 = {
124
125
  attachments?: string;
125
126
  body?: string;
126
127
  };
127
- declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$5): react_jsx_runtime.JSX.Element;
128
+ declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$7): react_jsx_runtime.JSX.Element;
128
129
 
129
- type Props$4 = {
130
+ type Props$6 = {
130
131
  messages?: ChatData[];
131
132
  };
132
133
  type ChatData = {
@@ -140,9 +141,9 @@ type ChatData = {
140
141
  images?: string[];
141
142
  emojis?: string[];
142
143
  };
143
- declare function ChatBody({ messages }: Props$4): react_jsx_runtime.JSX.Element;
144
+ declare function ChatBody({ messages }: Props$6): react_jsx_runtime.JSX.Element;
144
145
 
145
- type Props$3 = {
146
+ type Props$5 = {
146
147
  issueNumber?: string;
147
148
  notification?: string;
148
149
  project?: string;
@@ -157,13 +158,13 @@ type Props$3 = {
157
158
  description?: string;
158
159
  comments?: TicketComment[];
159
160
  };
160
- declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$3): react_jsx_runtime.JSX.Element;
161
+ declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$5): react_jsx_runtime.JSX.Element;
161
162
 
162
163
  type SearchResult = {
163
164
  label: string;
164
165
  count: number;
165
166
  };
166
- type Props$2 = {
167
+ type Props$4 = {
167
168
  loading?: boolean;
168
169
  results?: SearchResult[];
169
170
  initialText?: string;
@@ -171,7 +172,7 @@ type Props$2 = {
171
172
  /** Optional debounce for onUpdate calls (ms). Defaults to 250ms. */
172
173
  debounceMs?: number;
173
174
  };
174
- declare function SearchBar({ loading, results, initialText, onUpdate, debounceMs, }: Props$2): react_jsx_runtime.JSX.Element;
175
+ declare function SearchBar({ loading, results, initialText, onUpdate, debounceMs, }: Props$4): react_jsx_runtime.JSX.Element;
175
176
 
176
177
  type FilterButtonKey = "fires" | "insights" | "unread" | "done" | "more" | IntegrationService;
177
178
  type NavButtonConfig = {
@@ -180,19 +181,73 @@ type NavButtonConfig = {
180
181
  disabled?: boolean;
181
182
  count?: string | number;
182
183
  };
183
- type Props$1 = {
184
+ type Props$3 = {
184
185
  buttons?: Partial<Record<FilterButtonKey, NavButtonConfig>>;
185
186
  };
186
- declare function FilterBar({ buttons }: Props$1): react_jsx_runtime.JSX.Element;
187
+ declare function FilterBar({ buttons }: Props$3): react_jsx_runtime.JSX.Element;
187
188
 
188
189
  type IconSize = 16 | 20 | 24 | 36;
189
190
 
190
- type Props = {
191
+ type Props$2 = {
191
192
  size?: IconSize;
192
193
  className?: string;
193
194
  service?: IntegrationService;
194
195
  };
195
- declare function BrandIcon({ size, className, service }: Props): react_jsx_runtime.JSX.Element;
196
+ declare function BrandIcon({ size, className, service }: Props$2): react_jsx_runtime.JSX.Element;
197
+
198
+ type Props$1 = {
199
+ isOpen: boolean;
200
+ onClose: () => void;
201
+ children: ReactNode;
202
+ className?: string;
203
+ disableBackdropClick?: boolean;
204
+ disableEscapeKey?: boolean;
205
+ };
206
+ declare function Modal({ isOpen, onClose, children, className, disableBackdropClick, disableEscapeKey, }: Props$1): React.ReactPortal | null;
207
+
208
+ type ConfirmationVariant = "danger" | "primary" | "warning";
209
+ type Props = {
210
+ isOpen: boolean;
211
+ onClose: () => void;
212
+ onConfirm: () => void;
213
+ title: string;
214
+ message?: string | ReactNode;
215
+ confirmLabel?: string;
216
+ cancelLabel?: string;
217
+ variant?: ConfirmationVariant;
218
+ children?: ReactNode;
219
+ };
220
+ declare function ConfirmationModal({ isOpen, onClose, onConfirm, title, message, confirmLabel, cancelLabel, variant, children, }: Props): react_jsx_runtime.JSX.Element;
221
+
222
+ interface AccountInfoFieldProps {
223
+ label: string;
224
+ value?: string | null;
225
+ className?: string;
226
+ }
227
+ declare function AccountInfoField({ label, value, className, }: AccountInfoFieldProps): react_jsx_runtime.JSX.Element;
228
+
229
+ interface AccountInfoSectionProps {
230
+ title?: string;
231
+ children: ReactNode;
232
+ }
233
+ declare function AccountInfoSection({ title, children, }: AccountInfoSectionProps): react_jsx_runtime.JSX.Element;
234
+
235
+ interface AccountIntegrationCardItemProps {
236
+ name: string;
237
+ onDisconnect: () => void;
238
+ }
239
+ declare const AccountIntegrationCardItem: React__default.NamedExoticComponent<AccountIntegrationCardItemProps>;
240
+
241
+ interface AccountIntegrationCardProps {
242
+ integrationName: string;
243
+ onConnect: () => void;
244
+ disabled: boolean;
245
+ ready: boolean;
246
+ limit: number;
247
+ icon: ReactNode;
248
+ children?: ReactElement<typeof AccountIntegrationCardItem> | ReactElement<typeof AccountIntegrationCardItem>[];
249
+ }
250
+ declare const AccountIntegrationCard: React__default.NamedExoticComponent<Readonly<AccountIntegrationCardProps>>;
196
251
 
197
252
  declare enum EventState {
198
253
  NEW = "new",
@@ -284,4 +339,4 @@ type Event = {
284
339
 
285
340
  declare const fakeMessages: ChatData[];
286
341
 
287
- export { type Attachment, BaseIconName, BrandIcon, type CalendarData, ChatBody, type ChatData, ColorVariants, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, NavBar, PreviewCard, SearchBar, type SearchResult, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
342
+ export { AccountInfoField, AccountInfoSection, AccountIntegrationCard, AccountIntegrationCardItem, type Attachment, BaseIconName, BrandIcon, type CalendarData, ChatBody, type ChatData, ColorVariants, ConfirmationModal, type ConfirmationVariant, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, Modal, NavBar, PreviewCard, SearchBar, type SearchResult, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import * as React from 'react';
3
+ import React__default, { ReactNode, ReactElement } from 'react';
3
4
 
4
5
  declare enum IntegrationService {
5
6
  SLACK = "slack",
@@ -74,7 +75,7 @@ interface PreviewBadgeData {
74
75
  type: BadgeType;
75
76
  label?: string;
76
77
  }
77
- type Props$8 = {
78
+ type Props$a = {
78
79
  eventID: string;
79
80
  onSelected?: (eventID: string) => void;
80
81
  selected?: boolean;
@@ -93,28 +94,28 @@ type Props$8 = {
93
94
  eventBadges?: PreviewBadgeData[];
94
95
  onOverride?: (eventID: string, selectedItem: string) => void;
95
96
  };
96
- declare function PreviewCard({ eventID, onSelected, selected, onChecked, checked, service, subjectLine, body, sender, source, date, onClickGoToSource, eventCategory, read, overrideItems, eventBadges, onOverride, }: Props$8): react_jsx_runtime.JSX.Element;
97
+ declare function PreviewCard({ eventID, onSelected, selected, onChecked, checked, service, subjectLine, body, sender, source, date, onClickGoToSource, eventCategory, read, overrideItems, eventBadges, onOverride, }: Props$a): react_jsx_runtime.JSX.Element;
97
98
 
98
99
  type NavButtonKey = "queue" | "account" | "logout";
99
100
  type NavButtonConfig$1 = {
100
101
  active?: boolean;
101
102
  onClick?: () => void;
102
103
  };
103
- type Props$7 = {
104
+ type Props$9 = {
104
105
  buttons?: Partial<Record<NavButtonKey, NavButtonConfig$1>>;
105
106
  };
106
- declare function NavBar({ buttons }: Props$7): react_jsx_runtime.JSX.Element;
107
+ declare function NavBar({ buttons }: Props$9): react_jsx_runtime.JSX.Element;
107
108
 
108
- type Props$6 = {
109
+ type Props$8 = {
109
110
  eventType?: EventType;
110
111
  eventData?: EventGroup[];
111
112
  groupUrgency?: UrgencyLevel;
112
113
  groupUrgencyText?: string;
113
114
  groupSummary?: string;
114
115
  };
115
- declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$6): react_jsx_runtime.JSX.Element;
116
+ declare function EventCard({ eventType, eventData, groupUrgency, groupUrgencyText, groupSummary, }: Props$8): react_jsx_runtime.JSX.Element;
116
117
 
117
- type Props$5 = {
118
+ type Props$7 = {
118
119
  subjectLine?: string;
119
120
  to?: string;
120
121
  date?: string;
@@ -124,9 +125,9 @@ type Props$5 = {
124
125
  attachments?: string;
125
126
  body?: string;
126
127
  };
127
- declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$5): react_jsx_runtime.JSX.Element;
128
+ declare function EmailBody({ subjectLine, to, date, from, CC, BCC, attachments, body, }: Props$7): react_jsx_runtime.JSX.Element;
128
129
 
129
- type Props$4 = {
130
+ type Props$6 = {
130
131
  messages?: ChatData[];
131
132
  };
132
133
  type ChatData = {
@@ -140,9 +141,9 @@ type ChatData = {
140
141
  images?: string[];
141
142
  emojis?: string[];
142
143
  };
143
- declare function ChatBody({ messages }: Props$4): react_jsx_runtime.JSX.Element;
144
+ declare function ChatBody({ messages }: Props$6): react_jsx_runtime.JSX.Element;
144
145
 
145
- type Props$3 = {
146
+ type Props$5 = {
146
147
  issueNumber?: string;
147
148
  notification?: string;
148
149
  project?: string;
@@ -157,13 +158,13 @@ type Props$3 = {
157
158
  description?: string;
158
159
  comments?: TicketComment[];
159
160
  };
160
- declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$3): react_jsx_runtime.JSX.Element;
161
+ declare function TicketBody({ issueNumber, notification, project, task, dueDate, startDate, assignees, reporter, team, location, related, description, comments, }: Props$5): react_jsx_runtime.JSX.Element;
161
162
 
162
163
  type SearchResult = {
163
164
  label: string;
164
165
  count: number;
165
166
  };
166
- type Props$2 = {
167
+ type Props$4 = {
167
168
  loading?: boolean;
168
169
  results?: SearchResult[];
169
170
  initialText?: string;
@@ -171,7 +172,7 @@ type Props$2 = {
171
172
  /** Optional debounce for onUpdate calls (ms). Defaults to 250ms. */
172
173
  debounceMs?: number;
173
174
  };
174
- declare function SearchBar({ loading, results, initialText, onUpdate, debounceMs, }: Props$2): react_jsx_runtime.JSX.Element;
175
+ declare function SearchBar({ loading, results, initialText, onUpdate, debounceMs, }: Props$4): react_jsx_runtime.JSX.Element;
175
176
 
176
177
  type FilterButtonKey = "fires" | "insights" | "unread" | "done" | "more" | IntegrationService;
177
178
  type NavButtonConfig = {
@@ -180,19 +181,73 @@ type NavButtonConfig = {
180
181
  disabled?: boolean;
181
182
  count?: string | number;
182
183
  };
183
- type Props$1 = {
184
+ type Props$3 = {
184
185
  buttons?: Partial<Record<FilterButtonKey, NavButtonConfig>>;
185
186
  };
186
- declare function FilterBar({ buttons }: Props$1): react_jsx_runtime.JSX.Element;
187
+ declare function FilterBar({ buttons }: Props$3): react_jsx_runtime.JSX.Element;
187
188
 
188
189
  type IconSize = 16 | 20 | 24 | 36;
189
190
 
190
- type Props = {
191
+ type Props$2 = {
191
192
  size?: IconSize;
192
193
  className?: string;
193
194
  service?: IntegrationService;
194
195
  };
195
- declare function BrandIcon({ size, className, service }: Props): react_jsx_runtime.JSX.Element;
196
+ declare function BrandIcon({ size, className, service }: Props$2): react_jsx_runtime.JSX.Element;
197
+
198
+ type Props$1 = {
199
+ isOpen: boolean;
200
+ onClose: () => void;
201
+ children: ReactNode;
202
+ className?: string;
203
+ disableBackdropClick?: boolean;
204
+ disableEscapeKey?: boolean;
205
+ };
206
+ declare function Modal({ isOpen, onClose, children, className, disableBackdropClick, disableEscapeKey, }: Props$1): React.ReactPortal | null;
207
+
208
+ type ConfirmationVariant = "danger" | "primary" | "warning";
209
+ type Props = {
210
+ isOpen: boolean;
211
+ onClose: () => void;
212
+ onConfirm: () => void;
213
+ title: string;
214
+ message?: string | ReactNode;
215
+ confirmLabel?: string;
216
+ cancelLabel?: string;
217
+ variant?: ConfirmationVariant;
218
+ children?: ReactNode;
219
+ };
220
+ declare function ConfirmationModal({ isOpen, onClose, onConfirm, title, message, confirmLabel, cancelLabel, variant, children, }: Props): react_jsx_runtime.JSX.Element;
221
+
222
+ interface AccountInfoFieldProps {
223
+ label: string;
224
+ value?: string | null;
225
+ className?: string;
226
+ }
227
+ declare function AccountInfoField({ label, value, className, }: AccountInfoFieldProps): react_jsx_runtime.JSX.Element;
228
+
229
+ interface AccountInfoSectionProps {
230
+ title?: string;
231
+ children: ReactNode;
232
+ }
233
+ declare function AccountInfoSection({ title, children, }: AccountInfoSectionProps): react_jsx_runtime.JSX.Element;
234
+
235
+ interface AccountIntegrationCardItemProps {
236
+ name: string;
237
+ onDisconnect: () => void;
238
+ }
239
+ declare const AccountIntegrationCardItem: React__default.NamedExoticComponent<AccountIntegrationCardItemProps>;
240
+
241
+ interface AccountIntegrationCardProps {
242
+ integrationName: string;
243
+ onConnect: () => void;
244
+ disabled: boolean;
245
+ ready: boolean;
246
+ limit: number;
247
+ icon: ReactNode;
248
+ children?: ReactElement<typeof AccountIntegrationCardItem> | ReactElement<typeof AccountIntegrationCardItem>[];
249
+ }
250
+ declare const AccountIntegrationCard: React__default.NamedExoticComponent<Readonly<AccountIntegrationCardProps>>;
196
251
 
197
252
  declare enum EventState {
198
253
  NEW = "new",
@@ -284,4 +339,4 @@ type Event = {
284
339
 
285
340
  declare const fakeMessages: ChatData[];
286
341
 
287
- export { type Attachment, BaseIconName, BrandIcon, type CalendarData, ChatBody, type ChatData, ColorVariants, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, NavBar, PreviewCard, SearchBar, type SearchResult, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
342
+ export { AccountInfoField, AccountInfoSection, AccountIntegrationCard, AccountIntegrationCardItem, type Attachment, BaseIconName, BrandIcon, type CalendarData, ChatBody, type ChatData, ColorVariants, ConfirmationModal, type ConfirmationVariant, EmailBody, type EmailData, type Event, EventCard, type EventData, type EventGroup, EventState, type EventSummaryParts, EventType, type ExternalPerson, FilterBar, type FilterButtonKey, type IconSize, IntegrationService, type MessageData, Modal, NavBar, PreviewCard, SearchBar, type SearchResult, TicketBody, type TicketComment, type TicketData, UrgencyLevel, fakeMessages };
package/dist/index.js CHANGED
@@ -11177,16 +11177,22 @@ var require_lib7 = __commonJS({
11177
11177
  // src/index.ts
11178
11178
  var index_exports = {};
11179
11179
  __export(index_exports, {
11180
+ AccountInfoField: () => AccountInfoField,
11181
+ AccountInfoSection: () => AccountInfoSection,
11182
+ AccountIntegrationCard: () => account_integration_card_default,
11183
+ AccountIntegrationCardItem: () => account_integration_card_item_default,
11180
11184
  BaseIconName: () => BaseIconName,
11181
11185
  BrandIcon: () => BrandIcon,
11182
11186
  ChatBody: () => ChatBody,
11183
11187
  ColorVariants: () => ColorVariants,
11188
+ ConfirmationModal: () => ConfirmationModal,
11184
11189
  EmailBody: () => EmailBody,
11185
11190
  EventCard: () => EventCard,
11186
11191
  EventState: () => EventState,
11187
11192
  EventType: () => EventType,
11188
11193
  FilterBar: () => FilterBar,
11189
11194
  IntegrationService: () => IntegrationService,
11195
+ Modal: () => Modal,
11190
11196
  NavBar: () => NavBar,
11191
11197
  PreviewCard: () => PreviewCard,
11192
11198
  SearchBar: () => SearchBar,
@@ -17455,6 +17461,238 @@ function FilterBar({ buttons }) {
17455
17461
  ] });
17456
17462
  }
17457
17463
 
17464
+ // src/components/molecules/modal/modal.tsx
17465
+ var import_react6 = require("react");
17466
+ var import_react_dom = require("react-dom");
17467
+ var import_clsx12 = __toESM(require("clsx"));
17468
+ var import_jsx_runtime46 = require("react/jsx-runtime");
17469
+ function Modal({
17470
+ isOpen,
17471
+ onClose,
17472
+ children,
17473
+ className,
17474
+ disableBackdropClick = false,
17475
+ disableEscapeKey = false
17476
+ }) {
17477
+ const modalRef = (0, import_react6.useRef)(null);
17478
+ const previousActiveElement = (0, import_react6.useRef)(null);
17479
+ (0, import_react6.useEffect)(() => {
17480
+ if (!isOpen || disableEscapeKey) return;
17481
+ const handleKeyDown = (e) => {
17482
+ if (e.key === "Escape") onClose();
17483
+ };
17484
+ document.addEventListener("keydown", handleKeyDown);
17485
+ return () => document.removeEventListener("keydown", handleKeyDown);
17486
+ }, [isOpen, onClose, disableEscapeKey]);
17487
+ (0, import_react6.useEffect)(() => {
17488
+ if (!isOpen) return;
17489
+ const originalOverflow = document.body.style.overflow;
17490
+ document.body.style.overflow = "hidden";
17491
+ previousActiveElement.current = document.activeElement;
17492
+ setTimeout(() => {
17493
+ const focusable = modalRef.current?.querySelectorAll(
17494
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
17495
+ );
17496
+ if (focusable && focusable.length > 0) {
17497
+ focusable[0].focus();
17498
+ }
17499
+ }, 0);
17500
+ return () => {
17501
+ document.body.style.overflow = originalOverflow;
17502
+ previousActiveElement.current?.focus();
17503
+ };
17504
+ }, [isOpen]);
17505
+ if (!isOpen) return null;
17506
+ const handleBackdropClick = () => {
17507
+ if (!disableBackdropClick) onClose();
17508
+ };
17509
+ return (0, import_react_dom.createPortal)(
17510
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
17511
+ "div",
17512
+ {
17513
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-qtneutral-900/50 animate-fade-in",
17514
+ onClick: handleBackdropClick,
17515
+ "aria-modal": "true",
17516
+ role: "dialog",
17517
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
17518
+ "div",
17519
+ {
17520
+ ref: modalRef,
17521
+ className: (0, import_clsx12.default)(
17522
+ "bg-white rounded-2xl p-6 max-w-[480px] w-full mx-4 modal-shadow animate-modal-scale",
17523
+ className
17524
+ ),
17525
+ onClick: (e) => e.stopPropagation(),
17526
+ role: "document",
17527
+ children
17528
+ }
17529
+ )
17530
+ }
17531
+ ),
17532
+ document.body
17533
+ );
17534
+ }
17535
+
17536
+ // src/components/molecules/modal/confirmation_modal.tsx
17537
+ var import_clsx13 = __toESM(require("clsx"));
17538
+ var import_jsx_runtime47 = require("react/jsx-runtime");
17539
+ var variantStyles = {
17540
+ danger: {
17541
+ confirm: "bg-qtred-500 text-white hover:bg-qtred-400",
17542
+ cancel: "bg-white text-qtpurple-500 border-2 border-qtpurple-500 hover:bg-qtpurple-200"
17543
+ },
17544
+ primary: {
17545
+ confirm: "bg-qtpurple-500 text-white hover:bg-qtpurple-600",
17546
+ cancel: "bg-white text-qtpurple-500 border-2 border-qtpurple-500 hover:bg-qtpurple-200"
17547
+ },
17548
+ warning: {
17549
+ confirm: "bg-qtorange-400 text-qtneutral-900 hover:bg-qtorange-300",
17550
+ cancel: "bg-white text-qtpurple-500 border-2 border-qtpurple-500 hover:bg-qtpurple-200"
17551
+ }
17552
+ };
17553
+ function ConfirmationModal({
17554
+ isOpen,
17555
+ onClose,
17556
+ onConfirm,
17557
+ title,
17558
+ message: message2,
17559
+ confirmLabel = "Confirm",
17560
+ cancelLabel = "Cancel",
17561
+ variant = "primary",
17562
+ children
17563
+ }) {
17564
+ const buttonBase = "px-4 py-2.5 rounded-lg label-1-bold transition-colors";
17565
+ const styles = variantStyles[variant];
17566
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Modal, { isOpen, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-6", children: [
17567
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "label-1-bold text-qtneutral-900", children: title }),
17568
+ message2 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "body-small text-qtneutral-800 whitespace-pre-line", children: typeof message2 === "string" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { children: message2 }) : message2 }),
17569
+ children,
17570
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex gap-4 justify-end", children: [
17571
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
17572
+ "button",
17573
+ {
17574
+ onClick: onConfirm,
17575
+ className: (0, import_clsx13.default)(buttonBase, styles.confirm),
17576
+ children: confirmLabel
17577
+ }
17578
+ ),
17579
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
17580
+ "button",
17581
+ {
17582
+ onClick: onClose,
17583
+ className: (0, import_clsx13.default)(buttonBase, styles.cancel, "px-8"),
17584
+ children: cancelLabel
17585
+ }
17586
+ )
17587
+ ] })
17588
+ ] }) });
17589
+ }
17590
+
17591
+ // src/components/organisms/account/info/account_info_field.tsx
17592
+ var import_jsx_runtime48 = require("react/jsx-runtime");
17593
+ function AccountInfoField({
17594
+ label,
17595
+ value,
17596
+ className = ""
17597
+ }) {
17598
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: `flex-1 flex flex-col flex-wrap gap-2 ${className}`, children: [
17599
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { className: "body-bold text-qtneutral-900", children: label }),
17600
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "body text-qtneutral-900", children: value || "-" })
17601
+ ] });
17602
+ }
17603
+
17604
+ // src/components/organisms/account/info/account_info_section.tsx
17605
+ var import_jsx_runtime49 = require("react/jsx-runtime");
17606
+ function AccountInfoSection({
17607
+ title,
17608
+ children
17609
+ }) {
17610
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col flex-wrap gap-4 pt-6 pb-6", children: [
17611
+ title && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "body-bold text-qtneutral-900", children: title }),
17612
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "user-data-row", children })
17613
+ ] });
17614
+ }
17615
+
17616
+ // src/components/organisms/account/integrations/account_integration_card.tsx
17617
+ var import_react7 = __toESM(require("react"));
17618
+ var import_clsx14 = __toESM(require("clsx"));
17619
+ var import_jsx_runtime50 = require("react/jsx-runtime");
17620
+ var AccountIntegrationCard = import_react7.default.memo(function AccountIntegrationCard2({
17621
+ integrationName,
17622
+ children,
17623
+ onConnect,
17624
+ disabled,
17625
+ ready,
17626
+ icon,
17627
+ limit
17628
+ }) {
17629
+ const count = Array.isArray(children) ? children.length : children ? 1 : 0;
17630
+ const isLimitReached = count >= limit;
17631
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "card-your-apps flex flex-col items-center gap-4 rounded-lg border-2 border-qtneutral-400 bg-white p-4", children: [
17632
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
17633
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-3", children: [
17634
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
17635
+ "div",
17636
+ {
17637
+ className: (0, import_clsx14.default)(
17638
+ "w-[44px] h-[44px] flex items-center justify-center transition-opacity border-none bg-transparent p-0",
17639
+ !ready && "opacity-50 cursor-not-allowed",
17640
+ disabled && "grayscale border-2 border-green-700 bg-green-100"
17641
+ ),
17642
+ "aria-label": `Integrate with ${integrationName}`,
17643
+ children: icon
17644
+ }
17645
+ ),
17646
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
17647
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm font-bold", children: integrationName }),
17648
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "body-small text-qtneutral-800", children: count > 0 ? `${count} of ${limit} connected` : "No accounts connected" })
17649
+ ] })
17650
+ ] }),
17651
+ !isLimitReached && ready && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
17652
+ "button",
17653
+ {
17654
+ onClick: onConnect,
17655
+ disabled: disabled || !ready,
17656
+ className: (0, import_clsx14.default)(
17657
+ "label-1-bold text-qtpurple-600 bg-transparent border-none p-0 cursor-pointer hover:text-qtpurple-500",
17658
+ (disabled || !ready) && "opacity-50 cursor-not-allowed pointer-events-none"
17659
+ ),
17660
+ children: count > 0 ? `+ Connect Another` : `+ Connect`
17661
+ }
17662
+ )
17663
+ ] }),
17664
+ count > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex w-full flex-col gap-2.5", children })
17665
+ ] });
17666
+ });
17667
+ var account_integration_card_default = AccountIntegrationCard;
17668
+
17669
+ // src/components/organisms/account/integrations/account_integration_card_item.tsx
17670
+ var import_react8 = __toESM(require("react"));
17671
+ var import_jsx_runtime51 = require("react/jsx-runtime");
17672
+ var AccountIntegrationCardItem = import_react8.default.memo(
17673
+ function AccountIntegrationCardItem2({
17674
+ name,
17675
+ onDisconnect
17676
+ }) {
17677
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-row flex-nowrap justify-between items-center bg-qtneutral-100 p-4 border border-qtpurple-500 rounded-lg", children: [
17678
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "label-1-bold text-qtneutral-900", children: name }),
17679
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
17680
+ "button",
17681
+ {
17682
+ type: "button",
17683
+ className: "label-2 text-qtred-500 underline bg-transparent border-none p-0 cursor-pointer hover:text-qtred-400",
17684
+ onClick: (e) => {
17685
+ e.stopPropagation();
17686
+ onDisconnect();
17687
+ },
17688
+ children: "Disconnect"
17689
+ }
17690
+ )
17691
+ ] });
17692
+ }
17693
+ );
17694
+ var account_integration_card_item_default = AccountIntegrationCardItem;
17695
+
17458
17696
  // src/types/events.ts
17459
17697
  var EventState = /* @__PURE__ */ ((EventState2) => {
17460
17698
  EventState2["NEW"] = "new";
@@ -17565,16 +17803,22 @@ This is a *markdown* **example**.
17565
17803
  ];
17566
17804
  // Annotate the CommonJS export names for ESM import in node:
17567
17805
  0 && (module.exports = {
17806
+ AccountInfoField,
17807
+ AccountInfoSection,
17808
+ AccountIntegrationCard,
17809
+ AccountIntegrationCardItem,
17568
17810
  BaseIconName,
17569
17811
  BrandIcon,
17570
17812
  ChatBody,
17571
17813
  ColorVariants,
17814
+ ConfirmationModal,
17572
17815
  EmailBody,
17573
17816
  EventCard,
17574
17817
  EventState,
17575
17818
  EventType,
17576
17819
  FilterBar,
17577
17820
  IntegrationService,
17821
+ Modal,
17578
17822
  NavBar,
17579
17823
  PreviewCard,
17580
17824
  SearchBar,