qt-ui-kit 1.0.113 → 1.0.115

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.js CHANGED
@@ -11177,16 +11177,24 @@ 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,
11194
+ FilterCategory: () => FilterCategory,
11189
11195
  IntegrationService: () => IntegrationService,
11196
+ Modal: () => Modal,
11197
+ MoreFilter: () => MoreFilter,
11190
11198
  NavBar: () => NavBar,
11191
11199
  PreviewCard: () => PreviewCard,
11192
11200
  SearchBar: () => SearchBar,
@@ -11200,17 +11208,28 @@ module.exports = __toCommonJS(index_exports);
11200
11208
  var import_react2 = require("react");
11201
11209
 
11202
11210
  // src/types/global.ts
11203
- var IntegrationService = /* @__PURE__ */ ((IntegrationService5) => {
11204
- IntegrationService5["SLACK"] = "slack";
11205
- IntegrationService5["GMAIL"] = "google_mail";
11206
- IntegrationService5["GCAL"] = "google_calendar";
11207
- IntegrationService5["MSTEAMS"] = "microsoft_teams";
11208
- IntegrationService5["MSMAIL"] = "microsoft_mail";
11209
- IntegrationService5["MSCAL"] = "microsoft_calendar";
11210
- IntegrationService5["AJIRA"] = "atlassian_jira";
11211
- IntegrationService5["CLKUP"] = "clickup";
11212
- IntegrationService5["ASANA"] = "asana";
11213
- return IntegrationService5;
11211
+ var FilterCategory = /* @__PURE__ */ ((FilterCategory2) => {
11212
+ FilterCategory2["FIRES"] = "fires";
11213
+ FilterCategory2["INSIGHTS"] = "insights";
11214
+ FilterCategory2["NEW"] = "new";
11215
+ FilterCategory2["DONE"] = "done";
11216
+ return FilterCategory2;
11217
+ })(FilterCategory || {});
11218
+ var MoreFilter = /* @__PURE__ */ ((MoreFilter3) => {
11219
+ MoreFilter3["MORE"] = "more";
11220
+ return MoreFilter3;
11221
+ })(MoreFilter || {});
11222
+ var IntegrationService = /* @__PURE__ */ ((IntegrationService4) => {
11223
+ IntegrationService4["SLACK"] = "slack";
11224
+ IntegrationService4["GMAIL"] = "google_mail";
11225
+ IntegrationService4["GCAL"] = "google_calendar";
11226
+ IntegrationService4["MSTEAMS"] = "microsoft_teams";
11227
+ IntegrationService4["MSMAIL"] = "microsoft_mail";
11228
+ IntegrationService4["MSCAL"] = "microsoft_calendar";
11229
+ IntegrationService4["AJIRA"] = "atlassian_jira";
11230
+ IntegrationService4["CLKUP"] = "clickup";
11231
+ IntegrationService4["ASANA"] = "asana";
11232
+ return IntegrationService4;
11214
11233
  })(IntegrationService || {});
11215
11234
  var BaseIconName = /* @__PURE__ */ ((BaseIconName2) => {
11216
11235
  BaseIconName2["SEARCH"] = "search";
@@ -17298,162 +17317,350 @@ function FilterNavButton({ icon, label, active, onClick, totalItems }) {
17298
17317
 
17299
17318
  // src/components/organisms/filter_bar/filter_bar.tsx
17300
17319
  var import_jsx_runtime45 = require("react/jsx-runtime");
17320
+ var CATEGORY_FILTERS = [
17321
+ {
17322
+ filter: "fires" /* FIRES */,
17323
+ label: "Fires",
17324
+ icon: (active) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FireIcon, { variant: active ? void 0 : "none" /* OUTLINED */ })
17325
+ },
17326
+ {
17327
+ filter: "insights" /* INSIGHTS */,
17328
+ label: "Q Insights",
17329
+ icon: (active) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InsightsIcon, { variant: active ? void 0 : "none" /* OUTLINED */ })
17330
+ },
17331
+ {
17332
+ filter: "new" /* NEW */,
17333
+ label: "Unread",
17334
+ icon: (active) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Mail, { size: 36, fillColor: active ? "#BFF4F6" : void 0 })
17335
+ },
17336
+ {
17337
+ filter: "done" /* DONE */,
17338
+ label: "Done",
17339
+ icon: (active) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17340
+ CheckBox,
17341
+ {
17342
+ size: 36,
17343
+ color: "#000000",
17344
+ fillColor: active ? "#E8FE99" : void 0
17345
+ }
17346
+ )
17347
+ }
17348
+ ];
17349
+ var INTEGRATION_FILTERS = [
17350
+ { services: ["slack" /* SLACK */], label: "Slack", icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlackIcon, {}) },
17351
+ {
17352
+ services: ["google_mail" /* GMAIL */],
17353
+ label: "Gmail",
17354
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(GoogleMailIcon, {})
17355
+ },
17356
+ {
17357
+ services: ["google_calendar" /* GCAL */],
17358
+ label: "Gcal",
17359
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(GoogleCalendarIcon, {})
17360
+ },
17361
+ {
17362
+ services: ["atlassian_jira" /* AJIRA */],
17363
+ label: "Jira",
17364
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AtlassianIcon, {})
17365
+ },
17366
+ {
17367
+ services: ["microsoft_teams" /* MSTEAMS */],
17368
+ label: "Teams",
17369
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MicrosoftTeamsIcon, {})
17370
+ },
17371
+ {
17372
+ services: ["microsoft_mail" /* MSMAIL */, "microsoft_calendar" /* MSCAL */],
17373
+ label: "Outlook",
17374
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MicrosoftOutlookMailIcon, {})
17375
+ },
17376
+ {
17377
+ services: ["clickup" /* CLKUP */],
17378
+ label: "ClickUp",
17379
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ClickupIcon, {})
17380
+ },
17381
+ { services: ["asana" /* ASANA */], label: "Asana", icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AsanaIcon, {}) }
17382
+ ];
17301
17383
  function FilterBar({ buttons }) {
17302
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex h-full min-h-0 flex-col w-[54px] items-center gap-4", children: [
17303
- !buttons?.fires?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17384
+ const renderCategoryButton = ({ filter, label, icon }) => {
17385
+ const config = buttons?.[filter];
17386
+ if (config?.disabled) return null;
17387
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17304
17388
  FilterNavButton,
17305
17389
  {
17306
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17307
- FireIcon,
17308
- {
17309
- variant: buttons?.fires?.active ? void 0 : "none" /* OUTLINED */
17310
- }
17311
- ),
17312
- label: "Fires",
17313
- onClick: buttons?.fires?.onClick,
17314
- totalItems: buttons?.fires?.count
17315
- }
17316
- ),
17317
- !buttons?.insights?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17390
+ icon: icon(config?.active),
17391
+ label,
17392
+ onClick: config?.onClick,
17393
+ totalItems: config?.count
17394
+ },
17395
+ filter
17396
+ );
17397
+ };
17398
+ const renderIntegrationButton = ({
17399
+ services,
17400
+ label,
17401
+ icon
17402
+ }) => {
17403
+ const configs = services.map((service) => buttons?.[service]);
17404
+ const allDisabled = configs.every((c) => c?.disabled);
17405
+ if (allDisabled) return null;
17406
+ const anyActive = configs.some((c) => c?.active);
17407
+ const onClick = configs.find((c) => c?.onClick)?.onClick;
17408
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17318
17409
  FilterNavButton,
17319
17410
  {
17320
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17321
- InsightsIcon,
17322
- {
17323
- variant: buttons?.insights?.active ? void 0 : "none" /* OUTLINED */
17324
- }
17325
- ),
17326
- label: "Q Insights",
17327
- onClick: buttons?.insights?.onClick,
17328
- totalItems: buttons?.insights?.count
17329
- }
17330
- ),
17331
- !buttons?.unread?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17411
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: anyActive ? "" : "grayscale", children: icon }),
17412
+ label,
17413
+ onClick
17414
+ },
17415
+ services.join("-")
17416
+ );
17417
+ };
17418
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex h-full w-[54px] min-h-0 flex-col items-center gap-4", children: [
17419
+ CATEGORY_FILTERS.map(renderCategoryButton),
17420
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17421
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex-1 w-full min-h-0 min-w-[58px] overflow-y-auto flex flex-col items-center gap-4 overscroll-contain", children: INTEGRATION_FILTERS.map(renderIntegrationButton) }),
17422
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17423
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17332
17424
  FilterNavButton,
