@burdenoff/microfe-organization 2026.519.1 → 2026.521.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 (47) hide show
  1. package/dist/generated/global-operations.d.ts +41 -0
  2. package/dist/generated/global-operations.d.ts.map +1 -1
  3. package/dist/generated/global-operations.js +39 -30
  4. package/dist/generated/global-operations.js.map +1 -1
  5. package/dist/generated/global-types.js +3 -1
  6. package/dist/generated/global-types.js.map +1 -1
  7. package/dist/organization-management/AdminOrganizationRoutes.d.ts.map +1 -1
  8. package/dist/organization-management/AdminOrganizationRoutes.js +62 -45
  9. package/dist/organization-management/AdminOrganizationRoutes.js.map +1 -1
  10. package/dist/organization-management/UserOrganizationRoutes.d.ts.map +1 -1
  11. package/dist/organization-management/UserOrganizationRoutes.js +60 -43
  12. package/dist/organization-management/UserOrganizationRoutes.js.map +1 -1
  13. package/dist/organization-management/modules/members/components/PendingInvitesList.d.ts.map +1 -1
  14. package/dist/organization-management/modules/members/components/PendingInvitesList.js +70 -67
  15. package/dist/organization-management/modules/members/components/PendingInvitesList.js.map +1 -1
  16. package/dist/organization-management/modules/members/hooks/useInvites.d.ts +7 -2
  17. package/dist/organization-management/modules/members/hooks/useInvites.d.ts.map +1 -1
  18. package/dist/organization-management/modules/members/hooks/useInvites.js +9 -8
  19. package/dist/organization-management/modules/members/hooks/useInvites.js.map +1 -1
  20. package/dist/organization-management/modules/members/pages/InviteMemberPage.d.ts.map +1 -1
  21. package/dist/organization-management/modules/members/pages/InviteMemberPage.js +48 -47
  22. package/dist/organization-management/modules/members/pages/InviteMemberPage.js.map +1 -1
  23. package/dist/organization-management/modules/members/pages/MyInvitesPage.js +8 -8
  24. package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.d.ts +26 -0
  25. package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.d.ts.map +1 -0
  26. package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.js +63 -0
  27. package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.js.map +1 -0
  28. package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.d.ts.map +1 -1
  29. package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +5 -5
  30. package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
  31. package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.d.ts.map +1 -1
  32. package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +226 -202
  33. package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
  34. package/dist/organization-management/modules/workspaces/components/WorkspaceForm.d.ts.map +1 -1
  35. package/dist/organization-management/modules/workspaces/components/WorkspaceForm.js +152 -147
  36. package/dist/organization-management/modules/workspaces/components/WorkspaceForm.js.map +1 -1
  37. package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.d.ts.map +1 -1
  38. package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js +39 -46
  39. package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js.map +1 -1
  40. package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.d.ts.map +1 -1
  41. package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +3 -3
  42. package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
  43. package/dist/organization-management/providers/OrgScopedPermissions.d.ts +22 -0
  44. package/dist/organization-management/providers/OrgScopedPermissions.d.ts.map +1 -0
  45. package/dist/organization-management/providers/OrgScopedPermissions.js +14 -0
  46. package/dist/organization-management/providers/OrgScopedPermissions.js.map +1 -0
  47. package/package.json +6 -4
@@ -3,107 +3,112 @@ import { useTr as t } from "../../../shared/hooks/useTr.js";
3
3
  import { useTenants as n } from "../hooks/useWorkspaces.js";
4
4
  import { ZodError as r } from "../../../../node_modules/zod/v3/ZodError.js";
5
5
  import { createWorkspaceSchema as i, updateWorkspaceSchema as a } from "../schemas/index.js";
6
- import { useEffect as o, useMemo as s, useState as c } from "react";
7
- import { Building as l, Home as u, Loader2 as d } from "lucide-react";
8
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
6
+ import { useOrgsWithPermission as o } from "../../organizations/hooks/useOrgsWithPermission.js";
7
+ import { useEffect as s, useMemo as c, useState as l } from "react";
8
+ import { Building as u, Home as d, Loader2 as f } from "lucide-react";
9
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
9
10
  //#region src/organization-management/modules/workspaces/components/WorkspaceForm.tsx
