@exxatdesignux/ui 0.3.0 → 0.4.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 (214) hide show
  1. package/CHANGELOG.md +701 -6
  2. package/README.md +138 -0
  3. package/bin/init.mjs +134 -31
  4. package/consumer-extras/cursor-rules/exxat-board-cards.mdc +1 -1
  5. package/consumer-extras/cursor-rules/exxat-centralized-list-dataset.mdc +2 -2
  6. package/consumer-extras/cursor-rules/exxat-collaboration-access.mdc +1 -1
  7. package/consumer-extras/cursor-rules/exxat-data-tables.mdc +2 -0
  8. package/consumer-extras/cursor-rules/exxat-dedicated-search-surfaces.mdc +1 -1
  9. package/consumer-extras/cursor-rules/exxat-ds-agents.mdc +3 -3
  10. package/consumer-extras/cursor-rules/exxat-library-hub-header.mdc +28 -0
  11. package/consumer-extras/cursor-rules/exxat-mono-ids.mdc +1 -1
  12. package/consumer-extras/cursor-rules/exxat-person-identity-display.mdc +1 -1
  13. package/consumer-extras/cursor-rules/exxat-primary-nav-secondary-panel.mdc +6 -6
  14. package/consumer-extras/cursor-rules/exxat-reuse-before-custom.mdc +1 -1
  15. package/consumer-extras/cursor-skills/exxat-board-cards/SKILL.md +2 -2
  16. package/consumer-extras/cursor-skills/exxat-centralized-list-dataset/SKILL.md +1 -1
  17. package/consumer-extras/cursor-skills/exxat-collaboration-access/SKILL.md +3 -3
  18. package/consumer-extras/cursor-skills/exxat-dedicated-search-surfaces/SKILL.md +2 -2
  19. package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +7 -7
  20. package/consumer-extras/cursor-skills/exxat-kpi-flat-band/SKILL.md +1 -1
  21. package/consumer-extras/cursor-skills/exxat-list-page-view-shells/SKILL.md +1 -1
  22. package/consumer-extras/cursor-skills/exxat-mono-ids/SKILL.md +4 -4
  23. package/consumer-extras/cursor-skills/exxat-primary-nav-secondary-panel/SKILL.md +8 -8
  24. package/consumer-extras/cursor-skills/exxat-token-economy/SKILL.md +277 -0
  25. package/consumer-extras/handbook/HANDBOOK.md +2 -0
  26. package/consumer-extras/handbook/glossary.md +2 -1
  27. package/consumer-extras/handbook/reference-implementations.md +31 -4
  28. package/consumer-extras/patterns/collaboration-access-pattern.md +7 -7
  29. package/consumer-extras/patterns/data-views-pattern.md +18 -16
  30. package/consumer-extras/patterns/kpi-flat-band-pattern.md +2 -2
  31. package/dist/components/data-table/index.js +2 -2
  32. package/dist/components/data-table/index.js.map +1 -1
  33. package/dist/components/data-table/pagination.js +3 -3
  34. package/dist/components/data-table/pagination.js.map +1 -1
  35. package/dist/components/data-table/use-table-state.d.ts +1 -1
  36. package/dist/components/data-table/use-table-state.js.map +1 -1
  37. package/dist/components/data-views/data-row-list.js.map +1 -1
  38. package/dist/components/data-views/finder-panel-view.d.ts +1 -1
  39. package/dist/components/data-views/finder-panel-view.js.map +1 -1
  40. package/dist/components/data-views/hub-table.d.ts +9 -3
  41. package/dist/components/data-views/hub-table.js +262 -40
  42. package/dist/components/data-views/hub-table.js.map +1 -1
  43. package/dist/components/data-views/index.js +262 -40
  44. package/dist/components/data-views/index.js.map +1 -1
  45. package/dist/components/data-views/list-page-split-hub-tokens.d.ts +2 -2
  46. package/dist/components/data-views/list-page-split-hub-tokens.js.map +1 -1
  47. package/dist/components/data-views/list-page-tree-column-header.d.ts +1 -1
  48. package/dist/components/data-views/list-page-tree-column-header.js.map +1 -1
  49. package/dist/components/data-views/list-page-tree-panel-shell.js.map +1 -1
  50. package/dist/components/data-views/os-folder-glyph.d.ts +1 -1
  51. package/dist/components/data-views/os-folder-glyph.js.map +1 -1
  52. package/dist/components/ui/avatar.d.ts +1 -1
  53. package/dist/components/ui/key-metrics.js.map +1 -1
  54. package/dist/index.js +136 -39
  55. package/dist/index.js.map +1 -1
  56. package/package.json +3 -2
  57. package/src/components/data-table/index.tsx +2 -2
  58. package/src/components/data-table/pagination.tsx +5 -1
  59. package/src/components/data-table/use-table-state.ts +1 -1
  60. package/src/components/data-views/data-row-list.tsx +1 -1
  61. package/src/components/data-views/finder-panel-view.tsx +2 -2
  62. package/src/components/data-views/hub-table.tsx +149 -41
  63. package/src/components/data-views/list-page-split-hub-tokens.ts +2 -2
  64. package/src/components/data-views/list-page-tree-column-header.tsx +1 -1
  65. package/src/components/data-views/os-folder-glyph.tsx +1 -1
  66. package/src/components/ui/key-metrics.tsx +1 -1
  67. package/template/.claude/skills/exxat-ds-skill/SKILL.md +8 -7
  68. package/template/.cursor/rules/exxat-accessibility.mdc +1 -1
  69. package/template/.cursor/rules/exxat-command-menu.mdc +1 -1
  70. package/template/.cursor/rules/exxat-dashboard-view-charts.mdc +6 -6
  71. package/template/.cursor/rules/exxat-data-tables.mdc +3 -3
  72. package/template/.cursor/rules/exxat-kbd-shortcuts.mdc +5 -5
  73. package/template/.cursor/rules/exxat-mono-ids.mdc +1 -1
  74. package/template/.cursor/rules/exxat-page-vs-drawer.mdc +1 -1
  75. package/template/.cursor/rules/exxat-table-properties-drawer.mdc +1 -1
  76. package/template/AGENTS.md +43 -37
  77. package/template/app/(app)/columns/page.tsx +11 -0
  78. package/template/app/(app)/library/all/page.tsx +11 -0
  79. package/template/app/(app)/library/find/page.tsx +12 -0
  80. package/template/app/(app)/{question-bank → library}/layout.tsx +16 -16
  81. package/template/app/(app)/library/list/page.tsx +12 -0
  82. package/template/app/(app)/{question-bank → library}/new/page.tsx +10 -10
  83. package/template/app/(app)/library/page.tsx +11 -0
  84. package/template/app/(app)/tokens-themes/page.tsx +11 -0
  85. package/template/components/ask-leo-composer.tsx +2 -2
  86. package/template/components/columns-client.tsx +158 -0
  87. package/template/components/columns-showcase.tsx +541 -0
  88. package/template/components/data-views/index.ts +32 -6
  89. package/template/components/data-views/{question-bank-folder-tree-branch.tsx → library-folder-tree-branch.tsx} +19 -19
  90. package/template/components/data-views/table-cells.tsx +673 -0
  91. package/template/components/folder-details-shell.tsx +11 -11
  92. package/template/components/hub-tree-panel-view.tsx +24 -24
  93. package/template/components/{question-bank-board-view.tsx → library-board-view.tsx} +44 -44
  94. package/template/components/{question-bank-client.tsx → library-client.tsx} +82 -82
  95. package/template/components/{question-bank-dashboard-charts.tsx → library-dashboard-charts.tsx} +14 -14
  96. package/template/components/{question-bank-favorite-button.tsx → library-favorite-button.tsx} +7 -7
  97. package/template/components/{question-bank-hub-client.tsx → library-hub-client.tsx} +43 -43
  98. package/template/components/{question-bank-new-folder-sheet.tsx → library-new-folder-sheet.tsx} +14 -14
  99. package/template/components/{question-bank-os-folder-view.tsx → library-os-folder-view.tsx} +31 -31
  100. package/template/components/{question-bank-page-header.tsx → library-page-header.tsx} +6 -6
  101. package/template/components/library-panel-activator.tsx +8 -0
  102. package/template/components/{question-bank-secondary-nav.tsx → library-secondary-nav.tsx} +60 -60
  103. package/template/components/{question-bank-table.tsx → library-table.tsx} +97 -97
  104. package/template/components/list-hub-status-badge.tsx +2 -2
  105. package/template/components/{new-question-composer.tsx → new-library-item-form.tsx} +37 -37
  106. package/template/components/sidebar/app-sidebar.tsx +61 -5
  107. package/template/components/sidebar/secondary-panel.tsx +109 -56
  108. package/template/components/sidebar/sidebar-auto-collapse.tsx +2 -2
  109. package/template/components/sidebar/sidebar-auto-open.tsx +2 -1
  110. package/template/components/table-properties/types.ts +1 -1
  111. package/template/components/templates/discovery-hub-template.tsx +1 -1
  112. package/template/components/templates/new-focus-template.tsx +2 -2
  113. package/template/components/templates/secondary-panel-hub-template.tsx +1 -1
  114. package/template/components/tokens-secondary-nav.tsx +192 -0
  115. package/template/components/tokens-themes-client.tsx +476 -0
  116. package/template/components/tokens-themes-section.tsx +386 -0
  117. package/template/docs/HANDBOOK.md +187 -0
  118. package/template/docs/blueprints/README.md +1 -1
  119. package/template/docs/blueprints/board-card.md +1 -1
  120. package/template/docs/blueprints/data-table.md +2 -2
  121. package/template/docs/blueprints/list-page-template.md +3 -3
  122. package/template/docs/blueprints/page-header.md +4 -4
  123. package/template/docs/collaboration-access-pattern.md +7 -7
  124. package/template/docs/component-selection-guide.md +1 -1
  125. package/template/docs/data-views-pattern.md +18 -16
  126. package/template/docs/glossary.md +58 -0
  127. package/template/docs/kpi-flat-band-pattern.md +3 -3
  128. package/template/docs/kpi-trend-pattern.md +18 -3
  129. package/template/docs/large-dataset-strategy.md +155 -0
  130. package/template/docs/library-hub-header-pattern.md +25 -0
  131. package/template/docs/migrations/_template.md +1 -1
  132. package/template/docs/reference-implementations.md +151 -0
  133. package/template/docs/token-taxonomy.md +1 -1
  134. package/template/docs/voice-and-tone.md +262 -0
  135. package/template/eslint.config.mjs +9 -39
  136. package/template/hooks/use-secondary-panel-hub-nav.ts +10 -10
  137. package/template/lib/ask-leo-route-context.ts +6 -18
  138. package/template/lib/coach-mark-registry.ts +0 -16
  139. package/template/lib/command-menu-config.ts +5 -12
  140. package/template/lib/command-menu-search-data.ts +8 -39
  141. package/template/lib/{question-bank-authoring.ts → library-authoring.ts} +89 -88
  142. package/template/lib/library-dedicated-search.ts +19 -0
  143. package/template/lib/library-hub-search.ts +90 -0
  144. package/template/lib/library-nav.ts +477 -0
  145. package/template/lib/library-recent-searches.ts +22 -0
  146. package/template/lib/{placements-supported-views.ts → library-supported-views.ts} +2 -2
  147. package/template/lib/list-status-badges.ts +16 -104
  148. package/template/lib/mock/dashboard.ts +1 -1
  149. package/template/lib/mock/{question-bank-folders.ts → library-folders.ts} +30 -30
  150. package/template/lib/mock/library-header-collaborators.ts +54 -0
  151. package/template/lib/mock/{question-bank-inspector.ts → library-inspector.ts} +29 -29
  152. package/template/lib/mock/{question-bank-kpi.ts → library-kpi.ts} +20 -20
  153. package/template/lib/mock/library.ts +249 -0
  154. package/template/lib/mock/navigation.tsx +32 -26
  155. package/template/lib/table-state-lifecycle.ts +1 -1
  156. package/template/next.config.mjs +7 -4
  157. package/template/package.json +0 -1
  158. package/tokens/hooks-index.json +2874 -0
  159. package/consumer-extras/cursor-rules/exxat-question-bank-hub-header.mdc +0 -28
  160. package/template/app/(app)/examples/page.tsx +0 -41
  161. package/template/app/(app)/question-bank/find/page.tsx +0 -12
  162. package/template/app/(app)/question-bank/library/page.tsx +0 -11
  163. package/template/app/(app)/question-bank/list/page.tsx +0 -12
  164. package/template/app/(app)/question-bank/page.tsx +0 -11
  165. package/template/components/compliance-board-view.tsx +0 -142
  166. package/template/components/compliance-client.tsx +0 -92
  167. package/template/components/compliance-page-header.tsx +0 -89
  168. package/template/components/compliance-table.tsx +0 -468
  169. package/template/components/data-view-dashboard-charts-compliance.tsx +0 -963
  170. package/template/components/data-view-dashboard-charts-team.tsx +0 -971
  171. package/template/components/data-view-dashboard-charts.tsx +0 -1503
  172. package/template/components/new-placement-back-btn.tsx +0 -28
  173. package/template/components/new-placement-form.tsx +0 -942
  174. package/template/components/placement-board-card.tsx +0 -250
  175. package/template/components/placement-detail.tsx +0 -438
  176. package/template/components/placements-board-view.tsx +0 -397
  177. package/template/components/placements-client.tsx +0 -220
  178. package/template/components/placements-list-view.tsx +0 -124
  179. package/template/components/placements-page-header.tsx +0 -166
  180. package/template/components/placements-table-cells.test.tsx +0 -22
  181. package/template/components/placements-table-cells.tsx +0 -173
  182. package/template/components/placements-table-columns.tsx +0 -210
  183. package/template/components/placements-table.tsx +0 -934
  184. package/template/components/question-bank-panel-activator.tsx +0 -8
  185. package/template/components/rotations-empty-state.tsx +0 -50
  186. package/template/components/rotations-panel-activator.tsx +0 -8
  187. package/template/components/sites-board-view.tsx +0 -67
  188. package/template/components/sites-client.tsx +0 -154
  189. package/template/components/sites-table.tsx +0 -249
  190. package/template/components/team-board-view.tsx +0 -122
  191. package/template/components/team-client.tsx +0 -100
  192. package/template/components/team-page-header.tsx +0 -92
  193. package/template/components/team-table.tsx +0 -553
  194. package/template/docs/question-bank-hub-header-pattern.md +0 -25
  195. package/template/lib/compliance-supported-views.ts +0 -10
  196. package/template/lib/data-view-dashboard-placements-layout.ts +0 -215
  197. package/template/lib/mock/compliance-kpi.ts +0 -61
  198. package/template/lib/mock/compliance.ts +0 -146
  199. package/template/lib/mock/placements-kpi.ts +0 -134
  200. package/template/lib/mock/placements.ts +0 -176
  201. package/template/lib/mock/question-bank-header-collaborators.ts +0 -54
  202. package/template/lib/mock/question-bank.ts +0 -249
  203. package/template/lib/mock/sites-directory.ts +0 -16
  204. package/template/lib/mock/sites-kpi.ts +0 -25
  205. package/template/lib/mock/team-kpi.ts +0 -60
  206. package/template/lib/mock/team.ts +0 -118
  207. package/template/lib/placement-board-card-layout.ts +0 -79
  208. package/template/lib/question-bank-dedicated-search.ts +0 -19
  209. package/template/lib/question-bank-hub-search.ts +0 -90
  210. package/template/lib/question-bank-nav.ts +0 -477
  211. package/template/lib/question-bank-recent-searches.ts +0 -22
  212. package/template/lib/question-bank-supported-views.ts +0 -12
  213. package/template/lib/sites-supported-views.ts +0 -10
  214. package/template/lib/team-supported-views.ts +0 -10
