@burdenoff/microfe-organization 2026.625.2 → 2026.626.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.
Files changed (37) hide show
  1. package/dist/organization-management/modules/members/components/InviteStatusBadge.js +6 -2
  2. package/dist/organization-management/modules/members/components/InviteStatusBadge.js.map +1 -1
  3. package/dist/organization-management/modules/members/pages/InviteMemberPage.js +58 -53
  4. package/dist/organization-management/modules/members/pages/InviteMemberPage.js.map +1 -1
  5. package/dist/organization-management/modules/members/pages/InvitePeoplePage.js +56 -52
  6. package/dist/organization-management/modules/members/pages/InvitePeoplePage.js.map +1 -1
  7. package/dist/organization-management/modules/members/pages/MemberDetailPage.js +72 -68
  8. package/dist/organization-management/modules/members/pages/MemberDetailPage.js.map +1 -1
  9. package/dist/organization-management/modules/members/pages/MembersListPage.js +232 -225
  10. package/dist/organization-management/modules/members/pages/MembersListPage.js.map +1 -1
  11. package/dist/organization-management/modules/members/pages/MyInvitesPage.js +172 -182
  12. package/dist/organization-management/modules/members/pages/MyInvitesPage.js.map +1 -1
  13. package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js +132 -128
  14. package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js.map +1 -1
  15. package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js +5 -1
  16. package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js.map +1 -1
  17. package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js +42 -37
  18. package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js.map +1 -1
  19. package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +316 -266
  20. package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
  21. package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js +52 -47
  22. package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js.map +1 -1
  23. package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +108 -96
  24. package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
  25. package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js +5 -1
  26. package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js.map +1 -1
  27. package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js +43 -38
  28. package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js.map +1 -1
  29. package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js +341 -286
  30. package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js.map +1 -1
  31. package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js +50 -45
  32. package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js.map +1 -1
  33. package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +219 -209
  34. package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
  35. package/package.json +2 -2
  36. package/dist/organization-management/shared/components/feedback/EmptyState.js +0 -31
  37. package/dist/organization-management/shared/components/feedback/EmptyState.js.map +0 -1
@@ -3,23 +3,22 @@ import { toast as t } from "../../../../node_modules/sonner/dist/index.js";
3
3
  import { useTr as n } from "../../../shared/hooks/useTr.js";
4
4
  import { LoadingState as r } from "../../../shared/components/feedback/LoadingState.js";
5
5
  import { ErrorState as i } from "../../../shared/components/feedback/ErrorState.js";
6
- import { EmptyState as ee } from "../../../shared/components/feedback/EmptyState.js";
7
6
  import { useConfirmDialog as a } from "../../../shared/components/dialog/ConfirmDialog.js";
8
7
  import { PERMISSIONS as o } from "../../../constants/permissions.js";
9
8
  import { MemberRoleBadge as s } from "../../members/components/MemberRoleBadge.js";
10
- import { useWorkspace as c } from "../hooks/useWorkspaces.js";
11
- import { WorkspaceStatusBadge as l } from "../components/WorkspaceStatusBadge.js";
12
- import { useRemoveWorkspaceMember as u, useWorkspaceMembers as d } from "../hooks/useWorkspaceMembers.js";
13
- import { AddWorkspaceMemberDialog as f } from "../components/AddWorkspaceMemberDialog.js";
14
- import { useMemo as p, useState as m } from "react";
15
- import { ArrowLeft as h, Briefcase as g, Edit as _, Trash2 as v, UserPlus as te, Users as y } from "lucide-react";
16
- import { CTAOverflowMenu as b, EmphasisPanel as x, GlassCard as S, ResponsiveTable as C } from "@burdenoff/fe-libs/ui";
17
- import { usePermissions as ne } from "@burdenoff/fe-libs/shared/providers/shell";
18
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
19
- import { useParams as E } from "react-router-dom";
20
- import { ActorIdentity as D, buildActorFallback as O, useActorProfiles as k } from "@burdenoff/fe-libs/shared";
9
+ import { useWorkspace as ee } from "../hooks/useWorkspaces.js";
10
+ import { WorkspaceStatusBadge as c } from "../components/WorkspaceStatusBadge.js";
11
+ import { useRemoveWorkspaceMember as l, useWorkspaceMembers as u } from "../hooks/useWorkspaceMembers.js";
12
+ import { AddWorkspaceMemberDialog as d } from "../components/AddWorkspaceMemberDialog.js";
13
+ import { useMemo as f, useState as p } from "react";
14
+ import { ArrowLeft as m, Briefcase as h, Edit as g, Trash2 as _, UserPlus as v, Users as y } from "lucide-react";
15
+ import { CTAOverflowMenu as b, EmphasisPanel as x, GlassCard as S, IllustratedEmptyState as C, NextSteps as w, PagePurpose as T, ResponsiveTable as E } from "@burdenoff/fe-libs/ui";
16
+ import { usePermissions as te } from "@burdenoff/fe-libs/shared/providers/shell";
17
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
18
+ import { useParams as ne } from "react-router-dom";
19
+ import { ActorIdentity as re, buildActorFallback as k, useActorProfiles as A } from "@burdenoff/fe-libs/shared";
21
20
  //#region src/organization-management/modules/workspaces/pages/WorkspaceDetailPage.tsx
