qt-ui-kit 1.0.114 → 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.mjs CHANGED
@@ -11172,17 +11172,28 @@ var require_lib7 = __commonJS({
11172
11172
  import { useState as useState2 } from "react";
11173
11173
 
11174
11174
  // src/types/global.ts
11175
- var IntegrationService = /* @__PURE__ */ ((IntegrationService5) => {
11176
- IntegrationService5["SLACK"] = "slack";
11177
- IntegrationService5["GMAIL"] = "google_mail";
11178
- IntegrationService5["GCAL"] = "google_calendar";
11179
- IntegrationService5["MSTEAMS"] = "microsoft_teams";
11180
- IntegrationService5["MSMAIL"] = "microsoft_mail";
11181
- IntegrationService5["MSCAL"] = "microsoft_calendar";
11182
- IntegrationService5["AJIRA"] = "atlassian_jira";
11183
- IntegrationService5["CLKUP"] = "clickup";
11184
- IntegrationService5["ASANA"] = "asana";
11185
- return IntegrationService5;
11175
+ var FilterCategory = /* @__PURE__ */ ((FilterCategory2) => {
11176
+ FilterCategory2["FIRES"] = "fires";
11177
+ FilterCategory2["INSIGHTS"] = "insights";
11178
+ FilterCategory2["NEW"] = "new";
11179
+ FilterCategory2["DONE"] = "done";
11180
+ return FilterCategory2;
11181
+ })(FilterCategory || {});
11182
+ var MoreFilter = /* @__PURE__ */ ((MoreFilter3) => {
11183
+ MoreFilter3["MORE"] = "more";
11184
+ return MoreFilter3;
11185
+ })(MoreFilter || {});
11186
+ var IntegrationService = /* @__PURE__ */ ((IntegrationService4) => {
11187
+ IntegrationService4["SLACK"] = "slack";
11188
+ IntegrationService4["GMAIL"] = "google_mail";
11189
+ IntegrationService4["GCAL"] = "google_calendar";
11190
+ IntegrationService4["MSTEAMS"] = "microsoft_teams";
11191
+ IntegrationService4["MSMAIL"] = "microsoft_mail";
11192
+ IntegrationService4["MSCAL"] = "microsoft_calendar";
11193
+ IntegrationService4["AJIRA"] = "atlassian_jira";
11194
+ IntegrationService4["CLKUP"] = "clickup";
11195
+ IntegrationService4["ASANA"] = "asana";
11196
+ return IntegrationService4;
11186
11197
  })(IntegrationService || {});
11187
11198
  var BaseIconName = /* @__PURE__ */ ((BaseIconName2) => {
11188
11199
  BaseIconName2["SEARCH"] = "search";
@@ -17277,160 +17288,116 @@ function FilterNavButton({ icon, label, active, onClick, totalItems }) {
17277
17288
 
17278
17289
  // src/components/organisms/filter_bar/filter_bar.tsx
17279
17290
  import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
17280
- function FilterBar({ buttons }) {
17281
- return /* @__PURE__ */ jsxs32("div", { className: "flex h-full min-h-0 flex-col w-[54px] items-center gap-4", children: [
17282
- !buttons?.fires?.disabled && /* @__PURE__ */ jsx45(
17283
- FilterNavButton,
17291
+ var CATEGORY_FILTERS = [
17292
+ {
17293
+ filter: "fires" /* FIRES */,
17294
+ label: "Fires",
17295
+ icon: (active) => /* @__PURE__ */ jsx45(FireIcon, { variant: active ? void 0 : "none" /* OUTLINED */ })
17296
+ },
17297
+ {
17298
+ filter: "insights" /* INSIGHTS */,
17299
+ label: "Q Insights",
17300
+ icon: (active) => /* @__PURE__ */ jsx45(InsightsIcon, { variant: active ? void 0 : "none" /* OUTLINED */ })
17301
+ },
17302
+ {
17303
+ filter: "new" /* NEW */,
17304
+ label: "Unread",
17305
+ icon: (active) => /* @__PURE__ */ jsx45(Mail, { size: 36, fillColor: active ? "#BFF4F6" : void 0 })
17306
+ },
17307
+ {
17308
+ filter: "done" /* DONE */,
17309
+ label: "Done",
17310
+ icon: (active) => /* @__PURE__ */ jsx45(
17311
+ CheckBox,
17284
17312
  {
17285
- icon: /* @__PURE__ */ jsx45(
17286
- FireIcon,
17287
- {
17288
- variant: buttons?.fires?.active ? void 0 : "none" /* OUTLINED */
17289
- }
17290
- ),
17291
- label: "Fires",
17292
- onClick: buttons?.fires?.onClick,
17293
- totalItems: buttons?.fires?.count
17313
+ size: 36,
17314
+ color: "#000000",
17315
+ fillColor: active ? "#E8FE99" : void 0
17294
17316
  }
17295
- ),
17296
- !buttons?.insights?.disabled && /* @__PURE__ */ jsx45(
17317
+ )
17318
+ }
17319
+ ];
17320
+ var INTEGRATION_FILTERS = [
17321
+ { services: ["slack" /* SLACK */], label: "Slack", icon: /* @__PURE__ */ jsx45(SlackIcon, {}) },
17322
+ {
17323
+ services: ["google_mail" /* GMAIL */],
17324
+ label: "Gmail",
17325
+ icon: /* @__PURE__ */ jsx45(GoogleMailIcon, {})
17326
+ },
17327
+ {
17328
+ services: ["google_calendar" /* GCAL */],
17329
+ label: "Gcal",
17330
+ icon: /* @__PURE__ */ jsx45(GoogleCalendarIcon, {})
17331
+ },
17332
+ {
17333
+ services: ["atlassian_jira" /* AJIRA */],
17334
+ label: "Jira",
17335
+ icon: /* @__PURE__ */ jsx45(AtlassianIcon, {})
17336
+ },
17337
+ {
17338
+ services: ["microsoft_teams" /* MSTEAMS */],
17339
+ label: "Teams",
17340
+ icon: /* @__PURE__ */ jsx45(MicrosoftTeamsIcon, {})
17341
+ },
17342
+ {
17343
+ services: ["microsoft_mail" /* MSMAIL */, "microsoft_calendar" /* MSCAL */],
17344
+ label: "Outlook",
17345
+ icon: /* @__PURE__ */ jsx45(MicrosoftOutlookMailIcon, {})
17346
+ },
17347
+ {
17348
+ services: ["clickup" /* CLKUP */],
17349
+ label: "ClickUp",
17350
+ icon: /* @__PURE__ */ jsx45(ClickupIcon, {})
17351
+ },
17352
+ { services: ["asana" /* ASANA */], label: "Asana", icon: /* @__PURE__ */ jsx45(AsanaIcon, {}) }
17353
+ ];
17354
+ function FilterBar({ buttons }) {
17355
+ const renderCategoryButton = ({ filter, label, icon }) => {
17356
+ const config = buttons?.[filter];
17357
+ if (config?.disabled) return null;
17358
+ return /* @__PURE__ */ jsx45(
17297
17359
  FilterNavButton,
17298
17360
  {
17299
- icon: /* @__PURE__ */ jsx45(
17300
- InsightsIcon,
17301
- {
17302
- variant: buttons?.insights?.active ? void 0 : "none" /* OUTLINED */
17303
- }
17304
- ),
17305
- label: "Q Insights",
17306
- onClick: buttons?.insights?.onClick,
17307
- totalItems: buttons?.insights?.count
17308
- }
17309
- ),
17310
- !buttons?.unread?.disabled && /* @__PURE__ */ jsx45(
17361
+ icon: icon(config?.active),
17362
+ label,
17363
+ onClick: config?.onClick,
17364
+ totalItems: config?.count
17365
+ },
17366
+ filter
17367
+ );
17368
+ };
17369
+ const renderIntegrationButton = ({
17370
+ services,
17371
+ label,
17372
+ icon
17373
+ }) => {
17374
+ const configs = services.map((service) => buttons?.[service]);
17375
+ const allDisabled = configs.every((c) => c?.disabled);
17376
+ if (allDisabled) return null;
17377
+ const anyActive = configs.some((c) => c?.active);
17378
+ const onClick = configs.find((c) => c?.onClick)?.onClick;
17379
+ return /* @__PURE__ */ jsx45(
17311
17380
  FilterNavButton,
17312
17381
  {
17313
- icon: /* @__PURE__ */ jsx45(
17314
- Mail,
17315
- {
17316
- size: 36,
17317
- fillColor: buttons?.unread?.active ? "#BFF4F6" : void 0
17318
- }
17319
- ),
17320
- label: "Unread",
17321
- onClick: buttons?.unread?.onClick,
17322
- totalItems: buttons?.unread?.count
17323
- }
17324
- ),
17325
- !buttons?.done?.disabled && /* @__PURE__ */ jsx45(
17382
+ icon: /* @__PURE__ */ jsx45("div", { className: anyActive ? "" : "grayscale", children: icon }),
17383
+ label,
17384
+ onClick
17385
+ },
17386
+ services.join("-")
17387
+ );
17388
+ };
17389
+ return /* @__PURE__ */ jsxs32("div", { className: "flex h-full w-[54px] min-h-0 flex-col items-center gap-4", children: [
17390
+ CATEGORY_FILTERS.map(renderCategoryButton),
17391
+ /* @__PURE__ */ jsx45("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17392
+ /* @__PURE__ */ jsx45("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) }),
17393
+ /* @__PURE__ */ jsx45("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17394
+ /* @__PURE__ */ jsx45(
17326
17395
  FilterNavButton,
17327
17396
  {
17328
- icon: /* @__PURE__ */ jsx45(
17329
- CheckBox,
17330
- {
17331
- size: 36,
17332
- color: "#000000",
17333
- fillColor: buttons?.done?.active ? "#E8FE99" : void 0
17334
- }
17335
- ),
17336
- label: "Done",
17337
- onClick: buttons?.done?.onClick,
17338
- totalItems: buttons?.done?.count
17397
+ icon: /* @__PURE__ */ jsx45(PlusLarge, { size: 36 }),
17398
+ onClick: buttons?.more?.onClick
17339
17399
  }
17340
- ),
17341
- /* @__PURE__ */ jsx45("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17342
- /* @__PURE__ */ jsxs32("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: [
17343
- !buttons?.slack?.disabled && /* @__PURE__ */ jsx45(
17344
- FilterNavButton,
17345
- {
17346
- icon: /* @__PURE__ */ jsx45("div", { className: buttons?.slack?.active ? "" : "grayscale", children: /* @__PURE__ */ jsx45(SlackIcon, {}) }),
17347
- label: "slack",
17348
- onClick: buttons?.slack?.onClick
17349
- }
17350
- ),
17351
- !buttons?.google_mail?.disabled && /* @__PURE__ */ jsx45(
17352
- FilterNavButton,
17353
- {
17354
- icon: /* @__PURE__ */ jsx45("div", { className: buttons?.google_mail?.active ? "" : "grayscale", children: /* @__PURE__ */ jsx45(GoogleMailIcon, {}) }),
17355
- label: "Gmail",
17356
- onClick: buttons?.google_mail?.onClick
17357
- }
17358
- ),
17359
- !buttons?.google_calendar?.disabled && /* @__PURE__ */ jsx45(
17360
- FilterNavButton,
17361
- {
17362
- icon: /* @__PURE__ */ jsx45(
17363
- "div",
17364
- {
17365
- className: buttons?.google_calendar?.active ? "" : "grayscale",
17366
- children: /* @__PURE__ */ jsx45(GoogleCalendarIcon, {})
17367
- }
17368
- ),
17369
- label: "Gcal",
17370
- onClick: buttons?.google_calendar?.onClick
17371
- }
17372
- ),
17373
- !buttons?.atlassian_jira?.disabled && /* @__PURE__ */ jsx45(
17374
- FilterNavButton,
17375
- {
17376
- icon: /* @__PURE__ */ jsx45(
17377
- "div",
17378
- {
17379
- className: buttons?.atlassian_jira?.active ? "" : "grayscale",
17380
- children: /* @__PURE__ */ jsx45(AtlassianIcon, {})
17381
- }
17382
- ),
17383
- label: "Jira",
17384
- onClick: buttons?.atlassian_jira?.onClick
17385
- }
17386
- ),
17387
- !buttons?.microsoft_teams?.disabled && /* @__PURE__ */ jsx45(
17388
- FilterNavButton,
17389
- {
17390
- icon: /* @__PURE__ */ jsx45(
17391
- "div",
17392
- {
17393
- className: buttons?.microsoft_teams?.active ? "" : "grayscale",
17394
- children: /* @__PURE__ */ jsx45(MicrosoftTeamsIcon, {})
17395
- }
17396
- ),
17397
- label: "Teams",
17398
- onClick: buttons?.microsoft_teams?.onClick
17399
- }
17400
- ),
17401
- !(buttons?.microsoft_mail?.disabled && buttons?.microsoft_calendar?.disabled) && /* @__PURE__ */ jsx45(
17402
- FilterNavButton,
17403
- {
17404
- icon: /* @__PURE__ */ jsx45(
17405
- "div",
17406
- {
17407
- className: buttons?.microsoft_calendar?.active || buttons?.microsoft_mail?.active ? "" : "grayscale",
17408
- children: /* @__PURE__ */ jsx45(MicrosoftOutlookMailIcon, {})
17409
- }
17410
- ),
17411
- label: "Outlook",
17412
- onClick: buttons?.microsoft_mail?.onClick || buttons?.microsoft_calendar?.onClick
17413
- }
17414
- ),
17415
- !buttons?.clickup?.disabled && /* @__PURE__ */ jsx45(
17416
- FilterNavButton,
17417
- {
17418
- icon: /* @__PURE__ */ jsx45("div", { className: buttons?.clickup?.active ? "" : "grayscale", children: /* @__PURE__ */ jsx45(ClickupIcon, {}) }),
17419
- label: "ClickUp",
17420
- onClick: buttons?.clickup?.onClick
17421
- }
17422
- ),
17423
- !buttons?.asana?.disabled && /* @__PURE__ */ jsx45(
17424
- FilterNavButton,
17425
- {
17426
- icon: /* @__PURE__ */ jsx45("div", { className: buttons?.asana?.active ? "" : "grayscale", children: /* @__PURE__ */ jsx45(AsanaIcon, {}) }),
17427
- label: "Asana",
17428
- onClick: buttons?.asana?.onClick
17429
- }
17430
- )
17431
- ] }),
17432
- /* @__PURE__ */ jsx45("hr", { className: "w-full border-0.5 text-qtneutral-700" }),
17433
- /* @__PURE__ */ jsx45("div", { onClick: buttons?.more?.onClick, children: /* @__PURE__ */ jsx45(FilterNavButton, { icon: /* @__PURE__ */ jsx45(PlusLarge, { size: 36 }) }) })
17400
+ )
17434
17401
  ] });
17435
17402
  }
17436
17403
 
@@ -17789,8 +17756,10 @@ export {
17789
17756
  EventState,
17790
17757
  EventType,
17791
17758
  FilterBar,
17759
+ FilterCategory,
17792
17760
  IntegrationService,
17793
17761
  Modal,
17762
+ MoreFilter,
17794
17763
  NavBar,
17795
17764
  PreviewCard,
17796
17765
  SearchBar,