@burdenoff/microfe-workspaces 2026.1114.2 → 2026.1119.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.
@@ -1,289 +1,291 @@
1
1
  import { useCreateWorkspace as e } from "../hooks/useWorkspaceMutations.js";
2
2
  import { useOpenWorkspace as t } from "../hooks/useOpenWorkspace.js";
3
- import { useMyOrganizations as ee, useMyTenants as te } from "../hooks/useTenants.js";
4
- import { useOrgsWithPermission as ne } from "../hooks/useOrgsWithPermission.js";
5
- import { useIsFluidGridsVariant as re, useWorkspacesContext as ie } from "../providers/WorkspacesProvider.js";
6
- import { useWorkspacesPageView as ae } from "../hooks/useWorkspacesPageView.js";
7
- import { generateSlug as oe } from "../utils/slug.js";
8
- import { tWithFallback as n } from "../utils/i18n.js";
9
- import { buildCreateWorkspaceInput as se } from "../utils/createForms.js";
10
- import { useEffect as r, useMemo as i } from "react";
11
- import { AlertCircle as a, ArrowLeft as o } from "lucide-react";
12
- import { Button as s, CardContent as c, CardDescription as l, CardHeader as u, CardTitle as d, GlassCard as f, OptionalFields as p, PagePurpose as ce, Skeleton as m } from "@burdenoff/fe-libs/ui";
13
- import { Fragment as le, jsx as h, jsxs as g } from "react/jsx-runtime";
14
- import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
- import { Link as _, useNavigate as de, useSearchParams as fe } from "react-router";
16
- import { useUpgradePrompt as pe } from "@burdenoff/fe-libs/shared/hooks";
17
- import { AccessDenied as v, UpgradeInlineBanner as me } from "@burdenoff/fe-libs/shared/components";
18
- import { useForm as y, z as b } from "@burdenoff/fe-libs/form";
3
+ import { useMyOrganizations as n, useMyTenants as ee } from "../hooks/useTenants.js";
4
+ import { useOrgsWithPermission as te } from "../hooks/useOrgsWithPermission.js";
5
+ import { useIsFluidGridsVariant as ne, useWorkspacesContext as re } from "../providers/WorkspacesProvider.js";
6
+ import { useWorkspacesPageView as ie } from "../hooks/useWorkspacesPageView.js";
7
+ import { generateSlug as r } from "../utils/slug.js";
8
+ import { tWithFallback as i } from "../utils/i18n.js";
9
+ import { buildCreateWorkspaceInput as ae } from "../utils/createForms.js";
10
+ import { useEffect as a, useMemo as o } from "react";
11
+ import { AlertCircle as s, ArrowLeft as c } from "lucide-react";
12
+ import { Button as l, CardContent as oe, CardDescription as u, CardHeader as d, CardTitle as f, GlassCard as p, OptionalFields as m, PagePurpose as h, Skeleton as g, ThemedSelect as _ } from "@burdenoff/fe-libs/ui";
13
+ import { Fragment as se, jsx as v, jsxs as y } from "react/jsx-runtime";
14
+ import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
+ import { Link as b, useNavigate as le, useSearchParams as ue } from "react-router";
16
+ import { useUpgradePrompt as de } from "@burdenoff/fe-libs/shared/hooks";
17
+ import { AccessDenied as fe, UpgradeInlineBanner as pe } from "@burdenoff/fe-libs/shared/components";
18
+ import { useForm as me, z as x } from "@burdenoff/fe-libs/form";
19
19
  // src/pages/CreateWorkspacePage.tsx
