@nadicodeai/ui 12.1.101 → 12.1.103
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/dist/components/accordion.d.ts +38 -12
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +36 -15
- package/dist/components/account-menu.d.ts +18 -18
- package/dist/components/account-menu.d.ts.map +1 -1
- package/dist/components/account-menu.js +17 -13
- package/dist/components/action-menu.d.ts +20 -19
- package/dist/components/action-menu.d.ts.map +1 -1
- package/dist/components/action-menu.js +22 -15
- package/dist/components/action-status.d.ts +14 -10
- package/dist/components/action-status.d.ts.map +1 -1
- package/dist/components/action-status.js +14 -10
- package/dist/components/activity-calendar.d.ts +3 -1
- package/dist/components/activity-calendar.d.ts.map +1 -1
- package/dist/components/activity-calendar.js +16 -2
- package/dist/components/activity-feed.d.ts +2 -2
- package/dist/components/activity-feed.d.ts.map +1 -1
- package/dist/components/activity-feed.js +14 -5
- package/dist/components/agent-card.d.ts +11 -5
- package/dist/components/agent-card.d.ts.map +1 -1
- package/dist/components/agent-card.js +13 -7
- package/dist/components/agent-list-row.js +1 -1
- package/dist/components/agent-orb-appearance.d.ts +7 -1
- package/dist/components/agent-orb-appearance.d.ts.map +1 -1
- package/dist/components/agent-orb-appearance.js +26 -0
- package/dist/components/agent-profile.d.ts +8 -7
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +6 -6
- package/dist/components/alert-dialog.d.ts +25 -16
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +30 -18
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/avatar.d.ts +83 -17
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +89 -23
- package/dist/components/badge.d.ts +59 -8
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +57 -14
- package/dist/components/breadcrumb.d.ts +18 -7
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +37 -13
- package/dist/components/button-group.d.ts +12 -15
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button-group.js +13 -17
- package/dist/components/button.d.ts +126 -23
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +164 -39
- package/dist/components/calendar.d.ts +26 -15
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +60 -46
- package/dist/components/card-row.d.ts +13 -5
- package/dist/components/card-row.d.ts.map +1 -1
- package/dist/components/card-row.js +24 -10
- package/dist/components/card.d.ts +6 -12
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +11 -16
- package/dist/components/carousel.d.ts +3 -3
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +7 -7
- package/dist/components/catalog-drawer.d.ts +7 -7
- package/dist/components/catalog-drawer.d.ts.map +1 -1
- package/dist/components/catalog-drawer.js +6 -6
- package/dist/components/chart-area-stacked.d.ts +1 -1
- package/dist/components/chart-area-stacked.d.ts.map +1 -1
- package/dist/components/chart-area-stacked.js +4 -4
- package/dist/components/chart-axis.d.ts +14 -1
- package/dist/components/chart-axis.d.ts.map +1 -1
- package/dist/components/chart-axis.js +11 -1
- package/dist/components/chart-bar-horizontal.d.ts +2 -2
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +14 -5
- package/dist/components/chart-bar-multiple.d.ts +1 -1
- package/dist/components/chart-bar-multiple.d.ts.map +1 -1
- package/dist/components/chart-bar-multiple.js +3 -3
- package/dist/components/chart-bar-stacked.d.ts +1 -1
- package/dist/components/chart-bar-stacked.d.ts.map +1 -1
- package/dist/components/chart-bar-stacked.js +3 -3
- package/dist/components/chart-card.d.ts +17 -6
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +11 -4
- package/dist/components/chart-date-range-control.d.ts +18 -9
- package/dist/components/chart-date-range-control.d.ts.map +1 -1
- package/dist/components/chart-date-range-control.js +43 -47
- package/dist/components/chart-sparkline.d.ts +4 -3
- package/dist/components/chart-sparkline.d.ts.map +1 -1
- package/dist/components/chart-sparkline.js +6 -5
- package/dist/components/check-counts.d.ts +44 -0
- package/dist/components/check-counts.d.ts.map +1 -0
- package/dist/components/check-counts.js +51 -0
- package/dist/components/checkbox.d.ts +39 -11
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +38 -11
- package/dist/components/choicebox.d.ts +96 -0
- package/dist/components/choicebox.d.ts.map +1 -0
- package/dist/components/choicebox.js +113 -0
- package/dist/components/clearable-input.d.ts +57 -0
- package/dist/components/clearable-input.d.ts.map +1 -0
- package/dist/components/clearable-input.js +58 -0
- package/dist/components/code-block.d.ts +77 -17
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +85 -15
- package/dist/components/collapsible.d.ts +27 -10
- package/dist/components/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible.js +24 -9
- package/dist/components/collection-filters.d.ts +3 -1
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +7 -9
- package/dist/components/collection-page.d.ts +31 -10
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +14 -13
- package/dist/components/collection-search.d.ts +32 -10
- package/dist/components/collection-search.d.ts.map +1 -1
- package/dist/components/collection-search.js +24 -13
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +2 -2
- package/dist/components/collection-toolbar.d.ts +5 -2
- package/dist/components/collection-toolbar.d.ts.map +1 -1
- package/dist/components/collection-toolbar.js +7 -4
- package/dist/components/combobox.d.ts +97 -22
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +80 -28
- package/dist/components/command.d.ts +34 -21
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +33 -25
- package/dist/components/confirm-dialog.d.ts +23 -6
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +32 -13
- package/dist/components/context-menu.d.ts +14 -10
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +17 -12
- package/dist/components/copy-button.d.ts +5 -2
- package/dist/components/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button.js +16 -8
- package/dist/components/data-table.d.ts +120 -54
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +163 -92
- package/dist/components/desktop-shell.d.ts +4 -2
- package/dist/components/desktop-shell.d.ts.map +1 -1
- package/dist/components/desktop-shell.js +3 -3
- package/dist/components/dialog.d.ts +63 -24
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +52 -31
- package/dist/components/disclosure-row.d.ts +1 -2
- package/dist/components/disclosure-row.d.ts.map +1 -1
- package/dist/components/disclosure-row.js +1 -2
- package/dist/components/disclosure.d.ts +1 -1
- package/dist/components/disclosure.js +1 -1
- package/dist/components/drawer.d.ts +33 -12
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +47 -35
- package/dist/components/dropdown-menu.d.ts +59 -14
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +58 -26
- package/dist/components/empty-state.d.ts +35 -12
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state.js +35 -17
- package/dist/components/entry-scene.d.ts +4 -4
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +2 -2
- package/dist/components/field.d.ts +44 -14
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +49 -20
- package/dist/components/file-diff.d.ts.map +1 -1
- package/dist/components/file-diff.js +3 -4
- package/dist/components/form-dialog.d.ts +7 -7
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +13 -11
- package/dist/components/form-drawer.d.ts +10 -7
- package/dist/components/form-drawer.d.ts.map +1 -1
- package/dist/components/form-drawer.js +11 -10
- package/dist/components/gauge.d.ts +64 -0
- package/dist/components/gauge.d.ts.map +1 -0
- package/dist/components/gauge.js +73 -0
- package/dist/components/hover-card.d.ts +72 -14
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +51 -17
- package/dist/components/identity-mark.d.ts +8 -1
- package/dist/components/identity-mark.d.ts.map +1 -1
- package/dist/components/identity-mark.js +31 -5
- package/dist/components/input-group.d.ts +44 -21
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +74 -27
- package/dist/components/input.d.ts +64 -12
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +51 -15
- package/dist/components/item.d.ts +37 -15
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +41 -22
- package/dist/components/kbd.d.ts +49 -13
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +115 -16
- package/dist/components/kpi-card.d.ts +12 -4
- package/dist/components/kpi-card.d.ts.map +1 -1
- package/dist/components/kpi-card.js +13 -4
- package/dist/components/label.d.ts +17 -10
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +18 -11
- package/dist/components/library-shelf.d.ts +6 -6
- package/dist/components/library-shelf.d.ts.map +1 -1
- package/dist/components/library-shelf.js +5 -5
- package/dist/components/load-more-button.d.ts +35 -0
- package/dist/components/load-more-button.d.ts.map +1 -0
- package/dist/components/load-more-button.js +26 -0
- package/dist/components/menu-choice-row.d.ts +6 -8
- package/dist/components/menu-choice-row.d.ts.map +1 -1
- package/dist/components/menu-choice-row.js +8 -8
- package/dist/components/message-notice.d.ts +8 -13
- package/dist/components/message-notice.d.ts.map +1 -1
- package/dist/components/message-notice.js +25 -22
- package/dist/components/middle-truncate.d.ts +33 -0
- package/dist/components/middle-truncate.d.ts.map +1 -0
- package/dist/components/middle-truncate.js +72 -0
- package/dist/components/multi-select.d.ts +94 -0
- package/dist/components/multi-select.d.ts.map +1 -0
- package/dist/components/multi-select.js +132 -0
- package/dist/components/native-select.d.ts +37 -13
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +27 -11
- package/dist/components/notice-banner.d.ts +17 -10
- package/dist/components/notice-banner.d.ts.map +1 -1
- package/dist/components/notice-banner.js +12 -11
- package/dist/components/numbered-steps.d.ts +10 -4
- package/dist/components/numbered-steps.d.ts.map +1 -1
- package/dist/components/numbered-steps.js +9 -7
- package/dist/components/object-page.d.ts +40 -14
- package/dist/components/object-page.d.ts.map +1 -1
- package/dist/components/object-page.js +12 -10
- package/dist/components/object-workspace.d.ts +29 -10
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +18 -8
- package/dist/components/overview-page.d.ts +2 -2
- package/dist/components/overview-page.d.ts.map +1 -1
- package/dist/components/overview-page.js +8 -7
- package/dist/components/page-actions.d.ts +28 -8
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +22 -25
- package/dist/components/page-header.d.ts +11 -4
- package/dist/components/page-header.d.ts.map +1 -1
- package/dist/components/page-header.js +10 -5
- package/dist/components/pending-label.d.ts +6 -5
- package/dist/components/pending-label.d.ts.map +1 -1
- package/dist/components/pending-label.js +14 -6
- package/dist/components/picture-label.d.ts +2 -2
- package/dist/components/picture-label.d.ts.map +1 -1
- package/dist/components/picture-label.js +3 -3
- package/dist/components/portal-sidebar-frame.d.ts +9 -21
- package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.js +13 -27
- package/dist/components/progress-checklist.d.ts +46 -0
- package/dist/components/progress-checklist.d.ts.map +1 -0
- package/dist/components/progress-checklist.js +46 -0
- package/dist/components/progress.d.ts +48 -8
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +92 -16
- package/dist/components/prose.d.ts +19 -0
- package/dist/components/prose.d.ts.map +1 -0
- package/dist/components/prose.js +29 -0
- package/dist/components/radio-group.d.ts +51 -12
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +42 -12
- package/dist/components/reading-column.js +1 -1
- package/dist/components/record-identity.d.ts +6 -5
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +12 -3
- package/dist/components/record-list.d.ts +117 -27
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +185 -55
- package/dist/components/record-time.d.ts +20 -7
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +38 -19
- package/dist/components/resizable.d.ts +7 -5
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +6 -6
- package/dist/components/scope-switcher.d.ts +2 -0
- package/dist/components/scope-switcher.d.ts.map +1 -1
- package/dist/components/scope-switcher.js +2 -2
- package/dist/components/scroll-area.d.ts +47 -11
- package/dist/components/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area.js +72 -14
- package/dist/components/segmented-control.d.ts +82 -0
- package/dist/components/segmented-control.d.ts.map +1 -0
- package/dist/components/segmented-control.js +90 -0
- package/dist/components/select.d.ts +55 -15
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +62 -19
- package/dist/components/separator.d.ts +12 -5
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +11 -6
- package/dist/components/settings-facts.d.ts +34 -14
- package/dist/components/settings-facts.d.ts.map +1 -1
- package/dist/components/settings-facts.js +21 -12
- package/dist/components/settings-page.d.ts +4 -4
- package/dist/components/settings-page.js +5 -5
- package/dist/components/settings-section.d.ts +160 -34
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +92 -39
- package/dist/components/sheet.d.ts +47 -16
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +40 -19
- package/dist/components/sidebar-sections.d.ts +16 -12
- package/dist/components/sidebar-sections.d.ts.map +1 -1
- package/dist/components/sidebar-sections.js +30 -15
- package/dist/components/sidebar.d.ts +117 -21
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +180 -55
- package/dist/components/skeleton.d.ts +54 -8
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton.js +44 -9
- package/dist/components/slider.d.ts +53 -11
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +71 -17
- package/dist/components/snippet.d.ts +57 -0
- package/dist/components/snippet.d.ts.map +1 -0
- package/dist/components/snippet.js +60 -0
- package/dist/components/sonner.d.ts +13 -14
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +25 -22
- package/dist/components/status-badge.d.ts +37 -11
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/status-badge.js +63 -15
- package/dist/components/status-dot.d.ts +42 -11
- package/dist/components/status-dot.d.ts.map +1 -1
- package/dist/components/status-dot.js +40 -11
- package/dist/components/switch.d.ts +43 -12
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +42 -12
- package/dist/components/table-card.d.ts +21 -12
- package/dist/components/table-card.d.ts.map +1 -1
- package/dist/components/table-card.js +17 -9
- package/dist/components/table-layouts.d.ts +40 -8
- package/dist/components/table-layouts.d.ts.map +1 -1
- package/dist/components/table-layouts.js +52 -8
- package/dist/components/table-value.d.ts +4 -3
- package/dist/components/table-value.d.ts.map +1 -1
- package/dist/components/table-value.js +6 -5
- package/dist/components/table.d.ts +62 -25
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +62 -26
- package/dist/components/tabs.d.ts +86 -17
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +93 -22
- package/dist/components/text-link.d.ts +4 -1
- package/dist/components/text-link.d.ts.map +1 -1
- package/dist/components/text-link.js +4 -1
- package/dist/components/text-with-copy-button.d.ts +30 -0
- package/dist/components/text-with-copy-button.d.ts.map +1 -0
- package/dist/components/text-with-copy-button.js +32 -0
- package/dist/components/textarea.d.ts +40 -10
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +50 -11
- package/dist/components/theme-mode-switcher.d.ts +20 -3
- package/dist/components/theme-mode-switcher.d.ts.map +1 -1
- package/dist/components/theme-mode-switcher.js +23 -6
- package/dist/components/toggle-group.d.ts +28 -8
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +12 -6
- package/dist/components/toggle.d.ts +6 -3
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +10 -7
- package/dist/components/tooltip.d.ts +43 -12
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +45 -16
- package/dist/components/trend-badge.js +1 -1
- package/dist/components/update-card.js +1 -1
- package/dist/eslint/index.js +82 -0
- package/dist/eslint/rules/badge-is-static-label.js +93 -0
- package/dist/eslint/rules/button-icon-slot.js +102 -0
- package/dist/eslint/rules/button-link-for-navigation.js +146 -0
- package/dist/eslint/rules/button-no-aria-label-with-text.js +75 -0
- package/dist/eslint/rules/button-type-roles-only-in-buttons.js +83 -0
- package/dist/eslint/rules/choice-control-has-a-name.js +98 -0
- package/dist/eslint/rules/choice-group-in-fieldset.js +86 -0
- package/dist/eslint/rules/command-shortcut-single-owner.js +118 -0
- package/dist/eslint/rules/confirm-dialog-words.js +63 -0
- package/dist/eslint/rules/data-table-one-unsized-column.js +96 -0
- package/dist/eslint/rules/destructive-action-placement.js +69 -0
- package/dist/eslint/rules/disabled-choice-says-why.js +71 -0
- package/dist/eslint/rules/ellipsis-opens-a-dialog.js +110 -0
- package/dist/eslint/rules/input-group-owners.js +155 -0
- package/dist/eslint/rules/kbd-children-no-modifier-text.js +128 -0
- package/dist/eslint/rules/literal-text.js +41 -0
- package/dist/eslint/rules/middle-truncate-placement.js +69 -0
- package/dist/eslint/rules/no-bare-button-label.js +55 -0
- package/dist/eslint/rules/no-control-in-read-only-surface.js +106 -0
- package/dist/eslint/rules/no-hand-built-busy.js +104 -0
- package/dist/eslint/rules/no-hand-built-theme-picker.js +144 -0
- package/dist/eslint/rules/no-hand-built-tile.js +41 -0
- package/dist/eslint/rules/no-hand-formatted-date.js +87 -0
- package/dist/eslint/rules/no-hand-stacked-avatars.js +67 -0
- package/dist/eslint/rules/no-nested-collapse.js +60 -0
- package/dist/eslint/rules/no-search-in-form.js +47 -0
- package/dist/eslint/rules/no-shadcn-appearance-override.js +2 -16
- package/dist/eslint/rules/no-shell-prompt-in-snippet.js +74 -0
- package/dist/eslint/rules/no-stock-error-words.js +56 -0
- package/dist/eslint/rules/no-tooltip-around-labelled-field.js +72 -0
- package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +57 -0
- package/dist/eslint/rules/one-submenu-level.js +43 -0
- package/dist/eslint/rules/one-toast-per-flow.js +91 -0
- package/dist/eslint/rules/option-count.js +167 -0
- package/dist/eslint/rules/page-command-link-not-render.js +43 -0
- package/dist/eslint/rules/progress-needs-name.js +57 -0
- package/dist/eslint/rules/settings-limit-in-footer.js +94 -0
- package/dist/eslint/rules/skeleton-in-region.js +80 -0
- package/dist/eslint/rules/sortable-heading-uses-sort.js +79 -0
- package/dist/eslint/rules/table-cell-inset-owner.js +107 -0
- package/dist/eslint/rules/tabs-selection-is-controlled.js +47 -0
- package/dist/eslint/rules/tooltip-only-arrow.js +38 -0
- package/dist/eslint/rules/tooltip-trigger-accessible-name.js +114 -0
- package/dist/eslint/strict-design-system.js +21 -7
- package/dist/index.d.ts +13 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -13
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/attachment.js +2 -2
- package/dist/internal/assistant-ui/reasoning.d.ts +1 -1
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +1 -1
- package/dist/internal/assistant-ui/tool-group.d.ts +1 -1
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tooltip-icon-button.d.ts +2 -3
- package/dist/internal/assistant-ui/tooltip-icon-button.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
- package/dist/internal/catalog-list.js +2 -2
- package/dist/internal/collection-note.d.ts +23 -0
- package/dist/internal/collection-note.d.ts.map +1 -0
- package/dist/internal/collection-note.js +17 -0
- package/dist/internal/collection-rail.d.ts +57 -0
- package/dist/internal/collection-rail.d.ts.map +1 -0
- package/dist/internal/collection-rail.js +33 -0
- package/dist/internal/company-logo.d.ts +18 -0
- package/dist/internal/company-logo.d.ts.map +1 -0
- package/dist/internal/company-logo.js +14 -0
- package/dist/internal/control-name.d.ts +12 -0
- package/dist/internal/control-name.d.ts.map +1 -0
- package/dist/internal/control-name.js +1 -0
- package/dist/internal/diff-line.d.ts +9 -0
- package/dist/internal/diff-line.d.ts.map +1 -0
- package/dist/internal/diff-line.js +8 -0
- package/dist/internal/empty.d.ts +8 -4
- package/dist/internal/empty.d.ts.map +1 -1
- package/dist/internal/empty.js +14 -8
- package/dist/internal/field-frame.d.ts +33 -0
- package/dist/internal/field-frame.d.ts.map +1 -0
- package/dist/internal/field-frame.js +20 -0
- package/dist/internal/final-focus.d.ts +8 -0
- package/dist/internal/final-focus.d.ts.map +1 -0
- package/dist/internal/final-focus.js +10 -0
- package/dist/internal/footer-strip.d.ts.map +1 -1
- package/dist/internal/footer-strip.js +3 -1
- package/dist/internal/form-submit.d.ts +9 -5
- package/dist/internal/form-submit.d.ts.map +1 -1
- package/dist/internal/form-submit.js +31 -2
- package/dist/internal/input-box.d.ts +26 -0
- package/dist/internal/input-box.d.ts.map +1 -0
- package/dist/internal/input-box.js +59 -0
- package/dist/internal/menu-surface.d.ts +10 -3
- package/dist/internal/menu-surface.d.ts.map +1 -1
- package/dist/internal/menu-surface.js +10 -3
- package/dist/internal/notice.d.ts +25 -0
- package/dist/internal/notice.d.ts.map +1 -0
- package/dist/internal/notice.js +33 -0
- package/dist/internal/overlay-stem.d.ts +5 -0
- package/dist/internal/overlay-stem.d.ts.map +1 -0
- package/dist/internal/overlay-stem.js +7 -0
- package/dist/internal/phone-sheet.d.ts +4 -0
- package/dist/internal/phone-sheet.d.ts.map +1 -0
- package/dist/internal/phone-sheet.js +2 -0
- package/dist/internal/present-content.d.ts +3 -0
- package/dist/internal/present-content.d.ts.map +1 -0
- package/dist/internal/present-content.js +1 -0
- package/dist/internal/record-menu-items.d.ts +4 -3
- package/dist/internal/record-menu-items.d.ts.map +1 -1
- package/dist/internal/record-menu-items.js +21 -6
- package/dist/internal/settings-save.d.ts +9 -2
- package/dist/internal/settings-save.d.ts.map +1 -1
- package/dist/internal/settings-save.js +9 -6
- package/dist/internal/table-compact-line.d.ts +38 -0
- package/dist/internal/table-compact-line.d.ts.map +1 -0
- package/dist/internal/table-compact-line.js +35 -0
- package/dist/internal/title-when-cut.d.ts +8 -0
- package/dist/internal/title-when-cut.d.ts.map +1 -0
- package/dist/internal/title-when-cut.js +22 -0
- package/dist/internal/unsaved-guard.d.ts +18 -0
- package/dist/internal/unsaved-guard.d.ts.map +1 -0
- package/dist/internal/unsaved-guard.js +31 -0
- package/dist/lib/merge-tokens.generated.js +2 -2
- package/dist/showcase/foundations.d.ts.map +1 -1
- package/dist/showcase/foundations.js +10 -2
- package/dist/showcase/specimens/actions.d.ts +2 -0
- package/dist/showcase/specimens/actions.d.ts.map +1 -1
- package/dist/showcase/specimens/actions.js +30 -5
- package/dist/showcase/specimens/charts.d.ts.map +1 -1
- package/dist/showcase/specimens/charts.js +22 -13
- package/dist/showcase/specimens/choices.d.ts +14 -3
- package/dist/showcase/specimens/choices.d.ts.map +1 -1
- package/dist/showcase/specimens/choices.js +93 -13
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +136 -23
- package/dist/showcase/specimens/data.d.ts +12 -7
- package/dist/showcase/specimens/data.d.ts.map +1 -1
- package/dist/showcase/specimens/data.js +139 -35
- package/dist/showcase/specimens/feedback.d.ts +2 -0
- package/dist/showcase/specimens/feedback.d.ts.map +1 -1
- package/dist/showcase/specimens/feedback.js +39 -15
- package/dist/showcase/specimens/index.d.ts +20 -12
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.d.ts +4 -2
- package/dist/showcase/specimens/inputs.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.js +62 -19
- package/dist/showcase/specimens/menus.d.ts +0 -1
- package/dist/showcase/specimens/menus.d.ts.map +1 -1
- package/dist/showcase/specimens/menus.js +47 -18
- package/dist/showcase/specimens/navigation.d.ts +6 -4
- package/dist/showcase/specimens/navigation.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.js +61 -32
- package/dist/showcase/specimens/other.d.ts +1 -3
- package/dist/showcase/specimens/other.d.ts.map +1 -1
- package/dist/showcase/specimens/other.js +17 -13
- package/dist/showcase/specimens/status.d.ts +4 -1
- package/dist/showcase/specimens/status.d.ts.map +1 -1
- package/dist/showcase/specimens/status.js +64 -11
- package/dist/showcase/usage.generated.d.ts +1 -1
- package/dist/showcase/usage.generated.d.ts.map +1 -1
- package/dist/showcase/usage.generated.js +637 -549
- package/dist/standalone/index.js +1 -1
- package/dist/styles/components.css +13 -13
- package/dist/styles/globals.css +25 -0
- package/package.json +2 -3
- package/dist/components/approval-row.d.ts +0 -34
- package/dist/components/approval-row.d.ts.map +0 -1
- package/dist/components/approval-row.js +0 -27
- package/dist/components/channel-view.d.ts +0 -112
- package/dist/components/channel-view.d.ts.map +0 -1
- package/dist/components/channel-view.js +0 -84
- package/dist/components/dashboard-shell.d.ts +0 -51
- package/dist/components/dashboard-shell.d.ts.map +0 -1
- package/dist/components/dashboard-shell.js +0 -89
- package/dist/components/direction.d.ts +0 -2
- package/dist/components/direction.d.ts.map +0 -1
- package/dist/components/direction.js +0 -1
- package/dist/components/expandable-block.d.ts +0 -20
- package/dist/components/expandable-block.d.ts.map +0 -1
- package/dist/components/expandable-block.js +0 -32
- package/dist/components/form.d.ts +0 -42
- package/dist/components/form.d.ts.map +0 -1
- package/dist/components/form.js +0 -91
- package/dist/components/label-system.d.ts +0 -17
- package/dist/components/label-system.d.ts.map +0 -1
- package/dist/components/label-system.js +0 -21
- package/dist/components/memory-item.d.ts +0 -21
- package/dist/components/memory-item.d.ts.map +0 -1
- package/dist/components/memory-item.js +0 -18
- package/dist/components/menubar.d.ts +0 -43
- package/dist/components/menubar.d.ts.map +0 -1
- package/dist/components/menubar.js +0 -69
- package/dist/components/navigation-menu.d.ts +0 -26
- package/dist/components/navigation-menu.d.ts.map +0 -1
- package/dist/components/navigation-menu.js +0 -45
- package/dist/components/pagination.d.ts +0 -33
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/pagination.js +0 -41
- package/dist/components/plugin-slot-boundary.d.ts +0 -42
- package/dist/components/plugin-slot-boundary.d.ts.map +0 -1
- package/dist/components/plugin-slot-boundary.js +0 -41
- package/dist/components/status-row.d.ts +0 -32
- package/dist/components/status-row.d.ts.map +0 -1
- package/dist/components/status-row.js +0 -35
package/dist/components/kbd.js
CHANGED
|
@@ -1,23 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useSyncExternalStore } from "react";
|
|
2
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
+
export const KBD_KEYS = [
|
|
6
|
+
"A",
|
|
7
|
+
"B",
|
|
8
|
+
"C",
|
|
9
|
+
"D",
|
|
10
|
+
"E",
|
|
11
|
+
"F",
|
|
12
|
+
"G",
|
|
13
|
+
"H",
|
|
14
|
+
"I",
|
|
15
|
+
"J",
|
|
16
|
+
"K",
|
|
17
|
+
"L",
|
|
18
|
+
"M",
|
|
19
|
+
"N",
|
|
20
|
+
"O",
|
|
21
|
+
"P",
|
|
22
|
+
"Q",
|
|
23
|
+
"R",
|
|
24
|
+
"S",
|
|
25
|
+
"T",
|
|
26
|
+
"U",
|
|
27
|
+
"V",
|
|
28
|
+
"W",
|
|
29
|
+
"X",
|
|
30
|
+
"Y",
|
|
31
|
+
"Z",
|
|
32
|
+
"0",
|
|
33
|
+
"1",
|
|
34
|
+
"2",
|
|
35
|
+
"3",
|
|
36
|
+
"4",
|
|
37
|
+
"5",
|
|
38
|
+
"6",
|
|
39
|
+
"7",
|
|
40
|
+
"8",
|
|
41
|
+
"9",
|
|
42
|
+
"/",
|
|
43
|
+
",",
|
|
44
|
+
".",
|
|
45
|
+
"?",
|
|
46
|
+
"[",
|
|
47
|
+
"]",
|
|
48
|
+
"-",
|
|
49
|
+
"=",
|
|
50
|
+
"Enter",
|
|
51
|
+
"Esc",
|
|
52
|
+
"Tab",
|
|
53
|
+
"Space",
|
|
54
|
+
"Backspace",
|
|
55
|
+
"Delete",
|
|
56
|
+
"ArrowUp",
|
|
57
|
+
"ArrowDown",
|
|
58
|
+
"ArrowLeft",
|
|
59
|
+
"ArrowRight",
|
|
60
|
+
];
|
|
61
|
+
const MODIFIERS = ["meta", "shift", "alt", "ctrl"];
|
|
62
|
+
const APPLE_GLYPHS = {
|
|
63
|
+
meta: "⌘",
|
|
64
|
+
shift: "⇧",
|
|
65
|
+
alt: "⌥",
|
|
66
|
+
ctrl: "⌃",
|
|
67
|
+
};
|
|
68
|
+
const OTHER_GLYPHS = {
|
|
69
|
+
meta: "Ctrl",
|
|
70
|
+
shift: "Shift",
|
|
71
|
+
alt: "Alt",
|
|
72
|
+
ctrl: "Ctrl",
|
|
73
|
+
};
|
|
74
|
+
const KEY_GLYPHS = new Map([
|
|
75
|
+
["ArrowUp", "↑"],
|
|
76
|
+
["ArrowDown", "↓"],
|
|
77
|
+
["ArrowLeft", "←"],
|
|
78
|
+
["ArrowRight", "→"],
|
|
79
|
+
]);
|
|
80
|
+
const subscribeToNothing = () => () => { };
|
|
81
|
+
const onAnApplePlatform = () => /Mac|iPhone|iPad|iPod/.test(navigator.userAgent);
|
|
82
|
+
const beforeThePlatformIsKnown = () => true;
|
|
3
83
|
/**
|
|
4
|
-
* One key of a shortcut
|
|
84
|
+
* One key, or a modifier with its key, of a shortcut beside the command it triggers.
|
|
5
85
|
*
|
|
6
86
|
* @family Data
|
|
7
|
-
* @when
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
87
|
+
* @when "Use `<Kbd>` for shortcut hints inside prose, menu items, and button suffixes." "Use `small`
|
|
88
|
+
* inside dense surfaces like menu rows, command-bar items, or table cells where the default size
|
|
89
|
+
* crowds adjacent text." (https://vercel.com/geist/keyboard-input)
|
|
90
|
+
* Ours: `small` is `size="sm"`. Find with ⌘K, the sidebar with ⌘B. Only shortcuts actually bound are
|
|
91
|
+
* shown.
|
|
92
|
+
* @instead "In long-form docs that narrate a shortcut, write `the ⌘ K shortcut` directly so the page
|
|
93
|
+
* renders the same when copied to plain text." (https://vercel.com/geist/keyboard-input)
|
|
94
|
+
* Ours: a key a person types into is an `Input`; a code a person types is `InputOTP`.
|
|
95
|
+
* @behaviour "Pass modifiers via boolean props (`meta`, `shift`, `alt`, `ctrl`)." "The component
|
|
96
|
+
* swaps `⌘` for `Ctrl` on Windows and Linux, so hard-coding `<Kbd>Cmd+K</Kbd>` ships the wrong glyph
|
|
97
|
+
* to half your users." (https://vercel.com/geist/keyboard-input)
|
|
98
|
+
* Ours: not interactive. ⌘ ⇧ ⌥ ⌃ on Apple systems, *Ctrl* *Shift* *Alt* elsewhere, with `meta`
|
|
99
|
+
* becoming *Ctrl*. The server draws the Apple form and the browser corrects it after hydration.
|
|
100
|
+
* Several flags make one key: `meta shift`. It is 24 px high (`size="sm"`: 20 px) in the interface's
|
|
101
|
+
* sans type, 14 px (12 px), with no gap between Apple glyphs. Colour: one neutral key in the primary
|
|
102
|
+
* ink on the page surface with a hairline ring, no hue; inside a tooltip it drops the ring and takes
|
|
103
|
+
* a fill one step off the tooltip's inverted surface, at 20 px.
|
|
104
|
+
* @words "`children` is one key, digit, or named key (`K`, `7`, `Enter`, `Esc`)." "Don’t lowercase
|
|
105
|
+
* it, don’t spell out modifiers inside, and don’t pack a sentence into the element." "Punctuation
|
|
106
|
+
* lives outside the element: `Press <Kbd meta>K</Kbd> to open the command menu.`" "Period, comma,
|
|
107
|
+
* and `or` separators stay in surrounding prose so screen readers don’t announce them as keys."
|
|
108
|
+
* (https://vercel.com/geist/keyboard-input)
|
|
109
|
+
* Ours: children is a capital letter, a digit, a mark or a named key from `KBD_KEYS`.
|
|
110
|
+
* @access Ours: a `kbd` element, read in order; the command's own name carries the meaning.
|
|
16
111
|
*/
|
|
17
|
-
function Kbd({ className, ...props }) {
|
|
18
|
-
|
|
112
|
+
function Kbd({ className, size = "default", meta, shift, alt, ctrl, children, ...props }) {
|
|
113
|
+
const onApple = useSyncExternalStore(subscribeToNothing, onAnApplePlatform, beforeThePlatformIsKnown);
|
|
114
|
+
const glyphs = onApple ? APPLE_GLYPHS : OTHER_GLYPHS;
|
|
115
|
+
const flags = { meta, shift, alt, ctrl };
|
|
116
|
+
const held = new Set(MODIFIERS.flatMap((modifier) => (flags[modifier] ? [glyphs[modifier]] : [])));
|
|
117
|
+
const parts = children === undefined ? [...held] : [...held, KEY_GLYPHS.get(children) ?? children];
|
|
118
|
+
return (_jsx("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex w-fit items-center justify-center rounded-xs-plus bg-background font-normal text-foreground ring-1 ring-border select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background in-data-[slot=tooltip-content]:ring-0", onApple ? "gap-0" : "gap-1", size === "sm"
|
|
119
|
+
? "h-5 min-w-5 px-1 text-caption leading-5"
|
|
120
|
+
: "h-6 min-w-6 px-1.5 text-label leading-6", className), ...props, children: parts.map((part) => (_jsx("span", { children: part }, part))) }));
|
|
19
121
|
}
|
|
20
|
-
|
|
21
|
-
return (_jsx("kbd", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props }));
|
|
22
|
-
}
|
|
23
|
-
export { Kbd, KbdGroup };
|
|
122
|
+
export { Kbd };
|
|
@@ -21,25 +21,33 @@ type KpiCardProps = {
|
|
|
21
21
|
label: string;
|
|
22
22
|
value: React.ReactNode;
|
|
23
23
|
delta?: KpiCardDelta;
|
|
24
|
-
note?:
|
|
24
|
+
note?: string;
|
|
25
25
|
tone?: KpiCardTone;
|
|
26
26
|
/** Binds an app link or element without replacing the card's presentation. */
|
|
27
27
|
render?: useRender.ComponentProps<"div">["render"];
|
|
28
28
|
/** `inline` for measurements already grouped inside a section. */
|
|
29
29
|
presentation?: "card" | "inline";
|
|
30
|
+
/**
|
|
31
|
+
* The figure's own values over the period, oldest first, one per bucket. Draws a sparkline across the
|
|
32
|
+
* card under the value and moves the comparison under it, as an observability overview's tiles read. An empty list
|
|
33
|
+
* (a figure that could not be read, in a row of figures that have one) keeps that layout with no line.
|
|
34
|
+
*/
|
|
35
|
+
sparkline?: readonly number[];
|
|
30
36
|
};
|
|
31
37
|
/**
|
|
32
38
|
* 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`).
|
|
39
|
+
* right as a badge, and the named comparison in the footer (`rule/kpi-card-trend-top-right`). With its values over
|
|
40
|
+
* the period (`sparkline`) it reads as Vercel Observability's overview tile: the label, the value with the change badge at its right, the
|
|
41
|
+
* line across the card's width under it, and the comparison under the line, with no footer.
|
|
34
42
|
*
|
|
35
43
|
* @family Charts
|
|
36
44
|
* @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
|
|
37
45
|
* @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.
|
|
46
|
+
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows.
|
|
39
47
|
* @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
48
|
* @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
49
|
*/
|
|
42
|
-
declare function KpiCard({ label, value, delta, note, tone, render, presentation, }: KpiCardProps): React.JSX.Element;
|
|
50
|
+
declare function KpiCard({ label, value, delta, note, tone, render, presentation, sparkline, }: KpiCardProps): React.JSX.Element;
|
|
43
51
|
export { KpiCard };
|
|
44
52
|
export type { KpiCardDelta, KpiCardDirection, KpiCardProps, KpiCardTone };
|
|
45
53
|
//# 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,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;AAEpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAY3D,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,MAAM,CAAC;IACd,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;IACjC;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,CAAC;AAQF;;;;;;;;;;;;GAYG;AACH,iBAAS,OAAO,CAAC,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAgB,EAChB,MAAM,EACN,YAAqB,EACrB,SAAS,GACV,EAAE,YAAY,qBAmHd;AAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
// (https://ui.shadcn.com/r/styles/new-york-v4/dashboard-01.json).
|
|
3
3
|
"use client";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronRight } from "lucide-react";
|
|
5
6
|
import { cn } from "../lib/utils.js";
|
|
6
7
|
import { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card.js";
|
|
8
|
+
import { ChartSparkline } from "./chart-sparkline.js";
|
|
7
9
|
import { TrendBadge, trendTone } from "./trend-badge.js";
|
|
8
10
|
const VALUE_TONE_CLASS = {
|
|
9
11
|
default: "text-foreground",
|
|
@@ -12,19 +14,26 @@ const VALUE_TONE_CLASS = {
|
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
16
|
* 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`).
|
|
17
|
+
* right as a badge, and the named comparison in the footer (`rule/kpi-card-trend-top-right`). With its values over
|
|
18
|
+
* the period (`sparkline`) it reads as Vercel Observability's overview tile: the label, the value with the change badge at its right, the
|
|
19
|
+
* line across the card's width under it, and the comparison under the line, with no footer.
|
|
16
20
|
*
|
|
17
21
|
* @family Charts
|
|
18
22
|
* @when One figure a person checks at a glance: Active Agents, Spend, Tasks done, Need attention, in an overview's row of figures.
|
|
19
23
|
* @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.
|
|
24
|
+
* @behaviour Label left and the change badge right on the first line, the value under them, the comparison in the footer. The footer is one line in every card of a row, so their dividers line up: the comparison and the note, joined, cut with an ellipsis when long and whole on hover. A figure with no comparison shows no badge and no empty footer. A figure that opens its owner (`render`) ends its label with a chevron. Colour sits only where it reads a fact: direction crossed with whether up is good sets the badge icon's tone (success, blocked, or grey for a flat or neutral measure), and `tone` marks the value itself as warning or critical when it crosses a threshold; the card, label and comparison stay neutral. With `sparkline`, Vercel Observability's overview tile: the label across the tile, the value under it with the change badge at its right, a 32 px line in `chart-1` across the card's width, then the comparison and the note in muted ink on up to two lines, which every tile of a row reserves, so the tiles' lines and comparisons sit at the same heights and nothing is cut at a five-tile row. A figure with no line or no comparison keeps the empty rows.
|
|
21
25
|
* @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
26
|
* @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
27
|
*/
|
|
24
|
-
function KpiCard({ label, value, delta, note, tone = "default", render, presentation = "card", }) {
|
|
28
|
+
function KpiCard({ label, value, delta, note, tone = "default", render, presentation = "card", sparkline, }) {
|
|
25
29
|
if (presentation === "inline") {
|
|
26
30
|
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] }));
|
|
27
31
|
}
|
|
28
|
-
|
|
32
|
+
const footerLine = [delta?.comparison, note].filter(Boolean).join(" · ");
|
|
33
|
+
const badge = delta ? (_jsx(TrendBadge, { value: delta.value, direction: delta.direction, tone: trendTone(delta.direction, delta.upIsGood, delta.neutral), directionLabel: delta.directionLabel })) : null;
|
|
34
|
+
if (sparkline) {
|
|
35
|
+
return (_jsx(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, render: render, variant: render ? "link" : "default", children: _jsxs(CardHeader, { className: "gap-y-1", children: [_jsxs(CardDescription, { className: "col-span-2 flex min-w-0 items-center gap-0.5", children: [_jsx("span", { className: "truncate", title: label, children: label }), render ? _jsx(ChevronRight, { "aria-hidden": "true", className: "size-4 shrink-0" }) : null] }), delta ? (_jsx(CardAction, { "data-kpi-delta": delta.direction, className: "row-span-1 row-start-2 self-center", children: badge })) : null, _jsx(CardTitle, { className: cn("col-start-1 row-start-2 min-w-0 truncate text-heading-md tabular-nums group-data-[size=sm]/card:text-heading-md", VALUE_TONE_CLASS[tone]), children: value }), _jsx("div", { "data-slot": "kpi-card-sparkline", className: "col-span-2 mt-1 h-8 min-w-0", children: sparkline.length > 1 ? (_jsx(ChartSparkline, { data: sparkline, className: "h-8 w-full" })) : null }), _jsx("p", { "data-slot": "kpi-card-change", className: "col-span-2 mt-1 line-clamp-2 min-h-10 min-w-0 text-sm text-muted-foreground", title: footerLine || undefined, children: footerLine })] }) }));
|
|
36
|
+
}
|
|
37
|
+
return (_jsxs(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, render: render, variant: render ? "link" : "default", children: [_jsxs(CardHeader, { children: [_jsxs(CardDescription, { className: "flex min-h-10 items-start gap-0.5", children: [_jsx("span", { className: "line-clamp-2", children: label }), render ? _jsx(ChevronRight, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0" }) : null] }), _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: badge }) : null] }), delta || note ? (_jsx(CardFooter, { className: "flex-nowrap", children: _jsx("span", { className: "min-w-0 truncate", title: footerLine, children: footerLine }) })) : null] }));
|
|
29
38
|
}
|
|
30
39
|
export { KpiCard };
|
|
@@ -3,17 +3,24 @@ import * as React from "react";
|
|
|
3
3
|
* The visible name of one control.
|
|
4
4
|
*
|
|
5
5
|
* @family Inputs
|
|
6
|
-
* @when
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* @when "Accessible text label for form controls." (https://vercel.com/geist/label) Ours: a control
|
|
7
|
+
* standing on its own that needs a visible name: a checkbox's sentence, a switch's
|
|
8
|
+
* setting, a bare control in a toolbar or a table cell.
|
|
9
|
+
* @instead A text box, a textarea or a select names itself with its own `label`, so it never needs
|
|
10
|
+
* this. A group of controls takes `FieldLegend`. A short tag of metadata is a `Tag`.
|
|
11
|
+
* @behaviour Above its control, 8 px clear of it, in 13 px type in the secondary grey, one step
|
|
12
|
+
* quieter than the control's own text. Beside a checkbox or a radio it is the sentence at 13 px in
|
|
13
|
+
* the text colour; beside a switch it is 12 px at medium weight. It stays neutral when the control
|
|
14
|
+
* is invalid. When its control is disabled it steps down to the placeholder grey, never in opacity.
|
|
11
15
|
* Clicking it moves to its control.
|
|
12
|
-
* @words
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
+
* @words "Labels are short Title Case nouns: `Project Name`, `Domain`, `Environment Variable
|
|
17
|
+
* Name`." (https://vercel.com/geist/input) Ours: a noun or a positive statement in sentence case,
|
|
18
|
+
* no colon, kept as written (the label never recases its text, which is what Geist's `bypassCasing`
|
|
19
|
+
* asks for): *Approvals*, *Send a copy to the person who asked*. A placeholder never stands in for
|
|
20
|
+
* it.
|
|
21
|
+
* @access A `label` tied to its control by `htmlFor` and the control's `id`, or wrapping it. Never
|
|
22
|
+
* overridden by another `aria-label`.
|
|
16
23
|
*/
|
|
17
|
-
declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
|
|
24
|
+
declare function Label({ className, htmlFor, ...props }: React.ComponentProps<"label">): React.JSX.Element;
|
|
18
25
|
export { Label };
|
|
19
26
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAY7E;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/components/label.js
CHANGED
|
@@ -5,18 +5,25 @@ import { cn } from "../lib/utils.js";
|
|
|
5
5
|
* The visible name of one control.
|
|
6
6
|
*
|
|
7
7
|
* @family Inputs
|
|
8
|
-
* @when
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* @when "Accessible text label for form controls." (https://vercel.com/geist/label) Ours: a control
|
|
9
|
+
* standing on its own that needs a visible name: a checkbox's sentence, a switch's
|
|
10
|
+
* setting, a bare control in a toolbar or a table cell.
|
|
11
|
+
* @instead A text box, a textarea or a select names itself with its own `label`, so it never needs
|
|
12
|
+
* this. A group of controls takes `FieldLegend`. A short tag of metadata is a `Tag`.
|
|
13
|
+
* @behaviour Above its control, 8 px clear of it, in 13 px type in the secondary grey, one step
|
|
14
|
+
* quieter than the control's own text. Beside a checkbox or a radio it is the sentence at 13 px in
|
|
15
|
+
* the text colour; beside a switch it is 12 px at medium weight. It stays neutral when the control
|
|
16
|
+
* is invalid. When its control is disabled it steps down to the placeholder grey, never in opacity.
|
|
13
17
|
* Clicking it moves to its control.
|
|
14
|
-
* @words
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
+
* @words "Labels are short Title Case nouns: `Project Name`, `Domain`, `Environment Variable
|
|
19
|
+
* Name`." (https://vercel.com/geist/input) Ours: a noun or a positive statement in sentence case,
|
|
20
|
+
* no colon, kept as written (the label never recases its text, which is what Geist's `bypassCasing`
|
|
21
|
+
* asks for): *Approvals*, *Send a copy to the person who asked*. A placeholder never stands in for
|
|
22
|
+
* it.
|
|
23
|
+
* @access A `label` tied to its control by `htmlFor` and the control's `id`, or wrapping it. Never
|
|
24
|
+
* overridden by another `aria-label`.
|
|
18
25
|
*/
|
|
19
|
-
function Label({ className, ...props }) {
|
|
20
|
-
return (_jsx("label", { "data-slot": "label", className: cn("flex items-center gap-2 text-label
|
|
26
|
+
function Label({ className, htmlFor, ...props }) {
|
|
27
|
+
return (_jsx("label", { "data-slot": "label", htmlFor: htmlFor, className: cn("flex items-center gap-2 text-label-sm leading-normal text-muted-foreground select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:text-placeholder peer-disabled:cursor-not-allowed peer-disabled:text-placeholder peer-data-disabled:cursor-not-allowed peer-data-disabled:text-placeholder peer-[[role=checkbox]]:leading-5 peer-[[role=checkbox]:not([data-disabled])]:text-foreground peer-[[role=radio]]:leading-5 peer-[[role=radio]:not([data-disabled])]:text-foreground peer-[[role=switch]]:text-xs peer-[[role=switch]]:font-medium peer-[[role=switch]:not([data-disabled])]:text-foreground", className), ...props }));
|
|
21
28
|
}
|
|
22
29
|
export { Label };
|
|
@@ -3,8 +3,8 @@ import type { CatalogSection } from "./catalog-entry.js";
|
|
|
3
3
|
import { type CollectionSearchProps } from "./collection-search.js";
|
|
4
4
|
import { type EmptyStateKind } from "./empty-state.js";
|
|
5
5
|
export type LibraryShelfProps = {
|
|
6
|
-
/**
|
|
7
|
-
definition
|
|
6
|
+
/** One line saying what the shelf holds, for a shelf whose page has no title of its own to carry it, such as Nadia's gallery. */
|
|
7
|
+
definition?: string;
|
|
8
8
|
/** Above the search, for the people who keep the shelf: the hub's sync. */
|
|
9
9
|
notice?: ReactNode;
|
|
10
10
|
search?: CollectionSearchProps;
|
|
@@ -25,10 +25,10 @@ export type LibraryShelfProps = {
|
|
|
25
25
|
* reusable things a person adds, as two-column entries or Agent template cards.
|
|
26
26
|
*
|
|
27
27
|
* @family Compositions
|
|
28
|
-
* @when A
|
|
29
|
-
* @instead
|
|
30
|
-
* @behaviour Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates three to a row. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty.
|
|
31
|
-
* @words The product words every string: the definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
28
|
+
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery.
|
|
29
|
+
* @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
|
|
30
|
+
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates three to a row. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty.
|
|
31
|
+
* @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
32
32
|
* @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
|
|
33
33
|
*/
|
|
34
34
|
export declare function LibraryShelf(props: LibraryShelfProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,
|
|
1
|
+
{"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iIAAiI;IACjI,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IACjE,iGAAiG;IACjG,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnC,GAAG,CACA;IAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAA;CAAE;AACrD,qEAAqE;GACnE;IAAE,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAA;CAAE,CACrD,CAAC;AA0BF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAyBpD"}
|
|
@@ -23,10 +23,10 @@ function ShelfContents({ shelf }) {
|
|
|
23
23
|
* reusable things a person adds, as two-column entries or Agent template cards.
|
|
24
24
|
*
|
|
25
25
|
* @family Compositions
|
|
26
|
-
* @when A
|
|
27
|
-
* @instead
|
|
28
|
-
* @behaviour Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates three to a row. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty.
|
|
29
|
-
* @words The product words every string: the definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
26
|
+
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery.
|
|
27
|
+
* @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
|
|
28
|
+
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates three to a row. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty.
|
|
29
|
+
* @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
30
30
|
* @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
|
|
31
31
|
*/
|
|
32
32
|
export function LibraryShelf(props) {
|
|
@@ -36,5 +36,5 @@ export function LibraryShelf(props) {
|
|
|
36
36
|
const nothing = shelf !== undefined && holdsNothing(shelf);
|
|
37
37
|
const body = failed ? (_jsx(EmptyState, { ...failed, scope: "page" })) : !shelf ? (_jsx(CatalogSkeleton, { columns: 2, label: loadingLabel })) : nothing && noMatch ? (_jsx(EmptyState, { kind: "noResults", ...noMatch, scope: "page" })) : nothing ? (_jsx(EmptyState, { ...empty, scope: "page" })) : (_jsx(ShelfContents, { shelf: shelf }));
|
|
38
38
|
const showsEmpty = !failed && nothing && !noMatch;
|
|
39
|
-
return (_jsxs("div", { className: "grid min-w-0 gap-6", "data-slot": "library-shelf", children: [_jsx("p", { className: "text-body-md text-muted-foreground", children: definition }), notice, search && !showsEmpty ? _jsx(CollectionSearch, { ...search }) : null, body] }));
|
|
39
|
+
return (_jsxs("div", { className: "grid min-w-0 gap-6", "data-slot": "library-shelf", children: [definition ? _jsx("p", { className: "text-body-md text-muted-foreground", children: definition }) : null, notice, search && !showsEmpty ? _jsx(CollectionSearch, { ...search }) : null, body] }));
|
|
40
40
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type TextButtonProps } from "./button.js";
|
|
3
|
+
type LoadMoreButtonProps = Omit<TextButtonProps, "children" | "loading" | "loadingLabel" | "prefix" | "shape" | "size" | "suffix" | "variant"> & {
|
|
4
|
+
/** What comes next: "Load more". */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
/** The label while the next items load: "Loading more events". */
|
|
8
|
+
loadingLabel: string;
|
|
9
|
+
/** Sits flush against the list, with no space above it. */
|
|
10
|
+
noGap?: boolean | undefined;
|
|
11
|
+
/** Square corners, for a button that ends a list inside a card. */
|
|
12
|
+
noBorderRadius?: boolean | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The button at the end of a list that appends its next items in place.
|
|
16
|
+
*
|
|
17
|
+
* @family Actions
|
|
18
|
+
* @when "A full-width button used to append more items to a paginated list, with loading and styling variants." (https://vercel.com/geist/load-more-button)
|
|
19
|
+
* Ours: a list that grows in place by a page of items at a time: older events, more results. The
|
|
20
|
+
* button follows the last item.
|
|
21
|
+
* @instead A list that is whole stays whole, with no button.
|
|
22
|
+
* Going to another page of the product is a `ButtonLink`.
|
|
23
|
+
* @behaviour Takes the list's full width, 36 px high, below the last item, always `outline`: neutral,
|
|
24
|
+
* no hue in any state. The label and the `loadingLabel` are both required. While the next items load
|
|
25
|
+
* it is `loading`, held in the muted look, and the rows already shown stay. It sits one `md` step
|
|
26
|
+
* (16 px) below the list; `noGap` removes that space and `noBorderRadius` squares its corners, for
|
|
27
|
+
* a button that closes a list inside a card. The caller drops the button when no items are left.
|
|
28
|
+
* @words Ours: sentence case, naming what comes: *Load more*, *Show older events*. The loading word is the
|
|
29
|
+
* same in the -ing form: *Loading more*, *Showing older events*; Italian *Carica altro*, *Caricamento*.
|
|
30
|
+
* @access A native `button` that is `aria-busy` while it loads. New items appear after the last
|
|
31
|
+
* shown one, so focus stays on the button's place in the list.
|
|
32
|
+
*/
|
|
33
|
+
declare function LoadMoreButton({ className, loading, noBorderRadius, noGap, ...props }: LoadMoreButtonProps): import("react").JSX.Element;
|
|
34
|
+
export { LoadMoreButton };
|
|
35
|
+
//# sourceMappingURL=load-more-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-more-button.d.ts","sourceRoot":"","sources":["../../src/components/load-more-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGnE,KAAK,mBAAmB,GAAG,IAAI,CAC7B,eAAe,EACf,UAAU,GAAG,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAC7F,GAAG;IACF,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,mEAAmE;IACnE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,OAAO,EACP,cAAsB,EACtB,KAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,+BAerB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* The button at the end of a list that appends its next items in place.
|
|
6
|
+
*
|
|
7
|
+
* @family Actions
|
|
8
|
+
* @when "A full-width button used to append more items to a paginated list, with loading and styling variants." (https://vercel.com/geist/load-more-button)
|
|
9
|
+
* Ours: a list that grows in place by a page of items at a time: older events, more results. The
|
|
10
|
+
* button follows the last item.
|
|
11
|
+
* @instead A list that is whole stays whole, with no button.
|
|
12
|
+
* Going to another page of the product is a `ButtonLink`.
|
|
13
|
+
* @behaviour Takes the list's full width, 36 px high, below the last item, always `outline`: neutral,
|
|
14
|
+
* no hue in any state. The label and the `loadingLabel` are both required. While the next items load
|
|
15
|
+
* it is `loading`, held in the muted look, and the rows already shown stay. It sits one `md` step
|
|
16
|
+
* (16 px) below the list; `noGap` removes that space and `noBorderRadius` squares its corners, for
|
|
17
|
+
* a button that closes a list inside a card. The caller drops the button when no items are left.
|
|
18
|
+
* @words Ours: sentence case, naming what comes: *Load more*, *Show older events*. The loading word is the
|
|
19
|
+
* same in the -ing form: *Loading more*, *Showing older events*; Italian *Carica altro*, *Caricamento*.
|
|
20
|
+
* @access A native `button` that is `aria-busy` while it loads. New items appear after the last
|
|
21
|
+
* shown one, so focus stays on the button's place in the list.
|
|
22
|
+
*/
|
|
23
|
+
function LoadMoreButton({ className, loading, noBorderRadius = false, noGap = false, ...props }) {
|
|
24
|
+
return (_jsx(Button, { ...props, className: cn("w-full", !noGap && "mt-nadicode-md", noBorderRadius && "rounded-none", className), loading: loading, type: "button", variant: "outline" }));
|
|
25
|
+
}
|
|
26
|
+
export { LoadMoreButton };
|
|
@@ -8,25 +8,23 @@ export type MenuChoiceOption<Value extends string = string> = {
|
|
|
8
8
|
};
|
|
9
9
|
export type MenuChoiceRowProps<Value extends string = string> = Omit<React.ComponentProps<"div">, "children" | "onChange"> & {
|
|
10
10
|
label: string;
|
|
11
|
-
/** Leads the label, so the row starts on the commands' line: the current theme's glyph. */
|
|
12
|
-
icon?: React.ReactElement | undefined;
|
|
13
11
|
options: readonly MenuChoiceOption<Value>[];
|
|
14
12
|
onValueChange: (value: Value) => void;
|
|
15
13
|
value: Value;
|
|
16
14
|
disabled?: boolean;
|
|
17
15
|
};
|
|
18
16
|
/**
|
|
19
|
-
* A named preference inside a menu: its
|
|
20
|
-
* exclusive choices
|
|
21
|
-
*
|
|
17
|
+
* A named preference inside a menu: its label at the leading edge and the
|
|
18
|
+
* exclusive choices in one small round pill at the trailing edge, as Vercel's
|
|
19
|
+
* account menu draws Theme.
|
|
22
20
|
*
|
|
23
21
|
* @family Menus
|
|
24
22
|
* @when A setting that applies at once from inside a menu: the account menu's Theme and Language.
|
|
25
23
|
* @instead A product's own setting with more choices or longer names is a submenu of radio items (`AccountMenu`'s `choices`). A setting on a page is a `ToggleGroup` or a `Select` in its section.
|
|
26
|
-
* @behaviour
|
|
24
|
+
* @behaviour The label leads on the row's 36 px line; the choices sit in one round pill at the trailing edge, the chosen one ringed. Choosing applies at once and keeps the menu open, so the result shows without reopening it.
|
|
27
25
|
* @words The label is a noun: "Theme", "Language". Each choice carries a full name even when it shows a glyph or a short code: "EN" is named "English".
|
|
28
|
-
* @access A radio group named by the label; each choice is a radio named by its `label`, with the same text as its tooltip.
|
|
26
|
+
* @access A radio group named by the label; each choice is a radio named by its `label`, with the same text as its tooltip.
|
|
29
27
|
*/
|
|
30
|
-
declare function MenuChoiceRow<Value extends string = string>({ className, disabled,
|
|
28
|
+
declare function MenuChoiceRow<Value extends string = string>({ className, disabled, label, onValueChange, options, value, ...props }: MenuChoiceRowProps<Value>): React.JSX.Element;
|
|
31
29
|
export { MenuChoiceRow };
|
|
32
30
|
//# sourceMappingURL=menu-choice-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-choice-row.d.ts","sourceRoot":"","sources":["../../src/components/menu-choice-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,gBAAgB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI;IAC5D,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,IAAI,CAClE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,GAAG,UAAU,CACxB,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"menu-choice-row.d.ts","sourceRoot":"","sources":["../../src/components/menu-choice-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,gBAAgB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI;IAC5D,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,IAAI,CAClE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,GAAG,UAAU,CACxB,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;IAC5C,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,iBAAS,aAAa,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,EACpD,SAAS,EACT,QAAQ,EACR,KAAK,EACL,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,KAAK,CAAC,qBAkC3B;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -2,22 +2,22 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { DropdownMenuRadioGroup, DropdownMenuRadioItem } from "./dropdown-menu.js";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
/**
|
|
5
|
-
* A named preference inside a menu: its
|
|
6
|
-
* exclusive choices
|
|
7
|
-
*
|
|
5
|
+
* A named preference inside a menu: its label at the leading edge and the
|
|
6
|
+
* exclusive choices in one small round pill at the trailing edge, as Vercel's
|
|
7
|
+
* account menu draws Theme.
|
|
8
8
|
*
|
|
9
9
|
* @family Menus
|
|
10
10
|
* @when A setting that applies at once from inside a menu: the account menu's Theme and Language.
|
|
11
11
|
* @instead A product's own setting with more choices or longer names is a submenu of radio items (`AccountMenu`'s `choices`). A setting on a page is a `ToggleGroup` or a `Select` in its section.
|
|
12
|
-
* @behaviour
|
|
12
|
+
* @behaviour The label leads on the row's 36 px line; the choices sit in one round pill at the trailing edge, the chosen one ringed. Choosing applies at once and keeps the menu open, so the result shows without reopening it.
|
|
13
13
|
* @words The label is a noun: "Theme", "Language". Each choice carries a full name even when it shows a glyph or a short code: "EN" is named "English".
|
|
14
|
-
* @access A radio group named by the label; each choice is a radio named by its `label`, with the same text as its tooltip.
|
|
14
|
+
* @access A radio group named by the label; each choice is a radio named by its `label`, with the same text as its tooltip.
|
|
15
15
|
*/
|
|
16
|
-
function MenuChoiceRow({ className, disabled,
|
|
17
|
-
return (_jsxs("div", { "data-slot": "menu-choice-row", className: cn("flex
|
|
16
|
+
function MenuChoiceRow({ className, disabled, label, onValueChange, options, value, ...props }) {
|
|
17
|
+
return (_jsxs("div", { "data-slot": "menu-choice-row", className: cn("flex h-9 items-center justify-between gap-3 px-2 text-sm", className), ...props, children: [_jsx("span", { className: "min-w-0 truncate", children: label }), _jsx(DropdownMenuRadioGroup, { "aria-label": label, className: "flex shrink-0 items-center rounded-full border border-border", value: value, onValueChange: (next) => {
|
|
18
18
|
const selected = options.find((option) => option.value === next);
|
|
19
19
|
if (selected)
|
|
20
20
|
onValueChange(selected.value);
|
|
21
|
-
}, children: options.map((option) => (_jsx(DropdownMenuRadioItem, { value: option.value, "aria-label": option.label, title: option.label, iconOnly: true, closeOnClick: false, disabled: disabled, children: option.content }, option.value))) })] }));
|
|
21
|
+
}, children: options.map((option) => (_jsx(DropdownMenuRadioItem, { value: option.value, "aria-label": option.label, title: option.label, iconOnly: true, className: "size-6 rounded-full text-xs text-muted-foreground data-checked:bg-popover data-checked:text-foreground data-checked:ring-1 data-checked:ring-border", closeOnClick: false, disabled: disabled, children: option.content }, option.value))) })] }));
|
|
22
22
|
}
|
|
23
23
|
export { MenuChoiceRow };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type NoticeTone as MessageNoticeTone } from "../internal/notice.js";
|
|
1
2
|
import { type ResolvedMessage } from "./product-message.js";
|
|
2
|
-
export type MessageNoticeTone
|
|
3
|
+
export type { MessageNoticeTone };
|
|
3
4
|
/**
|
|
4
5
|
* A message where it changes the reader's decision (DESIGN.md "Elevation &
|
|
5
6
|
* Depth", the notice paragraph):
|
|
6
7
|
* - `action`: under the control whose write failed, as one passage with its
|
|
7
|
-
*
|
|
8
|
+
* control beside it;
|
|
8
9
|
* - `section`: at the top of the section it concerns, framed, for a condition
|
|
9
10
|
* that lasts.
|
|
10
11
|
*/
|
|
@@ -18,17 +19,11 @@ export type MessageNoticeProps = {
|
|
|
18
19
|
* A catalogue message about one thing on the screen.
|
|
19
20
|
*
|
|
20
21
|
* @family Feedback
|
|
21
|
-
* @when
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
26
|
-
* Long words wrap, nothing truncates. A successful retry removes it. A `section` message with no
|
|
27
|
-
* action is drawn as the passage under a control, because a banner always carries its fix.
|
|
28
|
-
* @words From the catalogue only. Title says what happened to which object; body only when it adds
|
|
29
|
-
* something. Action labelled with its result: *Try again*, *Sign in*.
|
|
30
|
-
* @access `action`: `role="alert"` (`status` for info). `section`: `role="status"`,
|
|
31
|
-
* `aria-live="polite"`, atomic. Focus stays where the person was.
|
|
22
|
+
* @when "Display text that requires attention or provides additional information." (https://vercel.com/geist/note) "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "Choose `variant` by meaning: `error` for a problem the user must fix, `warning` for a consequence to acknowledge, `success` for a passed check, `secondary` for neutral information." (https://vercel.com/geist/note) Ours: a message beside the field, card or section it describes, under the control whose write failed (`action`), or atop the section whose condition lasts (`section`). The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` (a passed check or a state the product manages for the reader, drawn in the accent blue) and `neutral` is `secondary`; there is no violet or cyan.
|
|
23
|
+
* @instead "Pick `Banner` when the message is page-level or system-wide and needs a CTA, `Toast` for transient acknowledgments, `Modal` for destructive confirmations." (https://vercel.com/geist/note) Ours: `Banner` is `NoticeBanner`, `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a field's wrong value use `FieldError`. For a failed read use `EmptyState failed`.
|
|
24
|
+
* @behaviour "A Note is persistent until the underlying state changes; don’t add an ad hoc dismiss control because it competes with the message." (https://vercel.com/geist/note) "One Note per concept. Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "The optional `NoteAction` holds a single inline CTA. Don’t pair it with a second button." (https://vercel.com/geist/note) Ours: tone `destructive` by default, `warning`, `info` or `neutral`. Colour sits on the line, the text and the mark; the ground stays clear, and the action stays neutral. `section` is the framed note, a line 36 px high with its mark and sentence on one row and the action at its trailing edge (under 768 px the action takes its own row, full width), with or without an action; `action` is the unframed passage, its mark and sentence on one row with the action link inside the sentence, after a space. The title and the body run on as one passage, the title closed by a full stop when it has none of its own, so the two never read as one sentence; the title leads in bold (semibold in a note, medium in a passage) only when a body follows it, and stands at regular weight alone. A message worded for a notice has one action, a small default button in a section and an underlined 14 px link in the passage, and at most a second one after it (Nadia's *Ask Nadia* after *Try again*), an outline button in a section and a second link in the passage; a third is not shown. Long words wrap, nothing truncates. A successful retry removes it. Required: the catalogue `message`, so the sentence and its mark are always drawn.
|
|
25
|
+
* @words "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) "`NoteContent` is one sentence in active voice that names the impact: `Changing this region restarts all functions.`" (https://vercel.com/geist/note) "No `variant="info"` exists; omit `variant` for the default info icon or use `variant="secondary"` for neutral copy." (https://vercel.com/geist/note) "Single-fragment labels take no period; full descriptive sentences in the body do." (https://vercel.com/geist/note) Ours: words come from the catalogue only. The message's title stands in for `NoteLabel` and `NoteContent`, in sentence case, and `info` exists as Geist's blue `success`. The action is labelled with its result: *Try again*, *Sign in*. When the message carries an action, its body does not repeat it: the link is the step, so the body ends before "Try again".
|
|
26
|
+
* @access `action`: `role="alert"` (`status` for info and neutral). `section`: `role="status"`, `aria-live="polite"`, atomic. The mark is hidden. Focus stays where the person was.
|
|
32
27
|
*/
|
|
33
28
|
export declare function MessageNotice({ message, placement, tone, className, }: MessageNoticeProps): import("react").JSX.Element;
|
|
34
29
|
//# sourceMappingURL=message-notice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-notice.d.ts","sourceRoot":"","sources":["../../src/components/message-notice.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE1E,
|
|
1
|
+
{"version":3,"file":"message-notice.d.ts","sourceRoot":"","sources":["../../src/components/message-notice.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,UAAU,IAAI,iBAAiB,EACrC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE1E,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAalC;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,IAAoB,EACpB,SAAS,GACV,EAAE,kBAAkB,+BAuEpB"}
|