17333
17425
  {
17334
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17335
- Mail,
17336
- {
17337
- size: 36,
17338
- fillColor: buttons?.unread?.active ? "#BFF4F6" : void 0
17339
- }
17340
- ),
17341
- label: "Unread",
17342
- onClick: buttons?.unread?.onClick,
17343
- totalItems: buttons?.unread?.count
17426
+ icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PlusLarge, { size: 36 }),
17427
+ onClick: buttons?.more?.onClick
17344
17428
  }
17345
- ),
17346
- !buttons?.done?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17347
- FilterNavButton,
17429
+ )
17430
+ ] });
17431
+ }
17432
+
17433
+ // src/components/molecules/modal/modal.tsx
17434
+ var import_react6 = require("react");
17435
+ var import_react_dom = require("react-dom");
17436
+ var import_clsx12 = __toESM(require("clsx"));
17437
+ var import_jsx_runtime46 = require("react/jsx-runtime");
17438
+ function Modal({
17439
+ isOpen,
17440
+ onClose,
17441
+ children,
17442
+ className,
17443
+ disableBackdropClick = false,
17444
+ disableEscapeKey = false
17445
+ }) {
17446
+ const modalRef = (0, import_react6.useRef)(null);
17447
+ const previousActiveElement = (0, import_react6.useRef)(null);
17448
+ (0, import_react6.useEffect)(() => {
17449
+ if (!isOpen || disableEscapeKey) return;
17450
+ const handleKeyDown = (e) => {
17451
+ if (e.key === "Escape") onClose();
17452
+ };
17453
+ document.addEventListener("keydown", handleKeyDown);
17454
+ return () => document.removeEventListener("keydown", handleKeyDown);
17455
+ }, [isOpen, onClose, disableEscapeKey]);
17456
+ (0, import_react6.useEffect)(() => {
17457
+ if (!isOpen) return;
17458
+ const originalOverflow = document.body.style.overflow;
17459
+ document.body.style.overflow = "hidden";
17460
+ previousActiveElement.current = document.activeElement;
17461
+ setTimeout(() => {
17462
+ const focusable = modalRef.current?.querySelectorAll(
17463
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
17464
+ );
17465
+ if (focusable && focusable.length > 0) {
17466
+ focusable[0].focus();
17467
+ }
17468
+ }, 0);
17469
+ return () => {
17470
+ document.body.style.overflow = originalOverflow;
17471
+ previousActiveElement.current?.focus();
17472
+ };
17473
+ }, [isOpen]);
17474
+ if (!isOpen) return null;
17475
+ const handleBackdropClick = () => {
17476
+ if (!disableBackdropClick) onClose();
17477
+ };
17478
+ return (0, import_react_dom.createPortal)(
17479
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
17480
+ "div",
17348
17481
  {
17349
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17350
- CheckBox,
17482
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-qtneutral-900/50 animate-fade-in",
17483
+ onClick: handleBackdropClick,
17484
+ "aria-modal": "true",
17485
+ role: "dialog",
17486
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
17487
+ "div",
17351
17488
  {
17352
- size: 36,
17353
- color: "#000000",
17354
- fillColor: buttons?.done?.active ? "#E8FE99" : void 0
17489
+ ref: modalRef,
17490
+ className: (0, import_clsx12.default)(
17491
+ "bg-white rounded-2xl p-6 max-w-[480px] w-full mx-4 modal-shadow animate-modal-scale",
17492
+ className
17493
+ ),
17494
+ onClick: (e) => e.stopPropagation(),
17495
+ role: "document",
17496
+ children
17355
17497
  }
17356
- ),
17357
- label: "Done",
17358
- onClick: buttons?.done?.onClick,
17359
- totalItems: buttons?.done?.count
17498
+ )
17360
17499
  }