22
- function A(e) {
21
+ function j(e) {
23
22
  return new Date(e).toLocaleDateString("en-US", {
24
23
  year: "numeric",
25
24
  month: "long",
@@ -28,46 +27,46 @@ function A(e) {
28
27
  minute: "2-digit"
29
28
  });
30
29
  }
31
- function j() {
32
- let j = n(), { id: M } = E(), { navigate: N, basePath: P = "/organizations", apiGatewayUrl: F, authToken: I } = e(), { hasPermission: L, isLoading: R } = ne(), { workspace: z, loading: B, error: V } = c(M ?? ""), [H, U] = m("overview"), [W, G] = m(!1), { openConfirmDialog: K, ConfirmDialog: q } = a(), { members: J, loading: Y, error: X, refetch: Z } = d(H === "members" && M ? M ?? "" : "", 50, 0), { removeWorkspaceMember: Q, loading: re } = u(), $ = J.length > 0 || H === "members" ? J.length : z?.memberCount ?? 0, ie = k(p(() => J.map((e) => ({
30
+ function M() {
31
+ let M = n(), { id: N } = ne(), { navigate: P, basePath: F = "/organizations", apiGatewayUrl: I, authToken: L } = e(), { hasPermission: R, isLoading: z } = te(), { workspace: B, loading: V, error: H } = ee(N ?? ""), [U, W] = p("overview"), [G, K] = p(!1), { openConfirmDialog: q, ConfirmDialog: J } = a(), { members: Y, loading: X, error: Z, refetch: Q } = u(U === "members" && N ? N ?? "" : "", 50, 0), { removeWorkspaceMember: ie, loading: ae } = l(), $ = Y.length > 0 || U === "members" ? Y.length : B?.memberCount ?? 0, oe = A(f(() => Y.map((e) => ({
33
32
  actorId: e.userId,
34
33
  actorType: "user"
35
- })), [J]), {
36
- apiGatewayUrl: F,
37
- authToken: I,
38
- orgId: z?.organizationId,
39
- workspaceId: M
40
- }), ae = p(() => [{
34
+ })), [Y]), {
35
+ apiGatewayUrl: I,
36
+ authToken: L,
37
+ orgId: B?.organizationId,
38
+ workspaceId: N
39
+ }), se = f(() => [{
41
40
  id: "overview",
42
- label: j("workspaces.detail.tab.overview", "Overview")
41
+ label: M("workspaces.detail.tab.overview", "Overview")
43
42
  }, {
44
43
  id: "members",
45
- label: `${j("workspaces.detail.tab.members", "Members")} (${$})`
46
- }], [$, j]), oe = (e) => {
47
- M && K({
48
- title: j("workspaces.removeMember.title", "Remove workspace member"),
49
- description: `${j("workspaces.removeMember.prefix", "Remove")} ${e} ${j("workspaces.removeMember.suffix", "from this workspace? They will keep their organization membership.")}`,
50
- confirmText: j("common.remove", "Remove"),
44
+ label: `${M("workspaces.detail.tab.members", "Members")} (${$})`
45
+ }], [$, M]), ce = (e) => {
46
+ N && q({
47
+ title: M("workspaces.removeMember.title", "Remove workspace member"),
48
+ description: `${M("workspaces.removeMember.prefix", "Remove")} ${e} ${M("workspaces.removeMember.suffix", "from this workspace? They will keep their organization membership.")}`,
49
+ confirmText: M("common.remove", "Remove"),
51
50
  variant: "danger",
52
51
  onConfirm: () => {
53
52
  (async () => {
54
53
  try {
55
- let n = await Q(M, e);
56
- if (n.errors?.length) throw Error(n.errors[0]?.message ?? j("workspaces.removeMember.failed", "Failed to remove workspace member"));
57
- await Z(), t.success(j("workspaces.removeMember.success", "Workspace member removed successfully"));
54
+ let n = await ie(N, e);
55
+ if (n.errors?.length) throw Error(n.errors[0]?.message ?? M("workspaces.removeMember.failed", "Failed to remove workspace member"));
56
+ await Q(), t.success(M("workspaces.removeMember.success", "Workspace member removed successfully"));
58
57
  } catch (e) {
59
- t.error(e instanceof Error ? e.message : j("workspaces.removeMember.failed", "Failed to remove workspace member"));
58
+ t.error(e instanceof Error ? e.message : M("workspaces.removeMember.failed", "Failed to remove workspace member"));
60
59
  }
61
60
  })();
62
61
  }
63
62
  });
64
- }, se = [
63
+ }, le = [
65
64
  {
66
65
  key: "user",
67
- header: j("members.detail.userId", "User ID"),
66
+ header: M("members.detail.userId", "User ID"),
68
67
  priority: "primary",
69
- cell: (e) => /* @__PURE__ */ w(D, {
70
- profile: ie[e.userId] ?? O({
68
+ cell: (e) => /* @__PURE__ */ D(re, {
69
+ profile: oe[e.userId] ?? k({
71
70
  actorId: e.userId,
72
71
  actorType: "user"
73
72
  }),
@@ -76,305 +75,361 @@ function j() {
76
75
  },
77
76
  {
78
77
  key: "role",
79
- header: j("members.list.column.role", "Role"),
78
+ header: M("members.list.column.role", "Role"),
80
79
  priority: "secondary",
81
- cell: (e) => /* @__PURE__ */ w(s, { role: e.role })
80
+ cell: (e) => /* @__PURE__ */ D(s, { role: e.role })
82
81
  },
83
82
  {
84
83
  key: "joined",
85
- header: j("members.list.joined", "Joined"),
84
+ header: M("members.list.joined", "Joined"),
86
85
  priority: "secondary",
87
- cell: (e) => /* @__PURE__ */ w("span", {
86
+ cell: (e) => /* @__PURE__ */ D("span", {
88
87
  className: "text-sm text-[var(--color-text-secondary)]",
89
- children: A(e.joinedAt)
88
+ children: j(e.joinedAt)
90
89
  })
91
90
  },
92
91
  {
93
92
  key: "invitedBy",
94
- header: j("members.list.invitedBy", "Invited by"),
93
+ header: M("members.list.invitedBy", "Invited by"),
95
94
  priority: "secondary",
96
- cell: (e) => /* @__PURE__ */ w("span", {
95
+ cell: (e) => /* @__PURE__ */ D("span", {
97
96
  className: "break-all font-mono text-sm text-[var(--color-text-secondary)]",
98
97
  children: e.invitedBy || "—"
99
98
  })
100
99
  }
101
- ];
102
- return R ? /* @__PURE__ */ w("div", {
100
+ ], ue = (e) => /* @__PURE__ */ D("button", {
101
+ type: "button",
102
+ onClick: () => ce(e.userId),
103
+ disabled: ae,
104
+ className: "rounded-lg p-2 text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
105
+ "aria-label": `${M("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${M("workspaces.removeMember.ariaSuffix", "from workspace")}`,
106
+ title: `${M("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${M("workspaces.removeMember.ariaSuffix", "from workspace")}`,
107
+ children: /* @__PURE__ */ D(_, {
108
+ size: 18,
109
+ "aria-hidden": "true"
110
+ })
111
+ });
112
+ return z ? /* @__PURE__ */ D("div", {
103
113
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
104
- children: /* @__PURE__ */ w(r, { message: j("common.loadingPermissions", "Loading permissions...") })
105
- }) : L(o.WORKSPACE_READ) ? B ? /* @__PURE__ */ w("div", {
114
+ children: /* @__PURE__ */ D(r, { message: M("common.loadingPermissions", "Loading permissions...") })
115
+ }) : R(o.WORKSPACE_READ) ? V ? /* @__PURE__ */ D("div", {
106
116
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
107
- children: /* @__PURE__ */ w(r, { message: j("workspaces.detail.loading", "Loading workspace details...") })
108
- }) : V || !z ? /* @__PURE__ */ w("div", {
117
+ children: /* @__PURE__ */ D(r, { message: M("workspaces.detail.loading", "Loading workspace details...") })
118
+ }) : H || !B ? /* @__PURE__ */ D("div", {
109
119
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
110
- children: /* @__PURE__ */ w(i, {
111
- message: V?.message || j("workspaces.detail.notFound", "Workspace not found"),
120
+ children: /* @__PURE__ */ D(i, {
121
+ message: H?.message || M("workspaces.detail.notFound", "Workspace not found"),
112
122
  action: {
113
- label: j("workspaces.create.backToWorkspaces", "Back to Workspaces"),
114
- onClick: () => N(`${P}/workspaces`)
123
+ label: M("workspaces.create.backToWorkspaces", "Back to Workspaces"),
124
+ onClick: () => P(`${F}/workspaces`)
115
125
  }
116
126
  })
117
- }) : /* @__PURE__ */ T("div", {
127
+ }) : /* @__PURE__ */ O("div", {
118
128
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6 animate-in fade-in duration-200",
119
129
  children: [
120
- /* @__PURE__ */ T("div", {
130
+ /* @__PURE__ */ O("div", {
121
131
  className: "mx-auto flex w-full max-w-7xl flex-col gap-6",
122
- children: [/* @__PURE__ */ T("div", {
123
- className: "space-y-4",
124
- children: [/* @__PURE__ */ T("button", {
125
- type: "button",
126
- onClick: () => N(`${P}/workspaces`),
127
- className: "inline-flex min-h-10 items-center gap-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:text-[var(--color-text-primary)]",
128
- children: [/* @__PURE__ */ w(h, {
129
- size: 20,
130
- "aria-hidden": "true"
131
- }), /* @__PURE__ */ w("span", {
132
- className: "text-sm font-medium",
133
- children: j("workspaces.create.backToWorkspaces", "Back to Workspaces")
134
- })]
135
- }), /* @__PURE__ */ T(x, {
136
- className: "flex flex-col gap-4 p-5 lg:flex-row lg:items-start lg:justify-between",
137
- children: [/* @__PURE__ */ T("div", {
138
- className: "flex min-w-0 items-start gap-4",
139
- children: [/* @__PURE__ */ w("div", {
140
- className: "flex size-16 items-center justify-center rounded-xl bg-[var(--color-status-info-bgSubtle)] text-[var(--color-status-info-text)]",
141
- children: /* @__PURE__ */ w(g, {
142
- size: 28,
143
- "aria-hidden": "true"
144
- })
145
- }), /* @__PURE__ */ T("div", {
146
- className: "min-w-0 space-y-2",
147
- children: [/* @__PURE__ */ T("div", {
148
- className: "flex flex-wrap items-start gap-2",
149
- children: [/* @__PURE__ */ w("h1", {
150
- className: "text-3xl font-bold text-[var(--color-text-primary)]",
151
- children: z.name
152
- }), /* @__PURE__ */ w(l, { status: z.status })]
153
- }), /* @__PURE__ */ T("p", {
154
- className: "break-all font-mono text-sm text-[var(--color-text-secondary)]",
155
- children: ["/", z.slug]
132
+ children: [
133
+ /* @__PURE__ */ O("div", {
134
+ className: "space-y-4",
135
+ children: [/* @__PURE__ */ O("button", {
136
+ type: "button",
137
+ onClick: () => P(`${F}/workspaces`),
138
+ className: "inline-flex min-h-10 items-center gap-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:text-[var(--color-text-primary)]",
139
+ children: [/* @__PURE__ */ D(m, {
140
+ size: 20,
141
+ "aria-hidden": "true"
142
+ }), /* @__PURE__ */ D("span", {
143
+ className: "text-sm font-medium",
144
+ children: M("workspaces.create.backToWorkspaces", "Back to Workspaces")
145
+ })]
146
+ }), /* @__PURE__ */ O(x, {
147
+ className: "flex flex-col gap-4 p-5 lg:flex-row lg:items-start lg:justify-between",
148
+ children: [/* @__PURE__ */ O("div", {
149
+ className: "flex min-w-0 items-start gap-4",
150
+ children: [/* @__PURE__ */ D("div", {
151
+ className: "flex size-16 items-center justify-center rounded-xl bg-[var(--color-status-info-bgSubtle)] text-[var(--color-status-info-text)]",
152
+ children: /* @__PURE__ */ D(h, {
153
+ size: 28,
154
+ "aria-hidden": "true"
155
+ })
156
+ }), /* @__PURE__ */ O("div", {
157
+ className: "min-w-0 space-y-2",
158
+ children: [
159
+ /* @__PURE__ */ O("div", {
160
+ className: "flex flex-wrap items-start gap-2",
161
+ children: [/* @__PURE__ */ D("h1", {
162
+ className: "text-3xl font-bold text-[var(--color-text-primary)]",
163
+ children: B.name
164
+ }), /* @__PURE__ */ D(c, { status: B.status })]
165
+ }),
166
+ /* @__PURE__ */ O("p", {
167
+ className: "break-all font-mono text-sm text-[var(--color-text-secondary)]",
168
+ children: ["/", B.slug]
169
+ }),
170
+ /* @__PURE__ */ D(T, {
171
+ className: "max-w-2xl",
172
+ children: M("workspaces.detail.purpose", "This is one workspace — a focused space where a team collaborates. Review its details here, switch to the Members tab to control who has access, or edit its settings. Use this page to keep the right people in and the workspace healthy.")
173
+ })
174
+ ]
156
175
  })]
176
+ }), /* @__PURE__ */ D(b, {
177
+ primary: R(o.WORKSPACE_UPDATE) ? {
178
+ label: M("workspaces.edit.title", "Edit Workspace"),
179
+ icon: /* @__PURE__ */ D(g, {
180
+ size: 16,
181
+ "aria-hidden": "true"
182
+ }),
183
+ onSelect: () => P(`${F}/workspaces/${N}/edit`)
184
+ } : void 0,
185
+ actions: [{
186
+ label: M("workspaces.detail.viewOrganization", "View Organization"),
187
+ icon: /* @__PURE__ */ D(y, {
188
+ size: 16,
189
+ "aria-hidden": "true"
190
+ }),
191
+ onSelect: () => P(`${F}/${B.organizationId}`)
192
+ }]
157
193
  })]
158
- }), /* @__PURE__ */ w(b, {
159
- primary: L(o.WORKSPACE_UPDATE) ? {
160
- label: j("workspaces.edit.title", "Edit Workspace"),
161
- icon: /* @__PURE__ */ w(_, {
194
+ })]
195
+ }),
196
+ /* @__PURE__ */ D(w, {
197
+ storageKey: "organization-workspace-detail",
198
+ steps: [
199
+ ...R(o.MEMBER_INVITE) ? [{
200
+ id: "add-member",
201
+ label: M("workspaces.detail.next.addMember", "Add a member"),
202
+ description: M("workspaces.detail.next.addMemberDesc", "Bring people from the parent organization into this workspace."),
203
+ icon: /* @__PURE__ */ D(v, {
162
204
  size: 16,
163
205
  "aria-hidden": "true"
164
206
  }),
165
- onSelect: () => N(`${P}/workspaces/${M}/edit`)
166
- } : void 0,
167
- actions: [{
168
- label: j("workspaces.detail.viewOrganization", "View Organization"),
169
- icon: /* @__PURE__ */ w(y, {
207
+ onClick: () => {
208
+ W("members"), K(!0);
209
+ }
210
+ }] : [],
211
+ {
212
+ id: "review-members",
213
+ label: M("workspaces.detail.next.reviewMembers", "Review members & access"),
214
+ description: M("workspaces.detail.next.reviewMembersDesc", "See who can access this workspace and their roles."),
215
+ icon: /* @__PURE__ */ D(y, {
170
216
  size: 16,
171
217
  "aria-hidden": "true"
172
218
  }),
173
- onSelect: () => N(`${P}/${z.organizationId}`)
174
- }]
175
- })]
176
- })]
177
- }), /* @__PURE__ */ T(S, {
178
- treatment: "plain",
179
- className: "border-border-seam p-0",
180
- children: [/* @__PURE__ */ w("div", {
181
- className: "overflow-x-auto border-b border-[var(--color-border-seam)]",
182
- children: /* @__PURE__ */ w("div", {
183
- className: "flex min-w-max gap-2 px-4 pt-4 sm:px-6",
184
- children: ae.map((e) => {
185
- let t = H === e.id;
186
- return /* @__PURE__ */ w("button", {
187
- type: "button",
188
- onClick: () => U(e.id),
189
- className: `inline-flex min-h-11 items-center rounded-t-lg border-b-2 px-4 py-3 text-sm font-medium transition-colors ${t ? "border-[var(--color-action-primary-bg)] text-[var(--color-action-primary-bg)]" : "border-transparent text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]"}`,
190
- "aria-pressed": t,
191
- children: e.label
192
- }, e.id);
219
+ onClick: () => W("members")
220
+ },
221
+ ...R(o.WORKSPACE_UPDATE) ? [{
222
+ id: "edit",
223
+ label: M("workspaces.detail.next.edit", "Edit workspace settings"),
224
+ description: M("workspaces.detail.next.editDesc", "Update the name, slug, or status of this workspace."),
225
+ icon: /* @__PURE__ */ D(g, {
226
+ size: 16,
227
+ "aria-hidden": "true"
228
+ }),
229
+ onClick: () => P(`${F}/workspaces/${N}/edit`)
230
+ }] : [],
231
+ {
232
+ id: "view-org",
233
+ label: M("workspaces.detail.next.viewOrg", "Open the parent organization"),
234
+ description: M("workspaces.detail.next.viewOrgDesc", "Jump to the organization this workspace belongs to."),
235
+ icon: /* @__PURE__ */ D(h, {
236
+ size: 16,
237
+ "aria-hidden": "true"
238
+ }),
239
+ onClick: () => P(`${F}/${B.organizationId}`)
240
+ }
241
+ ]
242
+ }),
243
+ /* @__PURE__ */ O(S, {
244
+ treatment: "plain",
245
+ className: "border-border-seam p-0",
246
+ children: [/* @__PURE__ */ D("div", {
247
+ className: "overflow-x-auto border-b border-[var(--color-border-seam)]",
248
+ children: /* @__PURE__ */ D("div", {
249
+ className: "flex min-w-max gap-2 px-4 pt-4 sm:px-6",
250
+ children: se.map((e) => {
251
+ let t = U === e.id;
252
+ return /* @__PURE__ */ D("button", {
253
+ type: "button",
254
+ onClick: () => W(e.id),
255
+ className: `inline-flex min-h-11 items-center rounded-t-lg border-b-2 px-4 py-3 text-sm font-medium transition-colors ${t ? "border-[var(--color-action-primary-bg)] text-[var(--color-action-primary-bg)]" : "border-transparent text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]"}`,
256
+ "aria-pressed": t,
257
+ children: e.label
258
+ }, e.id);
259
+ })
193
260
  })
194
- })
195
- }), /* @__PURE__ */ w("div", {
196
- className: "p-4 sm:p-6",
197
- children: H === "overview" ? /* @__PURE__ */ T("div", {
198
- className: "grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1fr)_320px]",
199
- children: [/* @__PURE__ */ T(S, {
200
- treatment: "plain",
201
- className: "border-border-seam bg-[var(--color-bg-canvas)] p-5",
202
- children: [/* @__PURE__ */ w("h2", {
203
- className: "text-lg font-semibold text-[var(--color-text-primary)]",
204
- children: j("workspaces.detail.detailsSection", "Workspace details")
205
- }), /* @__PURE__ */ T("dl", {
206
- className: "mt-5 grid grid-cols-1 gap-4 sm:grid-cols-2",
207
- children: [
208
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
209
- className: "text-sm font-medium text-[var(--color-text-secondary)]",
210
- children: j("common.name", "Name")
211
- }), /* @__PURE__ */ w("dd", {
212
- className: "mt-1 text-sm text-[var(--color-text-primary)]",
213
- children: z.name
214
- })] }),
215
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
216
- className: "text-sm font-medium text-[var(--color-text-secondary)]",
217
- children: j("common.slug", "Slug")
218
- }), /* @__PURE__ */ w("dd", {
219
- className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
220
- children: z.slug
221
- })] }),
222
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
223
- className: "text-sm font-medium text-[var(--color-text-secondary)]",
224
- children: j("common.status", "Status")
225
- }), /* @__PURE__ */ w("dd", {
226
- className: "mt-1",
227
- children: /* @__PURE__ */ w(l, { status: z.status })
228
- })] }),
229
- /* @__PURE__ */ T("div", {
230
- className: "sm:col-span-2",
231
- children: [/* @__PURE__ */ w("dt", {
261
+ }), /* @__PURE__ */ D("div", {
262
+ className: "p-4 sm:p-6",
263
+ children: U === "overview" ? /* @__PURE__ */ O("div", {
264
+ className: "grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1fr)_320px]",
265
+ children: [/* @__PURE__ */ O(S, {
266
+ treatment: "plain",
267
+ className: "border-border-seam bg-[var(--color-bg-canvas)] p-5",
268
+ children: [/* @__PURE__ */ D("h2", {
269
+ className: "text-lg font-semibold text-[var(--color-text-primary)]",
270
+ children: M("workspaces.detail.detailsSection", "Workspace details")
271
+ }), /* @__PURE__ */ O("dl", {
272
+ className: "mt-5 grid grid-cols-1 gap-4 sm:grid-cols-2",
273
+ children: [
274
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
232
275
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
233
- children: j("members.detail.orgId", "Organization ID")
234
- }), /* @__PURE__ */ w("dd", {
235
- className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
236
- children: z.organizationId
237
- })]
238
- }),
239
- z.endpoint ? /* @__PURE__ */ T("div", {
240
- className: "sm:col-span-2",
241
- children: [/* @__PURE__ */ w("dt", {
276
+ children: M("common.name", "Name")
277
+ }), /* @__PURE__ */ D("dd", {
278
+ className: "mt-1 text-sm text-[var(--color-text-primary)]",
279
+ children: B.name
280
+ })] }),
281
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
242
282
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
243
- children: j("workspaces.detail.endpoint", "Endpoint")
244
- }), /* @__PURE__ */ w("dd", {
283
+ children: M("common.slug", "Slug")
284
+ }), /* @__PURE__ */ D("dd", {
245
285
  className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
246
- children: z.endpoint
247
- })]
248
- }) : null
249
- ]
250
- })]
251
- }), /* @__PURE__ */ T(S, {
252
- treatment: "plain",
253
- className: "border-border-seam bg-[var(--color-bg-canvas)] p-5 xl:sticky xl:top-6 xl:self-start",
254
- children: [/* @__PURE__ */ w("h2", {
255
- className: "text-lg font-semibold text-[var(--color-text-primary)]",
256
- children: j("common.metadata", "Metadata")
257
- }), /* @__PURE__ */ T("dl", {
258
- className: "mt-5 space-y-4",
259
- children: [
260
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
261
- className: "text-sm font-medium text-[var(--color-text-secondary)]",
262
- children: j("workspaces.list.members", "Members")
263
- }), /* @__PURE__ */ w("dd", {
264
- className: "mt-1 text-sm text-[var(--color-text-primary)]",
265
- children: $
266
- })] }),
267
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
268
- className: "text-sm font-medium text-[var(--color-text-secondary)]",
269
- children: j("common.created", "Created")
270
- }), /* @__PURE__ */ w("dd", {
271
- className: "mt-1 text-sm text-[var(--color-text-primary)]",
272
- children: A(z.createdAt)
273
- })] }),
274
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
275
- className: "text-sm font-medium text-[var(--color-text-secondary)]",
276
- children: j("common.lastUpdated", "Last updated")
277
- }), /* @__PURE__ */ w("dd", {
278
- className: "mt-1 text-sm text-[var(--color-text-primary)]",
279
- children: A(z.updatedAt)
280
- })] }),
281
- z.region ? /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
282
- className: "text-sm font-medium text-[var(--color-text-secondary)]",
283
- children: j("workspaces.detail.region", "Region")
284
- }), /* @__PURE__ */ w("dd", {
285
- className: "mt-1 text-sm text-[var(--color-text-primary)]",
286
- children: z.region
287
- })] }) : null
288
- ]
289
- })]
290
- })]
291
- }) : /* @__PURE__ */ T("section", {
292
- className: "space-y-4",
293
- children: [/* @__PURE__ */ T("div", {
294
- className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
295
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h2", {
296
- className: "text-lg font-semibold text-[var(--color-text-primary)]",
297
- children: j("workspaces.detail.membersTitle", "Workspace members")
298
- }), /* @__PURE__ */ w("p", {
299
- className: "text-sm text-[var(--color-text-secondary)]",
300
- children: j("workspaces.detail.membersSubtitle", "Add organization members to this workspace and manage access.")
301
- })] }), L(o.MEMBER_INVITE) && /* @__PURE__ */ T("button", {
302
- type: "button",
303
- onClick: () => G(!0),
304
- className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2.5 text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90",
305
- children: [/* @__PURE__ */ w(te, {
306
- size: 16,
307
- "aria-hidden": "true"
308
- }), /* @__PURE__ */ w("span", { children: j("workspaces.detail.addMember", "Add Member") })]
286
+ children: B.slug
287
+ })] }),
288
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
289
+ className: "text-sm font-medium text-[var(--color-text-secondary)]",
290
+ children: M("common.status", "Status")
291
+ }), /* @__PURE__ */ D("dd", {
292
+ className: "mt-1",
293
+ children: /* @__PURE__ */ D(c, { status: B.status })
294
+ })] }),
295
+ /* @__PURE__ */ O("div", {
296
+ className: "sm:col-span-2",
297
+ children: [/* @__PURE__ */ D("dt", {
298
+ className: "text-sm font-medium text-[var(--color-text-secondary)]",
299
+ children: M("members.detail.orgId", "Organization ID")
300
+ }), /* @__PURE__ */ D("dd", {
301
+ className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
302
+ children: B.organizationId
303
+ })]
304
+ }),
305
+ B.endpoint ? /* @__PURE__ */ O("div", {
306
+ className: "sm:col-span-2",
307
+ children: [/* @__PURE__ */ D("dt", {
308
+ className: "text-sm font-medium text-[var(--color-text-secondary)]",
309
+ children: M("workspaces.detail.endpoint", "Endpoint")
310
+ }), /* @__PURE__ */ D("dd", {
311
+ className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
312
+ children: B.endpoint
313
+ })]
314
+ }) : null
315
+ ]
316
+ })]
317
+ }), /* @__PURE__ */ O(S, {
318
+ treatment: "plain",
319
+ className: "border-border-seam bg-[var(--color-bg-canvas)] p-5 xl:sticky xl:top-6 xl:self-start",
320
+ children: [/* @__PURE__ */ D("h2", {
321
+ className: "text-lg font-semibold text-[var(--color-text-primary)]",
322
+ children: M("common.metadata", "Metadata")
323
+ }), /* @__PURE__ */ O("dl", {
324
+ className: "mt-5 space-y-4",
325
+ children: [
326
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
327
+ className: "text-sm font-medium text-[var(--color-text-secondary)]",
328
+ children: M("workspaces.list.members", "Members")
329
+ }), /* @__PURE__ */ D("dd", {
330
+ className: "mt-1 text-sm text-[var(--color-text-primary)]",
331
+ children: $
332
+ })] }),
333
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
334
+ className: "text-sm font-medium text-[var(--color-text-secondary)]",
335
+ children: M("common.created", "Created")
336
+ }), /* @__PURE__ */ D("dd", {
337
+ className: "mt-1 text-sm text-[var(--color-text-primary)]",
338
+ children: j(B.createdAt)
339
+ })] }),
340
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
341
+ className: "text-sm font-medium text-[var(--color-text-secondary)]",
342
+ children: M("common.lastUpdated", "Last updated")
343
+ }), /* @__PURE__ */ D("dd", {
344
+ className: "mt-1 text-sm text-[var(--color-text-primary)]",
345
+ children: j(B.updatedAt)
346
+ })] }),
347
+ B.region ? /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
348
+ className: "text-sm font-medium text-[var(--color-text-secondary)]",
349
+ children: M("workspaces.detail.region", "Region")
350
+ }), /* @__PURE__ */ D("dd", {
351
+ className: "mt-1 text-sm text-[var(--color-text-primary)]",
352
+ children: B.region
353
+ })] }) : null
354
+ ]
355
+ })]
309
356
  })]
