@burdenoff/microfe-buildmyiq 2026.705.13 → 2026.706.10

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 (67) hide show
  1. package/dist/buildmyiq/BuildmyiqRoot.d.ts.map +1 -1
  2. package/dist/buildmyiq/BuildmyiqRoot.js +57 -49
  3. package/dist/buildmyiq/BuildmyiqRoot.js.map +1 -1
  4. package/dist/buildmyiq/BuildmyiqRoutes.d.ts.map +1 -1
  5. package/dist/buildmyiq/BuildmyiqRoutes.js +15 -11
  6. package/dist/buildmyiq/BuildmyiqRoutes.js.map +1 -1
  7. package/dist/buildmyiq/components/Avatar.d.ts +15 -0
  8. package/dist/buildmyiq/components/Avatar.d.ts.map +1 -0
  9. package/dist/buildmyiq/components/Avatar.js +42 -0
  10. package/dist/buildmyiq/components/Avatar.js.map +1 -0
  11. package/dist/buildmyiq/components/Viz.d.ts +25 -0
  12. package/dist/buildmyiq/components/Viz.d.ts.map +1 -0
  13. package/dist/buildmyiq/components/Viz.js +78 -0
  14. package/dist/buildmyiq/components/Viz.js.map +1 -0
  15. package/dist/buildmyiq/components/index.d.ts +2 -0
  16. package/dist/buildmyiq/components/index.d.ts.map +1 -1
  17. package/dist/buildmyiq/components/index.js +2 -0
  18. package/dist/buildmyiq/pages/DashboardPage.d.ts.map +1 -1
  19. package/dist/buildmyiq/pages/DashboardPage.js +200 -98
  20. package/dist/buildmyiq/pages/DashboardPage.js.map +1 -1
  21. package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.d.ts.map +1 -1
  22. package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.js +262 -241
  23. package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.js.map +1 -1
  24. package/dist/buildmyiq/pages/assessments/AssessmentsPage.d.ts.map +1 -1
  25. package/dist/buildmyiq/pages/assessments/AssessmentsPage.js +142 -115
  26. package/dist/buildmyiq/pages/assessments/AssessmentsPage.js.map +1 -1
  27. package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.d.ts.map +1 -1
  28. package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.js +220 -156
  29. package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.js.map +1 -1
  30. package/dist/buildmyiq/pages/authoring/AuthoringPage.d.ts.map +1 -1
  31. package/dist/buildmyiq/pages/authoring/AuthoringPage.js +51 -46
  32. package/dist/buildmyiq/pages/authoring/AuthoringPage.js.map +1 -1
  33. package/dist/buildmyiq/pages/authoring/CourseBuilderPage.d.ts.map +1 -1
  34. package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js +581 -448
  35. package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js.map +1 -1
  36. package/dist/buildmyiq/pages/catalog/CatalogPage.d.ts.map +1 -1
  37. package/dist/buildmyiq/pages/catalog/CatalogPage.js +52 -42
  38. package/dist/buildmyiq/pages/catalog/CatalogPage.js.map +1 -1
  39. package/dist/buildmyiq/pages/catalog/CourseDetailPage.d.ts.map +1 -1
  40. package/dist/buildmyiq/pages/catalog/CourseDetailPage.js +422 -301
  41. package/dist/buildmyiq/pages/catalog/CourseDetailPage.js.map +1 -1
  42. package/dist/buildmyiq/pages/certificates/CertificatesPage.d.ts.map +1 -1
  43. package/dist/buildmyiq/pages/certificates/CertificatesPage.js +237 -151
  44. package/dist/buildmyiq/pages/certificates/CertificatesPage.js.map +1 -1
  45. package/dist/buildmyiq/pages/cohorts/CohortsPage.d.ts.map +1 -1
  46. package/dist/buildmyiq/pages/cohorts/CohortsPage.js +219 -138
  47. package/dist/buildmyiq/pages/cohorts/CohortsPage.js.map +1 -1
  48. package/dist/buildmyiq/pages/insights/InsightsPage.d.ts.map +1 -1
  49. package/dist/buildmyiq/pages/insights/InsightsPage.js +276 -152
  50. package/dist/buildmyiq/pages/insights/InsightsPage.js.map +1 -1
  51. package/dist/buildmyiq/pages/learning/LessonPlayerPage.d.ts.map +1 -1
  52. package/dist/buildmyiq/pages/learning/LessonPlayerPage.js +237 -174
  53. package/dist/buildmyiq/pages/learning/LessonPlayerPage.js.map +1 -1
  54. package/dist/buildmyiq/pages/learning/MyLearningPage.d.ts.map +1 -1
  55. package/dist/buildmyiq/pages/learning/MyLearningPage.js +307 -169
  56. package/dist/buildmyiq/pages/learning/MyLearningPage.js.map +1 -1
  57. package/dist/buildmyiq/pages/paths/PathsPage.d.ts +4 -0
  58. package/dist/buildmyiq/pages/paths/PathsPage.d.ts.map +1 -0
  59. package/dist/buildmyiq/pages/paths/PathsPage.js +187 -0
  60. package/dist/buildmyiq/pages/paths/PathsPage.js.map +1 -0
  61. package/dist/buildmyiq/pages/skills/SkillsPage.d.ts.map +1 -1
  62. package/dist/buildmyiq/pages/skills/SkillsPage.js +233 -140
  63. package/dist/buildmyiq/pages/skills/SkillsPage.js.map +1 -1
  64. package/dist/buildmyiq/pages/submissions/SubmissionsPage.d.ts.map +1 -1
  65. package/dist/buildmyiq/pages/submissions/SubmissionsPage.js +379 -275
  66. package/dist/buildmyiq/pages/submissions/SubmissionsPage.js.map +1 -1
  67. package/package.json +1 -1