17361
17500
  ),
17362
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17363
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex-1 min-h-0 w-full overflow-y-auto flex flex-col gap-4 overscroll-contain items-center min-w-[58px]", children: [
17364
- !buttons?.slack?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17365
- FilterNavButton,
17366
- {
17367
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: buttons?.slack?.active ? "" : "grayscale", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlackIcon, {}) }),
17368
- label: "slack",
17369
- onClick: buttons?.slack?.onClick
17370
- }
17371
- ),
17372
- !buttons?.google_mail?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17373
- FilterNavButton,
17374
- {
17375
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: buttons?.google_mail?.active ? "" : "grayscale", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(GoogleMailIcon, {}) }),
17376
- label: "Gmail",
17377
- onClick: buttons?.google_mail?.onClick
17378
- }
17379
- ),
17380
- !buttons?.google_calendar?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17381
- FilterNavButton,
17501
+ document.body
17502
+ );
17503
+ }
17504
+
17505
+ // src/components/molecules/modal/confirmation_modal.tsx
17506
+ var import_clsx13 = __toESM(require("clsx"));
17507
+ var import_jsx_runtime47 = require("react/jsx-runtime");
17508
+ var variantStyles = {
17509
+ danger: {
17510
+ confirm: "bg-qtred-500 text-white hover:bg-qtred-400",
17511
+ cancel: "bg-white text-qtpurple-500 border-2 border-qtpurple-500 hover:bg-qtpurple-200"
17512
+ },
17513
+ primary: {
17514
+ confirm: "bg-qtpurple-500 text-white hover:bg-qtpurple-600",
17515
+ cancel: "bg-white text-qtpurple-500 border-2 border-qtpurple-500 hover:bg-qtpurple-200"
17516
+ },
17517
+ warning: {
17518
+ confirm: "bg-qtorange-400 text-qtneutral-900 hover:bg-qtorange-300",
17519
+ cancel: "bg-white text-qtpurple-500 border-2 border-qtpurple-500 hover:bg-qtpurple-200"
17520
+ }
17521
+ };
17522
+ function ConfirmationModal({
17523
+ isOpen,
17524
+ onClose,
17525
+ onConfirm,
17526
+ title,
17527
+ message: message2,
17528
+ confirmLabel = "Confirm",
17529
+ cancelLabel = "Cancel",
17530
+ variant = "primary",
17531
+ children
17532
+ }) {
17533
+ const buttonBase = "px-4 py-2.5 rounded-lg label-1-bold transition-colors";
17534
+ const styles = variantStyles[variant];
17535
+ 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: [
17536
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "label-1-bold text-qtneutral-900", children: title }),
17537
+ 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 }),
17538
+ children,
17539
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex gap-4 justify-end", children: [
17540
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
17541
+ "button",
17382
17542
  {
17383
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17384
- "div",
17385
- {
17386
- className: buttons?.google_calendar?.active ? "" : "grayscale",
17387
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(GoogleCalendarIcon, {})
17388
- }
17389
- ),
17390
- label: "Gcal",
17391
- onClick: buttons?.google_calendar?.onClick
17543
+ onClick: onConfirm,
17544
+ className: (0, import_clsx13.default)(buttonBase, styles.confirm),
17545
+ children: confirmLabel
17392
17546
  }