310
- }), Y ? /* @__PURE__ */ w("div", {
311
- className: "py-8",
312
- children: /* @__PURE__ */ w(r, { message: j("workspaces.detail.loadingMembers", "Loading workspace members...") })
313
- }) : X ? /* @__PURE__ */ w(i, {
314
- message: X.message,
315
- action: {
316
- label: j("common.retry", "Retry"),
317
- onClick: () => {
318
- Z();
319
- }
320
- }
321
- }) : J.length > 0 ? /* @__PURE__ */ w("div", {
322
- className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-bg-canvas)] md:p-2",
323
- children: /* @__PURE__ */ w(C, {
324
- columns: se,
325
- data: J,
326
- rowKey: (e) => e.id,
327
- rowActions: (e) => /* @__PURE__ */ w("button", {
357
+ }) : /* @__PURE__ */ O("section", {
358
+ className: "space-y-4",
359
+ children: [/* @__PURE__ */ O("div", {
360
+ className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
361
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
362
+ className: "text-lg font-semibold text-[var(--color-text-primary)]",
363
+ children: M("workspaces.detail.membersTitle", "Workspace members")
364
+ }), /* @__PURE__ */ D("p", {
365
+ className: "text-sm text-[var(--color-text-secondary)]",
366
+ children: M("workspaces.detail.membersSubtitle", "Add organization members to this workspace and manage access.")
367
+ })] }), R(o.MEMBER_INVITE) && /* @__PURE__ */ O("button", {
328
368
  type: "button",
329
- onClick: () => oe(e.userId),
330
- disabled: re,
331
- className: "rounded-lg p-2 text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
332
- "aria-label": `${j("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${j("workspaces.removeMember.ariaSuffix", "from workspace")}`,
333
- title: `${j("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${j("workspaces.removeMember.ariaSuffix", "from workspace")}`,
334
- children: /* @__PURE__ */ w(v, {
335
- size: 18,
369
+ onClick: () => K(!0),
370
+ className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2.5 text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90",
371
+ children: [/* @__PURE__ */ D(v, {
372
+ size: 16,
336
373
  "aria-hidden": "true"
337
- })
338
- })
339
- })
340
- }) : /* @__PURE__ */ w("div", {
341
- className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-6",
342
- children: /* @__PURE__ */ w(ee, {
343
- icon: /* @__PURE__ */ w(y, {
344
- size: 40,
345
- "aria-hidden": "true"
346
- }),
347
- title: j("workspaces.detail.emptyMembersTitle", "No workspace members yet"),
348
- description: j("workspaces.detail.emptyMembersDescription", "Add people from the parent organization to grant workspace access."),
374
+ }), /* @__PURE__ */ D("span", { children: M("workspaces.detail.addMember", "Add Member") })]
375
+ })]
376
+ }), X ? /* @__PURE__ */ D("div", {
377
+ className: "py-8",
378
+ children: /* @__PURE__ */ D(r, { message: M("workspaces.detail.loadingMembers", "Loading workspace members...") })
379
+ }) : Z ? /* @__PURE__ */ D(i, {
380
+ message: Z.message,
349
381
  action: {
350
- label: j("workspaces.detail.addMember", "Add Member"),
351
- onClick: () => G(!0)
382
+ label: M("common.retry", "Retry"),
383
+ onClick: () => {
384
+ Q();
385
+ }
352
386
  }
353
- })
354
- })]
355
- })
356
- })]
357
- })]
387
+ }) : Y.length > 0 ? /* @__PURE__ */ D("div", {
388
+ className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-bg-canvas)] md:p-2",
389
+ children: /* @__PURE__ */ D(E, {
390
+ columns: le,
391
+ data: Y,
392
+ rowKey: (e) => e.id,
393
+ rowActions: ue
394
+ })
395
+ }) : /* @__PURE__ */ D("div", {
396
+ className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-6",
397
+ children: /* @__PURE__ */ D(C, {
398
+ illustration: "empty-people",
399
+ title: M("workspaces.detail.emptyMembersTitle", "No workspace members yet"),
400
+ description: M("workspaces.detail.emptyMembersDescription", "Add people from the parent organization to grant workspace access."),
401
+ action: /* @__PURE__ */ D("button", {
402
+ type: "button",
403
+ onClick: () => K(!0),
404
+ className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2 font-medium text-[var(--color-action-primary-text)] transition-all duration-200 hover:bg-[var(--color-action-primary-bgHover)]",
405
+ children: M("workspaces.detail.addMember", "Add Member")
406
+ })
407
+ })
408
+ })]
409
+ })
410
+ })]
411
+ })
412
+ ]
358
413
  }),
