@nadicodeai/ui 12.1.102 → 12.1.104
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.js +2 -2
- 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/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 +18 -1
- package/dist/components/theme-mode-switcher.d.ts.map +1 -1
- package/dist/components/theme-mode-switcher.js +20 -2
- 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 +19 -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 -17
- 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 +632 -544
- 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
|
@@ -2,56 +2,132 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { createContext, useContext } from "react";
|
|
5
|
+
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "../lib/utils.js";
|
|
7
|
-
const progressIndicatorVariants = cva("h-full
|
|
7
|
+
const progressIndicatorVariants = cva("h-full rounded-sm transition-[width,background-color] duration-[var(--nc-duration-open)] ease-[var(--nc-ease-out-strong)] motion-reduce:transition-none", {
|
|
8
8
|
variants: {
|
|
9
9
|
tone: {
|
|
10
10
|
default: "bg-primary",
|
|
11
|
+
secondary: "bg-muted-foreground",
|
|
12
|
+
success: "bg-(--nc-state-complete)",
|
|
11
13
|
warning: "bg-(--nc-state-review)",
|
|
12
14
|
critical: "bg-(--nc-state-blocked)",
|
|
15
|
+
info: "bg-info",
|
|
13
16
|
},
|
|
14
17
|
},
|
|
15
18
|
defaultVariants: {
|
|
16
19
|
tone: "default",
|
|
17
20
|
},
|
|
18
21
|
});
|
|
22
|
+
const PROGRESS_TRACK_CLASS = {
|
|
23
|
+
sm: "h-1",
|
|
24
|
+
md: "h-2.5",
|
|
25
|
+
};
|
|
19
26
|
const OVER_CAP_CLASS = "bg-(--nc-state-blocked)";
|
|
27
|
+
const ANNOUNCE_INTERVAL_MS = 1000;
|
|
28
|
+
function useAnnouncedValue(value) {
|
|
29
|
+
const [announced, setAnnounced] = useState(value);
|
|
30
|
+
const announcedAt = useRef(0);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (value === announced)
|
|
33
|
+
return undefined;
|
|
34
|
+
const announce = () => {
|
|
35
|
+
announcedAt.current = Date.now();
|
|
36
|
+
setAnnounced(value);
|
|
37
|
+
};
|
|
38
|
+
const wait = announcedAt.current + ANNOUNCE_INTERVAL_MS - Date.now();
|
|
39
|
+
if (wait <= 0) {
|
|
40
|
+
announce();
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const timer = setTimeout(announce, wait);
|
|
44
|
+
return () => clearTimeout(timer);
|
|
45
|
+
}, [value, announced]);
|
|
46
|
+
return announced;
|
|
47
|
+
}
|
|
48
|
+
function reachedStage(stops, value) {
|
|
49
|
+
return stops.filter((stop) => stop.value <= value).sort((a, b) => b.value - a.value)[0];
|
|
50
|
+
}
|
|
51
|
+
function spokenReading(announced, { min, max, format, locale, stops, getAriaValueText }) {
|
|
52
|
+
if (!Number.isFinite(announced)) {
|
|
53
|
+
return { "aria-valuenow": undefined, "aria-valuetext": undefined };
|
|
54
|
+
}
|
|
55
|
+
const clamped = Math.min(max, Math.max(min, announced));
|
|
56
|
+
const formatted = format
|
|
57
|
+
? new Intl.NumberFormat(locale, format).format(clamped)
|
|
58
|
+
: new Intl.NumberFormat(locale, { style: "percent" }).format(max > min ? (clamped - min) / (max - min) : 0);
|
|
59
|
+
const text = getAriaValueText?.(formatted, announced) ?? formatted;
|
|
60
|
+
const stage = stops ? reachedStage(stops, announced) : undefined;
|
|
61
|
+
return {
|
|
62
|
+
"aria-valuenow": clamped,
|
|
63
|
+
"aria-valuetext": stage ? `${stage.label}, ${text}` : text,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
20
66
|
const ProgressStateContext = createContext({
|
|
21
|
-
|
|
67
|
+
percent: 0,
|
|
22
68
|
tone: "default",
|
|
69
|
+
size: "md",
|
|
23
70
|
overCap: false,
|
|
71
|
+
hasStops: false,
|
|
24
72
|
});
|
|
25
73
|
/**
|
|
26
74
|
* A known amount against a real maximum, with its label and value.
|
|
27
75
|
*
|
|
28
76
|
* @family Data
|
|
29
|
-
* @when
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
77
|
+
* @when "Determinate work whose total is knowable, like file uploads, multi-step setup, build steps, or batch deletions." (https://vercel.com/geist/progress)
|
|
78
|
+
* "Use `max` for the real ceiling (`max={files.length}`), not a hardcoded `100`. The component computes the percentage from `value / max`." (https://vercel.com/geist/progress)
|
|
79
|
+
* Ours: it always has a `value` and a name, as `aria-label` or as `aria-labelledby` pointing at its
|
|
80
|
+
* `ProgressLabel`, and the type asks for both. `stops` mark genuine stages, each named. `size` is
|
|
81
|
+
* `md` (10 px), or `sm` (4 px) inside a table cell or a row.
|
|
82
|
+
* @instead "For short indeterminate waits (~1–3s), use `Spinner`; for inline copy like `Saving`, use `Loading Dots`." (https://vercel.com/geist/progress)
|
|
83
|
+
* Ours: neither exists; an unknown wait is the waiting line, never a bar with an invented
|
|
84
|
+
* percentage.
|
|
85
|
+
* "For usage against a quota or ratio, use `Gauge`; the circle reads as health, the bar reads as progress." (https://vercel.com/geist/progress)
|
|
86
|
+
* Ours: a run's consumption in a dense spot is a `UsageMeter`. A single figure is a `KpiCard`.
|
|
87
|
+
* @behaviour "Threshold colors via `dynamic colors` should mirror the same breakpoints used elsewhere (warning at the same threshold a quota note fires)." (https://vercel.com/geist/progress)
|
|
88
|
+
* Ours: colour sits on the fill alone: the track is always the neutral line colour and the words
|
|
89
|
+
* beside the bar stay neutral. The fill is neutral by default; `tone` is that threshold (amber
|
|
90
|
+
* where the note fires, red past the cap), never derived from the value. Past the maximum the bar
|
|
91
|
+
* fills and turns red, whatever the tone. The fill's end is rounded, and square when `stops` cut
|
|
92
|
+
* the bar. The fill moves only when the reading changes, on `open`; still under reduced motion. The
|
|
93
|
+
* printed value is always the live reading.
|
|
94
|
+
* "Use stops for genuine multi-stage work and label the stage next to the bar (`Step 2 of 4 · Building`); a stop with no label is decorative noise." (https://vercel.com/geist/progress)
|
|
95
|
+
* @words "Pair the bar with text naming the work and units: `Uploading 12 of 30 files`, `Building · 1.2 GB / 4 GB`. The bar alone doesn’t say what’s progressing." (https://vercel.com/geist/progress)
|
|
96
|
+
* "Don’t append `successfully` or `complete` once the bar fills; swap to a completion state (toast, success row, redirect)." (https://vercel.com/geist/progress)
|
|
97
|
+
* "For long operations, name the work in the surrounding copy (`Building deployment…`) instead of leaving a bare percentage." (https://vercel.com/geist/progress)
|
|
98
|
+
* Ours: print the work and its unit in `ProgressValue`.
|
|
99
|
+
* @access "Component sets `role="progressbar"` with `aria-valuemin`, `aria-valuemax`, and `aria-valuenow`; pass an accessible name through `aria-label` on the wrapper or a sibling `<label>` tied with `aria-labelledby`." (https://vercel.com/geist/progress)
|
|
100
|
+
* "Throttle `aria-valuenow` updates to roughly once a second so screen readers don’t announce every increment of a fast upload." (https://vercel.com/geist/progress)
|
|
101
|
+
* Ours: the printed value is live, and the value it announces follows it at most once a second.
|
|
102
|
+
* "Stops accept their own `ariaLabel`; name each one (`Build complete`, `Tests complete`) so the bar is navigable without sight." (https://vercel.com/geist/progress)
|
|
103
|
+
* Ours: a stop's name is its `label`. With `stops`, the stage reached leads the spoken value; a
|
|
104
|
+
* stop is not focusable, because a progressbar's children are presentational.
|
|
34
105
|
*/
|
|
35
|
-
function Progress({ className, children, value, min = 0, max = 100, tone = "default", indicatorColor, ...props }) {
|
|
36
|
-
const
|
|
37
|
-
const
|
|
106
|
+
function Progress({ className, children, value, min = 0, max = 100, format, locale, getAriaValueText, tone = "default", size = "md", indicatorColor, stops, ...props }) {
|
|
107
|
+
const announced = useAnnouncedValue(value);
|
|
108
|
+
const measured = Number.isFinite(value);
|
|
109
|
+
const percent = measured && max > min ? Math.min(1, Math.max(0, (value - min) / (max - min))) * 100 : 0;
|
|
38
110
|
const overCap = measured && value > max;
|
|
39
|
-
|
|
111
|
+
const spoken = spokenReading(announced, { min, max, format, locale, stops, getAriaValueText });
|
|
112
|
+
return (_jsx(ProgressPrimitive.Root, { value: value, min: min, max: max, format: format, locale: locale, "data-slot": "progress", "data-tone": tone, "data-over-cap": overCap || undefined, className: cn("flex flex-wrap gap-3", className), "aria-valuenow": spoken["aria-valuenow"], "aria-valuetext": spoken["aria-valuetext"], ...props, children: _jsxs(ProgressStateContext.Provider, { value: { percent, tone, size, overCap, hasStops: stops !== undefined, indicatorColor }, children: [children, _jsxs(ProgressTrack, { children: [_jsx(ProgressIndicator, {}), stops?.map((stop) => (_jsxs("span", { "aria-hidden": "true", className: "absolute inset-y-0 flex w-0.5", "data-slot": "progress-stop", style: {
|
|
113
|
+
insetInlineStart: `calc(${((stop.value - min) / (max - min)) * 100}% - 1px)`,
|
|
114
|
+
}, children: [_jsx("span", { className: "w-px bg-foreground/35" }), _jsx("span", { className: "w-px bg-background" })] }, stop.value)))] })] }) }));
|
|
40
115
|
}
|
|
41
116
|
function ProgressTrack({ className, ...props }) {
|
|
42
|
-
|
|
117
|
+
const { size } = useContext(ProgressStateContext);
|
|
118
|
+
return (_jsx(ProgressPrimitive.Track, { className: cn("relative flex w-full items-center overflow-x-hidden rounded-sm bg-border", PROGRESS_TRACK_CLASS[size], className), "data-slot": "progress-track", ...props }));
|
|
43
119
|
}
|
|
44
120
|
function ProgressIndicator({ className, style, ...props }) {
|
|
45
|
-
const {
|
|
121
|
+
const { percent, tone, overCap, hasStops, indicatorColor } = useContext(ProgressStateContext);
|
|
46
122
|
const indicatorStyle = (state) => {
|
|
47
123
|
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- Base UI's style prop is a CSSProperties | (state => CSSProperties) union, told apart only by typeof.
|
|
48
124
|
const resolvedStyle = typeof style === "function" ? style(state) : style;
|
|
49
|
-
const base = { width:
|
|
125
|
+
const base = { width: `${percent}%` };
|
|
50
126
|
if (indicatorColor)
|
|
51
127
|
base["--progress-indicator-color"] = indicatorColor;
|
|
52
128
|
return { ...base, ...resolvedStyle };
|
|
53
129
|
};
|
|
54
|
-
return (_jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", "data-tone": overCap ? "over-cap" : tone, "data-over-cap": overCap || undefined, className: cn(progressIndicatorVariants({ tone }), indicatorColor && "bg-(--progress-indicator-color)",
|
|
130
|
+
return (_jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", "data-tone": overCap ? "over-cap" : tone, "data-over-cap": overCap || undefined, className: cn(progressIndicatorVariants({ tone }), indicatorColor && "bg-(--progress-indicator-color)", hasStops && "rounded-e-none",
|
|
55
131
|
// After the variant, so the merge keeps this one paint: an allowance
|
|
56
132
|
// spent reads the same whatever tone the product chose for approaching
|
|
57
133
|
// it.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export type ProseProps = ComponentProps<"div"> & {
|
|
3
|
+
/** `roomy` sets the copy at 16/24 for a page that is read through, such as a company wiki; the default is 14/20. */
|
|
4
|
+
size?: "default" | "roomy";
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Written text a renderer produced, set in the design system's type roles: headings, paragraphs,
|
|
8
|
+
* lists, links, code, quotes and tables, none of them given a class by the page.
|
|
9
|
+
*
|
|
10
|
+
* @family Other
|
|
11
|
+
* @when "Copy styles are for multiple lines and have a higher line-height than Label." (https://vercel.com/geist/typography) Ours: Markdown or other rich text turned into elements by the product's renderer: a legal document in the Portal, a company wiki page in Nadia.
|
|
12
|
+
* @instead A conversation's Markdown stays the conversation's own `MarkdownText`. One fact in a sentence is its own role (`text-body-sm`), a table the product builds is `DataTable`, and a code sample with a copy button is `CodeBlock`. Prose that is a column of settings is `SettingsSection`.
|
|
13
|
+
* @behaviour "Headings: Used to introduce pages or sections." (https://vercel.com/geist/typography) "`text-copy-13-mono`: Used for inline code mentions." (https://vercel.com/geist/typography) Ours: it styles the elements inside it by their tag, so the product chooses the renderer and keeps only what is its own: an anchor on a heading, a page link that opens in place, the level a heading takes below the page's own title. A heading's size follows its tag: `h1` 24 px, `h2` 20, `h3` 16, `h4` to `h6` 14 (`heading-md` to `heading-compact`), with 24 px above and none below, so a renderer that moves a heading down a level moves its size down with it; blocks stand 12 px apart; lists indent 20 px; a quote has a 2 px rule at its left; a code block is a bordered recessed box in mono 13 px, inline code a muted chip, with no syntax colour; a table has medium muted headings, a 1 px rule under every row and no frame. Colour: ink for the text, the link blue on links alone, muted for quotes and table headings; no other hue. It sets no width: the reading column does.
|
|
14
|
+
* @words None of its own: the text is the document's. A heading is a noun or a short sentence in the document's language; a link's text names where it goes.
|
|
15
|
+
* @access It adds no landmark and no role. The renderer keeps the document's heading order and each link's text; a table keeps its `th` cells and a code block its `pre`.
|
|
16
|
+
*/
|
|
17
|
+
declare function Prose({ className, size, ...props }: ProseProps): import("react").JSX.Element;
|
|
18
|
+
export { Prose };
|
|
19
|
+
//# sourceMappingURL=prose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../src/components/prose.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAiB5C,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/C,oHAAoH;IACpH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,+BAcnE;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
const roles = [
|
|
4
|
+
"[&_h1]:text-heading-md [&_h2]:text-heading-sm [&_h3]:text-heading-xs",
|
|
5
|
+
"[&_:is(h4,h5,h6)]:text-heading-compact [&_:is(h1,h2,h3,h4,h5,h6)]:mt-6 [&_:is(h1,h2,h3,h4,h5,h6)]:scroll-mt-6",
|
|
6
|
+
"[&_:is(p,ul,ol,pre,blockquote,table,hr)]:mt-3 [&>:first-child]:mt-0",
|
|
7
|
+
"[&_:is(ul,ol)]:pl-5 [&_ul]:list-disc [&_ol]:list-decimal [&_li+li]:mt-1 [&_li>:is(ul,ol)]:mt-1",
|
|
8
|
+
"[&_a]:text-(--nc-link) [&_a]:underline [&_a]:underline-offset-4 [&_a:hover]:decoration-2",
|
|
9
|
+
"[&_:not(pre)>code]:rounded-sm [&_:not(pre)>code]:bg-muted [&_:not(pre)>code]:px-1 [&_:not(pre)>code]:font-code [&_:not(pre)>code]:text-code",
|
|
10
|
+
"[&_pre]:overflow-x-auto [&_pre]:rounded-sm [&_pre]:border [&_pre]:border-border [&_pre]:bg-recessed [&_pre]:p-3 [&_pre]:font-code [&_pre]:text-code",
|
|
11
|
+
"[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground",
|
|
12
|
+
"[&_hr]:border-border [&_img]:max-w-full",
|
|
13
|
+
"[&_table]:w-full [&_table]:border-collapse [&_td]:border-b [&_td]:border-border [&_td]:py-2 [&_td]:pr-3 [&_td]:align-top [&_th]:border-b [&_th]:border-border [&_th]:py-2 [&_th]:pr-3 [&_th]:text-left [&_th]:text-label-sm [&_th]:font-medium [&_th]:text-muted-foreground",
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Written text a renderer produced, set in the design system's type roles: headings, paragraphs,
|
|
17
|
+
* lists, links, code, quotes and tables, none of them given a class by the page.
|
|
18
|
+
*
|
|
19
|
+
* @family Other
|
|
20
|
+
* @when "Copy styles are for multiple lines and have a higher line-height than Label." (https://vercel.com/geist/typography) Ours: Markdown or other rich text turned into elements by the product's renderer: a legal document in the Portal, a company wiki page in Nadia.
|
|
21
|
+
* @instead A conversation's Markdown stays the conversation's own `MarkdownText`. One fact in a sentence is its own role (`text-body-sm`), a table the product builds is `DataTable`, and a code sample with a copy button is `CodeBlock`. Prose that is a column of settings is `SettingsSection`.
|
|
22
|
+
* @behaviour "Headings: Used to introduce pages or sections." (https://vercel.com/geist/typography) "`text-copy-13-mono`: Used for inline code mentions." (https://vercel.com/geist/typography) Ours: it styles the elements inside it by their tag, so the product chooses the renderer and keeps only what is its own: an anchor on a heading, a page link that opens in place, the level a heading takes below the page's own title. A heading's size follows its tag: `h1` 24 px, `h2` 20, `h3` 16, `h4` to `h6` 14 (`heading-md` to `heading-compact`), with 24 px above and none below, so a renderer that moves a heading down a level moves its size down with it; blocks stand 12 px apart; lists indent 20 px; a quote has a 2 px rule at its left; a code block is a bordered recessed box in mono 13 px, inline code a muted chip, with no syntax colour; a table has medium muted headings, a 1 px rule under every row and no frame. Colour: ink for the text, the link blue on links alone, muted for quotes and table headings; no other hue. It sets no width: the reading column does.
|
|
23
|
+
* @words None of its own: the text is the document's. A heading is a noun or a short sentence in the document's language; a link's text names where it goes.
|
|
24
|
+
* @access It adds no landmark and no role. The renderer keeps the document's heading order and each link's text; a table keeps its `th` cells and a code block its `pre`.
|
|
25
|
+
*/
|
|
26
|
+
function Prose({ className, size = "default", ...props }) {
|
|
27
|
+
return (_jsx("div", { className: cn("min-w-0 text-foreground", size === "roomy" ? "text-body-md" : "text-body-sm", roles, className), "data-size": size, "data-slot": "prose", ...props }));
|
|
28
|
+
}
|
|
29
|
+
export { Prose };
|
|
@@ -1,21 +1,60 @@
|
|
|
1
1
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
2
2
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
3
|
+
import { type ControlName } from "../internal/control-name.js";
|
|
4
|
+
export type RadioGroupName = {
|
|
5
|
+
"aria-labelledby": string;
|
|
6
|
+
"aria-label"?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
"aria-labelledby"?: undefined;
|
|
10
|
+
};
|
|
11
|
+
type RadioGroupProps = Omit<RadioGroupPrimitive.Props, "aria-label" | "aria-labelledby"> & RadioGroupName;
|
|
12
|
+
type RadioGroupItemProps = Omit<RadioPrimitive.Root.Props, "required"> & ControlName;
|
|
3
13
|
/**
|
|
4
14
|
* One option of a few, all shown at once.
|
|
5
15
|
*
|
|
6
16
|
* @family Choices
|
|
7
|
-
* @when
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
+
* @when "A single choice from 2–6 mutually exclusive options where seeing every option matters
|
|
18
|
+
* (deploy regions, plan tiers, billing cycle)." (https://vercel.com/geist/radio) Ours: a plan's
|
|
19
|
+
* billing cycle, who can see an Agent.
|
|
20
|
+
* @instead "Past 6 options, switch to `Select` or `Combobox` so the list doesn’t dominate the
|
|
21
|
+
* form." (https://vercel.com/geist/radio) "For binary on/off, use `Toggle`."
|
|
22
|
+
* (https://vercel.com/geist/radio) "For richer per-option content (icon, description, badge), use
|
|
23
|
+
* `Choicebox`." (https://vercel.com/geist/radio) Ours: Geist's `Toggle` is our `Switch` and its
|
|
24
|
+
* `Choicebox` our `ChoiceboxGroup`. Two or three views of one surface are a `SegmentedControl`.
|
|
25
|
+
* Another view of the same thing is `Tabs`.
|
|
26
|
+
* @behaviour "Pre-select the safest default so the field reads as configured, never as
|
|
27
|
+
* required-but-empty." (https://vercel.com/geist/radio) "Skip the default only when the choice has
|
|
28
|
+
* real consequences and you want a deliberate pick." (https://vercel.com/geist/radio) "Required
|
|
29
|
+
* state goes on the `RadioGroup`, not on individual options." (https://vercel.com/geist/radio)
|
|
30
|
+
* "Required-against-a-single-radio is meaningless." (https://vercel.com/geist/radio) "Arrow keys
|
|
31
|
+
* move selection within the group and skip disabled options." (https://vercel.com/geist/radio) "Tab
|
|
32
|
+
* moves to the next field, not the next radio." (https://vercel.com/geist/radio) "Disabled options
|
|
33
|
+
* need a Tooltip naming why (`Available on Pro and Enterprise`)." (https://vercel.com/geist/radio)
|
|
34
|
+
* "A greyed-out radio with no reason reads as broken." (https://vercel.com/geist/radio) Ours: the
|
|
35
|
+
* group is named by `aria-label` or `aria-labelledby`, and each `RadioGroupItem` by `aria-label`,
|
|
36
|
+
* `aria-labelledby` or an `id` that a `FieldLabel` points at; one without a name does not compile.
|
|
37
|
+
* Options are 16 px circles 24 px apart (a dense call site passes its own `gap`), each label 8 px
|
|
38
|
+
* away at 13 px regular weight on a 20 px row. Colour: the circle is unfilled, and the chosen one
|
|
39
|
+
* darkens its edge and shows an 8 px ink dot; nothing takes a hue, and a disabled option greys
|
|
40
|
+
* edge, dot and label together, with no hover change. The arrows also choose. The reason for a
|
|
41
|
+
* disabled option is written in its own help line.
|
|
42
|
+
* @words "Group label is a Title Case noun like `Deployment Region` or `Billing Cycle`."
|
|
43
|
+
* (https://vercel.com/geist/radio) "Render it via `<legend>` or a sibling label tied with
|
|
44
|
+
* `aria-labelledby`." (https://vercel.com/geist/radio) "Option labels are parallel: same part of
|
|
45
|
+
* speech, same length range, same register." (https://vercel.com/geist/radio) "`Monthly` /
|
|
46
|
+
* `Yearly`, not `Monthly` / `Pay yearly`." (https://vercel.com/geist/radio) Ours: sentence case
|
|
47
|
+
* with no end punctuation: *Only me*, *Everyone in the company*. The legend names the setting; it
|
|
48
|
+
* does not ask a question.
|
|
49
|
+
* @access "Wrap related radios in `<fieldset>` + `<legend>` so screen readers announce the group
|
|
50
|
+
* name before each option." (https://vercel.com/geist/radio) "The standalone unlabeled radio
|
|
51
|
+
* (custom UI) needs an `aria-label` describing the choice." (https://vercel.com/geist/radio) "Never
|
|
52
|
+
* ship a radio with no accessible name." (https://vercel.com/geist/radio) "Don’t replace the native
|
|
53
|
+
* focus ring with a CSS hack that drops outline-offset; keyboard users lose track of which option
|
|
54
|
+
* is focused." (https://vercel.com/geist/radio) Ours: `role="radiogroup"` inside a `FieldSet`. The
|
|
55
|
+
* legend names the fieldset, not the group, so point `aria-labelledby` at the `FieldLegend`'s id.
|
|
17
56
|
*/
|
|
18
|
-
declare function RadioGroup({ className, ...props }:
|
|
19
|
-
declare function RadioGroupItem({ children, className, ...props }:
|
|
57
|
+
declare function RadioGroup({ className, ...props }: RadioGroupProps): import("react").JSX.Element;
|
|
58
|
+
declare function RadioGroupItem({ children, className, ...props }: RadioGroupItemProps): import("react").JSX.Element;
|
|
20
59
|
export { RadioGroup, RadioGroupItem };
|
|
21
60
|
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAG/E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,MAAM,cAAc,GACtB;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAA;CAAE,GACvD;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAE5D,KAAK,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,iBAAiB,CAAC,GACtF,cAAc,CAAC;AAEjB,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,WAAW,CAAC;AAGrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAQ3D;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAmB7E;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -2,25 +2,55 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
3
3
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
+
// eslint-disable-next-line no-warning-comments -- the block quotes Geist's radio rule word for word (https://vercel.com/geist/radio); "hack" there is prose, not a marker
|
|
5
6
|
/**
|
|
6
7
|
* One option of a few, all shown at once.
|
|
7
8
|
*
|
|
8
9
|
* @family Choices
|
|
9
|
-
* @when
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
10
|
+
* @when "A single choice from 2–6 mutually exclusive options where seeing every option matters
|
|
11
|
+
* (deploy regions, plan tiers, billing cycle)." (https://vercel.com/geist/radio) Ours: a plan's
|
|
12
|
+
* billing cycle, who can see an Agent.
|
|
13
|
+
* @instead "Past 6 options, switch to `Select` or `Combobox` so the list doesn’t dominate the
|
|
14
|
+
* form." (https://vercel.com/geist/radio) "For binary on/off, use `Toggle`."
|
|
15
|
+
* (https://vercel.com/geist/radio) "For richer per-option content (icon, description, badge), use
|
|
16
|
+
* `Choicebox`." (https://vercel.com/geist/radio) Ours: Geist's `Toggle` is our `Switch` and its
|
|
17
|
+
* `Choicebox` our `ChoiceboxGroup`. Two or three views of one surface are a `SegmentedControl`.
|
|
18
|
+
* Another view of the same thing is `Tabs`.
|
|
19
|
+
* @behaviour "Pre-select the safest default so the field reads as configured, never as
|
|
20
|
+
* required-but-empty." (https://vercel.com/geist/radio) "Skip the default only when the choice has
|
|
21
|
+
* real consequences and you want a deliberate pick." (https://vercel.com/geist/radio) "Required
|
|
22
|
+
* state goes on the `RadioGroup`, not on individual options." (https://vercel.com/geist/radio)
|
|
23
|
+
* "Required-against-a-single-radio is meaningless." (https://vercel.com/geist/radio) "Arrow keys
|
|
24
|
+
* move selection within the group and skip disabled options." (https://vercel.com/geist/radio) "Tab
|
|
25
|
+
* moves to the next field, not the next radio." (https://vercel.com/geist/radio) "Disabled options
|
|
26
|
+
* need a Tooltip naming why (`Available on Pro and Enterprise`)." (https://vercel.com/geist/radio)
|
|
27
|
+
* "A greyed-out radio with no reason reads as broken." (https://vercel.com/geist/radio) Ours: the
|
|
28
|
+
* group is named by `aria-label` or `aria-labelledby`, and each `RadioGroupItem` by `aria-label`,
|
|
29
|
+
* `aria-labelledby` or an `id` that a `FieldLabel` points at; one without a name does not compile.
|
|
30
|
+
* Options are 16 px circles 24 px apart (a dense call site passes its own `gap`), each label 8 px
|
|
31
|
+
* away at 13 px regular weight on a 20 px row. Colour: the circle is unfilled, and the chosen one
|
|
32
|
+
* darkens its edge and shows an 8 px ink dot; nothing takes a hue, and a disabled option greys
|
|
33
|
+
* edge, dot and label together, with no hover change. The arrows also choose. The reason for a
|
|
34
|
+
* disabled option is written in its own help line.
|
|
35
|
+
* @words "Group label is a Title Case noun like `Deployment Region` or `Billing Cycle`."
|
|
36
|
+
* (https://vercel.com/geist/radio) "Render it via `<legend>` or a sibling label tied with
|
|
37
|
+
* `aria-labelledby`." (https://vercel.com/geist/radio) "Option labels are parallel: same part of
|
|
38
|
+
* speech, same length range, same register." (https://vercel.com/geist/radio) "`Monthly` /
|
|
39
|
+
* `Yearly`, not `Monthly` / `Pay yearly`." (https://vercel.com/geist/radio) Ours: sentence case
|
|
40
|
+
* with no end punctuation: *Only me*, *Everyone in the company*. The legend names the setting; it
|
|
41
|
+
* does not ask a question.
|
|
42
|
+
* @access "Wrap related radios in `<fieldset>` + `<legend>` so screen readers announce the group
|
|
43
|
+
* name before each option." (https://vercel.com/geist/radio) "The standalone unlabeled radio
|
|
44
|
+
* (custom UI) needs an `aria-label` describing the choice." (https://vercel.com/geist/radio) "Never
|
|
45
|
+
* ship a radio with no accessible name." (https://vercel.com/geist/radio) "Don’t replace the native
|
|
46
|
+
* focus ring with a CSS hack that drops outline-offset; keyboard users lose track of which option
|
|
47
|
+
* is focused." (https://vercel.com/geist/radio) Ours: `role="radiogroup"` inside a `FieldSet`. The
|
|
48
|
+
* legend names the fieldset, not the group, so point `aria-labelledby` at the `FieldLegend`'s id.
|
|
19
49
|
*/
|
|
20
50
|
function RadioGroup({ className, ...props }) {
|
|
21
|
-
return (_jsx(RadioGroupPrimitive, { "data-slot": "radio-group", className: cn("grid w-full gap-
|
|
51
|
+
return (_jsx(RadioGroupPrimitive, { "data-slot": "radio-group", className: cn("grid w-full gap-6", className), ...props }));
|
|
22
52
|
}
|
|
23
53
|
function RadioGroupItem({ children, className, ...props }) {
|
|
24
|
-
return (_jsx(RadioPrimitive.Root, { "data-slot": "radio-group-item", className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-x-1/2 after:-translate-y-1/2 disabled:cursor-not-allowed disabled:opacity-50
|
|
54
|
+
return (_jsx(RadioPrimitive.Root, { "data-slot": "radio-group-item", className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input nc-transition-paint after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-x-1/2 after:-translate-y-1/2 data-checked:border-primary data-checked:text-primary data-disabled:cursor-not-allowed data-disabled:opacity-50 data-unchecked:not-data-disabled:hover:border-muted-foreground data-unchecked:not-data-disabled:hover:bg-accent aria-invalid:border-destructive aria-invalid:aria-checked:border-primary [@media(hover:hover)_and_(pointer:fine)]:after:hidden", className), ...props, children: children ?? (_jsx(RadioPrimitive.Indicator, { "data-slot": "radio-group-indicator", keepMounted: true, className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 scale-0 rounded-full bg-current nc-transition-transform data-checked:scale-100" })) }));
|
|
25
55
|
}
|
|
26
56
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -12,6 +12,6 @@ import { cn } from "../lib/utils.js";
|
|
|
12
12
|
* @access A layout container.
|
|
13
13
|
*/
|
|
14
14
|
function ReadingColumn({ width = "reading", className, ...props }) {
|
|
15
|
-
return (_jsx("div", { "data-slot": "reading-column", "data-width": width, className: cn("mx-auto flex w-full min-w-0 flex-col gap-6", width === "reading" && "max-w-3xl", width === "configuration" && "max-w-
|
|
15
|
+
return (_jsx("div", { "data-slot": "reading-column", "data-width": width, className: cn("mx-auto flex w-full min-w-0 flex-col gap-6", width === "reading" && "max-w-3xl", width === "configuration" && "max-w-2xl", className), ...props }));
|
|
16
16
|
}
|
|
17
17
|
export { ReadingColumn };
|
|
@@ -8,17 +8,18 @@ import { type IdentityMarkProps } from "./identity-mark.js";
|
|
|
8
8
|
* @family Status
|
|
9
9
|
* @when The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.
|
|
10
10
|
* @instead An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.
|
|
11
|
-
* @behaviour The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. `wraps` only when the name is the whole record, such as a memory
|
|
12
|
-
* @words
|
|
11
|
+
* @behaviour The mark stands 16 px before the name. The name is semibold ink and the detail muted, two lines with no gap between them, so the row is an entity row; `mark` and `detail` are both required, and a record with nothing to say in the detail passes the dash of `TableValue`. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot, so the record stays the name over one line. `wraps` only when the name is the whole record, such as a memory, and then the detail wraps too. The table owns the link.
|
|
12
|
+
* @words “Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity)
|
|
13
|
+
* Ours: the name as the record calls itself, and the detail in sentence case: kind, then relation, three to six words, "Company skill · every Agent has it".
|
|
13
14
|
* @access The name is the row link's text; the mark is decorative; the title carries the full name.
|
|
14
15
|
*/
|
|
15
16
|
declare function RecordIdentity({ name, mark, hint, detail, wraps, }: {
|
|
16
17
|
name: ReactNode;
|
|
17
|
-
/** Drawn at 32, whatever size it carries. */
|
|
18
|
-
mark
|
|
18
|
+
/** Drawn at 32, whatever size it carries. An initials mark when the record has no picture. */
|
|
19
|
+
mark: IdentityMarkProps;
|
|
19
20
|
/** Read after the name in its title, such as an identifier the row does not show. */
|
|
20
21
|
hint?: string;
|
|
21
|
-
detail
|
|
22
|
+
detail: NonNullable<ReactNode>;
|
|
22
23
|
wraps?: boolean;
|
|
23
24
|
}): import("react").JSX.Element;
|
|
24
25
|
export { RecordIdentity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"record-identity.d.ts","sourceRoot":"","sources":["../../src/components/record-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIlF;;;;;;;;;;;;GAYG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAa,GACd,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,8FAA8F;IAC9F,IAAI,EAAE,iBAAiB,CAAC;IACxB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,+BAmCA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IdentityMark } from "./identity-mark.js";
|
|
3
|
+
import { TableCompactFacts } from "../internal/table-compact-line.js";
|
|
3
4
|
import { cn } from "../lib/utils.js";
|
|
4
5
|
/**
|
|
5
6
|
* A record's identity in a row (DESIGN.md "Tables and missing values"): its
|
|
@@ -9,13 +10,21 @@ import { cn } from "../lib/utils.js";
|
|
|
9
10
|
* @family Status
|
|
10
11
|
* @when The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.
|
|
11
12
|
* @instead An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.
|
|
12
|
-
* @behaviour The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. `wraps` only when the name is the whole record, such as a memory
|
|
13
|
-
* @words
|
|
13
|
+
* @behaviour The mark stands 16 px before the name. The name is semibold ink and the detail muted, two lines with no gap between them, so the row is an entity row; `mark` and `detail` are both required, and a record with nothing to say in the detail passes the dash of `TableValue`. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot, so the record stays the name over one line. `wraps` only when the name is the whole record, such as a memory, and then the detail wraps too. The table owns the link.
|
|
14
|
+
* @words “Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity)
|
|
15
|
+
* Ours: the name as the record calls itself, and the detail in sentence case: kind, then relation, three to six words, "Company skill · every Agent has it".
|
|
14
16
|
* @access The name is the row link's text; the mark is decorative; the title carries the full name.
|
|
15
17
|
*/
|
|
16
18
|
function RecordIdentity({ name, mark, hint, detail, wraps = false, }) {
|
|
17
19
|
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- name is a ReactNode; only a string can be a title attribute.
|
|
18
20
|
const title = typeof name === "string" ? (hint ? `${name} · ${hint}` : name) : undefined;
|
|
19
|
-
return (_jsxs("span", { className: "flex min-w-0 items-center gap-
|
|
21
|
+
return (_jsxs("span", { className: "flex min-w-0 items-center gap-4", "data-slot": "record-identity", children: [_jsx(IdentityMark, { ...mark, size: 32 }), _jsxs("span", { className: "grid min-w-0 in-[table]:w-0 in-[table]:flex-1", children: [_jsx("span", { className: cn("min-w-0 font-semibold text-foreground", wraps ? "break-words whitespace-pre-wrap" : "truncate"), title: wraps ? undefined : title, children: name }), _jsxs("span", { className: cn(
|
|
22
|
+
// The line is the containing block of the facts' screen-reader labels, so what it cuts
|
|
23
|
+
// stays cut instead of widening the table.
|
|
24
|
+
"relative text-sm text-muted-foreground", wraps
|
|
25
|
+
? "break-words whitespace-normal"
|
|
26
|
+
: "truncate has-[[data-wraps]]:break-words has-[[data-wraps]]:whitespace-normal"), "data-slot": "record-identity-detail",
|
|
27
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- detail is a ReactNode; only a string can be a title attribute.
|
|
28
|
+
title: !wraps && typeof detail === "string" ? detail : undefined, children: [detail, _jsx(TableCompactFacts, {})] })] })] }));
|
|
20
29
|
}
|
|
21
30
|
export { RecordIdentity };
|