@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,5 +1,20 @@
|
|
|
1
1
|
import { type LucideIcon } from "lucide-react";
|
|
2
2
|
/** The company and its doors. */
|
|
3
|
+
/**
|
|
4
|
+
* The house's own icons, the arch, the approvals arch and the Agent, as Lucide components.
|
|
5
|
+
*
|
|
6
|
+
* @family Status
|
|
7
|
+
* @when Wherever an icon names the company (`ArchIcon`), the work waiting on a person
|
|
8
|
+
* (`ApprovalsIcon`), or Agents as a section (`AgentIcon`). 12, 16, 20 and 24 px; 20 in persistent
|
|
9
|
+
* navigation.
|
|
10
|
+
* @instead Lucide for everything else. A particular Agent is her orb, not the agent icon. No Lucide
|
|
11
|
+
* glyph, a circle or a bot, stands in for these three.
|
|
12
|
+
* @behaviour Rendered exactly as Lucide: 1.5 px line (1.25 at 12), round caps and joins, no fill
|
|
13
|
+
* except the agent's dot, the text colour. Interchangeable with any Lucide icon wherever a
|
|
14
|
+
* `LucideIcon` is expected.
|
|
15
|
+
* @words Always beside its label in navigation: *Agents*, *Approvals*.
|
|
16
|
+
* @access Decorative beside text. An icon-only control carries its own `aria-label`.
|
|
17
|
+
*/
|
|
3
18
|
export declare const ArchIcon: LucideIcon;
|
|
4
19
|
/** The arch with a check: work waiting on a person. */
|
|
5
20
|
export declare const ApprovalsIcon: LucideIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"house-icons.d.ts","sourceRoot":"","sources":["../../src/components/house-icons.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAsBjE,iCAAiC;AACjC,eAAO,MAAM,QAAQ,EAAE,UAA8D,CAAC;AAEtF,uDAAuD;AACvD,eAAO,MAAM,aAAa,EAAE,UAG3B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,SAAS,EAAE,UAAgE,CAAC"}
|
|
1
|
+
{"version":3,"file":"house-icons.d.ts","sourceRoot":"","sources":["../../src/components/house-icons.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAsBjE,iCAAiC;AACjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,EAAE,UAA8D,CAAC;AAEtF,uDAAuD;AACvD,eAAO,MAAM,aAAa,EAAE,UAG3B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,SAAS,EAAE,UAAgE,CAAC"}
|
|
@@ -19,6 +19,21 @@ const toNode = (node) => node.map(([element, attributes], index) => [
|
|
|
19
19
|
{ ...attributes, key: `${element}-${index}` },
|
|
20
20
|
]);
|
|
21
21
|
/** The company and its doors. */
|
|
22
|
+
/**
|
|
23
|
+
* The house's own icons, the arch, the approvals arch and the Agent, as Lucide components.
|
|
24
|
+
*
|
|
25
|
+
* @family Status
|
|
26
|
+
* @when Wherever an icon names the company (`ArchIcon`), the work waiting on a person
|
|
27
|
+
* (`ApprovalsIcon`), or Agents as a section (`AgentIcon`). 12, 16, 20 and 24 px; 20 in persistent
|
|
28
|
+
* navigation.
|
|
29
|
+
* @instead Lucide for everything else. A particular Agent is her orb, not the agent icon. No Lucide
|
|
30
|
+
* glyph, a circle or a bot, stands in for these three.
|
|
31
|
+
* @behaviour Rendered exactly as Lucide: 1.5 px line (1.25 at 12), round caps and joins, no fill
|
|
32
|
+
* except the agent's dot, the text colour. Interchangeable with any Lucide icon wherever a
|
|
33
|
+
* `LucideIcon` is expected.
|
|
34
|
+
* @words Always beside its label in navigation: *Agents*, *Approvals*.
|
|
35
|
+
* @access Decorative beside text. An icon-only control carries its own `aria-label`.
|
|
36
|
+
*/
|
|
22
37
|
export const ArchIcon = createLucideIcon("arch", toNode(houseIcons.arch));
|
|
23
38
|
/** The arch with a check: work waiting on a person. */
|
|
24
39
|
export const ApprovalsIcon = createLucideIcon("approvals", toNode(houseIcons.approvals));
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
2
|
+
/**
|
|
3
|
+
* A preview of a few facts about something named in a dense row.
|
|
4
|
+
*
|
|
5
|
+
* @family Feedback
|
|
6
|
+
* @when A preview of a few facts about something named in a dense row: the exact moment behind a
|
|
7
|
+
* relative time, a record's summary.
|
|
8
|
+
* @instead For one phrase use `Tooltip`. For anything to edit or keep open use a `Sheet` or the
|
|
9
|
+
* record's page. Never the only way to an action.
|
|
10
|
+
* @behaviour Opens on hover and on focus, below by default, 4 px off; stays while the pointer is on
|
|
11
|
+
* it. Solid floating surface, 12 px padding.
|
|
12
|
+
* @words Facts, not prose: the date in words, the time with its zone, the machine timestamp. The
|
|
13
|
+
* trigger keeps its verb sentence: *Updated 3 hours ago*.
|
|
14
|
+
* @access The trigger is a real element with its own name (a `time` with its `datetime` for a
|
|
15
|
+
* moment), so the facts never depend on hover. Keyboard opening is tested, not assumed.
|
|
16
|
+
*/
|
|
2
17
|
declare function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
18
|
declare function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
4
19
|
declare function HoverCardContent({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCardPrimitive.Popup.Props & Pick<PreviewCardPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAKlF,iBAAS,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,+BAE/D;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,+BAEzE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAe,EACf,UAAc,EACd,KAAgB,EAChB,WAAe,EACf,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC,+BAsB7F;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAKlF;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,+BAE/D;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,+BAEzE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAe,EACf,UAAc,EACd,KAAgB,EAChB,WAAe,EACf,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC,+BAsB7F;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -3,6 +3,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
4
4
|
import { anchoredOverlayMotion } from "../lib/motion.js";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
+
/**
|
|
7
|
+
* A preview of a few facts about something named in a dense row.
|
|
8
|
+
*
|
|
9
|
+
* @family Feedback
|
|
10
|
+
* @when A preview of a few facts about something named in a dense row: the exact moment behind a
|
|
11
|
+
* relative time, a record's summary.
|
|
12
|
+
* @instead For one phrase use `Tooltip`. For anything to edit or keep open use a `Sheet` or the
|
|
13
|
+
* record's page. Never the only way to an action.
|
|
14
|
+
* @behaviour Opens on hover and on focus, below by default, 4 px off; stays while the pointer is on
|
|
15
|
+
* it. Solid floating surface, 12 px padding.
|
|
16
|
+
* @words Facts, not prose: the date in words, the time with its zone, the machine timestamp. The
|
|
17
|
+
* trigger keeps its verb sentence: *Updated 3 hours ago*.
|
|
18
|
+
* @access The trigger is a real element with its own name (a `time` with its `datetime` for a
|
|
19
|
+
* moment), so the facts never depend on hover. Keyboard opening is tested, not assumed.
|
|
20
|
+
*/
|
|
6
21
|
function HoverCard({ ...props }) {
|
|
7
22
|
return _jsx(PreviewCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
8
23
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ComponentType, CSSProperties, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type AgentOrbFigure, type AgentOrbState } from "./agent-orb.js";
|
|
3
|
+
import { type AppMarkGlyph } from "./app-mark.js";
|
|
4
|
+
export type IdentityMarkSize = 20 | 24 | 28 | 32 | 40 | 64;
|
|
5
|
+
/** A navigation icon from any Lucide build: the package's and Hermes's ship different versions of the same icons. */
|
|
6
|
+
export type IconComponent = ComponentType<{
|
|
7
|
+
className?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
"aria-hidden"?: boolean | "true" | "false";
|
|
10
|
+
}>;
|
|
11
|
+
export type IdentityMarkProps = {
|
|
12
|
+
/** 32 in a row, 64 at an object's head, 24 in a feed or a sidebar identity line, 40 for a Library entry. */
|
|
13
|
+
size?: IdentityMarkSize;
|
|
14
|
+
/** Its accessible name where it stands without its name beside it (a narrow rail). Decorative otherwise. */
|
|
15
|
+
label?: string;
|
|
16
|
+
} & ({
|
|
17
|
+
kind: "agent";
|
|
18
|
+
orb: {
|
|
19
|
+
form: AgentOrbFigure;
|
|
20
|
+
color?: CSSProperties["color"];
|
|
21
|
+
state?: AgentOrbState;
|
|
22
|
+
};
|
|
23
|
+
/** Wraps the drawn orb, such as in the product's view transition that carries her to her page. */
|
|
24
|
+
frame?: (orb: ReactElement) => ReactNode;
|
|
25
|
+
} | ({
|
|
26
|
+
kind: "app";
|
|
27
|
+
app: string;
|
|
28
|
+
} & AppMarkGlyph) | {
|
|
29
|
+
kind: "company";
|
|
30
|
+
name: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "person";
|
|
33
|
+
name: string;
|
|
34
|
+
image?: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: "record";
|
|
37
|
+
/** The kind's own icon, the one its section has in the navigation: Mail for a mailbox. */
|
|
38
|
+
icon: IconComponent;
|
|
39
|
+
/** A catalogue kind's ground; neutral is the ringed card ground. */
|
|
40
|
+
tone?: "neutral" | "skill" | "plugin" | "teal";
|
|
41
|
+
});
|
|
42
|
+
/**
|
|
43
|
+
* What says which thing a record is, at a fixed size at the start of its row,
|
|
44
|
+
* its object's head or its feed line: an Agent's orb, an app's logo, a
|
|
45
|
+
* company's initials, a person's picture, or a record kind's icon on its tile.
|
|
46
|
+
*
|
|
47
|
+
* @family Status
|
|
48
|
+
* @when The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40): wherever it tells a person which thing they are looking at.
|
|
49
|
+
* @instead An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`.
|
|
50
|
+
* @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her orb from the orb engine, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo on the white tile; a company is two initials on the ringed card tile; a person is their picture, then their initials; a record with no picture of its own takes its kind's navigation icon, on the purple ground for a skill and the blue one for a plugin.
|
|
51
|
+
* @words None of its own: the record's name stands beside it. Initials are the first letters of the name's first two words.
|
|
52
|
+
* @access Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.
|
|
53
|
+
*/
|
|
54
|
+
export declare function IdentityMark(props: IdentityMarkProps): ReactNode;
|
|
55
|
+
//# sourceMappingURL=identity-mark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-mark.d.ts","sourceRoot":"","sources":["../../src/components/identity-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnF,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAInE,MAAM,MAAM,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE3D,qHAAqH;AACrH,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,4GAA4G;IAC5G,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,CACA;IACE,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAA;KAAE,CAAC;IACrF,kGAAkG;IAClG,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,SAAS,CAAC;CAC1C,GACD,CAAC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAC7C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,0FAA0F;IAC1F,IAAI,EAAE,aAAa,CAAC;IACpB,oEAAoE;IACpE,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAChD,CACJ,CAAC;AAqEF;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAoDhE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AgentOrb, } from "./agent-orb.js";
|
|
3
|
+
import { AppMark } from "./app-mark.js";
|
|
4
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
const MEASURES = {
|
|
7
|
+
20: { orb: 20, icon: 12, initials: 8 },
|
|
8
|
+
24: { orb: 24, icon: 14, initials: 9 },
|
|
9
|
+
28: { orb: 24, icon: 16, initials: 10 },
|
|
10
|
+
32: { orb: 32, icon: 16, initials: 11 },
|
|
11
|
+
40: { orb: 40, icon: 20, initials: 13 },
|
|
12
|
+
64: { orb: 64, icon: 24, initials: 20 },
|
|
13
|
+
};
|
|
14
|
+
const TONES = {
|
|
15
|
+
neutral: "bg-card text-muted-foreground ring-1 ring-border ring-inset",
|
|
16
|
+
skill: "bg-category-purple text-category-purple-foreground",
|
|
17
|
+
plugin: "bg-info-soft text-info-soft-foreground",
|
|
18
|
+
teal: "bg-category-teal text-category-teal-foreground",
|
|
19
|
+
};
|
|
20
|
+
function identityInitials(name) {
|
|
21
|
+
return name
|
|
22
|
+
.split(/\s+/)
|
|
23
|
+
.map((word) => word.match(/^[\p{L}\p{N}]/u)?.[0])
|
|
24
|
+
.filter((initial) => initial !== undefined)
|
|
25
|
+
.slice(0, 2)
|
|
26
|
+
.join("")
|
|
27
|
+
.toUpperCase();
|
|
28
|
+
}
|
|
29
|
+
function naming(label) {
|
|
30
|
+
return label
|
|
31
|
+
? { role: "img", "aria-label": label }
|
|
32
|
+
: { "aria-hidden": true };
|
|
33
|
+
}
|
|
34
|
+
function Tile({ kind, label, size, tone, children, }) {
|
|
35
|
+
return (_jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", size >= 40 ? "rounded-md" : "rounded-sm", TONES[tone]), "data-kind": kind, "data-slot": "identity-mark", style: { width: size, height: size }, ...naming(label), children: children }));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* What says which thing a record is, at a fixed size at the start of its row,
|
|
39
|
+
* its object's head or its feed line: an Agent's orb, an app's logo, a
|
|
40
|
+
* company's initials, a person's picture, or a record kind's icon on its tile.
|
|
41
|
+
*
|
|
42
|
+
* @family Status
|
|
43
|
+
* @when The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40): wherever it tells a person which thing they are looking at.
|
|
44
|
+
* @instead An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`.
|
|
45
|
+
* @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her orb from the orb engine, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo on the white tile; a company is two initials on the ringed card tile; a person is their picture, then their initials; a record with no picture of its own takes its kind's navigation icon, on the purple ground for a skill and the blue one for a plugin.
|
|
46
|
+
* @words None of its own: the record's name stands beside it. Initials are the first letters of the name's first two words.
|
|
47
|
+
* @access Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.
|
|
48
|
+
*/
|
|
49
|
+
export function IdentityMark(props) {
|
|
50
|
+
const size = props.size ?? 32;
|
|
51
|
+
const measures = MEASURES[size];
|
|
52
|
+
switch (props.kind) {
|
|
53
|
+
case "agent": {
|
|
54
|
+
const orb = props.label ? (_jsx(AgentOrb, { ...props.orb, label: props.label, size: measures.orb })) : (_jsx(AgentOrb, { ...props.orb, decorative: true, size: measures.orb }));
|
|
55
|
+
return props.frame ? props.frame(orb) : orb;
|
|
56
|
+
}
|
|
57
|
+
case "app":
|
|
58
|
+
return props.platform ? (_jsx(AppMark, { app: props.app, label: props.label, platform: props.platform, size: size })) : (_jsx(AppMark, { app: props.app, label: props.label, logo: props.logo, size: size }));
|
|
59
|
+
case "person":
|
|
60
|
+
return (_jsxs(Avatar, { "data-kind": "person", "data-slot": "identity-mark", style: { width: size, height: size }, ...naming(props.label), children: [props.image ? _jsx(AvatarImage, { alt: "", src: props.image }) : null, _jsx(AvatarFallback, { style: { fontSize: measures.initials }, children: identityInitials(props.name) })] }));
|
|
61
|
+
case "company":
|
|
62
|
+
return (_jsx(Tile, { kind: "company", label: props.label, size: size, tone: "neutral", children: _jsx("span", { "aria-hidden": "true", className: "leading-none font-semibold", style: { fontSize: measures.initials }, children: identityInitials(props.name) }) }));
|
|
63
|
+
case "record":
|
|
64
|
+
return (_jsx(Tile, { kind: "record", label: props.label, size: size, tone: props.tone ?? "neutral", children: _jsx(props.icon, { "aria-hidden": "true", size: measures.icon }) }));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
|
+
/**
|
|
5
|
+
* One input box with something fixed inside it: a mark, a prefix, a button.
|
|
6
|
+
*
|
|
7
|
+
* @family Inputs
|
|
8
|
+
* @when A single-line value with something fixed inside the box: a search mark, a clear button, a
|
|
9
|
+
* prefix like *https://*, a copy button.
|
|
10
|
+
* @instead A collection's search is `CollectionSearch`, never a hand-built group. A plain value is
|
|
11
|
+
* `Input`. Many known values to filter is `Combobox`.
|
|
12
|
+
* @behaviour The group draws the edge and the focus outline for the input inside it. The clear
|
|
13
|
+
* button empties the value and puts focus back in the box. Escape clears only while the box holds
|
|
14
|
+
* the interaction and has a value; otherwise it closes the overlay as usual.
|
|
15
|
+
* @words Prefix and suffix are literal text, never the label. An inline button names what it does:
|
|
16
|
+
* *Clear search*, *Copy address*.
|
|
17
|
+
* @access `role="group"` around the box. The input inside keeps its own label. Inline buttons are
|
|
18
|
+
* named: *Clear search*, *Copy address*.
|
|
19
|
+
*/
|
|
4
20
|
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
21
|
declare const inputGroupAddonVariants: (props?: ({
|
|
6
22
|
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../src/components/input-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYvE;AAED,QAAA,MAAM,uBAAuB;;8EAiB5B,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,KAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,qBAkB5E;AAED,QAAA,MAAM,wBAAwB;;8EAY5B,CAAC;AAEH,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAe,EACf,OAAiB,EACjB,IAAW,EACX,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAC3D,YAAY,CAAC,OAAO,wBAAwB,CAAC,GAAG;IAC9C,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC,qBAUF;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAU5E;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAW9E;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAWpF;AAED,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../src/components/input-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYvE;AAED,QAAA,MAAM,uBAAuB;;8EAiB5B,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,KAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,qBAkB5E;AAED,QAAA,MAAM,wBAAwB;;8EAY5B,CAAC;AAEH,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAe,EACf,OAAiB,EACjB,IAAW,EACX,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAC3D,YAAY,CAAC,OAAO,wBAAwB,CAAC,GAAG;IAC9C,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC,qBAUF;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAU5E;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAW9E;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAWpF;AAED,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,CAAC"}
|
|
@@ -5,6 +5,22 @@ import { cn } from "../lib/utils.js";
|
|
|
5
5
|
import { Button } from "./button.js";
|
|
6
6
|
import { Input } from "./input.js";
|
|
7
7
|
import { Textarea } from "./textarea.js";
|
|
8
|
+
/**
|
|
9
|
+
* One input box with something fixed inside it: a mark, a prefix, a button.
|
|
10
|
+
*
|
|
11
|
+
* @family Inputs
|
|
12
|
+
* @when A single-line value with something fixed inside the box: a search mark, a clear button, a
|
|
13
|
+
* prefix like *https://*, a copy button.
|
|
14
|
+
* @instead A collection's search is `CollectionSearch`, never a hand-built group. A plain value is
|
|
15
|
+
* `Input`. Many known values to filter is `Combobox`.
|
|
16
|
+
* @behaviour The group draws the edge and the focus outline for the input inside it. The clear
|
|
17
|
+
* button empties the value and puts focus back in the box. Escape clears only while the box holds
|
|
18
|
+
* the interaction and has a value; otherwise it closes the overlay as usual.
|
|
19
|
+
* @words Prefix and suffix are literal text, never the label. An inline button names what it does:
|
|
20
|
+
* *Clear search*, *Copy address*.
|
|
21
|
+
* @access `role="group"` around the box. The input inside keeps its own label. Inline buttons are
|
|
22
|
+
* named: *Clear search*, *Copy address*.
|
|
23
|
+
*/
|
|
8
24
|
function InputGroup({ className, ...props }) {
|
|
9
25
|
return (_jsx("div", { "data-slot": "input-group", role: "group", className: cn("group/input-group relative flex h-control-height min-h-touch-target w-full min-w-0 items-center rounded-sm border border-input bg-background transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit has-disabled:bg-input/50 has-disabled:opacity-50 not-in-data-[slot=combobox-content]:has-[[data-slot=input-group-control]:focus-visible]:nc-focus-outline has-[[data-slot=input-group-control]:focus-visible]:outline-ring has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:nc-focus-outline has-[[data-slot][aria-invalid=true]]:outline-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [@media(hover:hover)_and_(pointer:fine)]:min-h-0", className), ...props }));
|
|
10
26
|
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { OTPInput } from "input-otp";
|
|
3
|
+
/**
|
|
4
|
+
* A fixed-length code typed into one slot per character.
|
|
5
|
+
*
|
|
6
|
+
* @family Inputs
|
|
7
|
+
* @when A fixed-length code a person types: the two-factor code at the Portal's sign-in.
|
|
8
|
+
* @instead A code a person only compares between two screens is `PairingCode`. A long token is
|
|
9
|
+
* `Input` with a copy or paste action.
|
|
10
|
+
* @behaviour One real input behind the slots: paste fills them all, Backspace walks back. The
|
|
11
|
+
* active slot carries the focus outline and a still caret. A wrong code turns the group red and
|
|
12
|
+
* keeps the digits so the person can correct them. Resend follows the product's real policy.
|
|
13
|
+
* @words The label says where the code comes from. The error says what to do: *That code didn't
|
|
14
|
+
* match. Check the newest code in your app.*
|
|
15
|
+
* @access One labelled input with `autocomplete="one-time-code"` and `inputMode="numeric"`. The
|
|
16
|
+
* separator is decorative to the reader.
|
|
17
|
+
*/
|
|
3
18
|
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
4
19
|
containerClassName?: string;
|
|
5
20
|
}): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/components/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAKtD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,qBAoBA;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,qBAsBA;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWnE;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/components/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAKtD;;;;;;;;;;;;;;GAcG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,qBAoBA;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,qBAsBA;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWnE;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -4,6 +4,21 @@ import * as React from "react";
|
|
|
4
4
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
6
|
import { MinusIcon } from "lucide-react";
|
|
7
|
+
/**
|
|
8
|
+
* A fixed-length code typed into one slot per character.
|
|
9
|
+
*
|
|
10
|
+
* @family Inputs
|
|
11
|
+
* @when A fixed-length code a person types: the two-factor code at the Portal's sign-in.
|
|
12
|
+
* @instead A code a person only compares between two screens is `PairingCode`. A long token is
|
|
13
|
+
* `Input` with a copy or paste action.
|
|
14
|
+
* @behaviour One real input behind the slots: paste fills them all, Backspace walks back. The
|
|
15
|
+
* active slot carries the focus outline and a still caret. A wrong code turns the group red and
|
|
16
|
+
* keeps the digits so the person can correct them. Resend follows the product's real policy.
|
|
17
|
+
* @words The label says where the code comes from. The error says what to do: *That code didn't
|
|
18
|
+
* match. Check the newest code in your app.*
|
|
19
|
+
* @access One labelled input with `autocomplete="one-time-code"` and `inputMode="numeric"`. The
|
|
20
|
+
* separator is decorative to the reader.
|
|
21
|
+
*/
|
|
7
22
|
function InputOTP({ className, containerClassName, ...props }) {
|
|
8
23
|
return (_jsx(OTPInput, { "data-slot": "input-otp", containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName), spellCheck: false,
|
|
9
24
|
// The hidden native input spans the whole container; the active slot is
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* One line of free text, edged in the input grey.
|
|
4
|
+
*
|
|
5
|
+
* @family Inputs
|
|
6
|
+
* @when One free-form value on one line: a name, an address, a number.
|
|
7
|
+
* @instead Text with a fixed prefix, an icon or a button inside is `InputGroup`. Several lines are
|
|
8
|
+
* `Textarea`. A known set of values is a select, radios or a combobox.
|
|
9
|
+
* @behaviour 36 px, edged in the `input` role's grey with no shadow, 6 px corners. Focus is the 2 px outline. Invalid keeps a red edge and a red outline even without
|
|
10
|
+
* focus. Disabled is 50% on a half-grey fill. The value survives a failed save.
|
|
11
|
+
* @words The label is a noun in sentence case with no colon. The placeholder is an example (*Bizeta
|
|
12
|
+
* Arredamenti*), never the label or an instruction. In a configuration section the box stops at 20
|
|
13
|
+
* rem under its label.
|
|
14
|
+
* @access A visible `label` tied by `id`, the help and the error joined through `aria-describedby`,
|
|
15
|
+
* `aria-invalid` when wrong. Use the right `type`, `autocomplete` and `inputMode`.
|
|
16
|
+
*/
|
|
2
17
|
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
|
3
18
|
export { Input };
|
|
4
19
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAY1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;GAcG;AACH,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAY1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/components/input.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* One line of free text, edged in the input grey.
|
|
6
|
+
*
|
|
7
|
+
* @family Inputs
|
|
8
|
+
* @when One free-form value on one line: a name, an address, a number.
|
|
9
|
+
* @instead Text with a fixed prefix, an icon or a button inside is `InputGroup`. Several lines are
|
|
10
|
+
* `Textarea`. A known set of values is a select, radios or a combobox.
|
|
11
|
+
* @behaviour 36 px, edged in the `input` role's grey with no shadow, 6 px corners. Focus is the 2 px outline. Invalid keeps a red edge and a red outline even without
|
|
12
|
+
* focus. Disabled is 50% on a half-grey fill. The value survives a failed save.
|
|
13
|
+
* @words The label is a noun in sentence case with no colon. The placeholder is an example (*Bizeta
|
|
14
|
+
* Arredamenti*), never the label or an instruction. In a configuration section the box stops at 20
|
|
15
|
+
* rem under its label.
|
|
16
|
+
* @access A visible `label` tied by `id`, the help and the error joined through `aria-describedby`,
|
|
17
|
+
* `aria-invalid` when wrong. Use the right `type`, `autocomplete` and `inputMode`.
|
|
18
|
+
*/
|
|
4
19
|
function Input({ className, type, ...props }) {
|
|
5
20
|
return (_jsx(InputPrimitive, { type: type, "data-slot": "input", className: cn("h-control-height min-h-touch-target w-full min-w-0 rounded-sm border border-input bg-background px-control-padding-inline py-1 text-base transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-placeholder disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive [@media(hover:hover)_and_(pointer:fine)]:min-h-0 md:text-sm", className), ...props }));
|
|
6
21
|
}
|
|
@@ -17,6 +17,22 @@ declare const itemVariants: (props?: ({
|
|
|
17
17
|
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
18
18
|
size?: "default" | "xs" | "sm" | null | undefined;
|
|
19
19
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
/**
|
|
21
|
+
* A row said in a sentence: media, a title, one line of description, trailing actions.
|
|
22
|
+
*
|
|
23
|
+
* @family Data
|
|
24
|
+
* @when Things best said in a sentence: an activity feed, a Library shelf, connected accounts.
|
|
25
|
+
* Media, a title, one line of description, trailing actions.
|
|
26
|
+
* @instead Facts that compare across records are a `DataTable`. A page whose job is one collection
|
|
27
|
+
* is `CollectionPage`. Agents in a gallery are `AgentListRow`; Library entries `CatalogEntry`.
|
|
28
|
+
* @behaviour Inside a card the group is `divided`: no gaps, one hairline between items. An item
|
|
29
|
+
* that is an `a` or `button` takes the `accent` hover and is one hit target; nested controls stay
|
|
30
|
+
* independent. The title holds one line.
|
|
31
|
+
* @words Title: the name, or what happened as a short sentence (*Nadia filed 12 invoices*).
|
|
32
|
+
* Description: one sentence. One primary action as a button; the rest in the three dots.
|
|
33
|
+
* @access The group is a `list` and each item a list item. A linked item's text is its name; image
|
|
34
|
+
* media is decorative beside the title.
|
|
35
|
+
*/
|
|
20
36
|
declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
21
37
|
declare const itemMediaVariants: (props?: ({
|
|
22
38
|
variant?: "image" | "default" | "icon" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/components/item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,OAAe,EACf,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACnC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,0EAmBA;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,qBAWrF;AAED,QAAA,MAAM,YAAY;;;8EAoBjB,CAAC;AAEF,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,0EAgBrE;AAED,QAAA,MAAM,iBAAiB;;8EAetB,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,qBAStE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWtE;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,KAAa,EACb,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,4FAA4F;IAC5F,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,qBAYA;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EACL,IAAI,EACJ,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,GACX,CAAC"}
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/components/item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,OAAe,EACf,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACnC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,0EAmBA;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,qBAWrF;AAED,QAAA,MAAM,YAAY;;;8EAoBjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,0EAgBrE;AAED,QAAA,MAAM,iBAAiB;;8EAetB,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,qBAStE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWtE;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,KAAa,EACb,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,4FAA4F;IAC5F,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,qBAYA;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EACL,IAAI,EACJ,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,GACX,CAAC"}
|
package/dist/components/item.js
CHANGED
|
@@ -38,6 +38,22 @@ const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap i
|
|
|
38
38
|
size: "default",
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
|
+
/**
|
|
42
|
+
* A row said in a sentence: media, a title, one line of description, trailing actions.
|
|
43
|
+
*
|
|
44
|
+
* @family Data
|
|
45
|
+
* @when Things best said in a sentence: an activity feed, a Library shelf, connected accounts.
|
|
46
|
+
* Media, a title, one line of description, trailing actions.
|
|
47
|
+
* @instead Facts that compare across records are a `DataTable`. A page whose job is one collection
|
|
48
|
+
* is `CollectionPage`. Agents in a gallery are `AgentListRow`; Library entries `CatalogEntry`.
|
|
49
|
+
* @behaviour Inside a card the group is `divided`: no gaps, one hairline between items. An item
|
|
50
|
+
* that is an `a` or `button` takes the `accent` hover and is one hit target; nested controls stay
|
|
51
|
+
* independent. The title holds one line.
|
|
52
|
+
* @words Title: the name, or what happened as a short sentence (*Nadia filed 12 invoices*).
|
|
53
|
+
* Description: one sentence. One primary action as a button; the rest in the three dots.
|
|
54
|
+
* @access The group is a `list` and each item a list item. A linked item's text is its name; image
|
|
55
|
+
* media is decorative beside the title.
|
|
56
|
+
*/
|
|
41
57
|
function Item({ className, variant = "default", size = "default", render, ...props }) {
|
|
42
58
|
return useRender({
|
|
43
59
|
defaultTagName: "div",
|
package/dist/components/kbd.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One key of a shortcut, beside the command it triggers.
|
|
3
|
+
*
|
|
4
|
+
* @family Data
|
|
5
|
+
* @when A shortcut hint next to the command it triggers: Find with ⌘K, the sidebar with ⌘B. 20 px,
|
|
6
|
+
* 2 px corners, mono 12 on the recessed fill.
|
|
7
|
+
* @instead A key a person types into is an `Input`; a code a person types is `InputOTP`. In a
|
|
8
|
+
* command list, `CommandShortcut`.
|
|
9
|
+
* @behaviour Not interactive. Only shortcuts actually bound are shown. The caller maps the
|
|
10
|
+
* platform: ⌘ on macOS, Ctrl on Windows and Linux.
|
|
11
|
+
* @words One key per `Kbd`; symbols for macOS modifiers (⌘ ⇧ ⌥), words elsewhere (*Ctrl*).
|
|
12
|
+
* Surrounding prose stays outside the key.
|
|
13
|
+
* @access A `kbd` element, read in order; the command's own name carries the meaning.
|
|
14
|
+
*/
|
|
1
15
|
declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): import("react").JSX.Element;
|
|
2
16
|
declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
3
17
|
export { Kbd, KbdGroup };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/components/kbd.tsx"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWhE;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQrE;AAED,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/components/kbd.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWhE;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQrE;AAED,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/components/kbd.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* One key of a shortcut, beside the command it triggers.
|
|
5
|
+
*
|
|
6
|
+
* @family Data
|
|
7
|
+
* @when A shortcut hint next to the command it triggers: Find with ⌘K, the sidebar with ⌘B. 20 px,
|
|
8
|
+
* 2 px corners, mono 12 on the recessed fill.
|
|
9
|
+
* @instead A key a person types into is an `Input`; a code a person types is `InputOTP`. In a
|
|
10
|
+
* command list, `CommandShortcut`.
|
|
11
|
+
* @behaviour Not interactive. Only shortcuts actually bound are shown. The caller maps the
|
|
12
|
+
* platform: ⌘ on macOS, Ctrl on Windows and Linux.
|
|
13
|
+
* @words One key per `Kbd`; symbols for macOS modifiers (⌘ ⇧ ⌥), words elsewhere (*Ctrl*).
|
|
14
|
+
* Surrounding prose stays outside the key.
|
|
15
|
+
* @access A `kbd` element, read in order; the command's own name carries the meaning.
|
|
16
|
+
*/
|
|
3
17
|
function Kbd({ className, ...props }) {
|
|
4
18
|
return (_jsx("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-xs border border-border bg-recessed px-1 font-label-mono text-caption font-normal text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-recessed in-data-[slot=tooltip-content]:text-popover-foreground [&_svg:not([class*='size-'])]:size-3", className), ...props }));
|
|
5
19
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import type { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import { type TrendDirection } from "./trend-badge.js";
|
|
4
|
-
/**
|
|
5
|
-
* kpi-card — one measured figure, the way the dashboard-01 section card shows
|
|
6
|
-
* it: the label above the value, the change top right as a badge, and the
|
|
7
|
-
* named comparison in the footer (`rule/kpi-card-trend-top-right`). Use the inline presentation for measurements already grouped inside a section.
|
|
8
|
-
*/
|
|
9
4
|
type KpiCardDirection = TrendDirection;
|
|
10
5
|
type KpiCardTone = "default" | "warning" | "critical";
|
|
11
6
|
type KpiCardDelta = {
|
|
@@ -19,19 +14,32 @@ type KpiCardDelta = {
|
|
|
19
14
|
/** The whole comparison line in the reader's language, e.g. "vs August", "rispetto al mese di agosto". */
|
|
20
15
|
comparison: string;
|
|
21
16
|
/** The direction in the reader's language, for a screen reader. */
|
|
22
|
-
directionLabel
|
|
17
|
+
directionLabel: string;
|
|
23
18
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
label:
|
|
19
|
+
type KpiCardProps = {
|
|
20
|
+
/** Words only: no icon sits beside a figure's label. */
|
|
21
|
+
label: string;
|
|
27
22
|
value: React.ReactNode;
|
|
28
23
|
delta?: KpiCardDelta;
|
|
29
24
|
note?: React.ReactNode;
|
|
30
25
|
tone?: KpiCardTone;
|
|
31
26
|
/** Binds an app link or element without replacing the card's presentation. */
|
|
32
27
|
render?: useRender.ComponentProps<"div">["render"];
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
/** `inline` for measurements already grouped inside a section. */
|
|
29
|
+
presentation?: "card" | "inline";
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* One measured figure, the way the dashboard-01 section card shows it: the label above the value, the change top
|
|
33
|
+
* right as a badge, and the named comparison in the footer (`rule/kpi-card-trend-top-right`).
|
|
34
|
+
*
|
|
35
|
+
* @family Charts
|
|
36
|
+
* @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
|
|
37
|
+
* @instead A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap is `Progress`.
|
|
38
|
+
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. A figure with no comparison shows no badge and no empty footer. Direction crossed with whether up is good sets the badge icon's tone: success, blocked, or grey for a flat or neutral measure. `tone` marks the value itself as warning or critical when it crosses a threshold.
|
|
39
|
+
* @words The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.
|
|
40
|
+
* @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour.
|
|
41
|
+
*/
|
|
42
|
+
declare function KpiCard({ label, value, delta, note, tone, render, presentation, }: KpiCardProps): React.JSX.Element;
|
|
35
43
|
export { KpiCard };
|
|
36
|
-
export type { KpiCardDelta, KpiCardDirection, KpiCardTone };
|
|
44
|
+
export type { KpiCardDelta, KpiCardDirection, KpiCardProps, KpiCardTone };
|
|
37
45
|
//# sourceMappingURL=kpi-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kpi-card.d.ts","sourceRoot":"","sources":["../../src/components/kpi-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"kpi-card.d.ts","sourceRoot":"","sources":["../../src/components/kpi-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAW3D,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEtF,KAAK,gBAAgB,GAAG,cAAc,CAAC;AACvC,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,KAAK,YAAY,GAAG;IAClB,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAClC,CAAC;AAQF;;;;;;;;;;GAUG;AACH,iBAAS,OAAO,CAAC,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAgB,EAChB,MAAM,EACN,YAAqB,GACtB,EAAE,YAAY,qBAyDd;AAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -10,10 +10,21 @@ const VALUE_TONE_CLASS = {
|
|
|
10
10
|
warning: "text-warning-soft-foreground",
|
|
11
11
|
critical: "text-destructive-soft-foreground",
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* One measured figure, the way the dashboard-01 section card shows it: the label above the value, the change top
|
|
15
|
+
* right as a badge, and the named comparison in the footer (`rule/kpi-card-trend-top-right`).
|
|
16
|
+
*
|
|
17
|
+
* @family Charts
|
|
18
|
+
* @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
|
|
19
|
+
* @instead A figure read over time is a `ChartCard`, and a single figure is never nested inside one. A ratio beside two money measures is a `KpiCard` next to the chart, never a second axis. A level against a cap is `Progress`.
|
|
20
|
+
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. A figure with no comparison shows no badge and no empty footer. Direction crossed with whether up is good sets the badge icon's tone: success, blocked, or grey for a flat or neutral measure. `tone` marks the value itself as warning or critical when it crosses a threshold.
|
|
21
|
+
* @words The label names the measure in sentence case: "Active Agents", "Spend". The change is signed with a true minus and its unit ("+12.4%", "−1"), the comparison names the period: "vs 16 last week", "vs August 2026". No icon beside the label.
|
|
22
|
+
* @access The trend icon is hidden and the direction is read as a word in the reader's language (`directionLabel`). Figures use tabular digits. The value is text, never only colour.
|
|
23
|
+
*/
|
|
24
|
+
function KpiCard({ label, value, delta, note, tone = "default", render, presentation = "card", }) {
|
|
14
25
|
if (presentation === "inline") {
|
|
15
|
-
return (_jsxs("div", { className: "grid min-w-0 content-start gap-2", "data-slot": "metric-summary", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: label }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("p", { className: cn("text-2xl font-semibold tabular-nums", VALUE_TONE_CLASS[tone]), children: value }), delta ? (_jsx(TrendBadge, { value: delta.value, direction: delta.direction, tone: trendTone(delta.direction, delta.upIsGood, delta.neutral),
|
|
26
|
+
return (_jsxs("div", { className: "grid min-w-0 content-start gap-2", "data-slot": "metric-summary", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: label }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("p", { className: cn("text-2xl font-semibold tabular-nums", VALUE_TONE_CLASS[tone]), children: value }), delta ? (_jsx(TrendBadge, { value: delta.value, direction: delta.direction, tone: trendTone(delta.direction, delta.upIsGood, delta.neutral), directionLabel: delta.directionLabel })) : null] }), delta ? _jsx("p", { className: "text-xs text-muted-foreground", children: delta.comparison }) : null, note ? _jsx("p", { className: "text-xs text-muted-foreground", children: note }) : null] }));
|
|
16
27
|
}
|
|
17
|
-
return (_jsxs(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone,
|
|
28
|
+
return (_jsxs(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, ...(render ? { render } : {}), children: [_jsxs(CardHeader, { children: [_jsx(CardDescription, { className: "line-clamp-2 min-h-10", children: label }), _jsx(CardTitle, { className: cn("text-heading-md tabular-nums group-data-[size=sm]/card:text-heading-md", VALUE_TONE_CLASS[tone]), children: value }), delta ? (_jsx(CardAction, { "data-kpi-delta": delta.direction, children: _jsx(TrendBadge, { value: delta.value, direction: delta.direction, tone: trendTone(delta.direction, delta.upIsGood, delta.neutral), directionLabel: delta.directionLabel }) })) : null] }), delta || note ? (_jsxs(CardFooter, { className: "flex-col items-start gap-1.5 text-sm", children: [delta ? _jsx("div", { className: "text-muted-foreground", children: delta.comparison }) : null, note ? _jsx("div", { className: "text-muted-foreground", children: note }) : null] })) : null] }));
|
|
18
29
|
}
|
|
19
30
|
export { KpiCard };
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A small muted label of metadata, and its mono sibling for a command's suffix.
|
|
4
|
+
*
|
|
5
|
+
* @family Status
|
|
6
|
+
* @when A short fixed fact set beside a name in dense chrome: *Built in*, *Read only*.
|
|
7
|
+
* `CommandSuffix` holds a count or a key after a command.
|
|
8
|
+
* @instead A state is `StatusBadge`; a category is `Tag`; a plan or role is `Badge`. A bound
|
|
9
|
+
* shortcut is `Kbd`.
|
|
10
|
+
* @behaviour 20 px, 6 px corners, the muted fill, never interactive, never wraps.
|
|
11
|
+
* @words One or two words in sentence case.
|
|
12
|
+
* @access Read in place as text.
|
|
13
|
+
*/
|
|
2
14
|
declare function MetaLabel({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
3
15
|
declare function CommandSuffix({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
4
16
|
export { CommandSuffix, MetaLabel };
|