359
- /* @__PURE__ */ w(f, {
360
- open: W,
361
- onOpenChange: G,
362
- workspaceId: z.id,
363
- organizationId: z.organizationId,
364
- existingMembers: J,
365
- onInviteOrganizationMember: () => N(`${P}/${z.organizationId}/members/invite`)
414
+ /* @__PURE__ */ D(d, {
415
+ open: G,
416
+ onOpenChange: K,
417
+ workspaceId: B.id,
418
+ organizationId: B.organizationId,
419
+ existingMembers: Y,
420
+ onInviteOrganizationMember: () => P(`${F}/${B.organizationId}/members/invite`)
366
421
  }),
367
- q
422
+ J
368
423
  ]
369
- }) : /* @__PURE__ */ w("div", {
424
+ }) : /* @__PURE__ */ D("div", {
370
425
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
371
- children: /* @__PURE__ */ w("div", {
426
+ children: /* @__PURE__ */ D("div", {
372
427
  className: "p-8 text-center text-[var(--color-text-secondary)]",
373
- children: j("workspaces.detail.noPermission", "You don't have permission to view this workspace.")
428
+ children: M("workspaces.detail.noPermission", "You don't have permission to view this workspace.")
374
429
  })
375
430
  });
376
431
  }
377
432
  //#endregion
378
- export { j as WorkspaceDetailPage };
433
+ export { M as WorkspaceDetailPage };
379
434
 
380
435
  //# sourceMappingURL=WorkspaceDetailPage.js.map