@nadicodeai/ui 12.1.165 → 12.1.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +8 -9
- package/README.md +2 -17
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +2 -1
- package/dist/components/account-menu.d.ts.map +1 -1
- package/dist/components/account-menu.js +5 -3
- package/dist/components/activity-calendar.d.ts.map +1 -1
- package/dist/components/activity-calendar.js +3 -2
- package/dist/components/agent-card.js +1 -1
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +1 -0
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +7 -4
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +3 -3
- package/dist/components/app-mark.js +1 -1
- package/dist/components/avatar.js +8 -8
- package/dist/components/badge.d.ts +11 -16
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/badge.js +7 -43
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb.js +3 -2
- package/dist/components/button.d.ts +5 -21
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +6 -76
- package/dist/components/calendar.d.ts +1 -1
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +3 -3
- package/dist/components/card-row.js +1 -1
- package/dist/components/card.d.ts +4 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +3 -2
- package/dist/components/catalog-drawer.d.ts.map +1 -1
- package/dist/components/catalog-drawer.js +3 -2
- package/dist/components/chart-axis.d.ts.map +1 -1
- package/dist/components/chart-axis.js +0 -2
- package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
- package/dist/components/chart-bar-horizontal.js +16 -14
- package/dist/components/chart-card.d.ts.map +1 -1
- package/dist/components/chart-card.js +0 -1
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +18 -32
- package/dist/components/checkbox.d.ts +3 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +4 -3
- package/dist/components/choicebox.d.ts +5 -5
- package/dist/components/choicebox.d.ts.map +1 -1
- package/dist/components/choicebox.js +6 -5
- package/dist/components/clearable-input.d.ts.map +1 -1
- package/dist/components/clearable-input.js +2 -2
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +4 -2
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +1 -0
- package/dist/components/collection-page.js +1 -1
- package/dist/components/collection-sort.d.ts.map +1 -1
- package/dist/components/collection-sort.js +1 -4
- package/dist/components/collection-toolbar.js +1 -1
- package/dist/components/combobox.js +4 -4
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/confirm-dialog.js +2 -2
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.d.ts +14 -7
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +24 -15
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +2 -2
- package/dist/components/drawer.d.ts +4 -4
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/drawer.js +14 -15
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +9 -5
- package/dist/components/empty-art.js +1 -1
- package/dist/components/empty-state.js +2 -2
- package/dist/components/entry-scene.d.ts.map +1 -1
- package/dist/components/entry-scene.js +2 -3
- package/dist/components/field.js +3 -3
- package/dist/components/file-diff.d.ts.map +1 -1
- package/dist/components/file-diff.js +5 -2
- package/dist/components/footer.d.ts +1 -1
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +3 -3
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +2 -1
- package/dist/components/form-drawer.d.ts +7 -9
- package/dist/components/form-drawer.d.ts.map +1 -1
- package/dist/components/form-drawer.js +5 -5
- package/dist/components/form.d.ts +26 -0
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +29 -0
- package/dist/components/gauge.js +2 -2
- package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/calendar-heatmap.js +15 -13
- package/dist/components/hive-scene.d.ts.map +1 -1
- package/dist/components/hive-scene.js +3 -1
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +1 -1
- package/dist/components/input-group.d.ts +5 -6
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +8 -11
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input-otp.js +2 -2
- package/dist/components/item.d.ts +1 -1
- package/dist/components/item.js +2 -2
- package/dist/components/kbd.d.ts +6 -9
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +7 -3
- package/dist/components/message-notice.js +1 -1
- package/dist/components/middle-truncate.d.ts.map +1 -1
- package/dist/components/middle-truncate.js +1 -0
- package/dist/components/model-identity.d.ts +4 -4
- package/dist/components/model-identity.d.ts.map +1 -1
- package/dist/components/model-identity.js +2 -2
- package/dist/components/model-mark.d.ts.map +1 -1
- package/dist/components/model-mark.js +4 -2
- package/dist/components/multi-select.js +2 -2
- package/dist/components/native-select.d.ts.map +1 -1
- package/dist/components/native-select.js +2 -6
- package/dist/components/notice-banner.js +1 -1
- package/dist/components/object-page.js +2 -2
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +1 -3
- package/dist/components/overview-page.d.ts +1 -1
- package/dist/components/overview-page.d.ts.map +1 -1
- package/dist/components/overview-page.js +2 -1
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +9 -4
- package/dist/components/pairing-code.js +1 -1
- package/dist/components/pending-label.d.ts.map +1 -1
- package/dist/components/pending-label.js +0 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
- package/dist/components/portal-sidebar-frame.js +1 -1
- package/dist/components/product-message.d.ts.map +1 -1
- package/dist/components/product-message.js +1 -0
- package/dist/components/progress-checklist.d.ts.map +1 -1
- package/dist/components/progress-checklist.js +2 -2
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +5 -4
- package/dist/components/radio-group.js +2 -2
- package/dist/components/reading-column.js +1 -1
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +2 -5
- package/dist/components/record-list.d.ts +5 -4
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +31 -17
- package/dist/components/record-sheet.js +1 -1
- package/dist/components/record-time.d.ts.map +1 -1
- package/dist/components/record-time.js +2 -1
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +1 -1
- package/dist/components/row-edit-form.d.ts +2 -1
- package/dist/components/row-edit-form.d.ts.map +1 -1
- package/dist/components/row-edit-form.js +2 -1
- package/dist/components/run-timeline.js +1 -1
- package/dist/components/scope-switcher.js +1 -1
- package/dist/components/segmented-control.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/settings-facts.js +1 -1
- package/dist/components/settings-section.js +1 -1
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/sidebar.d.ts +2 -2
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +16 -18
- package/dist/components/site-menu.d.ts +28 -0
- package/dist/components/site-menu.d.ts.map +1 -0
- package/dist/components/site-menu.js +23 -0
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +2 -1
- package/dist/components/snippet.d.ts +2 -0
- package/dist/components/snippet.d.ts.map +1 -1
- package/dist/components/snippet.js +13 -6
- package/dist/components/sonner.d.ts.map +1 -1
- package/dist/components/sonner.js +3 -4
- package/dist/components/status-badge.d.ts +1 -1
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-card.js +1 -1
- package/dist/components/table-layouts.d.ts +24 -9
- package/dist/components/table-layouts.d.ts.map +1 -1
- package/dist/components/table-layouts.js +27 -10
- package/dist/components/table.js +4 -4
- package/dist/components/tabs-nav.d.ts +52 -0
- package/dist/components/tabs-nav.d.ts.map +1 -0
- package/dist/components/tabs-nav.js +95 -0
- package/dist/components/tabs.d.ts +2 -56
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +2 -91
- package/dist/components/text-link.d.ts +1 -2
- package/dist/components/text-link.d.ts.map +1 -1
- package/dist/components/text-link.js +1 -2
- package/dist/components/textarea.d.ts +5 -2
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +12 -4
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +4 -0
- package/dist/components/toggle-group.d.ts +3 -1
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +3 -6
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +12 -12
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +9 -9
- package/dist/components/trend-badge.js +2 -2
- package/dist/components/update-card.js +1 -1
- package/dist/components/usage-meter.d.ts +1 -1
- package/dist/components/usage-meter.d.ts.map +1 -1
- package/dist/components/usage-meter.js +9 -7
- package/dist/components/waiting-line.js +1 -1
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -7
- package/dist/internal/agent-orb-motion.d.ts +4 -1
- package/dist/internal/agent-orb-motion.d.ts.map +1 -1
- package/dist/internal/agent-orb-motion.js +9 -7
- package/dist/internal/agent-orb.d.ts +4 -1
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +7 -1
- package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
- package/dist/internal/assistant-ui/attachment.js +15 -15
- package/dist/internal/assistant-ui/follow-up-suggestions.js +1 -1
- package/dist/internal/assistant-ui/markdown-text.js +26 -25
- package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
- package/dist/internal/assistant-ui/reasoning.js +13 -16
- package/dist/internal/assistant-ui/thread.d.ts.map +1 -1
- package/dist/internal/assistant-ui/thread.js +22 -16
- package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-fallback.js +29 -21
- package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
- package/dist/internal/assistant-ui/tool-group.js +6 -7
- package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
- package/dist/internal/badge-frame.d.ts +15 -0
- package/dist/internal/badge-frame.d.ts.map +1 -0
- package/dist/internal/badge-frame.js +44 -0
- package/dist/internal/button-classes.d.ts +20 -0
- package/dist/internal/button-classes.d.ts.map +1 -0
- package/dist/internal/button-classes.js +74 -0
- package/dist/internal/catalog-list.d.ts.map +1 -1
- package/dist/internal/catalog-list.js +8 -4
- package/dist/internal/collection-rail.js +3 -3
- package/dist/internal/form-drawer-frame.d.ts +10 -0
- package/dist/internal/form-drawer-frame.d.ts.map +1 -0
- package/dist/internal/form-drawer-frame.js +9 -0
- package/dist/internal/form-submit.d.ts +2 -1
- package/dist/internal/form-submit.d.ts.map +1 -1
- package/dist/internal/settings-save.d.ts.map +1 -1
- package/dist/internal/settings-save.js +4 -2
- package/dist/internal/status-mark.d.ts.map +1 -1
- package/dist/internal/status-mark.js +4 -1
- package/dist/internal/tab-row.d.ts +10 -0
- package/dist/internal/tab-row.d.ts.map +1 -0
- package/dist/internal/tab-row.js +2 -0
- package/dist/internal/table-compact-line.d.ts +1 -1
- package/dist/internal/table-compact-line.d.ts.map +1 -1
- package/dist/internal/table-compact-line.js +1 -1
- package/dist/internal/tooltip-content-frame.d.ts +14 -0
- package/dist/internal/tooltip-content-frame.d.ts.map +1 -0
- package/dist/internal/tooltip-content-frame.js +11 -0
- package/dist/lib/css-variables.d.ts +8 -0
- package/dist/lib/css-variables.d.ts.map +1 -0
- package/dist/lib/css-variables.js +4 -0
- package/dist/lib/merge-tokens.generated.js +1 -1
- package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/lib/use-copy-to-clipboard.js +1 -2
- package/dist/showcase/samples.js +1 -1
- package/dist/showcase/specimens/choices.d.ts.map +1 -1
- package/dist/showcase/specimens/choices.js +3 -2
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +7 -5
- package/dist/showcase/specimens/data.d.ts.map +1 -1
- package/dist/showcase/specimens/data.js +1 -1
- package/dist/showcase/specimens/feedback.d.ts.map +1 -1
- package/dist/showcase/specimens/feedback.js +1 -2
- package/dist/showcase/specimens/index.d.ts +2 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.d.ts +1 -0
- package/dist/showcase/specimens/inputs.d.ts.map +1 -1
- package/dist/showcase/specimens/inputs.js +5 -2
- package/dist/showcase/specimens/menus.d.ts +1 -0
- package/dist/showcase/specimens/menus.d.ts.map +1 -1
- package/dist/showcase/specimens/menus.js +7 -2
- package/dist/showcase/specimens/navigation.d.ts.map +1 -1
- package/dist/showcase/specimens/navigation.js +6 -5
- package/dist/showcase/specimens/status.d.ts.map +1 -1
- package/dist/showcase/specimens/status.js +4 -4
- 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 +40 -18
- package/dist/standalone/index.js +2 -2
- package/dist/standalone/orb-page.js +10 -8
- package/dist/styles/components.css +14 -1
- package/package.json +32 -33
- package/dist/eslint/index.js +0 -224
- package/dist/eslint/rules/badge-is-static-label.js +0 -93
- package/dist/eslint/rules/button-icon-slot.js +0 -102
- package/dist/eslint/rules/button-link-for-navigation.js +0 -146
- package/dist/eslint/rules/button-no-aria-label-with-text.js +0 -75
- package/dist/eslint/rules/button-type-roles-only-in-buttons.js +0 -83
- package/dist/eslint/rules/choice-control-has-a-name.js +0 -98
- package/dist/eslint/rules/choice-group-in-fieldset.js +0 -86
- package/dist/eslint/rules/command-shortcut-single-owner.js +0 -118
- package/dist/eslint/rules/confirm-dialog-words.js +0 -63
- package/dist/eslint/rules/data-table-one-unsized-column.js +0 -96
- package/dist/eslint/rules/destructive-action-placement.js +0 -69
- package/dist/eslint/rules/disabled-choice-says-why.js +0 -71
- package/dist/eslint/rules/disabled-control-appearance.js +0 -75
- package/dist/eslint/rules/ellipsis-opens-a-dialog.js +0 -110
- package/dist/eslint/rules/empty-state-owner.js +0 -145
- package/dist/eslint/rules/input-group-owners.js +0 -155
- package/dist/eslint/rules/jsx-class-utility.js +0 -200
- package/dist/eslint/rules/kbd-children-no-modifier-text.js +0 -128
- package/dist/eslint/rules/literal-text.js +0 -41
- package/dist/eslint/rules/menu-owner.js +0 -75
- package/dist/eslint/rules/middle-truncate-placement.js +0 -69
- package/dist/eslint/rules/no-app-feature-component.js +0 -100
- package/dist/eslint/rules/no-bare-button-label.js +0 -55
- package/dist/eslint/rules/no-choice-control-wrapper.js +0 -97
- package/dist/eslint/rules/no-comment.js +0 -77
- package/dist/eslint/rules/no-control-in-read-only-surface.js +0 -106
- package/dist/eslint/rules/no-decorative-icon.js +0 -164
- package/dist/eslint/rules/no-deprecated-zod-api.js +0 -215
- package/dist/eslint/rules/no-global-patch.js +0 -115
- package/dist/eslint/rules/no-hand-built-busy.js +0 -104
- package/dist/eslint/rules/no-hand-built-theme-picker.js +0 -144
- package/dist/eslint/rules/no-hand-built-tile.js +0 -41
- package/dist/eslint/rules/no-hand-formatted-date.js +0 -87
- package/dist/eslint/rules/no-hand-stacked-avatars.js +0 -67
- package/dist/eslint/rules/no-nested-collapse.js +0 -60
- package/dist/eslint/rules/no-package-component-redefinition.js +0 -175
- package/dist/eslint/rules/no-search-in-form.js +0 -47
- package/dist/eslint/rules/no-shadcn-appearance-override.js +0 -305
- package/dist/eslint/rules/no-shell-prompt-in-snippet.js +0 -74
- package/dist/eslint/rules/no-stock-error-words.js +0 -56
- package/dist/eslint/rules/no-subject-derived-expectation.js +0 -183
- package/dist/eslint/rules/no-tooltip-around-labelled-field.js +0 -72
- package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +0 -57
- package/dist/eslint/rules/no-write-in-subscription.js +0 -140
- package/dist/eslint/rules/one-submenu-level.js +0 -43
- package/dist/eslint/rules/one-toast-per-flow.js +0 -91
- package/dist/eslint/rules/option-count.js +0 -167
- package/dist/eslint/rules/page-command-link-not-render.js +0 -43
- package/dist/eslint/rules/page-composition.js +0 -232
- package/dist/eslint/rules/progress-needs-name.js +0 -57
- package/dist/eslint/rules/rendered-import.js +0 -121
- package/dist/eslint/rules/server-action-discipline.js +0 -233
- package/dist/eslint/rules/settings-limit-in-footer.js +0 -94
- package/dist/eslint/rules/skeleton-in-region.js +0 -80
- package/dist/eslint/rules/sortable-heading-uses-sort.js +0 -79
- package/dist/eslint/rules/table-cell-inset-owner.js +0 -107
- package/dist/eslint/rules/tabs-selection-is-controlled.js +0 -47
- package/dist/eslint/rules/test-files-from-one-definition.js +0 -67
- package/dist/eslint/rules/tooltip-only-arrow.js +0 -38
- package/dist/eslint/rules/tooltip-trigger-accessible-name.js +0 -114
- package/dist/eslint/rules/workspace-declares-imports.js +0 -163
- package/dist/eslint/strict-design-system.js +0 -250
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-list.d.ts","sourceRoot":"","sources":["../../src/components/record-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAiB,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAEzE,OAAO,E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AGG;IACH,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IACxE,kDAAkD;IAClD,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC;IACvE,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IACxF,iFAAiF;IACjF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,UAAU,GAAG,IAAI,CAAC;IAC/C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,OAAO,EAAE,GAAG,SAAS,WAAW,IAAI,IAAI,CACpF,eAAe,CAAC,OAAO,CAAC,EACxB,GAAG,CACJ,CAAC;AAoVF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,sCAwClF"}
|
|
@@ -30,16 +30,22 @@ const BUTTON_ICON_GAP = 3;
|
|
|
30
30
|
const EXTERNAL_ARROW = 14;
|
|
31
31
|
const CHEVRON = 16;
|
|
32
32
|
const WIDEST_LABEL_CHARACTER = 8;
|
|
33
|
-
function shownCommands(list, record) {
|
|
33
|
+
function shownCommands(list, record, { compact }) {
|
|
34
34
|
const menu = list.menu?.(record);
|
|
35
35
|
const commands = menu?.commands ?? [];
|
|
36
36
|
const own = list.command?.(record);
|
|
37
|
-
const menuButton = own || list.layout === "line" ? undefined : soleMenuButton(commands);
|
|
37
|
+
const menuButton = own || compact || list.layout === "line" ? undefined : soleMenuButton(commands);
|
|
38
38
|
const buttons = own ? [own].flat() : menuButton ? [menuButton] : [];
|
|
39
39
|
const state = list.state?.(record) ?? null;
|
|
40
40
|
const dots = menu && commands.length > 0 && !menuButton ? menu : undefined;
|
|
41
41
|
const chevron = !dots && !state && Boolean(list.open?.href(record));
|
|
42
|
-
return {
|
|
42
|
+
return {
|
|
43
|
+
besideDots: compact ? [] : buttons,
|
|
44
|
+
underName: compact ? buttons : [],
|
|
45
|
+
state,
|
|
46
|
+
dots,
|
|
47
|
+
chevron,
|
|
48
|
+
};
|
|
43
49
|
}
|
|
44
50
|
function buttonRoom(command, size) {
|
|
45
51
|
const longerLabel = Math.max(command.label.length, command.pendingLabel?.length ?? 0);
|
|
@@ -49,9 +55,9 @@ function buttonRoom(command, size) {
|
|
|
49
55
|
longerLabel * WIDEST_LABEL_CHARACTER);
|
|
50
56
|
}
|
|
51
57
|
function commandsRoom(list, record) {
|
|
52
|
-
const {
|
|
58
|
+
const { besideDots, state, dots, chevron } = shownCommands(list, record, { compact: false });
|
|
53
59
|
const widths = [
|
|
54
|
-
...
|
|
60
|
+
...besideDots.map((command) => buttonRoom(command, "sm")),
|
|
55
61
|
...(state?.message.actions ?? []).map((action) => buttonRoom(action, "default")),
|
|
56
62
|
];
|
|
57
63
|
if (widths.length === 0)
|
|
@@ -75,6 +81,7 @@ const SELECT_SIZE = 40;
|
|
|
75
81
|
const ShownList = createContext(undefined);
|
|
76
82
|
function useShownList() {
|
|
77
83
|
// SAFETY: only RecordList provides ShownList, with its own props, around the rows of that same RecordList<TRecord>.
|
|
84
|
+
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- a React context cannot carry a type parameter; RecordList<TRecord> is ShownList's only provider and passes its own props.
|
|
78
85
|
return useContext(ShownList);
|
|
79
86
|
}
|
|
80
87
|
/*
|
|
@@ -87,8 +94,17 @@ function NameCell({ row }) {
|
|
|
87
94
|
const list = useShownList();
|
|
88
95
|
const shown = list.name(row.original);
|
|
89
96
|
const state = list.state?.(row.original);
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
return (_jsx(RecordIdentity, { detail: state ? (_jsx("span", { className: "block wrap-break-word whitespace-normal", children: _jsx(RowMessageLine, { state: state }) })) : (shown.detail), mark: shown.mark, name: shown.name, wraps: list.wraps }));
|
|
98
|
+
}
|
|
99
|
+
function UnderName({ record }) {
|
|
100
|
+
const list = useShownList();
|
|
101
|
+
const compact = useTableLaidOutCompact();
|
|
102
|
+
const state = list.state?.(record);
|
|
103
|
+
const nextSteps = compact && state?.message.actions.length ? state : null;
|
|
104
|
+
const { underName } = shownCommands(list, record, { compact });
|
|
105
|
+
if (!nextSteps && underName.length === 0)
|
|
106
|
+
return null;
|
|
107
|
+
return (_jsxs("span", { className: "flex flex-wrap gap-2 pt-2 pl-12 whitespace-normal", "data-slot": "record-under-name", children: [nextSteps ? _jsx(RowMessageActions, { state: nextSteps }) : null, underName.map((command) => (_jsx(PageCommandButton, { command: command, size: "sm", variant: "outline" }, command.label)))] }));
|
|
92
108
|
}
|
|
93
109
|
function SelectCell({ row }) {
|
|
94
110
|
const select = useShownList().select;
|
|
@@ -136,13 +152,14 @@ function ChecklistCell({ row }) {
|
|
|
136
152
|
function CommandsCell({ row }) {
|
|
137
153
|
const list = useShownList();
|
|
138
154
|
const record = row.original;
|
|
139
|
-
const { buttons, state, dots, chevron } = shownCommands(list, record);
|
|
140
|
-
// On a card too narrow for the row's columns the next steps stand under the message instead.
|
|
141
155
|
const laidOutCompact = useTableLaidOutCompact();
|
|
156
|
+
const { besideDots, state, dots, chevron } = shownCommands(list, record, {
|
|
157
|
+
compact: laidOutCompact,
|
|
158
|
+
});
|
|
142
159
|
const end = dots ? (_jsx(ActionMenu, { commands: dots.commands, label: dots.label, record: list.name(record).name })) : chevron ? (_jsx(ChevronRight, { "aria-hidden": "true", className: "size-4 text-muted-foreground" })) : null;
|
|
143
|
-
if (
|
|
160
|
+
if (besideDots.length === 0 && !state && !end)
|
|
144
161
|
return null;
|
|
145
|
-
return (_jsxs("div", { className: "flex items-center justify-end gap-2", children: [
|
|
162
|
+
return (_jsxs("div", { className: "flex items-center justify-end gap-2", children: [besideDots.length > 0 ? (_jsx("div", { className: "flex min-w-0 justify-end gap-2 *:max-w-full *:min-w-0 *:shrink [&>*>span:not([data-icon])]:truncate", children: besideDots.map((command) => (_jsx(PageCommandButton, { command: command, size: "sm", variant: "outline" }, command.label))) })) : null, state && !laidOutCompact ? _jsx(RowMessageActions, { state: state }) : null, end] }));
|
|
146
163
|
}
|
|
147
164
|
function LoadingRecords({ label }) {
|
|
148
165
|
return (_jsx("div", { "aria-busy": "true", "aria-label": label, className: "divide-y divide-border", role: "status", children: Array.from({ length: 3 }, (_, index) => (_jsxs("div", { className: "flex items-center gap-4 px-2 py-4", children: [_jsx(Skeleton, { className: "shrink-0", height: 32, width: 32 }), _jsxs("div", { className: "grid min-w-0 gap-2", children: [_jsx(Skeleton, { className: "max-w-full", height: 16, width: 160 }), _jsx(Skeleton, { className: "max-w-full", height: 16, width: 224 })] }), _jsx(Skeleton, { className: "ml-auto", height: 16, width: 92 })] }, index))) }));
|
|
@@ -225,7 +242,7 @@ function recordColumns(props) {
|
|
|
225
242
|
});
|
|
226
243
|
}
|
|
227
244
|
const { menu, command, state } = props;
|
|
228
|
-
const someRecordHasCommands = props.records.some((record) => menu?.(record)
|
|
245
|
+
const someRecordHasCommands = props.records.some((record) => menu?.(record) ?? command?.(record) ?? state?.(record));
|
|
229
246
|
if (props.open || someRecordHasCommands) {
|
|
230
247
|
columns.push({
|
|
231
248
|
id: "commands",
|
|
@@ -238,9 +255,6 @@ function recordColumns(props) {
|
|
|
238
255
|
}
|
|
239
256
|
function RecordRows(props) {
|
|
240
257
|
const columns = recordColumns(props);
|
|
241
|
-
const layout = {};
|
|
242
|
-
if (props.layout === "line")
|
|
243
|
-
layout.compactLayout = "narrow";
|
|
244
258
|
const menu = props.menu;
|
|
245
259
|
const table = {
|
|
246
260
|
columns,
|
|
@@ -256,8 +270,8 @@ function RecordRows(props) {
|
|
|
256
270
|
getRowId: props.getId,
|
|
257
271
|
primaryColumnId: "name",
|
|
258
272
|
primaryColumns: ["select", "name", "checklist", "commands"],
|
|
259
|
-
...layout,
|
|
260
273
|
rowEditor: props.editor ? { rowId: props.editor.id, render: props.editor.render } : undefined,
|
|
274
|
+
rowUnderName: (record) => _jsx(UnderName, { record: record }),
|
|
261
275
|
tableLabel: props.label,
|
|
262
276
|
};
|
|
263
277
|
return props.open ? (_jsx(EntityTable, { ...table, renderRowLink: props.open.renderLink, rowHref: props.open.href, rowLabel: props.open.label })) : (_jsx(EntityTable, { ...table }));
|
|
@@ -273,7 +287,7 @@ function RecordRows(props) {
|
|
|
273
287
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
274
288
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
275
289
|
* Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.
|
|
276
|
-
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card
|
|
290
|
+
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu of one command that is not destructive, with no row command, is that command's button, except in a `line` row, which keeps it in the three dots as Vercel's project row does, and the column is as wide as the widest such button, so its label is never cut. The commands never take the name's room: once the row is compact, its commands column holds only the three dots or the chevron, a sole menu command stays in the dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Status is only for the exception, empty for the usual record, and its column stands only while a record in the list shows one, so the name and its line keep the room; the commands column likewise stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, and a row that only opens ends in a muted chevron; a row that opens nothing never reacts to hover. With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list ("Deployment retention is enabled. Learn more", *View recently deleted*). Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message.
|
|
277
291
|
* “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state)
|
|
278
292
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card.
|
|
279
293
|
* “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
|
|
@@ -15,5 +15,5 @@ import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetT
|
|
|
15
15
|
* @access A dialog named by its title, not `modal`: no scrim, and focus stays inside it. Escape and Close close it. Focus returns to the row it opened from (`finalFocus`) after every close but a mouse, touch or pen one, as `Sheet` does by default; a caller that passes its own `finalFocus` decides. The payload is a read-only text area named by its label.
|
|
16
16
|
*/
|
|
17
17
|
export function RecordSheet({ open, onOpenChange, title, description, closeLabel, facts, code, footer, finalFocus, }) {
|
|
18
|
-
return (_jsx(Sheet, { onOpenChange: onOpenChange, open: open, children: _jsxs(SheetContent, { className: "max-sm:data-[side=right]:left-nadicode-sm max-sm:data-[side=right]:w-auto data-[side=right]:sm:w-[420px] data-[side=right]:sm:max-w-[calc(100%-var(--nc-lg))]", closeLabel: closeLabel, finalFocus: finalFocus, side: "right", children: [_jsxs(SheetHeader, { className: "pr-12", children: [_jsx(SheetTitle, { className: "break-
|
|
18
|
+
return (_jsx(Sheet, { onOpenChange: onOpenChange, open: open, children: _jsxs(SheetContent, { className: "max-sm:data-[side=right]:left-nadicode-sm max-sm:data-[side=right]:w-auto data-[side=right]:sm:w-[420px] data-[side=right]:sm:max-w-[calc(100%-var(--nc-lg))]", closeLabel: closeLabel, finalFocus: finalFocus, side: "right", children: [_jsxs(SheetHeader, { className: "pr-12", children: [_jsx(SheetTitle, { className: "wrap-break-word", children: title }), description ? _jsx(SheetDescription, { children: description }) : null] }), _jsxs("div", { className: "grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)] content-start gap-nadicode-md overflow-y-auto px-nadicode-lg pb-nadicode-lg", "data-slot": "record-sheet-body", children: [_jsx(ObjectFacts, { facts: facts }), code ? (_jsx(CodeBlock, { code: code.value, copiedLabel: code.copiedLabel, copyFailedLabel: code.copyFailedLabel, copyLabel: code.copyLabel, label: code.label })) : null] }), footer ? (_jsx(SheetFooter, { className: "flex-row justify-end", "data-slot": "record-sheet-footer", children: _jsx(PageCommandButton, { command: footer, variant: "outline" }) })) : null] }) }));
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-time.d.ts","sourceRoot":"","sources":["../../src/components/record-time.tsx"],"names":[],"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,sCA+EhD"}
|
|
@@ -44,6 +44,7 @@ function useReadingTime(now, counted) {
|
|
|
44
44
|
const hydrated = useHydrated();
|
|
45
45
|
if (now !== undefined || !counted)
|
|
46
46
|
return now;
|
|
47
|
+
// oxlint-disable-next-line react/purity -- after hydration the relative time is the clock's at render, which is what it shows; before it, the server's render time (#4964)
|
|
47
48
|
if (hydrated)
|
|
48
49
|
return Date.now();
|
|
49
50
|
const renderedAt = use(RenderedAt);
|
|
@@ -70,7 +71,7 @@ function exactMoment(at, locale, timeZone) {
|
|
|
70
71
|
}
|
|
71
72
|
/** The moment `at` names, or null when it names none, such as an empty or malformed time. */
|
|
72
73
|
export function recordDate(at) {
|
|
73
|
-
if (at
|
|
74
|
+
if (at === null || at === undefined)
|
|
74
75
|
return null;
|
|
75
76
|
const date = at instanceof Date ? at : new Date(at);
|
|
76
77
|
return Number.isNaN(date.getTime()) ? null : date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D;;;;;;;;;GASG;AACH,iBAAS,mBAAmB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,+
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D;;;;;;;;;GASG;AACH,iBAAS,mBAAmB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,+BAQlF;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,+BAElE;AAED,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,cAAc,GAAG;IACrC,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,+BAaA;AAED,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { cn } from "../lib/utils.js";
|
|
|
13
13
|
* @access The handle is the resizable library's focusable `separator` with its value, named by the `aria-label` the type requires; the arrow keys move it and Home and End take it to the ends of its range.
|
|
14
14
|
*/
|
|
15
15
|
function ResizablePanelGroup({ className, ...props }) {
|
|
16
|
-
return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex
|
|
16
|
+
return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex size-full aria-[orientation=vertical]:flex-col", className), ...props }));
|
|
17
17
|
}
|
|
18
18
|
function ResizablePanel({ ...props }) {
|
|
19
19
|
return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import { Form } from "./form.js";
|
|
2
3
|
import { type FormSubmit } from "../internal/form-submit.js";
|
|
3
|
-
export type RowEditFormProps = Omit<ComponentProps<
|
|
4
|
+
export type RowEditFormProps = Omit<ComponentProps<typeof Form>, "children" | "className"> & {
|
|
4
5
|
cancelLabel: string;
|
|
5
6
|
/** Closes the form and keeps the record as it was. */
|
|
6
7
|
onCancel: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row-edit-form.d.ts","sourceRoot":"","sources":["../../src/components/row-edit-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"row-edit-form.d.ts","sourceRoot":"","sources":["../../src/components/row-edit-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,wBAAwB,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IAC3F,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gGAAgG;IAChG,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,gBAAgB,+BAqBlB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
|
+
import { Form } from "./form.js";
|
|
4
5
|
import { WaitingLine } from "./waiting-line.js";
|
|
5
6
|
import { FormSubmitButton } from "../internal/form-submit.js";
|
|
6
7
|
/**
|
|
@@ -15,5 +16,5 @@ import { FormSubmitButton } from "../internal/form-submit.js";
|
|
|
15
16
|
*/
|
|
16
17
|
export function RowEditForm({ cancelLabel, onCancel, submit, notice, hint, children, ...form }) {
|
|
17
18
|
const pending = submit.pending === true;
|
|
18
|
-
return (_jsxs(
|
|
19
|
+
return (_jsxs(Form, { "aria-busy": pending || undefined, "data-slot": "row-edit-form", ...form, children: [_jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)] gap-4 px-nadicode-md pt-nadicode-sm pb-nadicode-md", children: [children, notice ? _jsx("div", { "data-slot": "row-edit-form-notice", children: notice }) : null] }), _jsxs("div", { className: "relative flex flex-wrap items-center justify-end gap-3 border-t border-border bg-recessed px-nadicode-md py-3", "data-slot": "row-edit-form-footer", children: [hint ? _jsx("div", { className: "mr-auto min-w-0", children: hint }) : null, _jsx(Button, { disabled: pending, onClick: onCancel, type: "button", variant: "outline", children: cancelLabel }), _jsx(FormSubmitButton, { submit: submit }), _jsx(WaitingLine, { className: "absolute inset-x-0 top-0", decorative: true, waiting: pending })] })] }));
|
|
19
20
|
}
|
|
@@ -12,5 +12,5 @@ import { cn } from "../lib/utils.js";
|
|
|
12
12
|
* @access An ordered list; the current step carries `aria-current="step"`; the rail and nodes are hidden from assistive technology, and so is the dash of a step that has not happened.
|
|
13
13
|
*/
|
|
14
14
|
export function RunTimeline({ className, steps, ...props }) {
|
|
15
|
-
return (_jsx("ol", { "data-slot": "run-timeline", className: cn("nc-run-timeline", className), ...props, children: steps.map((step) => (_jsxs("li", { "aria-current": step.progress === "current" ? "step" : undefined, className: "nc-run-timeline-step", "data-progress": step.progress, "data-slot": "run-timeline-step", children: [_jsx("span", { "aria-hidden": "true", className: "nc-run-timeline-node" }), _jsxs("div", { className: "nc-run-timeline-content", children: [_jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [_jsx("span", { className: "nc-run-timeline-label", children: step.label }), _jsx("span", { className: "nc-run-timeline-title", children: step.title })] }), step.detail
|
|
15
|
+
return (_jsx("ol", { "data-slot": "run-timeline", className: cn("nc-run-timeline", className), ...props, children: steps.map((step) => (_jsxs("li", { "aria-current": step.progress === "current" ? "step" : undefined, className: "nc-run-timeline-step", "data-progress": step.progress, "data-slot": "run-timeline-step", children: [_jsx("span", { "aria-hidden": "true", className: "nc-run-timeline-node" }), _jsxs("div", { className: "nc-run-timeline-content", children: [_jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [_jsx("span", { className: "nc-run-timeline-label", children: step.label }), _jsx("span", { className: "nc-run-timeline-title", children: step.title })] }), step.detail !== null && step.detail !== undefined ? (_jsx("div", { className: "nc-run-timeline-detail", children: step.detail })) : null, step.status ? (_jsx(StatusBadge, { className: "mt-1.5", label: step.status.label, tone: step.status.tone })) : null] }), _jsx("div", { className: "shrink-0 text-label-sm leading-5 whitespace-nowrap tabular-nums text-muted-foreground", children: step.time ?? _jsx("span", { "aria-hidden": "true", children: "\u2014" }) })] }, step.id))) }));
|
|
16
16
|
}
|
|
@@ -38,7 +38,7 @@ export function ScopeSwitcher({ value, options, onValueChange, copy, create, var
|
|
|
38
38
|
const switchable = options.length > 1 || create !== undefined;
|
|
39
39
|
return (_jsxs("span", { "data-slot": "scope-switcher", className: "flex min-w-0 items-center gap-2", children: [_jsx("span", { "aria-hidden": switchable ? "true" : undefined, className: cn("text-xs font-medium text-muted-foreground", variant === "navigation" && "sr-only"), children: copy.label }), switchable ? (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsxs(PopoverTrigger, { render: _jsx(Button, { variant: "ghost", className: cn("min-w-0 max-w-64 shrink", variant === "navigation" &&
|
|
40
40
|
"h-auto max-w-full py-1 md:h-control-height md:max-w-64 md:py-0"), prefix: current?.mark ? _jsx("span", { "aria-hidden": "true", children: current.mark }) : undefined, suffix: _jsx(ChevronsUpDown, { "aria-hidden": "true" }) }), children: [_jsxs("span", { className: "sr-only", children: [copy.label, ":"] }), " ", _jsx("span", { className: cn(variant === "navigation"
|
|
41
|
-
? "whitespace-normal break-
|
|
41
|
+
? "whitespace-normal wrap-break-word text-left md:truncate"
|
|
42
42
|
: "truncate"), children: currentLabel })] }), _jsxs(PopoverContent, { align: "start", className: cn("w-72 max-w-[calc(100vw-2rem)] p-0", variant === "navigation" && "w-96"), initialFocus: search, children: [_jsx(PopoverTitle, { className: "sr-only", children: copy.label }), _jsxs(Command, { label: copy.search, resultCount: copy.results, children: [_jsx(CommandInput, { ref: search, "aria-label": copy.search, placeholder: copy.search }), _jsxs(CommandList, { label: copy.label, children: [_jsx(CommandEmpty, { children: copy.empty }), groups.map(([group, items]) => (_jsx(CommandGroup, { heading: group, children: items.map((option) => (_jsxs(CommandItem, { value: option.value, keywords: [
|
|
43
43
|
option.label,
|
|
44
44
|
...(option.group ? [option.group] : []),
|
|
@@ -18,7 +18,7 @@ const segmentedControlVariants = cva("max-w-full auto-cols-[minmax(max-content,1
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
|
-
const segmentedItemVariants = cva("relative flex cursor-pointer items-center justify-center gap-1.5 after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-
|
|
21
|
+
const segmentedItemVariants = cva("relative flex cursor-pointer items-center justify-center gap-1.5 after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-1/2 text-muted-foreground nc-transition-paint select-none not-data-disabled:hover:text-foreground data-checked:bg-selection data-checked:text-selection-foreground data-checked:nc-elevation-resting data-disabled:cursor-not-allowed data-disabled:text-muted-foreground/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [@media(hover:hover)_and_(pointer:fine)]:after:hidden", {
|
|
22
22
|
variants: {
|
|
23
23
|
size: {
|
|
24
24
|
sm: "h-nadicode-control-height-xs rounded-xs-plus text-button [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -4,7 +4,7 @@ import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
6
|
import { anchoredOverlayMotion } from "../lib/motion.js";
|
|
7
|
-
import { buttonVariants } from "
|
|
7
|
+
import { buttonVariants } from "../internal/button-classes.js";
|
|
8
8
|
import { FieldFrame } from "../internal/field-frame.js";
|
|
9
9
|
import { fieldDisabled, fieldOpen, fieldRing, fieldStates, } from "../internal/input-box.js";
|
|
10
10
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
@@ -39,6 +39,6 @@ export function SettingsFactsSection({ action, presentation = "card", descriptio
|
|
|
39
39
|
return (_jsxs(Card, { render: _jsx("section", {}), ...props, "aria-labelledby": headingId, surface: surface, size: size, className: "min-w-0", children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: _jsx(Heading, { id: headingId, tabIndex: -1, children: title }) }), description ? _jsx(CardDescription, { children: description }) : null, action ? _jsx(CardAction, { children: action }) : null] }), _jsx(CardContent, { children: _jsx(ObjectFacts, { facts: facts.map((fact) => ({
|
|
40
40
|
label: fact.label,
|
|
41
41
|
block: fact.block,
|
|
42
|
-
value: fact.value
|
|
42
|
+
value: fact.value === null || fact.value === undefined || fact.value === "" ? (_jsx(TableValue, { missingLabel: missingValueLabel, value: null })) : (fact.value),
|
|
43
43
|
})) }) }), _jsx(FooterStrip, { hint: footerHint, hintSlot: "settings-facts-hint", children: footer })] }));
|
|
44
44
|
}
|
|
@@ -28,7 +28,7 @@ function SettingsSection({ title, headingLevel = 2, description, actions, tone,
|
|
|
28
28
|
const titleId = React.useId();
|
|
29
29
|
const Heading = headingLevel === 3 ? "h3" : "h2";
|
|
30
30
|
const locked = lockedReason !== undefined;
|
|
31
|
-
const fields = children
|
|
31
|
+
const fields = children !== null && children !== undefined ? (_jsx(CardContent, { children: _jsx(FieldGroup, { "data-slot": "settings-section-fields", inert: locked, className: cn(locked && "**:text-muted-foreground"), children: children }) })) : null;
|
|
32
32
|
return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section", "data-tone": tone, "data-locked": locked || undefined }), className: cn("min-w-0", tone && toneClassNames[tone], locked && "cursor-not-allowed *:data-[slot=card-footer]:cursor-default", className), children: [_jsxs(CardHeader, { narrowAction: "title-row", className: cn(!title && "has-data-[slot=card-description]:grid-rows-none"), children: [title ? (_jsx(CardTitle, { children: _jsx(Heading, { id: titleId, children: title }) })) : null, _jsx(CardDescription, { children: description }), actions ? _jsx(CardAction, { children: actions }) : null] }), save ? (_jsx(SettingsSaveForm, { save: save, titleId: titleId, children: fields })) : (_jsxs(_Fragment, { children: [fields, _jsx(FooterStrip, { hint: locked ? lockedReason : footerHint, hintSlot: "settings-section-hint", children: locked ? unlock : footer })] }))] }));
|
|
33
33
|
}
|
|
34
34
|
function controlPropsOf({ id, info, error, invalid, disabled, required, }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
3
|
-
type SheetProps = Omit<SheetPrimitive.Root.Props, "modal" | "disablePointerDismissal"> & {
|
|
3
|
+
type SheetProps = Omit<SheetPrimitive.Root.Props, "modal" | "disablePointerDismissal" | "defaultOpen"> & {
|
|
4
4
|
/**
|
|
5
5
|
* The sheet owns the screen: the scrim dims the page and the page ignores the pointer. Without it
|
|
6
6
|
* the page behind stays usable and toasts stay reachable.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAUjE,KAAK,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAUjE,KAAK,UAAU,GAAG,IAAI,CACpB,cAAc,CAAC,IAAI,CAAC,KAAK,EACzB,OAAO,GAAG,yBAAyB,GAAG,aAAa,CACpD,GAAG;IACF;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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/dist/components/sheet.js
CHANGED
|
@@ -61,7 +61,7 @@ function SheetOverlay({ className, ...props }) {
|
|
|
61
61
|
}
|
|
62
62
|
function SheetContent({ className, children, side = "right", noOverlay = false, closeLabel, finalFocus = returnFocusUnlessPointer, ...props }) {
|
|
63
63
|
const modal = React.useContext(SheetModalContext);
|
|
64
|
-
return (_jsxs(SheetPortal, { children: [modal && !noOverlay ? _jsx(SheetOverlay, {}) : null, _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-nc-ui": "", finalFocus: finalFocus, "data-side": side, className: cn("pointer-events-auto", "fixed z-50 flex max-h-[calc(100%-var(--nc-lg))] flex-col gap-nadicode-md rounded-xl border-0 bg-popover bg-clip-padding text-sm text-popover-foreground nc-elevation-modal transition-[opacity,translate] duration-
|
|
64
|
+
return (_jsxs(SheetPortal, { children: [modal && !noOverlay ? _jsx(SheetOverlay, {}) : null, _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-nc-ui": "", finalFocus: finalFocus, "data-side": side, className: cn("pointer-events-auto", "fixed z-50 flex max-h-[calc(100%-var(--nc-lg))] flex-col gap-nadicode-md rounded-xl border-0 bg-popover bg-clip-padding text-sm text-popover-foreground nc-elevation-modal transition-[opacity,translate] duration-(--nc-duration-close) ease-(--nc-ease-out-strong) data-open:duration-(--nc-duration-open) data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-opacity data-[side=bottom]:inset-x-nadicode-sm data-[side=bottom]:bottom-nadicode-sm data-[side=bottom]:h-auto data-[side=bottom]:data-ending-style:translate-y-nadicode-md data-[side=bottom]:data-starting-style:translate-y-nadicode-md motion-reduce:data-[side=bottom]:data-ending-style:translate-none motion-reduce:data-[side=bottom]:data-starting-style:translate-none data-[side=left]:inset-y-nadicode-sm data-[side=left]:left-nadicode-sm data-[side=left]:w-[calc(100%-var(--nc-lg))] data-[side=left]:data-ending-style:-translate-x-nadicode-md data-[side=left]:data-starting-style:-translate-x-nadicode-md motion-reduce:data-[side=left]:data-ending-style:translate-none motion-reduce:data-[side=left]:data-starting-style:translate-none data-[side=right]:inset-y-nadicode-sm data-[side=right]:right-nadicode-sm data-[side=right]:w-[calc(100%-var(--nc-lg))] data-[side=right]:data-ending-style:translate-x-nadicode-md data-[side=right]:data-starting-style:translate-x-nadicode-md motion-reduce:data-[side=right]:data-ending-style:translate-none motion-reduce:data-[side=right]:data-starting-style:translate-none data-[side=top]:inset-x-nadicode-sm data-[side=top]:top-nadicode-sm data-[side=top]:h-auto data-[side=top]:data-ending-style:-translate-y-nadicode-md data-[side=top]:data-starting-style:-translate-y-nadicode-md motion-reduce:data-[side=top]:data-ending-style:translate-none motion-reduce:data-[side=top]:data-starting-style:translate-none data-[side=left]:lg:w-[512px] data-[side=right]:lg:w-[512px]", className), ...props, children: [children, _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { "aria-label": closeLabel, variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: _jsx(XIcon, {}) })] })] }));
|
|
65
65
|
}
|
|
66
66
|
function SheetHeader({ className, ...props }) {
|
|
67
67
|
return (_jsx("div", { "data-slot": "sheet-header", "data-nc-ui": "", className: cn("flex flex-col gap-1 p-nadicode-lg", className), ...props }));
|
|
@@ -5,7 +5,7 @@ import { type AccessibleName, type IconButtonPartProps } from "./button.js";
|
|
|
5
5
|
import { Input } from "./input.js";
|
|
6
6
|
import { Separator } from "./separator.js";
|
|
7
7
|
import { SheetContent } from "./sheet.js";
|
|
8
|
-
import {
|
|
8
|
+
import { TooltipContentFrame } from "../internal/tooltip-content-frame.js";
|
|
9
9
|
import { ChevronRightIcon } from "lucide-react";
|
|
10
10
|
declare const SIDEBAR_WIDTH = 256;
|
|
11
11
|
declare const SIDEBAR_WIDTH_MIN = 224;
|
|
@@ -105,7 +105,7 @@ declare const sidebarMenuButtonVariants: (props?: ({
|
|
|
105
105
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
106
106
|
declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
|
|
107
107
|
isActive?: boolean;
|
|
108
|
-
tooltip?: string | React.ComponentProps<typeof
|
|
108
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContentFrame>;
|
|
109
109
|
} & VariantProps<typeof sidebarMenuButtonVariants>): React.JSX.Element;
|
|
110
110
|
declare function SidebarMenuAction({ className, render, showOnHover, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
|
|
111
111
|
showOnHover?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMlE,OAAO,EAAE,KAAK,cAAc,EAAU,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAS,YAAY,EAA6C,MAAM,oBAAoB,CAAC;AAEpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAA6B,MAAM,cAAc,CAAC;AAI3E,QAAA,MAAM,aAAa,MAAM,CAAC;AAC1B,Q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AAS,CAAC;IACzB,0CAA0C;IAC1C,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,mEAAmE;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mFAAmF;IACnF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,0CAA0C;IAC1C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,yDAAyD;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;GASG;AACH,iBAAS,YAAY,CAAC,EACpB,MAAM,EACN,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAO,GACR,EAAE,iBAAiB,qBAiCnB;AAED,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,UAAU,GACX,CAAC"}
|
|
@@ -6,13 +6,15 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { isMobileNow, useIsMobile } from "../hooks/use-mobile.js";
|
|
8
8
|
import { cn } from "../lib/utils.js";
|
|
9
|
+
import { cssVariables } from "../lib/css-variables.js";
|
|
9
10
|
import { BrandWordmark } from "./brand.js";
|
|
10
11
|
import { Button } from "./button.js";
|
|
11
12
|
import { Input } from "./input.js";
|
|
12
13
|
import { Separator } from "./separator.js";
|
|
13
14
|
import { ScrollArea } from "./scroll-area.js";
|
|
14
15
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.js";
|
|
15
|
-
import { Tooltip,
|
|
16
|
+
import { Tooltip, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
|
17
|
+
import { TooltipContentFrame } from "../internal/tooltip-content-frame.js";
|
|
16
18
|
import { ChevronRightIcon, PanelLeftIcon, SearchIcon } from "lucide-react";
|
|
17
19
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
18
20
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -40,7 +42,6 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
40
42
|
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
41
43
|
const open = openProp ?? _open;
|
|
42
44
|
const setOpen = React.useCallback((value) => {
|
|
43
|
-
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- value is React's boolean | updater union, told apart only by typeof.
|
|
44
45
|
const openState = typeof value === "function" ? value(open) : value;
|
|
45
46
|
if (setOpenProp) {
|
|
46
47
|
setOpenProp(openState);
|
|
@@ -128,11 +129,9 @@ function Sidebar({ collapsible, resize, mobileTitle, mobileDescription, mobileCl
|
|
|
128
129
|
return (_jsx("div", { "data-slot": "sidebar", className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className), ...props, children: children }));
|
|
129
130
|
}
|
|
130
131
|
if (isMobile) {
|
|
131
|
-
return (_jsx(Sheet, { closesOnScrimPress: true, modal: true, open: openMobile, onOpenChange: setOpenMobile, children: _jsxs(SheetContent, { closeLabel: mobileCloseLabel, finalFocus: mobileFinalFocus, dir: dir, "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground",
|
|
132
|
-
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
133
|
-
style: {
|
|
132
|
+
return (_jsx(Sheet, { closesOnScrimPress: true, modal: true, open: openMobile, onOpenChange: setOpenMobile, children: _jsxs(SheetContent, { closeLabel: mobileCloseLabel, finalFocus: mobileFinalFocus, dir: dir, "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground", style: cssVariables({
|
|
134
133
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
|
135
|
-
}, side: "left", children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: mobileTitle }), _jsx(SheetDescription, { children: mobileDescription })] }), _jsx("div", { className: "flex
|
|
134
|
+
}), side: "left", children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: mobileTitle }), _jsx(SheetDescription, { children: mobileDescription })] }), _jsx("div", { className: "flex size-full flex-col", children: children })] }) }));
|
|
136
135
|
}
|
|
137
136
|
return (_jsxs("div", { "data-slot": "sidebar", "data-state": state, "data-collapsible": state === "collapsed" ? "icon" : "", className: cn("group relative hidden min-h-0 w-(--sidebar-width) shrink-0 flex-col bg-sidebar text-sidebar-foreground data-[collapsible=icon]:w-(--sidebar-width-icon) md:flex", !resize && "border-e", className), ...props, children: [_jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full min-h-0 flex-col", children: children }), resize ? _jsx(SidebarResizeHandle, { ...resize }) : null] }));
|
|
138
137
|
}
|
|
@@ -187,7 +186,7 @@ function SidebarResizeHandle(name) {
|
|
|
187
186
|
setWidth(SIDEBAR_WIDTH_MAX);
|
|
188
187
|
}
|
|
189
188
|
};
|
|
190
|
-
return (_jsx("div", { ...name, role: "separator", "aria-orientation": "vertical", "aria-valuemin": SIDEBAR_WIDTH_ICON, "aria-valuemax": SIDEBAR_WIDTH_MAX, "aria-valuenow": shown, "data-slot": "sidebar-resize-handle", "data-dragging": drag === null ? undefined : "", tabIndex: 0, className: "absolute inset-y-0 -
|
|
189
|
+
return (_jsx("div", { ...name, role: "separator", "aria-orientation": "vertical", "aria-valuemin": SIDEBAR_WIDTH_ICON, "aria-valuemax": SIDEBAR_WIDTH_MAX, "aria-valuenow": shown, "data-slot": "sidebar-resize-handle", "data-dragging": drag === null ? undefined : "", tabIndex: 0, className: "absolute inset-y-0 -inset-e-1 z-20 w-2 cursor-col-resize touch-none outline-none after:absolute after:inset-y-0 after:inset-s-1/2 after:w-px after:-translate-x-1/2 after:bg-border hover:after:bg-ring focus-visible:nc-focus-outline focus-visible:outline-ring focus-visible:after:bg-ring data-dragging:after:bg-ring", onDoubleClick: () => {
|
|
191
190
|
if (!open)
|
|
192
191
|
setOpen(true);
|
|
193
192
|
resetWidth();
|
|
@@ -213,7 +212,7 @@ function SidebarInset({ className, focusTarget = false, render, ...props }) {
|
|
|
213
212
|
return useRender({
|
|
214
213
|
defaultTagName: "div",
|
|
215
214
|
props: mergeProps({
|
|
216
|
-
className: cn("relative flex w-full flex-1 flex-col bg-background", focusTarget && "focus-visible:-outline-offset-
|
|
215
|
+
className: cn("relative flex w-full flex-1 flex-col bg-background", focusTarget && "focus-visible:-outline-offset-(--outline-offset-focus)", className),
|
|
217
216
|
}, props),
|
|
218
217
|
render,
|
|
219
218
|
state: {
|
|
@@ -256,7 +255,7 @@ function SidebarGroupAction({ className, render, ...props }) {
|
|
|
256
255
|
return useRender({
|
|
257
256
|
defaultTagName: "button",
|
|
258
257
|
props: mergeProps({
|
|
259
|
-
className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-sm p-0 text-sidebar-foreground group-data-[collapsible=icon]:hidden after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-
|
|
258
|
+
className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-sm p-0 text-sidebar-foreground group-data-[collapsible=icon]:hidden after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-1/2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground [@media(hover:hover)_and_(pointer:fine)]:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
260
259
|
}, props),
|
|
261
260
|
render,
|
|
262
261
|
state: {
|
|
@@ -299,7 +298,11 @@ function SidebarMenuButton({ render, isActive = false, variant = "default", size
|
|
|
299
298
|
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
300
299
|
}, props),
|
|
301
300
|
// Base UI's tooltip trigger takes `disabled` for its tooltip, so the button element carries it too.
|
|
302
|
-
render: !tooltip ? (render) : (_jsx(TooltipTrigger
|
|
301
|
+
render: !tooltip ? (render) : (_jsx(TooltipTrigger
|
|
302
|
+
// oxlint-disable-next-line react/button-has-type -- the button takes its caller's type and is a plain button when none is given
|
|
303
|
+
, {
|
|
304
|
+
// oxlint-disable-next-line react/button-has-type -- the button takes its caller's type and is a plain button when none is given
|
|
305
|
+
render: render ?? _jsx("button", { disabled: props.disabled, type: props.type ?? "button" }) })),
|
|
303
306
|
state: {
|
|
304
307
|
slot: "sidebar-menu-button",
|
|
305
308
|
sidebar: "menu-button",
|
|
@@ -310,19 +313,14 @@ function SidebarMenuButton({ render, isActive = false, variant = "default", size
|
|
|
310
313
|
if (!tooltip) {
|
|
311
314
|
return comp;
|
|
312
315
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
tooltip = {
|
|
316
|
-
children: tooltip,
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
return (_jsxs(Tooltip, { disabled: state !== "collapsed" || isMobile, children: [comp, _jsx(TooltipContent, { side: "right", align: "center", ...tooltip })] }));
|
|
316
|
+
const tooltipProps = typeof tooltip === "string" ? { children: tooltip } : tooltip;
|
|
317
|
+
return (_jsxs(Tooltip, { disabled: state !== "collapsed" || isMobile, children: [comp, _jsx(TooltipContentFrame, { side: "right", align: "center", ...tooltipProps })] }));
|
|
320
318
|
}
|
|
321
319
|
function SidebarMenuAction({ className, render, showOnHover = false, ...props }) {
|
|
322
320
|
return useRender({
|
|
323
321
|
defaultTagName: "button",
|
|
324
322
|
props: mergeProps({
|
|
325
|
-
className: cn("absolute top-3 right-1 flex aspect-square w-5 items-center justify-center rounded-sm p-0 text-sidebar-foreground group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-primary-foreground after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-
|
|
323
|
+
className: cn("absolute top-3 right-1 flex aspect-square w-5 items-center justify-center rounded-sm p-0 text-sidebar-foreground group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-primary-foreground after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-1/2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground [@media(hover:hover)_and_(pointer:fine)]:peer-data-[size=default]/menu-button:top-1.5 [@media(hover:hover)_and_(pointer:fine)]:peer-data-[size=lg]/menu-button:top-2.5 [@media(hover:hover)_and_(pointer:fine)]:peer-data-[size=sm]/menu-button:top-1 [@media(hover:hover)_and_(pointer:fine)]:after:hidden [&_svg]:size-4 [&_svg]:shrink-0", showOnHover &&
|
|
326
324
|
"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0", className),
|
|
327
325
|
}, props),
|
|
328
326
|
render,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type SiteMenuLink = {
|
|
2
|
+
href: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* The public site's masthead menu below the large breakpoint.
|
|
7
|
+
*
|
|
8
|
+
* @family Menus
|
|
9
|
+
* @when The website's masthead below the large breakpoint, where the bar has no room for its section
|
|
10
|
+
* links, the Portal sign-in and the page's action.
|
|
11
|
+
* @instead A product's account is `AccountMenu`; a record's or a page's commands are `ActionMenu` or
|
|
12
|
+
* `PageActions`' menu.
|
|
13
|
+
* @behaviour The package's dropdown menu at the floating height, opened by the outline icon button
|
|
14
|
+
* with Lucide's `Menu`, so the trigger keeps the control geometry and the 44 px target on touch. It
|
|
15
|
+
* holds the same section links the bar shows on a wide page; below `md` a divider, then the sign-in,
|
|
16
|
+
* and below `sm` the page's action, where the bar hides each of them.
|
|
17
|
+
* @words The trigger's `label` names the menu ("Menu"); each link keeps the words the bar shows.
|
|
18
|
+
* @access The trigger is a button named by `label`; each row is a menu item that is a link.
|
|
19
|
+
*/
|
|
20
|
+
export declare function SiteMenu({ label, links, signInHref, signInLabel, invitation, }: {
|
|
21
|
+
label: string;
|
|
22
|
+
links: ReadonlyArray<SiteMenuLink>;
|
|
23
|
+
signInHref: string;
|
|
24
|
+
signInLabel: string;
|
|
25
|
+
invitation: SiteMenuLink;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=site-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-menu.d.ts","sourceRoot":"","sources":["../../src/components/site-menu.tsx"],"names":[],"mappings":"AAaA,KAAK,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,UAAU,EACV,WAAW,EACX,UAAU,GACX,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,YAAY,CAAC;CAC1B,+BA0BA"}
|