@nadicodeai/ui 12.1.96 → 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.d.ts +16 -0
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +16 -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 +39 -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 +13 -3
- 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 +10 -0
- 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 +14 -0
- 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-bar-horizontal.d.ts +11 -1
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +12 -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 +33 -20
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +18 -4
- 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 +14 -10
- package/dist/components/chart-date-range.d.ts.map +1 -1
- 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 +10 -0
- 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 -140
- 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 +13 -3
- 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.d.ts +16 -4
- package/dist/components/company-card.d.ts.map +1 -1
- package/dist/components/company-card.js +16 -4
- 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 +14 -0
- package/dist/components/data-table.d.ts +20 -0
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +23 -2
- 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 +6 -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 +34 -7
- 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 +12 -0
- 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 +17 -0
- 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/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 +15 -0
- 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 +16 -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 +15 -2
- 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 +16 -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 +15 -0
- 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/progress.d.ts +10 -8
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +11 -9
- 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 +11 -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 +34 -12
- 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 +13 -2
- 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 +18 -0
- 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 +13 -0
- 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 +27 -42
- 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 +15 -0
- 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 +8 -0
- package/dist/eslint/rules/empty-state-owner.js +145 -0
- package/dist/eslint/rules/menu-owner.js +75 -0
- package/dist/eslint/rules/no-decorative-icon.js +164 -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/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 +1 -1
- 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 +1 -1
- 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 -83
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ChartConfig } from "./chart.js";
|
|
3
3
|
import { type EntityColorMap } from "./chart-entity-colors.js";
|
|
4
|
+
import { type PageCommand } from "./page-actions.js";
|
|
4
5
|
import { type TrendDirection, type TrendTone } from "./trend-badge.js";
|
|
5
|
-
/**
|
|
6
|
-
* chart-card — the Card frame and series plumbing every chart in this kit
|
|
7
|
-
* renders, so the four registry blocks (`chart-bar-stacked`,
|
|
8
|
-
* `chart-area-stacked`, `chart-bar-multiple`) hold only
|
|
9
|
-
* their own plot. It is the stock block's own shell —
|
|
10
|
-
* `Card > CardHeader(CardTitle, CardDescription, CardAction) > CardContent >
|
|
11
|
-
* CardFooter?` — named once instead of copied into each file. A page never
|
|
12
|
-
* builds a chart card frame by hand.
|
|
13
|
-
*/
|
|
14
6
|
type ChartSeries = {
|
|
15
7
|
/** Stable entity id: the data key in each datum and the color-map key. */
|
|
16
8
|
id: string;
|
|
@@ -23,7 +15,7 @@ type ChartSummaryTrend = {
|
|
|
23
15
|
direction: TrendDirection;
|
|
24
16
|
tone: TrendTone;
|
|
25
17
|
comparison: React.ReactNode;
|
|
26
|
-
directionLabel
|
|
18
|
+
directionLabel: string;
|
|
27
19
|
};
|
|
28
20
|
type ChartSummaryProps = {
|
|
29
21
|
label: React.ReactNode;
|
|
@@ -33,18 +25,27 @@ type ChartSummaryProps = {
|
|
|
33
25
|
trend?: ChartSummaryTrend;
|
|
34
26
|
status?: React.ReactNode;
|
|
35
27
|
};
|
|
28
|
+
/** The footer strip: when the reading was taken, left; the way to its owner, right. */
|
|
29
|
+
type ChartCardFooter = {
|
|
30
|
+
/** "Read at 12:42", "Updated 4 minutes ago". */
|
|
31
|
+
reading: React.ReactNode;
|
|
32
|
+
/** "Open in Analytics". */
|
|
33
|
+
link?: PageCommand;
|
|
34
|
+
};
|
|
36
35
|
type ChartCardProps = {
|
|
36
|
+
/** Names the measure and its split: "Model spend by Customer". */
|
|
37
37
|
title: React.ReactNode;
|
|
38
|
-
|
|
38
|
+
/** Under the title: "Per day · today is partial", "30 September to 13 October 2026". */
|
|
39
|
+
period?: React.ReactNode;
|
|
39
40
|
/** The title's heading level in the page outline. Defaults to 2. */
|
|
40
41
|
headingLevel?: 2 | 3 | 4;
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
/** A
|
|
42
|
+
/** At the header's trailing edge: the metric `ToggleGroup`, and a period `Select` where the page has none. */
|
|
43
|
+
controls?: React.ReactNode;
|
|
44
|
+
/** A `ChartSummary` between the header and the plot. */
|
|
44
45
|
summary?: React.ReactNode;
|
|
45
|
-
/**
|
|
46
|
+
/** A ranking beside the plot on wide cards, never a second card. */
|
|
46
47
|
aside?: React.ReactNode;
|
|
47
|
-
footer?:
|
|
48
|
+
footer?: ChartCardFooter;
|
|
48
49
|
data: readonly ChartDatum[];
|
|
49
50
|
/** The datum key carrying the category or period. */
|
|
50
51
|
xKey: string;
|
|
@@ -55,8 +56,8 @@ type ChartCardProps = {
|
|
|
55
56
|
valueFormatter?: (value: number) => string;
|
|
56
57
|
/** Axis ticks only: a compact reading (1.6B, 800M, $14) where the tooltip keeps the exact figure. Defaults to `valueFormatter`. */
|
|
57
58
|
axisFormatter?: (value: number) => string;
|
|
58
|
-
/**
|
|
59
|
-
otherLabel
|
|
59
|
+
/** The folded neutral series past the sixth entity, in the reader's language: "Everything else". */
|
|
60
|
+
otherLabel: string;
|
|
60
61
|
/** Rendered in CardContent instead of the plot when `data` is empty. */
|
|
61
62
|
emptyState?: React.ReactNode;
|
|
62
63
|
size?: ChartCardSize;
|
|
@@ -77,7 +78,19 @@ type FoldedSeries = {
|
|
|
77
78
|
* through unchanged, so six or fewer are never rewritten.
|
|
78
79
|
*/
|
|
79
80
|
declare function foldOtherSeries(series: readonly ChartSeries[], data: readonly ChartDatum[], entityColorMap: EntityColorMap, otherLabel: string): FoldedSeries;
|
|
80
|
-
|
|
81
|
+
/**
|
|
82
|
+
* The card every chart in the kit renders: one header, the summary, the plot, its legend and the reading's time. The
|
|
83
|
+
* plots (`ChartBarStacked`, `ChartAreaStacked`, `ChartBarMultiple`, `ChartBarHorizontal`) hold only their own plot; a
|
|
84
|
+
* page never builds a chart card frame by hand.
|
|
85
|
+
*
|
|
86
|
+
* @family Charts
|
|
87
|
+
* @when Every chart and every reading built around one: the frame a page never builds by hand. A chart is a named section of its page.
|
|
88
|
+
* @instead A single figure is a `KpiCard`, never nested inside a chart. A ranking beside the plot goes in the card's `aside`, not a second card.
|
|
89
|
+
* @behaviour Header grid: title and period in the first column, controls in the second from a 28 rem card width, under the title below it. Summary, plot, legend, footer in that order. An empty dataset shows its `emptyState` in the plot's place. The footer is a recessed strip behind a hairline: the reading's time left, the link to its owner right.
|
|
90
|
+
* @words Title names the measure and its split: "Model spend by Customer". Period as dates. Footer: the reading's time, "Updated 4 minutes ago" or "Read at 12:42", and the way to its owner, "Open in Analytics". Sentence case throughout.
|
|
91
|
+
* @access The title is a heading at the page's level (default 2) and labels the plot. The plot is focusable and shows the 2 px focus outline only on keyboard focus.
|
|
92
|
+
*/
|
|
93
|
+
declare function ChartCard({ title, period, controls, summary, aside, footer, headingLevel, className, children, }: Pick<ChartCardProps, "title" | "period" | "controls" | "summary" | "aside" | "footer" | "headingLevel" | "className"> & {
|
|
81
94
|
/** Receives the title's id, which the plot takes as `aria-labelledby`. */
|
|
82
95
|
children: (titleId: string) => React.ReactNode;
|
|
83
96
|
}): React.JSX.Element;
|
|
@@ -93,5 +106,5 @@ declare const CHART_FOCUS_CLASS = "[&_.recharts-surface:focus-visible]:nc-focus-
|
|
|
93
106
|
/** Legend below the plot, left-aligned, wrapping to a second line. */
|
|
94
107
|
declare const CHART_LEGEND_CLASS = "flex-wrap justify-start";
|
|
95
108
|
export { CHART_FOCUS_CLASS, CHART_LEGEND_CLASS, ChartCard, ChartSummary, chartPlotClassName, chartSeriesConfig, defaultValueFormatter, foldOtherSeries, };
|
|
96
|
-
export type { ChartCardProps, ChartCardSize, ChartDatum, ChartSeries, ChartSummaryProps, ChartSummaryTrend, };
|
|
109
|
+
export type { ChartCardFooter, ChartCardProps, ChartCardSize, ChartDatum, ChartSeries, ChartSummaryProps, ChartSummaryTrend, };
|
|
97
110
|
//# sourceMappingURL=chart-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-card.d.ts","sourceRoot":"","sources":["../../src/components/chart-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-card.d.ts","sourceRoot":"","sources":["../../src/components/chart-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG3F,KAAK,WAAW,GAAG;IACjB,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAElD,KAAK,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC;AAEtC,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAA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kB,EAClB,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,GAChB,CAAC;AACF,YAAY,EACV,eAAe,EACf,cAAc,EACd,aAAa,EACb,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
import { Card, CardAction, CardContent, CardDescription,
|
|
5
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle, } from "./card.js";
|
|
6
6
|
import { CHART_ENTITY_OTHER_COLOR, entityColor, } from "./chart-entity-colors.js";
|
|
7
|
+
import { PageCommandButton } from "./page-actions.js";
|
|
7
8
|
import { TrendBadge } from "./trend-badge.js";
|
|
9
|
+
import { FooterStrip } from "../internal/footer-strip.js";
|
|
8
10
|
/** Fixed plot heights, so charts on a page share one register. */
|
|
9
11
|
const chartSizes = {
|
|
10
12
|
default: "h-64",
|
|
@@ -52,10 +54,22 @@ function foldOtherSeries(series, data, entityColorMap, otherLabel) {
|
|
|
52
54
|
});
|
|
53
55
|
return { series: folded, data: foldedData };
|
|
54
56
|
}
|
|
55
|
-
|
|
57
|
+
/**
|
|
58
|
+
* The card every chart in the kit renders: one header, the summary, the plot, its legend and the reading's time. The
|
|
59
|
+
* plots (`ChartBarStacked`, `ChartAreaStacked`, `ChartBarMultiple`, `ChartBarHorizontal`) hold only their own plot; a
|
|
60
|
+
* page never builds a chart card frame by hand.
|
|
61
|
+
*
|
|
62
|
+
* @family Charts
|
|
63
|
+
* @when Every chart and every reading built around one: the frame a page never builds by hand. A chart is a named section of its page.
|
|
64
|
+
* @instead A single figure is a `KpiCard`, never nested inside a chart. A ranking beside the plot goes in the card's `aside`, not a second card.
|
|
65
|
+
* @behaviour Header grid: title and period in the first column, controls in the second from a 28 rem card width, under the title below it. Summary, plot, legend, footer in that order. An empty dataset shows its `emptyState` in the plot's place. The footer is a recessed strip behind a hairline: the reading's time left, the link to its owner right.
|
|
66
|
+
* @words Title names the measure and its split: "Model spend by Customer". Period as dates. Footer: the reading's time, "Updated 4 minutes ago" or "Read at 12:42", and the way to its owner, "Open in Analytics". Sentence case throughout.
|
|
67
|
+
* @access The title is a heading at the page's level (default 2) and labels the plot. The plot is focusable and shows the 2 px focus outline only on keyboard focus.
|
|
68
|
+
*/
|
|
69
|
+
function ChartCard({ title, period, controls, summary, aside, footer, headingLevel = 2, className, children, }) {
|
|
56
70
|
const titleId = React.useId();
|
|
57
|
-
return (_jsxs(Card, { "data-slot": "chart-card", className: cn("@container/chart-card", className), children: [_jsxs(CardHeader, { className: "has-data-[slot=card-action]:grid-cols-1 [&>[data-slot=card-action]]:col-start-1 [&>[data-slot=card-action]]:row-span-1 [&>[data-slot=card-action]]:row-start-3 [&>[data-slot=card-action]]:justify-self-start @md/chart-card:has-data-[slot=card-action]:grid-cols-[1fr_auto] @md/chart-card:[&>[data-slot=card-action]]:col-start-2 @md/chart-card:[&>[data-slot=card-action]]:row-span-2 @md/chart-card:[&>[data-slot=card-action]]:row-start-1 @md/chart-card:[&>[data-slot=card-action]]:justify-self-end", children: [_jsx(CardTitle, { id: titleId, role: "heading", "aria-level": headingLevel, children: title }),
|
|
58
|
-
"grid min-w-0 gap-(--card-spacing) lg:grid-cols-[minmax(0,2fr)_minmax(16rem,1fr)]"), children: [_jsx("div", { className: "min-w-0", children: children(titleId) }), aside ? (_jsx("aside", { "data-slot": "chart-card-aside", className: "min-w-0 border-t border-border pt-(--card-spacing) lg:border-t-0 lg:border-l lg:pt-0 lg:pl-(--card-spacing)", children: aside })) : null] }), footer ? (_jsx(
|
|
71
|
+
return (_jsxs(Card, { "data-slot": "chart-card", className: cn("@container/chart-card", className), children: [_jsxs(CardHeader, { className: "has-data-[slot=card-action]:grid-cols-1 [&>[data-slot=card-action]]:col-start-1 [&>[data-slot=card-action]]:row-span-1 [&>[data-slot=card-action]]:row-start-3 [&>[data-slot=card-action]]:justify-self-start @md/chart-card:has-data-[slot=card-action]:grid-cols-[1fr_auto] @md/chart-card:[&>[data-slot=card-action]]:col-start-2 @md/chart-card:[&>[data-slot=card-action]]:row-span-2 @md/chart-card:[&>[data-slot=card-action]]:row-start-1 @md/chart-card:[&>[data-slot=card-action]]:justify-self-end", children: [_jsx(CardTitle, { id: titleId, role: "heading", "aria-level": headingLevel, children: title }), period ? _jsx(CardDescription, { children: period }) : null, controls ? _jsx(CardAction, { children: controls }) : null] }), summary ? (_jsx("div", { "data-slot": "chart-card-summary", className: "px-(--card-spacing)", children: summary })) : null, _jsxs(CardContent, { className: cn(aside &&
|
|
72
|
+
"grid min-w-0 gap-(--card-spacing) lg:grid-cols-[minmax(0,2fr)_minmax(16rem,1fr)]"), children: [_jsx("div", { className: "min-w-0", children: children(titleId) }), aside ? (_jsx("aside", { "data-slot": "chart-card-aside", className: "min-w-0 border-t border-border pt-(--card-spacing) lg:border-t-0 lg:border-l lg:pt-0 lg:pl-(--card-spacing)", children: aside })) : null] }), footer ? (_jsx(FooterStrip, { hint: footer.reading, hintSlot: "chart-card-reading", children: footer.link ? _jsx(PageCommandButton, { command: footer.link, variant: "ghost" }) : null })) : null] }));
|
|
59
73
|
}
|
|
60
74
|
function ChartSummary({ label, value, valueTitle, valueSize = "default", trend, status, }) {
|
|
61
75
|
return (_jsxs("div", { "data-slot": "chart-summary", className: "flex flex-col items-start gap-2", children: [_jsx("div", { className: "text-muted-foreground text-sm", children: label }), _jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-3", children: [_jsx("div", { "data-slot": "chart-summary-value", className: cn("truncate tabular-nums", valueSize === "lg" ? "text-heading-lg" : "text-heading-md"), title: valueTitle, children: value }), trend ? (_jsx(TrendBadge, { direction: trend.direction, directionLabel: trend.directionLabel, tone: trend.tone, value: trend.value })) : null, status] }), trend ? (_jsx("div", { "data-slot": "chart-summary-comparison", className: "text-muted-foreground text-sm", children: trend.comparison })) : null] }));
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type DateRangePreset, type DateRangeValue } from "./chart-date-range.js";
|
|
3
|
+
/**
|
|
4
|
+
* The period a chart reads: a `Select` of presets with a custom window from a calendar.
|
|
5
|
+
*
|
|
6
|
+
* @family Charts
|
|
7
|
+
* @when The reading period of an overview or a chart: on the title row through `PageActions`' `period`, or in a `ChartCard`'s `controls` where the page has none.
|
|
8
|
+
* @instead A choice of metric is a `ToggleGroup` in the card's controls. A date a person enters in a form is a date field.
|
|
9
|
+
* @behaviour One select with the presets and a custom window; the value is encoded into the URL by the caller with `encodeDateRange`.
|
|
10
|
+
* @words Presets name the window: "Past 7 days", "Past 14 days", "Past 30 days", "This cycle". A custom window reads as its dates.
|
|
11
|
+
* @access The select carries the control's accessible name and announces the current range.
|
|
12
|
+
*/
|
|
3
13
|
declare function DateRangeControl({ value, onChange, label, presets, presetLabels, customLabel, formatCustomValue, className, }: {
|
|
4
14
|
value: DateRangeValue;
|
|
5
15
|
onChange: (value: DateRangeValue) => void;
|
|
6
16
|
/** Accessible name for the control. */
|
|
7
|
-
label
|
|
17
|
+
label: string;
|
|
8
18
|
/** Which presets to offer, in order. Defaults to the full codec set. */
|
|
9
19
|
presets?: readonly DateRangePreset[];
|
|
10
|
-
presetLabels
|
|
11
|
-
customLabel
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
* package owns no locale, so without it the trigger falls back to the ISO
|
|
15
|
-
* pair the codec stores — a storage format, never a label a reader should
|
|
16
|
-
* meet. Every locale-aware consumer passes this.
|
|
17
|
-
*/
|
|
18
|
-
formatCustomValue?: (value: {
|
|
20
|
+
presetLabels: Record<DateRangePreset, string>;
|
|
21
|
+
customLabel: string;
|
|
22
|
+
/** Renders the selected custom window as a finished label in the reader's language. */
|
|
23
|
+
formatCustomValue: (value: {
|
|
19
24
|
from: string;
|
|
20
25
|
to: string;
|
|
21
26
|
}) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-date-range-control.d.ts","sourceRoot":"","sources":["../../src/components/chart-date-range-control.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-date-range-control.d.ts","sourceRoot":"","sources":["../../src/components/chart-date-range-control.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AA2BvC;;;;;;;;;GASG;AACH,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAA4B,EAC5B,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,SAAS,GACV,EAAE;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,iBAAiB,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,qBAiGA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -30,13 +30,17 @@ function preloadCalendar(open) {
|
|
|
30
30
|
if (open)
|
|
31
31
|
loadCalendar().catch(() => undefined);
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The period a chart reads: a `Select` of presets with a custom window from a calendar.
|
|
35
|
+
*
|
|
36
|
+
* @family Charts
|
|
37
|
+
* @when The reading period of an overview or a chart: on the title row through `PageActions`' `period`, or in a `ChartCard`'s `controls` where the page has none.
|
|
38
|
+
* @instead A choice of metric is a `ToggleGroup` in the card's controls. A date a person enters in a form is a date field.
|
|
39
|
+
* @behaviour One select with the presets and a custom window; the value is encoded into the URL by the caller with `encodeDateRange`.
|
|
40
|
+
* @words Presets name the window: "Past 7 days", "Past 14 days", "Past 30 days", "This cycle". A custom window reads as its dates.
|
|
41
|
+
* @access The select carries the control's accessible name and announces the current range.
|
|
42
|
+
*/
|
|
43
|
+
function DateRangeControl({ value, onChange, label, presets = DATE_RANGE_PRESETS, presetLabels, customLabel, formatCustomValue, className, }) {
|
|
40
44
|
const [open, setOpen] = React.useState(false);
|
|
41
45
|
const [pending, setPending] = React.useState(undefined);
|
|
42
46
|
const anchor = React.useRef(null);
|
|
@@ -44,8 +48,8 @@ function DateRangeControl({ value, onChange, label = "Date range", presets = DAT
|
|
|
44
48
|
const selected = pending ??
|
|
45
49
|
(isCustom ? { from: parseIsoDay(value.from), to: parseIsoDay(value.to) } : undefined);
|
|
46
50
|
const triggerLabel = isCustom
|
|
47
|
-
?
|
|
48
|
-
:
|
|
51
|
+
? formatCustomValue({ from: value.from, to: value.to })
|
|
52
|
+
: presetLabels[value.preset];
|
|
49
53
|
function handleOpenChange(nextOpen) {
|
|
50
54
|
setOpen(nextOpen);
|
|
51
55
|
if (!nextOpen) {
|
|
@@ -82,6 +86,6 @@ function DateRangeControl({ value, onChange, label = "Date range", presets = DAT
|
|
|
82
86
|
}
|
|
83
87
|
setPending(range);
|
|
84
88
|
}
|
|
85
|
-
return (_jsxs("div", { ref: anchor, "data-slot": "date-range-control", className: cn("inline-flex", className), children: [_jsxs(Select, { value: isCustom ? CUSTOM_VALUE : value.preset, onValueChange: handleSelectChange, onOpenChange: preloadCalendar, children: [_jsx(SelectTrigger, { "aria-label": label, className: "w-auto min-w-36", children: _jsx(SelectValue, { children: triggerLabel }) }), _jsx(SelectContent, { children: _jsxs(SelectGroup, { children: [presets.map((preset) => (_jsx(SelectItem, { value: preset, children: presetLabels
|
|
89
|
+
return (_jsxs("div", { ref: anchor, "data-slot": "date-range-control", className: cn("inline-flex", className), children: [_jsxs(Select, { value: isCustom ? CUSTOM_VALUE : value.preset, onValueChange: handleSelectChange, onOpenChange: preloadCalendar, children: [_jsx(SelectTrigger, { "aria-label": label, className: "w-auto min-w-36", children: _jsx(SelectValue, { children: triggerLabel }) }), _jsx(SelectContent, { children: _jsxs(SelectGroup, { children: [presets.map((preset) => (_jsx(SelectItem, { value: preset, children: presetLabels[preset] }, preset))), _jsx(SelectItem, { value: CUSTOM_VALUE, children: customLabel })] }) })] }), _jsx(Popover, { open: open, onOpenChange: handleOpenChange, children: _jsx(PopoverContent, { anchor: anchor, align: "start", className: "w-auto p-0", children: _jsx(React.Suspense, { fallback: null, children: _jsx(Calendar, { mode: "range", numberOfMonths: 2, defaultMonth: selected?.from, selected: selected, onSelect: handleCalendarSelect }) }) }) })] }));
|
|
86
90
|
}
|
|
87
91
|
export { DateRangeControl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-date-range.d.ts","sourceRoot":"","sources":["../../src/components/chart-date-range.
|
|
1
|
+
{"version":3,"file":"chart-date-range.d.ts","sourceRoot":"","sources":["../../src/components/chart-date-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,QAAA,MAAM,kBAAkB,wCAAyC,CAAC;AAElE,KAAK,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,KAAK,cAAc,GACf;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,iBAAS,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAElE;AAKD;;;GAGG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAEtD;AAED;;;;GAIG;AACH,iBAAS,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,cAAc,GAAG,IAAI,CAuB9E;AAED,wEAAwE;AACxE,iBAAS,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAItC;AAED,4CAA4C;AAC5C,iBAAS,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAKxC;AAMD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,WAAW,GACZ,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -30,6 +30,13 @@ type EntityColorMap = Readonly<Record<string, string>>;
|
|
|
30
30
|
* Assigns `var(--nc-chart-1..6)` in fixed order by FIRST APPEARANCE of each
|
|
31
31
|
* stable entity id. Duplicate ids keep their first assignment. Entities past
|
|
32
32
|
* the sixth unique id fold to the neutral "other" register.
|
|
33
|
+
*
|
|
34
|
+
* @family Charts
|
|
35
|
+
* @when Once per surface, from the full list of entities the page shows, passed to every chart and table row on it.
|
|
36
|
+
* @instead Never a hue picked by rank, position or index, and never a colour meaning health or trend: status is a `StatusBadge`, a change is a `TrendBadge`.
|
|
37
|
+
* @behaviour A hue follows its entity: one assignment per surface, the same in the chart and its table, stable through filtering and sorting. Six categorical hues colour data and nothing else; past six the tail folds into one neutral series in the muted ink, summed per bucket.
|
|
38
|
+
* @words None of its own. The folded tail is named by the page: "Everything else".
|
|
39
|
+
* @access Hue is never the only reading: the legend is always on and every value is text in the tooltip or a table.
|
|
33
40
|
*/
|
|
34
41
|
declare function createEntityColorMap(entityIds: readonly string[]): EntityColorMap;
|
|
35
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-entity-colors.d.ts","sourceRoot":"","sources":["../../src/components/chart-entity-colors.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,QAAA,MAAM,yBAAyB,yIAOrB,CAAC;AAEX;;;;;;;;;GASG;AACH,QAAA,MAAM,wBAAwB,oBAAoB,CAAC;AAEnD,KAAK,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"chart-entity-colors.d.ts","sourceRoot":"","sources":["../../src/components/chart-entity-colors.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,QAAA,MAAM,yBAAyB,yIAOrB,CAAC;AAEX;;;;;;;;;GASG;AACH,QAAA,MAAM,wBAAwB,oBAAoB,CAAC;AAEnD,KAAK,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,iBAAS,oBAAoB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,CAyB1E;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOlE;AAED,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,WAAW,EAAE,CAAC;AAClG,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -36,6 +36,13 @@ const CHART_ENTITY_OTHER_COLOR = "var(--nc-muted)";
|
|
|
36
36
|
* Assigns `var(--nc-chart-1..6)` in fixed order by FIRST APPEARANCE of each
|
|
37
37
|
* stable entity id. Duplicate ids keep their first assignment. Entities past
|
|
38
38
|
* the sixth unique id fold to the neutral "other" register.
|
|
39
|
+
*
|
|
40
|
+
* @family Charts
|
|
41
|
+
* @when Once per surface, from the full list of entities the page shows, passed to every chart and table row on it.
|
|
42
|
+
* @instead Never a hue picked by rank, position or index, and never a colour meaning health or trend: status is a `StatusBadge`, a change is a `TrendBadge`.
|
|
43
|
+
* @behaviour A hue follows its entity: one assignment per surface, the same in the chart and its table, stable through filtering and sorting. Six categorical hues colour data and nothing else; past six the tail folds into one neutral series in the muted ink, summed per bucket.
|
|
44
|
+
* @words None of its own. The folded tail is named by the page: "Everything else".
|
|
45
|
+
* @access Hue is never the only reading: the legend is always on and every value is text in the tooltip or a table.
|
|
39
46
|
*/
|
|
40
47
|
function createEntityColorMap(entityIds) {
|
|
41
48
|
// Assign through a Map so ids that collide with Object.prototype members
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stock linear line with nothing around it: no axes, no grid, no tooltip, no card.
|
|
3
|
+
*
|
|
4
|
+
* @family Charts
|
|
5
|
+
* @when What is trending: a row in a list, beside its name and its delta.
|
|
6
|
+
* @instead When the reader needs values, axes or a period, use a full chart card. A KPI value carries its delta badge, not a sparkline, unless the card owns one.
|
|
7
|
+
* @behaviour 96 by 32 px, a 2 px linear line. Stroke is one chart token or the entity's colour.
|
|
8
|
+
* @words None of its own. The row names the measure and the window: "Requests · past 8 weeks".
|
|
9
|
+
* @access Decorative by default, hidden from assistive technology, because the value and delta beside it carry the reading. Standalone it takes a `label` and becomes an image.
|
|
10
|
+
*/
|
|
1
11
|
declare function ChartSparkline({ data, label, color, className, }: {
|
|
2
12
|
data: readonly number[];
|
|
3
13
|
/** Accessible name for standalone use; omit inside a named stat. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-sparkline.d.ts","sourceRoot":"","sources":["../../src/components/chart-sparkline.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chart-sparkline.d.ts","sourceRoot":"","sources":["../../src/components/chart-sparkline.tsx"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,KAAK,EACL,KAA2B,EAC3B,SAAS,GACV,EAAE;IACD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAwBA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -6,16 +6,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
import { Line, LineChart } from "recharts";
|
|
7
7
|
import { cn } from "../lib/utils.js";
|
|
8
8
|
import { ChartContainer } from "./chart.js";
|
|
9
|
+
const SPARKLINE_SERIES_KEY = "value";
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
-
* stock linear line chart with nothing around it: no axes, no grid, no
|
|
12
|
-
* tooltip, and no card.
|
|
11
|
+
* The stock linear line with nothing around it: no axes, no grid, no tooltip, no card.
|
|
13
12
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* @family Charts
|
|
14
|
+
* @when What is trending: a row in a list, beside its name and its delta.
|
|
15
|
+
* @instead When the reader needs values, axes or a period, use a full chart card. A KPI value carries its delta badge, not a sparkline, unless the card owns one.
|
|
16
|
+
* @behaviour 96 by 32 px, a 2 px linear line. Stroke is one chart token or the entity's colour.
|
|
17
|
+
* @words None of its own. The row names the measure and the window: "Requests · past 8 weeks".
|
|
18
|
+
* @access Decorative by default, hidden from assistive technology, because the value and delta beside it carry the reading. Standalone it takes a `label` and becomes an image.
|
|
17
19
|
*/
|
|
18
|
-
const SPARKLINE_SERIES_KEY = "value";
|
|
19
20
|
function ChartSparkline({ data, label, color = "var(--nc-chart-1)", className, }) {
|
|
20
21
|
const chartData = data.map((value, index) => ({ index, [SPARKLINE_SERIES_KEY]: value }));
|
|
21
22
|
const chartConfig = {
|
|
@@ -19,6 +19,16 @@ export type ChartConfig = Record<string, {
|
|
|
19
19
|
color?: never;
|
|
20
20
|
theme: ChartTheme;
|
|
21
21
|
})>;
|
|
22
|
+
/**
|
|
23
|
+
* shadcn's chart foundation: the Recharts container, its tooltip and its legend, themed by the series config.
|
|
24
|
+
*
|
|
25
|
+
* @family Charts
|
|
26
|
+
* @when Inside a kit plot only: `ChartBarStacked`, `ChartAreaStacked`, `ChartBarMultiple`, `ChartBarHorizontal`, `ChartSparkline` render through it.
|
|
27
|
+
* @instead A page renders a kit plot in its `ChartCard`, never this container or a Recharts import of its own. A chart the kit lacks is pulled from the shadcn registry into the kit first.
|
|
28
|
+
* @behaviour Maps each series id to its colour token, sizes the plot to its frame, and draws the tooltip with the exact figure and the legend below the plot: an 8 px dot, 6 px to the name, 16 px between, left-aligned and wrapping.
|
|
29
|
+
* @words None of its own: series labels come from the config the plot builds from the page's words.
|
|
30
|
+
* @access The plot it holds is named by the card title through `aria-labelledby`; Recharts' accessibility layer makes it keyboard focusable.
|
|
31
|
+
*/
|
|
22
32
|
declare function ChartContainer({ id, className, children, config, initialDimension, ...props }: React.ComponentProps<"div"> & {
|
|
23
33
|
config: ChartConfig;
|
|
24
34
|
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/components/chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAKjD,QAAA,MAAM,MAAM;;;CAAwC,CAAC;AAGrD,KAAK,eAAe,GAAG,MAAM,GA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AAK,EACL,OAAO,EACP,QAAQ,EACR,cAAc,GACf,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,OAAO,CAAC,GACvD,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAOlB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C,GAAG,IAAI,CACN,iBAAiB,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAC/E,oBAAoB,CACrB,4BAsHF;AAED,QAAA,MAAM,WAAW,sGAA2B,CAAC;AAE7C,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAgB,EAChB,OAAO,EACP,OAAO,GACR,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAIlB,GAAG,IAAI,CAAC,iBAAiB,CAAC,yBAAyB,EAAE,eAAe,CAAC,4BAwCrE;AAyCD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,UAAU,GACX,CAAC"}
|
package/dist/components/chart.js
CHANGED
|
@@ -34,6 +34,16 @@ function useChart() {
|
|
|
34
34
|
}
|
|
35
35
|
return context;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* shadcn's chart foundation: the Recharts container, its tooltip and its legend, themed by the series config.
|
|
39
|
+
*
|
|
40
|
+
* @family Charts
|
|
41
|
+
* @when Inside a kit plot only: `ChartBarStacked`, `ChartAreaStacked`, `ChartBarMultiple`, `ChartBarHorizontal`, `ChartSparkline` render through it.
|
|
42
|
+
* @instead A page renders a kit plot in its `ChartCard`, never this container or a Recharts import of its own. A chart the kit lacks is pulled from the shadcn registry into the kit first.
|
|
43
|
+
* @behaviour Maps each series id to its colour token, sizes the plot to its frame, and draws the tooltip with the exact figure and the legend below the plot: an 8 px dot, 6 px to the name, 16 px between, left-aligned and wrapping.
|
|
44
|
+
* @words None of its own: series labels come from the config the plot builds from the page's words.
|
|
45
|
+
* @access The plot it holds is named by the card title through `aria-labelledby`; Recharts' accessibility layer makes it keyboard focusable.
|
|
46
|
+
*/
|
|
37
47
|
function ChartContainer({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) {
|
|
38
48
|
const uniqueId = React.useId();
|
|
39
49
|
const chartId = sanitizeChartToken(`chart-${id ?? uniqueId.replace(/:/g, "")}`);
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
2
|
+
/**
|
|
3
|
+
* A box that is checked, unchecked or mixed.
|
|
4
|
+
*
|
|
5
|
+
* @family Choices
|
|
6
|
+
* @when Independent yes-or-no choices in a form, an acknowledgment before a step, selecting rows.
|
|
7
|
+
* @instead A setting that is on or off is a `Switch`. One of several is a `RadioGroup`. Several
|
|
8
|
+
* values from a long list is a multi-select.
|
|
9
|
+
* @behaviour Unchecked is only the input-grey edge, showing the surface beneath. Checked fills with
|
|
10
|
+
* ink and a 14 px check; mixed shows a minus and is worked out from the rows below. The label
|
|
11
|
+
* toggles it too, and on touch the target is 44 px. A required acknowledgment is checked on submit.
|
|
12
|
+
* @words The label says what is true when checked, positively: *Send a copy to the person who
|
|
13
|
+
* asked*, not *Don't send*. A related set gets a legend.
|
|
14
|
+
* @access `role="checkbox"` with `aria-checked` true, false or mixed. A row's box is named for its
|
|
15
|
+
* record: *Select pec@acme.it*. A set sits in a `FieldSet` with its legend.
|
|
16
|
+
*/
|
|
2
17
|
declare function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
18
|
export { Checkbox };
|
|
4
19
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAKxE,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,+BAmBtE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAKxE;;;;;;;;;;;;;;GAcG;AACH,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,+BAmBtE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -3,6 +3,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
5
|
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
6
|
+
/**
|
|
7
|
+
* A box that is checked, unchecked or mixed.
|
|
8
|
+
*
|
|
9
|
+
* @family Choices
|
|
10
|
+
* @when Independent yes-or-no choices in a form, an acknowledgment before a step, selecting rows.
|
|
11
|
+
* @instead A setting that is on or off is a `Switch`. One of several is a `RadioGroup`. Several
|
|
12
|
+
* values from a long list is a multi-select.
|
|
13
|
+
* @behaviour Unchecked is only the input-grey edge, showing the surface beneath. Checked fills with
|
|
14
|
+
* ink and a 14 px check; mixed shows a minus and is worked out from the rows below. The label
|
|
15
|
+
* toggles it too, and on touch the target is 44 px. A required acknowledgment is checked on submit.
|
|
16
|
+
* @words The label says what is true when checked, positively: *Send a copy to the person who
|
|
17
|
+
* asked*, not *Don't send*. A related set gets a legend.
|
|
18
|
+
* @access `role="checkbox"` with `aria-checked` true, false or mixed. A row's box is named for its
|
|
19
|
+
* record: *Select pec@acme.it*. A set sits in a `FieldSet` with its legend.
|
|
20
|
+
*/
|
|
6
21
|
function Checkbox({ className, ...props }) {
|
|
7
22
|
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-xs border border-input transition-colors group-has-disabled/field:opacity-50 after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-x-1/2 after:-translate-y-1/2 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground [@media(hover:hover)_and_(pointer:fine)]:after:hidden", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5", render: (indicatorProps, state) => (_jsx("span", { ...indicatorProps, children: state.indeterminate ? _jsx(MinusIcon, {}) : _jsx(CheckIcon, {}) })) }) }));
|
|
8
23
|
}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { type CopyButtonProps } from "./copy-button.js";
|
|
2
|
+
/**
|
|
3
|
+
* Several lines of exact text to read or copy.
|
|
4
|
+
*
|
|
5
|
+
* @family Data
|
|
6
|
+
* @when Several lines a person reads or copies exactly: a configuration, static JSON, a command
|
|
7
|
+
* sequence.
|
|
8
|
+
* @instead One short value to copy is a read-only input with a `CopyButton`. A before and after is
|
|
9
|
+
* `FileDiff`. Code in a conversation is her `MarkdownText`.
|
|
10
|
+
* @behaviour Read-only, no wrapping, scrolls in both directions up to 384 px. Copy takes the exact
|
|
11
|
+
* text, says Copied only on success and says when it failed. No syntax colour, no line numbers.
|
|
12
|
+
* @words The real filename, or an honest label. The language as its common name: *JSON*. Copy,
|
|
13
|
+
* Copied, Couldn't copy.
|
|
14
|
+
* @access The text area is named by its `label`; the copy button names its target (*Copy mcp.json*)
|
|
15
|
+
* and announces the result.
|
|
16
|
+
*/
|
|
2
17
|
export declare function CodeBlock({ code, label, filename, language, copyLabel, copiedLabel, copyFailedLabel, }: {
|
|
3
18
|
code: string;
|
|
4
19
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAQ5E,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,GAChB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,aAAa,GAAG,iBAAiB,CAAC,+BAiCzE"}
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAQ5E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,GAChB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,aAAa,GAAG,iBAAiB,CAAC,+BAiCzE"}
|
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { CopyButton } from "./copy-button.js";
|
|
4
4
|
import { InputGroup, InputGroupAddon, InputGroupText, InputGroupTextarea, } from "./input-group.js";
|
|
5
|
+
/**
|
|
6
|
+
* Several lines of exact text to read or copy.
|
|
7
|
+
*
|
|
8
|
+
* @family Data
|
|
9
|
+
* @when Several lines a person reads or copies exactly: a configuration, static JSON, a command
|
|
10
|
+
* sequence.
|
|
11
|
+
* @instead One short value to copy is a read-only input with a `CopyButton`. A before and after is
|
|
12
|
+
* `FileDiff`. Code in a conversation is her `MarkdownText`.
|
|
13
|
+
* @behaviour Read-only, no wrapping, scrolls in both directions up to 384 px. Copy takes the exact
|
|
14
|
+
* text, says Copied only on success and says when it failed. No syntax colour, no line numbers.
|
|
15
|
+
* @words The real filename, or an honest label. The language as its common name: *JSON*. Copy,
|
|
16
|
+
* Copied, Couldn't copy.
|
|
17
|
+
* @access The text area is named by its `label`; the copy button names its target (*Copy mcp.json*)
|
|
18
|
+
* and announces the result.
|
|
19
|
+
*/
|
|
5
20
|
export function CodeBlock({ code, label, filename, language, copyLabel, copiedLabel, copyFailedLabel, }) {
|
|
6
21
|
return (_jsxs(InputGroup, { children: [_jsx(InputGroupTextarea, { "aria-label": label, value: code, readOnly: true, wrap: "off", spellCheck: false, className: "max-h-96 min-h-0 overflow-auto font-code text-code md:text-code" }), _jsxs(InputGroupAddon, { align: "block-start", className: "justify-between border-b border-border", children: [_jsx(InputGroupText, { title: filename ?? label, className: "min-w-0 truncate font-label-mono text-label-mono", children: filename ?? label }), _jsx(CopyButton, { value: code, copyLabel: copyLabel, copiedLabel: copiedLabel, copyFailedLabel: copyFailedLabel, size: "icon-xs" })] }), language ? (_jsx(InputGroupAddon, { align: "block-end", className: "border-t border-border", children: _jsx(InputGroupText, { children: language }) })) : null] }));
|
|
7
22
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
2
|
+
/**
|
|
3
|
+
* Content that a trigger shows and hides.
|
|
4
|
+
*
|
|
5
|
+
* @family Other
|
|
6
|
+
* @when Building a disclosure the complete owners do not cover: nested files in a sidebar, a group
|
|
7
|
+
* of rows.
|
|
8
|
+
* @instead Supporting detail on a page is `Disclosure`; sections are `Accordion`; a long block is
|
|
9
|
+
* `ExpandableBlock`.
|
|
10
|
+
* @behaviour The trigger toggles the content; closed content is not rendered for the reader.
|
|
11
|
+
* @words The trigger names what is inside.
|
|
12
|
+
* @access The trigger exposes `aria-expanded` and controls its content.
|
|
13
|
+
*/
|
|
2
14
|
declare function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props): import("react").JSX.Element;
|
|
3
15
|
declare function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props): import("react").JSX.Element;
|
|
4
16
|
declare function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,+BAEjE;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,+BAE3E;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,+BAEzE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,+BAEjE;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,+BAE3E;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,+BAEzE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
3
|
+
/**
|
|
4
|
+
* Content that a trigger shows and hides.
|
|
5
|
+
*
|
|
6
|
+
* @family Other
|
|
7
|
+
* @when Building a disclosure the complete owners do not cover: nested files in a sidebar, a group
|
|
8
|
+
* of rows.
|
|
9
|
+
* @instead Supporting detail on a page is `Disclosure`; sections are `Accordion`; a long block is
|
|
10
|
+
* `ExpandableBlock`.
|
|
11
|
+
* @behaviour The trigger toggles the content; closed content is not rendered for the reader.
|
|
12
|
+
* @words The trigger names what is inside.
|
|
13
|
+
* @access The trigger exposes `aria-expanded` and controls its content.
|
|
14
|
+
*/
|
|
3
15
|
function Collapsible({ ...props }) {
|
|
4
16
|
return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
5
17
|
}
|
|
@@ -26,8 +26,21 @@ export type CollectionFilterCopy = {
|
|
|
26
26
|
back: string;
|
|
27
27
|
remove: string;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type CollectionFiltersProps = {
|
|
30
30
|
facets: readonly CollectionFilter[];
|
|
31
31
|
copy: CollectionFilterCopy;
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The filters in a collection's toolbar: one Add filter button, a chip for
|
|
35
|
+
* each facet in force, and the facets most often narrowed to waiting as
|
|
36
|
+
* dashed chips.
|
|
37
|
+
*
|
|
38
|
+
* @family Compositions
|
|
39
|
+
* @when A collection or a feed a person narrows by a property its records share: a status, an owner, a kind. It stands in the toolbar after the search and before the sort.
|
|
40
|
+
* @instead Finding one record by its name is the search. Changing the order is the sort. Switching between sibling collections is the page's tabs.
|
|
41
|
+
* @behaviour Add filter opens a picker of the facets, then of a facet's values, each searchable; Backspace in an empty search goes back to the facets. A facet in force is a chip that reopens its values, with a button that removes it. A suggested value waits as a dashed chip while its facet is unset and applies in one click. Focus returns to Add filter when a facet is removed. The product keeps each facet's value, in the URL where it has one.
|
|
42
|
+
* @words Every string is the product's: `copy` names Add filter, the two searches, the empty result, Back and Remove; each facet names itself, its values and its "All" choice.
|
|
43
|
+
* @access Each chip is a group named by its facet; its remove button reads Remove with the facet's name. The pickers are searchable lists named by what they search.
|
|
44
|
+
*/
|
|
45
|
+
export declare function CollectionFilters({ facets, copy }: CollectionFiltersProps): React.JSX.Element | null;
|
|
33
46
|
//# sourceMappingURL=collection-filters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-filters.d.ts","sourceRoot":"","sources":["../../src/components/collection-filters.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,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AAC;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAoHF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpC,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,sBAAsB,4BAuFzE"}
|