20
- function x() {
21
- ae("workspaces.create");
22
- let { t: x } = ue(), { isFree: he, approachingLimits: ge, plan: _e } = pe({ resource: "workspaces" }), S = ge[0], C = !!S && typeof S.limit == "number" && S.current >= S.limit, ve = he && !!S, w = i(() => b.object({
23
- name: b.string().min(2, n(x, "createWorkspace.validation.nameMin", "Name must be at least 2 characters")).max(100),
24
- slug: b.string().min(2, n(x, "createWorkspace.validation.slugMin", "Slug must be at least 2 characters")).max(50).regex(/^[a-z0-9-]+$/, n(x, "createWorkspace.validation.slugFormat", "Slug can only contain lowercase letters, numbers, and hyphens")),
25
- tenantId: b.string().min(1, n(x, "createWorkspace.validation.tenantRequired", "Please select a tenant")),
26
- organizationId: b.string().min(1, n(x, "createWorkspace.validation.organizationRequired", "Please select an organization"))
27
- }), [x]), T = de(), { basePath: E = "/" } = ie(), D = re(), [O] = fe(), k = D ? O.get("organizationId") : null, { mutate: A, isPending: j } = e(), M = t(), { data: N, isLoading: P, error: F } = te(), { data: I, isLoading: L, error: R } = ee(), z = i(() => N?.items ?? [], [N]), B = i(() => I?.items ?? [], [I]), V = i(() => k ? B.find((e) => e.id === k) : void 0, [B, k]), H = i(() => z.find((e) => e.type === "SHARED" || e.slug === "burdenoff-shared")?.id ?? z[0]?.id ?? "", [z]), U = y({
28
- schema: w,
20
+ function S() {
21
+ ie("workspaces.create");
22
+ let { t: S } = ce(), { isFree: he, approachingLimits: ge, plan: _e } = de({ resource: "workspaces" }), C = ge[0], w = !!C && typeof C.limit == "number" && C.current >= C.limit, ve = he && !!C, T = o(() => x.object({
23
+ name: x.string().min(2, i(S, "createWorkspace.validation.nameMin", "Name must be at least 2 characters")).max(100),
24
+ slug: x.string().min(2, i(S, "createWorkspace.validation.slugMin", "Slug must be at least 2 characters")).max(50).regex(/^[a-z0-9-]+$/, i(S, "createWorkspace.validation.slugFormat", "Slug can only contain lowercase letters, numbers, and hyphens")),
25
+ tenantId: x.string().min(1, i(S, "createWorkspace.validation.tenantRequired", "Please select a tenant")),
26
+ organizationId: x.string().min(1, i(S, "createWorkspace.validation.organizationRequired", "Please select an organization"))
27
+ }), [S]), E = le(), { basePath: D = "/" } = re(), O = ne(), [k] = ue(), A = O ? k.get("organizationId") : null, { mutate: j, isPending: M } = e(), N = t(), { data: P, isLoading: F, error: I } = ee(), { data: L, isLoading: R, error: z } = n(), B = o(() => P?.items ?? [], [P]), V = o(() => L?.items ?? [], [L]), H = o(() => A ? V.find((e) => e.id === A) : void 0, [V, A]), U = o(() => B.find((e) => e.type === "SHARED" || e.slug === "burdenoff-shared")?.id ?? B[0]?.id ?? "", [B]), W = me({
28
+ schema: T,
29
29
  defaultValues: {
30
30
  name: "",
31
31
  slug: "",
32
32
  tenantId: "",
33
33
  organizationId: ""
34
34
  }
35
- }), W = U.watch("tenantId"), G = U.watch("name"), ye = i(() => B.map((e) => e.id), [B]), { allowedIds: K, loading: q, isError: J } = ne(ye, "workspace", "create"), Y = i(() => W ? B.filter((e) => e.tenantId === W) : [], [W, B]), X = i(() => J ? Y : Y.filter((e) => K.has(e.id)), [
36
- Y,
37
- K,
38
- J
35
+ }), G = W.watch("tenantId"), ye = W.watch("organizationId"), K = W.watch("name"), be = o(() => V.map((e) => e.id), [V]), { allowedIds: q, loading: J, isError: Y } = te(be, "workspace", "create"), X = o(() => G ? V.filter((e) => e.tenantId === G) : [], [G, V]), Z = o(() => Y ? X : X.filter((e) => q.has(e.id)), [
36
+ X,
37
+ q,
38
+ Y
39
39
  ]);
40
- r(() => {
41
- U.setValue("slug", G ? oe(G) : "");
42
- }, [G, U]), r(() => {
43
- U.setValue("organizationId", "");
44
- }, [W, U]), r(() => {
45
- !U.getValues("tenantId") && H && U.setValue("tenantId", H, {
40
+ a(() => {
41
+ W.setValue("slug", K ? r(K) : "");
42
+ }, [K, W]), a(() => {
43
+ W.setValue("organizationId", "");
44
+ }, [G, W]), a(() => {
45
+ !W.getValues("tenantId") && U && W.setValue("tenantId", U, {
46
46
  shouldDirty: !1,
47
47
  shouldTouch: !1
48
48
  });
49
- }, [H, U]), r(() => {
50
- let e = V?.tenantId;
51
- e && !U.getFieldState("tenantId").isDirty && U.getValues("tenantId") !== e && z.some((t) => t.id === e) && U.setValue("tenantId", e, {
49
+ }, [U, W]), a(() => {
50
+ let e = H?.tenantId;
51
+ e && !W.getFieldState("tenantId").isDirty && W.getValues("tenantId") !== e && B.some((t) => t.id === e) && W.setValue("tenantId", e, {
52
52
  shouldDirty: !1,
53
53
  shouldTouch: !1
54
54
  });
55
55
  }, [
56
- V,
57
- z,
58
- U
59
- ]), r(() => {
60
- let e = U.getValues("organizationId");
61
- if (!X.some((t) => t.id === e) && X[0]?.id) {
62
- let e = X.find((e) => e.id === k);
63
- U.setValue("organizationId", (e ?? X[0]).id, {
56
+ H,
57
+ B,
58
+ W
59
+ ]), a(() => {
60
+ let e = W.getValues("organizationId");
61
+ if (!Z.some((t) => t.id === e) && Z[0]?.id) {
62
+ let e = Z.find((e) => e.id === A);
63
+ W.setValue("organizationId", (e ?? Z[0]).id, {
64
64
  shouldDirty: !1,
65
65
  shouldTouch: !1
66
66
  });
67
67
  }
68
68
  }, [
69
- X,
70
- U,
71
- k
69
+ Z,
70
+ W,
71
+ A
72
72
  ]);
73
- let be = (e) => {
74
- A(se(e), { onSuccess: (e) => {
75
- M(e);
73
+ let xe = (e) => {
74
+ j(ae(e), { onSuccess: (e) => {
75
+ N(e);
76
76
  } });
77
- }, Z = K.size > 0, xe = P || L || q, Se = !F && !R && B.length > 0;
78
- if (!xe && !J && Se && !Z) return /* @__PURE__ */ g("div", {
77
+ }, Se = q.size > 0, Ce = F || R || J, we = !I && !z && V.length > 0;
78
+ if (!Ce && !Y && we && !Se) return /* @__PURE__ */ y("div", {
79
79
  className: "p-6",
80
- children: [/* @__PURE__ */ g(_, {
81
- to: `${E}/list`,
80
+ children: [/* @__PURE__ */ y(b, {
81
+ to: `${D}/list`,
82
82
  className: "inline-flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors mb-6",
83
- children: [/* @__PURE__ */ h(o, { size: 20 }), n(x, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
84
- }), /* @__PURE__ */ h(v, {
83
+ children: [/* @__PURE__ */ v(c, { size: 20 }), i(S, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
84
+ }), /* @__PURE__ */ v(fe, {
85
85
  variant: "card",
86
- title: n(x, "createWorkspace.permissionRequiredTitle", "Permission Required"),
87
- description: n(x, "createWorkspace.permissionRequiredDescription", "You don't have permission to create workspaces in any of your organizations."),
88
- details: n(x, "createWorkspace.permissionRequiredDetails", "Required: workspace:create"),
86
+ title: i(S, "createWorkspace.permissionRequiredTitle", "Permission Required"),
87
+ description: i(S, "createWorkspace.permissionRequiredDescription", "You don't have permission to create workspaces in any of your organizations."),
88
+ details: i(S, "createWorkspace.permissionRequiredDetails", "Required: workspace:create"),
89
89
  primaryAction: {
90
- label: n(x, "createWorkspace.goBack", "Go Back"),
91
- onClick: () => T(`${E}/list`)
90
+ label: i(S, "createWorkspace.goBack", "Go Back"),
91
+ onClick: () => E(`${D}/list`)
92
92
  }
93
93
  })]
94
94
  });
95
- let Q = /* @__PURE__ */ g("div", {
95
+ let Q = /* @__PURE__ */ y("div", {
96
96
  className: "space-y-2",
97
97
  children: [
98
- /* @__PURE__ */ h("label", {
98
+ /* @__PURE__ */ v("label", {
99
99
  htmlFor: "workspace-slug",
100
100
  className: "text-sm font-medium text-text-primary",
101
- children: n(x, "createWorkspace.slugLabel", "Slug *")
101
+ children: i(S, "createWorkspace.slugLabel", "Slug *")
102
102
  }),
103
- /* @__PURE__ */ h("input", {
103
+ /* @__PURE__ */ v("input", {
104
104
  id: "workspace-slug",
105
- placeholder: n(x, "createWorkspace.slugPlaceholder", "my-workspace"),
105
+ placeholder: i(S, "createWorkspace.slugPlaceholder", "my-workspace"),
106
106
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
107
- ...U.register("slug")
107
+ ...W.register("slug")
108
108
  }),
109
- /* @__PURE__ */ h("p", {
109
+ /* @__PURE__ */ v("p", {
110
110
  className: "text-xs text-text-secondary",
111
- children: n(x, "createWorkspace.slugHint", "URL-friendly identifier (auto-generated, but you can edit it)")
111
+ children: i(S, "createWorkspace.slugHint", "URL-friendly identifier (auto-generated, but you can edit it)")
112
112
  }),
113
- U.formState.errors.slug?.message && /* @__PURE__ */ h("p", {
113
+ W.formState.errors.slug?.message && /* @__PURE__ */ v("p", {
114
114
  className: "text-sm text-status-error-text",
115
- children: U.formState.errors.slug.message
115
+ children: W.formState.errors.slug.message
116
116
  })
117
117
  ]
118
- }), $ = z.length === 1 ? null : /* @__PURE__ */ g("div", {
118
+ }), $ = B.length === 1 ? null : /* @__PURE__ */ y("div", {
119
119
  className: "space-y-2",
120
120
  children: [
121
- /* @__PURE__ */ h("label", {
121
+ /* @__PURE__ */ v("label", {
122
122
  htmlFor: "workspace-tenant",
123
123
  className: "text-sm font-medium text-text-primary",
124
- children: n(x, "createWorkspace.tenantLabel", "Tenant *")
124
+ children: i(S, "createWorkspace.tenantLabel", "Tenant *")
125
125
  }),
126
- P ? /* @__PURE__ */ h(m, { className: "h-10 w-full" }) : F ? /* @__PURE__ */ g("div", {
126
+ F ? /* @__PURE__ */ v(g, { className: "h-10 w-full" }) : I ? /* @__PURE__ */ y("div", {
127
127
  className: "flex items-center gap-2 text-sm text-status-error-text",
128
- children: [/* @__PURE__ */ h(a, { size: 16 }), n(x, "createWorkspace.failedToLoadTenants", "Failed to load tenants")]
129
- }) : z.length === 0 ? /* @__PURE__ */ h("div", {
128
+ children: [/* @__PURE__ */ v(s, { size: 16 }), i(S, "createWorkspace.failedToLoadTenants", "Failed to load tenants")]
129
+ }) : B.length === 0 ? /* @__PURE__ */ v("div", {
130
130
  className: "text-sm text-text-secondary",
131
- children: n(x, "createWorkspace.noTenantsAvailable", "No tenants available. Contact your administrator.")
132
- }) : /* @__PURE__ */ g("select", {
131
+ children: i(S, "createWorkspace.noTenantsAvailable", "No tenants available. Contact your administrator.")
132
+ }) : /* @__PURE__ */ y(_, {
133
133
  id: "workspace-tenant",
134
134
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
135
- ...U.register("tenantId"),
136
- children: [/* @__PURE__ */ h("option", {
135
+ ...W.register("tenantId"),
136
+ value: G,
137
+ children: [/* @__PURE__ */ v("option", {
137
138
  value: "",
138
- children: n(x, "createWorkspace.selectTenantPlaceholder", "Select a tenant")
139
- }), z.map((e) => /* @__PURE__ */ h("option", {
139
+ children: i(S, "createWorkspace.selectTenantPlaceholder", "Select a tenant")
140
+ }), B.map((e) => /* @__PURE__ */ v("option", {
140
141
  value: e.id,
141
142
  children: e.name
142
143
  }, e.id))]
143
144
  }),
144
- /* @__PURE__ */ h("p", {
145
+ /* @__PURE__ */ v("p", {
145
146
  className: "text-xs text-text-secondary",
146
- children: n(x, "createWorkspace.tenantHint", "Select which tenant this workspace belongs to")
147
+ children: i(S, "createWorkspace.tenantHint", "Select which tenant this workspace belongs to")
147
148
  }),
148
- U.formState.errors.tenantId?.message && /* @__PURE__ */ h("p", {
149
+ W.formState.errors.tenantId?.message && /* @__PURE__ */ v("p", {
149
150
  className: "text-sm text-status-error-text",
150
- children: U.formState.errors.tenantId.message
151
+ children: W.formState.errors.tenantId.message
151
152
  })
152
153
  ]
153
- }), Ce = ["slug", "tenantId"].flatMap((e) => {
154
- let t = U.formState.errors[e]?.message;
154
+ }), Te = ["slug", "tenantId"].flatMap((e) => {
155
+ let t = W.formState.errors[e]?.message;
155
156
  return t ? [{
156
157
  field: e,
157
158
  message: t
158
159
  }] : [];
159
160
  });
160
- return /* @__PURE__ */ g("div", {
161
+ return /* @__PURE__ */ y("div", {
161
162
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
162
163
  children: [
163
- /* @__PURE__ */ g(_, {
164
- to: `${E}/list`,
164
+ /* @__PURE__ */ y(b, {
165
+ to: `${D}/list`,
165
166
  className: "inline-flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
166
- children: [/* @__PURE__ */ h(o, { size: 20 }), n(x, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
167
+ children: [/* @__PURE__ */ v(c, { size: 20 }), i(S, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
167
168
  }),
168
- /* @__PURE__ */ h("div", {
169
+ /* @__PURE__ */ v("div", {
169
170
  className: "max-w-2xl mx-auto w-full",
170
- children: /* @__PURE__ */ h(ce, { children: n(x, "createWorkspace.purpose", "Create a workspace to give a team, client or initiative its own dedicated space — with its own projects, members, agents and activity, kept separate from the rest. Give it a clear name, pick the organization that owns it, and you can invite people and add projects right after.") })
171
+ children: /* @__PURE__ */ v(h, { children: i(S, "createWorkspace.purpose", "Create a workspace to give a team, client or initiative its own dedicated space — with its own projects, members, agents and activity, kept separate from the rest. Give it a clear name, pick the organization that owns it, and you can invite people and add projects right after.") })
171
172
  }),
172
- ve && /* @__PURE__ */ h("div", {
173
+ ve && /* @__PURE__ */ v("div", {
173
174
  className: "max-w-2xl mx-auto w-full",
174
- children: /* @__PURE__ */ h(me, {
175
+ children: /* @__PURE__ */ v(pe, {
175
176
  resource: "workspaces",
176
- current: S.current,
177
- limit: S.limit ?? void 0,
178
- severity: C ? "critical" : void 0,
179
- message: C ? n(x, "createWorkspace.upgradeCapMessage", `You've used all workspaces in the ${_e?.planName ?? "free"} plan.`) : n(x, "createWorkspace.upgradeApproachingMessage", "Upgrade to create more workspaces.")
177
+ current: C.current,
178
+ limit: C.limit ?? void 0,
179
+ severity: w ? "critical" : void 0,
180
+ message: w ? i(S, "createWorkspace.upgradeCapMessage", `You've used all workspaces in the ${_e?.planName ?? "free"} plan.`) : i(S, "createWorkspace.upgradeApproachingMessage", "Upgrade to create more workspaces.")
180
181
  })
181
182
  }),
182
- /* @__PURE__ */ g(f, {
183
+ /* @__PURE__ */ y(p, {
183
184
  treatment: "glass",
184
185
  glow: !0,
185
186
  className: "max-w-2xl mx-auto border-border-seam",
186
- children: [/* @__PURE__ */ g(u, { children: [D ? /* @__PURE__ */ h("h1", {
187
+ children: [/* @__PURE__ */ y(d, { children: [O ? /* @__PURE__ */ v("h1", {
187
188
  className: "text-lg font-semibold leading-none text-text-primary",
188
- children: n(x, "createWorkspace.title", "Create New Workspace")
189
- }) : /* @__PURE__ */ h(d, { children: n(x, "createWorkspace.title", "Create New Workspace") }), /* @__PURE__ */ h(l, { children: n(x, "createWorkspace.subtitle", "Set up a new workspace for your team") })] }), /* @__PURE__ */ g(c, { children: [J && /* @__PURE__ */ g("div", {
189
+ children: i(S, "createWorkspace.title", "Create New Workspace")
190
+ }) : /* @__PURE__ */ v(f, { children: i(S, "createWorkspace.title", "Create New Workspace") }), /* @__PURE__ */ v(u, { children: i(S, "createWorkspace.subtitle", "Set up a new workspace for your team") })] }), /* @__PURE__ */ y(oe, { children: [Y && /* @__PURE__ */ y("div", {
190
191
  role: "alert",
191
192
  className: "mb-4 flex items-start gap-2 rounded-md border border-warning/30 bg-warning/10 p-3 text-sm text-text-primary",
192
- children: [/* @__PURE__ */ h(a, {
193
+ children: [/* @__PURE__ */ v(s, {
193
194
  size: 16,
194
195
  className: "mt-0.5 shrink-0 text-warning"
195
- }), /* @__PURE__ */ h("span", { children: n(x, "createWorkspace.permissionCheckUnavailable", "We couldn't verify your workspace-create permissions just now, so the organization list isn't filtered. If you submit and don't have access, the request will be rejected and you can retry.") })]
196
- }), /* @__PURE__ */ g("form", {
197
- onSubmit: U.handleSubmit(be),
196
+ }), /* @__PURE__ */ v("span", { children: i(S, "createWorkspace.permissionCheckUnavailable", "We couldn't verify your workspace-create permissions just now, so the organization list isn't filtered. If you submit and don't have access, the request will be rejected and you can retry.") })]
197
+ }), /* @__PURE__ */ y("form", {
198
+ onSubmit: W.handleSubmit(xe),
198
199
  className: "space-y-6",
199
200
  children: [
200
- /* @__PURE__ */ g("div", {
201
+ /* @__PURE__ */ y("div", {
201
202
  className: "space-y-2",
202
203
  children: [
203
- /* @__PURE__ */ h("label", {
204
+ /* @__PURE__ */ v("label", {
204
205
  htmlFor: "workspace-name",
205
206
  className: "text-sm font-medium text-text-primary",
206
- children: n(x, "createWorkspace.nameLabel", "Workspace Name *")
207
+ children: i(S, "createWorkspace.nameLabel", "Workspace Name *")
207
208
  }),
208
- /* @__PURE__ */ h("input", {
209
+ /* @__PURE__ */ v("input", {
209
210
  id: "workspace-name",
210
- placeholder: n(x, "createWorkspace.namePlaceholder", "My Workspace"),
211
+ placeholder: i(S, "createWorkspace.namePlaceholder", "My Workspace"),
211
212
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
212
- ...U.register("name")
213
+ ...W.register("name")
213
214
  }),
214
- /* @__PURE__ */ h("p", {
215
+ /* @__PURE__ */ v("p", {
215
216
  className: "text-xs text-text-secondary",
216
- children: n(x, "createWorkspace.nameHint", "A descriptive name for your workspace")
217
+ children: i(S, "createWorkspace.nameHint", "A descriptive name for your workspace")
217
218
  }),
218
- U.formState.errors.name?.message && /* @__PURE__ */ h("p", {
219
+ W.formState.errors.name?.message && /* @__PURE__ */ v("p", {
219
220
  className: "text-sm text-status-error-text",
220
- children: U.formState.errors.name.message
221
+ children: W.formState.errors.name.message
221
222
  })
222
223
  ]
223
224
  }),
224
- D ? null : Q,
225
- D ? null : $,
226
- /* @__PURE__ */ g("div", {
225
+ O ? null : Q,
226
+ O ? null : $,
227
+ /* @__PURE__ */ y("div", {
227
228
  className: "space-y-2",
228
229
  children: [
229
- /* @__PURE__ */ h("label", {
230
+ /* @__PURE__ */ v("label", {
230
231
  htmlFor: "workspace-organization",
231
232
  className: "text-sm font-medium text-text-primary",
232
- children: n(x, "createWorkspace.organizationLabel", "Organization *")
233
+ children: i(S, "createWorkspace.organizationLabel", "Organization *")
233
234
  }),
234
- L || q ? /* @__PURE__ */ h(m, { className: "h-10 w-full" }) : R ? /* @__PURE__ */ g("div", {
235
+ R || J ? /* @__PURE__ */ v(g, { className: "h-10 w-full" }) : z ? /* @__PURE__ */ y("div", {
235
236
  className: "flex items-center gap-2 text-sm text-status-error-text",
236
- children: [/* @__PURE__ */ h(a, { size: 16 }), n(x, "createWorkspace.failedToLoadOrganizations", "Failed to load organizations")]
237
- }) : W ? X.length === 0 ? /* @__PURE__ */ h("div", {
237
+ children: [/* @__PURE__ */ v(s, { size: 16 }), i(S, "createWorkspace.failedToLoadOrganizations", "Failed to load organizations")]
238
+ }) : G ? Z.length === 0 ? /* @__PURE__ */ v("div", {
238
239
  className: "text-sm text-text-secondary",
239
- children: n(x, "createWorkspace.noOrganizationsFound", "No organizations found for this tenant")
240
- }) : /* @__PURE__ */ g("select", {
240
+ children: i(S, "createWorkspace.noOrganizationsFound", "No organizations found for this tenant")
241
+ }) : /* @__PURE__ */ y(_, {
241
242
  id: "workspace-organization",
242
243
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
243
- disabled: !W,
244
- ...U.register("organizationId"),
245
- children: [/* @__PURE__ */ h("option", {
244
+ disabled: !G,
245
+ ...W.register("organizationId"),
246
+ value: ye,
247
+ children: [/* @__PURE__ */ v("option", {
246
248
  value: "",
247
- children: n(x, "createWorkspace.selectOrganizationPlaceholder", "Select an organization")
248
- }), X.map((e) => /* @__PURE__ */ h("option", {
249
+ children: i(S, "createWorkspace.selectOrganizationPlaceholder", "Select an organization")
250
+ }), Z.map((e) => /* @__PURE__ */ v("option", {
249
251
  value: e.id,
250
252
  children: e.name
251
253
  }, e.id))]
252
- }) : /* @__PURE__ */ h("div", {
254
+ }) : /* @__PURE__ */ v("div", {
253
255
  className: "text-sm text-text-secondary",
254
- children: n(x, "createWorkspace.selectTenantFirst", "Please select a tenant first")
256
+ children: i(S, "createWorkspace.selectTenantFirst", "Please select a tenant first")
255
257
  }),
256
- /* @__PURE__ */ h("p", {
258
+ /* @__PURE__ */ v("p", {
257
259
  className: "text-xs text-text-secondary",
258
- children: n(x, "createWorkspace.organizationHint", "Select which organization owns this workspace")
260
+ children: i(S, "createWorkspace.organizationHint", "Select which organization owns this workspace")
259
261
  }),
260
- U.formState.errors.organizationId?.message && /* @__PURE__ */ h("p", {
262
+ W.formState.errors.organizationId?.message && /* @__PURE__ */ v("p", {
261
263
  className: "text-sm text-status-error-text",
262
- children: U.formState.errors.organizationId.message
264
+ children: W.formState.errors.organizationId.message
263
265
  })
264
266
  ]
265
267
  }),
266
- D ? /* @__PURE__ */ g(le, { children: [Ce.map(({ field: e, message: t }) => /* @__PURE__ */ h("p", {
268
+ O ? /* @__PURE__ */ y(se, { children: [Te.map(({ field: e, message: t }) => /* @__PURE__ */ v("p", {
267
269
  role: "alert",
268
270
  className: "text-sm text-status-error-text",
269
271
  children: t
270
- }, e)), /* @__PURE__ */ g(p, {
272
+ }, e)), /* @__PURE__ */ y(m, {
271
273
  storageKey: "workspaces.create",
272
274
  children: [Q, $]
273
275
  })] }) : null,
274
- /* @__PURE__ */ g("div", {
276
+ /* @__PURE__ */ y("div", {
275
277
  className: "flex justify-end gap-3 pt-4",
276
- children: [/* @__PURE__ */ h(s, {
278
+ children: [/* @__PURE__ */ v(l, {
277
279
  type: "button",
278
280
  variant: "outline",
279
- onClick: () => T(`${E}/list`),
280
- disabled: j,
281
- children: n(x, "createWorkspace.cancel", "Cancel")
282
- }), /* @__PURE__ */ h(s, {
281
+ onClick: () => E(`${D}/list`),
282
+ disabled: M,
283
+ children: i(S, "createWorkspace.cancel", "Cancel")
284
+ }), /* @__PURE__ */ v(l, {
283
285
  type: "submit",
284
- disabled: j || P || L || q || C,
285
- title: C ? n(x, "createWorkspace.disabledAtCap", "Workspace limit reached — upgrade your plan to create more.") : void 0,
286
- children: j ? n(x, "createWorkspace.creating", "Creating...") : n(x, "createWorkspace.submit", "Create Workspace")
286
+ disabled: M || F || R || J || w,
287
+ title: w ? i(S, "createWorkspace.disabledAtCap", "Workspace limit reached — upgrade your plan to create more.") : void 0,
288
+ children: M ? i(S, "createWorkspace.creating", "Creating...") : i(S, "createWorkspace.submit", "Create Workspace")
287
289
  })]
288
290
  })
289
291
  ]
@@ -292,4 +294,4 @@ function x() {
292
294
  ]
293
295
  });
294
296
  }
295
- export { x as CreateWorkspacePage };
297
+ export { S as CreateWorkspacePage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-workspaces",
3
- "version": "2026.1114.2",
3
+ "version": "2026.1119.1",
4
4
  "description": "Workspaces microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@apollo/client": "^4.3.7",
55
- "@burdenoff/fe-libs": "2026.1113.11",
55
+ "@burdenoff/fe-libs": "2026.1119.2",
56
56
  "@radix-ui/react-icons": "^1.3.2",
57
57
  "@tanstack/react-query": "^5.107.1",
58
58
  "axios": "^1.21.0",
@@ -94,7 +94,7 @@
94
94
  },
95
95
  "peerDependencies": {
96
96
  "@apollo/client": "^4.0.11",
97
- "@burdenoff/fe-libs": "^2026.1102.4",
97
+ "@burdenoff/fe-libs": "^2026.1119.2",
98
98
  "react": "^19.0.0",
99
99
  "react-dom": "^19.0.0",
100
100
  "zustand": "^5.0.0"