@@ -0,0 +1,151 @@
1
+ # Exxat DS — Reference implementations
2
+
3
+ > When a rule says "see the canonical hub" or "see the catalog page", **this is the index**. Open the file. Copy. Don't reinvent.
4
+
5
+ Reference pages are the **canonical working implementations** of a pattern. They're the source of truth that rules + blueprints summarize. If a rule conflicts with a reference page, the bug is in the rule — open a PR.
6
+
7
+ ---
8
+
9
+ ## How to use this page
10
+
11
+ 1. Find the row that matches the pattern you're building.
12
+ 2. Open the **Reference page** column — that file is the template.
13
+ 3. Read the linked **Blueprint** for the framework-agnostic spec.
14
+ 4. Read the linked **Rule** for the binding MUST / MUST NOT.
15
+ 5. Read the linked **Pattern** for the long-form "why".
16
+
17
+ If you find yourself diverging from the reference page, ask **why** before shipping.
18
+
19
+ ---
20
+
21
+ ## Primary hubs
22
+
23
+ | Pattern | Reference page | Blueprint | Rule(s) | Pattern doc |
24
+ |---|---|---|---|---|
25
+ | Full hub: table + board + dashboard + list + paginated + conditional rules + dashboard customize | `apps/web/components/library-table.tsx` + `library-hub-client.tsx` | [`list-page-template`](./blueprints/list-page-template.md), [`data-table`](./blueprints/data-table.md), [`board-card`](./blueprints/board-card.md), [`key-metrics`](./blueprints/key-metrics.md) | [`exxat-data-tables`](../../../.cursor/rules/exxat-data-tables.mdc), [`exxat-list-page-connected-views`](../../../.cursor/rules/exxat-list-page-connected-views.mdc), [`exxat-centralized-list-dataset`](../../../.cursor/rules/exxat-centralized-list-dataset.mdc) | [`data-views-pattern`](./data-views-pattern.md) |
26
+ | Hub with secondary panel scope (folder rail) | `apps/web/components/library-hub-client.tsx` + `library-secondary-nav.tsx` | [`list-page-template`](./blueprints/list-page-template.md) | [`exxat-primary-nav-secondary-panel`](../../../.cursor/rules/exxat-primary-nav-secondary-panel.mdc), [`exxat-library-hub-header`](../../../.cursor/rules/exxat-library-hub-header.mdc) | [`library-hub-header-pattern`](./library-hub-header-pattern.md) |
27
+ | Hub with secondary panel scope (URL-driven category rail) — **smallest** secondary-panel reference + built-in pagination chrome | `apps/web/components/tokens-themes-client.tsx` + `tokens-secondary-nav.tsx` | [`list-page-template`](./blueprints/list-page-template.md) | [`exxat-primary-nav-secondary-panel`](../../../.cursor/rules/exxat-primary-nav-secondary-panel.mdc) | [`shell-surface-elevation-pattern`](./shell-surface-elevation-pattern.md) |
28
+ | Single-view showcase hub (table only) — **18 SaaS cell patterns**, each rendered by an **importable named cell** from `@/components/data-views` (see "Cell primitives" table below). Categories: select, primary identity + ID + favorite, avatar + name + email, avatar group +N, type pill, difficulty signal, status chip, inline toggle, tag list, rating stars, progress bar, currency, numeric, attachment count, external link, relative time, absolute date, row actions overflow. | `apps/web/components/columns-showcase.tsx` + `columns-client.tsx` | [`list-page-template`](./blueprints/list-page-template.md), [`data-table`](./blueprints/data-table.md) | [`exxat-data-tables`](../../../.cursor/rules/exxat-data-tables.mdc) | — |
29
+
30
+ > **First-time hub builder:** start with `columns-showcase.tsx` (single-view catalog, easiest) or `tokens-themes-client.tsx` (adds a secondary panel + URL-driven scope). Move to `library-table.tsx` only when you genuinely need a board / dashboard / conditional rules.
31
+
32
+ ---
33
+
34
+ ## Cell primitives (importable)
35
+
36
+ Every cell renderer below is exported from `@/components/data-views` (re-exported from `apps/web/components/data-views/table-cells.tsx`). The live catalog page is `/columns`. **Do not re-implement these inside a `ColumnDef['cell']`** — import the name.
37
+
38
+ | Cell | Renders | Import |
39
+ |------|---------|--------|
40
+ | `ProgressCell` | Track + filled bar with auto-tone in thirds; `value`, `max`, `tone`, `label` | `@/components/data-views` |
41
+ | `CurrencyCell` | Right-aligned `tabular-nums`; `value`, `currency` (USD), `locale`, `maximumFractionDigits` | same |
42
+ | `NumericCell` | Right-aligned plain count; `value`, `fractionDigits` | same |
43
+ | `RatingCell` | N of `max` FA stars + value; color + glyph paired (WCAG 1.4.1) | same |
44
+ | `SignalBarsCell` | Wi-Fi-style ordinal bars; `level`, `max`, `tone`, `label` (required) | same |
45
+ | `BooleanToggleCell` | Inline `ToggleSwitch` with `checked` + `onChange(next)`; stops row click propagation | same |
46
+ | `AttachmentCountCell` | Paperclip + count chip; muted dash on `0` | same |
47
+ | `ExternalLinkCell` | Truncated host + new-tab icon; `url`, `label?`; `Tip` shows full URL | same |
48
+ | `RelativeTimeCell` | "3 hours ago" with `Tip(absolute)`; `iso`, `now?` (deterministic snapshots) | same |
49
+ | `PeopleAvatarRailCell` | Face rail with `+N` overflow; `people: PersonStub[]`, **non-overlapping** | same |
50
+ | `PillCell` | Outlined badge + leading FA icon; `label`, `icon?` | same |
51
+ | `TagListCell` | Soft badges with `+N` overflow; `tags`, `visibleMax?`, `formatLabel?` | same |
52
+ | `RowActionsCell<TRow>` | `⋯` overflow dropdown; `row`, `actions: RowActionDef<TRow>[]` (label, icon, onSelect, variant, shortcut, disabled) | same |
53
+ | `EMPTY_DASH` | Aria-hidden `—` placeholder for null/undefined cells | same |
54
+
55
+ **Anti-references** (do NOT copy):
56
+ - ❌ Inlining `Intl.NumberFormat`, `[1,2,3,4,5].map(s => …)` star loops, raw `<a target="_blank">`, `new URL(…).hostname`, or `Intl.RelativeTimeFormat` inside a `cell:`. Import the named cell.
57
+ - ❌ Re-implementing `RowActionsCell` per hub with a custom `DropdownMenu`. The generic `RowActionsCell<TRow>` covers `Open / Edit / Duplicate / Archive`-style menus.
58
+
59
+ ---
60
+
61
+ ## Hub chrome
62
+
63
+ | Pattern | Reference page | Blueprint | Rule(s) |
64
+ |---|---|---|---|
65
+ | Page header — primary hub | `apps/web/components/library-page-header.tsx` | [`page-header`](./blueprints/page-header.md) | [`exxat-collaboration-access`](../../../.cursor/rules/exxat-collaboration-access.mdc), [`exxat-mono-ids`](../../../.cursor/rules/exxat-mono-ids.mdc) |
66
+ | Page header — entity / record (no view tabs) | `apps/web/components/page-header.tsx` (variants) | [`page-header`](./blueprints/page-header.md) | — |
67
+ | KPI flat band on a hub (clickable tiles + insight card) | `apps/web/components/columns-client.tsx`, `apps/web/components/tokens-themes-client.tsx` | [`key-metrics`](./blueprints/key-metrics.md) | [`exxat-kpi-flat-band`](../../../.cursor/rules/exxat-kpi-flat-band.mdc), [`exxat-kpi-max-four`](../../../.cursor/rules/exxat-kpi-max-four.mdc), [`exxat-kpi-trends`](../../../.cursor/rules/exxat-kpi-trends.mdc) |
68
+ | Properties drawer wiring (auto via `HubTable`) | `apps/web/components/library-table.tsx`, `apps/web/components/columns-showcase.tsx` | — | [`exxat-table-properties-drawer`](../../../.cursor/rules/exxat-table-properties-drawer.mdc) |
69
+ | Pagination chrome (auto via `HubTable` when `pagination` is toggled) | `apps/web/components/columns-showcase.tsx`, `apps/web/components/tokens-themes-client.tsx` | [`data-table`](./blueprints/data-table.md) | [`exxat-data-tables`](../../../.cursor/rules/exxat-data-tables.mdc) |
70
+ | Export drawer + ⋯ menu | `apps/web/components/library-page-header.tsx` + `export-drawer.tsx` | — | [`exxat-drawer-vs-dialog`](../../../.cursor/rules/exxat-drawer-vs-dialog.mdc) |
71
+
72
+ ---
73
+
74
+ ## Board, list, dashboard views
75
+
76
+ | Pattern | Reference page | Blueprint | Rule(s) |
77
+ |---|---|---|---|
78
+ | Board card (kanban) | `apps/web/components/library-board-view.tsx` | [`board-card`](./blueprints/board-card.md) | [`exxat-board-cards`](../../../.cursor/rules/exxat-board-cards.mdc), [`exxat-card-vs-list-rows`](../../../.cursor/rules/exxat-card-vs-list-rows.mdc) |
79
+ | List row (single-column) | `apps/web/components/library-table.tsx` (`renderListRow`) | [`board-card`](./blueprints/board-card.md) (row layout) | [`exxat-card-vs-list-rows`](../../../.cursor/rules/exxat-card-vs-list-rows.mdc) |
80
+ | Dashboard view with charts + KPI band | `apps/web/components/library-dashboard-charts.tsx` | [`key-metrics`](./blueprints/key-metrics.md) | [`exxat-dashboard-view-charts`](../.cursor/rules/exxat-dashboard-view-charts.mdc) |
81
+
82
+ ---
83
+
84
+ ## Search
85
+
86
+ | Pattern | Reference page | Rule(s) | Pattern doc |
87
+ |---|---|---|---|
88
+ | Global command palette (⌘K) | `apps/web/components/command-menu.tsx` + `lib/command-menu-config.ts` | [`exxat-command-menu`](../../../.cursor/rules/exxat-command-menu.mdc) | [`command-menu-pattern`](./command-menu-pattern.md) |
89
+ | Dedicated search (landing + results) | `apps/web/components/dedicated-search-*.tsx` | [`exxat-dedicated-search-surfaces`](../../../.cursor/rules/exxat-dedicated-search-surfaces.mdc) | — |
90
+ | In-table search (toolbar) | wired by `HubTable` automatically | [`exxat-data-tables`](../../../.cursor/rules/exxat-data-tables.mdc) | [`data-views-pattern`](./data-views-pattern.md) |
91
+
92
+ ---
93
+
94
+ ## Collaboration
95
+
96
+ | Pattern | Reference page | Rule(s) | Pattern doc |
97
+ |---|---|---|---|
98
+ | Face rail + invite drawer | `apps/web/components/collaboration-access-flow.tsx`, `invite-collaborators-drawer.tsx` | [`exxat-collaboration-access`](../../../.cursor/rules/exxat-collaboration-access.mdc) | [`collaboration-access-pattern`](./collaboration-access-pattern.md) |
99
+
100
+ ---
101
+
102
+ ## Overlays and confirmations
103
+
104
+ | Pattern | Reference page | Rule(s) | Pattern doc |
105
+ |---|---|---|---|
106
+ | Side drawer (long auxiliary flow) | `apps/web/components/export-drawer.tsx`, `invite-collaborators-drawer.tsx`, `apps/web/components/table-properties/drawer.tsx` | [`exxat-drawer-vs-dialog`](../../../.cursor/rules/exxat-drawer-vs-dialog.mdc), [`exxat-page-vs-drawer`](../../../.cursor/rules/exxat-page-vs-drawer.mdc) | [`drawer-vs-dialog-pattern`](./drawer-vs-dialog-pattern.md) |
107
+ | Dialog (blocking short confirm / destructive) | `apps/web/components/ui/alert-dialog.tsx` consumers (search `<AlertDialog`) | [`exxat-drawer-vs-dialog`](../../../.cursor/rules/exxat-drawer-vs-dialog.mdc) | [`drawer-vs-dialog-pattern`](./drawer-vs-dialog-pattern.md) |
108
+ | Coach mark / onboarding | `apps/web/lib/coach-mark-registry.ts` consumers (Library dashboard customize) | — | — |
109
+
110
+ ---
111
+
112
+ ## Settings, tokens, themes
113
+
114
+ | Pattern | Reference page | Rule(s) |
115
+ |---|---|---|
116
+ | Settings page (preferences + sections) | `apps/web/app/(app)/settings/page.tsx` | — |
117
+ | Tokens & themes hub (secondary panel + categories + visualizers) | `apps/web/components/tokens-themes-client.tsx`, `tokens-themes-section.tsx`, `tokens-secondary-nav.tsx` | [`exxat-token-discipline`](../../../.cursor/rules/exxat-token-discipline.mdc), [`exxat-primary-nav-secondary-panel`](../../../.cursor/rules/exxat-primary-nav-secondary-panel.mdc) |
118
+
119
+ ---
120
+
121
+ ## Anti-references (what NOT to copy)
122
+
123
+ These exist but are **not** canonical. They predate a rule, are scoped to a one-off, or use a legacy primitive. **Don't copy from them.**
124
+
125
+ | Anti-reference | Why not | What to use instead |
126
+ |---|---|---|
127
+ | Raw `<DataTable>` mounted directly in `ListPageTemplate.renderContent` (historical) | Loses filter chips, Properties drawer, and the new built-in pagination chrome | `HubTable` (see `columns-showcase.tsx`, `tokens-themes-client.tsx`, `library-table.tsx`) |
128
+ | Hub-side `PaginationBar` + `CountSyncer` wiring around `DataTable` (the old Placements pattern) | `HubTable` now mounts pagination chrome automatically when the hub passes `pagination` + `onPaginationChange` | Pass `pagination` / `onPaginationChange` / optional `paginationInitialPageSize` / `paginationPageSizeOptions` to `HubTable` |
129
+ | Custom search input above a `DataTable` | `HubTable`'s toolbar already does this; duplicating leads to drift | Configure `ColumnDef.filter` + use `HubTable` |
130
+ | `toast()` / Sonner / snackbar | Forbidden — see [`exxat-no-toast.mdc`](../../../.cursor/rules/exxat-no-toast.mdc) | `LocalBanner` / `SystemBanner` or inline status |
131
+ | Negative-margin overlapping avatars | Forbidden — see [`exxat-person-identity-display.mdc`](../../../.cursor/rules/exxat-person-identity-display.mdc) | `AvatarGroup` (gapped by default) |
132
+
133
+ ---
134
+
135
+ ## Adding a new reference page
136
+
137
+ If you build a pattern that **other hubs will copy**, list it here. A reference page is canonical when:
138
+
139
+ 1. It satisfies the matching blueprint or rule end-to-end.
140
+ 2. It passes the §13 PR-review checklist in [`AGENTS.md`](../AGENTS.md).
141
+ 3. The file has a top-level doc comment that names what it's the reference for (e.g. *"Tokens & themes hub — table + secondary-panel category rail; thin wrapper around `<HubTable>` with the new built-in pagination chrome."*).
142
+ 4. The matching rule's "Reference implementations" list points back to it.
143
+
144
+ ---
145
+
146
+ ## See also
147
+
148
+ - [`HANDBOOK.md`](./HANDBOOK.md) — start-here doc map
149
+ - [`blueprints/README.md`](./blueprints/README.md) — what a blueprint is
150
+ - [`component-selection-guide.md`](./component-selection-guide.md) — decision tree across blueprints
151
+ - [`apps/web/AGENTS.md` §13](../AGENTS.md) — full PR-review checklist
@@ -130,7 +130,7 @@ Three-level brand chrome stack. See `docs/shell-surface-elevation-pattern.md`.
130
130
  | `--sidebar-border` | Inner divider |