17393
17547
  ),
17394
- !buttons?.atlassian_jira?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17395
- FilterNavButton,
17548
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
17549
+ "button",
17396
17550
  {
17397
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17398
- "div",
17399
- {
17400
- className: buttons?.atlassian_jira?.active ? "" : "grayscale",
17401
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AtlassianIcon, {})
17402
- }
17403
- ),
17404
- label: "Jira",
17405
- onClick: buttons?.atlassian_jira?.onClick
17551
+ onClick: onClose,
17552
+ className: (0, import_clsx13.default)(buttonBase, styles.cancel, "px-8"),
17553
+ children: cancelLabel
17406
17554
  }
17407
- ),
17408
- !buttons?.microsoft_teams?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17409
- FilterNavButton,
17410
- {
17411
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17412
- "div",
17413
- {
17414
- className: buttons?.microsoft_teams?.active ? "" : "grayscale",
17415
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MicrosoftTeamsIcon, {})
17416
- }
17417
- ),
17418
- label: "Teams",
17419
- onClick: buttons?.microsoft_teams?.onClick
17420
- }
17421
- ),
17422
- !(buttons?.microsoft_mail?.disabled && buttons?.microsoft_calendar?.disabled) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17423
- FilterNavButton,
17555
+ )
17556
+ ] })
17557
+ ] }) });
17558
+ }
17559
+
17560
+ // src/components/organisms/account/info/account_info_field.tsx
17561
+ var import_jsx_runtime48 = require("react/jsx-runtime");
17562
+ function AccountInfoField({
17563
+ label,
17564
+ value,
17565
+ className = ""
17566
+ }) {
17567
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: `flex-1 flex flex-col flex-wrap gap-2 ${className}`, children: [
17568
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { className: "body-bold text-qtneutral-900", children: label }),
17569
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "body text-qtneutral-900", children: value || "-" })
17570
+ ] });
17571
+ }
17572
+
17573
+ // src/components/organisms/account/info/account_info_section.tsx
17574
+ var import_jsx_runtime49 = require("react/jsx-runtime");
17575
+ function AccountInfoSection({
17576
+ title,
17577
+ children
17578
+ }) {
17579
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col flex-wrap gap-4 pt-6 pb-6", children: [
17580
+ title && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "body-bold text-qtneutral-900", children: title }),
17581
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "user-data-row", children })
17582
+ ] });
17583
+ }
17584
+
17585
+ // src/components/organisms/account/integrations/account_integration_card.tsx
17586
+ var import_react7 = __toESM(require("react"));
17587
+ var import_clsx14 = __toESM(require("clsx"));
17588
+ var import_jsx_runtime50 = require("react/jsx-runtime");
17589
+ var AccountIntegrationCard = import_react7.default.memo(function AccountIntegrationCard2({
17590
+ integrationName,
17591
+ children,
17592
+ onConnect,
17593
+ disabled,
17594
+ ready,
17595
+ icon,
17596
+ limit
17597
+ }) {
17598
+ const count = Array.isArray(children) ? children.length : children ? 1 : 0;
17599
+ const isLimitReached = count >= limit;
17600
+ 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: [
17601
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
17602
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-3", children: [
17603
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
17604
+ "div",
17605
+ {
17606
+ className: (0, import_clsx14.default)(
17607
+ "w-[44px] h-[44px] flex items-center justify-center transition-opacity border-none bg-transparent p-0",
17608
+ !ready && "opacity-50 cursor-not-allowed",
17609
+ disabled && "grayscale border-2 border-green-700 bg-green-100"
17610
+ ),
17611
+ "aria-label": `Integrate with ${integrationName}`,
17612
+ children: icon
17613
+ }
17614
+ ),
17615
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
17616
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm font-bold", children: integrationName }),
17617
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "body-small text-qtneutral-800", children: count > 0 ? `${count} of ${limit} connected` : "No accounts connected" })
17618
+ ] })
17619
+ ] }),
17620
+ !isLimitReached && ready && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
17621
+ "button",
17424
17622
  {
17425
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17426
- "div",
17427
- {
17428
- className: buttons?.microsoft_calendar?.active || buttons?.microsoft_mail?.active ? "" : "grayscale",
17429
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(MicrosoftOutlookMailIcon, {})
17430
- }
17623
+ onClick: onConnect,
17624
+ disabled: disabled || !ready,
17625
+ className: (0, import_clsx14.default)(
17626
+ "label-1-bold text-qtpurple-600 bg-transparent border-none p-0 cursor-pointer hover:text-qtpurple-500",
17627
+ (disabled || !ready) && "opacity-50 cursor-not-allowed pointer-events-none"
17431
17628
  ),
17432
- label: "Outlook",
17433
- onClick: buttons?.microsoft_mail?.onClick || buttons?.microsoft_calendar?.onClick
17434
- }
17435
- ),
17436
- !buttons?.clickup?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17437
- FilterNavButton,
17438
- {
17439
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: buttons?.clickup?.active ? "" : "grayscale", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ClickupIcon, {}) }),
17440
- label: "ClickUp",
17441
- onClick: buttons?.clickup?.onClick
17442
- }
17443
- ),
17444
- !buttons?.asana?.disabled && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17445
- FilterNavButton,
17446
- {
17447
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: buttons?.asana?.active ? "" : "grayscale", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AsanaIcon, {}) }),
17448
- label: "Asana",
17449
- onClick: buttons?.asana?.onClick
17629
+ children: count > 0 ? `+ Connect Another` : `+ Connect`
17450
17630
  }
