@burdenoff/microfe-workspaces 2026.830.2 → 2026.915.1

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.
@@ -5,10 +5,16 @@ import { jsx as s, jsxs as c } from "react/jsx-runtime";
5
5
  import { GlassCard as l, GradientText as u } from "@burdenoff/fe-libs/ui";
6
6
  import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
7
  //#region src/pages/dashboard/widgets/WelcomeWidget.tsx
8
- function f({ icon: e, label: t, value: n }) {
8
+ function f({ icon: e, label: t, value: n, onClick: r }) {
9
9
  return /* @__PURE__ */ s(l, {
10
10
  treatment: "metric",
11
- className: "p-3",
11
+ className: `p-3${r ? " cursor-pointer hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]" : ""}`,
12
+ onClick: r,
13
+ onKeyDown: r ? (e) => {
14
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r?.());
15
+ } : void 0,
16
+ role: r ? "button" : void 0,
17
+ tabIndex: r ? 0 : void 0,
12
18
  children: /* @__PURE__ */ c("div", {
13
19
  className: "flex items-center gap-3",
14
20
  children: [/* @__PURE__ */ s("div", {
@@ -24,10 +30,10 @@ function f({ icon: e, label: t, value: n }) {
24
30
  })
25
31
  });
26
32
  }
27
- function p({ workspaceData: p, globalData: m, isLoading: h }) {
28
- let { t: g } = d(), _ = m?.currentUser, v = _?.firstName || _?.name?.split(" ")[0] || e(g, "dashboard.welcome.fallbackName", "there"), y = (/* @__PURE__ */ new Date()).getHours(), b = y < 12 ? e(g, "dashboard.welcome.greetingMorning", "Good morning") : y < 18 ? e(g, "dashboard.welcome.greetingAfternoon", "Good afternoon") : e(g, "dashboard.welcome.greetingEvening", "Good evening"), x = p?.workspaces.total ?? 0, S = p?.projects.total ?? 0, C = p?.groups.totalCount ?? 0, w = p?.recentActivities.length ?? 0;
33
+ function p({ workspaceData: p, globalData: m, isLoading: h, navigate: g }) {
34
+ let { t: _ } = d(), v = m?.currentUser, y = v?.firstName || v?.name?.split(" ")[0] || e(_, "dashboard.welcome.fallbackName", "there"), b = (/* @__PURE__ */ new Date()).getHours(), x = b < 12 ? e(_, "dashboard.welcome.greetingMorning", "Good morning") : b < 18 ? e(_, "dashboard.welcome.greetingAfternoon", "Good afternoon") : e(_, "dashboard.welcome.greetingEvening", "Good evening"), S = p?.workspaces.total ?? 0, C = p?.projects.total ?? 0, w = p?.groups.totalCount ?? 0, T = p?.recentActivities.length ?? 0;
29
35
  return /* @__PURE__ */ s(t, {
30
- title: e(g, "dashboard.welcome.title", "Dashboard"),
36
+ title: e(_, "dashboard.welcome.title", "Dashboard"),
31
37
  icon: /* @__PURE__ */ s(a, { className: "size-4" }),
32
38
  size: "large",
33
39
  isLoading: h,
@@ -40,37 +46,41 @@ function p({ workspaceData: p, globalData: m, isLoading: h }) {
40
46
  children: [/* @__PURE__ */ c("h2", {
41
47
  className: "text-xl font-bold text-text-primary",
42
48
  children: [
43
- b,
49
+ x,
44
50
  ", ",
45
- /* @__PURE__ */ s(u, { children: v }),
51
+ /* @__PURE__ */ s(u, { children: y }),
46
52
  "!"
47
53
  ]
48
54
  }), /* @__PURE__ */ s("p", {
49
55
  className: "text-sm text-text-secondary mt-1",
50
- children: e(g, "dashboard.welcome.subtitle", "Here's what's happening across your workspaces today.")
56
+ children: e(_, "dashboard.welcome.subtitle", "Here's what's happening across your workspaces today.")
51
57
  })]
52
58
  }), /* @__PURE__ */ c("div", {
53
59
  className: "grid grid-cols-2 sm:grid-cols-4 gap-3",
54
60
  children: [
55
61
  /* @__PURE__ */ s(f, {
56
62
  icon: /* @__PURE__ */ s(r, { className: "size-4" }),
57
- label: e(g, "dashboard.welcome.statWorkspaces", "Workspaces"),
58
- value: x
63
+ label: e(_, "dashboard.welcome.statWorkspaces", "Workspaces"),
64
+ value: S,
65
+ onClick: () => g("/workspaces/list")
59
66
  }),
60
67
  /* @__PURE__ */ s(f, {
61
68
  icon: /* @__PURE__ */ s(i, { className: "size-4" }),
62
- label: e(g, "dashboard.welcome.statProjects", "Projects"),
63
- value: S
69
+ label: e(_, "dashboard.welcome.statProjects", "Projects"),
70
+ value: C,
71
+ onClick: () => g("/workspaces/projects")
64
72
  }),
65
73
  /* @__PURE__ */ s(f, {
66
74
  icon: /* @__PURE__ */ s(o, { className: "size-4" }),
67
- label: e(g, "dashboard.welcome.statGroups", "Groups"),
68
- value: C
75
+ label: e(_, "dashboard.welcome.statGroups", "Groups"),
76
+ value: w,
77
+ onClick: () => g("/groups")
69
78
  }),
70
79
  /* @__PURE__ */ s(f, {
71
80
  icon: /* @__PURE__ */ s(n, { className: "size-4" }),
72
- label: e(g, "dashboard.welcome.statRecentActivity", "Recent Activity"),
73
- value: w
81
+ label: e(_, "dashboard.welcome.statRecentActivity", "Recent Activity"),
82
+ value: T,
83
+ onClick: () => g("/workspaces/activity")
74
84
  })
75
85
  ]
76
86
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"WelcomeWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WelcomeWidget.tsx"],"sourcesContent":["import { LayoutDashboard, Building2, FolderKanban, Users, Activity } from 'lucide-react';\nimport { GlassCard, GradientText } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport { tWithFallback } from '../../../utils/i18n';\nimport type { WidgetProps } from '../types';\n\nfunction StatCard({\n icon,\n label,\n value,\n}: {\n icon: React.ReactNode;\n label: string;\n value: number | string;\n}) {\n return (\n <GlassCard treatment=\"metric\" className=\"p-3\">\n <div className=\"flex items-center gap-3\">\n <div className=\"rounded-md bg-action-primary-bg/10 p-2 text-primary\">{icon}</div>\n <div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">{value}</p>\n <p className=\"text-xs text-text-muted\">{label}</p>\n </div>\n </div>\n </GlassCard>\n );\n}\n\nexport function WelcomeWidget({ workspaceData, globalData, isLoading }: WidgetProps) {\n const { t } = useI18n();\n const user = globalData?.currentUser;\n const firstName =\n user?.firstName ||\n user?.name?.split(' ')[0] ||\n tWithFallback(t, 'dashboard.welcome.fallbackName', 'there');\n const hour = new Date().getHours();\n const greeting =\n hour < 12\n ? tWithFallback(t, 'dashboard.welcome.greetingMorning', 'Good morning')\n : hour < 18\n ? tWithFallback(t, 'dashboard.welcome.greetingAfternoon', 'Good afternoon')\n : tWithFallback(t, 'dashboard.welcome.greetingEvening', 'Good evening');\n\n const totalWorkspaces = workspaceData?.workspaces.total ?? 0;\n const totalProjects = workspaceData?.projects.total ?? 0;\n const totalGroups = workspaceData?.groups.totalCount ?? 0;\n const activityCount = workspaceData?.recentActivities.length ?? 0;\n\n return (\n <WidgetWrapper\n title={tWithFallback(t, 'dashboard.welcome.title', 'Dashboard')}\n icon={<LayoutDashboard className=\"size-4\" />}\n size=\"large\"\n isLoading={isLoading}\n >\n <div className=\"space-y-4\">\n <GlassCard treatment=\"glass\" glow className=\"relative overflow-hidden p-4\">\n <h2 className=\"text-xl font-bold text-text-primary\">\n {greeting}, <GradientText>{firstName}</GradientText>!\n </h2>\n <p className=\"text-sm text-text-secondary mt-1\">\n {tWithFallback(\n t,\n 'dashboard.welcome.subtitle',\n \"Here's what's happening across your workspaces today.\"\n )}\n </p>\n </GlassCard>\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-3\">\n <StatCard\n icon={<Building2 className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statWorkspaces', 'Workspaces')}\n value={totalWorkspaces}\n />\n <StatCard\n icon={<FolderKanban className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statProjects', 'Projects')}\n value={totalProjects}\n />\n <StatCard\n icon={<Users className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statGroups', 'Groups')}\n value={totalGroups}\n />\n <StatCard\n icon={<Activity className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statRecentActivity', 'Recent Activity')}\n value={activityCount}\n />\n </div>\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;;;AAOA,SAAS,EAAS,EAChB,SACA,UACA,YAKC;AACD,QACE,kBAAC,GAAD;EAAW,WAAU;EAAS,WAAU;YACtC,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAuD;IAAW,CAAA,EACjF,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;cAAqD;IAAU,CAAA,EAC5E,kBAAC,KAAD;IAAG,WAAU;cAA2B;IAAU,CAAA,CAC9C,EAAA,CAAA,CACF;;EACI,CAAA;;AAIhB,SAAgB,EAAc,EAAE,kBAAe,eAAY,gBAA0B;CACnF,IAAM,EAAE,SAAM,GAAS,EACjB,IAAO,GAAY,aACnB,IACJ,GAAM,aACN,GAAM,MAAM,MAAM,IAAI,CAAC,MACvB,EAAc,GAAG,kCAAkC,QAAQ,EACvD,qBAAO,IAAI,MAAM,EAAC,UAAU,EAC5B,IACJ,IAAO,KACH,EAAc,GAAG,qCAAqC,eAAe,GACrE,IAAO,KACL,EAAc,GAAG,uCAAuC,iBAAiB,GACzE,EAAc,GAAG,qCAAqC,eAAe,EAEvE,IAAkB,GAAe,WAAW,SAAS,GACrD,IAAgB,GAAe,SAAS,SAAS,GACjD,IAAc,GAAe,OAAO,cAAc,GAClD,IAAgB,GAAe,iBAAiB,UAAU;AAEhE,QACE,kBAAC,GAAD;EACE,OAAO,EAAc,GAAG,2BAA2B,YAAY;EAC/D,MAAM,kBAAC,GAAD,EAAiB,WAAU,UAAW,CAAA;EAC5C,MAAK;EACM;YAEX,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,GAAD;IAAW,WAAU;IAAQ,MAAA;IAAK,WAAU;cAA5C,CACE,kBAAC,MAAD;KAAI,WAAU;eAAd;MACG;MAAS;MAAE,kBAAC,GAAD,EAAA,UAAe,GAAyB,CAAA;;MACjD;QACL,kBAAC,KAAD;KAAG,WAAU;eACV,EACC,GACA,8BACA,wDACD;KACC,CAAA,CACM;OACZ,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD;MACE,MAAM,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA;MACtC,OAAO,EAAc,GAAG,oCAAoC,aAAa;MACzE,OAAO;MACP,CAAA;KACF,kBAAC,GAAD;MACE,MAAM,kBAAC,GAAD,EAAc,WAAU,UAAW,CAAA;MACzC,OAAO,EAAc,GAAG,kCAAkC,WAAW;MACrE,OAAO;MACP,CAAA;KACF,kBAAC,GAAD;MACE,MAAM,kBAAC,GAAD,EAAO,WAAU,UAAW,CAAA;MAClC,OAAO,EAAc,GAAG,gCAAgC,SAAS;MACjE,OAAO;MACP,CAAA;KACF,kBAAC,GAAD;MACE,MAAM,kBAAC,GAAD,EAAU,WAAU,UAAW,CAAA;MACrC,OAAO,EAAc,GAAG,wCAAwC,kBAAkB;MAClF,OAAO;MACP,CAAA;KACE;MACF;;EACQ,CAAA"}
1
+ {"version":3,"file":"WelcomeWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/WelcomeWidget.tsx"],"sourcesContent":["import { LayoutDashboard, Building2, FolderKanban, Users, Activity } from 'lucide-react';\nimport { GlassCard, GradientText } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport { tWithFallback } from '../../../utils/i18n';\nimport type { WidgetProps } from '../types';\n\nfunction StatCard({\n icon,\n label,\n value,\n onClick,\n}: {\n icon: React.ReactNode;\n label: string;\n value: number | string;\n onClick?: () => void;\n}) {\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.();\n }\n };\n\n return (\n <GlassCard\n treatment=\"metric\"\n className={`p-3${onClick ? ' cursor-pointer hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]' : ''}`}\n onClick={onClick}\n onKeyDown={onClick ? handleKeyDown : undefined}\n role={onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"rounded-md bg-action-primary-bg/10 p-2 text-primary\">{icon}</div>\n <div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">{value}</p>\n <p className=\"text-xs text-text-muted\">{label}</p>\n </div>\n </div>\n </GlassCard>\n );\n}\n\nexport function WelcomeWidget({ workspaceData, globalData, isLoading, navigate }: WidgetProps) {\n const { t } = useI18n();\n const user = globalData?.currentUser;\n const firstName =\n user?.firstName ||\n user?.name?.split(' ')[0] ||\n tWithFallback(t, 'dashboard.welcome.fallbackName', 'there');\n const hour = new Date().getHours();\n const greeting =\n hour < 12\n ? tWithFallback(t, 'dashboard.welcome.greetingMorning', 'Good morning')\n : hour < 18\n ? tWithFallback(t, 'dashboard.welcome.greetingAfternoon', 'Good afternoon')\n : tWithFallback(t, 'dashboard.welcome.greetingEvening', 'Good evening');\n\n const totalWorkspaces = workspaceData?.workspaces.total ?? 0;\n const totalProjects = workspaceData?.projects.total ?? 0;\n const totalGroups = workspaceData?.groups.totalCount ?? 0;\n const activityCount = workspaceData?.recentActivities.length ?? 0;\n\n return (\n <WidgetWrapper\n title={tWithFallback(t, 'dashboard.welcome.title', 'Dashboard')}\n icon={<LayoutDashboard className=\"size-4\" />}\n size=\"large\"\n isLoading={isLoading}\n >\n <div className=\"space-y-4\">\n <GlassCard treatment=\"glass\" glow className=\"relative overflow-hidden p-4\">\n <h2 className=\"text-xl font-bold text-text-primary\">\n {greeting}, <GradientText>{firstName}</GradientText>!\n </h2>\n <p className=\"text-sm text-text-secondary mt-1\">\n {tWithFallback(\n t,\n 'dashboard.welcome.subtitle',\n \"Here's what's happening across your workspaces today.\"\n )}\n </p>\n </GlassCard>\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-3\">\n <StatCard\n icon={<Building2 className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statWorkspaces', 'Workspaces')}\n value={totalWorkspaces}\n onClick={() => navigate('/workspaces/list')}\n />\n <StatCard\n icon={<FolderKanban className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statProjects', 'Projects')}\n value={totalProjects}\n onClick={() => navigate('/workspaces/projects')}\n />\n <StatCard\n icon={<Users className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statGroups', 'Groups')}\n value={totalGroups}\n onClick={() => navigate('/groups')}\n />\n <StatCard\n icon={<Activity className=\"size-4\" />}\n label={tWithFallback(t, 'dashboard.welcome.statRecentActivity', 'Recent Activity')}\n value={activityCount}\n onClick={() => navigate('/workspaces/activity')}\n />\n </div>\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;;;AAOA,SAAS,EAAS,EAChB,SACA,UACA,UACA,cAMC;AAQD,QACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAW,MAAM,IAAU,mLAAmL;EACrM;EACT,WAAW,KAZQ,MAA2B;AAChD,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,gBAAgB,EAClB,KAAW;MAS0B,KAAA;EACrC,MAAM,IAAU,WAAW,KAAA;EAC3B,UAAU,IAAU,IAAI,KAAA;YAExB,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAuD;IAAW,CAAA,EACjF,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;cAAqD;IAAU,CAAA,EAC5E,kBAAC,KAAD;IAAG,WAAU;cAA2B;IAAU,CAAA,CAC9C,EAAA,CAAA,CACF;;EACI,CAAA;;AAIhB,SAAgB,EAAc,EAAE,kBAAe,eAAY,cAAW,eAAyB;CAC7F,IAAM,EAAE,SAAM,GAAS,EACjB,IAAO,GAA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SAAS;MACjE,OAAO;MACP,eAAe,EAAS,UAAU;MAClC,CAAA;KACF,kBAAC,GAAD;MACE,MAAM,kBAAC,GAAD,EAAU,WAAU,UAAW,CAAA;MACrC,OAAO,EAAc,GAAG,wCAAwC,kBAAkB;MAClF,OAAO;MACP,eAAe,EAAS,uBAAuB;MAC/C,CAAA;KACE;MACF;;EACQ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-workspaces",
3
- "version": "2026.830.2",
3
+ "version": "2026.915.1",
4
4
  "description": "Workspaces microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [