@nadicodeai/ui 12.1.95 → 12.1.97
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/AGENTS.md +5 -1
- package/dist/components/accordion.d.ts +13 -0
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +13 -0
- package/dist/components/account-menu.d.ts +62 -18
- package/dist/components/account-menu.d.ts.map +1 -1
- package/dist/components/account-menu.js +32 -8
- package/dist/components/action-menu.d.ts +61 -5
- package/dist/components/action-menu.d.ts.map +1 -1
- package/dist/components/action-menu.js +31 -2
- package/dist/components/action-status.d.ts +13 -3
- package/dist/components/action-status.d.ts.map +1 -1
- package/dist/components/action-status.js +13 -3
- package/dist/components/activity-calendar.d.ts +14 -0
- package/dist/components/activity-calendar.d.ts.map +1 -1
- package/dist/components/activity-calendar.js +14 -0
- package/dist/components/activity-feed.d.ts +62 -0
- package/dist/components/activity-feed.d.ts.map +1 -0
- package/dist/components/activity-feed.js +54 -0
- package/dist/components/agent-card.d.ts +15 -0
- package/dist/components/agent-card.d.ts.map +1 -1
- package/dist/components/agent-card.js +15 -0
- package/dist/components/agent-list-row.d.ts +11 -7
- package/dist/components/agent-list-row.d.ts.map +1 -1
- package/dist/components/agent-list-row.js +10 -8
- package/dist/components/agent-orb-appearance.d.ts +5 -4
- package/dist/components/agent-orb-appearance.d.ts.map +1 -1
- package/dist/components/agent-orb.d.ts +16 -0
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +17 -0
- package/dist/components/agent-profile.d.ts +39 -10
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +40 -10
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +14 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/alert.js +14 -0
- package/dist/components/app-mark.d.ts +14 -4
- package/dist/components/app-mark.d.ts.map +1 -1
- package/dist/components/app-mark.js +16 -4
- package/dist/components/approval-row.d.ts +15 -2
- package/dist/components/approval-row.d.ts.map +1 -1
- package/dist/components/approval-row.js +15 -2
- package/dist/components/aspect-ratio.d.ts +10 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -1
- package/dist/components/aspect-ratio.js +13 -1
- package/dist/components/avatar.d.ts +15 -0
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +15 -0
- package/dist/components/badge.d.ts +11 -1
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +10 -5
- package/dist/components/brand-field.d.ts +10 -0
- package/dist/components/brand-field.d.ts.map +1 -1
- package/dist/components/brand-field.js +10 -0
- package/dist/components/brand.d.ts +14 -0
- package/dist/components/brand.d.ts.map +1 -1
- package/dist/components/brand.js +18 -4
- package/dist/components/breadcrumb.d.ts +20 -2
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +13 -3
- package/dist/components/button-group.d.ts +21 -0
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button-group.js +21 -0
- package/dist/components/button.d.ts +20 -0
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +20 -0
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +15 -0
- package/dist/components/card-row.d.ts +15 -5
- package/dist/components/card-row.d.ts.map +1 -1
- package/dist/components/card-row.js +15 -5
- package/dist/components/card.d.ts +16 -0
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +16 -0
- package/dist/components/carousel.d.ts +12 -0
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +12 -0
- package/dist/components/catalog-drawer.d.ts +29 -0
- package/dist/components/catalog-drawer.d.ts.map +1 -0
- package/dist/components/catalog-drawer.js +31 -0
- package/dist/components/catalog-entry.d.ts +49 -26
- package/dist/components/catalog-entry.d.ts.map +1 -1
- package/dist/components/catalog-entry.js +5 -27
- package/dist/components/channel-view.d.ts +23 -0
- package/dist/components/channel-view.d.ts.map +1 -1
- package/dist/components/channel-view.js +13 -4
- package/dist/components/chart-area-stacked.d.ts +11 -1
- package/dist/components/chart-area-stacked.d.ts.map +1 -1
- package/dist/components/chart-area-stacked.js +12 -2
- package/dist/components/chart-axis.d.ts.map +1 -1
- package/dist/components/chart-axis.js +2 -0
- package/dist/components/chart-bar-horizontal.d.ts +11 -1
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +15 -2
- package/dist/components/chart-bar-multiple.d.ts +9 -4
- package/dist/components/chart-bar-multiple.d.ts.map +1 -1
- package/dist/components/chart-bar-multiple.js +10 -5
- package/dist/components/chart-bar-stacked.d.ts +11 -1
- package/dist/components/chart-bar-stacked.d.ts.map +1 -1
- package/dist/components/chart-bar-stacked.js +12 -2
- package/dist/components/chart-card.d.ts +38 -24
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +21 -8
- package/dist/components/chart-date-range-control.d.ts +15 -10
- package/dist/components/chart-date-range-control.d.ts.map +1 -1
- package/dist/components/chart-date-range-control.js +16 -12
- package/dist/components/chart-date-range.d.ts +2 -1
- package/dist/components/chart-date-range.d.ts.map +1 -1
- package/dist/components/chart-date-range.js +5 -2
- package/dist/components/chart-entity-colors.d.ts +7 -0
- package/dist/components/chart-entity-colors.d.ts.map +1 -1
- package/dist/components/chart-entity-colors.js +7 -0
- package/dist/components/chart-sparkline.d.ts +10 -0
- package/dist/components/chart-sparkline.d.ts.map +1 -1
- package/dist/components/chart-sparkline.js +8 -7
- package/dist/components/chart.d.ts +10 -0
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +27 -4
- package/dist/components/checkbox.d.ts +15 -0
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +15 -0
- package/dist/components/code-block.d.ts +15 -0
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +15 -0
- package/dist/components/collapsible.d.ts +12 -0
- package/dist/components/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible.js +12 -0
- package/dist/components/collection-filters.d.ts +15 -2
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +13 -1
- package/dist/components/collection-page.d.ts +29 -115
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +24 -139
- package/dist/components/collection-search.d.ts +14 -0
- package/dist/components/collection-search.d.ts.map +1 -1
- package/dist/components/collection-search.js +14 -0
- package/dist/components/collection-sort.d.ts +13 -3
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +17 -4
- package/dist/components/collection-toolbar.d.ts +13 -0
- package/dist/components/collection-toolbar.d.ts.map +1 -1
- package/dist/components/collection-toolbar.js +13 -0
- package/dist/components/combobox.d.ts +17 -0
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +17 -0
- package/dist/components/command.d.ts +16 -0
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +16 -0
- package/dist/components/company-card/renderer.js +2 -2
- package/dist/components/company-card.d.ts +16 -4
- package/dist/components/company-card.d.ts.map +1 -1
- package/dist/components/company-card.js +22 -10
- package/dist/components/confirm-dialog.d.ts +24 -14
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +16 -10
- package/dist/components/context-menu.d.ts +10 -0
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +10 -0
- package/dist/components/copy-button.d.ts +10 -0
- package/dist/components/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button.js +10 -0
- package/dist/components/dashboard-shell.d.ts +14 -0
- package/dist/components/dashboard-shell.d.ts.map +1 -1
- package/dist/components/dashboard-shell.js +15 -1
- package/dist/components/data-table.d.ts +23 -1
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +63 -31
- package/dist/components/desktop-shell.d.ts +15 -0
- package/dist/components/desktop-shell.d.ts.map +1 -1
- package/dist/components/desktop-shell.js +15 -0
- package/dist/components/dialog.d.ts +16 -0
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +16 -0
- package/dist/components/diff-count.d.ts +11 -0
- package/dist/components/diff-count.d.ts.map +1 -1
- package/dist/components/diff-count.js +11 -0
- package/dist/components/disclosure-row.d.ts +12 -0
- package/dist/components/disclosure-row.d.ts.map +1 -1
- package/dist/components/disclosure-row.js +12 -0
- package/dist/components/disclosure.d.ts +15 -5
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +15 -5
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +13 -0
- package/dist/components/dropdown-menu.d.ts +17 -5
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +20 -7
- package/dist/components/empty-art.d.ts +1 -1
- package/dist/components/empty-art.d.ts.map +1 -1
- package/dist/components/empty-art.js +8 -0
- package/dist/components/empty-state.d.ts +24 -10
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state.js +23 -1
- package/dist/components/entry-scene.d.ts +33 -20
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +40 -9
- package/dist/components/expandable-block.d.ts +10 -0
- package/dist/components/expandable-block.d.ts.map +1 -1
- package/dist/components/expandable-block.js +10 -0
- package/dist/components/field.d.ts +17 -0
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +17 -0
- package/dist/components/file-diff.d.ts +12 -0
- package/dist/components/file-diff.d.ts.map +1 -1
- package/dist/components/file-diff.js +12 -0
- package/dist/components/file-type-icon.d.ts +12 -0
- package/dist/components/file-type-icon.d.ts.map +1 -1
- package/dist/components/file-type-icon.js +46 -31
- package/dist/components/footer.d.ts +14 -0
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +14 -0
- package/dist/components/form-dialog.d.ts +10 -0
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +10 -0
- package/dist/components/form-drawer.d.ts +24 -11
- package/dist/components/form-drawer.d.ts.map +1 -1
- package/dist/components/form-drawer.js +13 -3
- package/dist/components/form.d.ts +17 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +25 -5
- package/dist/components/glass-control.d.ts +13 -0
- package/dist/components/glass-control.d.ts.map +1 -1
- package/dist/components/glass-control.js +13 -0
- package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/calendar-heatmap.js +6 -4
- package/dist/components/hive-scene.d.ts +14 -0
- package/dist/components/hive-scene.d.ts.map +1 -1
- package/dist/components/hive-scene.js +14 -0
- package/dist/components/house-icons.d.ts +15 -0
- package/dist/components/house-icons.d.ts.map +1 -1
- package/dist/components/house-icons.js +19 -1
- package/dist/components/hover-card.d.ts +15 -0
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +15 -0
- package/dist/components/identity-mark.d.ts +55 -0
- package/dist/components/identity-mark.d.ts.map +1 -0
- package/dist/components/identity-mark.js +66 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +17 -0
- package/dist/components/input-otp.d.ts +15 -0
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input-otp.js +15 -0
- package/dist/components/input.d.ts +15 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +15 -0
- package/dist/components/item.d.ts +16 -0
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +16 -0
- package/dist/components/kbd.d.ts +14 -0
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +14 -0
- package/dist/components/kpi-card.d.ts +21 -13
- package/dist/components/kpi-card.d.ts.map +1 -1
- package/dist/components/kpi-card.js +14 -3
- package/dist/components/label-system.d.ts +12 -0
- package/dist/components/label-system.d.ts.map +1 -1
- package/dist/components/label-system.js +12 -0
- package/dist/components/label.d.ts +15 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +15 -0
- package/dist/components/library-shelf.d.ts +35 -0
- package/dist/components/library-shelf.d.ts.map +1 -0
- package/dist/components/library-shelf.js +40 -0
- package/dist/components/memory-item.d.ts +12 -0
- package/dist/components/memory-item.d.ts.map +1 -1
- package/dist/components/memory-item.js +12 -0
- package/dist/components/menu-choice-row.d.ts +13 -5
- package/dist/components/menu-choice-row.d.ts.map +1 -1
- package/dist/components/menu-choice-row.js +12 -6
- package/dist/components/menubar.d.ts +13 -0
- package/dist/components/menubar.d.ts.map +1 -1
- package/dist/components/menubar.js +13 -0
- package/dist/components/message-notice.d.ts +16 -0
- package/dist/components/message-notice.d.ts.map +1 -1
- package/dist/components/message-notice.js +18 -2
- package/dist/components/model-identity.d.ts +16 -3
- package/dist/components/model-identity.d.ts.map +1 -1
- package/dist/components/model-identity.js +16 -3
- package/dist/components/model-mark.d.ts +15 -2
- package/dist/components/model-mark.d.ts.map +1 -1
- package/dist/components/model-mark.js +36 -23
- package/dist/components/nadia-presence.d.ts +10 -4
- package/dist/components/nadia-presence.d.ts.map +1 -1
- package/dist/components/nadia-presence.js +10 -4
- package/dist/components/native-select.d.ts +16 -0
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +21 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu.js +14 -0
- package/dist/components/notice-banner.d.ts +10 -3
- package/dist/components/notice-banner.d.ts.map +1 -1
- package/dist/components/notice-banner.js +9 -3
- package/dist/components/numbered-steps.d.ts +33 -0
- package/dist/components/numbered-steps.d.ts.map +1 -0
- package/dist/components/numbered-steps.js +23 -0
- package/dist/components/object-page.d.ts +37 -0
- package/dist/components/object-page.d.ts.map +1 -0
- package/dist/components/object-page.js +19 -0
- package/dist/components/object-workspace.d.ts +26 -36
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +27 -24
- package/dist/components/overview-page.d.ts +24 -0
- package/dist/components/overview-page.d.ts.map +1 -0
- package/dist/components/overview-page.js +26 -0
- package/dist/components/page-actions.d.ts +28 -23
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +20 -14
- package/dist/components/page-header.d.ts +11 -5
- package/dist/components/page-header.d.ts.map +1 -1
- package/dist/components/page-header.js +11 -5
- package/dist/components/pagination.d.ts +15 -0
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +15 -0
- package/dist/components/pairing-code.d.ts +15 -4
- package/dist/components/pairing-code.d.ts.map +1 -1
- package/dist/components/pairing-code.js +15 -4
- package/dist/components/pending-label.d.ts +12 -4
- package/dist/components/pending-label.d.ts.map +1 -1
- package/dist/components/pending-label.js +12 -4
- package/dist/components/picture-label.d.ts +15 -7
- package/dist/components/picture-label.d.ts.map +1 -1
- package/dist/components/picture-label.js +15 -7
- package/dist/components/platform-mark.d.ts +12 -3
- package/dist/components/platform-mark.d.ts.map +1 -1
- package/dist/components/platform-mark.js +12 -3
- package/dist/components/plugin-slot-boundary.d.ts +15 -0
- package/dist/components/plugin-slot-boundary.d.ts.map +1 -1
- package/dist/components/plugin-slot-boundary.js +18 -1
- package/dist/components/popover.d.ts +15 -0
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +15 -0
- package/dist/components/portal-sidebar-frame.d.ts +26 -12
- package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.js +26 -0
- package/dist/components/product-message.d.ts.map +1 -1
- package/dist/components/product-message.js +1 -0
- package/dist/components/progress.d.ts +10 -8
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +17 -16
- package/dist/components/qr-code.d.ts +9 -3
- package/dist/components/qr-code.d.ts.map +1 -1
- package/dist/components/qr-code.js +9 -3
- package/dist/components/radio-group.d.ts +15 -0
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +15 -0
- package/dist/components/reading-column.d.ts +11 -0
- package/dist/components/reading-column.d.ts.map +1 -1
- package/dist/components/reading-column.js +11 -0
- package/dist/components/record-identity.d.ts +12 -7
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +12 -7
- package/dist/components/record-list.d.ts +119 -0
- package/dist/components/record-list.d.ts.map +1 -0
- package/dist/components/record-list.js +161 -0
- package/dist/components/record-sheet.d.ts +36 -0
- package/dist/components/record-sheet.d.ts.map +1 -0
- package/dist/components/record-sheet.js +19 -0
- package/dist/components/record-time.d.ts +27 -11
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +35 -14
- package/dist/components/resizable.d.ts +10 -0
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +10 -0
- package/dist/components/row-edit-form.d.ts +8 -5
- package/dist/components/row-edit-form.d.ts.map +1 -1
- package/dist/components/row-edit-form.js +8 -5
- package/dist/components/run-timeline.d.ts +24 -11
- package/dist/components/run-timeline.d.ts.map +1 -1
- package/dist/components/run-timeline.js +13 -6
- package/dist/components/scope-switcher.d.ts +11 -0
- package/dist/components/scope-switcher.d.ts.map +1 -1
- package/dist/components/scope-switcher.js +20 -9
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area.js +12 -0
- package/dist/components/select.d.ts +16 -0
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +16 -0
- package/dist/components/separator.d.ts +11 -0
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +11 -0
- package/dist/components/settings-facts.d.ts +18 -1
- package/dist/components/settings-facts.d.ts.map +1 -1
- package/dist/components/settings-facts.js +20 -1
- package/dist/components/settings-page.d.ts +20 -0
- package/dist/components/settings-page.d.ts.map +1 -0
- package/dist/components/settings-page.js +16 -0
- package/dist/components/settings-section.d.ts +38 -8
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +33 -7
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +16 -0
- package/dist/components/sidebar-sections.d.ts +40 -0
- package/dist/components/sidebar-sections.d.ts.map +1 -0
- package/dist/components/sidebar-sections.js +35 -0
- package/dist/components/sidebar.d.ts +14 -1
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +24 -5
- package/dist/components/skeleton.d.ts +10 -0
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +11 -1
- package/dist/components/slider.d.ts +14 -0
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +14 -0
- package/dist/components/sonner.d.ts +18 -0
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +23 -2
- package/dist/components/status-badge.d.ts +13 -2
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/status-badge.js +21 -9
- package/dist/components/status-dot.d.ts +12 -0
- package/dist/components/status-dot.d.ts.map +1 -1
- package/dist/components/status-dot.js +12 -0
- package/dist/components/status-row.d.ts +14 -0
- package/dist/components/status-row.d.ts.map +1 -1
- package/dist/components/status-row.js +14 -0
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +15 -0
- package/dist/components/table-card.d.ts +16 -3
- package/dist/components/table-card.d.ts.map +1 -1
- package/dist/components/table-card.js +16 -3
- package/dist/components/table-value.d.ts +24 -2
- package/dist/components/table-value.d.ts.map +1 -1
- package/dist/components/table-value.js +25 -3
- package/dist/components/table.d.ts +16 -0
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +17 -1
- package/dist/components/tabs.d.ts +27 -0
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +27 -0
- package/dist/components/tag.d.ts +12 -2
- package/dist/components/tag.d.ts.map +1 -1
- package/dist/components/tag.js +12 -2
- package/dist/components/text-link.d.ts +17 -0
- package/dist/components/text-link.d.ts.map +1 -1
- package/dist/components/text-link.js +17 -0
- package/dist/components/textarea.d.ts +14 -0
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +14 -0
- package/dist/components/theme-mode-switcher.d.ts +21 -0
- package/dist/components/theme-mode-switcher.d.ts.map +1 -1
- package/dist/components/theme-mode-switcher.js +23 -1
- package/dist/components/toggle-group.d.ts +13 -0
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +16 -1
- package/dist/components/toggle.d.ts +14 -0
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +14 -0
- package/dist/components/tool-icon.d.ts +14 -4
- package/dist/components/tool-icon.d.ts.map +1 -1
- package/dist/components/tool-icon.js +28 -19
- package/dist/components/tooltip.d.ts +15 -0
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +15 -0
- package/dist/components/trend-badge.d.ts +16 -1
- package/dist/components/trend-badge.d.ts.map +1 -1
- package/dist/components/trend-badge.js +16 -7
- package/dist/components/update-card.d.ts +36 -0
- package/dist/components/update-card.d.ts.map +1 -0
- package/dist/components/update-card.js +28 -0
- package/dist/components/usage-meter.d.ts +15 -0
- package/dist/components/usage-meter.d.ts.map +1 -1
- package/dist/components/usage-meter.js +20 -1
- package/dist/components/waiting-line.d.ts +13 -10
- package/dist/components/waiting-line.d.ts.map +1 -1
- package/dist/components/waiting-line.js +13 -10
- package/dist/eslint/index.js +9 -0
- package/dist/eslint/rules/empty-state-owner.js +145 -0
- package/dist/eslint/rules/jsx-class-utility.js +5 -0
- package/dist/eslint/rules/menu-owner.js +75 -0
- package/dist/eslint/rules/no-choice-control-wrapper.js +2 -0
- package/dist/eslint/rules/no-decorative-icon.js +164 -0
- package/dist/eslint/rules/no-deprecated-zod-api.js +1 -0
- package/dist/eslint/rules/no-shadcn-appearance-override.js +1 -0
- package/dist/eslint/rules/no-subject-derived-expectation.js +1 -1
- package/dist/eslint/rules/no-write-in-subscription.js +1 -0
- package/dist/eslint/rules/page-composition.js +232 -0
- package/dist/eslint/rules/rendered-import.js +121 -0
- package/dist/eslint/strict-design-system.js +1 -1
- package/dist/hooks/use-hydrated.d.ts +2 -0
- package/dist/hooks/use-hydrated.d.ts.map +1 -0
- package/dist/hooks/use-hydrated.js +7 -0
- package/dist/index.d.ts +15 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -10
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +2 -1
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.js +3 -1
- package/dist/internal/assistant-ui/thread.js +3 -1
- package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +13 -13
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-group.js +3 -1
- package/dist/internal/catalog-list.d.ts +14 -0
- package/dist/internal/catalog-list.d.ts.map +1 -0
- package/dist/internal/catalog-list.js +53 -0
- package/dist/internal/empty.d.ts +6 -9
- package/dist/internal/empty.d.ts.map +1 -1
- package/dist/internal/empty.js +24 -22
- package/dist/internal/footer-strip.d.ts +0 -4
- package/dist/internal/footer-strip.d.ts.map +1 -1
- package/dist/internal/footer-strip.js +0 -4
- package/dist/internal/record-menu-items.d.ts +19 -0
- package/dist/internal/record-menu-items.d.ts.map +1 -0
- package/dist/internal/record-menu-items.js +20 -0
- package/dist/internal/settings-save.d.ts +43 -0
- package/dist/internal/settings-save.d.ts.map +1 -0
- package/dist/internal/settings-save.js +147 -0
- package/dist/lib/theme-mode.d.ts +1 -1
- package/dist/lib/theme-mode.js +2 -2
- package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/lib/use-copy-to-clipboard.js +1 -0
- package/dist/showcase/assets.d.ts +8 -0
- package/dist/showcase/assets.d.ts.map +1 -0
- package/dist/showcase/assets.js +13 -0
- package/dist/showcase/foundations.d.ts +2 -0
- package/dist/showcase/foundations.d.ts.map +1 -0
- package/dist/showcase/foundations.js +61 -0
- package/dist/showcase/samples.d.ts +21 -0
- package/dist/showcase/samples.d.ts.map +1 -0
- package/dist/showcase/samples.js +48 -0
- package/dist/showcase/showcase.d.ts +10 -0
- package/dist/showcase/showcase.d.ts.map +1 -0
- package/dist/showcase/showcase.js +44 -0
- package/dist/showcase/specimens/actions.d.ts +7 -0
- package/dist/showcase/specimens/actions.d.ts.map +1 -0
- package/dist/showcase/specimens/actions.js +15 -0
- package/dist/showcase/specimens/charts.d.ts +17 -0
- package/dist/showcase/specimens/charts.d.ts.map +1 -0
- package/dist/showcase/specimens/charts.js +104 -0
- package/dist/showcase/specimens/choices.d.ts +21 -0
- package/dist/showcase/specimens/choices.d.ts.map +1 -0
- package/dist/showcase/specimens/choices.js +68 -0
- package/dist/showcase/specimens/compositions.d.ts +39 -0
- package/dist/showcase/specimens/compositions.d.ts.map +1 -0
- package/dist/showcase/specimens/compositions.js +270 -0
- package/dist/showcase/specimens/data.d.ts +31 -0
- package/dist/showcase/specimens/data.d.ts.map +1 -0
- package/dist/showcase/specimens/data.js +111 -0
- package/dist/showcase/specimens/feedback.d.ts +23 -0
- package/dist/showcase/specimens/feedback.d.ts.map +1 -0
- package/dist/showcase/specimens/feedback.js +64 -0
- package/dist/showcase/specimens/index.d.ts +164 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -0
- package/dist/showcase/specimens/index.js +24 -0
- package/dist/showcase/specimens/inputs.d.ts +22 -0
- package/dist/showcase/specimens/inputs.d.ts.map +1 -0
- package/dist/showcase/specimens/inputs.js +60 -0
- package/dist/showcase/specimens/menus.d.ts +20 -0
- package/dist/showcase/specimens/menus.d.ts.map +1 -0
- package/dist/showcase/specimens/menus.js +65 -0
- package/dist/showcase/specimens/navigation.d.ts +22 -0
- package/dist/showcase/specimens/navigation.d.ts.map +1 -0
- package/dist/showcase/specimens/navigation.js +103 -0
- package/dist/showcase/specimens/other.d.ts +26 -0
- package/dist/showcase/specimens/other.d.ts.map +1 -0
- package/dist/showcase/specimens/other.js +73 -0
- package/dist/showcase/specimens/specimen.d.ts +5 -0
- package/dist/showcase/specimens/specimen.d.ts.map +1 -0
- package/dist/showcase/specimens/specimen.js +1 -0
- package/dist/showcase/specimens/status.d.ts +22 -0
- package/dist/showcase/specimens/status.d.ts.map +1 -0
- package/dist/showcase/specimens/status.js +44 -0
- package/dist/showcase/usage.generated.d.ts +16 -0
- package/dist/showcase/usage.generated.d.ts.map +1 -0
- package/dist/showcase/usage.generated.js +1788 -0
- package/dist/standalone/index.js +2 -2
- package/dist/standalone/orb-page.js +1 -0
- package/dist/styles/components.css +21 -0
- package/package.json +8 -3
- package/dist/components/automation-section.d.ts +0 -78
- package/dist/components/automation-section.d.ts.map +0 -1
- package/dist/components/automation-section.js +0 -75
- package/dist/components/catalog-tile.d.ts +0 -19
- package/dist/components/catalog-tile.d.ts.map +0 -1
- package/dist/components/catalog-tile.js +0 -13
- package/dist/components/feedback-state.d.ts +0 -14
- package/dist/components/feedback-state.d.ts.map +0 -1
- package/dist/components/feedback-state.js +0 -65
- package/dist/components/installer-shell.d.ts +0 -25
- package/dist/components/installer-shell.d.ts.map +0 -1
- package/dist/components/installer-shell.js +0 -32
- package/dist/components/settings-form.d.ts +0 -9
- package/dist/components/settings-form.d.ts.map +0 -1
- package/dist/components/settings-form.js +0 -85
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* The column a page's content stands in: full, reading or configuration width.
|
|
5
|
+
*
|
|
6
|
+
* @family Other
|
|
7
|
+
* @when Setting a page's measure: `reading` for prose and conversations, `configuration` for
|
|
8
|
+
* settings, `full` for collections.
|
|
9
|
+
* @instead A settings page's column is `SettingsPage`'s. A card row is `CardRow`.
|
|
10
|
+
* @behaviour Centred with a maximum width per kind; full takes the content's width.
|
|
11
|
+
* @words None of its own.
|
|
12
|
+
* @access A layout container.
|
|
13
|
+
*/
|
|
3
14
|
function ReadingColumn({ width = "reading", className, ...props }) {
|
|
4
15
|
return (_jsx("div", { "data-slot": "reading-column", "data-width": width, className: cn("mx-auto flex w-full min-w-0 flex-col gap-6", width === "reading" && "max-w-3xl", width === "configuration" && "max-w-4xl", className), ...props }));
|
|
5
16
|
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import { type IdentityMarkProps } from "./identity-mark.js";
|
|
2
3
|
/**
|
|
3
4
|
* A record's identity in a row (DESIGN.md "Tables and missing values"): its
|
|
4
|
-
* mark, its name, and under it one muted `detail` line saying what the
|
|
5
|
-
* is or where it comes from, so the row reads without a column heading.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* mark at 32, its name, and under it one muted `detail` line saying what the
|
|
6
|
+
* record is or where it comes from, so the row reads without a column heading.
|
|
7
|
+
*
|
|
8
|
+
* @family Status
|
|
9
|
+
* @when The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.
|
|
10
|
+
* @instead An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.
|
|
11
|
+
* @behaviour The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. `wraps` only when the name is the whole record, such as a memory. The detail breaks between words, so a failure inside the row is read whole. The table owns the link.
|
|
12
|
+
* @words The name as the record calls itself. Detail: kind, then relation, three to six words: "Company skill · every Agent has it".
|
|
13
|
+
* @access The name is the row link's text; the mark is decorative; the title carries the full name.
|
|
10
14
|
*/
|
|
11
15
|
declare function RecordIdentity({ name, mark, hint, detail, wraps, }: {
|
|
12
16
|
name: ReactNode;
|
|
13
|
-
|
|
17
|
+
/** Drawn at 32, whatever size it carries. */
|
|
18
|
+
mark?: IdentityMarkProps;
|
|
14
19
|
/** Read after the name in its title, such as an identifier the row does not show. */
|
|
15
20
|
hint?: string;
|
|
16
21
|
detail?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGlF;;;;;;;;;;;GAWG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAa,GACd,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,+BA2BA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IdentityMark } from "./identity-mark.js";
|
|
2
3
|
import { cn } from "../lib/utils.js";
|
|
3
4
|
/**
|
|
4
5
|
* A record's identity in a row (DESIGN.md "Tables and missing values"): its
|
|
5
|
-
* mark, its name, and under it one muted `detail` line saying what the
|
|
6
|
-
* is or where it comes from, so the row reads without a column heading.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* mark at 32, its name, and under it one muted `detail` line saying what the
|
|
7
|
+
* record is or where it comes from, so the row reads without a column heading.
|
|
8
|
+
*
|
|
9
|
+
* @family Status
|
|
10
|
+
* @when The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.
|
|
11
|
+
* @instead An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.
|
|
12
|
+
* @behaviour The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. `wraps` only when the name is the whole record, such as a memory. The detail breaks between words, so a failure inside the row is read whole. The table owns the link.
|
|
13
|
+
* @words The name as the record calls itself. Detail: kind, then relation, three to six words: "Company skill · every Agent has it".
|
|
14
|
+
* @access The name is the row link's text; the mark is decorative; the title carries the full name.
|
|
11
15
|
*/
|
|
12
16
|
function RecordIdentity({ name, mark, hint, detail, wraps = false, }) {
|
|
17
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- name is a ReactNode; only a string can be a title attribute.
|
|
13
18
|
const title = typeof name === "string" ? (hint ? `${name} · ${hint}` : name) : undefined;
|
|
14
|
-
return (_jsxs("span", { className: "flex min-w-0 items-center gap-2.5", "data-slot": "record-identity", children: [mark, _jsxs("span", { className: "grid min-w-0", children: [_jsx("span", { className: cn("min-w-0 font-medium", wraps ? "break-words whitespace-pre-wrap" : "truncate"), title: wraps ? undefined : title, children: name }), detail ? (_jsx("span", { className: "text-xs break-words whitespace-normal text-muted-foreground", "data-slot": "record-identity-detail", children: detail })) : null] })] }));
|
|
19
|
+
return (_jsxs("span", { className: "flex min-w-0 items-center gap-2.5", "data-slot": "record-identity", children: [mark ? _jsx(IdentityMark, { ...mark, size: 32 }) : null, _jsxs("span", { className: "grid min-w-0", children: [_jsx("span", { className: cn("min-w-0 font-medium", wraps ? "break-words whitespace-pre-wrap" : "truncate"), title: wraps ? undefined : title, children: name }), detail ? (_jsx("span", { className: "text-xs break-words whitespace-normal text-muted-foreground", "data-slot": "record-identity-detail", children: detail })) : null] })] }));
|
|
15
20
|
}
|
|
16
21
|
export { RecordIdentity };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { RowData } from "@tanstack/react-table";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type MenuCommand } from "./action-menu.js";
|
|
4
|
+
import { type DataTableRowLinkProps } from "./data-table.js";
|
|
5
|
+
import { type EmptyStateKind } from "./empty-state.js";
|
|
6
|
+
import type { IdentityMarkProps } from "./identity-mark.js";
|
|
7
|
+
import { type PageCommand } from "./page-actions.js";
|
|
8
|
+
import { type StatusBadgeTone } from "./status-badge.js";
|
|
9
|
+
import { type RowMessage } from "../internal/row-message.js";
|
|
10
|
+
export type { RowMessage };
|
|
11
|
+
export type RecordName = {
|
|
12
|
+
/** One line, ending in an ellipsis and whole in its title, unless the list `wraps`. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** One muted line: what it is or where it comes from. */
|
|
15
|
+
detail?: ReactNode;
|
|
16
|
+
/** Its identity mark, drawn at 32. */
|
|
17
|
+
mark?: IdentityMarkProps;
|
|
18
|
+
};
|
|
19
|
+
export type RecordFact<TRecord> = {
|
|
20
|
+
id: string;
|
|
21
|
+
/** The column's name for assistive technology. */
|
|
22
|
+
label: string;
|
|
23
|
+
of: (record: TRecord) => ReactNode;
|
|
24
|
+
/** A phrase that takes the row's spare width; otherwise one line at its own width. */
|
|
25
|
+
prose?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type RecordStatus = {
|
|
28
|
+
label: string;
|
|
29
|
+
tone: StatusBadgeTone;
|
|
30
|
+
};
|
|
31
|
+
export type RecordTimeColumn<TRecord> = {
|
|
32
|
+
label: string;
|
|
33
|
+
of: (record: TRecord) => Date | number | string | null | undefined;
|
|
34
|
+
/** The time's sentence for this record: "Ran today 07:30", "Next Monday". */
|
|
35
|
+
phrase: (when: string, record: TRecord) => string;
|
|
36
|
+
/** What a screen reader hears beside the muted dash where a record has no time. */
|
|
37
|
+
missing: string;
|
|
38
|
+
locale?: string;
|
|
39
|
+
};
|
|
40
|
+
export type RecordListFooter = {
|
|
41
|
+
/** "5 Agents" */
|
|
42
|
+
count?: ReactNode;
|
|
43
|
+
/** A bounded server page: "Page 1 of 6" and the way to the others. */
|
|
44
|
+
pages?: {
|
|
45
|
+
label: ReactNode;
|
|
46
|
+
previous: PageCommand;
|
|
47
|
+
next: PageCommand;
|
|
48
|
+
pending?: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type RecordListProps<TRecord extends RowData> = {
|
|
52
|
+
/** Names the list for assistive technology: "Skills". */
|
|
53
|
+
label: string;
|
|
54
|
+
/** Already searched, filtered and ordered; undefined while they load. */
|
|
55
|
+
records: readonly TRecord[] | undefined;
|
|
56
|
+
getId: (record: TRecord) => string;
|
|
57
|
+
name: (record: TRecord) => RecordName;
|
|
58
|
+
/** The name is the record's whole text, such as a memory: it wraps in full. */
|
|
59
|
+
wraps?: boolean;
|
|
60
|
+
facts?: readonly RecordFact<TRecord>[];
|
|
61
|
+
/** Only for the exception: null for the usual record. */
|
|
62
|
+
status?: {
|
|
63
|
+
label: string;
|
|
64
|
+
of: (record: TRecord) => RecordStatus | null;
|
|
65
|
+
};
|
|
66
|
+
time?: RecordTimeColumn<TRecord>;
|
|
67
|
+
/** The row's one visible command, an outline button before the three dots: "Connect", "Open report". */
|
|
68
|
+
command?: (record: TRecord) => ReactNode;
|
|
69
|
+
/** The row's three dots; its first line is `name(record).name`. */
|
|
70
|
+
menu?: (record: TRecord) => {
|
|
71
|
+
label: string;
|
|
72
|
+
commands: readonly MenuCommand[];
|
|
73
|
+
} | null;
|
|
74
|
+
/** Names the command column for assistive technology: "Actions". */
|
|
75
|
+
commandsHeader?: string;
|
|
76
|
+
/** The record opens its own page: the whole row is one target. */
|
|
77
|
+
open?: {
|
|
78
|
+
href: (record: TRecord) => string | null;
|
|
79
|
+
label: (record: TRecord) => string;
|
|
80
|
+
renderLink?: (props: DataTableRowLinkProps) => ReactNode;
|
|
81
|
+
};
|
|
82
|
+
/** The record's own action failed or was refused: its message inside its row. */
|
|
83
|
+
state?: (record: TRecord) => RowMessage | null;
|
|
84
|
+
/** The record being edited: its RowEditForm, inside its row. */
|
|
85
|
+
editor?: {
|
|
86
|
+
id: string;
|
|
87
|
+
render: (record: TRecord) => ReactNode;
|
|
88
|
+
};
|
|
89
|
+
/** Names the rows while they load; `label` when left out. */
|
|
90
|
+
loadingLabel?: string;
|
|
91
|
+
failed?: EmptyStateKind<"failed">;
|
|
92
|
+
empty?: EmptyStateKind<"firstUse"> | EmptyStateKind<"nothingYet">;
|
|
93
|
+
/** Given only while a search or filter is set. */
|
|
94
|
+
noMatch?: Omit<EmptyStateKind<"noResults">, "kind">;
|
|
95
|
+
/**
|
|
96
|
+
* A list that is one section of another page: "Needs attention", "2 of 5 Agents", and the one
|
|
97
|
+
* line under the title that says what joins the list: "Every Agent of an allowed Nadia joins".
|
|
98
|
+
*/
|
|
99
|
+
heading?: {
|
|
100
|
+
title: string;
|
|
101
|
+
description?: ReactNode;
|
|
102
|
+
meta?: ReactNode;
|
|
103
|
+
};
|
|
104
|
+
footer?: RecordListFooter;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* One line per record, on one resting card: its identity mark and name over
|
|
108
|
+
* what it is, a few comparable facts, a status only for the exception, when
|
|
109
|
+
* it happened, the row's one command, and its three dots last.
|
|
110
|
+
*
|
|
111
|
+
* @family Compositions
|
|
112
|
+
* @when A list of records inside another page: an Overview's exceptions, an object page's "Needs attention", any section that lists records a person opens or acts on. A page whose whole job is the list is a `CollectionPage`, which draws this.
|
|
113
|
+
* @instead Figures compared across records, read by their column headings, are a `DataTable`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`.
|
|
114
|
+
* @behaviour Each row reads left to right at fixed measures: the mark and name (at most a third of the row), facts on one line, the status in its 150 px slot only when the record is the exception, the time right-aligned in tabular figures with the exact moment on hover, the row command at most 192 px wide with its label cut short, then the three dots, or a muted chevron when the row only opens. On a card too narrow for them (768 px, or 1024 px for seven columns or more or a row command), the facts, the status and the time move under the record's line, leaving out a fact or status the record does not have, and the name and its commands keep theirs. A menu of one command that is not destructive, with no row command, is that command's outline button. With `open` the whole row is one target. A failed or refused action of the record replaces its detail line, with its next steps beside its commands; the record being edited opens its form under its own line. While the records load, three still skeleton rows hold the place; then, first that holds: the failed read, no match, the empty state, the rows. A list with no records and no empty state draws nothing.
|
|
115
|
+
* @words Every string is the product's: `label` names the list, a time's `phrase` writes its sentence ("Updated {when}"), `missing` is what a screen reader hears for a record with no time, the menu's `label` reads "More for {record}". A status is the exception's word ("Needs attention"), never "Active" on every row.
|
|
116
|
+
* @access A table named by `label`, its column headings read by assistive technology only. The row link carries `open.label`; the three dots carry the menu's `label`, and the menu's first line names the record. The loading rows are a busy status named by `loadingLabel`.
|
|
117
|
+
*/
|
|
118
|
+
export declare function RecordList<TRecord extends RowData>(props: RecordListProps<TRecord>): import("react").JSX.Element | null;
|
|
119
|
+
//# sourceMappingURL=record-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-list.d.ts","sourceRoot":"","sources":["../../src/components/record-list.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight } from "lucide-react";
|
|
4
|
+
import { createContext, useContext } from "react";
|
|
5
|
+
import { ActionMenu } from "./action-menu.js";
|
|
6
|
+
import { DataTable, } from "./data-table.js";
|
|
7
|
+
import { EmptyState } from "./empty-state.js";
|
|
8
|
+
import { PageCommandButton } from "./page-actions.js";
|
|
9
|
+
import { RecordIdentity } from "./record-identity.js";
|
|
10
|
+
import { RecordTime, recordDate } from "./record-time.js";
|
|
11
|
+
import { Skeleton } from "./skeleton.js";
|
|
12
|
+
import { StatusBadge } from "./status-badge.js";
|
|
13
|
+
import { TableCard } from "./table-card.js";
|
|
14
|
+
import { TableValue } from "./table-value.js";
|
|
15
|
+
import { soleMenuButton } from "../internal/record-menu-items.js";
|
|
16
|
+
import { RowMessageActions, RowMessageLine } from "../internal/row-message.js";
|
|
17
|
+
const ShownList = createContext(undefined);
|
|
18
|
+
function useShownList() {
|
|
19
|
+
// SAFETY: only RecordList provides ShownList, with its own props, around the rows of that same RecordList<TRecord>.
|
|
20
|
+
return useContext(ShownList);
|
|
21
|
+
}
|
|
22
|
+
/*
|
|
23
|
+
* Each cell is one component for the list's whole life: TanStack renders a
|
|
24
|
+
* column's `cell` as a component, so a function made anew on each render would
|
|
25
|
+
* remount every row's cells on every render, closing a row's open menu when
|
|
26
|
+
* the records are read again. The cells read the list's current props instead.
|
|
27
|
+
*/
|
|
28
|
+
function NameCell({ row }) {
|
|
29
|
+
const list = useShownList();
|
|
30
|
+
const shown = list.name(row.original);
|
|
31
|
+
const state = list.state?.(row.original);
|
|
32
|
+
return (_jsx(RecordIdentity, { detail: state ? _jsx(RowMessageLine, { state: state }) : shown.detail, mark: shown.mark, name: shown.name, wraps: list.wraps }));
|
|
33
|
+
}
|
|
34
|
+
function FactCell({ column, row }) {
|
|
35
|
+
const fact = useShownList().facts?.find((each) => each.id === column.id);
|
|
36
|
+
return _jsx(_Fragment, { children: fact?.of(row.original) });
|
|
37
|
+
}
|
|
38
|
+
function StatusCell({ row }) {
|
|
39
|
+
const shown = useShownList().status?.of(row.original);
|
|
40
|
+
return (_jsx("div", { className: "w-37.5", children: shown ? _jsx(StatusBadge, { label: shown.label, tone: shown.tone }) : null }));
|
|
41
|
+
}
|
|
42
|
+
function TimeCell({ row }) {
|
|
43
|
+
const time = useShownList().time;
|
|
44
|
+
if (!time)
|
|
45
|
+
return null;
|
|
46
|
+
const record = row.original;
|
|
47
|
+
const at = recordDate(time.of(record));
|
|
48
|
+
return (_jsx("div", { className: "w-23 text-right text-muted-foreground tabular-nums", children: _jsx(TableValue, { missingLabel: time.missing, value: at ? (_jsx(RecordTime, { at: at, locale: time.locale, phrase: (when) => time.phrase(when, record) })) : null }) }));
|
|
49
|
+
}
|
|
50
|
+
function CommandsCell({ row }) {
|
|
51
|
+
const list = useShownList();
|
|
52
|
+
const record = row.original;
|
|
53
|
+
const state = list.state?.(record);
|
|
54
|
+
const menu = list.menu?.(record);
|
|
55
|
+
const commands = menu?.commands ?? [];
|
|
56
|
+
const menuButton = list.command ? undefined : soleMenuButton(commands);
|
|
57
|
+
const command = menuButton ? (_jsx(PageCommandButton, { command: menuButton, variant: "outline" })) : (list.command?.(record));
|
|
58
|
+
const end = menu && commands.length > 0 && !menuButton ? (_jsx(ActionMenu, { commands: commands, label: menu.label, record: list.name(record).name })) : list.open?.href(record) && !state ? (_jsx(ChevronRight, { "aria-hidden": "true", className: "size-4 text-muted-foreground" })) : null;
|
|
59
|
+
if (!command && !state && !end)
|
|
60
|
+
return null;
|
|
61
|
+
return (_jsxs("div", { className: "flex items-center justify-end gap-2", children: [command ? (_jsx("div", { className: "flex max-w-48 min-w-28 justify-end [&>*]:max-w-full [&>*]:min-w-0 [&>*]:shrink [&>*>span:not([data-icon])]:truncate", children: command })) : null, state ? _jsx(RowMessageActions, { state: state }) : null, end] }));
|
|
62
|
+
}
|
|
63
|
+
function LoadingRecords({ label }) {
|
|
64
|
+
return (_jsx("div", { "aria-busy": "true", "aria-label": label, className: "divide-y divide-border", role: "status", children: Array.from({ length: 3 }, (_, index) => (_jsxs("div", { className: "flex min-h-14 items-center gap-4 pr-2 pl-4", children: [_jsx(Skeleton, { className: "size-8 shrink-0" }), _jsxs("div", { className: "grid min-w-0 gap-1.5", children: [_jsx(Skeleton, { className: "h-4 w-40 max-w-full" }), _jsx(Skeleton, { className: "h-3 w-56 max-w-full" })] }), _jsx(Skeleton, { className: "ml-auto h-4 w-23" })] }, index))) }));
|
|
65
|
+
}
|
|
66
|
+
function Pages({ pages }) {
|
|
67
|
+
const waiting = (command) => pages.pending ? { ...command, disabled: true } : command;
|
|
68
|
+
return (_jsxs("div", { "aria-busy": pages.pending ? true : undefined, className: "flex items-center gap-3", children: [_jsx("span", { className: "tabular-nums", children: pages.label }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(PageCommandButton, { command: waiting(pages.previous), variant: "outline" }), _jsx(PageCommandButton, { command: waiting(pages.next), variant: "outline" })] })] }));
|
|
69
|
+
}
|
|
70
|
+
function recordColumns(props) {
|
|
71
|
+
const columns = [
|
|
72
|
+
{
|
|
73
|
+
id: "name",
|
|
74
|
+
header: props.label,
|
|
75
|
+
meta: props.wraps ? { wraps: true } : undefined,
|
|
76
|
+
cell: NameCell,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
for (const fact of props.facts ?? []) {
|
|
80
|
+
columns.push({
|
|
81
|
+
id: fact.id,
|
|
82
|
+
header: fact.label,
|
|
83
|
+
accessorFn: fact.of,
|
|
84
|
+
meta: { ...(fact.prose ? { prose: true } : { narrow: true }), optional: true },
|
|
85
|
+
cell: FactCell,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if (props.status) {
|
|
89
|
+
columns.push({
|
|
90
|
+
id: "status",
|
|
91
|
+
header: props.status.label,
|
|
92
|
+
accessorFn: props.status.of,
|
|
93
|
+
meta: { narrow: true, optional: true },
|
|
94
|
+
cell: StatusCell,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (props.time) {
|
|
98
|
+
columns.push({ id: "time", header: props.time.label, meta: { narrow: true }, cell: TimeCell });
|
|
99
|
+
}
|
|
100
|
+
if (props.menu || props.command || props.open || props.state) {
|
|
101
|
+
columns.push({
|
|
102
|
+
id: "commands",
|
|
103
|
+
header: props.commandsHeader ?? props.label,
|
|
104
|
+
meta: { narrow: true },
|
|
105
|
+
cell: CommandsCell,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return columns;
|
|
109
|
+
}
|
|
110
|
+
function RecordRows(props) {
|
|
111
|
+
const columns = recordColumns(props);
|
|
112
|
+
const table = {
|
|
113
|
+
columns,
|
|
114
|
+
data: [...props.records],
|
|
115
|
+
embedded: true,
|
|
116
|
+
empty: { kind: "nothingYet", message: props.label },
|
|
117
|
+
getRowId: props.getId,
|
|
118
|
+
compactLayout: columns.length >= 7 || props.command !== undefined
|
|
119
|
+
? "wide"
|
|
120
|
+
: "standard",
|
|
121
|
+
primaryColumns: ["name", "commands"],
|
|
122
|
+
showColumnHeaders: false,
|
|
123
|
+
rowEditor: props.editor ? { rowId: props.editor.id, render: props.editor.render } : undefined,
|
|
124
|
+
tableLabel: props.label,
|
|
125
|
+
};
|
|
126
|
+
return props.open ? (_jsx(DataTable, { ...table, primaryColumnId: "name", renderRowLink: props.open.renderLink, rowHref: props.open.href, rowLabel: props.open.label })) : (_jsx(DataTable, { ...table }));
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* One line per record, on one resting card: its identity mark and name over
|
|
130
|
+
* what it is, a few comparable facts, a status only for the exception, when
|
|
131
|
+
* it happened, the row's one command, and its three dots last.
|
|
132
|
+
*
|
|
133
|
+
* @family Compositions
|
|
134
|
+
* @when A list of records inside another page: an Overview's exceptions, an object page's "Needs attention", any section that lists records a person opens or acts on. A page whose whole job is the list is a `CollectionPage`, which draws this.
|
|
135
|
+
* @instead Figures compared across records, read by their column headings, are a `DataTable`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`.
|
|
136
|
+
* @behaviour Each row reads left to right at fixed measures: the mark and name (at most a third of the row), facts on one line, the status in its 150 px slot only when the record is the exception, the time right-aligned in tabular figures with the exact moment on hover, the row command at most 192 px wide with its label cut short, then the three dots, or a muted chevron when the row only opens. On a card too narrow for them (768 px, or 1024 px for seven columns or more or a row command), the facts, the status and the time move under the record's line, leaving out a fact or status the record does not have, and the name and its commands keep theirs. A menu of one command that is not destructive, with no row command, is that command's outline button. With `open` the whole row is one target. A failed or refused action of the record replaces its detail line, with its next steps beside its commands; the record being edited opens its form under its own line. While the records load, three still skeleton rows hold the place; then, first that holds: the failed read, no match, the empty state, the rows. A list with no records and no empty state draws nothing.
|
|
137
|
+
* @words Every string is the product's: `label` names the list, a time's `phrase` writes its sentence ("Updated {when}"), `missing` is what a screen reader hears for a record with no time, the menu's `label` reads "More for {record}". A status is the exception's word ("Needs attention"), never "Active" on every row.
|
|
138
|
+
* @access A table named by `label`, its column headings read by assistive technology only. The row link carries `open.label`; the three dots carry the menu's `label`, and the menu's first line names the record. The loading rows are a busy status named by `loadingLabel`.
|
|
139
|
+
*/
|
|
140
|
+
export function RecordList(props) {
|
|
141
|
+
const { records, heading, footer } = props;
|
|
142
|
+
let body;
|
|
143
|
+
if (props.failed) {
|
|
144
|
+
body = _jsx(EmptyState, { ...props.failed, scope: "card" });
|
|
145
|
+
}
|
|
146
|
+
else if (records === undefined) {
|
|
147
|
+
body = _jsx(LoadingRecords, { label: props.loadingLabel ?? props.label });
|
|
148
|
+
}
|
|
149
|
+
else if (records.length === 0 && props.noMatch) {
|
|
150
|
+
body = _jsx(EmptyState, { kind: "noResults", ...props.noMatch, scope: "card" });
|
|
151
|
+
}
|
|
152
|
+
else if (records.length === 0) {
|
|
153
|
+
if (!props.empty)
|
|
154
|
+
return null;
|
|
155
|
+
body = _jsx(EmptyState, { ...props.empty, headingLevel: heading ? 3 : 2, scope: "card" });
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
body = _jsx(RecordRows, { ...props, records: records });
|
|
159
|
+
}
|
|
160
|
+
return (_jsx(TableCard, { actions: heading?.meta ? (_jsx("span", { className: "text-body-sm text-muted-foreground", children: heading.meta })) : undefined, footer: footer?.pages ? _jsx(Pages, { pages: footer.pages }) : undefined, footerHint: footer?.count, description: heading?.description, title: heading?.title, children: _jsx(ShownList.Provider, { value: props, children: body }) }));
|
|
161
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import type { CopyButtonProps } from "./copy-button.js";
|
|
3
|
+
import { type ObjectFact } from "./object-workspace.js";
|
|
4
|
+
import { type PageCommand } from "./page-actions.js";
|
|
5
|
+
import { SheetContent } from "./sheet.js";
|
|
6
|
+
export type RecordSheetProps = {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onOpenChange: (open: boolean) => void;
|
|
9
|
+
/** Names the record: "invoice.payment_failed". */
|
|
10
|
+
title: string;
|
|
11
|
+
/** One muted line: "Beta Studio · Oct 13, 14:02". */
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
closeLabel: string;
|
|
14
|
+
facts: readonly ObjectFact[];
|
|
15
|
+
/** A read-only payload, such as an event's JSON, with its copy button's words. */
|
|
16
|
+
code?: {
|
|
17
|
+
label: string;
|
|
18
|
+
value: string;
|
|
19
|
+
} & Pick<CopyButtonProps, "copyLabel" | "copiedLabel" | "copyFailedLabel">;
|
|
20
|
+
/** The way to the record's owner: "Open Beta Studio". */
|
|
21
|
+
footer?: PageCommand;
|
|
22
|
+
/** The row it opened from, which takes focus back on Close. */
|
|
23
|
+
finalFocus?: ComponentProps<typeof SheetContent>["finalFocus"];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* One record from a list, looked at in a sheet at the right edge, then back to the list.
|
|
27
|
+
*
|
|
28
|
+
* @family Compositions
|
|
29
|
+
* @when A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row.
|
|
30
|
+
* @instead A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.
|
|
31
|
+
* @behaviour Opens from the right, 420 px wide and 8 px from the window, the list still behind it, with 12 px corners on its free edges. The header holds the record's name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button; the footer holds one command to the record's owner. It has no states of its own: it opens only on a record.
|
|
32
|
+
* @words The title is the record's own name, as its row shows it. The footer's command names where it goes: "Open Beta Studio".
|
|
33
|
+
* @access A modal dialog named by its title; Escape and Close close it, and focus returns to the row it opened from (`finalFocus`). The payload is a read-only text area named by its label.
|
|
34
|
+
*/
|
|
35
|
+
export declare function RecordSheet({ open, onOpenChange, title, description, closeLabel, facts, code, footer, finalFocus, }: RecordSheetProps): import("react").JSX.Element;
|
|
36
|
+
//# sourceMappingURL=record-sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-sheet.d.ts","sourceRoot":"","sources":["../../src/components/record-sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAEL,YAAY,EAKb,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,kFAAkF;IAClF,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAC5C,eAAe,EACf,WAAW,GAAG,aAAa,GAAG,iBAAiB,CAChD,CAAC;IACF,yDAAyD;IACzD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC;CAChE,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,KAAK,EACL,IAAI,EACJ,MAAM,EACN,UAAU,GACX,EAAE,gBAAgB,+BAoClB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CodeBlock } from "./code-block.js";
|
|
4
|
+
import { ObjectFacts } from "./object-workspace.js";
|
|
5
|
+
import { PageCommandButton } from "./page-actions.js";
|
|
6
|
+
import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, } from "./sheet.js";
|
|
7
|
+
/**
|
|
8
|
+
* One record from a list, looked at in a sheet at the right edge, then back to the list.
|
|
9
|
+
*
|
|
10
|
+
* @family Compositions
|
|
11
|
+
* @when A list's record holds more than its row shows and is only read, not changed: a Stripe event in Billing, a usage row.
|
|
12
|
+
* @instead A record changed from its list edits in its row with `RowEditForm`; a record with sections and commands of its own has its own page, an `ObjectPage`; a choice from a catalogue is a `CatalogDrawer`.
|
|
13
|
+
* @behaviour Opens from the right, 420 px wide and 8 px from the window, the list still behind it, with 12 px corners on its free edges. The header holds the record's name, one muted line and Close; the body scrolls through its facts as labelled values, then the read-only payload with its copy button; the footer holds one command to the record's owner. It has no states of its own: it opens only on a record.
|
|
14
|
+
* @words The title is the record's own name, as its row shows it. The footer's command names where it goes: "Open Beta Studio".
|
|
15
|
+
* @access A modal dialog named by its title; Escape and Close close it, and focus returns to the row it opened from (`finalFocus`). The payload is a read-only text area named by its label.
|
|
16
|
+
*/
|
|
17
|
+
export function RecordSheet({ open, onOpenChange, title, description, closeLabel, facts, code, footer, finalFocus, }) {
|
|
18
|
+
return (_jsx(Sheet, { onOpenChange: onOpenChange, open: open, children: _jsxs(SheetContent, { className: "max-sm:data-[side=right]:left-nadicode-sm max-sm:data-[side=right]:w-auto data-[side=right]:sm:w-[420px] data-[side=right]:sm:max-w-[calc(100%-var(--nc-lg))]", closeLabel: closeLabel, finalFocus: finalFocus, side: "right", children: [_jsxs(SheetHeader, { className: "pr-12", children: [_jsx(SheetTitle, { className: "break-words", children: title }), description ? _jsx(SheetDescription, { children: description }) : null] }), _jsxs("div", { className: "grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)] content-start gap-nadicode-md overflow-y-auto px-nadicode-lg pb-nadicode-lg", "data-slot": "record-sheet-body", children: [_jsx(ObjectFacts, { facts: facts }), code ? (_jsx(CodeBlock, { code: code.value, copiedLabel: code.copiedLabel, copyFailedLabel: code.copyFailedLabel, copyLabel: code.copyLabel, label: code.label })) : null] }), footer ? (_jsx(SheetFooter, { className: "flex-row justify-end", "data-slot": "record-sheet-footer", children: _jsx(PageCommandButton, { command: footer, variant: "outline" }) })) : null] }) }));
|
|
19
|
+
}
|
|
@@ -1,25 +1,41 @@
|
|
|
1
1
|
export type RecordTimeProps = {
|
|
2
2
|
/** When it happened. */
|
|
3
3
|
at: Date | number | string;
|
|
4
|
+
/** The person's language; the runtime's when left out. */
|
|
5
|
+
locale?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The viewer's zone, which a page rendered on a server passes when it knows it. Left out, the browser's zone, and
|
|
8
|
+
* UTC on the server and while the page hydrates, so the server's HTML never shows its own zone as the viewer's.
|
|
9
|
+
*/
|
|
10
|
+
timeZone?: string;
|
|
11
|
+
/** The current time, for a reading that must not drift while it renders. */
|
|
12
|
+
now?: number;
|
|
13
|
+
} & ({
|
|
14
|
+
mode?: "relative";
|
|
4
15
|
/**
|
|
5
16
|
* The sentence the time sits in, which says what happened:
|
|
6
17
|
* `(when) => t("skills.updated", { when })` gives "Updated 3 hours ago".
|
|
7
18
|
*/
|
|
8
19
|
phrase: (when: string) => string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
20
|
+
}
|
|
21
|
+
/** The time of day in the viewer's zone, tabular: "3:05 PM". */
|
|
22
|
+
| {
|
|
23
|
+
mode: "clock";
|
|
24
|
+
});
|
|
14
25
|
/** "3 hours ago" within a week, then "12 Sep", with the year when it is not this year. */
|
|
15
|
-
export declare function formatRecordTime(at: Date, locale?: string, now?: number): string;
|
|
26
|
+
export declare function formatRecordTime(at: Date, locale?: string, now?: number, timeZone?: string): string;
|
|
16
27
|
/** The moment `at` names, or null when it names none, such as an empty or malformed time. */
|
|
17
28
|
export declare function recordDate(at: Date | number | string | null | undefined): Date | null;
|
|
18
29
|
/**
|
|
19
|
-
* When something happened to a record
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
30
|
+
* When something happened to a record: a relative time in the sentence that
|
|
31
|
+
* says what, or the time of day in a feed's time column.
|
|
32
|
+
*
|
|
33
|
+
* @family Data
|
|
34
|
+
* @when The moment a record was made, changed or last ran, in its row or its facts ("Updated 3 hours ago"), and the time of each event in an ActivityFeed or a RunTimeline step (`mode="clock"`).
|
|
35
|
+
* @instead A date a person picks is a Calendar; a span of days a page reads is a DateRangeControl; a run's duration is a fact written by the product ("Took 4 min").
|
|
36
|
+
* @behaviour Relative within a week, then the day and month, with the year only when it is another year; `mode="clock"` prints the time of day in the viewer's zone in tabular figures. Hovering either shows the exact moment in UTC and in the viewer's zone. A page rendered on a server passes the viewer's `timeZone` when it knows it, so the server and the browser write the same time; otherwise the server and the hydrating page write UTC and the page then rewrites it in the browser's zone. A time that names no moment draws nothing.
|
|
37
|
+
* @words The product writes the sentence through `phrase` ("Updated {when}", "Ran {when}"); the clock needs no words. The package formats every date with the person's `locale`.
|
|
38
|
+
* @access A `<time>` element with the machine-readable moment; assistive technology reads the exact local moment after the visible text.
|
|
23
39
|
*/
|
|
24
|
-
export declare function RecordTime(
|
|
40
|
+
export declare function RecordTime(props: RecordTimeProps): import("react").JSX.Element | null;
|
|
25
41
|
//# sourceMappingURL=record-time.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-time.d.ts","sourceRoot":"","sources":["../../src/components/record-time.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-time.d.ts","sourceRoot":"","sources":["../../src/components/record-time.tsx"],"names":[],"mappings":"AAcA,MAAM,MAAM,eAAe,GAAG;IAC5B,wBAAwB;IACxB,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,CACA;IACE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAClC;AACH,gEAAgE;GAC9D;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CACpB,CAAC;AAEF,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,IAAI,EACR,MAAM,CAAC,EAAE,MAAM,EACf,GAAG,SAAa,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAcR;AAED,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAIrF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,sCAoDhD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from "./hover-card.js";
|
|
4
|
+
import { useHydrated } from "../hooks/use-hydrated.js";
|
|
3
5
|
const DAY = 86_400_000;
|
|
4
6
|
const WEEK = 7 * DAY;
|
|
5
7
|
const UNITS = [
|
|
@@ -8,7 +10,7 @@ const UNITS = [
|
|
|
8
10
|
["minute", 60_000],
|
|
9
11
|
];
|
|
10
12
|
/** "3 hours ago" within a week, then "12 Sep", with the year when it is not this year. */
|
|
11
|
-
export function formatRecordTime(at, locale, now = Date.now()) {
|
|
13
|
+
export function formatRecordTime(at, locale, now = Date.now(), timeZone) {
|
|
12
14
|
const elapsed = now - at.getTime();
|
|
13
15
|
if (elapsed >= 0 && elapsed < WEEK) {
|
|
14
16
|
const relative = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
|
|
@@ -18,12 +20,12 @@ export function formatRecordTime(at, locale, now = Date.now()) {
|
|
|
18
20
|
}
|
|
19
21
|
return relative.format(0, "minute");
|
|
20
22
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
const yearOf = new Intl.DateTimeFormat("en", { timeZone, year: "numeric" });
|
|
24
|
+
const sameYear = yearOf.format(at) === yearOf.format(now);
|
|
25
|
+
const shown = { timeZone, day: "numeric", month: "short" };
|
|
26
|
+
if (!sameYear)
|
|
27
|
+
shown.year = "numeric";
|
|
28
|
+
return new Intl.DateTimeFormat(locale, shown).format(at);
|
|
27
29
|
}
|
|
28
30
|
/** The moment `at` names, or null when it names none, such as an empty or malformed time. */
|
|
29
31
|
export function recordDate(at) {
|
|
@@ -33,20 +35,39 @@ export function recordDate(at) {
|
|
|
33
35
|
return Number.isNaN(date.getTime()) ? null : date;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
|
-
* When something happened to a record
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* When something happened to a record: a relative time in the sentence that
|
|
39
|
+
* says what, or the time of day in a feed's time column.
|
|
40
|
+
*
|
|
41
|
+
* @family Data
|
|
42
|
+
* @when The moment a record was made, changed or last ran, in its row or its facts ("Updated 3 hours ago"), and the time of each event in an ActivityFeed or a RunTimeline step (`mode="clock"`).
|
|
43
|
+
* @instead A date a person picks is a Calendar; a span of days a page reads is a DateRangeControl; a run's duration is a fact written by the product ("Took 4 min").
|
|
44
|
+
* @behaviour Relative within a week, then the day and month, with the year only when it is another year; `mode="clock"` prints the time of day in the viewer's zone in tabular figures. Hovering either shows the exact moment in UTC and in the viewer's zone. A page rendered on a server passes the viewer's `timeZone` when it knows it, so the server and the browser write the same time; otherwise the server and the hydrating page write UTC and the page then rewrites it in the browser's zone. A time that names no moment draws nothing.
|
|
45
|
+
* @words The product writes the sentence through `phrase` ("Updated {when}", "Ran {when}"); the clock needs no words. The package formats every date with the person's `locale`.
|
|
46
|
+
* @access A `<time>` element with the machine-readable moment; assistive technology reads the exact local moment after the visible text.
|
|
40
47
|
*/
|
|
41
|
-
export function RecordTime(
|
|
48
|
+
export function RecordTime(props) {
|
|
49
|
+
const { at, locale, now } = props;
|
|
50
|
+
const hydrated = useHydrated();
|
|
51
|
+
const timeZone = props.timeZone ?? (hydrated ? undefined : "UTC");
|
|
42
52
|
const date = recordDate(at);
|
|
43
53
|
if (!date)
|
|
44
54
|
return null;
|
|
45
|
-
const
|
|
55
|
+
const inZone = new Intl.DateTimeFormat(locale, {
|
|
56
|
+
dateStyle: "long",
|
|
57
|
+
timeStyle: "medium",
|
|
58
|
+
timeZone,
|
|
59
|
+
});
|
|
60
|
+
const local = inZone.format(date);
|
|
46
61
|
const utc = new Intl.DateTimeFormat(locale, {
|
|
47
62
|
dateStyle: "long",
|
|
48
63
|
timeStyle: "medium",
|
|
49
64
|
timeZone: "UTC",
|
|
50
65
|
}).format(date);
|
|
51
|
-
|
|
66
|
+
const clock = props.mode === "clock";
|
|
67
|
+
const shown = clock
|
|
68
|
+
? new Intl.DateTimeFormat(locale, { timeStyle: "short", timeZone }).format(date)
|
|
69
|
+
: props.phrase(formatRecordTime(date, locale, now, timeZone));
|
|
70
|
+
return (_jsxs(HoverCard, { children: [_jsxs(HoverCardTrigger, { render: _jsx("time", { className: clock
|
|
71
|
+
? "whitespace-nowrap tabular-nums text-muted-foreground"
|
|
72
|
+
: "whitespace-nowrap text-muted-foreground", "data-slot": "record-time", dateTime: date.toISOString() }), children: [shown, _jsxs("span", { className: "sr-only", children: [", ", local] })] }), _jsx(HoverCardContent, { className: "w-auto", children: _jsxs("dl", { className: "grid grid-cols-[auto_auto] gap-x-4 gap-y-1 text-xs", "data-slot": "record-time-exact", children: [_jsx("dt", { className: "text-muted-foreground", children: "UTC" }), _jsx("dd", { className: "tabular-nums", children: utc }), _jsx("dt", { className: "text-muted-foreground", children: inZone.resolvedOptions().timeZone }), _jsx("dd", { className: "tabular-nums", children: local })] }) })] }));
|
|
52
73
|
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
/**
|
|
3
|
+
* Panels a person resizes by dragging the handle between them.
|
|
4
|
+
*
|
|
5
|
+
* @family Other
|
|
6
|
+
* @when Side-by-side panes whose balance a person sets: a conversation and its side panel.
|
|
7
|
+
* @instead The product frame's sidebar resizes through `DashboardShell` or `DesktopAppShell`.
|
|
8
|
+
* @behaviour The handle moves on drag and on arrow keys; each panel keeps its minimum and maximum.
|
|
9
|
+
* @words None of its own.
|
|
10
|
+
* @access The handle is the resizable library's focusable separator.
|
|
11
|
+
*/
|
|
2
12
|
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react").JSX.Element;
|
|
3
13
|
declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react").JSX.Element;
|
|
4
14
|
declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D,iBAAS,mBAAmB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,+BASlF;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,+BAElE;AAED,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,cAAc,GAAG;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,+BAaA;AAED,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D;;;;;;;;;GASG;AACH,iBAAS,mBAAmB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,+BASlF;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,+BAElE;AAED,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,cAAc,GAAG;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,+BAaA;AAED,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
|