10
- function h({ workspace: h, tenantId: g, tenantName: _, organizationId: v, organizationName: y, showOrganizationSelector: b = !1, onSubmit: x, onCancel: S, loading: C }) {
11
- let w = t(), [T, E] = c({
12
- name: h?.name || "",
13
- slug: h?.slug || "",
14
- type: h?.type || "PERSONAL",
15
- tenantId: g || h?.tenantId || "",
16
- organizationId: v || h?.organizationId || ""
17
- }), [D, O] = c({}), k = !h && b && !g, A = !h && b && !v, { tenants: j, loading: M } = n(100, 0, k), { organizations: N, loading: P } = e(T.tenantId ? { tenantId: T.tenantId } : void 0, 100, 0, A);
18
- o(() => {
19
- g && g !== T.tenantId && E((e) => ({
11
+ function g({ workspace: g, tenantId: _, tenantName: v, organizationId: y, organizationName: b, showOrganizationSelector: x = !1, onSubmit: S, onCancel: C, loading: w }) {
12
+ let T = t(), [E, D] = l({
13
+ name: g?.name || "",
14
+ slug: g?.slug || "",
15
+ type: g?.type || "PERSONAL",
16
+ tenantId: _ || g?.tenantId || "",
17
+ organizationId: y || g?.organizationId || ""
18
+ }), [O, k] = l({}), A = !g && x && !_, j = !g && x && !y, { tenants: M, loading: N } = n(100, 0, A), { organizations: P, loading: F } = e(E.tenantId ? { tenantId: E.tenantId } : void 0, 100, 0, j), { allowedIds: I, loading: L } = o(c(() => P.map((e) => e.id), [P]), "workspace", "create"), R = !g && x && !y, z = c(() => R ? P.filter((e) => I.has(e.id)) : P, [
19
+ P,
20
+ I,
21
+ R
22
+ ]);
23
+ s(() => {
24
+ _ && _ !== E.tenantId && D((e) => ({
20
25
  ...e,
21
- tenantId: g
26
+ tenantId: _
22
27
  }));
23
- }, [T.tenantId, g]), o(() => {
24
- v && v !== T.organizationId && E((e) => ({
28
+ }, [E.tenantId, _]), s(() => {
29
+ y && y !== E.organizationId && D((e) => ({
25
30
  ...e,
26
- organizationId: v
31
+ organizationId: y
27
32
  }));
28
- }, [T.organizationId, v]), o(() => {
29
- !b || v || h || E((e) => !e.organizationId || N.some((t) => t.id === e.organizationId) ? e : {
33
+ }, [E.organizationId, y]), s(() => {
34
+ !x || y || g || D((e) => !e.organizationId || z.some((t) => t.id === e.organizationId) ? e : {
30
35
  ...e,
31
36
  organizationId: ""
32
37
  });
33
38
  }, [
39
+ y,
40
+ z,
41
+ x,
42
+ g
43
+ ]);
44
+ let B = c(() => v || (M.find((e) => e.id === E.tenantId)?.name ?? E.tenantId), [
45
+ E.tenantId,
34
46
  v,
35
- N,
47
+ M
48
+ ]), V = c(() => b || (z.find((e) => e.id === E.organizationId)?.name ?? E.organizationId), [
49
+ E.organizationId,
36
50
  b,
37
- h
38
- ]);
39
- let F = s(() => _ || (j.find((e) => e.id === T.tenantId)?.name ?? T.tenantId), [
40
- T.tenantId,
41
- _,
42
- j
43
- ]), I = s(() => y || (N.find((e) => e.id === T.organizationId)?.name ?? T.organizationId), [
44
- T.organizationId,
45
- y,
46
- N
47
- ]), L = () => {
51
+ z
52
+ ]), H = () => {
48
53
  try {
49
- return (h ? a : i).parse(T), O({}), !0;
54
+ return (g ? a : i).parse(E), k({}), !0;
50
55
  } catch (e) {
51
56
  if (e instanceof r) {
52
57
  let t = {};
53
58
  e.issues.forEach((e) => {
54
59
  let n = e.path.join(".");
55
60
  t[n] = e.message;
56
- }), O(t);
61
+ }), k(t);
57
62
  }
58
63
  return !1;
59
64
  }
60
65
  };
61
- return /* @__PURE__ */ m("form", {
66
+ return /* @__PURE__ */ h("form", {
62
67
  onSubmit: async (e) => {
63
- e.preventDefault(), L() && await x(h ? {
64
- name: T.name === h.name ? void 0 : T.name,
65
- type: T.type === h.type ? void 0 : T.type
68
+ e.preventDefault(), H() && await S(g ? {
69
+ name: E.name === g.name ? void 0 : E.name,
70
+ type: E.type === g.type ? void 0 : E.type
66
71
  } : {
67
- tenantId: T.tenantId,
68
- organizationId: T.organizationId,
69
- name: T.name,
70
- slug: T.slug,
71
- type: T.type || void 0
72
+ tenantId: E.tenantId,
73
+ organizationId: E.organizationId,
74
+ name: E.name,
75
+ slug: E.slug,
76
+ type: E.type || void 0
72
77
  });
73
78
  },
74
79
  className: "space-y-6",
75
80
  children: [
76
- h ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", { children: [
77
- /* @__PURE__ */ m("label", {
81
+ g ? null : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", { children: [
82
+ /* @__PURE__ */ h("label", {
78
83
  htmlFor: "tenantId",
79
84
  className: "mb-1 block text-sm font-medium text-[var(--color-text-primary)]",
80
85
  children: [
81
- w("organizations.form.tenant", "Tenant"),
86
+ T("organizations.form.tenant", "Tenant"),
82
87
  " ",
83
- /* @__PURE__ */ p("span", {
88
+ /* @__PURE__ */ m("span", {
84
89
  className: "text-[var(--color-status-error-text)]",
85
90
  children: "*"
86
91
  })
87
92
  ]
88
93
  }),
89
- b && !g ? /* @__PURE__ */ m("div", {
94
+ x && !_ ? /* @__PURE__ */ h("div", {
90
95
  className: "relative",
91
96
  children: [
92
- /* @__PURE__ */ m("select", {
97
+ /* @__PURE__ */ h("select", {
93
98
  id: "tenantId",
94
- value: T.tenantId,
95
- onChange: (e) => E((t) => ({
99
+ value: E.tenantId,
100
+ onChange: (e) => D((t) => ({
96
101
  ...t,
97
102
  tenantId: e.target.value,
98
103
  organizationId: ""
99
104
  })),
100
105
  className: "w-full appearance-none rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] py-2 pl-10 pr-10 text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] disabled:cursor-not-allowed disabled:bg-[var(--color-bg-muted)]",
101
- disabled: C || M,
106
+ disabled: w || N,
102
107
  required: !0,
103
- children: [/* @__PURE__ */ p("option", {
108
+ children: [/* @__PURE__ */ m("option", {
104
109
  value: "",
105
- children: w("workspaces.form.selectTenant", "Select a tenant...")
106
- }), j.map((e) => /* @__PURE__ */ m("option", {
110
+ children: T("workspaces.form.selectTenant", "Select a tenant...")
111
+ }), M.map((e) => /* @__PURE__ */ h("option", {
107
112
  value: e.id,
108
113
  children: [
109
114
  e.name,
@@ -113,18 +118,18 @@ function h({ workspace: h, tenantId: g, tenantName: _, organizationId: v, organi
113
118
  ]
114
119
  }, e.id))]
115
120
  }),
116
- /* @__PURE__ */ p(u, {
121
+ /* @__PURE__ */ m(d, {
117
122
  size: 18,
118
123
  className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"
119
124
  }),
120
- /* @__PURE__ */ p("div", {
125
+ /* @__PURE__ */ m("div", {
121
126
  className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]",
122
- children: /* @__PURE__ */ p("svg", {
127
+ children: /* @__PURE__ */ m("svg", {
123
128
  className: "h-4 w-4",
124
129
  fill: "none",
125
130
  viewBox: "0 0 24 24",
126
131
  stroke: "currentColor",
127
- children: /* @__PURE__ */ p("path", {
132
+ children: /* @__PURE__ */ m("path", {
128
133
  strokeLinecap: "round",
129
134
  strokeLinejoin: "round",
130
135
  strokeWidth: 2,
@@ -132,72 +137,72 @@ function h({ workspace: h, tenantId: g, tenantName: _, organizationId: v, organi
132
137
  })
133
138
  })
134
139
  }),
135
- M ? /* @__PURE__ */ p("div", {
140
+ N ? /* @__PURE__ */ m("div", {
136
141
  className: "absolute right-10 top-1/2 -translate-y-1/2",
137
- children: /* @__PURE__ */ p(d, {
142
+ children: /* @__PURE__ */ m(f, {
138
143
  size: 16,
139
144
  className: "animate-spin text-[var(--color-text-muted)]"
140
145
  })
141
146
  }) : null
142
147
  ]
143
- }) : /* @__PURE__ */ m("div", {
148
+ }) : /* @__PURE__ */ h("div", {
144
149
  className: "relative",
145
- children: [/* @__PURE__ */ p("input", {
150
+ children: [/* @__PURE__ */ m("input", {
146
151
  id: "tenantId",
147
152
  type: "text",
148
- value: F,
149
- onChange: (e) => E((t) => ({
153
+ value: B,
154
+ onChange: (e) => D((t) => ({
150
155
  ...t,
151
156
  tenantId: e.target.value
152
157
  })),
153
158
  className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] py-2 pl-10 pr-4 text-[var(--color-text-primary)] placeholder:text-[var(--color-text-muted)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] disabled:cursor-not-allowed disabled:bg-[var(--color-bg-muted)]",
154
- placeholder: w("organizations.form.tenantPlaceholder", "Enter tenant ID"),
155
- disabled: C || !!g,
159
+ placeholder: T("organizations.form.tenantPlaceholder", "Enter tenant ID"),
160
+ disabled: w || !!_,
156
161
  required: !0,
157
162
  autoComplete: "off"
158
- }), /* @__PURE__ */ p(u, {
163
+ }), /* @__PURE__ */ m(d, {
159
164
  size: 18,
160
165
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"
161
166
  })]
162
167
  }),
163
- (g || T.tenantId) && /* @__PURE__ */ p("p", {
168
+ (_ || E.tenantId) && /* @__PURE__ */ m("p", {
164
169
  className: "mt-1 text-xs text-[var(--color-text-muted)]",
165
- children: w("workspaces.form.creatingUnderTenant", "Creating workspace under the selected tenant.")
170
+ children: T("workspaces.form.creatingUnderTenant", "Creating workspace under the selected tenant.")
166
171
  }),
167
- D.tenantId ? /* @__PURE__ */ p("p", {
172
+ O.tenantId ? /* @__PURE__ */ m("p", {
168
173
  className: "mt-1 text-sm text-[var(--color-status-error-text)]",
169
- children: D.tenantId
174
+ children: O.tenantId
170
175
  }) : null
171
- ] }), /* @__PURE__ */ m("div", { children: [
172
- /* @__PURE__ */ m("label", {
176
+ ] }), /* @__PURE__ */ h("div", { children: [
177
+ /* @__PURE__ */ h("label", {
173
178
  htmlFor: "organizationId",
174
179
  className: "mb-1 block text-sm font-medium text-[var(--color-text-primary)]",
175
180
  children: [
176
- w("common.organization", "Organization"),
181
+ T("common.organization", "Organization"),
177
182
  " ",
178
- /* @__PURE__ */ p("span", {
183
+ /* @__PURE__ */ m("span", {
179
184
  className: "text-[var(--color-status-error-text)]",
180
185
  children: "*"
181
186
  })
182
187
  ]
183
188
  }),
184
- b && !v ? /* @__PURE__ */ m("div", {
189
+ x && !y ? /* @__PURE__ */ h("div", {
185
190
  className: "relative",
186
191
  children: [
187
- /* @__PURE__ */ m("select", {
192
+ /* @__PURE__ */ h("select", {
188
193
  id: "organizationId",
189
- value: T.organizationId,
190
- onChange: (e) => E((t) => ({
194
+ value: E.organizationId,
195
+ onChange: (e) => D((t) => ({
191
196
  ...t,
192
197
  organizationId: e.target.value
193
198
  })),
194
199
  className: "w-full appearance-none rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] py-2 pl-10 pr-10 text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] disabled:cursor-not-allowed disabled:bg-[var(--color-bg-muted)]",
195
- disabled: C || P || !T.tenantId,
200
+ disabled: w || F || L || !E.tenantId,
196
201
  required: !0,
197
- children: [/* @__PURE__ */ p("option", {
202
+ children: [/* @__PURE__ */ m("option", {
198
203
  value: "",
199
- children: T.tenantId ? w("workspaces.form.selectOrganization", "Select an organization...") : w("workspaces.form.selectTenantFirst", "Select a tenant first")
200
- }), N.map((e) => /* @__PURE__ */ m("option", {
204
+ children: E.tenantId ? z.length === 0 && !F && !L ? T("workspaces.form.noOrganizationsAvailable", "No organizations available — you need workspace create permission") : T("workspaces.form.selectOrganization", "Select an organization...") : T("workspaces.form.selectTenantFirst", "Select a tenant first")
205
+ }), z.map((e) => /* @__PURE__ */ h("option", {
201
206
  value: e.id,
202
207
  children: [
203
208
  e.name,
@@ -207,18 +212,18 @@ function h({ workspace: h, tenantId: g, tenantName: _, organizationId: v, organi
207
212
  ]
208
213
  }, e.id))]
209
214
  }),
210
- /* @__PURE__ */ p(l, {
215
+ /* @__PURE__ */ m(u, {
211
216
  size: 18,
212
217
  className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"
213
218
  }),
214
- /* @__PURE__ */ p("div", {
219
+ /* @__PURE__ */ m("div", {
215
220
  className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]",
216
- children: /* @__PURE__ */ p("svg", {
221
+ children: /* @__PURE__ */ m("svg", {
217
222
  className: "h-4 w-4",
218
223
  fill: "none",
219
224
  viewBox: "0 0 24 24",
220
225
  stroke: "currentColor",
221
- children: /* @__PURE__ */ p("path", {
226
+ children: /* @__PURE__ */ m("path", {
222
227
  strokeLinecap: "round",
223
228
  strokeLinejoin: "round",
224
229
  strokeWidth: 2,
@@ -226,161 +231,161 @@ function h({ workspace: h, tenantId: g, tenantName: _, organizationId: v, organi
226
231
  })
227
232
  })
228
233
  }),
229
- P ? /* @__PURE__ */ p("div", {
234
+ F || L ? /* @__PURE__ */ m("div", {
230
235
  className: "absolute right-10 top-1/2 -translate-y-1/2",
231
- children: /* @__PURE__ */ p(d, {
236
+ children: /* @__PURE__ */ m(f, {
232
237
  size: 16,
233
238
  className: "animate-spin text-[var(--color-text-muted)]"
234
239
  })
235
240
  }) : null
236
241
  ]
237
- }) : /* @__PURE__ */ m("div", {
242
+ }) : /* @__PURE__ */ h("div", {
238
243
  className: "relative",
239
- children: [/* @__PURE__ */ p("input", {
244
+ children: [/* @__PURE__ */ m("input", {
240
245
  id: "organizationId",
241
246
  type: "text",
242
- value: I,
243
- onChange: (e) => E((t) => ({
247
+ value: V,
248
+ onChange: (e) => D((t) => ({
244
249
  ...t,
245
250
  organizationId: e.target.value
246
251
  })),
247
252
  className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] py-2 pl-10 pr-4 text-[var(--color-text-primary)] placeholder:text-[var(--color-text-muted)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] disabled:cursor-not-allowed disabled:bg-[var(--color-bg-muted)]",
248
- placeholder: w("workspaces.form.orgIdPlaceholder", "Enter organization ID"),
249
- disabled: C || !!v,
253
+ placeholder: T("workspaces.form.orgIdPlaceholder", "Enter organization ID"),
254
+ disabled: w || !!y,
250
255
  required: !0,
251
256
  autoComplete: "off"
252
- }), /* @__PURE__ */ p(l, {
257
+ }), /* @__PURE__ */ m(u, {
253
258
  size: 18,
254
259
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"
255
260
  })]
256
261
  }),
257
- (v || T.organizationId) && /* @__PURE__ */ p("p", {
262
+ (y || E.organizationId) && /* @__PURE__ */ m("p", {
258
263
  className: "mt-1 text-xs text-[var(--color-text-muted)]",
259
- children: w("workspaces.form.creatingUnderOrg", "Creating workspace under the selected organization.")
264
+ children: T("workspaces.form.creatingUnderOrg", "Creating workspace under the selected organization.")
260
265
  }),
261
- D.organizationId ? /* @__PURE__ */ p("p", {
266
+ O.organizationId ? /* @__PURE__ */ m("p", {
262
267
  className: "mt-1 text-sm text-[var(--color-status-error-text)]",
263
- children: D.organizationId
268
+ children: O.organizationId
264
269
  }) : null
265
270
  ] })] }),
266
- /* @__PURE__ */ m("div", { children: [
267
- /* @__PURE__ */ m("label", {
271
+ /* @__PURE__ */ h("div", { children: [
272
+ /* @__PURE__ */ h("label", {
268
273
  htmlFor: "name",
269
274
  className: "mb-1 block text-sm font-medium text-[var(--color-text-primary)]",
270
275
  children: [
271
- w("workspaces.form.name", "Workspace Name"),
276
+ T("workspaces.form.name", "Workspace Name"),
272
277
  " ",
273
- /* @__PURE__ */ p("span", {
278
+ /* @__PURE__ */ m("span", {
274
279
  className: "text-[var(--color-status-error-text)]",
275
280
  children: "*"
276
281
  })
277
282
  ]
278
283
  }),
279
- /* @__PURE__ */ p("input", {
284
+ /* @__PURE__ */ m("input", {
280
285
  id: "name",
281
286
  type: "text",
282
- value: T.name,
283
- onChange: (e) => E((t) => ({
287
+ value: E.name,
288
+ onChange: (e) => D((t) => ({
284
289
  ...t,
285
290
  name: e.target.value
286
291
  })),
287
292
  className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2 text-[var(--color-text-primary)] placeholder:text-[var(--color-text-muted)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] disabled:cursor-not-allowed disabled:bg-[var(--color-bg-muted)]",
288
- placeholder: w("workspaces.form.namePlaceholder", "Enter workspace name"),
289
- disabled: C,
293
+ placeholder: T("workspaces.form.namePlaceholder", "Enter workspace name"),
294
+ disabled: w,
290
295
  required: !0,
291
296
  autoComplete: "organization-title"
292
297
  }),
293
- D.name ? /* @__PURE__ */ p("p", {
298
+ O.name ? /* @__PURE__ */ m("p", {
294
299
  className: "mt-1 text-sm text-[var(--color-status-error-text)]",
295
- children: D.name
300
+ children: O.name
296
301
  }) : null
297
302
  ] }),
298
- /* @__PURE__ */ m("div", { children: [
299
- /* @__PURE__ */ m("label", {
303
+ /* @__PURE__ */ h("div", { children: [
304
+ /* @__PURE__ */ h("label", {
300
305
  htmlFor: "slug",
301
306
  className: "mb-1 block text-sm font-medium text-[var(--color-text-primary)]",
302
307
  children: [
303
- w("common.slug", "Slug"),
308
+ T("common.slug", "Slug"),
304
309
  " ",
305
- /* @__PURE__ */ p("span", {
310
+ /* @__PURE__ */ m("span", {
306
311
  className: "text-[var(--color-status-error-text)]",
307
312
  children: "*"
308
313
  })
309
314
  ]
310
315
  }),
311
- /* @__PURE__ */ p("input", {
316
+ /* @__PURE__ */ m("input", {
312
317
  id: "slug",
313
318
  type: "text",
314
- value: T.slug,
315
- onChange: (e) => E((t) => ({
319
+ value: E.slug,
320
+ onChange: (e) => D((t) => ({
316
321
  ...t,
317
322
  slug: e.target.value.toLowerCase().replace(/\s+/g, "-")
318
323
  })),
319
324
  className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2 text-[var(--color-text-primary)] placeholder:text-[var(--color-text-muted)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] disabled:cursor-not-allowed disabled:bg-[var(--color-bg-muted)]",
320
- placeholder: w("workspaces.form.slugPlaceholder", "workspace-slug"),
321
- disabled: C || !!h,
322
- required: !h,
325
+ placeholder: T("workspaces.form.slugPlaceholder", "workspace-slug"),
326
+ disabled: w || !!g,
327
+ required: !g,
323
328
  autoComplete: "off"
324
329
  }),
325
- /* @__PURE__ */ p("p", {
330
+ /* @__PURE__ */ m("p", {
326
331
  className: "mt-1 text-xs text-[var(--color-text-muted)]",
327
- children: w("organizations.form.slugImmutable", "Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.")
332
+ children: T("organizations.form.slugImmutable", "Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.")
328
333
  }),
329
- D.slug ? /* @__PURE__ */ p("p", {
334
+ O.slug ? /* @__PURE__ */ m("p", {
330
335
  className: "mt-1 text-sm text-[var(--color-status-error-text)]",
331
- children: D.slug
336
+ children: O.slug
332
337
  }) : null
333
338
  ] }),
334
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
339
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
335
340
  htmlFor: "type",
336
341
  className: "mb-1 block text-sm font-medium text-[var(--color-text-primary)]",
337
- children: w("workspaces.list.column.type", "Type")
338
- }), /* @__PURE__ */ m("select", {
342
+ children: T("workspaces.list.column.type", "Type")
343
+ }), /* @__PURE__ */ h("select", {
339
344
  id: "type",
340
- value: T.type,
341
- onChange: (e) => E((t) => ({
345
+ value: E.type,
346
+ onChange: (e) => D((t) => ({
342
347
  ...t,
343
348
  type: e.target.value
344
349
  })),
345
350
  className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2 text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] disabled:cursor-not-allowed disabled:bg-[var(--color-bg-muted)]",
346
- disabled: C,
351
+ disabled: w,
347
352
  children: [
348
- /* @__PURE__ */ p("option", {
353
+ /* @__PURE__ */ m("option", {
349
354
  value: "PERSONAL",
350
- children: w("workspaces.type.personal", "Personal")
355
+ children: T("workspaces.type.personal", "Personal")
351
356
  }),
352
- /* @__PURE__ */ p("option", {
357
+ /* @__PURE__ */ m("option", {
353
358
  value: "TEAM",
354
- children: w("workspaces.type.team", "Team")
359
+ children: T("workspaces.type.team", "Team")
355
360
  }),
356
- /* @__PURE__ */ p("option", {
361
+ /* @__PURE__ */ m("option", {
357
362
  value: "ENTERPRISE",
358
- children: w("workspaces.type.enterprise", "Enterprise")
363
+ children: T("workspaces.type.enterprise", "Enterprise")
359
364
  })
360
365
  ]
361
366
  })] }),
362
- /* @__PURE__ */ m("div", {
367
+ /* @__PURE__ */ h("div", {
363
368
  className: "flex flex-col gap-3 border-t border-[var(--color-border-default)] pt-4 sm:flex-row",
364
- children: [/* @__PURE__ */ m("button", {
369
+ children: [/* @__PURE__ */ h("button", {
365
370
  type: "submit",
366
- disabled: C,
371
+ disabled: w,
367
372
  className: "inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-6 py-2.5 font-medium text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90 hover:scale-[1.02] active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 sm:min-w-[220px]",
368
- children: [C ? /* @__PURE__ */ p(d, {
373
+ children: [w ? /* @__PURE__ */ m(f, {
369
374
  size: 16,
370
375
  className: "animate-spin"
371
- }) : null, h ? w("workspaces.form.updateSubmit", "Update Workspace") : w("workspaces.create.button", "Create Workspace")]
372
- }), /* @__PURE__ */ p("button", {
376
+ }) : null, g ? T("workspaces.form.updateSubmit", "Update Workspace") : T("workspaces.create.button", "Create Workspace")]
377
+ }), /* @__PURE__ */ m("button", {
373
378
  type: "button",
374
- onClick: S,
375
- disabled: C,
379
+ onClick: C,
380
+ disabled: w,
376
381
  className: "rounded-lg border border-[var(--color-border-default)] bg-transparent px-6 py-2.5 font-medium text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)] active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 sm:min-w-[140px]",
377
- children: w("common.cancel", "Cancel")
382
+ children: T("common.cancel", "Cancel")
378
383
  })]
379
384
  })
380
385
  ]
381
386
  });
382
387
  }
383
388
  //#endregion
384
- export { h as WorkspaceForm };
389
+ export { g as WorkspaceForm };
385
390
 
386
391
  //# sourceMappingURL=WorkspaceForm.js.map