@@ -1,63 +1,86 @@
1
1
  import { useBuildmyiq as e } from "../../context/BuildmyiqContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatDate as n, formatEnumLabel as r, formatNumber as i } from "../../utils/formatters.js";
4
- import { StatusBadge as a } from "../../components/StatusBadge.js";
5
- import { EmptyState as o } from "../../components/EmptyState.js";
6
- import { ErrorView as s, LoadingView as c } from "../../components/StateViews.js";
7
- import { DataTable as ee } from "../../components/DataTable.js";
8
- import { FilterTabs as te } from "../../components/FilterTabs.js";
3
+ import { MetricsCard as n } from "../../components/MetricsCard.js";
4
+ import { formatDate as r, formatEnumLabel as i, formatNumber as a } from "../../utils/formatters.js";
5
+ import { StatusBadge as ee } from "../../components/StatusBadge.js";
6
+ import { EmptyState as te } from "../../components/EmptyState.js";
7
+ import { ErrorView as ne, LoadingView as re } from "../../components/StateViews.js";
8
+ import { DataTable as ie } from "../../components/DataTable.js";
9
+ import { FilterTabs as ae } from "../../components/FilterTabs.js";
9
10
  import "../../context/index.js";
10
- import { useBuiCohorts as ne, useBuiCourses as re, useBuiCreateCohort as l } from "../../hooks/useBuildmyiqApi.js";
11
+ import { useBuiCohorts as o, useBuiCourses as s, useBuiCreateCohort as c } from "../../hooks/useBuildmyiqApi.js";
11
12
  import "../../hooks/index.js";
12
13
  import "../../components/index.js";
13
- import { COHORT_STATUSES as u } from "../../types/index.js";
14
- import { useMemo as d, useState as f } from "react";
15
- import { CalendarRange as p, Plus as m, Users as h } from "lucide-react";
16
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
17
- import { Button as v, Input as y, Label as b, ResponsiveDialog as ie, ResponsiveDialogContent as ae, ResponsiveDialogDescription as x, ResponsiveDialogFooter as S, ResponsiveDialogHeader as C, ResponsiveDialogTitle as w, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k } from "@burdenoff/fe-libs/ui";
14
+ import { COHORT_STATUSES as l } from "../../types/index.js";
15
+ import { useMemo as u, useState as d } from "react";
16
+ import { CalendarClock as f, CalendarRange as oe, PlayCircle as se, Plus as p, UserPlus as ce, Users as m } from "lucide-react";
17
+ import { Fragment as le, jsx as h, jsxs as g } from "react/jsx-runtime";
18
+ import { Button as _, Input as v, Label as y, ResponsiveDialog as ue, ResponsiveDialogContent as de, ResponsiveDialogDescription as b, ResponsiveDialogFooter as x, ResponsiveDialogHeader as fe, ResponsiveDialogTitle as pe, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E } from "@burdenoff/fe-libs/ui";
18
19
  //#region src/buildmyiq/pages/cohorts/CohortsPage.tsx