131
131
  | `--sidebar-ring` | Focus ring inside sidebar |
132
132
  | `--sidebar-section-label-foreground` | Section title — mixed against real `--sidebar`, not `--background` |
133
- | `--secondary-panel-bg` | Nested panel (Question bank) — level 1 between sidebar and canvas |
133
+ | `--secondary-panel-bg` | Nested panel (Library) — level 1 between sidebar and canvas |
134
134
 
135
135
  ### 2.4 Chips / badges (`--chip-*`)
136
136
 
@@ -0,0 +1,262 @@
1
+ # Exxat DS — Voice and tone
2
+
3
+ > The single biggest driver of "this feels like one product" — or "this feels random" — is **copy**. Empty states, errors, buttons, banners, validation, labels. This doc is the binding reference for all of it.
4
+ >
5
+ > **Audience:** designers writing copy, engineers shipping strings, AI agents drafting UI text. Reviewed in PR alongside `.cursor/rules/exxat-accessibility.mdc`.
6
+
7
+ ---
8
+
9
+ ## 1. Voice (the constant)
10
+
11
+ Exxat copy is **clear, direct, and respectful**. We talk to grown professionals (faculty, admins) and to students. We never:
12
+
13
+ - talk down (no "Oops!" / "Whoops" / "Uh-oh"),
14
+ - over-celebrate ("Awesome!" / "Great job!" / 🎉),
15
+ - guilt-trip ("You haven't… yet" / "Don't forget!"),
16
+ - hide the cause behind metaphor ("Something went wrong" with no detail),
17
+ - shout (sentence case everywhere; ALL CAPS only for system status acronyms).
18
+
19
+ We **always**:
20
+
21
+ - name the **thing**: the entity (placement, site, student), the action (Save, Invite, Export), the outcome (saved, sent, downloaded),
22
+ - say what **changed** or what **the user can do next**,
23
+ - use **present tense** (`Saving` / `Saved` / `Try again`), not past-aspirational (`We've saved your changes!`),
24
+ - use **active voice** (`Exxat couldn't save the placement.` not `The placement could not be saved.`).
25
+
26
+ ---
27
+
28
+ ## 2. Tone (the variable)
29
+
30
+ Tone shifts by surface. Same voice, different temperature.
31
+
32
+ | Surface | Tone | Example |
33
+ |---|---|---|
34
+ | Primary action label | Imperative, 1–3 words | "Save", "Invite people", "Export" |
35
+ | Empty state (filtered) | Helpful, names the filter | "No placements match the current filters. Clear them to see all 247." |
36
+ | Empty state (no data ever) | Welcoming, names the next step | "No placements yet. Add your first one to get started." |
37
+ | Inline validation | Neutral, says the rule | "Use the format MM/DD/YYYY." |
38
+ | Banner (informational) | Calm, explains why | "Read-only — this term has ended." |
39
+ | Banner (warning) | Direct, says the consequence | "Saving will overwrite 3 students' assignments." |
40
+ | Banner (error) | Honest, names the failure + next step | "Exxat couldn't reach the placement service. Try again, or check your network." |
41
+ | Dialog (destructive confirm) | Specific, names the object | "Delete placement P-2026-014? This cannot be undone." |
42
+ | Microcopy (helper, hints) | Brief, format-only | "Out of 4.0", "MM/DD/YYYY" |
43
+
44
+ ---
45
+
46
+ ## 3. Buttons
47
+
48
+ | Pattern | Use | Example |
49
+ |---|---|---|
50
+ | **Sentence case** | Always | `Save`, `Invite people`, `Export selection` |
51
+ | **Title case** | Never | ~~`Save Changes`~~ → `Save changes` |
52
+ | **Verb-first imperative** | Primary actions | `Save`, `Send invite`, `Create placement`, `Download CSV` |
53
+ | **No "Please"** | The button is the request | ~~`Please save`~~ → `Save` |
54
+ | **Don't repeat the field name** | Inline context is enough | ~~`Save changes to placement`~~ → `Save` |
55
+ | **"Cancel" not "Discard"** | Cancel returns to a safe state; Discard is only for destructive draft loss | dialog primary = `Save changes`; cancel = `Cancel` |
56
+ | **Loading verb** | When in-flight, swap to `…` form, preserve width | `Save` → `Saving…` |
57
+ | **Disabled tooltip** | Always say why | "Add at least one collaborator first." |
58
+
59
+ ### Don't
60
+
61
+ | ❌ Don't | ✅ Do |
62
+ |---|---|
63
+ | `Click here` | `Open placement` |
64
+ | `OK` | `Save`, `Got it`, `Continue` (the actual outcome) |
65
+ | `Submit` | `Send invite`, `Save changes`, `Create placement` |
66
+ | `Yes` / `No` in destructive dialogs | `Delete placement`, `Cancel` |
67
+ | `Loading…` for >2 s with no detail | `Loading placements…` (name the thing) |
68
+
69
+ ---
70
+
71
+ ## 4. Empty states
72
+
73
+ There are **three** kinds. The copy is different for each.
74
+
75
+ ### 4a. Filter-empty ("zero matches")
76
+
77
+ The dataset has rows; the active filters hide all of them. Tell the user the filters are responsible and offer to clear them.
78
+
79
+ ```
80
+ No placements match the current filters.
81
+ [Clear filters]
82
+ ```
83
+
84
+ Rules:
85
+
86
+ - Name the entity ("placements", not "items").
87
+ - Mention "the current filters" — not just "no results".
88
+ - Surface a **Clear filters** action if the toolbar has any filters applied.
89
+ - If the search box is the only filter, the message becomes `No placements match "<query>".` (quote the query exactly).
90
+
91
+ ### 4b. True-empty ("no data ever")
92
+
93
+ The dataset is empty for this user / scope. Tell them what to do next.
94
+
95
+ ```
96
+ No placements yet.
97
+ Add your first one to start tracking student rotations.
98
+ [New placement]
99
+ ```
100
+
101
+ Rules:
102
+
103
+ - One-line headline + one-line context.
104
+ - The CTA is the same imperative used elsewhere in the app — don't invent "Start now" for an empty state.
105
+ - If creation requires a precursor ("Add at least one site first"), say so and link to the precursor.
106
+
107
+ ### 4c. Permission-empty ("not allowed to see")
108
+
109
+ The user can't see anything because of access. Don't show counts; don't suggest creating.
110
+
111
+ ```
112
+ You don't have access to this hub.
113
+ Ask a coordinator to invite you with Viewer or higher access.
114
+ ```
115
+
116
+ Rules:
117
+
118
+ - Name the access level required.
119
+ - Don't show row counts the user can't see.
120
+ - Don't expose the existence of restricted records by mentioning "0 of N hidden".
121
+
122
+ ---
123
+
124
+ ## 5. Errors
125
+
126
+ Errors must answer three questions: **What happened? Why? What can the user do?**
127
+
128
+ | Element | Required? | Example |
129
+ |---|---|---|
130
+ | Subject | required | `Exxat couldn't save the placement.` |
131
+ | Cause | when knowable | `The site was deleted while you were editing.` |
132
+ | Next step | required | `Choose another site or refresh.` |
133
+
134
+ ### Don't
135
+
136
+ - `Something went wrong.` — every word is empty. Replace with the subject + cause.
137
+ - `Error 500: Internal Server Error.` — leak the trace ID to logs, not the user. User-facing: "Exxat had a problem. Try again in a moment."
138
+ - Toasts for errors. Use `SystemBanner` (route-level) or inline `FormMessage` (field-level). See [`exxat-no-toast.mdc`](../../../.cursor/rules/exxat-no-toast.mdc).
139
+
140
+ ### Field-level (`FormMessage`)
141
+
142
+ Match the rule, not the field name. Keep under 60 chars.
143
+
144
+ | Rule | Message |
145
+ |---|---|
146
+ | Required | `This is required.` |
147
+ | Format (date) | `Use MM/DD/YYYY.` |
148
+ | Format (phone) | `Use +1 (555) 555-0100.` |
149
+ | Range (number) | `Enter a number between 0 and 4.0.` |
150
+ | Unique | `That ID is already in use.` |
151
+ | Server | `Exxat couldn't save this field. Try again.` |
152
+
153
+ ---
154
+
155
+ ## 6. Banners
156
+
157
+ We use **persistent banners** (not toasts) for all product feedback. See [`exxat-no-toast.mdc`](../../../.cursor/rules/exxat-no-toast.mdc) and `LocalBanner` / `SystemBanner` in `packages/ui`.
158
+
159
+ | Variant | Use | Lead with |
160
+ |---|---|---|
161
+ | `info` | Read-only / scope notice / "you're viewing X" | The fact: "Read-only — this term has ended." |
162
+ | `success` | Confirmed state change (long-lived; toasts forbidden) | The outcome: "Invite sent to 3 collaborators." |
163
+ | `warning` | Action will cause consequence | The consequence: "Saving will overwrite 3 students' assignments." |
164
+ | `error` | Recoverable failure | The subject + next step: "Exxat couldn't reach the placement service. Try again." |
165
+ | `destructive` | Pending destructive change | The object + reversibility: "This term will be archived in 7 days. Restore now to keep it." |
166
+
167
+ Rules:
168
+
169
+ - One banner per region. If two compete, the higher-severity wins.
170
+ - Pair a banner with an **action** when there's something the user can do (`[Restore]`, `[Try again]`, `[Open log]`).
171
+ - No exclamation marks. The variant color carries the tone.
172
+
173
+ ---
174
+
175
+ ## 7. Status badges
176
+
177
+ Status labels live in [`lib/list-status-badges.ts`](../lib/list-status-badges.ts) and are shared across every surface (table, board card, list row). Don't fork labels per page.
178
+
179
+ | Type | Conventions | Example |
180
+ |---|---|---|
181
+ | Lifecycle | Title case, single word where possible | `Active`, `Draft`, `Archived`, `Pending` |
182
+ | Outcome | Past-tense verb when an action completed | `Approved`, `Rejected`, `Sent`, `Skipped` |
183
+ | Risk | Plain language, no jargon | `On track`, `At risk`, `Blocked` |
184
+ | Mandatory pairing | Color **AND** icon (WCAG 1.4.1 — never color alone) | green check, amber triangle, red circle-x |
185
+
186
+ Never: `OK`, `N/A`, `?` as a status label. Show the actual lifecycle state or `Unknown` with a tooltip describing how to resolve it.
187
+
188
+ ---
189
+
190
+ ## 8. KPI copy (the highest-stakes copy in the product)
191
+
192
+ KPIs read top-down: **label → value → trend chip → description**. The reader is scanning, not reading. Each line earns its place.
193
+
194
+ | Field | Rule | Example |
195
+ |---|---|---|
196
+ | `label` | Sentence case noun phrase. ≤ 24 chars. No "Total" prefix (the value is total by default). | `Active placements`, `New invites`, `Compliance issues` |
197
+ | `value` | The number. Use `tabular-nums`. Round to a sensible precision. Suffix unit (`%`, `hrs`) without space when natural. | `247`, `12 %`, `38 hrs` |
198
+ | `delta` | The **count** of change. Empty (`""` or `0`) hides the chip entirely. Never prose. | `+12`, `-3`, `+8 %` |
199
+ | `description` | The caption beneath the value row. Prose explaining what the number is or how it splits. Never the delta. | `vs last week`, `across 4 sites`, `left + right` |
200
+
201
+ See [`exxat-kpi-trends.mdc`](../../../.cursor/rules/exxat-kpi-trends.mdc) for the trend-polarity rules (when up means bad, set `trendPolarity: "lower_is_better"`).
202
+
203
+ ### Don't
204
+
205
+ - `Total: 247` — drop "Total".
206
+ - `247 placements` in `value` — put `247` in `value`, `placements` is in `label`.
207
+ - `+5 (up 12 % from last week)` in `delta` — `delta = "+5"`, `description = "vs last week"`.
208
+
209
+ ---
210
+
211
+ ## 9. Form labels and helper text
212
+
213
+ | Element | Rule | Example |
214
+ |---|---|---|
215
+ | Label | Sentence case, no colon, no "*" — pair `*` decoration with `aria-required` only. | `Date of birth` |
216
+ | Required marker | Visible `*` (`aria-hidden`), programmatic `aria-required="true"`. | `Date of birth *` |
217
+ | Helper text | Persistent, format-first. Use `FormDescription`. Never placeholder-only. | `MM/DD/YYYY` |
218
+ | Placeholder | May mirror the format. Never the sole carrier. | `MM/DD/YYYY` |
219
+ | Inline error | Replaces helper while active. Match the rule, not the field name. | `Use MM/DD/YYYY.` |
220
+ | Unit in label vs description | Units go in description when context-dependent (`Out of 4.0` under "GPA"), in label when fixed (`Hours per week`). | — |
221
+
222
+ See [`exxat-accessibility.mdc`](../../../.cursor/rules/exxat-accessibility.mdc) §"Form fields — format hints MUST be persistent".
223
+
224
+ ---
225
+
226
+ ## 10. Dates, times, numbers
227
+
228
+ | Type | Format | Example |
229
+ |---|---|---|
230
+ | Date (UI) | Locale-aware, defaults to `MM/DD/YYYY` for en-US | `12/14/2025` |
231
+ | Date range | Same format, en-dash with hair-thin spaces (or hyphen-minus in mono) | `12/14/2025 – 12/20/2025` |
232
+ | Time | 12-hour with am/pm in lowercase | `2:30 pm` |
233
+ | Relative time | Use sparingly; pair with absolute on hover/tooltip | `Updated 3 hours ago` (tip: `12/15/2025, 11:14 am`) |
234
+ | Numbers | `tabular-nums`. Use thousands separator (`12,547`) for ≥ 4 digits | `12,547` |
235
+ | Currency | Symbol-first, no space (`$1,200.00`) | `$1,200.00` |
236
+ | Percent | No space (`12 %` is wrong, use `12%`) | `12%` |
237
+ | Duration | Short form (`38 hrs`, `2 wks`) | `38 hrs` |
238
+
239
+ ---
240
+
241
+ ## 11. Reviewer checklist (paste into PRs that touch copy)
242
+
243
+ - [ ] Sentence case (not title case) everywhere.
244
+ - [ ] No `Click here`, `Submit`, `OK`, `Loading…` without a noun.
245
+ - [ ] No toasts; banners or inline status instead.
246
+ - [ ] Empty state names the entity and surfaces a next action or "Clear filters".
247
+ - [ ] Errors answer: what / why / what now.
248
+ - [ ] Status labels come from `lib/list-status-badges.ts`, not new strings.
249
+ - [ ] KPI `delta` is a count; KPI `description` is prose. Polarity matches the metric.
250
+ - [ ] Form helper text is `FormDescription`, not placeholder-only.
251
+ - [ ] No exclamation marks outside `success` banners (and even those rarely).
252
+ - [ ] No emoji unless explicitly approved for that surface.
253
+
254
+ ---
255
+
256
+ ## See also
257
+
258
+ - [`HANDBOOK.md`](./HANDBOOK.md) — where this fits in the docs map
259
+ - [`glossary.md`](./glossary.md) — vocabulary
260
+ - [`.cursor/rules/exxat-no-toast.mdc`](../../../.cursor/rules/exxat-no-toast.mdc) — why banners, not toasts
261
+ - [`.cursor/rules/exxat-kpi-trends.mdc`](../../../.cursor/rules/exxat-kpi-trends.mdc) — KPI delta vs description
262
+ - [`.cursor/rules/exxat-accessibility.mdc`](../../../.cursor/rules/exxat-accessibility.mdc) — format-hint persistence rule
@@ -1,14 +1,15 @@
1
- import { defineConfig, globalIgnores } from "eslint/config";
2
- import nextVitals from "eslint-config-next/core-web-vitals";
3
- import nextTs from "eslint-config-next/typescript";
4
- import exxatDs from "@exxatdesignux/eslint-plugin";
1
+ import { defineConfig, globalIgnores } from "eslint/config"
2
+ import nextVitals from "eslint-config-next/core-web-vitals"
3
+ import nextTs from "eslint-config-next/typescript"
5
4
 
