@nadicodeai/ui 12.1.165 → 12.1.166
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 +11 -3
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +12 -4
- 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.map +1 -1
- package/dist/components/record-list.js +4 -3
- 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.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 +38 -16
- package/dist/standalone/index.js +1 -1
- package/dist/standalone/orb-page.js +10 -8
- package/dist/styles/components.css +1 -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":"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,K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c,CAAC,KAAK,CAAC,qBAYxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,qBAStE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,qBASlF;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,CAAC"}
|
package/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,cA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,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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Menu } from "lucide-react";
|
|
4
|
+
import { Button } from "./button.js";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "./dropdown-menu.js";
|
|
6
|
+
/**
|
|
7
|
+
* The public site's masthead menu below the large breakpoint.
|
|
8
|
+
*
|
|
9
|
+
* @family Menus
|
|
10
|
+
* @when The website's masthead below the large breakpoint, where the bar has no room for its section
|
|
11
|
+
* links, the Portal sign-in and the page's action.
|
|
12
|
+
* @instead A product's account is `AccountMenu`; a record's or a page's commands are `ActionMenu` or
|
|
13
|
+
* `PageActions`' menu.
|
|
14
|
+
* @behaviour The package's dropdown menu at the floating height, opened by the outline icon button
|
|
15
|
+
* with Lucide's `Menu`, so the trigger keeps the control geometry and the 44 px target on touch. It
|
|
16
|
+
* holds the same section links the bar shows on a wide page; below `md` a divider, then the sign-in,
|
|
17
|
+
* and below `sm` the page's action, where the bar hides each of them.
|
|
18
|
+
* @words The trigger's `label` names the menu ("Menu"); each link keeps the words the bar shows.
|
|
19
|
+
* @access The trigger is a button named by `label`; each row is a menu item that is a link.
|
|
20
|
+
*/
|
|
21
|
+
export function SiteMenu({ label, links, signInHref, signInLabel, invitation, }) {
|
|
22
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { render: _jsx(Button, { "aria-label": label, size: "icon", variant: "outline", children: _jsx(Menu, { "aria-hidden": "true" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [links.map((link) => (_jsx(DropdownMenuItem, { render: _jsx("a", { href: link.href }), children: link.label }, link.href))), _jsx(DropdownMenuSeparator, { className: "md:hidden" }), _jsx(DropdownMenuItem, { className: "md:hidden", render: _jsx("a", { href: signInHref }), children: signInLabel }), _jsx(DropdownMenuItem, { className: "sm:hidden", render: _jsx("a", { href: invitation.href }), children: invitation.label })] })] }));
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKlE,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzE,MAAM,MAAM,WAAW,CAAC,MAAM,SAAS,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAC7E,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,MAAM,EAAE,CAAC,EAC3C,YAAY,GACZ,iBAAiB,GACjB,UAAU,GACV,cAAc,GACd,KAAK,GACL,KAAK,GACL,eAAe,GACf,kBAAkB,GAClB,aAAa,GACb,QAAQ,GACR,MAAM,GACN,gBAAgB,GAChB,OAAO,CACV,GAAG;IACF,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EA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,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,4FAA4F;IAC5F,cAAc,CAAC,EAAE,MAAM,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC;IACpE,sDAAsD;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAwDF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,iBAAS,MAAM,CAAC,MAAM,SAAS,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAC/D,KAAK,EACL,KAAK,EACL,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,GAAG,EACH,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,MAAM,CAAC,qBAmFrB;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -64,6 +64,7 @@ function Slider({ label, value, defaultValue, onValueChange, onValueCommitted, s
|
|
|
64
64
|
const values = value ?? internal;
|
|
65
65
|
const last = values.length - 1;
|
|
66
66
|
// SAFETY: Base UI returns one number per thumb, so a change keeps the length of the values it was given.
|
|
67
|
+
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Values is a fixed-length tuple TypeScript cannot check a Base UI number[] against; Base UI returns one number per thumb.
|
|
67
68
|
const asValues = (next) => next;
|
|
68
69
|
const change = (next) => {
|
|
69
70
|
setInternal(next);
|
|
@@ -76,6 +77,6 @@ function Slider({ label, value, defaultValue, onValueChange, onValueCommitted, s
|
|
|
76
77
|
change(next);
|
|
77
78
|
commit(next);
|
|
78
79
|
}, step: step, upper: index < last ? (values[index + 1] ?? max) : max, value: values[index] ?? min }));
|
|
79
|
-
return (_jsxs(SliderPrimitive.Root, { className: cn("grid w-full gap-2 data-disabled:cursor-not-allowed", className), "data-slot": "slider", disabled: disabled, max: max, min: min, onValueChange: change, onValueCommitted: commit, step: step, thumbAlignment: "edge", value: values, ...props, children: [_jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [_jsx(SliderPrimitive.Label, { className: "text-label-sm text-muted-foreground", children: label }), _jsx(SliderPrimitive.Value, { className: "text-label-sm text-muted-foreground tabular-nums" })] }), _jsxs("div", { className: "flex items-center gap-3", children: [showStartInput ? input(0) : null, _jsxs(SliderPrimitive.Control, { className: "relative flex w-full flex-1 touch-none items-center select-none", children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: "relative h-2 w-full grow overflow-hidden rounded-full bg-border select-none", children: _jsx(SliderPrimitive.Indicator, { "data-slot": "slider-range", className: "h-full bg-info select-none data-disabled:bg-muted-foreground/30" }) }), values.map((_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", getAriaLabel: thumbName, getAriaValueText: (formatted) => formatted, index: index, className: "relative block h-3.5 w-1.5 shrink-0 rounded-xs border border-input bg-background nc-transition-transform select-none after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-
|
|
80
|
+
return (_jsxs(SliderPrimitive.Root, { className: cn("grid w-full gap-2 data-disabled:cursor-not-allowed", className), "data-slot": "slider", disabled: disabled, max: max, min: min, onValueChange: change, onValueCommitted: commit, step: step, thumbAlignment: "edge", value: values, ...props, children: [_jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [_jsx(SliderPrimitive.Label, { className: "text-label-sm text-muted-foreground", children: label }), _jsx(SliderPrimitive.Value, { className: "text-label-sm text-muted-foreground tabular-nums" })] }), _jsxs("div", { className: "flex items-center gap-3", children: [showStartInput ? input(0) : null, _jsxs(SliderPrimitive.Control, { className: "relative flex w-full flex-1 touch-none items-center select-none", children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: "relative h-2 w-full grow overflow-hidden rounded-full bg-border select-none", children: _jsx(SliderPrimitive.Indicator, { "data-slot": "slider-range", className: "h-full bg-info select-none data-disabled:bg-muted-foreground/30" }) }), values.map((_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", getAriaLabel: thumbName, getAriaValueText: (formatted) => formatted, index: index, className: "relative block h-3.5 w-1.5 shrink-0 rounded-xs border border-input bg-background nc-transition-transform select-none after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-1/2 data-disabled:pointer-events-none data-dragging:has-focus:scale-120 has-focus-visible:scale-120 has-focus-visible:nc-focus-outline has-focus-visible:outline-ring [@media(hover:hover)_and_(pointer:fine)]:after:hidden" }, index)))] }), showEndInput ? input(last) : null] })] }));
|
|
80
81
|
}
|
|
81
82
|
export { Slider };
|
|
@@ -31,6 +31,8 @@ type SnippetProps = SnippetContent & {
|
|
|
31
31
|
* @instead Ours: a value that is not a command (an identifier, a URL, a checksum) is `TextWithCopyButton`. A
|
|
32
32
|
* script someone reads before running is a `CodeBlock`. A token inside a sentence is inline code.
|
|
33
33
|
* @behaviour “Pass the command as `text`. Authors never type a leading `$`; the component renders the prompt, so `text="$ vercel deploy"` displays as `$ $ vercel deploy`.” (https://vercel.com/geist/snippet)
|
|
34
|
+
* Ours: a leading `$ `, a lone `$` or a leading `> ` typed into a string line is dropped while the
|
|
35
|
+
* prompt is on, so the prompt shows once and is never copied.
|
|
34
36
|
* “Set `prompt={false}` for non-shell content (URLs, JSON, output you want copied verbatim) so the rendered string matches what gets copied.” (https://vercel.com/geist/snippet)
|
|
35
37
|
* “Keep one command per Snippet. Pass an array to `text` for a short multi-line block; for longer scripts, switch to `CodeBlock` so users can read before they copy.” (https://vercel.com/geist/snippet)
|
|
36
38
|
* “Use `copyText` only when `text` contains rich nodes (`<span>` highlights, conditional fragments) and the clipboard payload should be plain text. For a string `text`, `copyText` is redundant.” (https://vercel.com/geist/snippet)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../src/components/snippet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG5E,KAAK,cAAc,GACf;IACE,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,GACD;IACE,IAAI,EAAE,EAAE,CAAC;IACT,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,KAAK,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC;AAElF,KAAK,YAAY,GAAG,cAAc,GAAG;IACnC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,aAAa,GAAG,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../src/components/snippet.tsx"],"names":[],"mappings":"A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Y_KEEPS_SHELL_COLOUR = "[&_[data-slot=button]]:hover:bg-transparent [&_[data-slot=button]]:hover:text-inherit [&_[data-slot=button]]:active:bg-transparent [&_[data-slot=button]]:active:text-inherit";
|
|
13
|
-
|
|
13
|
+
const TYPED_PROMPT = /^(?:\$(?: |$)|> )/;
|
|
14
|
+
function commandLines(content, prompt) {
|
|
15
|
+
const lines = [content.text].flat();
|
|
16
|
+
return prompt ? lines.map((line) => line.replace(TYPED_PROMPT, "")) : lines;
|
|
17
|
+
}
|
|
18
|
+
function copiedValue(content, prompt) {
|
|
14
19
|
if (content.copyText !== undefined)
|
|
15
20
|
return content.copyText;
|
|
16
|
-
return
|
|
21
|
+
return commandLines(content, prompt).join("\n");
|
|
17
22
|
}
|
|
18
|
-
function linesOf(content) {
|
|
23
|
+
function linesOf(content, prompt) {
|
|
19
24
|
if (content.copyText !== undefined)
|
|
20
25
|
return [content.text];
|
|
21
|
-
return
|
|
26
|
+
return commandLines(content, prompt);
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
24
29
|
* One command a person copies and runs in a terminal.
|
|
@@ -30,6 +35,8 @@ function linesOf(content) {
|
|
|
30
35
|
* @instead Ours: a value that is not a command (an identifier, a URL, a checksum) is `TextWithCopyButton`. A
|
|
31
36
|
* script someone reads before running is a `CodeBlock`. A token inside a sentence is inline code.
|
|
32
37
|
* @behaviour “Pass the command as `text`. Authors never type a leading `$`; the component renders the prompt, so `text="$ vercel deploy"` displays as `$ $ vercel deploy`.” (https://vercel.com/geist/snippet)
|
|
38
|
+
* Ours: a leading `$ `, a lone `$` or a leading `> ` typed into a string line is dropped while the
|
|
39
|
+
* prompt is on, so the prompt shows once and is never copied.
|
|
33
40
|
* “Set `prompt={false}` for non-shell content (URLs, JSON, output you want copied verbatim) so the rendered string matches what gets copied.” (https://vercel.com/geist/snippet)
|
|
34
41
|
* “Keep one command per Snippet. Pass an array to `text` for a short multi-line block; for longer scripts, switch to `CodeBlock` so users can read before they copy.” (https://vercel.com/geist/snippet)
|
|
35
42
|
* “Use `copyText` only when `text` contains rich nodes (`<span>` highlights, conditional fragments) and the clipboard payload should be plain text. For a string `text`, `copyText` is redundant.” (https://vercel.com/geist/snippet)
|
|
@@ -55,8 +62,8 @@ function linesOf(content) {
|
|
|
55
62
|
*/
|
|
56
63
|
function Snippet(props) {
|
|
57
64
|
const { className, copied, copiedLabel, copyFailedLabel, copyLabel, onCopy, prompt = true, variant = "default", } = props;
|
|
58
|
-
const value = copiedValue(props);
|
|
65
|
+
const value = copiedValue(props, prompt);
|
|
59
66
|
const empty = props.placeholder !== undefined;
|
|
60
|
-
return (_jsxs("div", { "data-slot": "snippet", "data-variant": variant, className: cn("relative flex w-fit max-w-full min-w-0 flex-col rounded-sm border py-2.5 pl-3 font-label-mono-md text-label-mono-md", empty ? "pr-3" : "pr-12", SHELL[variant], className), children: [_jsx("div", { className: "min-w-0 overflow-x-auto
|
|
67
|
+
return (_jsxs("div", { "data-slot": "snippet", "data-variant": variant, className: cn("relative flex w-fit max-w-full min-w-0 flex-col rounded-sm border py-2.5 pl-3 font-label-mono-md text-label-mono-md", empty ? "pr-3" : "pr-12", SHELL[variant], className), children: [_jsx("div", { className: "min-w-0 overflow-x-auto scrollbar-none [&::-webkit-scrollbar]:hidden", children: empty ? (_jsx("span", { className: variant === "default" ? "text-placeholder" : "opacity-70", children: props.placeholder })) : (linesOf(props, prompt).map((line, index) => (_jsxs("div", { className: "flex gap-2 whitespace-pre", children: [prompt ? (_jsx("span", { "aria-hidden": "true", className: "select-none", children: "$" })) : null, _jsx("span", { children: line })] }, index)))) }), empty ? null : (_jsx("div", { className: cn("nc-transition-opacity absolute top-1/2 right-1 -translate-y-1/2 rounded-sm hover:opacity-80 hover:ring-1 hover:ring-border", COPY_KEEPS_SHELL_COLOUR), children: _jsx(CopyButton, { value: value, copyLabel: copyLabel, copiedLabel: copiedLabel, copyFailedLabel: copyFailedLabel, copied: copied, onCopy: onCopy, size: "icon-sm" }) }))] }));
|
|
61
68
|
}
|
|
62
69
|
export { Snippet };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAS9D,KAAK,aAAa,GAAG;IACnB,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,eAAe,GAAG,IAAI,CACzB,YAAY,EACZ,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAC7E,CAAC;AAEF;;;;;;;;;GASG;AACH,QAAA,MAAM,OAAO,GAAI,uCAAuC,eAAe,GAAG,aAAa,gCA6CtF,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { useTheme } from "next-themes";
|
|
|
4
4
|
import { Toaster as Sonner } from "sonner";
|
|
5
5
|
import { CircleCheckIcon, InfoIcon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-react";
|
|
6
6
|
import { WaitingLine } from "./waiting-line.js";
|
|
7
|
+
import { cssVariables } from "../lib/css-variables.js";
|
|
7
8
|
import { isThemeMode } from "../lib/theme-mode.js";
|
|
8
9
|
const TOAST_DURATION_MS = 6000;
|
|
9
10
|
/**
|
|
@@ -27,15 +28,13 @@ const Toaster = ({ closeLabel, regionLabel, ...props }) => {
|
|
|
27
28
|
// A toast that stays up is already past a second, so its mark is the
|
|
28
29
|
// one waiting line rather than a spinning glyph.
|
|
29
30
|
loading: _jsx(WaitingLine, { className: "w-8", decorative: true, waiting: true }),
|
|
30
|
-
},
|
|
31
|
-
// SAFETY: CSSProperties lists only standard properties; React sets each `--` custom property key here through style.setProperty.
|
|
32
|
-
style: {
|
|
31
|
+
}, style: cssVariables({
|
|
33
32
|
"--normal-bg": "var(--nc-material-floating)",
|
|
34
33
|
"--normal-text": "var(--popover-foreground)",
|
|
35
34
|
"--normal-border": "transparent",
|
|
36
35
|
"--border-radius": "var(--radius-lg)",
|
|
37
36
|
"--width": "420px",
|
|
38
|
-
}, toastOptions: {
|
|
37
|
+
}), toastOptions: {
|
|
39
38
|
closeButtonAriaLabel: closeLabel,
|
|
40
39
|
classNames: {
|
|
41
40
|
toast: "nc-toast nc-elevation-floating min-h-16 pr-16! text-body-sm!",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
2
|
type StatusBadgeTone = "success" | "warning" | "danger" | "info" | "neutral";
|
|
3
3
|
type StatusBadgeSize = "sm" | "md" | "lg";
|
|
4
|
-
type StatusBadgeProps = Omit<ComponentProps<"span">, "children" | "onClick"> & {
|
|
4
|
+
type StatusBadgeProps = Omit<ComponentProps<"span">, "children" | "onClick" | "tabIndex" | "role" | "aria-pressed" | "onKeyDown" | "onKeyUp"> & {
|
|
5
5
|
tone: StatusBadgeTone;
|
|
6
6
|
label: string;
|
|
7
7
|
size?: StatusBadgeSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/components/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAS5C,KAAK,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7E,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAsD1C,KAAK,gBAAgB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/components/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAS5C,KAAK,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7E,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAsD1C,KAAK,gBAAgB,GAAG,IAAI,CAC1B,cAAc,CAAC,MAAM,CAAC,EACtB,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,SAAS,CACxF,GAAG;IACF,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,iBAAS,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAW,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BA4B9F;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -48,6 +48,6 @@ import { cn } from "../lib/utils.js";
|
|
|
48
48
|
* both states; a missing name does not compile.
|
|
49
49
|
*/
|
|
50
50
|
function Switch({ className, size = "sm", ...props }) {
|
|
51
|
-
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-nc-ui": "", "data-size": size, className: cn("nc-transition-paint peer group/switch relative inline-flex shrink-0 items-start rounded-full border border-transparent p-0 after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-
|
|
51
|
+
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-nc-ui": "", "data-size": size, className: cn("nc-transition-paint peer group/switch relative inline-flex shrink-0 items-start rounded-full border border-transparent p-0 after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-1/2 aria-invalid:border-destructive data-[size=sm]:h-3.5 data-[size=sm]:w-7 data-[size=md]:h-5 data-[size=md]:w-9 data-[size=lg]:h-6 data-[size=lg]:w-10 data-checked:bg-primary data-unchecked:bg-input data-disabled:cursor-not-allowed data-disabled:data-checked:bg-input/50 [@media(hover:hover)_and_(pointer:fine)]:after:hidden", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", "data-nc-ui": "", className: "pointer-events-none mt-px block rounded-full bg-primary-foreground ring-0 nc-transition-transform not-data-disabled:nc-elevation-resting group-data-[size=sm]/switch:ml-px group-data-[size=sm]/switch:size-2.75 group-data-[size=md]/switch:size-4.25 group-data-[size=lg]/switch:ml-px group-data-[size=lg]/switch:size-5.25 group-data-[size=sm]/switch:data-checked:translate-x-3.5 group-data-[size=md]/switch:data-checked:translate-x-4.25 group-data-[size=lg]/switch:data-checked:translate-x-4 data-disabled:bg-muted data-unchecked:translate-x-0" }) }));
|
|
52
52
|
}
|
|
53
53
|
export { Switch };
|
|
@@ -30,7 +30,7 @@ import { Separator } from "./separator.js";
|
|
|
30
30
|
* @access A `section` whose title is an `h2`; the summary is a `dl`.
|
|
31
31
|
*/
|
|
32
32
|
function TableCard({ title, description, actions, toolbar, summary, footer, footerHint, note, children, className, surface = "resting", ...props }) {
|
|
33
|
-
const heading = title || description || actions;
|
|
33
|
+
const heading = Boolean(title) || Boolean(description) || Boolean(actions);
|
|
34
34
|
return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "table-card" }), surface: surface, className: cn("min-w-0 gap-0 py-0", className), children: [(heading || toolbar) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { className: "py-(--card-spacing)", children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions || toolbar ? (_jsxs(CardAction, { className: cn("flex min-w-0 items-center gap-2", toolbar &&
|
|
35
35
|
"@max-xl/card-header:col-span-2 @max-xl/card-header:col-start-1 @max-xl/card-header:row-span-1 @max-xl/card-header:row-start-auto @max-xl/card-header:justify-self-stretch"), children: [actions, toolbar ? (_jsx("div", { "data-slot": "table-card-toolbar", className: "min-w-0 flex-1", children: toolbar })) : null] })) : null] }), _jsx(Separator, {})] })), _jsx("div", { "data-slot": "table-card-body", className: "min-w-0 [&_[data-slot=table-cell]:first-child]:pl-(--card-spacing) [&_[data-slot=table-cell]:last-child]:pr-(--card-spacing) [&_[data-slot=table-head]:first-child]:pl-(--card-spacing) [&_[data-slot=table-head]:last-child]:pr-(--card-spacing)", children: children }), summary && (_jsxs("dl", { "data-slot": "table-card-summary", className: "flex min-w-0 items-start justify-between gap-4 border-t border-border px-(--card-spacing) py-2.5 text-sm font-medium", children: [_jsx("dt", { children: summary.label }), _jsx("dd", { className: "text-right tabular-nums", children: summary.value })] })), _jsx(FooterStrip, { hint: footerHint, hintSlot: "table-card-hint", children: footer }), note ? _jsx(CollectionNoteStrip, { note: note }) : null] }));
|
|
36
36
|
}
|
package/dist/components/table.js
CHANGED
|
@@ -76,17 +76,17 @@ function TableFooter({ className, ...props }) {
|
|
|
76
76
|
return (_jsx("tfoot", { "data-slot": "table-footer", className: cn("font-medium text-foreground [&>tr:first-child>td]:border-t [&>tr:first-child>td]:border-border", className), ...props }));
|
|
77
77
|
}
|
|
78
78
|
function TableRow({ className, detailLayout, ...props }) {
|
|
79
|
-
return (_jsx("tr", { "data-slot": "table-row", "data-nc-ui": "", className: cn("in-data-[bordered=true]:[&>td]:relative in-data-[bordered=true]:[&>td]:border-b in-data-[bordered=true]:[&>td]:after:absolute in-data-[bordered=true]:[&>td]:after:inset-x-0 in-data-[bordered=true]:[&>td]:after:bottom-0 in-data-[bordered=true]:[&>td]:after:h-px in-data-[bordered=true]:[&>td]:after:bg-border [&>th]:border-b [&>td]:border-transparent [&>th]:border-border [&>td]:transition-colors in-data-[striped=true]:[&:where(:nth-child(odd))]:[&>td]:bg-muted in-data-[interactive=true]:hover:[&>td]:bg-accent in-[tbody]:has-
|
|
79
|
+
return (_jsx("tr", { "data-slot": "table-row", "data-nc-ui": "", className: cn("in-data-[bordered=true]:[&>td]:relative in-data-[bordered=true]:[&>td]:border-b in-data-[bordered=true]:[&>td]:after:absolute in-data-[bordered=true]:[&>td]:after:inset-x-0 in-data-[bordered=true]:[&>td]:after:bottom-0 in-data-[bordered=true]:[&>td]:after:h-px in-data-[bordered=true]:[&>td]:after:bg-border [&>th]:border-b [&>td]:border-transparent [&>th]:border-border [&>td]:transition-colors in-data-[striped=true]:[&:where(:nth-child(odd))]:[&>td]:bg-muted in-data-[interactive=true]:hover:[&>td]:bg-accent in-[tbody]:has-focus-visible:[&>td]:bg-accent in-[tbody]:has-aria-expanded:[&>td]:bg-accent data-[state=selected]:[&>td]:bg-muted in-data-[striped=true]:data-[state=selected]:[&>td]:bg-accent", detailLayout && tableCompactLayouts[detailLayout].row, className), ...props }));
|
|
80
80
|
}
|
|
81
81
|
function TableHead({ className, ...props }) {
|
|
82
|
-
return (_jsx("th", { "data-slot": "table-head", "data-nc-ui": "", className: cn("h-9 px-2 text-left align-middle text-sm font-medium whitespace-nowrap last:text-right
|
|
82
|
+
return (_jsx("th", { "data-slot": "table-head", "data-nc-ui": "", className: cn("h-9 px-2 text-left align-middle text-sm font-medium whitespace-nowrap last:text-right has-[[role=checkbox]]:pr-0", className), ...props }));
|
|
83
83
|
}
|
|
84
84
|
function TableCell({ className, ...props }) {
|
|
85
|
-
return (_jsx("td", { "data-slot": "table-cell", "data-nc-ui": "", className: cn("px-2 py-2.5 group-data-[density=comfortable]/table:py-4 group-data-[density=default]/table:[
|
|
85
|
+
return (_jsx("td", { "data-slot": "table-cell", "data-nc-ui": "", className: cn("px-2 py-2.5 group-data-[density=comfortable]/table:py-4 group-data-[density=default]/table:has-[button]:py-0.5 align-middle whitespace-nowrap last:text-right has-[[role=checkbox]]:pr-0", className), ...props }));
|
|
86
86
|
}
|
|
87
87
|
function TableDetailRow({ colSpan, facts, layout = "standard", }) {
|
|
88
88
|
const wraps = facts.some((fact) => fact.wraps);
|
|
89
|
-
return (_jsx(TableRow, { "data-slot": "table-detail-row", className: cn("h-auto!", tableCompactLayouts[layout].details), children: _jsx(TableCell, { colSpan: colSpan, className: "pt-0! pb-3! whitespace-normal text-muted-foreground last:text-left", children: _jsx("div", { className: cn("relative min-w-0 in-[[data-slot=table-record-group]:has([data-slot=record-identity])]:pl-12", detailFactsLine, wraps ? ["break-
|
|
89
|
+
return (_jsx(TableRow, { "data-slot": "table-detail-row", className: cn("h-auto!", tableCompactLayouts[layout].details), children: _jsx(TableCell, { colSpan: colSpan, className: "pt-0! pb-3! whitespace-normal text-muted-foreground last:text-left", children: _jsx("div", { className: cn("relative min-w-0 in-[[data-slot=table-record-group]:has([data-slot=record-identity])]:pl-12", detailFactsLine, wraps ? ["wrap-break-word", detailFactsWrap] : "w-0 min-w-full truncate"), "data-slot": "table-detail-line", onFocus: wraps ? undefined : titleWhenCut, onPointerEnter: wraps ? undefined : titleWhenCut, children: _jsx(DetailFacts, { facts: facts }) }) }) }));
|
|
90
90
|
}
|
|
91
91
|
function TableCaption({ className, ...props }) {
|
|
92
92
|
return (_jsx("caption", { "data-slot": "table-caption", className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { type TabGroupName } from "../internal/tab-row.js";
|
|
4
|
+
/**
|
|
5
|
+
* Sibling views of one object, each with its own URL, under the top bar.
|
|
6
|
+
*
|
|
7
|
+
* @family Navigation
|
|
8
|
+
* @when Sibling views of one object under the top bar, when each view has its own URL (an object's
|
|
9
|
+
* sections), with `TabsLink` for each.
|
|
10
|
+
* @instead Panels that switch in place are `Tabs`. A stable destination belongs in the `Sidebar`.
|
|
11
|
+
* An object's ancestry is the `Breadcrumb`.
|
|
12
|
+
* @behaviour "Reflect the active tab in the URL (query param or path) so deep-links and refresh restore state." (https://vercel.com/geist/tabs)
|
|
13
|
+
* Ours: each view is its own URL, so a link carries it. Overflow scrolls sideways and brings the
|
|
14
|
+
* current link into view, and the row fades out over 32 px at each end where links stand beyond it.
|
|
15
|
+
* The current link takes the selection fill, or in `line` a 2 px ink underline over the row's 1 px
|
|
16
|
+
* rule; the other links are muted until hover, with no hue. Sizes and spacing follow `Tabs`. The
|
|
17
|
+
* row holds at most 7 links; in a `band`, which a phone scrolls sideways instead of holding
|
|
18
|
+
* fewer, that is 7 at every width, as an Agent's six views do, and a `line` row follows the 7 and 4 cap of `Tabs`. The sub-pages of one object stand as the filled-pill row in a
|
|
19
|
+
* `band` under the top bar, as Vercel draws a deployment's tabs: the band is this component's, with `above` for the
|
|
20
|
+
* object's identity, so no page draws the border, the fill or the gutters around the row. The band
|
|
21
|
+
* keeps the page's own column and gutter, and the first link's words start at the page title's edge,
|
|
22
|
+
* its fill reaching into the gutter as Vercel's tabs do. The
|
|
23
|
+
* `line` row has its own rule and takes no band.
|
|
24
|
+
* @words "`tabs[].title` is Title Case, 1–2 words, and names the destination noun (`Overview`, `Logs`, `Settings`). Verbs belong on buttons; `View Logs` is wrong on a tab." (https://vercel.com/geist/tabs)
|
|
25
|
+
* "Don’t append a count to the title (`Logs (12)`); use a badge slot instead and drop the badge at zero." (https://vercel.com/geist/tabs)
|
|
26
|
+
* Ours: the title is sentence case (*Overview*, *Installations*), not Title Case. There is no badge
|
|
27
|
+
* slot: a count belongs to the list's footer. A link has no icon. Italian scrolls, never wraps or
|
|
28
|
+
* truncates.
|
|
29
|
+
* @access "Label the tablist with `aria-label` when no visible heading sits above it (`aria-label="Sections"`)." (https://vercel.com/geist/tabs)
|
|
30
|
+
* "Maintain a visible focus ring on the active tab; don’t suppress focus styles for visual polish." (https://vercel.com/geist/tabs)
|
|
31
|
+
* Ours: a `nav` of links named by `aria-label` or `aria-labelledby`, which the type requires, with
|
|
32
|
+
* `aria-current="page"` on the current one.
|
|
33
|
+
*/
|
|
34
|
+
declare function TabsNav({ className, children, variant, band, above, ...props }: Omit<React.ComponentProps<"nav">, "aria-label" | "aria-labelledby"> & TabGroupName & ({
|
|
35
|
+
variant?: "default" | "line" | null;
|
|
36
|
+
band?: false;
|
|
37
|
+
above?: never;
|
|
38
|
+
} | {
|
|
39
|
+
variant?: "default" | null;
|
|
40
|
+
/**
|
|
41
|
+
* The row stands in a full-width band under the top bar: a 1 px rule below, the page's
|
|
42
|
+
* background, the page's gutters, and the reading column centred inside.
|
|
43
|
+
*/
|
|
44
|
+
band: true;
|
|
45
|
+
/** The object's identity, in the band's column above the row. */
|
|
46
|
+
above?: React.ReactNode;
|
|
47
|
+
})): React.JSX.Element;
|
|
48
|
+
declare function TabsLink({ current, className, render, ...props }: useRender.ComponentProps<"a"> & {
|
|
49
|
+
current?: boolean;
|
|
50
|
+
}): React.JSX.Element;
|
|
51
|
+
export { TabsNav, TabsLink };
|
|
52
|
+
//# sourceMappingURL=tabs-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-nav.d.ts","sourceRoot":"","sources":["../../src/components/tabs-nav.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAmBjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,QAAQ,EACR,OAAmB,EACnB,IAAY,EACZ,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC,GACpE,YAAY,GACZ,CACI;IACE,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GACD;IACE,OAAO,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC;IACX,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CACJ,qBAqDF;AAED,iBAAS,QAAQ,CAAC,EAChB,OAAe,EACf,SAAS,EACT,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,qBAqBvD;AAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|