19
- var A = (e) => {
20
+ var D = (e) => {
20
21
  let t = e.trim();
21
22
  if (!t) return;
22
23
  let n = new Date(t);
23
24
  return Number.isNaN(n.getTime()) ? void 0 : n.toISOString();
24
- }, j = () => {
25
- let { currentUser: j } = e(), [M, N] = f("ALL"), [P, F] = f("ALL"), [I, L] = f(!1), [R, z] = f(null), B = d(() => ({
25
+ }, me = {
26
+ SCHEDULED: "bg-bg-sunken text-text-secondary",
27
+ ENROLLING: "bg-status-warning-bg-subtle text-status-warning-text",
28
+ ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
29
+ COMPLETED: "bg-[var(--color-accent-soft)] text-[var(--color-accent-primary)]",
30
+ CANCELLED: "bg-status-error-bg-subtle text-status-error-text"
31
+ }, O = (e, t) => {
32
+ if (!e || !t) return null;
33
+ let n = new Date(e).getTime(), r = new Date(t).getTime();
34
+ return Number.isNaN(n) || Number.isNaN(r) || r < n ? null : Math.max(1, Math.round((r - n) / (10080 * 60 * 1e3)));
35
+ }, k = () => {
36
+ let { currentUser: k } = e(), [A, j] = d("ALL"), [M, N] = d("ALL"), [P, F] = d(!1), [I, L] = d(null), R = u(() => ({
26
37
  courseId: "",
27
38
  name: "",
28
39
  capacity: "",
29
- facilitatorId: j?.id ?? "",
40
+ facilitatorId: k?.id ?? "",
30
41
  startDate: "",
31
42
  endDate: ""
32
- }), [j?.id]), [V, H] = f(B), U = re({ limit: 100 }), W = d(() => U.data?.items ?? [], [U.data]), G = d(() => {
43
+ }), [k?.id]), [z, B] = d(R), V = s({ limit: 100 }), H = u(() => V.data?.items ?? [], [V.data]), U = u(() => {
33
44
  let e = /* @__PURE__ */ new Map();
34
- for (let t of W) e.set(t.id, t.title);
45
+ for (let t of H) e.set(t.id, t.title);
35
46
  return e;
36
- }, [W]), K = ne(P === "ALL" ? void 0 : P), q = l(), J = d(() => K.data ?? [], [K.data]), Y = d(() => {
47
+ }, [H]), W = o(M === "ALL" ? void 0 : M), G = c(), K = u(() => W.data ?? [], [W.data]), q = u(() => {
37
48
  let e = {};
38
- for (let t of J) e[t.status] = (e[t.status] ?? 0) + 1;
49
+ for (let t of K) e[t.status] = (e[t.status] ?? 0) + 1;
39
50
  return e;
40
- }, [J]), X = d(() => M === "ALL" ? J : J.filter((e) => e.status === M), [J, M]), oe = d(() => [{
51
+ }, [K]), J = u(() => ({
52
+ total: K.length,
53
+ active: q.ACTIVE ?? 0,
54
+ enrolling: q.ENROLLING ?? 0,
55
+ scheduled: q.SCHEDULED ?? 0,
56
+ seats: K.reduce((e, t) => e + (t.capacity ?? 0), 0)
57
+ }), [K, q]), Y = u(() => A === "ALL" ? K : K.filter((e) => e.status === A), [K, A]), he = u(() => [{
41
58
  value: "ALL",
42
59
  label: "All",
43
- count: J.length
44
- }, ...u.map((e) => ({
60
+ count: K.length
61
+ }, ...l.map((e) => ({
45
62
  value: e,
46
- label: r(e),
47
- count: Y[e] ?? 0
48
- }))], [J.length, Y]), se = d(() => [
63
+ label: i(e),
64
+ count: q[e] ?? 0
65
+ }))], [K.length, q]), X = u(() => [
49
66
  {
50
67
  key: "name",
51
68
  header: "Cohort",
52
69
  sortValue: (e) => e.name.toLowerCase(),
53
- render: (e) => /* @__PURE__ */ _("div", {
70
+ render: (e) => /* @__PURE__ */ g("div", {
54
71
  className: "flex items-center gap-3",
55
- children: [/* @__PURE__ */ g("div", {
56
- className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-[var(--color-accent-primary)]",
57
- children: /* @__PURE__ */ g(h, { className: "h-4 w-4" })
58
- }), /* @__PURE__ */ g("span", {
59
- className: "min-w-0 truncate font-semibold text-text-primary",
60
- children: e.name
72
+ children: [/* @__PURE__ */ h("div", {
73
+ className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-lg ${me[e.status]}`,
74
+ children: /* @__PURE__ */ h(m, { className: "h-4 w-4" })
75
+ }), /* @__PURE__ */ g("div", {
76
+ className: "min-w-0",
77
+ children: [/* @__PURE__ */ h("span", {
78
+ className: "block truncate font-semibold text-text-primary",
79
+ children: e.name
80
+ }), /* @__PURE__ */ h("span", {
81
+ className: "block truncate text-xs text-text-tertiary md:hidden",
82
+ children: U.get(e.courseId) ?? "—"
83
+ })]
61
84
  })]
62
85
  })
63
86
  },
@@ -65,10 +88,10 @@ var A = (e) => {
65
88
  key: "course",
66
89
  header: "Course",
67
90
  hideOnMobile: !0,
68
- sortValue: (e) => (G.get(e.courseId) ?? "").toLowerCase(),
69
- render: (e) => /* @__PURE__ */ g("span", {
91
+ sortValue: (e) => (U.get(e.courseId) ?? "").toLowerCase(),
92
+ render: (e) => /* @__PURE__ */ h("span", {
70
93
  className: "text-text-secondary",
71
- children: G.get(e.courseId) ?? "—"
94
+ children: U.get(e.courseId) ?? "—"
72
95
  })
73
96
  },
74
97
  {
@@ -78,13 +101,16 @@ var A = (e) => {
78
101
  sortValue: (e) => e.capacity,
79
102
  render: (e) => /* @__PURE__ */ g("span", {
80
103
  className: "tabular-nums text-text-secondary",
81
- children: i(e.capacity ?? 0)
104
+ children: [a(e.capacity ?? 0), /* @__PURE__ */ h("span", {
105
+ className: "ml-1 text-text-tertiary",
106
+ children: "seats"
107
+ })]
82
108
  })
83
109
  },
84
110
  {
85
111
  key: "status",
86
112
  header: "Status",
87
- render: (e) => /* @__PURE__ */ g(a, { status: e.status })
113
+ render: (e) => /* @__PURE__ */ h(ee, { status: e.status })
88
114
  },
89
115
  {
90
116
  key: "startDate",
@@ -92,9 +118,9 @@ var A = (e) => {
92
118
  align: "right",
93
119
  hideOnMobile: !0,
94
120
  sortValue: (e) => e.startDate ?? "",
95
- render: (e) => /* @__PURE__ */ g("span", {
121
+ render: (e) => /* @__PURE__ */ h("span", {
96
122
  className: "text-text-tertiary",
97
- children: n(e.startDate)
123
+ children: r(e.startDate)
98
124
  })
99
125
  },
100
126
  {
@@ -103,177 +129,232 @@ var A = (e) => {
103
129
  align: "right",
104
130
  hideOnMobile: !0,
105
131
  sortValue: (e) => e.endDate ?? "",
106
- render: (e) => /* @__PURE__ */ g("span", {
107
- className: "text-text-tertiary",
108
- children: n(e.endDate)
109
- })
132
+ render: (e) => {
133
+ let t = O(e.startDate, e.endDate);
134
+ return /* @__PURE__ */ g("div", {
135
+ className: "text-right",
136
+ children: [/* @__PURE__ */ h("span", {
137
+ className: "text-text-tertiary",
138
+ children: r(e.endDate)
139
+ }), t !== null && /* @__PURE__ */ g("span", {
140
+ className: "block text-xs text-text-tertiary/70",
141
+ children: [
142
+ t,
143
+ " ",
144
+ t === 1 ? "week" : "weeks"
145
+ ]
146
+ })]
147
+ });
148
+ }
110
149
  }
111
- ], [G]), Z = () => {
112
- H(B), z(null), L(!0);
150
+ ], [U]), Z = () => {
151
+ B(R), L(null), F(!0);
113
152
  }, Q = () => {
114
- L(!1), H(B), z(null);
115
- }, ce = async () => {
116
- if (!V.courseId) {
117
- z("Please choose a course for this cohort.");
153
+ F(!1), B(R), L(null);
154
+ }, ge = async () => {
155
+ if (!z.courseId) {
156
+ L("Please choose a course for this cohort.");
118
157
  return;
119
158
  }
120
- if (!V.name.trim()) {
121
- z("Cohort name is required.");
159
+ if (!z.name.trim()) {
160
+ L("Cohort name is required.");
122
161
  return;
123
162
  }
124
- let e = V.capacity.trim() ? Number(V.capacity) : void 0;
163
+ let e = z.capacity.trim() ? Number(z.capacity) : void 0;
125
164
  if (e !== void 0 && (!Number.isFinite(e) || e < 0)) {
126
- z("Capacity must be a non-negative number.");
165
+ L("Capacity must be a non-negative number.");
127
166
  return;
128
167
  }
129
- let t = A(V.startDate), n = A(V.endDate);
168
+ let t = D(z.startDate), n = D(z.endDate);
130
169
  if (t && n && new Date(n) < new Date(t)) {
131
- z("End date cannot be before the start date.");
170
+ L("End date cannot be before the start date.");
132
171
  return;
133
172
  }
134
- z(null);
173
+ L(null);
135
174
  try {
136
- await q.mutateAsync({
137
- courseId: V.courseId,
138
- name: V.name.trim(),
175
+ await G.mutateAsync({
176
+ courseId: z.courseId,
177
+ name: z.name.trim(),
139
178
  capacity: e,
140
- facilitatorId: V.facilitatorId.trim() || void 0,
179
+ facilitatorId: z.facilitatorId.trim() || void 0,
141
180
  startDate: t,
142
181
  endDate: n
143
182
  }), Q();
144
183
  } catch (e) {
145
- z(e instanceof Error ? e.message : "Failed to create cohort.");
184
+ L(e instanceof Error ? e.message : "Failed to create cohort.");
146
185
  }
147
- }, $ = W.length > 0;
148
- return /* @__PURE__ */ _(t, {
186
+ }, $ = H.length > 0, _e = !W.isLoading && !W.isError && J.total > 0;
187
+ return /* @__PURE__ */ g(t, {
149
188
  title: "Cohorts",
150
189
  description: "Scheduled, facilitator-led groups that move through a course together.",
151
190
  titleGradient: !0,
152
191
  aurora: !0,
153
- actions: /* @__PURE__ */ _(v, {
192
+ actions: /* @__PURE__ */ g(_, {
154
193
  onClick: Z,
155
194
  disabled: !$,
156
- children: [/* @__PURE__ */ g(m, { className: "mr-1.5 h-4 w-4" }), " New cohort"]
195
+ children: [/* @__PURE__ */ h(p, { className: "mr-1.5 h-4 w-4" }), " New cohort"]
157
196
  }),
158
197
  children: [
159
- /* @__PURE__ */ _("div", {
198
+ _e && /* @__PURE__ */ g("div", {
199
+ className: "mb-5 grid grid-cols-2 gap-4 sm:grid-cols-4",
200
+ children: [
201
+ /* @__PURE__ */ h(n, {
202
+ icon: /* @__PURE__ */ h(m, { className: "h-5 w-5" }),
203
+ value: J.total,
204
+ label: "Cohorts",
205
+ featured: !0,
206
+ footer: /* @__PURE__ */ g("p", {
207
+ className: "text-xs text-text-tertiary",
208
+ children: [a(J.seats), " seats scheduled"]
209
+ })
210
+ }),
211
+ /* @__PURE__ */ h(n, {
212
+ icon: /* @__PURE__ */ h(se, { className: "h-5 w-5" }),
213
+ value: J.active,
214
+ label: "Active",
215
+ accent: "success"
216
+ }),
217
+ /* @__PURE__ */ h(n, {
218
+ icon: /* @__PURE__ */ h(ce, { className: "h-5 w-5" }),
219
+ value: J.enrolling,
220
+ label: "Enrolling",
221
+ accent: "warning"
222
+ }),
223
+ /* @__PURE__ */ h(n, {
224
+ icon: /* @__PURE__ */ h(f, { className: "h-5 w-5" }),
225
+ value: J.scheduled,
226
+ label: "Scheduled"
227
+ })
228
+ ]
229
+ }),
230
+ /* @__PURE__ */ g("div", {
160
231
  className: "mb-5 flex flex-wrap items-center gap-3",
161
- children: [/* @__PURE__ */ g(te, {
162
- options: oe,
232
+ children: [/* @__PURE__ */ h(ae, {
233
+ options: he,
234
+ value: A,
235
+ onChange: j
236
+ }), /* @__PURE__ */ g(S, {
163
237
  value: M,
164
- onChange: N
165
- }), /* @__PURE__ */ _(T, {
166
- value: P,
167
- onValueChange: (e) => F(e),
168
- children: [/* @__PURE__ */ g(O, {
238
+ onValueChange: (e) => N(e),
239
+ children: [/* @__PURE__ */ h(T, {
169
240
  className: "w-56",
170
241
  "aria-label": "Filter by course",
171
- children: /* @__PURE__ */ g(k, { placeholder: "All courses" })
172
- }), /* @__PURE__ */ _(E, { children: [/* @__PURE__ */ g(D, {
242
+ children: /* @__PURE__ */ h(E, { placeholder: "All courses" })
243
+ }), /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(w, {
173
244
  value: "ALL",
174
245
  children: "All courses"
175
- }), W.map((e) => /* @__PURE__ */ g(D, {
246
+ }), H.map((e) => /* @__PURE__ */ h(w, {
176
247
  value: e.id,
177
248
  children: e.title
178
249
  }, e.id))] })]
179
250
  })]
180
251
  }),
181
- K.isLoading ? /* @__PURE__ */ g(c, { label: "Loading cohorts…" }) : K.isError ? /* @__PURE__ */ g(s, {
252
+ W.isLoading ? /* @__PURE__ */ h(re, { label: "Loading cohorts…" }) : W.isError ? /* @__PURE__ */ h(ne, {
182
253
  message: "Couldn't load cohorts.",
183
- onRetry: () => K.refetch()
184
- }) : X.length === 0 ? /* @__PURE__ */ g(o, {
185
- illustration: M === "ALL" && P === "ALL" ? "onboarding" : "empty-search",
186
- icon: /* @__PURE__ */ g(p, { className: "h-10 w-10" }),
187
- title: M === "ALL" && P === "ALL" ? "No cohorts yet" : "No cohorts match these filters",
188
- description: M === "ALL" && P === "ALL" ? $ ? "Schedule a cohort to run a course with a group of learners on a shared timeline." : "Publish a course first, then schedule a cohort to run it with a group of learners." : "Try a different status or course to see more cohorts.",
189
- action: M === "ALL" && P === "ALL" && $ ? /* @__PURE__ */ _(v, {
254
+ onRetry: () => W.refetch()
255
+ }) : Y.length === 0 ? /* @__PURE__ */ h(te, {
256
+ illustration: A === "ALL" && M === "ALL" ? "onboarding" : "empty-search",
257
+ icon: /* @__PURE__ */ h(oe, { className: "h-10 w-10" }),
258
+ title: A === "ALL" && M === "ALL" ? "No cohorts yet" : "No cohorts match these filters",
259
+ description: A === "ALL" && M === "ALL" ? $ ? "Schedule a cohort to run a course with a group of learners on a shared timeline." : "Publish a course first, then schedule a cohort to run it with a group of learners." : "Try a different status or course to see more cohorts.",
260
+ action: A === "ALL" && M === "ALL" && $ ? /* @__PURE__ */ g(_, {
190
261
  onClick: Z,
191
- children: [/* @__PURE__ */ g(m, { className: "mr-1.5 h-4 w-4" }), " New cohort"]
262
+ children: [/* @__PURE__ */ h(p, { className: "mr-1.5 h-4 w-4" }), " New cohort"]
192
263
  }) : void 0
193
- }) : /* @__PURE__ */ g(ee, {
194
- columns: se,
195
- rows: X,
264
+ }) : /* @__PURE__ */ g(le, { children: [/* @__PURE__ */ h(ie, {
265
+ columns: X,
266
+ rows: Y,
196
267
  rowKey: (e) => e.id,
197
268
  defaultSort: {
198
269
  key: "startDate",
199
270
  dir: "desc"
200
271
  }
201
- }),
202
- /* @__PURE__ */ g(ie, {
203
- open: I,
272
+ }), /* @__PURE__ */ g("p", {
273
+ className: "mt-4 text-center text-sm text-text-tertiary tabular-nums",
274
+ children: [
275
+ "Showing ",
276
+ Y.length,
277
+ " of ",
278
+ K.length,
279
+ " ",
280
+ K.length === 1 ? "cohort" : "cohorts"
281
+ ]
282
+ })] }),
283
+ /* @__PURE__ */ h(ue, {
284
+ open: P,
204
285
  onOpenChange: (e) => {
205
- e ? L(!0) : Q();
286
+ e ? F(!0) : Q();
206
287
  },
207
- children: /* @__PURE__ */ _(ae, { children: [/* @__PURE__ */ _(C, { children: [/* @__PURE__ */ g(w, { children: "New cohort" }), /* @__PURE__ */ g(x, { children: "Schedule a facilitator-led group to run a course together." })] }), /* @__PURE__ */ _("form", {
288
+ children: /* @__PURE__ */ g(de, { children: [/* @__PURE__ */ g(fe, { children: [/* @__PURE__ */ h(pe, { children: "New cohort" }), /* @__PURE__ */ h(b, { children: "Schedule a facilitator-led group to run a course together." })] }), /* @__PURE__ */ g("form", {
208
289
  onSubmit: (e) => {
209
- e.preventDefault(), ce();
290
+ e.preventDefault(), ge();
210
291
  },
211
- children: [/* @__PURE__ */ _("div", {
292
+ children: [/* @__PURE__ */ g("div", {
212
293
  className: "grid gap-4 py-2",
213
294
  children: [
214
- /* @__PURE__ */ _("div", {
295
+ /* @__PURE__ */ g("div", {
215
296
  className: "grid gap-1.5",
216
- children: [/* @__PURE__ */ g(b, {
297
+ children: [/* @__PURE__ */ h(y, {
217
298
  htmlFor: "cohort-course",
218
299
  children: "Course *"
219
- }), /* @__PURE__ */ _(T, {
220
- value: V.courseId,
221
- onValueChange: (e) => H((t) => ({
300
+ }), /* @__PURE__ */ g(S, {
301
+ value: z.courseId,
302
+ onValueChange: (e) => B((t) => ({
222
303
  ...t,
223
304
  courseId: e
224
305
  })),
225
- children: [/* @__PURE__ */ g(O, {
306
+ children: [/* @__PURE__ */ h(T, {
226
307
  id: "cohort-course",
227
- children: /* @__PURE__ */ g(k, { placeholder: "Select a course" })
228
- }), /* @__PURE__ */ g(E, { children: W.map((e) => /* @__PURE__ */ g(D, {
308
+ children: /* @__PURE__ */ h(E, { placeholder: "Select a course" })
309
+ }), /* @__PURE__ */ h(C, { children: H.map((e) => /* @__PURE__ */ h(w, {
229
310
  value: e.id,
230
311
  children: e.title
231
312
  }, e.id)) })]
232
313
  })]
233
314
  }),
234
- /* @__PURE__ */ _("div", {
315
+ /* @__PURE__ */ g("div", {
235
316
  className: "grid gap-1.5",
236
- children: [/* @__PURE__ */ g(b, {
317
+ children: [/* @__PURE__ */ h(y, {
237
318
  htmlFor: "cohort-name",
238
319
  children: "Name *"
239
- }), /* @__PURE__ */ g(y, {
320
+ }), /* @__PURE__ */ h(v, {
240
321
  id: "cohort-name",
241
- value: V.name,
242
- onChange: (e) => H((t) => ({
322
+ value: z.name,
323
+ onChange: (e) => B((t) => ({
243
324
  ...t,
244
325
  name: e.target.value
245
326
  })),
246
327
  placeholder: "Spring 2026 Cohort"
247
328
  })]
248
329
  }),
249
- /* @__PURE__ */ _("div", {
330
+ /* @__PURE__ */ g("div", {
250
331
  className: "grid gap-2 sm:grid-cols-2",
251
- children: [/* @__PURE__ */ _("div", {
332
+ children: [/* @__PURE__ */ g("div", {
252
333
  className: "grid gap-1.5",
253
- children: [/* @__PURE__ */ g(b, {
334
+ children: [/* @__PURE__ */ h(y, {
254
335
  htmlFor: "cohort-capacity",
255
336
  children: "Capacity"
256
- }), /* @__PURE__ */ g(y, {
337
+ }), /* @__PURE__ */ h(v, {
257
338
  id: "cohort-capacity",
258
339
  type: "number",
259
340
  min: "0",
260
341
  step: "1",
261
- value: V.capacity,
262
- onChange: (e) => H((t) => ({
342
+ value: z.capacity,
343
+ onChange: (e) => B((t) => ({
263
344
  ...t,
264
345
  capacity: e.target.value
265
346
  })),
266
347
  placeholder: "25"
267
348
  })]
268
- }), /* @__PURE__ */ _("div", {
349
+ }), /* @__PURE__ */ g("div", {
269
350
  className: "grid gap-1.5",
270
- children: [/* @__PURE__ */ g(b, {
351
+ children: [/* @__PURE__ */ h(y, {
271
352
  htmlFor: "cohort-facilitator",
272
353
  children: "Facilitator (user ID)"
273
- }), /* @__PURE__ */ g(y, {
354
+ }), /* @__PURE__ */ h(v, {
274
355
  id: "cohort-facilitator",
275
- value: V.facilitatorId,
276
- onChange: (e) => H((t) => ({
356
+ value: z.facilitatorId,
357
+ onChange: (e) => B((t) => ({
277
358
  ...t,
278
359
  facilitatorId: e.target.value
279
360
  })),
@@ -281,52 +362,52 @@ var A = (e) => {
281
362
  })]
282
363
  })]
283
364
  }),
284
- /* @__PURE__ */ _("div", {
365
+ /* @__PURE__ */ g("div", {
285
366
  className: "grid gap-2 sm:grid-cols-2",
286
- children: [/* @__PURE__ */ _("div", {
367
+ children: [/* @__PURE__ */ g("div", {
287
368
  className: "grid gap-1.5",
288
- children: [/* @__PURE__ */ g(b, {
369
+ children: [/* @__PURE__ */ h(y, {
289
370
  htmlFor: "cohort-start",
290
371
  children: "Start date"
291
- }), /* @__PURE__ */ g(y, {
372
+ }), /* @__PURE__ */ h(v, {
292
373
  id: "cohort-start",
293
374
  type: "date",
294
- value: V.startDate,
295
- onChange: (e) => H((t) => ({
375
+ value: z.startDate,
376
+ onChange: (e) => B((t) => ({
296
377
  ...t,
297
378
  startDate: e.target.value
298
379
  }))
299
380
  })]
300
- }), /* @__PURE__ */ _("div", {
381
+ }), /* @__PURE__ */ g("div", {
301
382
  className: "grid gap-1.5",
302
- children: [/* @__PURE__ */ g(b, {
383
+ children: [/* @__PURE__ */ h(y, {
303
384
  htmlFor: "cohort-end",
304
385
  children: "End date"
305
- }), /* @__PURE__ */ g(y, {
386
+ }), /* @__PURE__ */ h(v, {
306
387
  id: "cohort-end",
307
388
  type: "date",
308
- value: V.endDate,
309
- onChange: (e) => H((t) => ({
389
+ value: z.endDate,
390
+ onChange: (e) => B((t) => ({
310
391
  ...t,
311
392
  endDate: e.target.value
312
393
  }))
313
394
  })]
314
395
  })]
315
396
  }),
316
- R && /* @__PURE__ */ g("p", {
397
+ I && /* @__PURE__ */ h("p", {
317
398
  className: "text-sm text-status-error-text",
318
- children: R
399
+ children: I
319
400
  })
320
401
  ]
321
- }), /* @__PURE__ */ _(S, { children: [/* @__PURE__ */ g(v, {
402
+ }), /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(_, {
322
403
  type: "button",
323
404
  variant: "outline",
324
405
  onClick: Q,
325
406
  children: "Cancel"
326
- }), /* @__PURE__ */ g(v, {
407
+ }), /* @__PURE__ */ h(_, {
327
408
  type: "submit",
328
- disabled: q.isPending,
329
- children: q.isPending ? "Creating…" : "Create cohort"
409
+ disabled: G.isPending,
410
+ children: G.isPending ? "Creating…" : "Create cohort"
330
411
  })] })]
331
412
  })] })
332
413
  })
@@ -334,6 +415,6 @@ var A = (e) => {
334
415
  });
335
416
  };
336
417
  //#endregion
337
- export { j as CohortsPage };
418
+ export { k as CohortsPage };
338
419
 
339
420
  //# sourceMappingURL=CohortsPage.js.map