17451
17631
  )
17452
17632
  ] }),
17453
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17454
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { onClick: buttons?.more?.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FilterNavButton, { icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PlusLarge, { size: 36 }) }) })
17633
+ count > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex w-full flex-col gap-2.5", children })
17455
17634
  ] });
17456
- }
17635
+ });
17636
+ var account_integration_card_default = AccountIntegrationCard;
17637
+
17638
+ // src/components/organisms/account/integrations/account_integration_card_item.tsx
17639
+ var import_react8 = __toESM(require("react"));
17640
+ var import_jsx_runtime51 = require("react/jsx-runtime");
17641
+ var AccountIntegrationCardItem = import_react8.default.memo(
17642
+ function AccountIntegrationCardItem2({
17643
+ name,
17644
+ onDisconnect
17645
+ }) {
17646
+ 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: [
17647
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "label-1-bold text-qtneutral-900", children: name }),
17648
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
17649
+ "button",
17650
+ {
17651
+ type: "button",
17652
+ className: "label-2 text-qtred-500 underline bg-transparent border-none p-0 cursor-pointer hover:text-qtred-400",
17653
+ onClick: (e) => {
17654
+ e.stopPropagation();
17655
+ onDisconnect();
17656
+ },
17657
+ children: "Disconnect"
17658
+ }
17659
+ )
17660
+ ] });
17661
+ }
17662
+ );
17663
+ var account_integration_card_item_default = AccountIntegrationCardItem;
17457
17664
 
17458
17665
  // src/types/events.ts
17459
17666
  var EventState = /* @__PURE__ */ ((EventState2) => {
@@ -17565,16 +17772,24 @@ This is a *markdown* **example**.
17565
17772
  ];
17566
17773
  // Annotate the CommonJS export names for ESM import in node:
17567
17774
  0 && (module.exports = {
17775
+ AccountInfoField,
17776
+ AccountInfoSection,
17777
+ AccountIntegrationCard,
17778
+ AccountIntegrationCardItem,
17568
17779
  BaseIconName,
17569
17780
  BrandIcon,
17570
17781
  ChatBody,
17571
17782
  ColorVariants,
17783
+ ConfirmationModal,
17572
17784
  EmailBody,
17573
17785
  EventCard,
17574
17786
  EventState,
17575
17787
  EventType,
17576
17788
  FilterBar,
17789
+ FilterCategory,
17577
17790
  IntegrationService,
17791
+ Modal,
17792
+ MoreFilter,
17578
17793
  NavBar,
17579
17794
  PreviewCard,
17580
17795
  SearchBar,