@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
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx,
|
|
3
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { ArrowUpRight } from "lucide-react";
|
|
5
4
|
import { createContext, useCallback, useContext, useEffect, useId, useState, } from "react";
|
|
6
5
|
import { createPortal } from "react-dom";
|
|
7
6
|
import { ActionMenu } from "./action-menu.js";
|
|
8
|
-
import { Button,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const pending = command.pending === true;
|
|
25
|
-
const content = (_jsxs(_Fragment, { children: [command.icon ? _jsx("span", { "data-icon": "inline-start", children: command.icon }) : null, _jsx(PendingLabel, { pending: pending, pendingLabel: command.pendingLabel ?? command.label, children: command.label }), command.external ? _jsx(ArrowUpRight, { "aria-hidden": "true", "data-icon": "inline-end" }) : null] }));
|
|
7
|
+
import { Button, ButtonLink } from "./button.js";
|
|
8
|
+
export function PageCommandButton({ command, shape, size, variant, }) {
|
|
9
|
+
const look = {
|
|
10
|
+
"aria-label": command.accessibleName,
|
|
11
|
+
disabled: command.disabled,
|
|
12
|
+
loading: command.pending === true,
|
|
13
|
+
loadingLabel: command.pendingLabel ?? command.label,
|
|
14
|
+
prefix: command.icon,
|
|
15
|
+
shape,
|
|
16
|
+
size,
|
|
17
|
+
suffix: command.external ? _jsx(ArrowUpRight, { "aria-hidden": "true" }) : undefined,
|
|
18
|
+
variant,
|
|
19
|
+
};
|
|
20
|
+
if (command.link) {
|
|
21
|
+
return (_jsx(ButtonLink, { ...look, render: command.link, children: command.label }));
|
|
22
|
+
}
|
|
26
23
|
if (command.render) {
|
|
27
|
-
return (_jsx(
|
|
24
|
+
return (_jsx(Button, { ...look, render: command.render, children: command.label }));
|
|
28
25
|
}
|
|
29
|
-
return (_jsx(Button, {
|
|
26
|
+
return (_jsx(Button, { ...look, onClick: command.onClick, type: "button", children: command.label }));
|
|
30
27
|
}
|
|
31
28
|
/** The row of a page's actions where it stands, for a page whose header is its own card. */
|
|
32
29
|
export function PageActionsRow({ period, primary, secondary, menu }) {
|
|
33
30
|
if (!period && !primary && !secondary && !menu)
|
|
34
31
|
return null;
|
|
35
|
-
return (_jsxs("div", { "data-slot": "page-actions", className: "flex
|
|
32
|
+
return (_jsxs("div", { "data-slot": "page-actions", className: "flex max-w-full min-w-0 flex-wrap items-center gap-2", children: [period, secondary ? _jsx(PageCommandButton, { command: secondary, variant: "outline" }) : null, primary ? _jsx(PageCommandButton, { command: primary, variant: "default" }) : null, menu ? _jsx(ActionMenu, { ...menu }) : null] }));
|
|
36
33
|
}
|
|
37
34
|
const PageActionsHostContext = createContext(null);
|
|
38
35
|
/**
|
|
@@ -50,7 +47,7 @@ export function PageActionsHostProvider({ children }) {
|
|
|
50
47
|
/** The element on `PageHeader`'s title row that the page's `PageActions` render into. */
|
|
51
48
|
export function PageActionsSlot() {
|
|
52
49
|
const host = useContext(PageActionsHostContext);
|
|
53
|
-
return (_jsx("div", { "data-slot": "page-header-actions", className: "flex
|
|
50
|
+
return (_jsx("div", { "data-slot": "page-header-actions", className: "flex max-w-full min-w-0 items-center empty:hidden", ref: host?.attach }));
|
|
54
51
|
}
|
|
55
52
|
/**
|
|
56
53
|
* A page's actions, drawn on its title's row. Only the page shown last owns
|
|
@@ -60,7 +57,7 @@ export function PageActionsSlot() {
|
|
|
60
57
|
* @family Actions
|
|
61
58
|
* @when The actions of a collection, an object or an overview page, on the title's row at its trailing edge. A Configuration page has none: each section saves from its footer.
|
|
62
59
|
* @instead A row's actions are the row's one button and its `ActionMenu`. A collection toolbar holds search and filters, never a page action.
|
|
63
|
-
* @behaviour Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A destination outside the product ends in the arrow. A running command keeps its place and icon, says its pending word and holds.
|
|
60
|
+
* @behaviour Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.
|
|
64
61
|
* @words The primary is the page's main job as verb and noun: "Invite member", "New Agent". The pending word is its -ing form: "Inviting member". The menu names the page's record at its top and keeps the destructive command last, after a divider.
|
|
65
62
|
* @access DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A running command is `aria-busy` and keeps focus. The three dots carry "More for {record}"; the menu returns focus to them when it closes.
|
|
66
63
|
*/
|
|
@@ -7,13 +7,20 @@ import * as React from "react";
|
|
|
7
7
|
* the trailing edge of its row.
|
|
8
8
|
* @instead An object's own header is `ObjectPage`'s. The path above it is the top bar's
|
|
9
9
|
* `Breadcrumb`; filters, search and sort sit in the toolbar below.
|
|
10
|
-
* @behaviour
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* @behaviour The title is always there and the actions arrive through the `PageActions` slot, so
|
|
11
|
+
* the page draws its commands once. On a phone the title keeps its row with one action, as Vercel's
|
|
12
|
+
* does; it gives way, and the actions wrap under it, only when they leave it less than 128 px. Under the title only the `description` may sit: one muted line
|
|
13
|
+
* saying what the page's records are for, for a page whose kind needs explaining. It ends in a link
|
|
14
|
+
* to learn more when there is one, and never counts or introduces anything else. The description
|
|
15
|
+
* is neutral; no hue sits in the header.
|
|
16
|
+
* @words The title is the page's name as the sidebar writes it: *Customers*, *Agents*. The
|
|
17
|
+
* description is one sentence in the product's words, without a full stop when it ends in a link.
|
|
13
18
|
* @access The title is the page's `h1`; DOM order is visual order.
|
|
14
19
|
*/
|
|
15
|
-
declare function PageHeader({ title, headingProps, className, ...props }: Omit<React.ComponentProps<"header">, "title" | "children"> & {
|
|
20
|
+
declare function PageHeader({ title, description, headingProps, className, ...props }: Omit<React.ComponentProps<"header">, "title" | "children"> & {
|
|
16
21
|
title: React.ReactNode;
|
|
22
|
+
/** One muted line under the title; a link to learn more may end it. */
|
|
23
|
+
description?: React.ReactNode;
|
|
17
24
|
headingProps?: Omit<React.ComponentProps<"h1">, "children">;
|
|
18
25
|
}): React.JSX.Element;
|
|
19
26
|
export { PageHeader };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/components/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B
|
|
1
|
+
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/components/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAC9D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,uEAAuE;IACvE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;CAC7D,qBAyBA;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -9,12 +9,17 @@ import { PageActionsSlot } from "./page-actions.js";
|
|
|
9
9
|
* the trailing edge of its row.
|
|
10
10
|
* @instead An object's own header is `ObjectPage`'s. The path above it is the top bar's
|
|
11
11
|
* `Breadcrumb`; filters, search and sort sit in the toolbar below.
|
|
12
|
-
* @behaviour
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* @behaviour The title is always there and the actions arrive through the `PageActions` slot, so
|
|
13
|
+
* the page draws its commands once. On a phone the title keeps its row with one action, as Vercel's
|
|
14
|
+
* does; it gives way, and the actions wrap under it, only when they leave it less than 128 px. Under the title only the `description` may sit: one muted line
|
|
15
|
+
* saying what the page's records are for, for a page whose kind needs explaining. It ends in a link
|
|
16
|
+
* to learn more when there is one, and never counts or introduces anything else. The description
|
|
17
|
+
* is neutral; no hue sits in the header.
|
|
18
|
+
* @words The title is the page's name as the sidebar writes it: *Customers*, *Agents*. The
|
|
19
|
+
* description is one sentence in the product's words, without a full stop when it ends in a link.
|
|
15
20
|
* @access The title is the page's `h1`; DOM order is visual order.
|
|
16
21
|
*/
|
|
17
|
-
function PageHeader({ title, headingProps, className, ...props }) {
|
|
18
|
-
return (
|
|
22
|
+
function PageHeader({ title, description, headingProps, className, ...props }) {
|
|
23
|
+
return (_jsxs("header", { "data-slot": "page-header", className: cn("min-w-0", className), ...props, children: [_jsxs("div", { className: "flex min-h-9 min-w-0 flex-wrap items-center justify-between gap-x-6 gap-y-3", children: [_jsx("h1", { ...headingProps, className: cn("min-w-0 flex-1 basis-32 truncate text-heading-md text-foreground outline-none", headingProps?.className), children: title }), _jsx(PageActionsSlot, {})] }), description ? (_jsx("div", { "data-slot": "page-header-description", className: "mt-1 min-w-0 text-body-sm text-muted-foreground", children: description })) : null] }));
|
|
19
24
|
}
|
|
20
25
|
export { PageHeader };
|
|
@@ -3,13 +3,14 @@ import type * as React from "react";
|
|
|
3
3
|
* A control's own label while the system works on what it was asked to do.
|
|
4
4
|
*
|
|
5
5
|
* @family Feedback
|
|
6
|
-
* @when
|
|
7
|
-
* the
|
|
6
|
+
* @when A control that is not a button and starts work the system does, such as a menu row: from
|
|
7
|
+
* the press until the result, whatever the wait. A `Button` or `ButtonLink` never uses it by hand:
|
|
8
|
+
* `loading` and `loadingLabel` draw it.
|
|
8
9
|
* @instead Past a second add one `WaitingLine` beside the control. An Agent's work is never this:
|
|
9
10
|
* it is her orb and a sentence. A queued or paused request is a status.
|
|
10
|
-
* @behaviour Swaps the word, nothing else: same place, size and icon. The caller sets `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* @behaviour Swaps the word, nothing else: same place, size and icon; a text label keeps the width of the longer of its two words. The caller sets `aria-busy`
|
|
12
|
+
* and blocks a second press, because only the caller knows which element the wait belongs to.
|
|
13
|
+
* Failure returns the rest label.
|
|
13
14
|
* @words The rest label's verb in its -ing form with the same noun: *Remove mailbox* to *Removing
|
|
14
15
|
* mailbox*. No ellipsis, no *Please wait*.
|
|
15
16
|
* @access `aria-busy` on the control; its name changes to the pending word and is read once. Focus
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-label.d.ts","sourceRoot":"","sources":["../../src/components/pending-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC
|
|
1
|
+
{"version":3,"file":"pending-label.d.ts","sourceRoot":"","sources":["../../src/components/pending-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,OAAO,EACP,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B,qBAsBA;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -4,19 +4,27 @@ import { cn } from "../lib/utils.js";
|
|
|
4
4
|
* A control's own label while the system works on what it was asked to do.
|
|
5
5
|
*
|
|
6
6
|
* @family Feedback
|
|
7
|
-
* @when
|
|
8
|
-
* the
|
|
7
|
+
* @when A control that is not a button and starts work the system does, such as a menu row: from
|
|
8
|
+
* the press until the result, whatever the wait. A `Button` or `ButtonLink` never uses it by hand:
|
|
9
|
+
* `loading` and `loadingLabel` draw it.
|
|
9
10
|
* @instead Past a second add one `WaitingLine` beside the control. An Agent's work is never this:
|
|
10
11
|
* it is her orb and a sentence. A queued or paused request is a status.
|
|
11
|
-
* @behaviour Swaps the word, nothing else: same place, size and icon. The caller sets `
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* @behaviour Swaps the word, nothing else: same place, size and icon; a text label keeps the width of the longer of its two words. The caller sets `aria-busy`
|
|
13
|
+
* and blocks a second press, because only the caller knows which element the wait belongs to.
|
|
14
|
+
* Failure returns the rest label.
|
|
14
15
|
* @words The rest label's verb in its -ing form with the same noun: *Remove mailbox* to *Removing
|
|
15
16
|
* mailbox*. No ellipsis, no *Please wait*.
|
|
16
17
|
* @access `aria-busy` on the control; its name changes to the pending word and is read once. Focus
|
|
17
18
|
* stays on it.
|
|
18
19
|
*/
|
|
19
20
|
function PendingLabel({ children, className, pending, pendingLabel, ...props }) {
|
|
20
|
-
|
|
21
|
+
// The word not shown is laid out unseen under it at no height, so the swap keeps the width;
|
|
22
|
+
// as a hidden pseudo-element it stays out of the text and the accessible name. The grid comes
|
|
23
|
+
// after the caller's classes: a caller's flex would set the two words side by side.
|
|
24
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- labels are ReactNodes; only a pair of words can be reserved as generated content.
|
|
25
|
+
const words = typeof children === "string" && typeof pendingLabel === "string";
|
|
26
|
+
const reserved = words ? (pending ? children : pendingLabel) : undefined;
|
|
27
|
+
return (_jsx("span", { ...props, className: cn(className, reserved !== undefined &&
|
|
28
|
+
"inline-grid gap-0 after:invisible after:h-0 after:overflow-hidden after:content-[attr(data-reserved)]"), "data-pending": pending || undefined, "data-reserved": reserved, "data-slot": "pending-label", children: pending ? pendingLabel : children }));
|
|
21
29
|
}
|
|
22
30
|
export { PendingLabel };
|
|
@@ -9,8 +9,8 @@ import type { ReactNode } from "react";
|
|
|
9
9
|
* (absence), or a request the product stopped (fault). `PictureLabel` is its label.
|
|
10
10
|
* @instead For one region that failed inside a working page use `EmptyState failed`; the rest of
|
|
11
11
|
* the page stays. Never turn the whole page into an error because one card failed.
|
|
12
|
-
* @behaviour Picture 256 px, 320 from sm, 384 from lg. The label
|
|
13
|
-
*
|
|
12
|
+
* @behaviour Picture 256 px, 320 from sm, 384 from lg. The label stands centred under the picture at
|
|
13
|
+
* every width, on the same centre line as the words below. Still.
|
|
14
14
|
* @words Never apologise, never name the mechanism. The label's title says what the picture is
|
|
15
15
|
* doing; the second line gives its materials and year.
|
|
16
16
|
* @access The picture is decorative; the label is a `figcaption`, read once. The page's heading is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture-label.d.ts","sourceRoot":"","sources":["../../src/components/picture-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,4DAA4D;IAC5D,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+
|
|
1
|
+
{"version":3,"file":"picture-label.d.ts","sourceRoot":"","sources":["../../src/components/picture-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,4DAA4D;IAC5D,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAUA;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,+BASlF"}
|
|
@@ -10,15 +10,15 @@ import { cn } from "../lib/utils.js";
|
|
|
10
10
|
* (absence), or a request the product stopped (fault). `PictureLabel` is its label.
|
|
11
11
|
* @instead For one region that failed inside a working page use `EmptyState failed`; the rest of
|
|
12
12
|
* the page stays. Never turn the whole page into an error because one card failed.
|
|
13
|
-
* @behaviour Picture 256 px, 320 from sm, 384 from lg. The label
|
|
14
|
-
*
|
|
13
|
+
* @behaviour Picture 256 px, 320 from sm, 384 from lg. The label stands centred under the picture at
|
|
14
|
+
* every width, on the same centre line as the words below. Still.
|
|
15
15
|
* @words Never apologise, never name the mechanism. The label's title says what the picture is
|
|
16
16
|
* doing; the second line gives its materials and year.
|
|
17
17
|
* @access The picture is decorative; the label is a `figcaption`, read once. The page's heading is
|
|
18
18
|
* its `h1`; its actions are real links.
|
|
19
19
|
*/
|
|
20
20
|
export function LabelledPicture({ children, label, className, }) {
|
|
21
|
-
return (_jsxs("figure", { className: cn("m-0 grid w-full max-w-4xl justify-items-center gap-4
|
|
21
|
+
return (_jsxs("figure", { className: cn("m-0 grid w-full max-w-4xl justify-items-center gap-4", className), "data-slot": "labelled-picture", children: [_jsx("div", { children: children }), _jsx("figcaption", { className: "max-w-72 text-center", children: label })] }));
|
|
22
22
|
}
|
|
23
23
|
export function PictureLabel({ title, details }) {
|
|
24
24
|
return (_jsxs("span", { className: "grid gap-1", children: [_jsx("span", { className: "text-body-sm text-balance font-medium", children: title }), _jsx("span", { className: "font-label-mono text-label-mono text-balance text-muted-foreground", children: details })] }));
|
|
@@ -14,30 +14,18 @@ export type PortalSidebarBand = {
|
|
|
14
14
|
items: PortalSidebarItem[];
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* The Portal's navigation
|
|
18
|
-
* the section name over the collapse control, the Find control with its
|
|
19
|
-
* shortcut, the labelled nav bands, the band that leads out of the Portal, and
|
|
20
|
-
* the account at the foot.
|
|
17
|
+
* The website's sample of the Portal's navigation column, drawn from data and without the Portal's routing.
|
|
21
18
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* The frame carries geometry and brand imagery only. Every word, icon and
|
|
27
|
-
* active marking arrives as a prop, so the Portal can pass its nav model and
|
|
28
|
-
* the website can pass a sample of it.
|
|
19
|
+
* The sample holds the geometry and the brand imagery only: every word, icon and selected row
|
|
20
|
+
* arrives as a prop, so the website can pass a sample of the Portal's own navigation. The Portal
|
|
21
|
+
* and Nadia draw their columns with the same `Sidebar`, `SidebarFrame` and rows.
|
|
29
22
|
*
|
|
30
23
|
* @family Navigation
|
|
31
|
-
* @when
|
|
32
|
-
* @instead
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
36
|
-
* (Get Nadia) and the account, split by 1 px guides.
|
|
37
|
-
* @words Find is one word beside ⌘K. Bands are short nouns; items are nouns, one or two words,
|
|
38
|
-
* sentence case.
|
|
39
|
-
* @access The column is a labelled `nav`. Find is a button named with its shortcut. The wordmark is
|
|
40
|
-
* `role="img"` named nadicode.
|
|
24
|
+
* @when A static picture of the Portal's column on the website; all of `account`, `bands`, `findLabel`, `subtitle` and `toggleLabel` are required.
|
|
25
|
+
* @instead A product's own navigation is a `Sidebar` filled by `SidebarFrame`, never this sample.
|
|
26
|
+
* @behaviour Wordmark and product name beside the collapse control, then Find with ⌘K, the groups, the way out (Get Nadia) and the account; 1 px rules sit under the header and above the way out and the account, none between groups. The selected row takes the selection fill; every other row stays neutral.
|
|
27
|
+
* @words Find is one word beside ⌘K. Bands are short nouns; items are nouns, one or two words, sentence case.
|
|
28
|
+
* @access The collapse control is named by `toggleLabel` and Find by `findLabel`; the wordmark is decorative beside the product name.
|
|
41
29
|
*/
|
|
42
30
|
export declare function PortalSidebarFrame({ account, bands, className, findLabel, footerItem, subtitle, toggleLabel, }: {
|
|
43
31
|
account: AccountIdentity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal-sidebar-frame.d.ts","sourceRoot":"","sources":["../../src/components/portal-sidebar-frame.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"portal-sidebar-frame.d.ts","sourceRoot":"","sources":["../../src/components/portal-sidebar-frame.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAiBtF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAaF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,WAAW,GACZ,EAAE;IACD,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,+BAgDA"}
|
|
@@ -1,40 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Search } from "lucide-react";
|
|
4
3
|
import { AccountMenuIdentity } from "./account-menu.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarTrigger, } from "./sidebar.js";
|
|
4
|
+
import { Kbd } from "./kbd.js";
|
|
5
|
+
import { Sidebar, SidebarBrand, SidebarFind, SidebarFrame, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarTrigger, } from "./sidebar.js";
|
|
8
6
|
import { cn } from "../lib/utils.js";
|
|
9
7
|
function ItemRow({ item, variant }) {
|
|
10
|
-
return (_jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { isActive: item.current, tooltip: item.label,
|
|
8
|
+
return (_jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { isActive: item.current, tooltip: item.label, variant: variant, children: [item.icon, _jsx("span", { className: "truncate", children: item.label })] }) }));
|
|
11
9
|
}
|
|
12
10
|
/**
|
|
13
|
-
* The Portal's navigation
|
|
14
|
-
* the section name over the collapse control, the Find control with its
|
|
15
|
-
* shortcut, the labelled nav bands, the band that leads out of the Portal, and
|
|
16
|
-
* the account at the foot.
|
|
11
|
+
* The website's sample of the Portal's navigation column, drawn from data and without the Portal's routing.
|
|
17
12
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* The frame carries geometry and brand imagery only. Every word, icon and
|
|
23
|
-
* active marking arrives as a prop, so the Portal can pass its nav model and
|
|
24
|
-
* the website can pass a sample of it.
|
|
13
|
+
* The sample holds the geometry and the brand imagery only: every word, icon and selected row
|
|
14
|
+
* arrives as a prop, so the website can pass a sample of the Portal's own navigation. The Portal
|
|
15
|
+
* and Nadia draw their columns with the same `Sidebar`, `SidebarFrame` and rows.
|
|
25
16
|
*
|
|
26
17
|
* @family Navigation
|
|
27
|
-
* @when
|
|
28
|
-
* @instead
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
32
|
-
* (Get Nadia) and the account, split by 1 px guides.
|
|
33
|
-
* @words Find is one word beside ⌘K. Bands are short nouns; items are nouns, one or two words,
|
|
34
|
-
* sentence case.
|
|
35
|
-
* @access The column is a labelled `nav`. Find is a button named with its shortcut. The wordmark is
|
|
36
|
-
* `role="img"` named nadicode.
|
|
18
|
+
* @when A static picture of the Portal's column on the website; all of `account`, `bands`, `findLabel`, `subtitle` and `toggleLabel` are required.
|
|
19
|
+
* @instead A product's own navigation is a `Sidebar` filled by `SidebarFrame`, never this sample.
|
|
20
|
+
* @behaviour Wordmark and product name beside the collapse control, then Find with ⌘K, the groups, the way out (Get Nadia) and the account; 1 px rules sit under the header and above the way out and the account, none between groups. The selected row takes the selection fill; every other row stays neutral.
|
|
21
|
+
* @words Find is one word beside ⌘K. Bands are short nouns; items are nouns, one or two words, sentence case.
|
|
22
|
+
* @access The collapse control is named by `toggleLabel` and Find by `findLabel`; the wordmark is decorative beside the product name.
|
|
37
23
|
*/
|
|
38
24
|
export function PortalSidebarFrame({ account, bands, className, findLabel, footerItem, subtitle, toggleLabel, }) {
|
|
39
|
-
return (_jsx(Sidebar, { collapsible: "none", className: cn("h-auto shrink-0", className), children:
|
|
25
|
+
return (_jsx(Sidebar, { collapsible: "none", className: cn("h-auto shrink-0", className), children: _jsx(SidebarFrame, { account: _jsx(SidebarMenu, { children: _jsx(SidebarMenuItem, { className: "group/account flex min-h-9 items-center pr-2 pl-2.5", children: _jsx(AccountMenuIdentity, { identity: account }) }) }), band: footerItem ? (_jsx(SidebarMenu, { children: _jsx(ItemRow, { item: footerItem, variant: "outline" }) })) : undefined, find: _jsx(SidebarFind, { label: findLabel, shortcut: _jsx(Kbd, { meta: true, size: "sm", children: "K" }) }), header: _jsx(SidebarBrand, { subtitle: subtitle }), toggle: _jsx(SidebarTrigger, { "aria-label": toggleLabel, className: "shrink-0" }), children: bands.map((band) => (_jsxs(SidebarGroup, { children: [band.label ? (_jsx(SidebarGroupLabel, { render: _jsx("h2", {}), children: band.label })) : null, _jsx(SidebarGroupContent, { children: _jsx(SidebarMenu, { children: band.items.map((item) => (_jsx(ItemRow, { item: item }, item.id))) }) })] }, band.id))) }) }));
|
|
40
26
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IconComponent } from "./identity-mark.js";
|
|
2
|
+
import { type PageCommand } from "./page-actions.js";
|
|
3
|
+
/** The ground of a step's icon tile: a hue says which kind of step it is, never whether it is done. */
|
|
4
|
+
export type ChecklistStepTone = "neutral" | "blue" | "green" | "amber" | "purple" | "teal" | "pink";
|
|
5
|
+
export type ChecklistStep = {
|
|
6
|
+
id: string;
|
|
7
|
+
/** What the step asks for, as a done thing reads: "Company details confirmed". */
|
|
8
|
+
title: string;
|
|
9
|
+
/** One line: what the step gives, or what is missing. */
|
|
10
|
+
description: string;
|
|
11
|
+
icon: IconComponent;
|
|
12
|
+
tone?: ChecklistStepTone;
|
|
13
|
+
/** Derived from what exists, never remembered: the thing the step asks for is there. */
|
|
14
|
+
done: boolean;
|
|
15
|
+
/** Where the step is done, for a step still to do: a link, drawn as an outline button. */
|
|
16
|
+
action?: PageCommand;
|
|
17
|
+
};
|
|
18
|
+
export type ProgressChecklistProps = {
|
|
19
|
+
/** The checklist's name, in the tooltip and as the drawer's title: "Customer setup". */
|
|
20
|
+
title: string;
|
|
21
|
+
/** One line under the drawer's title. */
|
|
22
|
+
description: string;
|
|
23
|
+
/** The ring's accessible name, whose and how far: "Studio Rossi's setup, 2 of 4 done". */
|
|
24
|
+
label: string;
|
|
25
|
+
steps: readonly ChecklistStep[];
|
|
26
|
+
/** The chip on a done step: "Done". */
|
|
27
|
+
doneLabel: string;
|
|
28
|
+
/** The drawer's ×. */
|
|
29
|
+
closeLabel: string;
|
|
30
|
+
/** The drawer's footer button, which closes it: "Done". */
|
|
31
|
+
finishLabel: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* How far one record is through the steps that make it ready: a blue ring at the end of its row
|
|
35
|
+
* that opens the steps in a drawer at the right edge.
|
|
36
|
+
*
|
|
37
|
+
* @family Status
|
|
38
|
+
* @when “Production Checklist”, the ring at the end of a project's row on Vercel's Projects page, which opens the steps that make a project ready for production. (https://vercel.com/dashboard)
|
|
39
|
+
* Ours: the steps a Customer or a Partner takes before nadicode's work runs for them, each one a fact the Portal can read (company details confirmed, a plan, Nadia connected, an Agent at work), at the end of the record's row.
|
|
40
|
+
* @instead Steps a person follows on a page, one after the other, are `NumberedSteps`; a setup with a wait is `FormDrawer job="steps"`. A ratio with no steps behind it is a `Gauge`. One state of a record is a `StatusBadge`.
|
|
41
|
+
* @behaviour The ring is a 24 px `Gauge` in blue with the double check inside in ink, so the glyph reads at a glance, on a 36 px ghost button whose tooltip names the checklist and how far it is ("Customer setup 3/4"). It opens a drawer from the right: the ring again, the title, one line, then one card per step: its icon on a tile of its tone, its title, one line, and the outline button that goes where the step is done; every card is the same hairline card, and a done step differs only by its blue Done chip after its title, with no button, so the steps still to do, with their buttons, draw the eye. The footer's button closes it. A step is done because the thing it asks for exists, so the checklist has no Skip and remembers nothing.
|
|
42
|
+
* @words Every string is the product's. The title names the checklist ("Customer setup"); a step's title reads as the thing done ("Plan chosen"); its button names where it goes ("Open billing").
|
|
43
|
+
* @access The ring's button is named by `label`, which says whose checklist and how many steps are done; the ring itself is hidden from assistive technology. The drawer is a dialog named by its title; Escape, × and the footer's button close it and give focus back to the ring. The steps are a list.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ProgressChecklist({ title, description, label, steps, doneLabel, closeLabel, finishLabel, }: ProgressChecklistProps): import("react").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=progress-checklist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-checklist.d.ts","sourceRoot":"","sources":["../../src/components/progress-checklist.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAYhF,uGAAuG;AACvG,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpG,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,wFAAwF;IACxF,IAAI,EAAE,OAAO,CAAC;IACd,0FAA0F;IAC1F,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IAChC,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAuDF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,KAAK,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,GACZ,EAAE,sBAAsB,+BAyDxB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Check, CheckCheck } from "lucide-react";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Button } from "./button.js";
|
|
6
|
+
import { Gauge } from "./gauge.js";
|
|
7
|
+
import { PageCommandButton } from "./page-actions.js";
|
|
8
|
+
import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, } from "./sheet.js";
|
|
9
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
10
|
+
import { cn } from "../lib/utils.js";
|
|
11
|
+
const TILE_TONES = {
|
|
12
|
+
neutral: "bg-card text-muted-foreground ring-1 ring-border ring-inset",
|
|
13
|
+
blue: "bg-info-soft text-info-soft-foreground",
|
|
14
|
+
green: "bg-success-soft text-success-soft-foreground",
|
|
15
|
+
amber: "bg-warning-soft text-warning-soft-foreground",
|
|
16
|
+
purple: "bg-category-purple text-category-purple-foreground",
|
|
17
|
+
teal: "bg-category-teal text-category-teal-foreground",
|
|
18
|
+
pink: "bg-category-pink text-category-pink-foreground",
|
|
19
|
+
};
|
|
20
|
+
function ratio(steps) {
|
|
21
|
+
if (steps.length === 0)
|
|
22
|
+
return 0;
|
|
23
|
+
return (steps.filter((step) => step.done).length / steps.length) * 100;
|
|
24
|
+
}
|
|
25
|
+
function StepCard({ step, doneLabel }) {
|
|
26
|
+
const tileTone = TILE_TONES[step.tone ?? "neutral"];
|
|
27
|
+
return (_jsxs("li", { className: cn("flex min-w-0 items-start gap-3 rounded-sm p-4 ring-1 ring-border ring-inset"), "data-done": step.done || undefined, "data-slot": "checklist-step", children: [_jsx("span", { "aria-hidden": "true", className: cn("inline-flex size-8 shrink-0 items-center justify-center rounded-sm", tileTone), children: _jsx(step.icon, { "aria-hidden": "true", size: 16 }) }), _jsxs("span", { className: "grid min-w-0 flex-1 gap-1", children: [_jsxs("span", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [_jsx("span", { className: "min-w-0 font-medium break-words text-foreground", children: step.title }), step.done ? (_jsxs("span", { className: "inline-flex h-5 items-center gap-1 rounded-full bg-info px-2 text-[11px] leading-5 font-medium text-info-foreground", children: [_jsx(Check, { "aria-hidden": "true", className: "size-3" }), doneLabel] })) : null] }), _jsx("span", { className: "text-body-sm break-words text-muted-foreground", children: step.description }), !step.done && step.action ? (_jsx("span", { className: "pt-2", children: _jsx(PageCommandButton, { command: step.action, size: "sm", variant: "outline" }) })) : null] })] }));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* How far one record is through the steps that make it ready: a blue ring at the end of its row
|
|
31
|
+
* that opens the steps in a drawer at the right edge.
|
|
32
|
+
*
|
|
33
|
+
* @family Status
|
|
34
|
+
* @when “Production Checklist”, the ring at the end of a project's row on Vercel's Projects page, which opens the steps that make a project ready for production. (https://vercel.com/dashboard)
|
|
35
|
+
* Ours: the steps a Customer or a Partner takes before nadicode's work runs for them, each one a fact the Portal can read (company details confirmed, a plan, Nadia connected, an Agent at work), at the end of the record's row.
|
|
36
|
+
* @instead Steps a person follows on a page, one after the other, are `NumberedSteps`; a setup with a wait is `FormDrawer job="steps"`. A ratio with no steps behind it is a `Gauge`. One state of a record is a `StatusBadge`.
|
|
37
|
+
* @behaviour The ring is a 24 px `Gauge` in blue with the double check inside in ink, so the glyph reads at a glance, on a 36 px ghost button whose tooltip names the checklist and how far it is ("Customer setup 3/4"). It opens a drawer from the right: the ring again, the title, one line, then one card per step: its icon on a tile of its tone, its title, one line, and the outline button that goes where the step is done; every card is the same hairline card, and a done step differs only by its blue Done chip after its title, with no button, so the steps still to do, with their buttons, draw the eye. The footer's button closes it. A step is done because the thing it asks for exists, so the checklist has no Skip and remembers nothing.
|
|
38
|
+
* @words Every string is the product's. The title names the checklist ("Customer setup"); a step's title reads as the thing done ("Plan chosen"); its button names where it goes ("Open billing").
|
|
39
|
+
* @access The ring's button is named by `label`, which says whose checklist and how many steps are done; the ring itself is hidden from assistive technology. The drawer is a dialog named by its title; Escape, × and the footer's button close it and give focus back to the ring. The steps are a list.
|
|
40
|
+
*/
|
|
41
|
+
export function ProgressChecklist({ title, description, label, steps, doneLabel, closeLabel, finishLabel, }) {
|
|
42
|
+
const [open, setOpen] = useState(false);
|
|
43
|
+
const value = ratio(steps);
|
|
44
|
+
const done = steps.filter((step) => step.done).length;
|
|
45
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Button, { "aria-label": label, "data-slot": "progress-checklist", onClick: () => setOpen(true), size: "icon", variant: "ghost" }), children: _jsx(Gauge, { "aria-hidden": "true", "aria-label": title, className: "size-6", size: "xs", tone: "info", value: value, children: _jsx(CheckCheck, { className: "text-foreground" }) }) }), _jsxs(TooltipContent, { children: [title, " ", done, "/", steps.length] })] }), _jsx(Sheet, { onOpenChange: setOpen, open: open, children: _jsxs(SheetContent, { closeLabel: closeLabel, side: "right", children: [_jsxs(SheetHeader, { className: "items-center pt-10 text-center", children: [_jsx(Gauge, { "aria-hidden": "true", "aria-label": title, size: "sm", tone: "info", value: value, children: _jsx(CheckCheck, { className: "size-4" }) }), _jsx(SheetTitle, { className: "pt-3", children: title }), _jsx(SheetDescription, { children: description })] }), _jsx("ol", { className: "grid min-h-0 flex-1 content-start gap-3 overflow-y-auto px-nadicode-lg", "data-slot": "checklist-steps", children: steps.map((step) => (_jsx(StepCard, { doneLabel: doneLabel, step: step }, step.id))) }), _jsx(SheetFooter, { children: _jsx(Button, { onClick: () => setOpen(false), children: finishLabel }) })] }) })] }));
|
|
46
|
+
}
|
|
@@ -1,27 +1,67 @@
|
|
|
1
1
|
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const progressIndicatorVariants: (props?: ({
|
|
4
|
-
tone?: "default" | "warning" | "critical" | null | undefined;
|
|
4
|
+
tone?: "default" | "secondary" | "warning" | "info" | "success" | "critical" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
type ProgressTone = NonNullable<VariantProps<typeof progressIndicatorVariants>["tone"]>;
|
|
7
|
+
type ProgressSize = "sm" | "md";
|
|
8
|
+
type ProgressName = {
|
|
9
|
+
"aria-label": string;
|
|
10
|
+
"aria-labelledby"?: never;
|
|
11
|
+
} | {
|
|
12
|
+
"aria-labelledby": string;
|
|
13
|
+
"aria-label"?: never;
|
|
14
|
+
};
|
|
15
|
+
type ProgressStop = {
|
|
16
|
+
value: number;
|
|
17
|
+
/** The stage that ends at this value, in the reader's language: "Build complete". */
|
|
18
|
+
label: string;
|
|
19
|
+
};
|
|
7
20
|
/**
|
|
8
21
|
* A known amount against a real maximum, with its label and value.
|
|
9
22
|
*
|
|
10
23
|
* @family Data
|
|
11
|
-
* @when
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
24
|
+
* @when "Determinate work whose total is knowable, like file uploads, multi-step setup, build steps, or batch deletions." (https://vercel.com/geist/progress)
|
|
25
|
+
* "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)
|
|
26
|
+
* Ours: it always has a `value` and a name, as `aria-label` or as `aria-labelledby` pointing at its
|
|
27
|
+
* `ProgressLabel`, and the type asks for both. `stops` mark genuine stages, each named. `size` is
|
|
28
|
+
* `md` (10 px), or `sm` (4 px) inside a table cell or a row.
|
|
29
|
+
* @instead "For short indeterminate waits (~1–3s), use `Spinner`; for inline copy like `Saving`, use `Loading Dots`." (https://vercel.com/geist/progress)
|
|
30
|
+
* Ours: neither exists; an unknown wait is the waiting line, never a bar with an invented
|
|
31
|
+
* percentage.
|
|
32
|
+
* "For usage against a quota or ratio, use `Gauge`; the circle reads as health, the bar reads as progress." (https://vercel.com/geist/progress)
|
|
33
|
+
* Ours: a run's consumption in a dense spot is a `UsageMeter`. A single figure is a `KpiCard`.
|
|
34
|
+
* @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)
|
|
35
|
+
* Ours: colour sits on the fill alone: the track is always the neutral line colour and the words
|
|
36
|
+
* beside the bar stay neutral. The fill is neutral by default; `tone` is that threshold (amber
|
|
37
|
+
* where the note fires, red past the cap), never derived from the value. Past the maximum the bar
|
|
38
|
+
* fills and turns red, whatever the tone. The fill's end is rounded, and square when `stops` cut
|
|
39
|
+
* the bar. The fill moves only when the reading changes, on `open`; still under reduced motion. The
|
|
40
|
+
* printed value is always the live reading.
|
|
41
|
+
* "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)
|
|
42
|
+
* @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)
|
|
43
|
+
* "Don’t append `successfully` or `complete` once the bar fills; swap to a completion state (toast, success row, redirect)." (https://vercel.com/geist/progress)
|
|
44
|
+
* "For long operations, name the work in the surrounding copy (`Building deployment…`) instead of leaving a bare percentage." (https://vercel.com/geist/progress)
|
|
45
|
+
* Ours: print the work and its unit in `ProgressValue`.
|
|
46
|
+
* @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)
|
|
47
|
+
* "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)
|
|
48
|
+
* Ours: the printed value is live, and the value it announces follows it at most once a second.
|
|
49
|
+
* "Stops accept their own `ariaLabel`; name each one (`Build complete`, `Tests complete`) so the bar is navigable without sight." (https://vercel.com/geist/progress)
|
|
50
|
+
* Ours: a stop's name is its `label`. With `stops`, the stage reached leads the spoken value; a
|
|
51
|
+
* stop is not focusable, because a progressbar's children are presentational.
|
|
16
52
|
*/
|
|
17
|
-
declare function Progress({ className, children, value, min, max, tone, indicatorColor, ...props }: ProgressPrimitive.Root.Props & {
|
|
53
|
+
declare function Progress({ className, children, value, min, max, format, locale, getAriaValueText, tone, size, indicatorColor, stops, ...props }: Omit<ProgressPrimitive.Root.Props, "aria-label" | "aria-labelledby" | "value"> & ProgressName & {
|
|
54
|
+
/** The amount reached, between `min` and `max`; the bar has no indeterminate form. */
|
|
55
|
+
value: number;
|
|
18
56
|
tone?: ProgressTone;
|
|
57
|
+
size?: ProgressSize;
|
|
19
58
|
indicatorColor?: string;
|
|
59
|
+
stops?: readonly ProgressStop[];
|
|
20
60
|
}): import("react").JSX.Element;
|
|
21
61
|
declare function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props): import("react").JSX.Element;
|
|
22
62
|
declare function ProgressIndicator({ className, style, ...props }: ProgressPrimitive.Indicator.Props): import("react").JSX.Element;
|
|
23
63
|
declare function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props): import("react").JSX.Element;
|
|
24
64
|
declare function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props): import("react").JSX.Element;
|
|
25
65
|
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, progressIndicatorVariants, };
|
|
26
|
-
export type { ProgressTone };
|
|
66
|
+
export type { ProgressSize, ProgressTone };
|
|
27
67
|
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,yBAAyB;;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,yBAAyB;;8EAiB9B,CAAC;AAEF,KAAK,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAExF,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,CAAC;AAOhC,KAAK,YAAY,GACb;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAAE,GACnD;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAexD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAkEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAO,EACP,GAAS,EACT,MAAM,EACN,MAAM,EACN,gBAAgB,EAChB,IAAgB,EAChB,IAAW,EACX,cAAc,EACd,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,iBAAiB,GAAG,OAAO,CAAC,GAC/E,YAAY,GAAG;IACb,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;CACjC,+BA+CF;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,+BAc5E;AAMD,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,SAAS,CAAC,KAAK,+BA+B3F;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,+BAQ5E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,+BAQ5E;AAED,OAAO,EACL,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,yBAAyB,GAC1B,CAAC;AACF,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC"}
|