@exxatdesignux/ui 0.2.19 → 0.4.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 +662 -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 +43 -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-library-hub-header.mdc +28 -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-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 +3 -3
- package/consumer-extras/cursor-skills/exxat-centralized-list-dataset/SKILL.md +5 -16
- package/consumer-extras/cursor-skills/exxat-collaboration-access/SKILL.md +3 -3
- package/consumer-extras/cursor-skills/exxat-dedicated-search-surfaces/SKILL.md +2 -2
- package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +19 -34
- package/consumer-extras/cursor-skills/exxat-ds-skill/references/data-table-pattern.md +1 -1
- package/consumer-extras/cursor-skills/exxat-kpi-flat-band/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-list-page-view-shells/SKILL.md +1 -1
- package/consumer-extras/cursor-skills/exxat-mono-ids/SKILL.md +4 -4
- package/consumer-extras/cursor-skills/exxat-primary-nav-secondary-panel/SKILL.md +10 -12
- package/consumer-extras/cursor-skills/exxat-token-economy/SKILL.md +277 -0
- package/consumer-extras/handbook/HANDBOOK.md +187 -0
- package/consumer-extras/handbook/glossary.md +58 -0
- package/consumer-extras/handbook/reference-implementations.md +153 -0
- package/consumer-extras/handbook/voice-and-tone.md +262 -0
- package/consumer-extras/patterns/collaboration-access-pattern.md +7 -7
- 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 +31 -66
- package/consumer-extras/patterns/kpi-flat-band-pattern.md +2 -2
- 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 +173 -0
- package/dist/components/data-views/hub-table.js +5783 -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 +6797 -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 +13421 -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 +259 -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 +606 -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/.claude/skills/exxat-ds-skill/SKILL.md +8 -7
- package/template/.cursor/rules/exxat-accessibility.mdc +1 -1
- package/template/.cursor/rules/exxat-command-menu.mdc +2 -2
- package/template/.cursor/rules/exxat-dashboard-view-charts.mdc +7 -7
- package/template/.cursor/rules/exxat-data-tables.mdc +3 -3
- package/template/.cursor/rules/exxat-ds-agents.mdc +2 -2
- package/template/.cursor/rules/exxat-kbd-shortcuts.mdc +7 -7
- package/template/.cursor/rules/exxat-mono-ids.mdc +1 -1
- package/template/.cursor/rules/exxat-page-vs-drawer.mdc +1 -1
- package/template/.cursor/rules/exxat-table-properties-drawer.mdc +1 -1
- package/template/AGENTS.md +135 -103
- package/template/app/(app)/columns/page.tsx +11 -0
- package/template/app/(app)/dashboard/loading.tsx +15 -3
- package/template/app/(app)/dashboard/page.tsx +14 -2
- package/template/app/(app)/layout.tsx +17 -4
- package/template/app/(app)/library/all/page.tsx +11 -0
- package/template/app/(app)/library/find/page.tsx +12 -0
- package/template/app/(app)/{question-bank → library}/layout.tsx +17 -17
- package/template/app/(app)/library/list/page.tsx +12 -0
- package/template/app/(app)/library/new/page.tsx +45 -0
- package/template/app/(app)/library/page.tsx +11 -0
- package/template/app/(app)/loading.tsx +18 -1
- package/template/app/(app)/settings/page.tsx +5 -4
- package/template/app/(app)/tokens-themes/page.tsx +11 -0
- package/template/app/globals.css +14 -16
- package/template/components/ask-leo-composer.tsx +2 -2
- 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/columns-client.tsx +158 -0
- package/template/components/columns-showcase.tsx +541 -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-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 +77 -38
- package/template/components/data-views/{question-bank-folder-tree-branch.tsx → library-folder-tree-branch.tsx} +19 -19
- 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/data-views/table-cells.tsx +673 -0
- 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/folder-details-shell.tsx +11 -11
- package/template/components/hub-tree-panel-view.tsx +26 -26
- 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/{question-bank-board-view.tsx → library-board-view.tsx} +44 -44
- package/template/components/{question-bank-client.tsx → library-client.tsx} +83 -83
- package/template/components/{question-bank-dashboard-charts.tsx → library-dashboard-charts.tsx} +14 -14
- package/template/components/{question-bank-favorite-button.tsx → library-favorite-button.tsx} +7 -7
- package/template/components/{question-bank-hub-client.tsx → library-hub-client.tsx} +44 -44
- package/template/components/{question-bank-new-folder-sheet.tsx → library-new-folder-sheet.tsx} +16 -16
- package/template/components/{question-bank-os-folder-view.tsx → library-os-folder-view.tsx} +31 -31
- package/template/components/{question-bank-page-header.tsx → library-page-header.tsx} +6 -6
- package/template/components/library-panel-activator.tsx +8 -0
- package/template/components/{question-bank-secondary-nav.tsx → library-secondary-nav.tsx} +63 -63
- package/template/components/library-table.tsx +839 -0
- package/template/components/list-hub-status-badge.tsx +2 -2
- package/template/components/{new-question-composer.tsx → new-library-item-form.tsx} +489 -441
- 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/product-switcher.tsx +3 -4
- package/template/components/product-wordmark.tsx +2 -1
- 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} +114 -73
- package/template/components/sidebar/index.ts +16 -0
- package/template/components/{secondary-nav.tsx → sidebar/secondary-nav.tsx} +2 -2
- package/template/components/sidebar/secondary-panel.tsx +316 -0
- package/template/components/sidebar/sidebar-auto-collapse.tsx +27 -0
- package/template/components/{sidebar-auto-open.tsx → sidebar/sidebar-auto-open.tsx} +2 -1
- package/template/components/{sidebar-shell.tsx → sidebar/sidebar-shell.tsx} +1 -1
- package/template/components/site-header.tsx +1 -1
- 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/templates/dedicated-search-landing-template.tsx +1 -124
- package/template/components/templates/dedicated-search-results-template.tsx +1 -19
- package/template/components/templates/discovery-hub-template.tsx +1 -1
- 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 +2 -2
- package/template/components/tokens-secondary-nav.tsx +192 -0
- package/template/components/tokens-themes-client.tsx +476 -0
- package/template/components/tokens-themes-section.tsx +386 -0
- 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/HANDBOOK.md +187 -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/collaboration-access-pattern.md +7 -7
- 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 +31 -66
- package/template/docs/drawer-vs-dialog-pattern.md +1 -3
- package/template/docs/glossary.md +58 -0
- package/template/docs/kpi-flat-band-pattern.md +3 -3
- package/template/docs/kpi-trend-pattern.md +18 -3
- package/template/docs/large-dataset-strategy.md +155 -0
- package/template/docs/library-hub-header-pattern.md +25 -0
- 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/reference-implementations.md +151 -0
- package/template/docs/shell-surface-elevation-pattern.md +3 -5
- package/template/docs/token-taxonomy.md +416 -0
- package/template/docs/voice-and-tone.md +262 -0
- package/template/eslint.config.mjs +27 -0
- package/template/hooks/use-secondary-panel-hub-nav.ts +11 -11
- package/template/lib/ask-leo-route-context.ts +6 -18
- package/template/lib/coach-mark-registry.ts +0 -16
- package/template/lib/command-menu-config.ts +5 -13
- package/template/lib/command-menu-search-data.ts +8 -23
- 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-storage.ts +35 -38
- package/template/lib/dev-log.ts +1 -8
- package/template/lib/editable-target.ts +1 -10
- package/template/lib/{question-bank-authoring.ts → library-authoring.ts} +89 -88
- package/template/lib/library-dedicated-search.ts +19 -0
- package/template/lib/library-hub-search.ts +90 -0
- package/template/lib/library-nav.ts +477 -0
- package/template/lib/library-recent-searches.ts +22 -0
- package/template/lib/{question-bank-supported-views.ts → library-supported-views.ts} +2 -3
- package/template/lib/list-page-table-properties.ts +1 -48
- package/template/lib/list-status-badges.ts +16 -11
- package/template/lib/mock/dashboard.ts +1 -1
- package/template/lib/mock/{question-bank-folders.ts → library-folders.ts} +30 -30
- package/template/lib/mock/library-header-collaborators.ts +54 -0
- package/template/lib/mock/{question-bank-inspector.ts → library-inspector.ts} +29 -29
- package/template/lib/mock/{question-bank-kpi.ts → library-kpi.ts} +20 -20
- package/template/lib/mock/library.ts +249 -0
- package/template/lib/mock/navigation.tsx +32 -35
- 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/table-state-lifecycle.ts +3 -3
- package/template/next.config.mjs +7 -4
- 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/app/(app)/examples/page.tsx +0 -43
- package/template/app/(app)/question-bank/find/page.tsx +0 -13
- package/template/app/(app)/question-bank/library/page.tsx +0 -12
- package/template/app/(app)/question-bank/list/page.tsx +0 -13
- package/template/app/(app)/question-bank/new/page.tsx +0 -50
- package/template/app/(app)/question-bank/page.tsx +0 -12
- 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/question-bank-panel-activator.tsx +0 -8
- package/template/components/question-bank-table.tsx +0 -729
- package/template/components/secondary-panel/nav-link-rows.tsx +0 -83
- package/template/components/secondary-panel.tsx +0 -220
- 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/sidebar-auto-collapse.tsx +0 -23
- 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/docs/question-bank-hub-header-pattern.md +0 -25
- 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/mock/question-bank-header-collaborators.ts +0 -54
- package/template/lib/mock/question-bank.ts +0 -249
- package/template/lib/page-loading-variant.ts +0 -40
- package/template/lib/question-bank-dedicated-search.ts +0 -19
- package/template/lib/question-bank-hub-search.ts +0 -90
- package/template/lib/question-bank-nav.ts +0 -477
- package/template/lib/question-bank-recent-searches.ts +0 -22
- /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/src/globals.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ambient declarations for `@exxatdesignux/ui`.
|
|
3
|
+
*
|
|
4
|
+
* We avoid taking a dependency on `@types/node` (the package is a browser /
|
|
5
|
+
* RSC library, not a Node API consumer) but a handful of patterns still want
|
|
6
|
+
* to check `process.env.NODE_ENV` to gate dev-mode `console.warn` calls
|
|
7
|
+
* (same pattern as React, Radix UI, Chakra UI). Declare just the slice we
|
|
8
|
+
* touch so TypeScript stays happy without pulling in the whole Node typings.
|
|
9
|
+
*
|
|
10
|
+
* Both bundlers (tsup / esbuild, Webpack, Vite, Turbopack) and Next.js's RSC
|
|
11
|
+
* compiler statically replace `process.env.NODE_ENV` at build time with the
|
|
12
|
+
* configured environment string (`"development"` / `"production"`), so this
|
|
13
|
+
* declaration only affects type-checking — not runtime.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
declare const process: {
|
|
17
|
+
readonly env: {
|
|
18
|
+
readonly NODE_ENV?: "development" | "production" | "test" | string
|
|
19
|
+
}
|
|
20
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,57 @@
|
|
|
1
|
+
// Data table (multi-file primitive)
|
|
2
|
+
// Use subpath imports (`@exxatdesignux/ui/components/data-table/*`) when
|
|
3
|
+
// you only need one file from this group — the barrel pulls the whole
|
|
4
|
+
// DataTable surface in for any consumer of the main `@exxatdesignux/ui`
|
|
5
|
+
// entry.
|
|
6
|
+
export * from "./components/data-table"
|
|
7
|
+
export * from "./components/data-table/types"
|
|
8
|
+
export * from "./components/data-table/use-table-state"
|
|
9
|
+
export * from "./components/data-table/pagination"
|
|
10
|
+
export * from "./components/data-table/filter-date-calendar"
|
|
11
|
+
export * from "./components/data-table/filter-text-value-input"
|
|
12
|
+
|
|
13
|
+
// Data views (list-page view bodies + binding layer)
|
|
14
|
+
// `HubTable<TRow>` is the binding layer: pass columns + rows + a renderers
|
|
15
|
+
// map, get a complete list-page hub body for every supported view tab.
|
|
16
|
+
// Subpath imports: `@exxatdesignux/ui/components/data-views/<file>` for
|
|
17
|
+
// individual modules.
|
|
18
|
+
export * from "./components/data-views"
|
|
19
|
+
|
|
20
|
+
// Templates (page-scale compositions: list page, dedicated-search shells, nested secondary panel).
|
|
21
|
+
// Composition-aware shells that mount product-specific chrome (PrimaryPageTemplate,
|
|
22
|
+
// SecondaryPanelHubTemplate, DiscoveryHubTemplate, NewFocusTemplate) stay in the app.
|
|
23
|
+
export * from "./components/templates"
|
|
24
|
+
|
|
25
|
+
// Table properties (drawer + button + sort/filter/column rows)
|
|
26
|
+
// Sibling to `data-table`; consumes the same `useTableState` row shape.
|
|
27
|
+
// Use the subpath `@exxatdesignux/ui/components/table-properties` for
|
|
28
|
+
// the full barrel, or individual file paths for tree-shakable imports.
|
|
29
|
+
export {
|
|
30
|
+
TablePropertiesDrawer,
|
|
31
|
+
TablePropertiesDrawerButton,
|
|
32
|
+
DrawerFilterCard,
|
|
33
|
+
DrawerSortCard,
|
|
34
|
+
ColumnRow,
|
|
35
|
+
useDraggableList,
|
|
36
|
+
createListPageEditViewHandler,
|
|
37
|
+
isDataListSurfaceViewType,
|
|
38
|
+
type TablePropertiesDrawerProps,
|
|
39
|
+
type TablePropertiesDrawerButtonProps,
|
|
40
|
+
type TablePropertiesDrawerButtonState,
|
|
41
|
+
type DrawerSortCardProps,
|
|
42
|
+
type OpenTablePropertiesHandle,
|
|
43
|
+
} from "./components/table-properties"
|
|
44
|
+
|
|
45
|
+
// Shared list-page / data-list lib
|
|
46
|
+
export * from "./lib/list-page-table-properties"
|
|
47
|
+
export * from "./lib/data-list-view"
|
|
48
|
+
export * from "./lib/data-list-view-registry"
|
|
49
|
+
export * from "./lib/data-list-view-surface"
|
|
50
|
+
export * from "./lib/data-list-display-options"
|
|
51
|
+
|
|
1
52
|
// Components
|
|
53
|
+
export * from "./components/ui/accordion"
|
|
54
|
+
export * from "./components/ui/alert-dialog"
|
|
2
55
|
export * from "./components/ui/avatar"
|
|
3
56
|
export * from "./components/ui/badge"
|
|
4
57
|
export * from "./components/ui/banner"
|
|
@@ -11,11 +64,14 @@ export * from "./components/ui/checkbox"
|
|
|
11
64
|
export * from "./components/ui/coach-mark"
|
|
12
65
|
export * from "./components/ui/collapsible"
|
|
13
66
|
export * from "./components/ui/command"
|
|
67
|
+
export * from "./components/ui/context-menu"
|
|
14
68
|
export * from "./components/ui/date-picker-field"
|
|
15
69
|
export * from "./components/ui/dialog"
|
|
16
70
|
export * from "./components/ui/drag-handle-grip"
|
|
17
71
|
export * from "./components/ui/drawer"
|
|
18
72
|
export * from "./components/ui/dropdown-menu"
|
|
73
|
+
export * from "./components/ui/export-drawer"
|
|
74
|
+
export * from "./components/ui/hover-card"
|
|
19
75
|
export * from "./components/ui/field"
|
|
20
76
|
export * from "./components/ui/form"
|
|
21
77
|
export * from "./components/ui/input-group"
|
|
@@ -23,15 +79,20 @@ export * from "./components/ui/input"
|
|
|
23
79
|
export * from "./components/ui/input-mask"
|
|
24
80
|
export * from "./components/ui/payment-card-fields"
|
|
25
81
|
export * from "./components/ui/kbd"
|
|
82
|
+
export * from "./components/ui/key-metrics"
|
|
26
83
|
export * from "./components/ui/label"
|
|
84
|
+
export * from "./components/ui/list-page-view-frame"
|
|
85
|
+
export * from "./components/ui/page-header"
|
|
27
86
|
export * from "./components/ui/popover"
|
|
28
87
|
export * from "./components/ui/radio-group"
|
|
88
|
+
export * from "./components/ui/scroll-area"
|
|
29
89
|
export * from "./components/ui/select"
|
|
30
90
|
export * from "./components/ui/selection-tile-grid"
|
|
31
91
|
export * from "./components/ui/separator"
|
|
32
92
|
export * from "./components/ui/sheet"
|
|
33
93
|
export * from "./components/ui/sidebar"
|
|
34
94
|
export * from "./components/ui/skeleton"
|
|
95
|
+
export * from "./components/ui/slider"
|
|
35
96
|
export * from "./components/ui/sonner"
|
|
36
97
|
export * from "./components/ui/status-badge"
|
|
37
98
|
export * from "./components/ui/table"
|
|
@@ -51,6 +112,12 @@ export * from "./hooks/use-mobile"
|
|
|
51
112
|
export * from "./hooks/use-mod-key-label"
|
|
52
113
|
|
|
53
114
|
// Utilities
|
|
115
|
+
export * from "./lib/conditional-rule-match"
|
|
116
|
+
export * from "./lib/date-filter"
|
|
117
|
+
export * from "./lib/dev-log"
|
|
54
118
|
export * from "./lib/dropdown-menu-surface"
|
|
119
|
+
export * from "./lib/editable-target"
|
|
120
|
+
export * from "./lib/raf-throttle"
|
|
121
|
+
export * from "./lib/row-height"
|
|
122
|
+
export * from "./lib/table-properties-types"
|
|
55
123
|
export * from "./lib/utils"
|
|
56
|
-
export * from "./lib/date-filter"
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ConditionalRule,
|
|
3
|
+
FilterTextMask,
|
|
4
|
+
} from "./table-properties-types"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Conditional-formatting matchers shared by `DataTable` cells,
|
|
8
|
+
* `data-row-list` rows, and board card backgrounds. Keeping the logic
|
|
9
|
+
* here ensures the table grid and the list / board derivatives all
|
|
10
|
+
* paint the same row with the same rule (no UI drift between views).
|
|
11
|
+
*
|
|
12
|
+
* `columns` is optional and only used when the consumer needs to:
|
|
13
|
+
* - read from a different row key than the rule's `fieldKey`
|
|
14
|
+
* (`sortKey`-aliased columns), or
|
|
15
|
+
* - apply a `textMask` (phone / zip) so "contains 555" matches the
|
|
16
|
+
* raw digits of "(415) 555-0100".
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export type ConditionalColumnHint = {
|
|
20
|
+
key: string
|
|
21
|
+
sortKey?: string
|
|
22
|
+
filter?: { type?: string; textMask?: FilterTextMask }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function rowValueForRule<T extends Record<string, unknown>>(
|
|
26
|
+
row: T,
|
|
27
|
+
rule: ConditionalRule,
|
|
28
|
+
columns?: ConditionalColumnHint[],
|
|
29
|
+
): string {
|
|
30
|
+
const col = columns?.find((c) => c.key === rule.fieldKey)
|
|
31
|
+
const dataKey = (col?.sortKey ?? rule.fieldKey) as keyof T
|
|
32
|
+
return String(row[dataKey] ?? "")
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function ruleHasActiveValues(
|
|
36
|
+
rule: ConditionalRule,
|
|
37
|
+
columns?: ConditionalColumnHint[],
|
|
38
|
+
): boolean {
|
|
39
|
+
if (rule.values.length === 0) return false
|
|
40
|
+
const col = columns?.find((c) => c.key === rule.fieldKey)
|
|
41
|
+
if (col?.filter?.type === "text")
|
|
42
|
+
return (rule.values[0] ?? "").trim().length > 0
|
|
43
|
+
return true
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function conditionalTextMatches(
|
|
47
|
+
cellVal: string,
|
|
48
|
+
needle: string,
|
|
49
|
+
op: "contains" | "not_contains",
|
|
50
|
+
textMask: FilterTextMask | undefined,
|
|
51
|
+
) {
|
|
52
|
+
const v = cellVal.trim()
|
|
53
|
+
const n = needle.trim()
|
|
54
|
+
if (!n) return op === "not_contains"
|
|
55
|
+
if (textMask === "phone" || textMask === "zip") {
|
|
56
|
+
const nd = n.replace(/\D/g, "")
|
|
57
|
+
const hay = v.replace(/\D/g, "")
|
|
58
|
+
if (!nd) return op === "not_contains"
|
|
59
|
+
const hit = hay.includes(nd)
|
|
60
|
+
return op === "contains" ? hit : !hit
|
|
61
|
+
}
|
|
62
|
+
const hit = v.toLowerCase().includes(n.toLowerCase())
|
|
63
|
+
return op === "contains" ? hit : !hit
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Whether a conditional rule matches a row (same logic as DataTable cells). */
|
|
67
|
+
export function conditionalRuleMatchesRow<T extends Record<string, unknown>>(
|
|
68
|
+
row: T,
|
|
69
|
+
rule: ConditionalRule,
|
|
70
|
+
columns?: ConditionalColumnHint[],
|
|
71
|
+
): boolean {
|
|
72
|
+
if (!ruleHasActiveValues(rule, columns)) return false
|
|
73
|
+
const v = rowValueForRule(row, rule, columns).trim()
|
|
74
|
+
const col = columns?.find((c) => c.key === rule.fieldKey)
|
|
75
|
+
const textMask =
|
|
76
|
+
col?.filter?.type === "text" ? col.filter.textMask : undefined
|
|
77
|
+
switch (rule.operator) {
|
|
78
|
+
case "is":
|
|
79
|
+
return rule.values.includes(v)
|
|
80
|
+
case "is_not":
|
|
81
|
+
return !rule.values.includes(v)
|
|
82
|
+
case "contains":
|
|
83
|
+
return rule.values.some((val) =>
|
|
84
|
+
conditionalTextMatches(v, val, "contains", textMask),
|
|
85
|
+
)
|
|
86
|
+
case "not_contains":
|
|
87
|
+
return !rule.values.some((val) =>
|
|
88
|
+
conditionalTextMatches(v, val, "contains", textMask),
|
|
89
|
+
)
|
|
90
|
+
default:
|
|
91
|
+
return false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** First matching conditional rule background for a row (list/board row tint). */
|
|
96
|
+
export function getConditionalRowBackground<T extends Record<string, unknown>>(
|
|
97
|
+
row: T,
|
|
98
|
+
rules: ConditionalRule[] | undefined,
|
|
99
|
+
columns?: ConditionalColumnHint[],
|
|
100
|
+
): string | undefined {
|
|
101
|
+
if (!rules?.length) return undefined
|
|
102
|
+
for (const rule of rules) {
|
|
103
|
+
if (conditionalRuleMatchesRow(row, rule, columns)) return rule.bgColor
|
|
104
|
+
}
|
|
105
|
+
return undefined
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** Background for one table cell from conditional rules on that column. */
|
|
109
|
+
export function getConditionalCellBackground<T extends Record<string, unknown>>(
|
|
110
|
+
row: T,
|
|
111
|
+
colKey: string,
|
|
112
|
+
rules: ConditionalRule[] | undefined,
|
|
113
|
+
columns?: ConditionalColumnHint[],
|
|
114
|
+
): string | undefined {
|
|
115
|
+
if (!rules?.length) return undefined
|
|
116
|
+
const rule = rules.find((r) => r.fieldKey === colKey)
|
|
117
|
+
if (!rule || !conditionalRuleMatchesRow(row, rule, columns)) return undefined
|
|
118
|
+
return rule.bgColor
|
|
119
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display options for Data list (table / board / etc.) — shared across view types
|
|
3
|
+
* so hide/show preferences persist when switching views.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type BoardLineCount = 1 | 2 | 3
|
|
7
|
+
|
|
8
|
+
export interface DataListDisplayOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Board swimlanes: dataset field (table column key) used to split cards into columns.
|
|
11
|
+
* Each hub passes allowed keys via `TablePropertiesDrawer` `boardGroupByColumnOptions`.
|
|
12
|
+
*/
|
|
13
|
+
boardGroupByColumnKey: string
|
|
14
|
+
/** Max lines for primary text blocks on board cards */
|
|
15
|
+
boardLineCount: BoardLineCount
|
|
16
|
+
/** Page title block (Placements + subtitle) */
|
|
17
|
+
showViewTitle: boolean
|
|
18
|
+
/** Board: phase column titles + descriptions. Table: column header row. */
|
|
19
|
+
showColumnLabels: boolean
|
|
20
|
+
/** Board: “N cards” under each phase column */
|
|
21
|
+
showBoardColumnCounts: boolean
|
|
22
|
+
boardNewCardAbove: boolean
|
|
23
|
+
/** Toolbar search control (table view) */
|
|
24
|
+
showToolbarSearch: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const DEFAULT_DATA_LIST_DISPLAY_OPTIONS: DataListDisplayOptions = {
|
|
28
|
+
boardGroupByColumnKey: "topic",
|
|
29
|
+
boardLineCount: 2,
|
|
30
|
+
showViewTitle: true,
|
|
31
|
+
showColumnLabels: true,
|
|
32
|
+
showBoardColumnCounts: true,
|
|
33
|
+
boardNewCardAbove: true,
|
|
34
|
+
showToolbarSearch: true,
|
|
35
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central registry for list-page view types — labels, render kinds, and hub chrome rules.
|
|
3
|
+
*
|
|
4
|
+
* **Add a new view once here** (plus a body in `components/data-views/`). Hubs declare
|
|
5
|
+
* `supportedViewTypes` on `ListPageTemplate`; table components branch with
|
|
6
|
+
* `getDataListViewRenderKind` + `ListPageConnectedViewBody` (never a dashboard fallback).
|
|
7
|
+
*
|
|
8
|
+
* @see `docs/data-views-pattern.md` — "View registry and connected bodies"
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
DATA_LIST_VIEW_TILES,
|
|
13
|
+
type DataListViewType,
|
|
14
|
+
dataListViewAddShortcut,
|
|
15
|
+
dataListViewIcon,
|
|
16
|
+
dataListViewLabel,
|
|
17
|
+
} from "./data-list-view"
|
|
18
|
+
import {
|
|
19
|
+
getDataListViewRenderKind,
|
|
20
|
+
type DataListViewRenderKind,
|
|
21
|
+
} from "./data-list-view-surface"
|
|
22
|
+
|
|
23
|
+
export interface DataListViewDefinition {
|
|
24
|
+
value: DataListViewType
|
|
25
|
+
label: string
|
|
26
|
+
icon: string
|
|
27
|
+
renderKind: DataListViewRenderKind
|
|
28
|
+
/** `ListPageTemplate` metrics slot above the views toolbar. */
|
|
29
|
+
hubMetricsStrip: boolean
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const DEFINITIONS: DataListViewDefinition[] = DATA_LIST_VIEW_TILES.map(tile => {
|
|
33
|
+
const renderKind = getDataListViewRenderKind(tile.value)
|
|
34
|
+
const hubMetricsStrip = renderKind !== "calendar-with-toolbar" && renderKind !== "dashboard-with-toolbar"
|
|
35
|
+
return {
|
|
36
|
+
value: tile.value,
|
|
37
|
+
label: tile.label,
|
|
38
|
+
icon: tile.icon,
|
|
39
|
+
renderKind,
|
|
40
|
+
hubMetricsStrip,
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const BY_VALUE = new Map<DataListViewType, DataListViewDefinition>(
|
|
45
|
+
DEFINITIONS.map(d => [d.value, d]),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
export const DATA_LIST_VIEW_REGISTRY: readonly DataListViewDefinition[] = DEFINITIONS
|
|
49
|
+
|
|
50
|
+
export function dataListViewDefinition(view: DataListViewType): DataListViewDefinition {
|
|
51
|
+
const def = BY_VALUE.get(view)
|
|
52
|
+
if (!def) {
|
|
53
|
+
throw new Error(`Unknown DataListViewType: ${view}`)
|
|
54
|
+
}
|
|
55
|
+
return def
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** `ListPageTemplate` hub KPI strip — false for calendar and dashboard (inline KPIs). */
|
|
59
|
+
export function showsListPageHubMetricsStrip(view: DataListViewType): boolean {
|
|
60
|
+
return dataListViewDefinition(view).hubMetricsStrip
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Tiles for Add view + Properties when a hub only supports a subset of views. */
|
|
64
|
+
export function dataListViewTilesForHub(supported: readonly DataListViewType[]) {
|
|
65
|
+
const allowed = new Set(supported)
|
|
66
|
+
return DATA_LIST_VIEW_REGISTRY.filter(d => allowed.has(d.value)).map(d => ({
|
|
67
|
+
type: d.value,
|
|
68
|
+
label: d.label,
|
|
69
|
+
icon: d.icon,
|
|
70
|
+
}))
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** `SelectionTileGrid` options for Properties when a hub supports a subset of views. */
|
|
74
|
+
export function dataListViewSelectionTilesForHub(supported: readonly DataListViewType[]) {
|
|
75
|
+
return dataListViewTilesForHub(supported).map(t => ({
|
|
76
|
+
value: t.type,
|
|
77
|
+
label: t.label,
|
|
78
|
+
icon: t.icon,
|
|
79
|
+
}))
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** View types that expose Table Properties (all registered `DataListViewType` values). */
|
|
83
|
+
export const DATA_LIST_SURFACE_VIEW_TYPES: ReadonlySet<DataListViewType> = new Set(
|
|
84
|
+
DATA_LIST_VIEW_REGISTRY.map(d => d.value),
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
export function isDataListSurfaceViewType(viewType: string): viewType is DataListViewType {
|
|
88
|
+
return DATA_LIST_SURFACE_VIEW_TYPES.has(viewType as DataListViewType)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function isDataListViewTypeSupported(
|
|
92
|
+
view: DataListViewType,
|
|
93
|
+
supported: readonly DataListViewType[],
|
|
94
|
+
): boolean {
|
|
95
|
+
return supported.includes(view)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
dataListViewAddShortcut,
|
|
100
|
+
dataListViewIcon,
|
|
101
|
+
dataListViewLabel,
|
|
102
|
+
getDataListViewRenderKind,
|
|
103
|
+
type DataListViewRenderKind,
|
|
104
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps `DataListViewType` to the UI surface pattern for list pages.
|
|
3
|
+
*
|
|
4
|
+
* **Data:** One `useTableState(fullRows, columns, …)` per tab; **filtered/sorted rows**
|
|
5
|
+
* (`tableState.rows`) are the single source of truth for List, Board, and Dashboard.
|
|
6
|
+
* Table view renders the same state via `DataTable`.
|
|
7
|
+
*
|
|
8
|
+
* | View | Surface |
|
|
9
|
+
* |------------|---------|
|
|
10
|
+
* | `table` | `DataTable` |
|
|
11
|
+
* | `list` | `DataTableToolbar` + list layout |
|
|
12
|
+
* | `board` | `DataTableToolbar` + board / kanban |
|
|
13
|
+
* | `dashboard`| `DataTableToolbar` + KPI (`KeyMetrics`) + optional charts (`ChartCard`, Recharts, etc.) |
|
|
14
|
+
* | `calendar` | `DataTableToolbar` + `ListPageCalendarView` (month grid + day detail) |
|
|
15
|
+
* | `folder` | `DataTableToolbar` + icon grid (macOS-Finder-style) |
|
|
16
|
+
* | `panel` | `DataTableToolbar` + resizable split (list / tree column + detail inspector) |
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { DataListViewType } from "./data-list-view"
|
|
20
|
+
|
|
21
|
+
export { showsListPageHubMetricsStrip } from "./data-list-view-registry"
|
|
22
|
+
|
|
23
|
+
/** What to render for the active view tab (routing / branching). */
|
|
24
|
+
export type DataListViewRenderKind =
|
|
25
|
+
| "data-table"
|
|
26
|
+
| "list-with-toolbar"
|
|
27
|
+
| "board-with-toolbar"
|
|
28
|
+
| "dashboard-with-toolbar"
|
|
29
|
+
| "calendar-with-toolbar"
|
|
30
|
+
| "folder-with-toolbar"
|
|
31
|
+
| "panel-with-toolbar"
|
|
32
|
+
| "tree-panel-with-toolbar"
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Stable classification for switch/if chains. **Every** `DataListViewType` maps to exactly one kind.
|
|
36
|
+
* Use this so `dashboard` is never mistaken for `board` (a common bug when only `list` is special-cased).
|
|
37
|
+
*/
|
|
38
|
+
export function getDataListViewRenderKind(view: DataListViewType): DataListViewRenderKind {
|
|
39
|
+
switch (view) {
|
|
40
|
+
case "table":
|
|
41
|
+
return "data-table"
|
|
42
|
+
case "list":
|
|
43
|
+
return "list-with-toolbar"
|
|
44
|
+
case "board":
|
|
45
|
+
return "board-with-toolbar"
|
|
46
|
+
case "dashboard":
|
|
47
|
+
return "dashboard-with-toolbar"
|
|
48
|
+
case "calendar":
|
|
49
|
+
return "calendar-with-toolbar"
|
|
50
|
+
case "folder":
|
|
51
|
+
return "folder-with-toolbar"
|
|
52
|
+
case "panel":
|
|
53
|
+
return "panel-with-toolbar"
|
|
54
|
+
case "tree-panel":
|
|
55
|
+
return "tree-panel-with-toolbar"
|
|
56
|
+
default: {
|
|
57
|
+
const _x: never = view
|
|
58
|
+
return _x
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function usesDataTableComponent(view: DataListViewType): boolean {
|
|
64
|
+
return view === "table"
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** KPI band + optional charts — not the kanban board. */
|
|
68
|
+
export function usesDashboardSurface(view: DataListViewType): boolean {
|
|
69
|
+
return view === "dashboard"
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Shared toolbar (search, filters, properties); body differs by view. */
|
|
73
|
+
export function usesToolbarWithFilteredRows(view: DataListViewType): boolean {
|
|
74
|
+
return (
|
|
75
|
+
view === "list" ||
|
|
76
|
+
view === "board" ||
|
|
77
|
+
view === "dashboard" ||
|
|
78
|
+
view === "calendar" ||
|
|
79
|
+
view === "folder" ||
|
|
80
|
+
view === "panel" ||
|
|
81
|
+
view === "tree-panel"
|
|
82
|
+
)
|
|
83
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data list “view type” — shared by Properties drawer, ListPageTemplate tabs, and client state.
|
|
3
|
+
*
|
|
4
|
+
* **Single source of truth** for view labels/icons: use `DATA_LIST_VIEW_TILES` and
|
|
5
|
+
* `dataListViewLabel` / `dataListViewIcon` on every page so Table / List / Board / Dashboard
|
|
6
|
+
* stay consistent and stay wired to the same `useTableState` dataset (see `docs/data-views-pattern.md`).
|
|
7
|
+
*/
|
|
8
|
+
export type DataListViewType =
|
|
9
|
+
| "table"
|
|
10
|
+
| "list"
|
|
11
|
+
| "board"
|
|
12
|
+
| "dashboard"
|
|
13
|
+
| "calendar"
|
|
14
|
+
| "folder"
|
|
15
|
+
| "panel"
|
|
16
|
+
| "tree-panel"
|
|
17
|
+
|
|
18
|
+
export const DATA_LIST_VIEW_TILES: readonly {
|
|
19
|
+
value: DataListViewType
|
|
20
|
+
label: string
|
|
21
|
+
icon: string
|
|
22
|
+
}[] = [
|
|
23
|
+
{ value: "table", icon: "fa-table", label: "Table view" },
|
|
24
|
+
{ value: "list", icon: "fa-list", label: "List view" },
|
|
25
|
+
{ value: "board", icon: "fa-table-columns", label: "Board view" },
|
|
26
|
+
{ value: "dashboard", icon: "fa-chart-mixed", label: "Dashboard view" },
|
|
27
|
+
{ value: "calendar", icon: "fa-calendar-days", label: "Calendar view" },
|
|
28
|
+
{ value: "folder", icon: "fa-grid-2", label: "Folder view" },
|
|
29
|
+
{ value: "panel", icon: "fa-sidebar", label: "List & details" },
|
|
30
|
+
{ value: "tree-panel", icon: "fa-sitemap", label: "Tree & details" },
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
/** User-facing name for tabs, Properties summary rows, and tooltips (not entity-specific). */
|
|
34
|
+
export function dataListViewLabel(view: DataListViewType): string {
|
|
35
|
+
return DATA_LIST_VIEW_TILES.find(t => t.value === view)?.label ?? view
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Font Awesome icon class (no prefix) for tab / toolbar state when view changes. */
|
|
39
|
+
export function dataListViewIcon(view: DataListViewType): string {
|
|
40
|
+
return DATA_LIST_VIEW_TILES.find(t => t.value === view)?.icon ?? "fa-table"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Add-view menu hint + `<Shortcut>` keys (1–9). Skipped in inputs via `useShortcut`. */
|
|
44
|
+
export function dataListViewAddShortcut(index: number): string | undefined {
|
|
45
|
+
if (index < 0 || index > 8) return undefined
|
|
46
|
+
return String(index + 1)
|
|
47
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs only in development. Use for mock flows (export, submit) instead of
|
|
3
|
+
* raw `console.log`. Bundlers replace `process.env.NODE_ENV` at build time,
|
|
4
|
+
* so the call site disappears entirely in production bundles.
|
|
5
|
+
*/
|
|
6
|
+
export function devLog(...args: unknown[]): void {
|
|
7
|
+
if (process.env.NODE_ENV === "development") {
|
|
8
|
+
console.log(...args)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when focus is in a field where global shortcuts should not fire.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the same skip logic baked into Radix `useShortcut` so global
|
|
5
|
+
* hotkey handlers (export ⌘⇧E, rename F2, etc.) don't steal keystrokes
|
|
6
|
+
* that the user clearly intends for the input. Covers native form
|
|
7
|
+
* fields and any element marked `contenteditable="true"` (richtext
|
|
8
|
+
* editors, comment composers).
|
|
9
|
+
*/
|
|
10
|
+
export function isEditableTarget(target: EventTarget | null): boolean {
|
|
11
|
+
const el = target as HTMLElement | null
|
|
12
|
+
if (!el) return false
|
|
13
|
+
if (
|
|
14
|
+
el instanceof HTMLInputElement ||
|
|
15
|
+
el instanceof HTMLTextAreaElement ||
|
|
16
|
+
el instanceof HTMLSelectElement
|
|
17
|
+
)
|
|
18
|
+
return true
|
|
19
|
+
return el.getAttribute?.("contenteditable") === "true"
|
|
20
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connects ListPageTemplate “View → Edit” to a surface that hosts TablePropertiesDrawer
|
|
3
|
+
* (PlacementsTable, TeamTable, ComplianceTable, …). Import from `@/components/table-properties`
|
|
4
|
+
* or use here — see `createListPageEditViewHandler`.
|
|
5
|
+
*
|
|
6
|
+
* View **labels** for tabs and Properties are centralized in `@/lib/data-list-view`
|
|
7
|
+
* (`DATA_LIST_VIEW_TILES`, `dataListViewLabel`, `dataListViewIcon`).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import * as React from "react"
|
|
11
|
+
|
|
12
|
+
import { dataListViewIcon, type DataListViewType } from "./data-list-view"
|
|
13
|
+
import { isDataListSurfaceViewType } from "./data-list-view-registry"
|
|
14
|
+
|
|
15
|
+
export { isDataListSurfaceViewType }
|
|
16
|
+
|
|
17
|
+
/** Minimal ref API any list/table surface exposes for the shared Properties drawer. */
|
|
18
|
+
export interface OpenTablePropertiesHandle {
|
|
19
|
+
openPropertiesDrawer: () => void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CreateListPageEditViewHandlerOptions {
|
|
23
|
+
/** Delay before opening Properties after switching to table (ms). Default 160. */
|
|
24
|
+
switchDelayMs?: number
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns `ListPageTemplate`’s `onEditView` handler: optionally coerces the tab to `table`
|
|
29
|
+
* when the view type is unknown, then calls `ref.current.openPropertiesDrawer()`.
|
|
30
|
+
*/
|
|
31
|
+
export function createListPageEditViewHandler(
|
|
32
|
+
tableRef: React.RefObject<OpenTablePropertiesHandle | null>,
|
|
33
|
+
options?: CreateListPageEditViewHandlerOptions
|
|
34
|
+
) {
|
|
35
|
+
const delay = options?.switchDelayMs ?? 160
|
|
36
|
+
return (
|
|
37
|
+
tab: { viewType: string },
|
|
38
|
+
{ updateTab }: { updateTab: (patch: { viewType?: DataListViewType; icon?: string }) => void }
|
|
39
|
+
) => {
|
|
40
|
+
const mustSwitchToTableSurface = !isDataListSurfaceViewType(tab.viewType)
|
|
41
|
+
if (mustSwitchToTableSurface) {
|
|
42
|
+
updateTab({ viewType: "table", icon: dataListViewIcon("table") })
|
|
43
|
+
}
|
|
44
|
+
window.setTimeout(() => {
|
|
45
|
+
tableRef.current?.openPropertiesDrawer()
|
|
46
|
+
}, mustSwitchToTableSurface ? delay : 0)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coalesce many calls to `fn` into one per animation frame.
|
|
3
|
+
*
|
|
4
|
+
* Use for high-frequency layout-reading event handlers (scroll, resize,
|
|
5
|
+
* visualViewport, ResizeObserver) where the work must happen in a frame but
|
|
6
|
+
* doing it on every event call (60+/s for resize, hundreds/s for capture
|
|
7
|
+
* scrolls) wastes layout/paint cycles. The returned function exposes
|
|
8
|
+
* `.cancel()` so effect cleanup can drop a pending frame.
|
|
9
|
+
*
|
|
10
|
+
* Pattern:
|
|
11
|
+
* const apply = () => { ...layout reads + setState... }
|
|
12
|
+
* const scheduled = rafThrottle(apply)
|
|
13
|
+
* window.addEventListener("scroll", scheduled, { passive: true, capture: true })
|
|
14
|
+
* return () => {
|
|
15
|
+
* scheduled.cancel()
|
|
16
|
+
* window.removeEventListener("scroll", scheduled, { capture: true })
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export function rafThrottle<TArgs extends unknown[]>(
|
|
20
|
+
fn: (...args: TArgs) => void,
|
|
21
|
+
): ((...args: TArgs) => void) & { cancel: () => void } {
|
|
22
|
+
let rafId = 0
|
|
23
|
+
let lastArgs: TArgs | null = null
|
|
24
|
+
|
|
25
|
+
const scheduled = ((...args: TArgs) => {
|
|
26
|
+
lastArgs = args
|
|
27
|
+
if (rafId !== 0) return
|
|
28
|
+
rafId = requestAnimationFrame(() => {
|
|
29
|
+
rafId = 0
|
|
30
|
+
const a = lastArgs
|
|
31
|
+
lastArgs = null
|
|
32
|
+
if (a) fn(...a)
|
|
33
|
+
})
|
|
34
|
+
}) as ((...args: TArgs) => void) & { cancel: () => void }
|
|
35
|
+
|
|
36
|
+
scheduled.cancel = () => {
|
|
37
|
+
if (rafId !== 0) {
|
|
38
|
+
cancelAnimationFrame(rafId)
|
|
39
|
+
rafId = 0
|
|
40
|
+
}
|
|
41
|
+
lastArgs = null
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return scheduled
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table row density — shared by Properties drawer tiles and useTableState.
|
|
3
|
+
*
|
|
4
|
+
* Three steps modelled after Linear / Notion / Airtable density toggles.
|
|
5
|
+
* `default` is the design-system baseline (`h-9` rows, `text-sm`); the
|
|
6
|
+
* other two scale the row height + vertical padding without changing the
|
|
7
|
+
* font size, so dense tables stay legible.
|
|
8
|
+
*/
|
|
9
|
+
export type RowHeight = "compact" | "default" | "comfortable"
|
|
10
|
+
|
|
11
|
+
export const ROW_HEIGHT_TILES: readonly {
|
|
12
|
+
value: RowHeight
|
|
13
|
+
label: string
|
|
14
|
+
icon: string
|
|
15
|
+
}[] = [
|
|
16
|
+
{ value: "compact", label: "Compact", icon: "fa-down-to-line" },
|
|
17
|
+
{ value: "default", label: "Default", icon: "fa-arrows-up-down" },
|
|
18
|
+
{ value: "comfortable", label: "Comfortable", icon: "fa-up-to-line" },
|
|
19
|
+
]
|