@exxatdesignux/ui 0.0.6 → 0.0.7
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.
- package/bin/init.mjs +29 -0
- package/package.json +7 -2
- package/template/.nvmrc +1 -0
- package/template/.prettierignore +7 -0
- package/template/.prettierrc +11 -0
- package/template/AGENTS.md +485 -0
- package/template/Logo/Exxat_Prism.svg +39 -0
- package/template/Logo/Exxat_one.svg +36 -0
- package/template/README.md +58 -0
- package/template/app/(app)/compliance/page.tsx +10 -0
- package/template/app/(app)/dashboard/loading.tsx +18 -0
- package/template/app/(app)/dashboard/page.tsx +36 -0
- package/template/app/(app)/data-list/[id]/page.tsx +28 -0
- package/template/app/(app)/data-list/new/page.tsx +31 -0
- package/template/app/(app)/data-list/page.tsx +10 -0
- package/template/app/(app)/error.tsx +43 -0
- package/template/app/(app)/help/page.tsx +34 -0
- package/template/app/(app)/layout.tsx +54 -0
- package/template/app/(app)/loading.tsx +18 -0
- package/template/app/(app)/question-bank/page.tsx +10 -0
- package/template/app/(app)/rotations/page.tsx +15 -0
- package/template/app/(app)/settings/page.tsx +17 -0
- package/template/app/(app)/sites/all/page.tsx +13 -0
- package/template/app/(app)/team/page.tsx +10 -0
- package/template/app/favicon.ico +0 -0
- package/template/app/globals.css +1811 -0
- package/template/app/layout.tsx +95 -0
- package/template/app/page.tsx +9 -0
- package/template/components/.gitkeep +0 -0
- package/template/components/app-sidebar-dynamic.tsx +15 -0
- package/template/components/app-sidebar.tsx +901 -0
- package/template/components/ask-leo-composer.tsx +216 -0
- package/template/components/ask-leo-sidebar.tsx +509 -0
- package/template/components/chart-area-interactive.tsx +293 -0
- package/template/components/charts-overview.tsx +2321 -0
- package/template/components/command-menu-01.tsx +133 -0
- package/template/components/command-menu-02.tsx +386 -0
- package/template/components/command-menu.tsx +182 -0
- package/template/components/compliance-board-view.tsx +134 -0
- package/template/components/compliance-client.tsx +92 -0
- package/template/components/compliance-list-view.tsx +59 -0
- package/template/components/compliance-page-header.tsx +89 -0
- package/template/components/compliance-table.tsx +525 -0
- package/template/components/dashboard-onboarding-gallery.tsx +13 -0
- package/template/components/dashboard-onboarding.tsx +21 -0
- package/template/components/dashboard-promo-banner.tsx +67 -0
- package/template/components/dashboard-quota-progress-card.tsx +369 -0
- package/template/components/dashboard-report-charts.tsx +69 -0
- package/template/components/dashboard-section-heading.tsx +68 -0
- package/template/components/dashboard-tabs.tsx +598 -0
- package/template/components/data-list-client.tsx +239 -0
- package/template/components/data-list-table-cells.test.tsx +22 -0
- package/template/components/data-list-table-cells.tsx +173 -0
- package/template/components/data-list-table.tsx +879 -0
- package/template/components/data-table/filter-date-calendar.tsx +38 -0
- package/template/components/data-table/filter-text-value-input.tsx +77 -0
- package/template/components/data-table/index.tsx +1612 -0
- package/template/components/data-table/pagination.tsx +256 -0
- package/template/components/data-table/types.ts +91 -0
- package/template/components/data-table/use-table-state.ts +566 -0
- package/template/components/data-view-dashboard-charts-compliance.tsx +960 -0
- package/template/components/data-view-dashboard-charts-team.tsx +968 -0
- package/template/components/data-view-dashboard-charts.tsx +1668 -0
- package/template/components/data-views/board-card-primitives.tsx +93 -0
- package/template/components/data-views/index.ts +41 -0
- package/template/components/data-views/list-page-board-card.tsx +192 -0
- package/template/components/data-views/list-page-board-template.tsx +122 -0
- package/template/components/data-views/placement-board-card.tsx +262 -0
- package/template/components/export-drawer.tsx +375 -0
- package/template/components/exxat-product-logo.tsx +453 -0
- package/template/components/form-layout-01.tsx +131 -0
- package/template/components/getting-started.tsx +625 -0
- package/template/components/key-metrics.tsx +920 -0
- package/template/components/leo-insight-indicator.tsx +364 -0
- package/template/components/leo-typing-dots.tsx +121 -0
- package/template/components/list-hub-status-badge.tsx +51 -0
- package/template/components/list-page-dashboard-charts.tsx +18 -0
- package/template/components/nav-documents.tsx +89 -0
- package/template/components/nav-main.tsx +58 -0
- package/template/components/nav-secondary.tsx +64 -0
- package/template/components/nav-user.tsx +190 -0
- package/template/components/new-placement-back-btn.tsx +28 -0
- package/template/components/new-placement-form.tsx +1066 -0
- package/template/components/onboarding/index.ts +4 -0
- package/template/components/onboarding/onboarding-01.tsx +7 -0
- package/template/components/onboarding/onboarding-02.tsx +7 -0
- package/template/components/onboarding/onboarding-03.tsx +7 -0
- package/template/components/onboarding/onboarding-04.tsx +7 -0
- package/template/components/page-header.tsx +57 -0
- package/template/components/placement-detail.tsx +438 -0
- package/template/components/placements-board-view.tsx +404 -0
- package/template/components/placements-list-view.tsx +285 -0
- package/template/components/placements-page-header.tsx +160 -0
- package/template/components/placements-table-columns.tsx +639 -0
- package/template/components/product-switcher.tsx +116 -0
- package/template/components/question-bank-board-view.tsx +205 -0
- package/template/components/question-bank-client.tsx +77 -0
- package/template/components/question-bank-list-view.tsx +59 -0
- package/template/components/question-bank-page-header.tsx +89 -0
- package/template/components/question-bank-table.tsx +586 -0
- package/template/components/rotations-empty-state.tsx +47 -0
- package/template/components/rotations-panel-activator.tsx +8 -0
- package/template/components/secondary-nav.tsx +394 -0
- package/template/components/secondary-panel.tsx +239 -0
- package/template/components/section-cards.tsx +106 -0
- package/template/components/settings-appearance-card.tsx +424 -0
- package/template/components/settings-client.tsx +537 -0
- package/template/components/settings-form-row.tsx +42 -0
- package/template/components/sidebar-auto-collapse.tsx +23 -0
- package/template/components/sidebar-auto-open.tsx +18 -0
- package/template/components/sidebar-shell.tsx +37 -0
- package/template/components/site-header.tsx +93 -0
- package/template/components/sites-all-client.tsx +154 -0
- package/template/components/sites-board-view.tsx +67 -0
- package/template/components/sites-list-view.tsx +47 -0
- package/template/components/sites-table.tsx +312 -0
- package/template/components/system-banner-slot.tsx +66 -0
- package/template/components/table-properties/column-row.tsx +90 -0
- package/template/components/table-properties/draggable-list.ts +49 -0
- package/template/components/table-properties/drawer-button.tsx +231 -0
- package/template/components/table-properties/drawer.tsx +1102 -0
- package/template/components/table-properties/filter-card.tsx +251 -0
- package/template/components/table-properties/index.ts +22 -0
- package/template/components/table-properties/sort-card.tsx +59 -0
- package/template/components/table-properties/types.ts +124 -0
- package/template/components/task-list-panel.tsx +98 -0
- package/template/components/task-priority-badge.tsx +28 -0
- package/template/components/team-board-view.tsx +114 -0
- package/template/components/team-client.tsx +93 -0
- package/template/components/team-list-view.tsx +62 -0
- package/template/components/team-page-header.tsx +92 -0
- package/template/components/team-table.tsx +525 -0
- package/template/components/templates/list-page.tsx +576 -0
- package/template/components/templates/primary-page-template.tsx +56 -0
- package/template/components/theme-color-sync.tsx +32 -0
- package/template/components/theme-provider.tsx +71 -0
- package/template/components/tinted-icon-disc.tsx +53 -0
- package/template/components/ui/ai-thinking-surface.tsx +121 -0
- package/template/components/ui/avatar.tsx +1 -0
- package/template/components/ui/badge.tsx +1 -0
- package/template/components/ui/banner.tsx +1 -0
- package/template/components/ui/breadcrumb.tsx +1 -0
- package/template/components/ui/button.tsx +1 -0
- package/template/components/ui/calendar.tsx +1 -0
- package/template/components/ui/card.tsx +1 -0
- package/template/components/ui/chart.tsx +1 -0
- package/template/components/ui/checkbox.tsx +1 -0
- package/template/components/ui/coach-mark.tsx +1 -0
- package/template/components/ui/collapsible.tsx +1 -0
- package/template/components/ui/command.tsx +1 -0
- package/template/components/ui/date-picker-field.tsx +1 -0
- package/template/components/ui/dialog.tsx +1 -0
- package/template/components/ui/dot-pattern.tsx +159 -0
- package/template/components/ui/drag-handle-grip.tsx +1 -0
- package/template/components/ui/drawer.tsx +1 -0
- package/template/components/ui/dropdown-menu.tsx +1 -0
- package/template/components/ui/field.tsx +1 -0
- package/template/components/ui/form.tsx +1 -0
- package/template/components/ui/input-group.tsx +1 -0
- package/template/components/ui/input-mask.tsx +1 -0
- package/template/components/ui/input.tsx +1 -0
- package/template/components/ui/kbd.tsx +1 -0
- package/template/components/ui/label.tsx +1 -0
- package/template/components/ui/leo-icon.tsx +726 -0
- package/template/components/ui/payment-card-fields.tsx +1 -0
- package/template/components/ui/popover.tsx +1 -0
- package/template/components/ui/radio-group.tsx +1 -0
- package/template/components/ui/select.tsx +1 -0
- package/template/components/ui/selection-tile-grid.tsx +1 -0
- package/template/components/ui/separator.tsx +1 -0
- package/template/components/ui/sheet.tsx +1 -0
- package/template/components/ui/sidebar.tsx +1 -0
- package/template/components/ui/skeleton.tsx +1 -0
- package/template/components/ui/sonner.tsx +1 -0
- package/template/components/ui/status-badge.tsx +1 -0
- package/template/components/ui/table.tsx +1 -0
- package/template/components/ui/tabs.tsx +1 -0
- package/template/components/ui/textarea.tsx +1 -0
- package/template/components/ui/tip.tsx +1 -0
- package/template/components/ui/toggle-group.tsx +1 -0
- package/template/components/ui/toggle-switch.tsx +1 -0
- package/template/components/ui/toggle.tsx +1 -0
- package/template/components/ui/tooltip.tsx +1 -0
- package/template/components/ui/view-segmented-control.tsx +1 -0
- package/template/components.json +27 -0
- package/template/contexts/chart-variant-context.tsx +35 -0
- package/template/contexts/command-menu-context.tsx +28 -0
- package/template/contexts/dashboard-view-context.tsx +35 -0
- package/template/contexts/product-context.tsx +38 -0
- package/template/contexts/system-banner-context.tsx +127 -0
- package/template/docs/command-menu-pattern.md +45 -0
- package/template/docs/data-views-pattern.md +160 -0
- package/template/ecosystem.config.cjs +20 -0
- package/template/eslint.config.mjs +18 -0
- package/template/fontawesome-subset.manifest.json +190 -0
- package/template/hooks/.gitkeep +0 -0
- package/template/hooks/use-app-theme.ts +1 -0
- package/template/hooks/use-coach-mark.ts +1 -0
- package/template/hooks/use-mobile.ts +1 -0
- package/template/hooks/use-mod-key-label.ts +1 -0
- package/template/lib/.gitkeep +0 -0
- package/template/lib/ask-leo-route-context.ts +133 -0
- package/template/lib/chart-keyboard-selection.test.ts +20 -0
- package/template/lib/chart-keyboard-selection.ts +17 -0
- package/template/lib/chart-line-dash.ts +16 -0
- package/template/lib/coach-mark-registry.ts +68 -0
- package/template/lib/command-menu-config.ts +127 -0
- package/template/lib/command-menu-search-data.ts +44 -0
- package/template/lib/conditional-rule-match.ts +32 -0
- package/template/lib/dashboard-customize-coach-mark.ts +18 -0
- package/template/lib/dashboard-layout-merge.ts +63 -0
- package/template/lib/data-list-display-options.ts +35 -0
- package/template/lib/data-list-persistence.ts +280 -0
- package/template/lib/data-list-view-surface.ts +58 -0
- package/template/lib/data-list-view.ts +29 -0
- package/template/lib/data-view-dashboard-storage.ts +101 -0
- package/template/lib/date-filter.ts +8 -0
- package/template/lib/dev-log.test.ts +28 -0
- package/template/lib/dev-log.ts +8 -0
- package/template/lib/editable-target.ts +10 -0
- package/template/lib/floating-sheet-panel.ts +72 -0
- package/template/lib/initials-from-name.ts +7 -0
- package/template/lib/list-page-table-properties.ts +52 -0
- package/template/lib/list-status-badges.ts +168 -0
- package/template/lib/logo-dev.ts +12 -0
- package/template/lib/mock/compliance-kpi.ts +61 -0
- package/template/lib/mock/compliance.ts +146 -0
- package/template/lib/mock/dashboard.ts +105 -0
- package/template/lib/mock/navigation.tsx +231 -0
- package/template/lib/mock/placements-kpi.ts +134 -0
- package/template/lib/mock/placements.ts +183 -0
- package/template/lib/mock/question-bank-kpi.ts +61 -0
- package/template/lib/mock/question-bank.ts +142 -0
- package/template/lib/mock/sites-directory.ts +16 -0
- package/template/lib/mock/sites-kpi.ts +25 -0
- package/template/lib/mock/team-kpi.ts +60 -0
- package/template/lib/mock/team.ts +118 -0
- package/template/lib/motion-ui.ts +17 -0
- package/template/lib/placement-board-card-layout.ts +79 -0
- package/template/lib/placement-lifecycle.ts +5 -0
- package/template/lib/row-height.ts +10 -0
- package/template/lib/stock-portrait.ts +11 -0
- package/template/lib/utils.test.ts +13 -0
- package/template/lib/utils.ts +1 -0
- package/template/next.config.mjs +15 -0
- package/template/package.json +83 -0
- package/template/postcss.config.mjs +8 -0
- package/template/public/.gitkeep +0 -0
- package/template/public/Illustration/Rotation.svg +74 -0
- package/template/public/avatars/user.svg +11 -0
- package/template/public/favicon/favicon.ico +0 -0
- package/template/public/favicon.ico +0 -0
- package/template/public/logos/exxat-one.svg +36 -0
- package/template/public/logos/exxat-prism.svg +39 -0
- package/template/public/mock-schools/emory.svg +4 -0
- package/template/public/mock-schools/rush.svg +4 -0
- package/template/scripts/fontawesome-subset-audit.mjs +190 -0
- package/template/scripts/pm2-startup-macos.sh +13 -0
- package/template/skills-lock.json +10 -0
- package/template/stores/app-store.ts +33 -0
- package/template/tests/setup.ts +1 -0
- package/template/tsconfig.json +35 -0
- package/template/types/react-payment-inputs.d.ts +19 -0
- package/template/vitest.config.ts +18 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Team board — kanban by member status or role. Column layout from `ListPageBoardTemplate`.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as React from "react"
|
|
8
|
+
import {
|
|
9
|
+
TEAM_MEMBER_STATUS_BADGE_CLASS,
|
|
10
|
+
TEAM_MEMBER_STATUS_ICON,
|
|
11
|
+
TEAM_MEMBER_STATUS_LABEL,
|
|
12
|
+
} from "@/lib/list-status-badges"
|
|
13
|
+
import type { TeamMember } from "@/lib/mock/team"
|
|
14
|
+
import { BoardCardTwoLineBlock } from "@/components/data-views/board-card-primitives"
|
|
15
|
+
import { ListHubStatusBadge } from "@/components/list-hub-status-badge"
|
|
16
|
+
import {
|
|
17
|
+
ListPageBoardCard,
|
|
18
|
+
ListPageBoardCardAvatar,
|
|
19
|
+
ListPageBoardCardBadgeRow,
|
|
20
|
+
ListPageBoardCardBody,
|
|
21
|
+
ListPageBoardCardHeader,
|
|
22
|
+
ListPageBoardCardTitleRow,
|
|
23
|
+
} from "@/components/data-views/list-page-board-card"
|
|
24
|
+
import {
|
|
25
|
+
ListPageBoardTemplate,
|
|
26
|
+
type ListPageBoardColumnDef,
|
|
27
|
+
} from "@/components/data-views/list-page-board-template"
|
|
28
|
+
|
|
29
|
+
const NEUTRAL_COUNT_BADGE = "bg-muted/90 text-foreground"
|
|
30
|
+
|
|
31
|
+
const STATUS_BOARD_COLUMNS: ListPageBoardColumnDef<TeamMember>[] = [
|
|
32
|
+
{ id: "active", label: "Active", description: "On the team", filter: m => m.status === "active" },
|
|
33
|
+
{ id: "away", label: "Away", description: "Temporarily away", filter: m => m.status === "away" },
|
|
34
|
+
{ id: "invited", label: "Invited", description: "Pending acceptance", filter: m => m.status === "invited" },
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
function roleBoardColumns(members: TeamMember[]): {
|
|
38
|
+
columns: ListPageBoardColumnDef<TeamMember>[]
|
|
39
|
+
badgeMap: Record<string, string>
|
|
40
|
+
} {
|
|
41
|
+
const roles = [...new Set(members.map(m => m.role))].sort((a, b) => a.localeCompare(b))
|
|
42
|
+
const columns: ListPageBoardColumnDef<TeamMember>[] = roles.map(role => ({
|
|
43
|
+
id: `role:${role}`,
|
|
44
|
+
label: role,
|
|
45
|
+
filter: (m: TeamMember) => m.role === role,
|
|
46
|
+
}))
|
|
47
|
+
const badgeMap = Object.fromEntries(roles.map(r => [`role:${r}`, NEUTRAL_COUNT_BADGE]))
|
|
48
|
+
return { columns, badgeMap }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function useTeamBoardModel(members: TeamMember[], groupByColumnKey: string) {
|
|
52
|
+
return React.useMemo(() => {
|
|
53
|
+
if (groupByColumnKey === "role") {
|
|
54
|
+
const { columns, badgeMap } = roleBoardColumns(members)
|
|
55
|
+
return { columns, badgeMap }
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
columns: STATUS_BOARD_COLUMNS,
|
|
59
|
+
badgeMap: TEAM_MEMBER_STATUS_BADGE_CLASS as Record<string, string>,
|
|
60
|
+
}
|
|
61
|
+
}, [members, groupByColumnKey])
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function TeamBoardCard({ member }: { member: TeamMember }) {
|
|
65
|
+
return (
|
|
66
|
+
<ListPageBoardCard className="w-full">
|
|
67
|
+
<ListPageBoardCardHeader>
|
|
68
|
+
<ListPageBoardCardTitleRow
|
|
69
|
+
title={member.name}
|
|
70
|
+
titleClassName="truncate"
|
|
71
|
+
trailing={<ListPageBoardCardAvatar initials={member.initials} />}
|
|
72
|
+
/>
|
|
73
|
+
<ListPageBoardCardBadgeRow>
|
|
74
|
+
<ListHubStatusBadge
|
|
75
|
+
surface="board"
|
|
76
|
+
label={TEAM_MEMBER_STATUS_LABEL[member.status]}
|
|
77
|
+
tintClassName={TEAM_MEMBER_STATUS_BADGE_CLASS[member.status]}
|
|
78
|
+
icon={TEAM_MEMBER_STATUS_ICON[member.status]}
|
|
79
|
+
/>
|
|
80
|
+
</ListPageBoardCardBadgeRow>
|
|
81
|
+
<ListPageBoardCardBody>
|
|
82
|
+
<BoardCardTwoLineBlock iconClass="fa-briefcase" line1={member.role} line2={member.email} />
|
|
83
|
+
</ListPageBoardCardBody>
|
|
84
|
+
</ListPageBoardCardHeader>
|
|
85
|
+
</ListPageBoardCard>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const TEAM_BOARD_GROUP_OPTIONS = [
|
|
90
|
+
{ key: "status", label: "Status" },
|
|
91
|
+
{ key: "role", label: "Role" },
|
|
92
|
+
] as const
|
|
93
|
+
|
|
94
|
+
export function TeamBoardView({
|
|
95
|
+
members,
|
|
96
|
+
groupByColumnKey,
|
|
97
|
+
}: {
|
|
98
|
+
members: TeamMember[]
|
|
99
|
+
groupByColumnKey: string
|
|
100
|
+
}) {
|
|
101
|
+
const key = groupByColumnKey === "role" ? "role" : "status"
|
|
102
|
+
const { columns, badgeMap } = useTeamBoardModel(members, key)
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<ListPageBoardTemplate
|
|
106
|
+
columns={columns}
|
|
107
|
+
rows={members}
|
|
108
|
+
getRowKey={m => m.id}
|
|
109
|
+
columnCountBadgeClassName={badgeMap}
|
|
110
|
+
emptyColumnLabel="No members"
|
|
111
|
+
renderCard={member => <TeamBoardCard member={member} />}
|
|
112
|
+
/>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Team page — primary list template: ListPageTemplate + KeyMetrics + TeamTable (same composition as DataListClient).
|
|
5
|
+
* Imports from `@/components/data-views` for shared list-page + view types.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as React from "react"
|
|
9
|
+
import {
|
|
10
|
+
ListPageTemplate,
|
|
11
|
+
type ViewTab,
|
|
12
|
+
dataListViewIcon,
|
|
13
|
+
type DataListViewType,
|
|
14
|
+
} from "@/components/data-views"
|
|
15
|
+
import { TeamPageHeader } from "@/components/team-page-header"
|
|
16
|
+
import { TeamTable, type TeamTableHandle } from "@/components/team-table"
|
|
17
|
+
import { KeyMetrics } from "@/components/key-metrics"
|
|
18
|
+
import { useAskLeoPageContext } from "@/components/ask-leo-sidebar"
|
|
19
|
+
import { TEAM_MEMBERS } from "@/lib/mock/team"
|
|
20
|
+
import { teamKpiInsight, teamKpiMetrics } from "@/lib/mock/team-kpi"
|
|
21
|
+
|
|
22
|
+
const DEFAULT_TEAM_TABS: ViewTab[] = [
|
|
23
|
+
{
|
|
24
|
+
id: "members",
|
|
25
|
+
label: "Members",
|
|
26
|
+
viewType: "table",
|
|
27
|
+
icon: "fa-table",
|
|
28
|
+
filterId: "all",
|
|
29
|
+
},
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
export function TeamClient() {
|
|
33
|
+
const [exportOpen, setExportOpen] = React.useState(false)
|
|
34
|
+
const [showMetrics, setShowMetrics] = React.useState(true)
|
|
35
|
+
const tableRef = React.useRef<TeamTableHandle>(null)
|
|
36
|
+
const memberCount = TEAM_MEMBERS.length
|
|
37
|
+
|
|
38
|
+
const metrics = React.useMemo(() => teamKpiMetrics(TEAM_MEMBERS), [])
|
|
39
|
+
const insight = React.useMemo(() => teamKpiInsight(TEAM_MEMBERS), [])
|
|
40
|
+
|
|
41
|
+
useAskLeoPageContext(
|
|
42
|
+
React.useMemo(
|
|
43
|
+
() => ({
|
|
44
|
+
title: "Team",
|
|
45
|
+
description: `${memberCount} members in this directory.`,
|
|
46
|
+
suggestions: [
|
|
47
|
+
"Who owns the most active placements?",
|
|
48
|
+
"Summarize workload by program",
|
|
49
|
+
],
|
|
50
|
+
}),
|
|
51
|
+
[memberCount],
|
|
52
|
+
),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<ListPageTemplate
|
|
57
|
+
defaultTabs={DEFAULT_TEAM_TABS}
|
|
58
|
+
getTabCount={() => memberCount}
|
|
59
|
+
tablePropertiesRef={tableRef}
|
|
60
|
+
header={
|
|
61
|
+
<TeamPageHeader
|
|
62
|
+
memberCount={memberCount}
|
|
63
|
+
onInvite={() => {}}
|
|
64
|
+
onExport={() => setExportOpen(true)}
|
|
65
|
+
showMetrics={showMetrics}
|
|
66
|
+
onToggleMetrics={() => setShowMetrics(v => !v)}
|
|
67
|
+
/>
|
|
68
|
+
}
|
|
69
|
+
metrics={
|
|
70
|
+
<KeyMetrics
|
|
71
|
+
variant="flat"
|
|
72
|
+
metrics={metrics}
|
|
73
|
+
insight={insight}
|
|
74
|
+
showHeader={false}
|
|
75
|
+
metricsSingleRow
|
|
76
|
+
/>
|
|
77
|
+
}
|
|
78
|
+
showMetrics={showMetrics}
|
|
79
|
+
exportOpen={exportOpen}
|
|
80
|
+
onExportOpenChange={setExportOpen}
|
|
81
|
+
exportTotalRows={memberCount}
|
|
82
|
+
renderContent={(tab, updateTab) => (
|
|
83
|
+
<TeamTable
|
|
84
|
+
key={tab.id}
|
|
85
|
+
ref={tableRef}
|
|
86
|
+
members={TEAM_MEMBERS}
|
|
87
|
+
view={tab.viewType}
|
|
88
|
+
onViewChange={(v: DataListViewType) => updateTab({ viewType: v, icon: dataListViewIcon(v) })}
|
|
89
|
+
/>
|
|
90
|
+
)}
|
|
91
|
+
/>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TeamListView — full-width rows for team roster (same data as DataTable / board).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as React from "react"
|
|
8
|
+
import { ListHubStatusBadge } from "@/components/list-hub-status-badge"
|
|
9
|
+
import { ListPageBoardCard, ListPageBoardCardAvatar } from "@/components/data-views/list-page-board-card"
|
|
10
|
+
import {
|
|
11
|
+
TEAM_MEMBER_STATUS_BADGE_CLASS,
|
|
12
|
+
TEAM_MEMBER_STATUS_ICON,
|
|
13
|
+
TEAM_MEMBER_STATUS_LABEL,
|
|
14
|
+
} from "@/lib/list-status-badges"
|
|
15
|
+
import type { TeamMember } from "@/lib/mock/team"
|
|
16
|
+
|
|
17
|
+
function TeamListRow({ member }: { member: TeamMember }) {
|
|
18
|
+
return (
|
|
19
|
+
<li>
|
|
20
|
+
<ListPageBoardCard
|
|
21
|
+
layout="row"
|
|
22
|
+
rowContainerClassName="flex flex-row items-center gap-3"
|
|
23
|
+
leading={<ListPageBoardCardAvatar initials={member.initials} className="size-9" />}
|
|
24
|
+
rowEnd={
|
|
25
|
+
<div className="flex shrink-0 items-center gap-2">
|
|
26
|
+
<ListHubStatusBadge
|
|
27
|
+
surface="board"
|
|
28
|
+
label={TEAM_MEMBER_STATUS_LABEL[member.status]}
|
|
29
|
+
tintClassName={TEAM_MEMBER_STATUS_BADGE_CLASS[member.status]}
|
|
30
|
+
icon={TEAM_MEMBER_STATUS_ICON[member.status]}
|
|
31
|
+
/>
|
|
32
|
+
<i className="fa-light fa-chevron-right text-xs text-muted-foreground" aria-hidden="true" />
|
|
33
|
+
</div>
|
|
34
|
+
}
|
|
35
|
+
>
|
|
36
|
+
<div className="space-y-0.5">
|
|
37
|
+
<p className="truncate text-sm font-semibold text-foreground">{member.name}</p>
|
|
38
|
+
<p className="text-xs text-muted-foreground">{member.role}</p>
|
|
39
|
+
<p className="truncate text-xs text-muted-foreground">{member.email}</p>
|
|
40
|
+
</div>
|
|
41
|
+
</ListPageBoardCard>
|
|
42
|
+
</li>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function TeamListView({ members }: { members: TeamMember[] }) {
|
|
47
|
+
if (members.length === 0) {
|
|
48
|
+
return (
|
|
49
|
+
<div className="px-4 py-16 text-center lg:px-6">
|
|
50
|
+
<p className="text-sm text-muted-foreground">No team members match your filters.</p>
|
|
51
|
+
</div>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<ul className="flex list-none flex-col gap-2 px-4 pb-8 pt-2 lg:px-6">
|
|
57
|
+
{members.map(m => (
|
|
58
|
+
<TeamListRow key={m.id} member={m} />
|
|
59
|
+
))}
|
|
60
|
+
</ul>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Button } from "@/components/ui/button"
|
|
5
|
+
import { PageHeader } from "@/components/page-header"
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenu,
|
|
8
|
+
DropdownMenuContent,
|
|
9
|
+
DropdownMenuItem,
|
|
10
|
+
DropdownMenuSeparator,
|
|
11
|
+
DropdownMenuTrigger,
|
|
12
|
+
} from "@/components/ui/dropdown-menu"
|
|
13
|
+
import { Tip } from "@/components/ui/tip"
|
|
14
|
+
|
|
15
|
+
export interface TeamPageHeaderProps {
|
|
16
|
+
memberCount: number
|
|
17
|
+
onInvite: () => void
|
|
18
|
+
onExport: () => void
|
|
19
|
+
showMetrics: boolean
|
|
20
|
+
onToggleMetrics: () => void
|
|
21
|
+
showTitleBlock?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Team list shell header — title, primary Invite, overflow (export + metrics toggle). Same pattern as PlacementsPageHeader.
|
|
26
|
+
*/
|
|
27
|
+
export function TeamPageHeader({
|
|
28
|
+
memberCount,
|
|
29
|
+
onInvite,
|
|
30
|
+
onExport,
|
|
31
|
+
showMetrics,
|
|
32
|
+
onToggleMetrics,
|
|
33
|
+
showTitleBlock = true,
|
|
34
|
+
}: TeamPageHeaderProps) {
|
|
35
|
+
const [moreOpen, setMoreOpen] = React.useState(false)
|
|
36
|
+
const countLine = `${memberCount} ${memberCount === 1 ? "member" : "members"} · Last updated now`
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<PageHeader
|
|
40
|
+
title="Team"
|
|
41
|
+
subtitle={countLine}
|
|
42
|
+
showTitleBlock={showTitleBlock}
|
|
43
|
+
actions={(
|
|
44
|
+
<div className="flex items-center gap-2" role="group" aria-label="Team actions">
|
|
45
|
+
<Tip side="bottom" label="Send an invitation (demo)">
|
|
46
|
+
<Button type="button" size="lg" onClick={onInvite}>
|
|
47
|
+
<i className="fa-light fa-user-plus" aria-hidden="true" />
|
|
48
|
+
Invite member
|
|
49
|
+
</Button>
|
|
50
|
+
</Tip>
|
|
51
|
+
<DropdownMenu open={moreOpen} onOpenChange={setMoreOpen}>
|
|
52
|
+
<Tip side="bottom" label="More actions">
|
|
53
|
+
<DropdownMenuTrigger asChild>
|
|
54
|
+
<Button
|
|
55
|
+
type="button"
|
|
56
|
+
size="lg"
|
|
57
|
+
variant="outline"
|
|
58
|
+
className="aspect-square px-0"
|
|
59
|
+
aria-label="More actions"
|
|
60
|
+
>
|
|
61
|
+
<i className="fa-light fa-ellipsis text-base" aria-hidden="true" />
|
|
62
|
+
</Button>
|
|
63
|
+
</DropdownMenuTrigger>
|
|
64
|
+
</Tip>
|
|
65
|
+
<DropdownMenuContent align="end" className="w-52">
|
|
66
|
+
<DropdownMenuItem
|
|
67
|
+
onSelect={() => {
|
|
68
|
+
window.setTimeout(() => onExport(), 0)
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
<i className="fa-light fa-arrow-down-to-line" aria-hidden="true" />
|
|
72
|
+
Export
|
|
73
|
+
</DropdownMenuItem>
|
|
74
|
+
<DropdownMenuSeparator />
|
|
75
|
+
<DropdownMenuItem
|
|
76
|
+
onSelect={() => {
|
|
77
|
+
window.setTimeout(() => onToggleMetrics(), 0)
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<i
|
|
81
|
+
className={`fa-light ${showMetrics ? "fa-eye-slash" : "fa-eye"}`}
|
|
82
|
+
aria-hidden="true"
|
|
83
|
+
/>
|
|
84
|
+
{showMetrics ? "Hide metric section" : "Show metric section"}
|
|
85
|
+
</DropdownMenuItem>
|
|
86
|
+
</DropdownMenuContent>
|
|
87
|
+
</DropdownMenu>
|
|
88
|
+
</div>
|
|
89
|
+
)}
|
|
90
|
+
/>
|
|
91
|
+
)
|
|
92
|
+
}
|