@exxatdesignux/ui 0.2.19 → 0.3.0
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/CHANGELOG.md +60 -7
- package/bin/sync-extras.mjs +116 -29
- package/consumer-extras/README.md +42 -7
- package/consumer-extras/cursor-rules/exxat-accessibility.mdc +39 -0
- package/consumer-extras/cursor-rules/exxat-board-cards.mdc +26 -0
- package/consumer-extras/cursor-rules/exxat-breadcrumbs-no-back.mdc +21 -0
- package/consumer-extras/cursor-rules/exxat-card-vs-list-rows.mdc +21 -0
- package/consumer-extras/cursor-rules/exxat-centralized-list-dataset.mdc +44 -0
- package/consumer-extras/cursor-rules/exxat-collaboration-access.mdc +32 -0
- package/consumer-extras/cursor-rules/exxat-command-menu.mdc +22 -0
- package/consumer-extras/cursor-rules/exxat-dashboard-view-charts.mdc +53 -0
- package/consumer-extras/cursor-rules/exxat-data-tables.mdc +41 -0
- package/consumer-extras/cursor-rules/exxat-dedicated-search-surfaces.mdc +25 -0
- package/consumer-extras/cursor-rules/exxat-drawer-vs-dialog.mdc +22 -0
- package/consumer-extras/cursor-rules/exxat-ds-agents.mdc +56 -0
- package/consumer-extras/cursor-rules/exxat-fontawesome-icons.mdc +31 -0
- package/consumer-extras/cursor-rules/exxat-kbd-shortcuts.mdc +100 -0
- package/consumer-extras/cursor-rules/exxat-kpi-flat-band.mdc +28 -0
- package/consumer-extras/cursor-rules/exxat-kpi-max-four.mdc +21 -0
- package/consumer-extras/cursor-rules/exxat-kpi-trends.mdc +31 -0
- package/consumer-extras/cursor-rules/exxat-list-page-connected-views.mdc +24 -0
- package/consumer-extras/cursor-rules/exxat-list-page-view-shells.mdc +31 -0
- package/consumer-extras/cursor-rules/exxat-mono-ids.mdc +30 -0
- package/consumer-extras/cursor-rules/exxat-no-slds-leakage.mdc +78 -0
- package/consumer-extras/cursor-rules/exxat-no-toast.mdc +25 -0
- package/consumer-extras/cursor-rules/exxat-page-vs-drawer.mdc +23 -0
- package/consumer-extras/cursor-rules/exxat-person-identity-display.mdc +47 -0
- package/consumer-extras/cursor-rules/exxat-primary-nav-secondary-panel.mdc +52 -0
- package/consumer-extras/cursor-rules/exxat-question-bank-hub-header.mdc +28 -0
- package/consumer-extras/cursor-rules/exxat-reuse-before-custom.mdc +34 -0
- package/consumer-extras/cursor-rules/exxat-table-properties-drawer.mdc +77 -0
- package/consumer-extras/cursor-rules/exxat-token-discipline.mdc +103 -0
- package/consumer-extras/cursor-skills/exxat-accessibility/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-board-cards/SKILL.md +2 -2
- package/consumer-extras/cursor-skills/exxat-centralized-list-dataset/SKILL.md +4 -15
- package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +13 -28
- package/consumer-extras/cursor-skills/exxat-ds-skill/references/data-table-pattern.md +1 -1
- package/consumer-extras/cursor-skills/exxat-primary-nav-secondary-panel/SKILL.md +2 -4
- package/consumer-extras/handbook/HANDBOOK.md +185 -0
- package/consumer-extras/handbook/glossary.md +57 -0
- package/consumer-extras/handbook/reference-implementations.md +126 -0
- package/consumer-extras/handbook/voice-and-tone.md +262 -0
- package/consumer-extras/patterns/command-menu-pattern.md +1 -1
- package/consumer-extras/patterns/consumer-upgrade-checklist.md +0 -20
- package/consumer-extras/patterns/data-views-pattern.md +17 -54
- package/consumer-extras/patterns/shell-surface-elevation-pattern.md +3 -5
- package/dist/components/data-table/filter-date-calendar.d.ts +10 -0
- package/dist/components/data-table/filter-date-calendar.js +280 -0
- package/dist/components/data-table/filter-date-calendar.js.map +1 -0
- package/dist/components/data-table/filter-text-value-input.d.ts +15 -0
- package/dist/components/data-table/filter-text-value-input.js +561 -0
- package/dist/components/data-table/filter-text-value-input.js.map +1 -0
- package/dist/components/data-table/index.d.ts +45 -0
- package/dist/components/data-table/index.js +3085 -0
- package/dist/components/data-table/index.js.map +1 -0
- package/dist/components/data-table/pagination.d.ts +28 -0
- package/dist/components/data-table/pagination.js +3264 -0
- package/dist/components/data-table/pagination.js.map +1 -0
- package/dist/components/data-table/types.d.ts +84 -0
- package/dist/components/data-table/types.js +3 -0
- package/dist/components/data-table/types.js.map +1 -0
- package/dist/components/data-table/use-table-state.d.ts +116 -0
- package/dist/components/data-table/use-table-state.js +670 -0
- package/dist/components/data-table/use-table-state.js.map +1 -0
- package/dist/components/data-views/board-card-primitives.d.ts +22 -0
- package/dist/components/data-views/board-card-primitives.js +84 -0
- package/dist/components/data-views/board-card-primitives.js.map +1 -0
- package/dist/components/data-views/data-row-list.d.ts +33 -0
- package/dist/components/data-views/data-row-list.js +106 -0
- package/dist/components/data-views/data-row-list.js.map +1 -0
- package/dist/components/data-views/finder-panel-view.d.ts +54 -0
- package/dist/components/data-views/finder-panel-view.js +388 -0
- package/dist/components/data-views/finder-panel-view.js.map +1 -0
- package/dist/components/data-views/folder-grid-view.d.ts +22 -0
- package/dist/components/data-views/folder-grid-view.js +58 -0
- package/dist/components/data-views/folder-grid-view.js.map +1 -0
- package/dist/components/data-views/hub-table.d.ts +167 -0
- package/dist/components/data-views/hub-table.js +5561 -0
- package/dist/components/data-views/hub-table.js.map +1 -0
- package/dist/components/data-views/index.d.ts +27 -0
- package/dist/components/data-views/index.js +6575 -0
- package/dist/components/data-views/index.js.map +1 -0
- package/dist/components/data-views/list-page-board-card.d.ts +72 -0
- package/dist/components/data-views/list-page-board-card.js +264 -0
- package/dist/components/data-views/list-page-board-card.js.map +1 -0
- package/dist/components/data-views/list-page-board-template.d.ts +24 -0
- package/dist/components/data-views/list-page-board-template.js +137 -0
- package/dist/components/data-views/list-page-board-template.js.map +1 -0
- package/dist/components/data-views/list-page-connected-view-body.d.ts +19 -0
- package/dist/components/data-views/list-page-connected-view-body.js +116 -0
- package/dist/components/data-views/list-page-connected-view-body.js.map +1 -0
- package/dist/components/data-views/list-page-split-details-placeholder.d.ts +14 -0
- package/dist/components/data-views/list-page-split-details-placeholder.js +38 -0
- package/dist/components/data-views/list-page-split-details-placeholder.js.map +1 -0
- package/dist/components/data-views/list-page-split-hub-chrome.d.ts +17 -0
- package/dist/components/data-views/list-page-split-hub-chrome.js +54 -0
- package/dist/components/data-views/list-page-split-hub-chrome.js.map +1 -0
- package/dist/components/data-views/list-page-split-hub-tokens.d.ts +12 -0
- package/dist/components/data-views/list-page-split-hub-tokens.js +8 -0
- package/dist/components/data-views/list-page-split-hub-tokens.js.map +1 -0
- package/dist/components/data-views/list-page-tree-column-header.d.ts +15 -0
- package/dist/components/data-views/list-page-tree-column-header.js +22 -0
- package/dist/components/data-views/list-page-tree-column-header.js.map +1 -0
- package/dist/components/data-views/list-page-tree-panel-shell.d.ts +25 -0
- package/dist/components/data-views/list-page-tree-panel-shell.js +146 -0
- package/dist/components/data-views/list-page-tree-panel-shell.js.map +1 -0
- package/dist/components/data-views/os-folder-glyph.d.ts +35 -0
- package/dist/components/data-views/os-folder-glyph.js +104 -0
- package/dist/components/data-views/os-folder-glyph.js.map +1 -0
- package/dist/components/data-views/outline-tree-menu.d.ts +36 -0
- package/dist/components/data-views/outline-tree-menu.js +131 -0
- package/dist/components/data-views/outline-tree-menu.js.map +1 -0
- package/dist/components/table-properties/column-row.d.ts +22 -0
- package/dist/components/table-properties/column-row.js +153 -0
- package/dist/components/table-properties/column-row.js.map +1 -0
- package/dist/components/table-properties/draggable-list.d.ts +24 -0
- package/dist/components/table-properties/draggable-list.js +53 -0
- package/dist/components/table-properties/draggable-list.js.map +1 -0
- package/dist/components/table-properties/drawer-button.d.ts +110 -0
- package/dist/components/table-properties/drawer-button.js +2748 -0
- package/dist/components/table-properties/drawer-button.js.map +1 -0
- package/dist/components/table-properties/drawer.d.ts +100 -0
- package/dist/components/table-properties/drawer.js +2595 -0
- package/dist/components/table-properties/drawer.js.map +1 -0
- package/dist/components/table-properties/filter-card.d.ts +24 -0
- package/dist/components/table-properties/filter-card.js +854 -0
- package/dist/components/table-properties/filter-card.js.map +1 -0
- package/dist/components/table-properties/index.d.ts +14 -0
- package/dist/components/table-properties/index.js +2768 -0
- package/dist/components/table-properties/index.js.map +1 -0
- package/dist/components/table-properties/sort-card.d.ts +20 -0
- package/dist/components/table-properties/sort-card.js +102 -0
- package/dist/components/table-properties/sort-card.js.map +1 -0
- package/dist/components/templates/dedicated-search-landing-template.d.ts +21 -0
- package/dist/components/templates/dedicated-search-landing-template.js +254 -0
- package/dist/components/templates/dedicated-search-landing-template.js.map +1 -0
- package/dist/components/templates/dedicated-search-results-template.d.ts +15 -0
- package/dist/components/templates/dedicated-search-results-template.js +16 -0
- package/dist/components/templates/dedicated-search-results-template.js.map +1 -0
- package/dist/components/templates/index.d.ts +9 -0
- package/dist/components/templates/index.js +2720 -0
- package/dist/components/templates/index.js.map +1 -0
- package/dist/components/templates/list-page.d.ts +83 -0
- package/dist/components/templates/list-page.js +2433 -0
- package/dist/components/templates/list-page.js.map +1 -0
- package/dist/components/templates/nested-secondary-panel-shell.d.ts +20 -0
- package/dist/components/templates/nested-secondary-panel-shell.js +54 -0
- package/dist/components/templates/nested-secondary-panel-shell.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +10 -0
- package/dist/components/ui/accordion.js +74 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +37 -0
- package/dist/components/ui/alert-dialog.js +201 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +84 -0
- package/dist/components/ui/avatar.js +328 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +13 -0
- package/dist/components/ui/badge.js +49 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/banner.d.ts +62 -0
- package/dist/components/ui/banner.js +364 -0
- package/dist/components/ui/banner.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +14 -0
- package/dist/components/ui/breadcrumb.js +114 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +16 -0
- package/dist/components/ui/button.js +59 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +13 -0
- package/dist/components/ui/calendar.js +238 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +14 -0
- package/dist/components/ui/card.js +102 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/chart.d.ts +58 -0
- package/dist/components/ui/chart.js +292 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +23 -0
- package/dist/components/ui/checkbox.js +155 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/coach-mark.d.ts +27 -0
- package/dist/components/ui/coach-mark.js +306 -0
- package/dist/components/ui/coach-mark.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +8 -0
- package/dist/components/ui/collapsible.js +35 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +36 -0
- package/dist/components/ui/command.js +274 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.js +245 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/date-picker-field.d.ts +38 -0
- package/dist/components/ui/date-picker-field.js +550 -0
- package/dist/components/ui/date-picker-field.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.js +200 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dot-pattern.d.ts +21 -0
- package/dist/components/ui/dot-pattern.js +139 -0
- package/dist/components/ui/dot-pattern.js.map +1 -0
- package/dist/components/ui/drag-handle-grip.d.ts +10 -0
- package/dist/components/ui/drag-handle-grip.js +15 -0
- package/dist/components/ui/drag-handle-grip.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +16 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +45 -0
- package/dist/components/ui/dropdown-menu.js +353 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/export-drawer.d.ts +11 -0
- package/dist/components/ui/export-drawer.js +1658 -0
- package/dist/components/ui/export-drawer.js.map +1 -0
- package/dist/components/ui/field.d.ts +30 -0
- package/dist/components/ui/field.js +249 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +28 -0
- package/dist/components/ui/form.js +110 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +9 -0
- package/dist/components/ui/hover-card.js +43 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.js +219 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-mask.d.ts +39 -0
- package/dist/components/ui/input-mask.js +118 -0
- package/dist/components/ui/input-mask.js.map +1 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +30 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +20 -0
- package/dist/components/ui/kbd.js +45 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/key-metrics-context.d.ts +19 -0
- package/dist/components/ui/key-metrics-context.js +26 -0
- package/dist/components/ui/key-metrics-context.js.map +1 -0
- package/dist/components/ui/key-metrics.d.ts +131 -0
- package/dist/components/ui/key-metrics.js +1015 -0
- package/dist/components/ui/key-metrics.js.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.js +28 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/list-page-view-frame.d.ts +22 -0
- package/dist/components/ui/list-page-view-frame.js +24 -0
- package/dist/components/ui/list-page-view-frame.js.map +1 -0
- package/dist/components/ui/page-header.d.ts +51 -0
- package/dist/components/ui/page-header.js +372 -0
- package/dist/components/ui/page-header.js.map +1 -0
- package/dist/components/ui/payment-card-fields.d.ts +10 -0
- package/dist/components/ui/payment-card-fields.js +80 -0
- package/dist/components/ui/payment-card-fields.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +47 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +29 -0
- package/dist/components/ui/radio-group.js +190 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +16 -0
- package/dist/components/ui/resizable.js +51 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +8 -0
- package/dist/components/ui/scroll-area.js +66 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.js +186 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/selection-tile-grid.d.ts +52 -0
- package/dist/components/ui/selection-tile-grid.js +347 -0
- package/dist/components/ui/selection-tile-grid.js.map +1 -0
- package/dist/components/ui/separator.d.ts +7 -0
- package/dist/components/ui/separator.js +33 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +18 -0
- package/dist/components/ui/sheet.js +181 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +94 -0
- package/dist/components/ui/sidebar.js +805 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +5 -0
- package/dist/components/ui/skeleton.js +22 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +7 -0
- package/dist/components/ui/slider.js +66 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +6 -0
- package/dist/components/ui/sonner.js +38 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/status-badge.d.ts +38 -0
- package/dist/components/ui/status-badge.js +77 -0
- package/dist/components/ui/status-badge.js.map +1 -0
- package/dist/components/ui/table.d.ts +13 -0
- package/dist/components/ui/table.js +115 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +15 -0
- package/dist/components/ui/tabs.js +93 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.js +25 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/tip.d.ts +12 -0
- package/dist/components/ui/tip.js +61 -0
- package/dist/components/ui/tip.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +14 -0
- package/dist/components/ui/toggle-group.js +104 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle-switch.d.ts +10 -0
- package/dist/components/ui/toggle-switch.js +33 -0
- package/dist/components/ui/toggle-switch.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +13 -0
- package/dist/components/ui/toggle.js +51 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +10 -0
- package/dist/components/ui/tooltip.js +68 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/view-segmented-control.d.ts +31 -0
- package/dist/components/ui/view-segmented-control.js +167 -0
- package/dist/components/ui/view-segmented-control.js.map +1 -0
- package/dist/data-list-view-registry-CyBoBML4.d.ts +73 -0
- package/dist/hooks/use-app-theme.d.ts +24 -0
- package/dist/hooks/use-app-theme.js +286 -0
- package/dist/hooks/use-app-theme.js.map +1 -0
- package/dist/hooks/use-coach-mark.d.ts +86 -0
- package/dist/hooks/use-coach-mark.js +218 -0
- package/dist/hooks/use-coach-mark.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +29 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-mod-key-label.d.ts +6 -0
- package/dist/hooks/use-mod-key-label.js +25 -0
- package/dist/hooks/use-mod-key-label.js.map +1 -0
- package/dist/index.d.ts +120 -0
- package/dist/index.js +13324 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/compose-refs.d.ts +6 -0
- package/dist/lib/compose-refs.js +17 -0
- package/dist/lib/compose-refs.js.map +1 -0
- package/dist/lib/conditional-rule-match.d.ts +30 -0
- package/dist/lib/conditional-rule-match.js +66 -0
- package/dist/lib/conditional-rule-match.js.map +1 -0
- package/dist/lib/data-list-display-options.d.ts +26 -0
- package/dist/lib/data-list-display-options.js +14 -0
- package/dist/lib/data-list-display-options.js.map +1 -0
- package/dist/lib/data-list-view-registry.d.ts +2 -0
- package/dist/lib/data-list-view-registry.js +102 -0
- package/dist/lib/data-list-view-registry.js.map +1 -0
- package/dist/lib/data-list-view-surface.d.ts +2 -0
- package/dist/lib/data-list-view-surface.js +80 -0
- package/dist/lib/data-list-view-surface.js.map +1 -0
- package/dist/lib/data-list-view.d.ts +21 -0
- package/dist/lib/data-list-view.js +25 -0
- package/dist/lib/data-list-view.js.map +1 -0
- package/dist/lib/date-filter.d.ts +22 -0
- package/dist/lib/date-filter.js +61 -0
- package/dist/lib/date-filter.js.map +1 -0
- package/dist/lib/dev-log.d.ts +8 -0
- package/dist/lib/dev-log.js +10 -0
- package/dist/lib/dev-log.js.map +1 -0
- package/dist/lib/dropdown-menu-surface.d.ts +14 -0
- package/dist/lib/dropdown-menu-surface.js +6 -0
- package/dist/lib/dropdown-menu-surface.js.map +1 -0
- package/dist/lib/editable-target.d.ts +12 -0
- package/dist/lib/editable-target.js +12 -0
- package/dist/lib/editable-target.js.map +1 -0
- package/dist/lib/list-page-table-properties.d.ts +35 -0
- package/dist/lib/list-page-table-properties.js +81 -0
- package/dist/lib/list-page-table-properties.js.map +1 -0
- package/dist/lib/raf-throttle.d.ts +23 -0
- package/dist/lib/raf-throttle.js +27 -0
- package/dist/lib/raf-throttle.js.map +1 -0
- package/dist/lib/row-height.d.ts +16 -0
- package/dist/lib/row-height.js +10 -0
- package/dist/lib/row-height.js.map +1 -0
- package/dist/lib/table-properties-types.d.ts +83 -0
- package/dist/lib/table-properties-types.js +19 -0
- package/dist/lib/table-properties-types.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +83 -19
- package/src/components/data-table/filter-date-calendar.tsx +38 -0
- package/src/components/data-table/filter-text-value-input.tsx +77 -0
- package/src/components/data-table/index.tsx +1678 -0
- package/src/components/data-table/pagination.tsx +255 -0
- package/src/components/data-table/types.ts +96 -0
- package/src/components/data-table/use-table-state.ts +767 -0
- package/src/components/data-views/board-card-primitives.tsx +93 -0
- package/src/components/data-views/data-row-list.tsx +183 -0
- package/src/components/data-views/finder-panel-view.tsx +405 -0
- package/src/components/data-views/folder-grid-view.tsx +86 -0
- package/src/components/data-views/hub-table.tsx +498 -0
- package/src/components/data-views/index.ts +28 -0
- package/src/components/data-views/list-page-board-card.tsx +192 -0
- package/src/components/data-views/list-page-board-template.tsx +122 -0
- package/src/components/data-views/list-page-connected-view-body.tsx +66 -0
- package/src/components/data-views/list-page-split-details-placeholder.tsx +39 -0
- package/src/components/data-views/list-page-split-hub-chrome.tsx +60 -0
- package/src/components/data-views/list-page-split-hub-tokens.ts +16 -0
- package/src/components/data-views/list-page-tree-column-header.tsx +31 -0
- package/src/components/data-views/list-page-tree-panel-shell.tsx +91 -0
- package/src/components/data-views/os-folder-glyph.tsx +141 -0
- package/src/components/data-views/outline-tree-menu.tsx +157 -0
- package/src/components/table-properties/column-row.tsx +90 -0
- package/src/components/table-properties/draggable-list.ts +54 -0
- package/src/components/table-properties/drawer-button.tsx +300 -0
- package/src/components/table-properties/drawer.tsx +1148 -0
- package/src/components/table-properties/filter-card.tsx +251 -0
- package/src/components/table-properties/index.ts +36 -0
- package/src/components/table-properties/sort-card.tsx +63 -0
- package/src/components/templates/dedicated-search-landing-template.tsx +124 -0
- package/src/components/templates/dedicated-search-results-template.tsx +19 -0
- package/src/components/templates/index.ts +33 -0
- package/src/components/templates/list-page.tsx +602 -0
- package/src/components/templates/nested-secondary-panel-shell.tsx +70 -0
- package/src/components/ui/accordion.tsx +92 -0
- package/src/components/ui/alert-dialog.tsx +221 -0
- package/src/components/ui/avatar.tsx +13 -2
- package/src/components/ui/banner.tsx +2 -2
- package/src/components/ui/button.tsx +4 -4
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/coach-mark.tsx +1 -1
- package/src/components/ui/context-menu.tsx +291 -0
- package/src/components/ui/date-picker-field.tsx +2 -2
- package/src/components/ui/dot-pattern.tsx +183 -0
- package/src/components/ui/export-drawer.tsx +375 -0
- package/src/components/ui/hover-card.tsx +66 -0
- package/src/components/ui/key-metrics-context.tsx +78 -0
- package/src/components/ui/key-metrics.tsx +1133 -0
- package/src/components/ui/list-page-view-frame.tsx +64 -0
- package/src/components/ui/page-header.tsx +244 -0
- package/src/components/ui/payment-card-fields.tsx +2 -2
- package/src/components/ui/resizable.tsx +68 -0
- package/src/components/ui/scroll-area.tsx +72 -0
- package/src/components/ui/selection-tile-grid.tsx +9 -2
- package/src/components/ui/sidebar.tsx +84 -12
- package/src/components/ui/slider.tsx +83 -0
- package/src/globals.css +2201 -7
- package/src/globals.d.ts +20 -0
- package/src/index.ts +68 -1
- package/src/lib/conditional-rule-match.ts +119 -0
- package/src/lib/data-list-display-options.ts +35 -0
- package/src/lib/data-list-view-registry.ts +104 -0
- package/src/lib/data-list-view-surface.ts +83 -0
- package/src/lib/data-list-view.ts +47 -0
- package/src/lib/dev-log.ts +10 -0
- package/src/lib/editable-target.ts +20 -0
- package/src/lib/list-page-table-properties.ts +48 -0
- package/src/lib/raf-throttle.ts +45 -0
- package/src/lib/row-height.ts +19 -0
- package/src/lib/table-properties-types.ts +98 -0
- package/template/.cursor/rules/exxat-command-menu.mdc +1 -1
- package/template/.cursor/rules/exxat-dashboard-view-charts.mdc +3 -3
- package/template/.cursor/rules/exxat-data-tables.mdc +1 -1
- package/template/.cursor/rules/exxat-ds-agents.mdc +2 -2
- package/template/.cursor/rules/exxat-kbd-shortcuts.mdc +2 -2
- package/template/.cursor/rules/exxat-table-properties-drawer.mdc +1 -1
- package/template/AGENTS.md +104 -78
- package/template/app/(app)/dashboard/loading.tsx +15 -3
- package/template/app/(app)/dashboard/page.tsx +14 -2
- package/template/app/(app)/examples/page.tsx +0 -2
- package/template/app/(app)/layout.tsx +17 -4
- package/template/app/(app)/loading.tsx +18 -1
- package/template/app/(app)/question-bank/find/page.tsx +1 -2
- package/template/app/(app)/question-bank/layout.tsx +1 -1
- package/template/app/(app)/question-bank/library/page.tsx +1 -2
- package/template/app/(app)/question-bank/list/page.tsx +1 -2
- package/template/app/(app)/question-bank/new/page.tsx +15 -20
- package/template/app/(app)/question-bank/page.tsx +1 -2
- package/template/app/(app)/settings/page.tsx +5 -4
- package/template/app/globals.css +14 -16
- package/template/components/ask-leo-sidebar.tsx +5 -1
- package/template/components/brand-color-picker.tsx +2 -2
- package/template/components/charts-overview.tsx +1 -1
- package/template/components/compliance-board-view.tsx +142 -0
- package/template/components/compliance-client.tsx +92 -0
- package/template/components/compliance-page-header.tsx +89 -0
- package/template/components/compliance-table.tsx +468 -0
- package/template/components/dashboard-report-charts.tsx +1 -1
- package/template/components/dashboard-tabs.tsx +1 -1
- package/template/components/data-table/filter-date-calendar.tsx +1 -38
- package/template/components/data-table/filter-text-value-input.tsx +1 -77
- package/template/components/data-table/index.tsx +1 -1634
- package/template/components/data-table/pagination.tsx +1 -255
- package/template/components/data-table/types.ts +1 -94
- package/template/components/data-table/use-table-state.test.ts +420 -0
- package/template/components/data-table/use-table-state.ts +1 -758
- package/template/components/data-view-dashboard-charts-compliance.tsx +963 -0
- package/template/components/data-view-dashboard-charts-team.tsx +971 -0
- package/template/components/data-view-dashboard-charts.tsx +1503 -0
- package/template/components/data-views/board-card-primitives.tsx +1 -93
- package/template/components/data-views/data-row-list.tsx +1 -183
- package/template/components/data-views/finder-panel-view.tsx +1 -405
- package/template/components/data-views/folder-grid-view.tsx +1 -86
- package/template/components/data-views/hub-table.tsx +1 -0
- package/template/components/data-views/index.ts +50 -37
- package/template/components/data-views/list-page-board-card.tsx +1 -192
- package/template/components/data-views/list-page-board-template.tsx +1 -122
- package/template/components/data-views/list-page-connected-view-body.tsx +1 -66
- package/template/components/data-views/list-page-split-details-placeholder.tsx +1 -39
- package/template/components/data-views/list-page-split-hub-chrome.tsx +1 -68
- package/template/components/data-views/list-page-split-hub-tokens.ts +1 -16
- package/template/components/data-views/list-page-tree-column-header.tsx +1 -31
- package/template/components/data-views/list-page-tree-panel-shell.tsx +1 -91
- package/template/components/data-views/list-page-view-frame.tsx +5 -53
- package/template/components/data-views/os-folder-glyph.tsx +1 -129
- package/template/components/data-views/outline-tree-menu.tsx +1 -157
- package/template/components/export-drawer.test.tsx +71 -0
- package/template/components/export-drawer.tsx +1 -375
- package/template/components/exxat-product-logo.tsx +5 -5
- package/template/components/hub-tree-panel-view.tsx +2 -2
- package/template/components/invite-collaborators-drawer.tsx +3 -3
- package/template/components/key-metrics-ask-leo-bridge.tsx +40 -0
- package/template/components/key-metrics.tsx +1 -1063
- package/template/components/leo-insight-indicator.tsx +2 -2
- package/template/components/new-placement-back-btn.tsx +28 -0
- package/template/components/new-placement-form.tsx +942 -0
- package/template/components/new-question-composer.tsx +456 -408
- package/template/components/onboarding/index.ts +9 -0
- package/template/components/onboarding/onboarding-01.tsx +1 -1
- package/template/components/onboarding/onboarding-02.tsx +1 -1
- package/template/components/onboarding/onboarding-03.tsx +1 -1
- package/template/components/onboarding/onboarding-04.tsx +1 -1
- package/template/components/page-header.tsx +8 -226
- package/template/components/placement-board-card.tsx +250 -0
- package/template/components/placement-detail.tsx +438 -0
- package/template/components/placements-board-view.tsx +397 -0
- package/template/components/placements-client.tsx +220 -0
- package/template/components/placements-list-view.tsx +124 -0
- package/template/components/placements-page-header.tsx +166 -0
- package/template/components/placements-table-cells.test.tsx +22 -0
- package/template/components/placements-table-cells.tsx +173 -0
- package/template/components/placements-table-columns.tsx +210 -0
- package/template/components/placements-table.tsx +934 -0
- package/template/components/product-switcher.tsx +3 -4
- package/template/components/product-wordmark.tsx +2 -1
- package/template/components/question-bank-client.tsx +5 -5
- package/template/components/question-bank-hub-client.tsx +1 -1
- package/template/components/question-bank-new-folder-sheet.tsx +2 -2
- package/template/components/question-bank-secondary-nav.tsx +3 -3
- package/template/components/question-bank-table.tsx +541 -431
- package/template/components/rotations-empty-state.tsx +50 -0
- package/template/components/rotations-panel-activator.tsx +8 -0
- package/template/components/settings-appearance-card.tsx +3 -4
- package/template/components/settings-client.tsx +15 -59
- package/template/components/settings-form-row.tsx +4 -9
- package/template/components/{app-sidebar-dynamic.tsx → sidebar/app-sidebar-dynamic.tsx} +1 -1
- package/template/components/{app-sidebar.tsx → sidebar/app-sidebar.tsx} +59 -74
- package/template/components/sidebar/index.ts +16 -0
- package/template/components/{secondary-nav.tsx → sidebar/secondary-nav.tsx} +2 -2
- package/template/components/{secondary-panel.tsx → sidebar/secondary-panel.tsx} +50 -7
- package/template/components/{sidebar-auto-collapse.tsx → sidebar/sidebar-auto-collapse.tsx} +6 -2
- package/template/components/{sidebar-shell.tsx → sidebar/sidebar-shell.tsx} +1 -1
- package/template/components/site-header.tsx +1 -1
- package/template/components/sites-board-view.tsx +67 -0
- package/template/components/sites-client.tsx +154 -0
- package/template/components/sites-table.tsx +249 -0
- package/template/components/table-properties/column-row.tsx +1 -90
- package/template/components/table-properties/draggable-list.ts +1 -49
- package/template/components/table-properties/drawer-button.tsx +1 -262
- package/template/components/table-properties/drawer.tsx +1 -1166
- package/template/components/table-properties/filter-card.tsx +1 -251
- package/template/components/table-properties/sort-card.tsx +1 -59
- package/template/components/table-properties/types.ts +28 -71
- package/template/components/team-board-view.tsx +122 -0
- package/template/components/team-client.tsx +100 -0
- package/template/components/team-page-header.tsx +92 -0
- package/template/components/team-table.tsx +553 -0
- package/template/components/templates/dedicated-search-landing-template.tsx +1 -124
- package/template/components/templates/dedicated-search-results-template.tsx +1 -19
- package/template/components/templates/list-page.tsx +1 -608
- package/template/components/templates/nested-secondary-panel-shell.tsx +1 -63
- package/template/components/templates/new-focus-template.tsx +659 -0
- package/template/components/templates/secondary-panel-hub-template.tsx +1 -1
- package/template/components/ui/accordion.tsx +1 -0
- package/template/components/ui/alert-dialog.tsx +1 -0
- package/template/components/ui/context-menu.tsx +1 -0
- package/template/components/ui/dot-pattern.tsx +1 -183
- package/template/components/ui/hover-card.tsx +1 -0
- package/template/components/ui/resizable.tsx +1 -68
- package/template/components/ui/scroll-area.tsx +1 -0
- package/template/components/ui/slider.tsx +1 -0
- package/template/docs/blueprints/README.md +86 -0
- package/template/docs/blueprints/_template.md +91 -0
- package/template/docs/blueprints/board-card.md +123 -0
- package/template/docs/blueprints/data-table.md +139 -0
- package/template/docs/blueprints/key-metrics.md +128 -0
- package/template/docs/blueprints/list-page-template.md +123 -0
- package/template/docs/blueprints/page-header.md +130 -0
- package/template/docs/command-menu-pattern.md +1 -1
- package/template/docs/component-selection-guide.md +224 -0
- package/template/docs/components-audit-2026-05.md +158 -0
- package/template/docs/data-views-pattern.md +17 -54
- package/template/docs/drawer-vs-dialog-pattern.md +1 -3
- package/template/docs/migrations/0001-brand-deep-alias-stabilization.md +95 -0
- package/template/docs/migrations/0002-exxat-token-namespace.md +154 -0
- package/template/docs/migrations/0003-globals-css-canonical.md +110 -0
- package/template/docs/migrations/README.md +100 -0
- package/template/docs/migrations/_template.md +64 -0
- package/template/docs/shell-surface-elevation-pattern.md +3 -5
- package/template/docs/token-taxonomy.md +416 -0
- package/template/eslint.config.mjs +27 -0
- package/template/hooks/use-secondary-panel-hub-nav.ts +1 -1
- package/template/lib/command-menu-config.ts +0 -1
- package/template/lib/command-menu-search-data.ts +27 -11
- package/template/lib/compliance-supported-views.ts +10 -0
- package/template/lib/conditional-rule-match.ts +6 -97
- package/template/lib/data-list-display-options.ts +1 -49
- package/template/lib/data-list-view-registry.ts +1 -104
- package/template/lib/data-list-view-surface.ts +1 -83
- package/template/lib/data-list-view.ts +1 -47
- package/template/lib/data-view-dashboard-placements-layout.ts +215 -0
- package/template/lib/data-view-dashboard-storage.ts +35 -38
- package/template/lib/dev-log.ts +1 -8
- package/template/lib/editable-target.ts +1 -10
- package/template/lib/list-page-table-properties.ts +1 -48
- package/template/lib/list-status-badges.ts +97 -4
- package/template/lib/mock/compliance-kpi.ts +61 -0
- package/template/lib/mock/compliance.ts +146 -0
- package/template/lib/mock/navigation.tsx +0 -9
- package/template/lib/mock/placements-kpi.ts +134 -0
- package/template/lib/mock/placements.ts +176 -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/placement-board-card-layout.ts +79 -0
- package/template/lib/placements-supported-views.ts +12 -0
- package/template/lib/question-bank-supported-views.ts +0 -1
- package/template/lib/raf-throttle.ts +1 -45
- package/template/lib/row-height.ts +4 -10
- package/template/lib/sidebar-state-cookie.ts +11 -2
- package/template/lib/sites-supported-views.ts +10 -0
- package/template/lib/table-state-lifecycle.ts +2 -2
- package/template/lib/team-supported-views.ts +10 -0
- package/template/package.json +1 -0
- package/template/tests/setup.ts +25 -0
- package/consumer-extras/AGENTS.md +0 -76
- package/consumer-extras/cursor-skills/exxat-consumer-app/SKILL.md +0 -37
- package/consumer-extras/cursor-skills/exxat-focused-workflow-page/SKILL.md +0 -57
- package/consumer-extras/patterns/consumer-app-pattern.md +0 -39
- package/consumer-extras/patterns/focused-workflow-page-pattern.md +0 -84
- package/src/components/ui/button-group.tsx +0 -81
- package/src/theme.css +0 -16
- package/src/tokens/README.md +0 -15
- package/src/tokens/base.css +0 -337
- package/src/tokens/high-contrast.css +0 -1195
- package/src/tokens/layers.css +0 -224
- package/src/tokens/tailwind-bridge.css +0 -118
- package/src/tokens/themes.css +0 -201
- package/template/app/(app)/data-list/layout.tsx +0 -43
- package/template/app/(app)/data-list/page.tsx +0 -10
- package/template/app/(app)/examples/focused-workflow/page.tsx +0 -5
- package/template/components/app-route-loading.tsx +0 -14
- package/template/components/dashboard-onboarding-gallery.tsx +0 -13
- package/template/components/dashboard-onboarding.tsx +0 -21
- package/template/components/data-views/list-page-calendar-view.tsx +0 -593
- package/template/components/data-views/list-page-folder-columns-panel.tsx +0 -345
- package/template/components/examples/focused-workflow-showcase.tsx +0 -183
- package/template/components/list-hub-board-view.tsx +0 -68
- package/template/components/list-hub-client.tsx +0 -186
- package/template/components/list-hub-list-view.tsx +0 -36
- package/template/components/list-hub-panel-activator.tsx +0 -8
- package/template/components/list-hub-secondary-nav.tsx +0 -121
- package/template/components/list-hub-table.tsx +0 -336
- package/template/components/question-bank-folder-columns-panel.tsx +0 -104
- package/template/components/question-bank-list-view.tsx +0 -53
- package/template/components/secondary-panel/nav-link-rows.tsx +0 -83
- package/template/components/secondary-panels/list-hub-panel.tsx +0 -39
- package/template/components/secondary-panels/question-bank-panel.tsx +0 -39
- package/template/components/secondary-panels/registry.tsx +0 -15
- package/template/components/section-cards.tsx +0 -106
- package/template/components/templates/focused-workflow-layouts.tsx +0 -448
- package/template/components/templates/focused-workflow-page-template.tsx +0 -69
- package/template/components/templates/page-loading-shell.tsx +0 -262
- package/template/components/ui/button-group.tsx +0 -1
- package/template/docs/consumer-app-pattern.md +0 -39
- package/template/docs/focused-workflow-page-pattern.md +0 -84
- package/template/lib/list-hub-nav.ts +0 -121
- package/template/lib/mock/list-hub-directory.ts +0 -27
- package/template/lib/mock/list-hub-kpi.ts +0 -27
- package/template/lib/page-loading-variant.ts +0 -40
- /package/template/components/{getting-started.tsx → onboarding/getting-started.tsx} +0 -0
- /package/template/components/{nav-documents.tsx → sidebar/nav-documents.tsx} +0 -0
- /package/template/components/{nav-main.tsx → sidebar/nav-main.tsx} +0 -0
- /package/template/components/{nav-secondary.tsx → sidebar/nav-secondary.tsx} +0 -0
- /package/template/components/{nav-user.tsx → sidebar/nav-user.tsx} +0 -0
- /package/template/components/{sidebar-auto-open.tsx → sidebar/sidebar-auto-open.tsx} +0 -0
|
@@ -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">
|
|
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
|
+
}
|
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Team roster — thin wrapper around the centralized `<HubTable>`. Owns only the column defs,
|
|
5
|
+
* panel-view helpers, dashboard layout state, and per-view renderers.
|
|
6
|
+
*
|
|
7
|
+
* Single dataset: `HubTable` runs one `useTableState` and every renderer (list, board, panel,
|
|
8
|
+
* dashboard) reads `state.rows` (filtered/sorted). KPIs and panel groups derive from those.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import * as React from "react"
|
|
12
|
+
import { useRouter } from "next/navigation"
|
|
13
|
+
import { AvatarInitials } from "@/components/ui/avatar"
|
|
14
|
+
import {
|
|
15
|
+
TEAM_MEMBER_STATUS_BADGE_CLASS,
|
|
16
|
+
TEAM_MEMBER_STATUS_ICON,
|
|
17
|
+
TEAM_MEMBER_STATUS_LABEL,
|
|
18
|
+
} from "@/lib/list-status-badges"
|
|
19
|
+
import { mailtoHref } from "@/lib/mailto"
|
|
20
|
+
import type { TeamMember } from "@/lib/mock/team"
|
|
21
|
+
import { DataTableToolbar } from "@/components/data-table"
|
|
22
|
+
import {
|
|
23
|
+
TeamDashboardChartsSection,
|
|
24
|
+
DEFAULT_TEAM_CHART_TYPES,
|
|
25
|
+
DEFAULT_TEAM_SPANS,
|
|
26
|
+
ALL_TEAM_DASHBOARD_CARDS,
|
|
27
|
+
loadTeamDashboardLayout,
|
|
28
|
+
mergeTeamDashboardLayout,
|
|
29
|
+
saveTeamDashboardLayout,
|
|
30
|
+
} from "@/components/data-view-dashboard-charts-team"
|
|
31
|
+
import { KEY_METRICS_KPI_COUNT_DEFAULT } from "@/lib/dashboard-layout-merge"
|
|
32
|
+
import type { ChartType, DashboardLayout } from "@/lib/data-view-dashboard-placements-layout"
|
|
33
|
+
import { ListPageBoardCard, ListPageBoardCardAvatar } from "@/components/data-views/list-page-board-card"
|
|
34
|
+
import { TeamBoardView, TEAM_BOARD_GROUP_OPTIONS } from "@/components/team-board-view"
|
|
35
|
+
import { FinderPanelView, type FinderGroup } from "@/components/data-views/finder-panel-view"
|
|
36
|
+
import { ListPageSplitHubChrome } from "@/components/data-views/list-page-split-hub-chrome"
|
|
37
|
+
import { teamKpiInsight, teamKpiMetrics } from "@/lib/mock/team-kpi"
|
|
38
|
+
import { cn } from "@/lib/utils"
|
|
39
|
+
import type { DataListViewType } from "@/lib/data-list-view"
|
|
40
|
+
import type { ColumnDef } from "@/components/data-table/types"
|
|
41
|
+
import { TablePropertiesDrawerButton } from "@/components/table-properties"
|
|
42
|
+
import {
|
|
43
|
+
HubTable,
|
|
44
|
+
type HubTableHandle,
|
|
45
|
+
type HubTableRenderers,
|
|
46
|
+
type HubTableRendererArgs,
|
|
47
|
+
} from "@/components/data-views"
|
|
48
|
+
import { TEAM_SUPPORTED_VIEWS } from "@/lib/team-supported-views"
|
|
49
|
+
import { ListHubStatusBadge } from "@/components/list-hub-status-badge"
|
|
50
|
+
import { Button } from "@/components/ui/button"
|
|
51
|
+
import {
|
|
52
|
+
DropdownMenu,
|
|
53
|
+
DropdownMenuContent,
|
|
54
|
+
DropdownMenuItem,
|
|
55
|
+
DropdownMenuTrigger,
|
|
56
|
+
} from "@/components/ui/dropdown-menu"
|
|
57
|
+
import { Tip } from "@/components/ui/tip"
|
|
58
|
+
import { CoachMark } from "@/components/ui/coach-mark"
|
|
59
|
+
import { useCoachMark } from "@/hooks/use-coach-mark"
|
|
60
|
+
import { DASHBOARD_CUSTOMIZE_COACH_STEPS } from "@/lib/dashboard-customize-coach-mark"
|
|
61
|
+
|
|
62
|
+
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
63
|
+
|
|
64
|
+
function uniqueRoles(members: TeamMember[]) {
|
|
65
|
+
return [...new Set(members.map(m => m.role))].sort().map(r => ({ value: r, label: r }))
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function formatUsPhoneDigits(digits: string) {
|
|
69
|
+
const d = digits.replace(/\D/g, "").slice(0, 10)
|
|
70
|
+
if (d.length !== 10) return digits
|
|
71
|
+
return `(${d.slice(0, 3)}) ${d.slice(3, 6)}-${d.slice(6)}`
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const STATUS_FILTER_OPTS = [
|
|
75
|
+
{ value: "active", label: TEAM_MEMBER_STATUS_LABEL.active },
|
|
76
|
+
{ value: "away", label: TEAM_MEMBER_STATUS_LABEL.away },
|
|
77
|
+
{ value: "invited", label: TEAM_MEMBER_STATUS_LABEL.invited },
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
const TEAM_STATUS_GROUPS: Array<{ id: string; label: string; accent: string }> = [
|
|
81
|
+
{ id: "all", label: "All", accent: "bg-muted-foreground" },
|
|
82
|
+
{ id: "active", label: "Active", accent: "bg-success" },
|
|
83
|
+
{ id: "away", label: "Away", accent: "bg-warning" },
|
|
84
|
+
{ id: "invited", label: "Invited", accent: "bg-brand" },
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
function buildTeamStatusGroups(members: TeamMember[]): FinderGroup[] {
|
|
88
|
+
return TEAM_STATUS_GROUPS.map(sg => ({
|
|
89
|
+
id: sg.id,
|
|
90
|
+
label: sg.label,
|
|
91
|
+
accent: sg.accent,
|
|
92
|
+
count: sg.id === "all" ? members.length : members.filter(m => m.status === sg.id).length,
|
|
93
|
+
}))
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ─── Team-specific panel view rows ───────────────────────────────────────────
|
|
97
|
+
|
|
98
|
+
function TeamFinderListRow({ member, isSelected }: { member: TeamMember; isSelected: boolean }) {
|
|
99
|
+
return (
|
|
100
|
+
<div
|
|
101
|
+
className={`flex w-full min-w-0 items-center gap-3 transition-colors duration-75 ${
|
|
102
|
+
isSelected ? "bg-transparent text-accent-foreground" : "text-foreground"
|
|
103
|
+
}`}
|
|
104
|
+
>
|
|
105
|
+
<AvatarInitials
|
|
106
|
+
initials={member.initials}
|
|
107
|
+
className={cn(
|
|
108
|
+
"size-8 shrink-0 rounded-full text-[11px] font-semibold",
|
|
109
|
+
isSelected ? "ring-2 ring-accent-foreground/35" : "",
|
|
110
|
+
)}
|
|
111
|
+
/>
|
|
112
|
+
<div className="min-w-0 flex-1">
|
|
113
|
+
<p className={cn("truncate text-[13px] font-medium leading-tight", isSelected ? "text-accent-foreground" : "text-foreground")}>
|
|
114
|
+
{member.name}
|
|
115
|
+
</p>
|
|
116
|
+
<p className={cn("mt-0.5 truncate text-[11px] leading-tight", isSelected ? "text-accent-foreground/80" : "text-muted-foreground")}>
|
|
117
|
+
{member.role}
|
|
118
|
+
</p>
|
|
119
|
+
</div>
|
|
120
|
+
{!isSelected && (
|
|
121
|
+
<ListHubStatusBadge
|
|
122
|
+
label={TEAM_MEMBER_STATUS_LABEL[member.status]}
|
|
123
|
+
tintClassName={TEAM_MEMBER_STATUS_BADGE_CLASS[member.status]}
|
|
124
|
+
icon={TEAM_MEMBER_STATUS_ICON[member.status]}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function TeamFinderDetail({ member }: { member: TeamMember }) {
|
|
132
|
+
const router = useRouter()
|
|
133
|
+
return (
|
|
134
|
+
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
|
|
135
|
+
<div className="flex shrink-0 items-start gap-4 border-b border-border px-5 py-4">
|
|
136
|
+
<AvatarInitials initials={member.initials} className="size-14 shrink-0 rounded-full text-lg font-semibold" />
|
|
137
|
+
<div className="min-w-0 flex-1">
|
|
138
|
+
<h2 className="text-base font-semibold text-foreground leading-tight">{member.name}</h2>
|
|
139
|
+
<p className="mt-0.5 text-[13px] text-muted-foreground">{member.role}</p>
|
|
140
|
+
<div className="mt-2">
|
|
141
|
+
<ListHubStatusBadge
|
|
142
|
+
label={TEAM_MEMBER_STATUS_LABEL[member.status]}
|
|
143
|
+
tintClassName={TEAM_MEMBER_STATUS_BADGE_CLASS[member.status]}
|
|
144
|
+
icon={TEAM_MEMBER_STATUS_ICON[member.status]}
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<Tip side="bottom" label="Open full profile">
|
|
149
|
+
<Button
|
|
150
|
+
type="button"
|
|
151
|
+
variant="outline"
|
|
152
|
+
size="sm"
|
|
153
|
+
className="shrink-0"
|
|
154
|
+
onClick={() => router.push(`/team/${member.id}`)}
|
|
155
|
+
aria-label={`Open full profile for ${member.name}`}
|
|
156
|
+
>
|
|
157
|
+
<i className="fa-light fa-arrow-up-right-from-square text-[12px]" aria-hidden="true" />
|
|
158
|
+
Open
|
|
159
|
+
</Button>
|
|
160
|
+
</Tip>
|
|
161
|
+
</div>
|
|
162
|
+
<div className="min-h-0 flex-1 overflow-y-auto px-5 py-4">
|
|
163
|
+
<dl className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
|
164
|
+
<div className="flex flex-col gap-0.5">
|
|
165
|
+
<dt className="text-[11px] font-medium uppercase tracking-wide text-muted-foreground flex items-center gap-1.5">
|
|
166
|
+
<i className="fa-light fa-envelope text-[10px]" aria-hidden="true" /> Email
|
|
167
|
+
</dt>
|
|
168
|
+
<dd className="text-[13px]">
|
|
169
|
+
<a href={mailtoHref(member.email)} className="text-interactive-foreground hover:underline">
|
|
170
|
+
{member.email}
|
|
171
|
+
</a>
|
|
172
|
+
</dd>
|
|
173
|
+
</div>
|
|
174
|
+
<div className="flex flex-col gap-0.5">
|
|
175
|
+
<dt className="text-[11px] font-medium uppercase tracking-wide text-muted-foreground flex items-center gap-1.5">
|
|
176
|
+
<i className="fa-light fa-briefcase text-[10px]" aria-hidden="true" /> Role
|
|
177
|
+
</dt>
|
|
178
|
+
<dd className="text-[13px] text-foreground">{member.role}</dd>
|
|
179
|
+
</div>
|
|
180
|
+
<div className="flex flex-col gap-0.5">
|
|
181
|
+
<dt className="text-[11px] font-medium uppercase tracking-wide text-muted-foreground flex items-center gap-1.5">
|
|
182
|
+
<i className="fa-light fa-phone text-[10px]" aria-hidden="true" /> Phone
|
|
183
|
+
</dt>
|
|
184
|
+
<dd className="text-[13px] text-foreground">{member.phone}</dd>
|
|
185
|
+
</div>
|
|
186
|
+
</dl>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// ─── Columns ─────────────────────────────────────────────────────────────────
|
|
193
|
+
|
|
194
|
+
function buildTeamColumns(members: TeamMember[]): ColumnDef<TeamMember>[] {
|
|
195
|
+
const roleOpts = uniqueRoles(members)
|
|
196
|
+
return [
|
|
197
|
+
{ key: "select", label: "", width: 40, minWidth: 40, defaultPin: "left", lockPin: true },
|
|
198
|
+
{
|
|
199
|
+
key: "name",
|
|
200
|
+
label: "Name",
|
|
201
|
+
width: 240,
|
|
202
|
+
minWidth: 160,
|
|
203
|
+
sortable: true,
|
|
204
|
+
sortKey: "name",
|
|
205
|
+
defaultPin: "left",
|
|
206
|
+
filter: { type: "text", icon: "fa-user", operators: ["contains", "not_contains"] },
|
|
207
|
+
cell: row => (
|
|
208
|
+
<div className="flex items-center gap-2.5 min-w-0">
|
|
209
|
+
<AvatarInitials initials={row.initials} className="size-8 shrink-0 text-xs" />
|
|
210
|
+
<span className="truncate text-sm font-medium text-foreground">{row.name}</span>
|
|
211
|
+
</div>
|
|
212
|
+
),
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
key: "role",
|
|
216
|
+
label: "Role",
|
|
217
|
+
width: 200,
|
|
218
|
+
minWidth: 140,
|
|
219
|
+
sortable: true,
|
|
220
|
+
sortKey: "role",
|
|
221
|
+
filter: { type: "select", icon: "fa-briefcase", operators: ["is", "is_not"], options: roleOpts },
|
|
222
|
+
cell: row => <span className="text-sm text-foreground/90">{row.role}</span>,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
key: "email",
|
|
226
|
+
label: "Email",
|
|
227
|
+
width: 260,
|
|
228
|
+
minWidth: 180,
|
|
229
|
+
sortable: true,
|
|
230
|
+
sortKey: "email",
|
|
231
|
+
filter: { type: "text", icon: "fa-envelope", operators: ["contains", "not_contains"] },
|
|
232
|
+
cell: row => (
|
|
233
|
+
<a href={mailtoHref(row.email)} className="text-sm text-primary hover:underline truncate block">
|
|
234
|
+
{row.email}
|
|
235
|
+
</a>
|
|
236
|
+
),
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
key: "phone",
|
|
240
|
+
label: "Phone",
|
|
241
|
+
width: 148,
|
|
242
|
+
minWidth: 132,
|
|
243
|
+
sortable: true,
|
|
244
|
+
sortKey: "phone",
|
|
245
|
+
filter: { type: "text", icon: "fa-phone", operators: ["contains", "not_contains"], textMask: "phone" },
|
|
246
|
+
cell: row => (
|
|
247
|
+
<a
|
|
248
|
+
href={`tel:+1${row.phone}`}
|
|
249
|
+
className="text-sm tabular-nums text-foreground/90 hover:text-primary hover:underline truncate block"
|
|
250
|
+
>
|
|
251
|
+
{formatUsPhoneDigits(row.phone)}
|
|
252
|
+
</a>
|
|
253
|
+
),
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
key: "status",
|
|
257
|
+
label: "Status",
|
|
258
|
+
width: 120,
|
|
259
|
+
minWidth: 100,
|
|
260
|
+
sortable: true,
|
|
261
|
+
sortKey: "status",
|
|
262
|
+
filter: { type: "select", icon: "fa-circle-dot", operators: ["is", "is_not"], options: STATUS_FILTER_OPTS },
|
|
263
|
+
cell: row => (
|
|
264
|
+
<ListHubStatusBadge
|
|
265
|
+
label={TEAM_MEMBER_STATUS_LABEL[row.status]}
|
|
266
|
+
tintClassName={TEAM_MEMBER_STATUS_BADGE_CLASS[row.status]}
|
|
267
|
+
icon={TEAM_MEMBER_STATUS_ICON[row.status]}
|
|
268
|
+
/>
|
|
269
|
+
),
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
key: "actions",
|
|
273
|
+
label: "",
|
|
274
|
+
width: 48,
|
|
275
|
+
minWidth: 48,
|
|
276
|
+
defaultPin: "right",
|
|
277
|
+
lockPin: true,
|
|
278
|
+
cell: row => (
|
|
279
|
+
<div className="flex items-center justify-center">
|
|
280
|
+
<DropdownMenu>
|
|
281
|
+
<DropdownMenuTrigger asChild>
|
|
282
|
+
<Button size="icon-sm" variant="ghost" aria-label={`Actions for ${row.name}`}>
|
|
283
|
+
<i className="fa-light fa-ellipsis text-sm" aria-hidden="true" />
|
|
284
|
+
</Button>
|
|
285
|
+
</DropdownMenuTrigger>
|
|
286
|
+
<DropdownMenuContent align="end">
|
|
287
|
+
<DropdownMenuItem onClick={() => window.open(mailtoHref(row.email))}>
|
|
288
|
+
<i className="fa-light fa-envelope" aria-hidden="true" />
|
|
289
|
+
Email
|
|
290
|
+
</DropdownMenuItem>
|
|
291
|
+
<DropdownMenuItem disabled>
|
|
292
|
+
<i className="fa-light fa-user-gear" aria-hidden="true" />
|
|
293
|
+
Manage access
|
|
294
|
+
</DropdownMenuItem>
|
|
295
|
+
</DropdownMenuContent>
|
|
296
|
+
</DropdownMenu>
|
|
297
|
+
</div>
|
|
298
|
+
),
|
|
299
|
+
},
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// ─── Dashboard body (split out so it can use hooks inside renderer closure) ─
|
|
304
|
+
|
|
305
|
+
interface TeamDashboardBodyProps {
|
|
306
|
+
args: HubTableRendererArgs<TeamMember>
|
|
307
|
+
columns: ColumnDef<TeamMember>[]
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function TeamDashboardBody({ args, columns }: TeamDashboardBodyProps) {
|
|
311
|
+
const { state, drawerToolbarProps, displayOptions } = args
|
|
312
|
+
const rows = state.rows as TeamMember[]
|
|
313
|
+
|
|
314
|
+
const dashboardKpi = React.useMemo(
|
|
315
|
+
() => ({ metrics: teamKpiMetrics(rows), insight: teamKpiInsight(rows) }),
|
|
316
|
+
[rows],
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
const [visibleCards, setVisibleCards] = React.useState<string[]>(() => ALL_TEAM_DASHBOARD_CARDS.map(c => c.id))
|
|
320
|
+
const [cardOrder, setCardOrder] = React.useState<string[]>(() => ALL_TEAM_DASHBOARD_CARDS.map(c => c.id))
|
|
321
|
+
const [cardSpans, setCardSpans] = React.useState<Record<string, 1 | 2>>(() => ({ ...DEFAULT_TEAM_SPANS }))
|
|
322
|
+
const [cardChartTypes, setCardChartTypes] = React.useState<Record<string, ChartType>>(() => ({ ...DEFAULT_TEAM_CHART_TYPES }))
|
|
323
|
+
const [kpiCount, setKpiCount] = React.useState<number>(KEY_METRICS_KPI_COUNT_DEFAULT)
|
|
324
|
+
const [layoutEdit, setLayoutEdit] = React.useState(false)
|
|
325
|
+
const hydrated = React.useRef(false)
|
|
326
|
+
const baselineRef = React.useRef<DashboardLayout | null>(null)
|
|
327
|
+
|
|
328
|
+
React.useEffect(() => {
|
|
329
|
+
const saved = loadTeamDashboardLayout()
|
|
330
|
+
const m = mergeTeamDashboardLayout(saved)
|
|
331
|
+
setVisibleCards(m.visible)
|
|
332
|
+
setCardOrder(m.order)
|
|
333
|
+
setCardSpans(m.spans ?? { ...DEFAULT_TEAM_SPANS })
|
|
334
|
+
setCardChartTypes(m.chartTypes ?? { ...DEFAULT_TEAM_CHART_TYPES })
|
|
335
|
+
setKpiCount(m.keyMetricsKpiCount ?? KEY_METRICS_KPI_COUNT_DEFAULT)
|
|
336
|
+
hydrated.current = true
|
|
337
|
+
}, [])
|
|
338
|
+
|
|
339
|
+
React.useEffect(() => {
|
|
340
|
+
if (!hydrated.current) return
|
|
341
|
+
saveTeamDashboardLayout({
|
|
342
|
+
visible: visibleCards,
|
|
343
|
+
order: cardOrder,
|
|
344
|
+
spans: cardSpans,
|
|
345
|
+
chartTypes: cardChartTypes,
|
|
346
|
+
keyMetricsKpiCount: kpiCount,
|
|
347
|
+
})
|
|
348
|
+
}, [visibleCards, cardOrder, cardSpans, cardChartTypes, kpiCount])
|
|
349
|
+
|
|
350
|
+
const onResetLayout = React.useCallback(() => {
|
|
351
|
+
setVisibleCards(ALL_TEAM_DASHBOARD_CARDS.map(c => c.id))
|
|
352
|
+
setCardOrder(ALL_TEAM_DASHBOARD_CARDS.map(c => c.id))
|
|
353
|
+
setCardSpans({ ...DEFAULT_TEAM_SPANS })
|
|
354
|
+
setCardChartTypes({ ...DEFAULT_TEAM_CHART_TYPES })
|
|
355
|
+
setKpiCount(KEY_METRICS_KPI_COUNT_DEFAULT)
|
|
356
|
+
}, [])
|
|
357
|
+
|
|
358
|
+
const onLayoutEditStart = React.useCallback(() => {
|
|
359
|
+
baselineRef.current = {
|
|
360
|
+
visible: [...visibleCards],
|
|
361
|
+
order: [...cardOrder],
|
|
362
|
+
spans: { ...cardSpans },
|
|
363
|
+
chartTypes: { ...cardChartTypes },
|
|
364
|
+
keyMetricsKpiCount: kpiCount,
|
|
365
|
+
}
|
|
366
|
+
setLayoutEdit(true)
|
|
367
|
+
}, [visibleCards, cardOrder, cardSpans, cardChartTypes, kpiCount])
|
|
368
|
+
|
|
369
|
+
const onLayoutEditCancel = React.useCallback(() => {
|
|
370
|
+
const b = baselineRef.current
|
|
371
|
+
if (b) {
|
|
372
|
+
setVisibleCards(b.visible)
|
|
373
|
+
setCardOrder(b.order)
|
|
374
|
+
setCardSpans(b.spans ?? { ...DEFAULT_TEAM_SPANS })
|
|
375
|
+
setCardChartTypes(b.chartTypes ?? { ...DEFAULT_TEAM_CHART_TYPES })
|
|
376
|
+
setKpiCount(b.keyMetricsKpiCount ?? KEY_METRICS_KPI_COUNT_DEFAULT)
|
|
377
|
+
}
|
|
378
|
+
setLayoutEdit(false)
|
|
379
|
+
}, [])
|
|
380
|
+
|
|
381
|
+
const coach = useCoachMark({
|
|
382
|
+
flowId: "team-dashboard-customize",
|
|
383
|
+
steps: DASHBOARD_CUSTOMIZE_COACH_STEPS,
|
|
384
|
+
delay: 700,
|
|
385
|
+
enabled: true,
|
|
386
|
+
})
|
|
387
|
+
|
|
388
|
+
return (
|
|
389
|
+
<div className="flex min-h-0 flex-1 flex-col">
|
|
390
|
+
<CoachMark state={coach} />
|
|
391
|
+
{!layoutEdit ? (
|
|
392
|
+
<DataTableToolbar
|
|
393
|
+
state={state}
|
|
394
|
+
columns={columns}
|
|
395
|
+
searchable={displayOptions.showToolbarSearch}
|
|
396
|
+
searchAriaLabel="Search team members"
|
|
397
|
+
toolbarSlot={s => (
|
|
398
|
+
<TablePropertiesDrawerButton
|
|
399
|
+
{...drawerToolbarProps}
|
|
400
|
+
state={s}
|
|
401
|
+
extraActions={
|
|
402
|
+
<Tip side="bottom" label="Edit dashboard layout on canvas">
|
|
403
|
+
<Button
|
|
404
|
+
type="button"
|
|
405
|
+
variant="ghost"
|
|
406
|
+
size="icon-sm"
|
|
407
|
+
aria-label="Edit dashboard layout"
|
|
408
|
+
onClick={onLayoutEditStart}
|
|
409
|
+
className="text-muted-foreground hover:text-interactive-hover-foreground hover:bg-interactive-hover"
|
|
410
|
+
>
|
|
411
|
+
<i className="fa-light fa-pen-ruler text-[13px]" aria-hidden="true" />
|
|
412
|
+
</Button>
|
|
413
|
+
</Tip>
|
|
414
|
+
}
|
|
415
|
+
/>
|
|
416
|
+
)}
|
|
417
|
+
/>
|
|
418
|
+
) : null}
|
|
419
|
+
<TeamDashboardChartsSection
|
|
420
|
+
members={rows}
|
|
421
|
+
keyMetrics={dashboardKpi}
|
|
422
|
+
visibleCards={visibleCards}
|
|
423
|
+
cardOrder={cardOrder}
|
|
424
|
+
cardSpans={cardSpans}
|
|
425
|
+
cardChartTypes={cardChartTypes}
|
|
426
|
+
keyMetricsKpiCount={kpiCount}
|
|
427
|
+
layoutEditMode={layoutEdit}
|
|
428
|
+
onVisibleChange={setVisibleCards}
|
|
429
|
+
onOrderChange={setCardOrder}
|
|
430
|
+
onSpanChange={(id, span) => setCardSpans(prev => ({ ...prev, [id]: span }))}
|
|
431
|
+
onChartTypeChange={(id, t) => setCardChartTypes(prev => ({ ...prev, [id]: t }))}
|
|
432
|
+
onKeyMetricsKpiCountChange={setKpiCount}
|
|
433
|
+
onResetLayout={onResetLayout}
|
|
434
|
+
onLayoutEditDone={() => setLayoutEdit(false)}
|
|
435
|
+
onLayoutEditCancel={onLayoutEditCancel}
|
|
436
|
+
/>
|
|
437
|
+
</div>
|
|
438
|
+
)
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// ─── Public component ───────────────────────────────────────────────────────
|
|
442
|
+
|
|
443
|
+
export type TeamTableHandle = HubTableHandle
|
|
444
|
+
|
|
445
|
+
export const TeamTable = React.forwardRef<
|
|
446
|
+
TeamTableHandle,
|
|
447
|
+
{ members: TeamMember[]; view?: DataListViewType; onViewChange?: (v: DataListViewType) => void }
|
|
448
|
+
>(function TeamTable({ members, view = "table", onViewChange }, ref) {
|
|
449
|
+
const columns = React.useMemo(() => buildTeamColumns(members), [members])
|
|
450
|
+
|
|
451
|
+
const renderers: HubTableRenderers<TeamMember> = {
|
|
452
|
+
"board-with-toolbar": ({ state, toolbarShell, displayOptions }) => {
|
|
453
|
+
const boardGroupKey = TEAM_BOARD_GROUP_OPTIONS.some(
|
|
454
|
+
o => o.key === displayOptions.boardGroupByColumnKey,
|
|
455
|
+
)
|
|
456
|
+
? displayOptions.boardGroupByColumnKey
|
|
457
|
+
: "status"
|
|
458
|
+
return toolbarShell(
|
|
459
|
+
<TeamBoardView
|
|
460
|
+
members={state.rows as TeamMember[]}
|
|
461
|
+
groupByColumnKey={boardGroupKey}
|
|
462
|
+
onRowActivate={m => state.toggleRow(m.id)}
|
|
463
|
+
/>,
|
|
464
|
+
)
|
|
465
|
+
},
|
|
466
|
+
"panel-with-toolbar": ({ state, toolbarShell }) => {
|
|
467
|
+
const groups = buildTeamStatusGroups(state.rows as TeamMember[])
|
|
468
|
+
return toolbarShell(
|
|
469
|
+
<ListPageSplitHubChrome aria-label="Team members panel view">
|
|
470
|
+
<FinderPanelView<TeamMember>
|
|
471
|
+
embedded
|
|
472
|
+
groupsColumnTitle="Status"
|
|
473
|
+
groups={groups}
|
|
474
|
+
rows={state.rows as TeamMember[]}
|
|
475
|
+
getRowId={r => r.id}
|
|
476
|
+
getRowGroupId={r => r.status}
|
|
477
|
+
defaultGroupId="all"
|
|
478
|
+
autoSaveId="team-panel-view"
|
|
479
|
+
ariaLabel="Team members panel view"
|
|
480
|
+
emptyList={<p>No team members found</p>}
|
|
481
|
+
renderListRow={(member, isSelected) => (
|
|
482
|
+
<TeamFinderListRow member={member} isSelected={isSelected} />
|
|
483
|
+
)}
|
|
484
|
+
renderDetail={member => <TeamFinderDetail member={member} />}
|
|
485
|
+
/>
|
|
486
|
+
</ListPageSplitHubChrome>,
|
|
487
|
+
)
|
|
488
|
+
},
|
|
489
|
+
"dashboard-with-toolbar": (args) => <TeamDashboardBody args={args} columns={columns} />,
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
return (
|
|
493
|
+
<HubTable<TeamMember>
|
|
494
|
+
rows={members}
|
|
495
|
+
columns={columns}
|
|
496
|
+
view={view}
|
|
497
|
+
onViewChange={onViewChange}
|
|
498
|
+
supportedViewTypes={TEAM_SUPPORTED_VIEWS}
|
|
499
|
+
hubLabel="Team"
|
|
500
|
+
lifecycleTabLabel="Team"
|
|
501
|
+
searchAriaLabel="Search team members"
|
|
502
|
+
getRowId={row => row.id}
|
|
503
|
+
getRowSelectionLabel={row => row.name}
|
|
504
|
+
defaultSort={{ key: "name", dir: "asc" }}
|
|
505
|
+
emptyState={<p className="text-sm text-muted-foreground">No team members.</p>}
|
|
506
|
+
boardGroupByColumnOptions={[...TEAM_BOARD_GROUP_OPTIONS]}
|
|
507
|
+
listAriaLabel="Team members"
|
|
508
|
+
listEmptyState="No team members match your filters."
|
|
509
|
+
renderListRow={member => (
|
|
510
|
+
<ListPageBoardCard
|
|
511
|
+
layout="row"
|
|
512
|
+
rowContainerClassName="flex flex-row items-center gap-3"
|
|
513
|
+
leading={<ListPageBoardCardAvatar initials={member.initials} className="size-9" />}
|
|
514
|
+
rowEnd={
|
|
515
|
+
<div className="flex shrink-0 items-center gap-2">
|
|
516
|
+
<ListHubStatusBadge
|
|
517
|
+
surface="board"
|
|
518
|
+
label={TEAM_MEMBER_STATUS_LABEL[member.status]}
|
|
519
|
+
tintClassName={TEAM_MEMBER_STATUS_BADGE_CLASS[member.status]}
|
|
520
|
+
icon={TEAM_MEMBER_STATUS_ICON[member.status]}
|
|
521
|
+
/>
|
|
522
|
+
<i className="fa-light fa-chevron-right text-xs text-muted-foreground" aria-hidden="true" />
|
|
523
|
+
</div>
|
|
524
|
+
}
|
|
525
|
+
>
|
|
526
|
+
<div className="space-y-0.5">
|
|
527
|
+
<p className="truncate text-sm font-semibold text-foreground">{member.name}</p>
|
|
528
|
+
<p className="text-xs text-muted-foreground">{member.role}</p>
|
|
529
|
+
<p className="truncate text-xs text-muted-foreground">{member.email}</p>
|
|
530
|
+
</div>
|
|
531
|
+
</ListPageBoardCard>
|
|
532
|
+
)}
|
|
533
|
+
bulkActionsSlot={selected => {
|
|
534
|
+
if (selected.size === 0) return null
|
|
535
|
+
return (
|
|
536
|
+
<>
|
|
537
|
+
<span className="sr-only">{selected.size} selected</span>
|
|
538
|
+
<Tip label="Export selection (demo)">
|
|
539
|
+
<Button size="sm" variant="outline" type="button">
|
|
540
|
+
<i className="fa-light fa-arrow-down-to-line" aria-hidden="true" />
|
|
541
|
+
Export
|
|
542
|
+
</Button>
|
|
543
|
+
</Tip>
|
|
544
|
+
</>
|
|
545
|
+
)
|
|
546
|
+
}}
|
|
547
|
+
renderers={renderers}
|
|
548
|
+
handleRef={ref}
|
|
549
|
+
/>
|
|
550
|
+
)
|
|
551
|
+
})
|
|
552
|
+
|
|
553
|
+
TeamTable.displayName = "TeamTable"
|