5
+ // Consumer-facing ESLint config for a scaffolded Exxat DS app.
6
+ // The Exxat-DS guardrail plugin (`@exxatdesignux/eslint-plugin`) is
7
+ // currently workspace-internal — once it lands on npm you can add it
8
+ // alongside the blocks below and the same DS lint rules will run here.
6
9
  const eslintConfig = defineConfig([
7
10
  ...nextVitals,
8
11
  ...nextTs,
9
- // Override default ignores of eslint-config-next.
10
12
  globalIgnores([
11
- // Default ignores of eslint-config-next:
12
13
  ".next/**",
13
14
  "out/**",
14
15
  "build/**",
@@ -16,11 +17,6 @@ const eslintConfig = defineConfig([
16
17
  ]),
17
18
  {
18
19
  rules: {
19
- // Allow intentionally-unused args / vars / destructured props /
20
- // generics when prefixed with `_`. This is the standard escape hatch
21
- // for "I'm satisfying a callback signature but don't need this slot"
22
- // — common in cell renderers (`(value, _row) => …`), destructured
23
- // tuples (`const [_, setX] = useState()`), and generic constraints.
24
20
  "@typescript-eslint/no-unused-vars": [
25
21
  "warn",
26
22
  {
@@ -32,32 +28,6 @@ const eslintConfig = defineConfig([
32
28
  ],
33
29
  },
34
30
  },
35
- // -------------------------------------------------------------------------
36
- // Exxat DS guardrails (@exxatdesignux/eslint-plugin — packages/eslint-plugin-exxat-ds).
37
- // - no-hex-color: token discipline (no hex literals in JSX/style)
38
- // - no-deprecated-tokens: reads @exxatdesignux/ui tokens/hooks-index.json
39
- // - no-sonner-toast: enforces .cursor/rules/exxat-no-toast.mdc
40
- // - no-slds-classes: enforces .cursor/rules/exxat-no-slds-leakage.mdc
41
- // - no-lightning-elements: enforces .cursor/rules/exxat-no-slds-leakage.mdc
42
- // -------------------------------------------------------------------------
43
- {
44
- files: ["app/**/*.{ts,tsx}", "components/**/*.{ts,tsx}", "lib/**/*.{ts,tsx}", "hooks/**/*.{ts,tsx}", "contexts/**/*.{ts,tsx}", "stores/**/*.{ts,tsx}"],
45
- plugins: { "exxat-ds": exxatDs },
46
- rules: {
47
- "exxat-ds/no-hex-color": [
48
- "warn",
49
- {
50
- // Files where hex is legitimately needed (CSS variable definitions,
51
- // OS theme-color meta, etc.) are intentionally excluded by path.
52
- allowFiles: ["/app/globals.css", "/packages/ui/src/globals.css", "/lib/theme-color", "/lib/windows-contrast-theme"],
53
- },
54
- ],
55
- "exxat-ds/no-deprecated-tokens": "error",
56
- "exxat-ds/no-sonner-toast": "error",
57
- "exxat-ds/no-slds-classes": "error",
58
- "exxat-ds/no-lightning-elements": "error",
59
- },
60
- },
61
- ]);
31
+ ])
62
32
 
63
- export default eslintConfig;
33
+ export default eslintConfig
@@ -4,17 +4,17 @@ import * as React from "react"
4
4
  import { usePathname, useRouter, useSearchParams } from "next/navigation"
5
5
 
6
6
  import { useSecondaryPanel } from "@/components/sidebar"
7
- import { QUESTION_BANK_HUB_FIND_PATH, QUESTION_BANK_LIBRARY_PATH, QUESTION_BANK_LIST_PATH } from "@/lib/question-bank-nav"
7
+ import { LIBRARY_HUB_FIND_PATH, LIBRARY_ALL_PATH, LIBRARY_LIST_PATH } from "@/lib/library-nav"
8
8
 
9
9
  function rewriteLibraryCanonicalToDedicatedSurface(pathname: string, nextHref: string, hash: string): string {
10
- if (!nextHref.startsWith(QUESTION_BANK_LIBRARY_PATH)) return `${nextHref}${hash}`
11
- const tail = nextHref.slice(QUESTION_BANK_LIBRARY_PATH.length)
12
- if (pathname === QUESTION_BANK_LIST_PATH) return `${QUESTION_BANK_LIST_PATH}${tail}${hash}`
13
- if (pathname === QUESTION_BANK_HUB_FIND_PATH) return `${QUESTION_BANK_HUB_FIND_PATH}${tail}${hash}`
10
+ if (!nextHref.startsWith(LIBRARY_ALL_PATH)) return `${nextHref}${hash}`
11
+ const tail = nextHref.slice(LIBRARY_ALL_PATH.length)
12
+ if (pathname === LIBRARY_LIST_PATH) return `${LIBRARY_LIST_PATH}${tail}${hash}`
13
+ if (pathname === LIBRARY_HUB_FIND_PATH) return `${LIBRARY_HUB_FIND_PATH}${tail}${hash}`
14
14
  return `${nextHref}${hash}`
15
15
  }
16
16
 
17
- function questionBankSearchParamsEqual(a: URLSearchParams, b: URLSearchParams): boolean {
17
+ function librarySearchParamsEqual(a: URLSearchParams, b: URLSearchParams): boolean {
18
18
  const keys = new Set([...a.keys(), ...b.keys()])
19
19
  for (const k of keys) {
20
20
  const av = a.getAll(k).join("\u0000")
@@ -25,11 +25,11 @@ function questionBankSearchParamsEqual(a: URLSearchParams, b: URLSearchParams):
25
25
  }
26
26
 
27
27
  export interface UseSecondaryPanelHubNavOptions<TNav> {
28
- /** Primary hub pathname (e.g. `/question-bank/library`). */
28
+ /** Primary hub pathname (e.g. `/library/all`). */
29
29
  hubPathname: string
30
30
  /** When set, these pathnames are treated as the same hub (e.g. library + list search surface). */
31
31
  hubPathnames?: readonly string[]
32
- /** `PANELS` / `useAutoPanel` id (e.g. `question-bank`). */
32
+ /** `PANELS` / `useAutoPanel` id (e.g. `library`). */
33
33
  panelId: string
34
34
  parseNav: (searchParams: URLSearchParams) => TNav
35
35
  /** When non-null, the hub URL is rewritten (keeps the current hash). */
@@ -79,7 +79,7 @@ export function useSecondaryPanelHubNav<TNav>({
79
79
  if (!nextHref) return
80
80
  const hash = typeof window !== "undefined" ? window.location.hash : ""
81
81
  let target = `${nextHref}${hash}`
82
- if (pathname === QUESTION_BANK_LIST_PATH || pathname === QUESTION_BANK_HUB_FIND_PATH) {
82
+ if (pathname === LIBRARY_LIST_PATH || pathname === LIBRARY_HUB_FIND_PATH) {
83
83
  target = rewriteLibraryCanonicalToDedicatedSurface(pathname, nextHref, hash)
84
84
  }
85
85
  try {
@@ -87,7 +87,7 @@ export function useSecondaryPanelHubNav<TNav>({
87
87
  const u = new URL(target, origin)
88
88
  const want = u.searchParams
89
89
  const cur = new URLSearchParams(searchParamsKey)
90
- if (u.pathname === pathname && questionBankSearchParamsEqual(want, cur)) return
90
+ if (u.pathname === pathname && librarySearchParamsEqual(want, cur)) return
91
91
  } catch {
92
92
  /* ignore parse errors — fall through to replace */
93
93
  }
@@ -55,18 +55,6 @@ export function getAskLeoRouteContext(pathname: string | null): AskLeoRouteConte
55
55
  }
56
56
  }
57
57
 
58
- if (pathname.startsWith("/examples")) {
59
- return {
60
- title: "Patterns",
61
- description: "Entry points for reusable shells and demos.",
62
- suggestions: [
63
- "Where is the list hub implemented?",
64
- "How is the command palette wired?",
65
- "What is the sidebar + content layout pattern?",
66
- ],
67
- }
68
- }
69
-
70
58
  if (pathname.startsWith("/settings")) {
71
59
  return {
72
60
  title: "Settings",
@@ -78,25 +66,25 @@ export function getAskLeoRouteContext(pathname: string | null): AskLeoRouteConte
78
66
  }
79
67
  }
80
68
 
81
- if (pathname.startsWith("/question-bank/library") || pathname.startsWith("/question-bank/list") || pathname.startsWith("/question-bank/find")) {
69
+ if (pathname.startsWith("/library/all") || pathname.startsWith("/library/list") || pathname.startsWith("/library/find")) {
82
70
  return {
83
71
  title: "Question library",
84
72
  description: "Browse folders, views, and mock assessment items.",
85
73
  suggestions: [
86
- "Summarize questions in the active folder scope",
87
- "Suggest folders for a new pediatrics module",
74
+ "Summarize items in the active folder scope",
75
+ "Suggest folders for a new library section",
88
76
  "How do panel and tree views relate to the same dataset?",
89
77
  ],
90
78
  }
91
79
  }
92
80
 
93
- if (pathname.startsWith("/question-bank")) {
81
+ if (pathname.startsWith("/library")) {
94
82
  return {
95
- title: "Question bank",
83
+ title: "Library",
96
84
  description: "Search in plain language, draft items with AI, or open the full library.",
97
85
  suggestions: [
98
86
  "Draft a multiple-choice question on clinical reasoning",
99
- "Outline a new question bank for a course module",
87
+ "Outline a new library for a course module",
100
88
  "Rewrite this stem for clarity and bias-free wording",
101
89
  ],
102
90
  }
@@ -49,20 +49,4 @@ export const COACH_MARK_FLOWS: CoachMarkFlowDef[] = [
49
49
  pageUrl: "/data-list",
50
50
  stepCount: 1,
51
51
  },
52
- {
53
- id: "team-dashboard-customize",
54
- name: "Customize dashboard (Team pattern)",
55
- description: "Same toolbar pattern as the list hub — Edit layout for a Data dashboard tab.",
56
- page: "Examples",
57
- pageUrl: "/examples",
58
- stepCount: 1,
59
- },
60
- {
61
- id: "compliance-dashboard-customize",
62
- name: "Customize dashboard (Compliance pattern)",
63
- description: "Same toolbar pattern as the list hub — Edit layout for a Data dashboard tab.",
64
- page: "Examples",
65
- pageUrl: "/examples",
66
- stepCount: 1,
67
- },
68
52
  ]
@@ -88,24 +88,17 @@ const STATIC_COMMAND_GROUPS: CommandMenuGroup[] = [
88
88
  items: [
89
89
  { id: "nav-dashboard", icon: "fa-light fa-grid-2", label: "Dashboard", href: "/dashboard" },
90
90
  {
91
- id: "nav-examples",
92
- icon: "fa-light fa-layer-group",
93
- label: "Patterns",
94
- href: "/examples",
95
- keywords: "examples gallery showcase",
96
- },
97
- {
98
- id: "nav-question-bank",
91
+ id: "nav-library",
99
92
  icon: "fa-light fa-books",
100
- label: "Question bank",
101
- href: "/question-bank",
93
+ label: "Library",
94
+ href: "/library",
102
95
  keywords: "search ai create ask leo discovery hub",
103
96
  },
104
97
  {
105
- id: "nav-question-bank-library",
98
+ id: "nav-library-all",
106
99
  icon: "fa-light fa-table-list",
107
100
  label: "Question library",
108
- href: "/question-bank/library",
101
+ href: "/library/all",
109
102
  keywords: "folders assessment items tree panel table",
110
103
  },
111
104
  { id: "nav-settings", icon: "fa-light fa-gear", label: "Settings", href: "/settings" },