banhaten 0.1.3 → 0.2.0
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/CHANGELOG.md +45 -0
- package/CONTRIBUTING.md +44 -0
- package/README.md +65 -13
- package/SECURITY.md +15 -0
- package/banhaten.config.example.json +0 -2
- package/docs/design-system/README.md +9 -0
- package/docs/design-system/adoption-quality-remediation.md +87 -0
- package/docs/design-system/agent-usage.md +13 -0
- package/docs/design-system/appearance-presets.md +6 -1
- package/docs/design-system/component-docs-pattern.md +81 -0
- package/docs/design-system/component-token-consistency-audit.md +13 -3
- package/docs/design-system/components/README.md +3 -2
- package/docs/design-system/components/accordion.md +16 -0
- package/docs/design-system/components/activity-feed.md +15 -1
- package/docs/design-system/components/alert-dialog.md +17 -0
- package/docs/design-system/components/alert.md +46 -14
- package/docs/design-system/components/aspect-ratio.md +15 -0
- package/docs/design-system/components/attribute.md +16 -0
- package/docs/design-system/components/autocomplete.md +19 -0
- package/docs/design-system/components/avatar.md +18 -0
- package/docs/design-system/components/badge.md +19 -0
- package/docs/design-system/components/banner.md +15 -1
- package/docs/design-system/components/breadcrumbs.md +14 -0
- package/docs/design-system/components/button-group.md +34 -0
- package/docs/design-system/components/button.md +18 -0
- package/docs/design-system/components/card.md +18 -1
- package/docs/design-system/components/carousel.md +20 -3
- package/docs/design-system/components/catalog-components.md +15 -1
- package/docs/design-system/components/chart.md +15 -0
- package/docs/design-system/components/checkbox.md +16 -0
- package/docs/design-system/components/collapsible.md +15 -0
- package/docs/design-system/components/command.md +15 -0
- package/docs/design-system/components/context-menu.md +15 -0
- package/docs/design-system/components/date-picker.md +21 -1
- package/docs/design-system/components/divider.md +16 -0
- package/docs/design-system/components/empty-state.md +17 -0
- package/docs/design-system/components/field.md +17 -0
- package/docs/design-system/components/file-upload.md +14 -0
- package/docs/design-system/components/hover-card.md +15 -0
- package/docs/design-system/components/input-group.md +17 -0
- package/docs/design-system/components/input-otp.md +18 -0
- package/docs/design-system/components/input.md +43 -7
- package/docs/design-system/components/item.md +72 -0
- package/docs/design-system/components/kbd.md +18 -0
- package/docs/design-system/components/label.md +16 -0
- package/docs/design-system/components/menu.md +17 -0
- package/docs/design-system/components/menubar.md +15 -0
- package/docs/design-system/components/modal.md +25 -4
- package/docs/design-system/components/native-select.md +18 -0
- package/docs/design-system/components/navigation-menu.md +15 -0
- package/docs/design-system/components/onboarding-step-list-item.md +15 -1
- package/docs/design-system/components/page-header.md +15 -1
- package/docs/design-system/components/pagination.md +30 -8
- package/docs/design-system/components/popover.md +19 -0
- package/docs/design-system/components/progress-slider.md +18 -0
- package/docs/design-system/components/progress.md +17 -0
- package/docs/design-system/components/radio-card.md +16 -0
- package/docs/design-system/components/radio-group.md +17 -0
- package/docs/design-system/components/resizable.md +15 -0
- package/docs/design-system/components/scroll-area.md +15 -0
- package/docs/design-system/components/segmented-control.md +71 -0
- package/docs/design-system/components/select.md +44 -7
- package/docs/design-system/components/sheet.md +17 -0
- package/docs/design-system/components/sidebar.md +15 -0
- package/docs/design-system/components/skeleton.md +18 -0
- package/docs/design-system/components/slideout.md +14 -0
- package/docs/design-system/components/slider.md +20 -0
- package/docs/design-system/components/social-button.md +21 -3
- package/docs/design-system/components/spinner.md +16 -0
- package/docs/design-system/components/steps.md +14 -0
- package/docs/design-system/components/table.md +15 -1
- package/docs/design-system/components/tabs.md +17 -0
- package/docs/design-system/components/tag.md +17 -0
- package/docs/design-system/components/textarea.md +16 -0
- package/docs/design-system/components/timeline.md +14 -0
- package/docs/design-system/components/toast.md +17 -0
- package/docs/design-system/components/toggle.md +17 -0
- package/docs/design-system/components/toolbar.md +21 -1
- package/docs/design-system/components/tooltip.md +18 -1
- package/docs/design-system/density-and-elevation.md +44 -0
- package/docs/design-system/direction-and-localization.md +23 -0
- package/docs/design-system/form-recipes.md +73 -0
- package/docs/design-system/gap-promotion-policy.md +21 -0
- package/docs/design-system/gap-promotion-report.md +166 -0
- package/docs/design-system/installation.md +68 -0
- package/docs/design-system/launch-comparison-shadcn.md +98 -0
- package/docs/design-system/registry-and-cli.md +30 -7
- package/docs/design-system/release-policy.md +30 -0
- package/docs/design-system/roadmap.md +14 -0
- package/docs/design-system/support-matrix.md +23 -0
- package/docs/design-system/tabs.md +1 -1
- package/docs/design-system/token-governance.md +23 -1
- package/package.json +29 -15
- package/registry/component-contract.json +40 -0
- package/registry/components/alert-dialog.tsx +1 -1
- package/registry/components/alert.tsx +86 -65
- package/registry/components/autocomplete.tsx +23 -9
- package/registry/components/avatar.tsx +7 -7
- package/registry/components/badge.tsx +1 -1
- package/registry/components/button-group.tsx +321 -4
- package/registry/components/button.tsx +38 -17
- package/registry/components/card.tsx +68 -59
- package/registry/components/carousel.tsx +53 -5
- package/registry/components/chart.tsx +36 -3
- package/registry/components/checkbox.tsx +3 -3
- package/registry/components/collapsible.tsx +1 -1
- package/registry/components/command.tsx +1 -1
- package/registry/components/context-menu.tsx +1 -1
- package/registry/components/date-picker.tsx +245 -104
- package/registry/components/expanded/ActivityFeed.tsx +6 -15
- package/registry/components/expanded/Banner.tsx +3 -3
- package/registry/components/expanded/Breadcrumbs.tsx +5 -5
- package/registry/components/expanded/CatalogComponentsShowcase.tsx +13 -13
- package/registry/components/expanded/CatalogDivider.tsx +1 -1
- package/registry/components/expanded/EmptyState.tsx +1 -1
- package/registry/components/expanded/FileUpload.tsx +9 -2
- package/registry/components/expanded/OnboardingStepListItem.tsx +2 -4
- package/registry/components/expanded/PageHeader.tsx +13 -13
- package/registry/components/expanded/Slideout.tsx +15 -415
- package/registry/components/expanded/Steps.tsx +4 -4
- package/registry/components/expanded/Table.tsx +116 -69
- package/registry/components/expanded/Timeline.tsx +3 -3
- package/registry/components/expanded/activityFeed.css +1 -1
- package/registry/components/expanded/breadcrumbs.css +1 -1
- package/registry/components/expanded/divider.css +1 -1
- package/registry/components/expanded/emptyState.css +1 -1
- package/registry/components/expanded/fileUpload.css +6 -6
- package/registry/components/expanded/slideout.css +9 -685
- package/registry/components/expanded/steps.css +3 -3
- package/registry/components/expanded/table.css +2 -2
- package/registry/components/expanded/timeline.css +2 -2
- package/registry/components/input-content.ts +1 -0
- package/registry/components/input-otp.tsx +13 -3
- package/registry/components/input.tsx +68 -43
- package/registry/components/item.tsx +189 -0
- package/registry/components/kbd.tsx +111 -4
- package/registry/components/menu.tsx +31 -245
- package/registry/components/menubar.tsx +1 -1
- package/registry/components/modal.tsx +142 -102
- package/registry/components/native-select.tsx +2 -2
- package/registry/components/pagination.tsx +80 -58
- package/registry/components/popover.tsx +162 -664
- package/registry/components/radio-card.tsx +116 -87
- package/registry/components/segmented-control.tsx +87 -0
- package/registry/components/select-content.tsx +2 -2
- package/registry/components/select.tsx +52 -16
- package/registry/components/sheet.tsx +1 -1
- package/registry/components/sidebar.tsx +1 -1
- package/registry/components/skeleton.css +0 -3
- package/registry/components/social-button.tsx +47 -25
- package/registry/components/spinner.tsx +18 -55
- package/registry/components/tabs.css +1 -1
- package/registry/components/tabs.tsx +8 -4
- package/registry/components/tag.tsx +2 -2
- package/registry/components/textarea.tsx +3 -3
- package/registry/components/toast.tsx +16 -11
- package/registry/components/toggle.tsx +2 -2
- package/registry/components/toolbar.tsx +89 -17
- package/registry/components/tooltip.tsx +1 -1
- package/registry/examples/alert-demo.tsx +25 -5
- package/registry/examples/attribute-demo.tsx +1 -1
- package/registry/examples/autocomplete-demo.tsx +3 -3
- package/registry/examples/avatar-demo.tsx +7 -7
- package/registry/examples/badge-demo.tsx +1 -1
- package/registry/examples/button-demo.tsx +6 -6
- package/registry/examples/button-group-demo.tsx +23 -2
- package/registry/examples/card-demo.tsx +46 -8
- package/registry/examples/carousel-demo.tsx +20 -2
- package/registry/examples/chart-demo.tsx +1 -1
- package/registry/examples/checkbox-demo.tsx +5 -5
- package/registry/examples/collection-filter-bar-demo.tsx +135 -0
- package/registry/examples/command-demo.tsx +3 -3
- package/registry/examples/{expanded/command-bar-demo.tsx → command-palette-demo.tsx} +5 -15
- package/registry/examples/context-menu-demo.tsx +1 -1
- package/registry/examples/control-density-contract-demo.tsx +61 -0
- package/registry/examples/date-picker-demo.tsx +12 -12
- package/registry/examples/divider-demo.tsx +3 -3
- package/registry/examples/expanded/banner-demo.tsx +1 -1
- package/registry/examples/expanded/breadcrumbs-demo.tsx +1 -1
- package/registry/examples/expanded/empty-state-demo.tsx +1 -1
- package/registry/examples/expanded/file-upload-demo.tsx +1 -1
- package/registry/examples/expanded/onboarding-step-demo.tsx +1 -1
- package/registry/examples/expanded/slideout-demo.tsx +2 -2
- package/registry/examples/expanded/steps-demo.tsx +1 -1
- package/registry/examples/expanded/tabs-demo.tsx +1 -1
- package/registry/examples/expanded/timeline-demo.tsx +1 -1
- package/registry/examples/hover-card-demo.tsx +2 -2
- package/registry/examples/input-demo.tsx +6 -6
- package/registry/examples/input-otp-demo.tsx +4 -4
- package/registry/examples/item-demo.tsx +46 -0
- package/registry/examples/kbd-demo.tsx +1 -1
- package/registry/examples/label-demo.tsx +1 -1
- package/registry/examples/menu-demo.tsx +1 -1
- package/registry/examples/modal-demo.tsx +67 -9
- package/registry/examples/navigation-menu-demo.tsx +1 -1
- package/registry/examples/pagination-demo.tsx +6 -3
- package/registry/examples/popover-demo.tsx +19 -19
- package/registry/examples/progress-demo.tsx +1 -1
- package/registry/examples/progress-slider-demo.tsx +1 -1
- package/registry/examples/radio-card-demo.tsx +4 -4
- package/registry/examples/radio-group-demo.tsx +2 -2
- package/registry/examples/resizable-demo.tsx +1 -1
- package/registry/examples/results-toolbar-demo.tsx +44 -0
- package/registry/examples/scroll-area-demo.tsx +3 -3
- package/registry/examples/segmented-control-demo.tsx +39 -0
- package/registry/examples/select-demo.tsx +1 -1
- package/registry/examples/sidebar-demo.tsx +1 -1
- package/registry/examples/slider-demo.tsx +3 -3
- package/registry/examples/social-button-demo.tsx +18 -8
- package/registry/examples/spinner-demo.tsx +13 -13
- package/registry/examples/tabs-demo.tsx +1 -1
- package/registry/examples/tag-demo.tsx +1 -1
- package/registry/examples/textarea-demo.tsx +4 -4
- package/registry/examples/toast-demo.tsx +1 -1
- package/registry/examples/toggle-demo.tsx +6 -6
- package/registry/examples/tooltip-demo.tsx +4 -4
- package/registry/guidance/USAGE.md +27 -0
- package/registry/hooks/use-direction.ts +193 -13
- package/registry/index.json +5311 -377
- package/registry/styles/globals.css +2440 -4061
- package/registry.json +119 -149
- package/schema/config.schema.json +11 -8
- package/schema/registry.schema.json +150 -45
- package/schema/tokens.schema.json +134 -34
- package/src/cli/command-line.js +194 -0
- package/src/cli/config-editors.js +9 -0
- package/src/cli/doctor.js +399 -0
- package/src/cli/file-transaction.js +295 -0
- package/src/cli/global-css.js +153 -0
- package/src/cli/index.js +567 -1613
- package/src/cli/install-plan.js +592 -0
- package/src/cli/install-receipt.js +171 -0
- package/src/cli/jsonc.js +203 -0
- package/src/cli/package-install-state.js +254 -0
- package/src/cli/package-manager.js +238 -0
- package/src/cli/package-plan.js +185 -0
- package/src/cli/package-version.js +97 -0
- package/src/cli/registry-query.js +207 -0
- package/src/cli/reporting.js +55 -0
- package/src/cli/schema-validation.js +19 -0
- package/src/cli/source-scanner.js +686 -0
- package/src/cli/vite-config.js +478 -0
- package/tokens/banhaten.tokens.json +4312 -309
- package/docs/design-system/components/command-bar.md +0 -57
- package/registry/components/expanded/BannerBoard.tsx +0 -225
- package/registry/components/expanded/CatalogTag.tsx +0 -85
- package/registry/components/expanded/CommandBar.tsx +0 -386
- package/registry/components/expanded/IconExplorer.tsx +0 -612
- package/registry/components/expanded/TimelineShowcase.tsx +0 -158
- package/registry/components/expanded/commandBar.css +0 -470
- package/registry/components/expanded/iconExplorer.css +0 -764
- package/registry/components/expanded/iconPacks.ts +0 -866
- package/registry/components/expanded/tag.css +0 -148
- package/registry/examples/expanded/icons-demo.tsx +0 -5
- package/tokens/Color mode.zip +0 -0
- package/tokens/Numbers.zip +0 -0
- package/tokens/Radius.zip +0 -0
- package/tokens/Theme.zip +0 -0
|
@@ -79,3 +79,17 @@ This component has no special RTL contract beyond inherited document direction a
|
|
|
79
79
|
## Accessibility
|
|
80
80
|
|
|
81
81
|
Keep native semantics, accessible names, keyboard reachability, focus-visible treatment, and status/error announcements intact when composing this component.
|
|
82
|
+
|
|
83
|
+
<!-- registry-contract:start -->
|
|
84
|
+
## Registry Contract
|
|
85
|
+
|
|
86
|
+
This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
|
|
87
|
+
`supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
|
|
88
|
+
|
|
89
|
+
| Field | Values |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| `supportedExports` | `components/expanded/Timeline.tsx: Timeline, TimelineItem` |
|
|
92
|
+
| `parts` | `Timeline`, `TimelineItem` |
|
|
93
|
+
| `registryDependencies` | None |
|
|
94
|
+
| `tokens` | `--bh-bg-brand-default`, `--bh-bg-default`, `--bh-bg-muted`, `--bh-border-brand-strong`, `--bh-border-default`, `--bh-border-subtle`, `--bh-content-default`, `--bh-content-on-brand`, `--bh-content-subtle`, `--bh-font-family`, `--bh-font-weight-regular`, `--bh-font-weight-semibold`, `--bh-icon-stroke-300`, `--bh-radius-full`, `--bh-space-3xl-16`, `--bh-space-4xl-20`, `--bh-space-5xl-24`, `--bh-space-9xl-64`, `--bh-space-lg-10`, `--bh-space-sm-6`, `--bh-space-xl-12`, `--bh-space-xs-4`, `--bh-space-xxs-2`, `--bh-space-xxxs-1`, `--bh-text-base-letter-spacing`, `--bh-text-body-2xs-regular-font-size`, `--bh-text-body-2xs-regular-line-height`, `--bh-text-body-md-font-size`, `--bh-text-body-md-line-height`, `--bh-text-body-sm-regular-font-size`, `--bh-text-body-sm-regular-line-height`, `--bh-timeline-grid-width`, `--bh-timeline-narrow-width`, `--bh-timeline-sidebar-width` |
|
|
95
|
+
<!-- registry-contract:end -->
|
|
@@ -54,3 +54,20 @@ Open the live component page or run `npx banhaten docs toast` to inspect source
|
|
|
54
54
|
- `inheritsDirection`: true
|
|
55
55
|
- `placement`: side="end" resolves to top-right in LTR and top-left in RTL; side="start" resolves to the opposite edge.
|
|
56
56
|
- `textDirection`: Toast content inherits the Toaster direction and uses tokenized typography classes.
|
|
57
|
+
|
|
58
|
+
<!-- registry-contract:start -->
|
|
59
|
+
## Registry Contract
|
|
60
|
+
|
|
61
|
+
This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
|
|
62
|
+
`supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
|
|
63
|
+
|
|
64
|
+
| Field | Values |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `supportedExports` | `components/toast.tsx: Toaster, toast` |
|
|
67
|
+
| `parts` | `Toaster` |
|
|
68
|
+
| `registryDependencies` | None |
|
|
69
|
+
| `features` | `semantic shortcuts`, `action slot`, `close button`, `logical placement`, `toast promise support` |
|
|
70
|
+
| `intents` | `default`, `success`, `danger`, `warning`, `info` |
|
|
71
|
+
| `sides` | `start`, `end` |
|
|
72
|
+
| `tokens` | `--bh-bg-brand-subtle`, `--bh-bg-danger-subtle`, `--bh-bg-info-subtle`, `--bh-bg-neutral-soft`, `--bh-bg-raised`, `--bh-bg-success-subtle`, `--bh-bg-warning-subtle`, `--bh-border-danger-subtle`, `--bh-border-info-subtle`, `--bh-border-subtle`, `--bh-border-success-subtle`, `--bh-border-warning-subtle`, `--bh-content-brand-default`, `--bh-content-danger-default`, `--bh-content-default`, `--bh-content-on-brand`, `--bh-content-subtle`, `--bh-content-success-default`, `--bh-content-warning-default`, `--bh-control-default`, `--bh-font-family`, `--bh-interactive-brand-default`, `--bh-radius-xl-10`, `--bh-space-lg-10`, `--bh-space-xs-4`, `--bh-text-body-sm-semibold-font-size`, `--bh-text-body-sm-semibold-font-weight`, `--bh-text-body-sm-semibold-letter-spacing`, `--bh-text-body-sm-semibold-line-height`, `--bh-text-body-xs-regular-font-size`, `--bh-text-body-xs-regular-font-weight`, `--bh-text-body-xs-regular-letter-spacing`, `--bh-text-body-xs-regular-line-height`, `--bh-toast-accent`, `--bh-toast-accent-bg`, `--shadow-component-default` |
|
|
73
|
+
<!-- registry-contract:end -->
|
|
@@ -77,3 +77,20 @@ Covered source files: `components/toggle.tsx`.
|
|
|
77
77
|
## Accessibility
|
|
78
78
|
|
|
79
79
|
This component relies on `@radix-ui/react-switch` for its base accessibility behavior. Keep required labels, titles, descriptions, and focusable trigger/content relationships intact when composing it.
|
|
80
|
+
|
|
81
|
+
<!-- registry-contract:start -->
|
|
82
|
+
## Registry Contract
|
|
83
|
+
|
|
84
|
+
This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
|
|
85
|
+
`supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
|
|
86
|
+
|
|
87
|
+
| Field | Values |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| `supportedExports` | `components/toggle.tsx: Toggle, ToggleField, toggleFieldVariants, toggleVariants` |
|
|
90
|
+
| `parts` | `Toggle`, `ToggleField` |
|
|
91
|
+
| `registryDependencies` | None |
|
|
92
|
+
| `features` | `optional handle icons`, `leading label`, `trailing label`, `supporting text` |
|
|
93
|
+
| `sizes` | `sm`, `md` |
|
|
94
|
+
| `states` | `unchecked`, `checked`, `hover`, `focused`, `disabled` |
|
|
95
|
+
| `tokens` | `--bh-content-default`, `--bh-content-disabled`, `--bh-content-on-light`, `--bh-content-subtle`, `--bh-icon-stroke-250`, `--bh-interactive-switch-active`, `--bh-interactive-switch-active-disabled`, `--bh-interactive-switch-active-hover`, `--bh-interactive-switch-default`, `--bh-interactive-switch-disabled`, `--bh-interactive-switch-handle`, `--bh-interactive-switch-handle-disabled`, `--bh-interactive-switch-hover`, `--bh-menu-switch-handle-size`, `--bh-menu-switch-height`, `--bh-menu-switch-padding`, `--bh-menu-switch-width`, `--bh-radius-full`, `--bh-space-3xl-16`, `--bh-space-5xl-24`, `--bh-space-lg-10`, `--bh-space-md-8`, `--bh-space-sm-6`, `--bh-space-xl-12`, `--bh-space-xxs-2`, `--bh-text-body-md-medium-font-weight`, `--bh-text-body-md-regular-font-size`, `--bh-text-body-md-regular-font-weight`, `--bh-text-body-md-regular-letter-spacing`, `--bh-text-body-md-regular-line-height`, `--bh-text-body-xs-regular-font-size`, `--bh-text-body-xs-regular-font-weight`, `--bh-text-body-xs-regular-letter-spacing`, `--bh-text-body-xs-regular-line-height`, `--bh-toggle-handle-size`, `--bh-toggle-icon-size-md`, `--bh-toggle-icon-size-sm`, `--bh-toggle-offset`, `--shadow-component-default`, `--shadow-social-button-focus-ring` |
|
|
96
|
+
<!-- registry-contract:end -->
|
|
@@ -61,7 +61,7 @@ Set `dir="rtl"` on `Toolbar` or inherit it from the document. Sections, fields,
|
|
|
61
61
|
|
|
62
62
|
## API
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Supported runtime exports: `Toolbar`, `ToolbarBadge`, `ToolbarButton`, `ToolbarFilterButton`, `ToolbarIconButton`, `ToolbarMoreButton`, `ToolbarSearch`, `ToolbarSection`, `ToolbarSelect`, `ToolbarSpacer`, `ToolbarText`, `toolbarBadgeVariants`, `toolbarButtonVariants`, `toolbarSearchVariants`, `toolbarSectionVariants`, `toolbarSelectVariants`, `toolbarVariants`.
|
|
65
65
|
|
|
66
66
|
| Contract | Values |
|
|
67
67
|
| --- | --- |
|
|
@@ -83,3 +83,23 @@ Open the live component page or run `npx banhaten docs toolbar` to inspect sourc
|
|
|
83
83
|
## Accessibility
|
|
84
84
|
|
|
85
85
|
This component relies on `@radix-ui/react-slot` for its base accessibility behavior. Keep required labels, titles, descriptions, and focusable trigger/content relationships intact when composing it.
|
|
86
|
+
|
|
87
|
+
<!-- registry-contract:start -->
|
|
88
|
+
## Registry Contract
|
|
89
|
+
|
|
90
|
+
This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
|
|
91
|
+
`supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
|
|
92
|
+
|
|
93
|
+
| Field | Values |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `supportedExports` | `components/toolbar.tsx: Toolbar, ToolbarBadge, ToolbarButton, ToolbarFilterButton, ToolbarIconButton, ToolbarMoreButton, ToolbarSearch, ToolbarSection, ToolbarSelect, ToolbarSpacer, ToolbarText, toolbarBadgeVariants, toolbarButtonVariants, toolbarSearchVariants, toolbarSectionVariants, toolbarSelectVariants, toolbarVariants` |
|
|
96
|
+
| `parts` | `Toolbar`, `ToolbarSection`, `ToolbarSearch`, `ToolbarSelect`, `ToolbarButton`, `ToolbarIconButton`, `ToolbarFilterButton`, `ToolbarMoreButton`, `ToolbarBadge`, `ToolbarText`, `ToolbarSpacer` |
|
|
97
|
+
| `registryDependencies` | `kbd` |
|
|
98
|
+
| `props.density` | `"compact" \| "default" \| "comfortable"; default "default"; Aligns Toolbar Search, Select, Text, and Button controls to the shared 32px, 36px, or 40px control contract.` |
|
|
99
|
+
| `props.shortcutKeys` | `readonly string[]; default null; Adds shared, platform-aware Kbd keycaps to ToolbarSearch without rebuilding a shortcut badge locally.` |
|
|
100
|
+
| `breakpoints` | `desktop`, `mobile` |
|
|
101
|
+
| `densities` | `compact`, `default`, `comfortable` |
|
|
102
|
+
| `layouts` | `inline`, `split`, `stack`, `wrap` |
|
|
103
|
+
| `styles` | `filter-fields`, `filter-actions`, `selection-actions`, `grouped-fields`, `field-grid`, `inline-search`, `filter-chips`, `saved-segment` |
|
|
104
|
+
| `tokens` | `--bh-bg-brand-subtle`, `--bh-bg-default-hover`, `--bh-bg-neutral-subtle`, `--bh-border-brand-strong`, `--bh-border-danger-strong`, `--bh-border-default`, `--bh-border-disabled`, `--bh-border-width-default`, `--bh-button-gap`, `--bh-button-gap-xs`, `--bh-button-icon-offset`, `--bh-button-icon-size`, `--bh-button-label-padding-x`, `--bh-button-md-height`, `--bh-button-md-padding-x`, `--bh-button-sm-height`, `--bh-button-sm-padding-x`, `--bh-button-sm-padding-y`, `--bh-button-xs-height`, `--bh-button-xs-padding-x`, `--bh-content-brand-default`, `--bh-content-default`, `--bh-content-disabled`, `--bh-content-muted`, `--bh-content-on-brand`, `--bh-content-subtle`, `--bh-control-default`, `--bh-input-comfortable-height`, `--bh-input-comfortable-padding-x`, `--bh-input-content-gap`, `--bh-input-lg-height`, `--bh-input-lg-padding-x`, `--bh-input-md-height`, `--bh-input-md-padding-x`, `--bh-input-radius`, `--bh-input-width`, `--bh-interactive-brand-default`, `--bh-interactive-brand-disabled`, `--bh-interactive-brand-hover`, `--bh-interactive-brand-pressed`, `--bh-interactive-ghost-default`, `--bh-interactive-ghost-disabled`, `--bh-interactive-ghost-hover`, `--bh-interactive-ghost-pressed`, `--bh-interactive-input-default`, `--bh-interactive-input-disabled`, `--bh-interactive-outlined-default`, `--bh-interactive-outlined-disabled`, `--bh-interactive-outlined-hover`, `--bh-interactive-outlined-pressed`, `--bh-interactive-soft-default`, `--bh-interactive-soft-disabled`, `--bh-interactive-soft-hover`, `--bh-interactive-soft-pressed`, `--bh-radius-full`, `--bh-select-icon-size`, `--bh-select-icon-slot-size`, `--bh-select-trigger-padding-x`, `--bh-select-width`, `--bh-space-3xl-16`, `--bh-space-5xl-24`, `--bh-space-md-8`, `--bh-space-none`, `--bh-space-xl-12`, `--bh-space-xs-4`, `--bh-text-body-2xs-medium-font-size`, `--bh-text-body-2xs-medium-font-weight`, `--bh-text-body-2xs-medium-letter-spacing`, `--bh-text-body-2xs-medium-line-height`, `--bh-text-body-md-regular-font-size`, `--bh-text-body-md-regular-font-weight`, `--bh-text-body-md-regular-letter-spacing`, `--bh-text-body-md-regular-line-height`, `--bh-text-button-font-size`, `--bh-text-button-font-weight`, `--bh-text-button-letter-spacing`, `--bh-text-button-line-height`, `--shadow-button-danger-focus`, `--shadow-button-focus`, `--shadow-button-raised`, `--shadow-button-soft`, `--shadow-input`, `--shadow-input-focus-ring`, `--shadow-select-trigger` |
|
|
105
|
+
<!-- registry-contract:end -->
|
|
@@ -59,7 +59,7 @@ Tooltip content uses inherited direction and `dir="auto"` text. Top and bottom l
|
|
|
59
59
|
|
|
60
60
|
## API
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Supported runtime exports: `Tooltip`, `TooltipCloseButton`, `TooltipContent`, `TooltipPortal`, `TooltipProvider`, `TooltipRoot`, `TooltipShortcut`, `TooltipTrigger`, `tooltipContentVariants`.
|
|
63
63
|
|
|
64
64
|
| Contract | Values |
|
|
65
65
|
| --- | --- |
|
|
@@ -88,3 +88,20 @@ Covered source files: `components/tooltip.tsx`.
|
|
|
88
88
|
## Accessibility
|
|
89
89
|
|
|
90
90
|
This component relies on `@radix-ui/react-tooltip` for its base accessibility behavior. Keep required labels, titles, descriptions, and focusable trigger/content relationships intact when composing it.
|
|
91
|
+
|
|
92
|
+
<!-- registry-contract:start -->
|
|
93
|
+
## Registry Contract
|
|
94
|
+
|
|
95
|
+
This table is generated from `registry/index.json`; edit the component-owned source under `registry/catalog/components/`, not this table or the compiled index.
|
|
96
|
+
`supportedExports` is the exhaustive runtime import contract grouped by source module. `parts` is an ordered, non-exhaustive anatomy list.
|
|
97
|
+
|
|
98
|
+
| Field | Values |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| `supportedExports` | `components/tooltip.tsx: Tooltip, TooltipCloseButton, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipShortcut, TooltipTrigger, tooltipContentVariants` |
|
|
101
|
+
| `parts` | `Tooltip`, `TooltipRoot`, `TooltipTrigger`, `TooltipContent`, `TooltipProvider`, `TooltipPortal`, `TooltipShortcut`, `TooltipCloseButton` |
|
|
102
|
+
| `registryDependencies` | None |
|
|
103
|
+
| `pointerPositions` | `top-left`, `top-center`, `top-right`, `bottom-left`, `bottom-center`, `bottom-right`, `center-right`, `center-left`, `none` |
|
|
104
|
+
| `sizes` | `sm`, `lg` |
|
|
105
|
+
| `tokens` | `--bh-bg-always-dark`, `--bh-bg-neutral-soft`, `--bh-bg-neutral-subtle`, `--bh-bg-raised`, `--bh-border-inverse-subtle`, `--bh-border-subtle`, `--bh-border-width-default`, `--bh-content-default`, `--bh-content-on-color`, `--bh-content-subtle`, `--bh-font-family`, `--bh-icon-stroke-200`, `--bh-interactive-ghost-hover`, `--bh-radius-full`, `--bh-radius-sm-4`, `--bh-space-md-8`, `--bh-space-none`, `--bh-space-xs-4`, `--bh-space-xxxs-1`, `--bh-text-base-letter-spacing`, `--bh-text-body-2xs-medium-font-size`, `--bh-text-body-2xs-medium-font-weight`, `--bh-text-body-2xs-medium-letter-spacing`, `--bh-text-body-2xs-medium-line-height`, `--bh-text-body-2xs-regular-font-size`, `--bh-text-body-2xs-regular-font-weight`, `--bh-text-body-2xs-regular-letter-spacing`, `--bh-text-body-2xs-regular-line-height`, `--bh-text-body-sm-medium-font-size`, `--bh-text-body-sm-medium-font-weight`, `--bh-text-body-sm-medium-letter-spacing`, `--bh-text-body-sm-medium-line-height`, `--bh-tooltip-bg`, `--bh-tooltip-border`, `--bh-tooltip-close-fg`, `--bh-tooltip-close-icon-size`, `--bh-tooltip-close-size`, `--bh-tooltip-fg`, `--bh-tooltip-lg-padding`, `--bh-tooltip-lg-radius`, `--bh-tooltip-lg-width`, `--bh-tooltip-max-width`, `--bh-tooltip-pointer-border-depth`, `--bh-tooltip-pointer-border-half-width`, `--bh-tooltip-pointer-border-offset`, `--bh-tooltip-pointer-depth`, `--bh-tooltip-pointer-half-width`, `--bh-tooltip-pointer-inline-offset`, `--bh-tooltip-pointer-offset`, `--bh-tooltip-pointer-width`, `--bh-tooltip-shadow`, `--bh-tooltip-shortcut-bg`, `--bh-tooltip-shortcut-border`, `--bh-tooltip-shortcut-height`, `--bh-tooltip-shortcut-min-width`, `--bh-tooltip-sm-padding-x`, `--bh-tooltip-sm-padding-y`, `--bh-tooltip-sm-radius`, `--bh-z-overlay`, `--bh-z-raised`, `--shadow-button-focus`, `--shadow-component-default` |
|
|
106
|
+
| `variants` | `dark`, `default` |
|
|
107
|
+
<!-- registry-contract:end -->
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Density and Elevation
|
|
2
|
+
|
|
3
|
+
## Density
|
|
4
|
+
|
|
5
|
+
Banhaten exposes one semantic density contract for controls that must align in a
|
|
6
|
+
product surface:
|
|
7
|
+
|
|
8
|
+
| Density | Height | Typical use |
|
|
9
|
+
| --- | ---: | --- |
|
|
10
|
+
| `compact` | 32px | Dense desktop tables and constrained toolbars |
|
|
11
|
+
| `default` | 36px | Standard forms, search, filters, and actions |
|
|
12
|
+
| `comfortable` | 40px | Prominent forms and less dense product areas |
|
|
13
|
+
|
|
14
|
+
Use `density` when Input, Select, Date Picker, Button, Button Group, Segmented
|
|
15
|
+
Control, or Toolbar controls sit in the same row. The semantic prop overrides
|
|
16
|
+
the component's legacy `size` prop. Existing `size` values remain supported for
|
|
17
|
+
compatibility and for component-specific variants outside the shared 32/36/40
|
|
18
|
+
control family.
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
<Input density="default" />
|
|
22
|
+
<Select density="default" />
|
|
23
|
+
<DatePicker density="default" />
|
|
24
|
+
<Button density="default">Apply</Button>
|
|
25
|
+
<ToggleGroup density="default" />
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Do not align controls by adding raw `h-*`, padding, radius, or font-size
|
|
29
|
+
utilities. Choose one semantic density at the containing form or toolbar and
|
|
30
|
+
pass it to every control. Compact controls are intended for pointer-led desktop
|
|
31
|
+
interfaces; products with touch requirements should prefer `comfortable` or
|
|
32
|
+
provide a larger interaction target around the control.
|
|
33
|
+
|
|
34
|
+
This is a component composition contract, not a global scale transform. It does
|
|
35
|
+
not silently resize navigation, cards, typography, or unrelated layout spacing.
|
|
36
|
+
|
|
37
|
+
## Elevation
|
|
38
|
+
|
|
39
|
+
Elevation uses two layers:
|
|
40
|
+
|
|
41
|
+
- General steps: `--shadow-xs` through `--shadow-xl`.
|
|
42
|
+
- Semantic component aliases: `--shadow-component-*`, focus/danger rings, menus, controls, and component-specific aliases.
|
|
43
|
+
|
|
44
|
+
Components consume the semantic alias that describes purpose rather than selecting a visual step directly. The Shadows documentation groups aliases under their canonical effect and distinguishes surface elevation, control strokes, focus rings, overlay elevation, and intentional `none` values.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Direction and Localization
|
|
2
|
+
|
|
3
|
+
Banhaten is Arabic and English-first, but text direction and language are separate contracts. Components resolve direction from an explicit `dir`, `DirectionProvider`, the nearest valid `[dir]` ancestor, or the document root—in that order. Direction changes layout, icon mirroring, and keyboard geometry; it never selects translated UI or accessibility copy.
|
|
4
|
+
|
|
5
|
+
Use a request-known direction provider for server rendering so the server markup, hydration snapshot, and first paint agree:
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DirectionProvider } from "@/hooks/use-direction"
|
|
9
|
+
import {
|
|
10
|
+
arabicPaginationMessages,
|
|
11
|
+
Pagination,
|
|
12
|
+
} from "@/components/ui/pagination"
|
|
13
|
+
|
|
14
|
+
<DirectionProvider dir="rtl">
|
|
15
|
+
<Pagination messages={arabicPaginationMessages} />
|
|
16
|
+
</DirectionProvider>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`DirectionProvider dir="rtl"` works equally well with English, Arabic, Hebrew, Persian, or Urdu. Choose a component's `messages` catalog from the product locale, or pass its direct label props. The exported Arabic catalogs are conveniences, not RTL defaults.
|
|
20
|
+
|
|
21
|
+
Without an explicit prop or provider, server output uses a stable LTR snapshot. After hydration, one shared subscription per document synchronizes consumers with the nearest nested boundary or document root. This avoids hydration mismatches and per-component document observers. For an RTL first paint, provide the request-known direction during SSR.
|
|
22
|
+
|
|
23
|
+
Use logical CSS properties (`start`, `end`, `margin-inline`, `padding-inline`) and `dir="auto"` for user-authored copy. Test mixed-language content, punctuation, numbers, icon mirroring, arrow-key behavior, focus order, portal content, and screen-reader names in every supported direction and locale combination.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Form Recipes
|
|
2
|
+
|
|
3
|
+
## Labeled field with validation
|
|
4
|
+
|
|
5
|
+
Compose `Field`, `FieldLabel`, `FieldControl`, `FieldDescription`, and `FieldError`. Associate the input with its label, keep help text stable, and announce errors only when validation has run.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
<Field invalid={Boolean(error)}>
|
|
9
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
10
|
+
<FieldControl>
|
|
11
|
+
<Input id="email" state={error ? "error" : "default"} />
|
|
12
|
+
</FieldControl>
|
|
13
|
+
<FieldDescription>Use your work email.</FieldDescription>
|
|
14
|
+
{error ? <FieldError>{error}</FieldError> : null}
|
|
15
|
+
</Field>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Selection and dates
|
|
19
|
+
|
|
20
|
+
Use `Select` for a bounded option set, `Autocomplete` for searchable options, and `DatePicker`/`DateRangePicker` for calendar input. Controlled values are preferred when validation, persistence, or URL state owns the result.
|
|
21
|
+
|
|
22
|
+
Do not emulate a date field with `Input`, a typed `@`, or a generic trailing icon. The Date Picker owns the calendar affordance, keyboard behavior, formatted value, and the same semantic density contract as the surrounding controls.
|
|
23
|
+
|
|
24
|
+
## Golden recipe: collection filter bar
|
|
25
|
+
|
|
26
|
+
Use the complete [`CollectionFilterBarDemo`](../../registry/examples/collection-filter-bar-demo.tsx) recipe for collection and search screens. It establishes the approved composition:
|
|
27
|
+
|
|
28
|
+
- `ToolbarSearch` is full width and uses `shortcutKeys={["Mod", "F"]}` so Command and Control resolve by platform.
|
|
29
|
+
- `DatePicker` owns the From and To fields.
|
|
30
|
+
- `Select` owns Type and Order; `ToolbarSelect` is only a trigger-shaped primitive and is not a complete menu.
|
|
31
|
+
- Every control declares `density="default"`; responsive width classes do not replace component height, padding, radius, or typography.
|
|
32
|
+
- The Reset action uses the same density and resets all composed controls.
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
<form aria-label="Collection filters" data-recipe="collection-filter-bar">
|
|
36
|
+
<ToolbarSearch
|
|
37
|
+
aria-label="Search bookmarks"
|
|
38
|
+
density="default"
|
|
39
|
+
shortcutKeys={["Mod", "F"]}
|
|
40
|
+
width="full"
|
|
41
|
+
/>
|
|
42
|
+
<div className="flex flex-wrap items-end gap-3">
|
|
43
|
+
<DatePicker density="default" triggerProps={{ "aria-label": "From" }} />
|
|
44
|
+
<DatePicker density="default" triggerProps={{ "aria-label": "To" }} />
|
|
45
|
+
<Select density="default" value="Everything">{/* items */}</Select>
|
|
46
|
+
<Select density="default" value="Recently bookmarked">{/* items */}</Select>
|
|
47
|
+
<ToolbarButton density="default" type="reset" variant="link">Reset</ToolbarButton>
|
|
48
|
+
</div>
|
|
49
|
+
</form>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Golden recipe: results toolbar
|
|
53
|
+
|
|
54
|
+
Use the complete [`ResultsToolbarDemo`](../../registry/examples/results-toolbar-demo.tsx) recipe for result counts, layout selection, and batch actions. `SegmentedControl` is the approved content-width primitive for small mutually exclusive values such as cards per row.
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
<Toolbar aria-label="Bookmark results" layout="split" wrap>
|
|
58
|
+
<ToolbarText density="default"><strong>5,371</strong> bookmarks</ToolbarText>
|
|
59
|
+
<ToolbarSection align="end" wrap>
|
|
60
|
+
<SegmentedControl aria-label="Cards per row" defaultValue="4" density="default">
|
|
61
|
+
<SegmentedControlLabel>Cards / row</SegmentedControlLabel>
|
|
62
|
+
{[3, 4, 5, 6].map((count) => (
|
|
63
|
+
<SegmentedControlItem key={count} value={String(count)}>{count}</SegmentedControlItem>
|
|
64
|
+
))}
|
|
65
|
+
</SegmentedControl>
|
|
66
|
+
<ToolbarButton density="default" variant="outline">Select</ToolbarButton>
|
|
67
|
+
</ToolbarSection>
|
|
68
|
+
</Toolbar>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## RTL forms
|
|
72
|
+
|
|
73
|
+
Set direction at the form or application boundary. Labels and helper text use logical alignment; OTP, calendar, pagination, and selection keyboard movement resolve the inherited direction. Localize labels, placeholders, validation messages, date formatting, and number formatting in the product layer.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Gap promotion policy
|
|
2
|
+
|
|
3
|
+
Every visual-QA background records missing components, assets, composition patterns, and tokens as structured gap metadata. The promotion report groups recurring needs across backgrounds and flags any normalized need seen in three or more distinct scenarios.
|
|
4
|
+
|
|
5
|
+
Run:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm --prefix playground run report:gap-promotions
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The generated [Gap Promotion Report](./gap-promotion-report.md) is checked during background tests. Common needs are classified automatically; add `promotionKey` to a gap when two differently worded gaps represent the same reusable need or when a heuristic would group unrelated needs.
|
|
12
|
+
|
|
13
|
+
A candidate does not automatically become a component. Promotion requires:
|
|
14
|
+
|
|
15
|
+
1. Evidence from at least three backgrounds.
|
|
16
|
+
2. A smallest-stable API and explicit fit/avoid guidance.
|
|
17
|
+
3. Semantic density, state, accessibility, and RTL contracts where applicable.
|
|
18
|
+
4. Migration of at least one real background away from its local fallback.
|
|
19
|
+
5. Behavior and visual tests before resolved gap metadata is removed.
|
|
20
|
+
|
|
21
|
+
The first application of this policy produced `SegmentedControl`, migrated the CRM Intelligence background to the shared primitive, and removed its former local segmented-control gap.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Gap promotion report
|
|
2
|
+
|
|
3
|
+
This file is generated from background scenario gap metadata. A candidate appears when the same normalized need occurs in at least three distinct backgrounds. Heuristics cover common shells, navigation, tables, steps, composers, timelines, assets, and elevation; use `promotionKey` on a gap when an explicit cross-background grouping is more accurate.
|
|
4
|
+
|
|
5
|
+
Scanned 194 gaps across 36 backgrounds. Found 8 promotion candidates at the 3-background threshold.
|
|
6
|
+
|
|
7
|
+
## Application/workspace shell
|
|
8
|
+
|
|
9
|
+
Key: `application-workspace-shell` · 20 backgrounds
|
|
10
|
+
|
|
11
|
+
Backgrounds: `accounting-workspace-setup`, `acme-finance-advisor`, `ai-node-detail`, `audit-log`, `bauhow-room-planning`, `benefits-enrollment`, `data-source-browser`, `debt-payoff`, `delivery-tracking`, `hooch-storefront-dashboard`, `inference-providers`, `marcohr-people`, `order-shipment-timeline`, `people-add-member`, `quran-audio-add-employee`, `recent-orders`, `school-assignments`, `shipment-list`, `sku-management`, `stripe-demo-account`
|
|
12
|
+
|
|
13
|
+
| Background | Gap | Kind | Status |
|
|
14
|
+
| --- | --- | --- | --- |
|
|
15
|
+
| `accounting-workspace-setup` | onboarding workspace shell (`setup-onboarding-shell`) | layout/composition pattern | missing |
|
|
16
|
+
| `acme-finance-advisor` | finance advisor workspace shell (`acme-finance-workspace-shell`) | layout/composition pattern | missing |
|
|
17
|
+
| `ai-node-detail` | node graph workspace shell (`node-graph-workspace-shell`) | layout/composition pattern | missing |
|
|
18
|
+
| `audit-log` | audit browser workspace shell (`audit-browser-workspace-shell`) | layout/composition pattern | missing |
|
|
19
|
+
| `bauhow-room-planning` | room-planning workspace shell (`room-planning-workspace-shell`) | layout/composition pattern | missing |
|
|
20
|
+
| `benefits-enrollment` | benefits enrollment screen shell (`angled-benefits-screen-shell`) | layout/composition pattern | missing |
|
|
21
|
+
| `data-source-browser` | desktop browser and app-shell scene (`desktop-browser-and-app-shell-scene`) | layout/composition pattern | missing |
|
|
22
|
+
| `debt-payoff` | finance workspace shell (`finance-workspace-shell`) | layout/composition pattern | missing |
|
|
23
|
+
| `delivery-tracking` | delivery tracking dashboard shell (`delivery-tracking-dashboard-shell`) | layout/composition pattern | missing |
|
|
24
|
+
| `hooch-storefront-dashboard` | storefront dashboard workspace shell (`hooch-workspace-shell`) | layout/composition pattern | missing |
|
|
25
|
+
| `inference-providers` | inference settings workspace shell (`settings-workspace-shell`) | layout/composition pattern | missing |
|
|
26
|
+
| `marcohr-people` | HR workspace shell (`marcohr-workspace-shell`) | layout/composition pattern | missing |
|
|
27
|
+
| `order-shipment-timeline` | cropped order workspace shell (`cropped-order-workspace-shell`) | layout/composition pattern | missing |
|
|
28
|
+
| `people-add-member` | HR workspace shell (`people-hr-workspace-shell`) | layout/composition pattern | missing |
|
|
29
|
+
| `quran-audio-add-employee` | people-and-culture workspace shell (`quran-audio-workspace-shell`) | layout/composition pattern | missing |
|
|
30
|
+
| `recent-orders` | orders dashboard workspace shell (`recent-orders-workspace-shell`) | layout/composition pattern | missing |
|
|
31
|
+
| `school-assignments` | school app workspace shell (`school-app-workspace-shell`) | layout/composition pattern | missing |
|
|
32
|
+
| `shipment-list` | shipment management workspace shell (`shipment-list-workspace-shell`) | layout/composition pattern | missing |
|
|
33
|
+
| `sku-management` | SKU management workspace shell (`sku-management-workspace-shell`) | layout/composition pattern | missing |
|
|
34
|
+
| `stripe-demo-account` | payments dashboard shell (`payments-dashboard-shell`) | layout/composition pattern | missing |
|
|
35
|
+
|
|
36
|
+
## Brand and product icon assets
|
|
37
|
+
|
|
38
|
+
Key: `brand-icon-assets` · 16 backgrounds
|
|
39
|
+
|
|
40
|
+
Backgrounds: `ai-growth-marketing`, `ai-node-detail`, `bauhow-room-planning`, `crm-intelligence`, `data-source-browser`, `debt-payoff`, `email-compose`, `inference-providers`, `investor-profile`, `model-overview`, `mora-attio-integration`, `order-shipment-timeline`, `profile-menu`, `refund-simulation`, `shipment-list`, `sku-management`
|
|
41
|
+
|
|
42
|
+
| Background | Gap | Kind | Status |
|
|
43
|
+
| --- | --- | --- | --- |
|
|
44
|
+
| `ai-growth-marketing` | AI provider and company marks (`ai-provider-and-company-marks`) | icon asset | missing |
|
|
45
|
+
| `ai-node-detail` | node and action icon assets (`node-directional-provider-icons`) | icon asset | approximation |
|
|
46
|
+
| `bauhow-room-planning` | Bauhow brand and navigation glyphs (`room-planning-brand-glyphs`) | icon asset | approximation |
|
|
47
|
+
| `crm-intelligence` | brand logo mark (`brand-logo-mark`) | icon asset | missing |
|
|
48
|
+
| `data-source-browser` | Programa and vendor glyphs (`programa-and-vendor-glyphs`) | icon asset | missing |
|
|
49
|
+
| `debt-payoff` | finance brand and navigation glyphs (`finance-brand-glyphs`) | icon asset | approximation |
|
|
50
|
+
| `email-compose` | verified badge and model mark (`verified-badge-and-model-mark`) | icon asset | missing |
|
|
51
|
+
| `inference-providers` | provider brand marks (`provider-brand-marks`) | icon asset | approximation |
|
|
52
|
+
| `investor-profile` | verification and brand marks (`verification-and-brand-marks`) | icon asset | missing |
|
|
53
|
+
| `model-overview` | Mistral logo (`mistral-logo`) | icon asset | missing |
|
|
54
|
+
| `mora-attio-integration` | Mora and Attio brand marks (`mora-attio-brand-assets`) | icon asset | approximation |
|
|
55
|
+
| `order-shipment-timeline` | carrier mark (`carrier-mark`) | icon asset | missing |
|
|
56
|
+
| `profile-menu` | reference icon family (`reference-icon-family`) | icon asset | missing |
|
|
57
|
+
| `refund-simulation` | customer identity glyph (`customer-identity-glyph`) | icon asset | missing |
|
|
58
|
+
| `shipment-list` | carrier brand mark (`shipment-carrier-brand-mark`) | icon asset | approximation |
|
|
59
|
+
| `sku-management` | product and assistant icon set (`sku-product-icons`) | icon asset | approximation |
|
|
60
|
+
|
|
61
|
+
## Sidebar navigation
|
|
62
|
+
|
|
63
|
+
Key: `sidebar-navigation` · 11 backgrounds
|
|
64
|
+
|
|
65
|
+
Backgrounds: `acme-finance-advisor`, `ai-growth-marketing`, `audit-log`, `bauhow-room-planning`, `data-source-browser`, `debt-payoff`, `marcohr-people`, `people-add-member`, `shipment-list`, `sku-management`, `stripe-demo-account`
|
|
66
|
+
|
|
67
|
+
| Background | Gap | Kind | Status |
|
|
68
|
+
| --- | --- | --- | --- |
|
|
69
|
+
| `acme-finance-advisor` | compact app sidebar navigation (`acme-sidebar-navigation`) | component | missing |
|
|
70
|
+
| `ai-growth-marketing` | report sidebar navigation (`report-sidebar-navigation`) | component | missing |
|
|
71
|
+
| `audit-log` | audit sidebar navigation (`audit-sidebar-navigation`) | component | missing |
|
|
72
|
+
| `bauhow-room-planning` | planning sidebar navigation (`room-planning-sidebar-navigation`) | component | missing |
|
|
73
|
+
| `data-source-browser` | sidebar navigation with pinned list (`sidebar-navigation-with-pinned-list`) | component | missing |
|
|
74
|
+
| `debt-payoff` | planning sidebar navigation (`planning-sidebar-navigation`) | component | missing |
|
|
75
|
+
| `marcohr-people` | HR sidebar navigation (`marcohr-sidebar-navigation`) | component | missing |
|
|
76
|
+
| `people-add-member` | HR sidebar navigation (`people-sidebar-navigation`) | component | missing |
|
|
77
|
+
| `shipment-list` | shipment sidebar navigation (`shipment-sidebar-navigation`) | component | missing |
|
|
78
|
+
| `sku-management` | cropped app sidebar navigation (`sku-sidebar-navigation`) | component | missing |
|
|
79
|
+
| `stripe-demo-account` | payments sidebar navigation (`payments-sidebar-navigation`) | component | missing |
|
|
80
|
+
|
|
81
|
+
## Data table pattern
|
|
82
|
+
|
|
83
|
+
Key: `data-table-pattern` · 10 backgrounds
|
|
84
|
+
|
|
85
|
+
Backgrounds: `audit-log`, `debt-payoff`, `inference-providers`, `marcohr-people`, `people-add-member`, `recent-orders`, `school-assignments`, `share-of-voice`, `sku-management`, `stripe-demo-account`
|
|
86
|
+
|
|
87
|
+
| Background | Gap | Kind | Status |
|
|
88
|
+
| --- | --- | --- | --- |
|
|
89
|
+
| `audit-log` | audit activity table (`audit-activity-table`) | component | missing |
|
|
90
|
+
| `debt-payoff` | debt table and pagination (`debt-table-and-pagination`) | component | approximation |
|
|
91
|
+
| `inference-providers` | expandable provider configuration table (`expandable-provider-table`) | component | missing |
|
|
92
|
+
| `marcohr-people` | employee policy table (`marcohr-employee-table`) | component | approximation |
|
|
93
|
+
| `people-add-member` | people table with status rows (`people-table-and-status-rows`) | component | approximation |
|
|
94
|
+
| `recent-orders` | orders table controls and rows (`orders-table-region`) | component | approximation |
|
|
95
|
+
| `school-assignments` | assignments table (`assignments-table`) | component | missing |
|
|
96
|
+
| `share-of-voice` | analytics table density (`share-of-voice-analytics-table`) | component | approximation |
|
|
97
|
+
| `sku-management` | SKU data table and pagination (`sku-data-table`) | component | approximation |
|
|
98
|
+
| `stripe-demo-account` | metric table cards (`metric-table-cards`) | component | approximation |
|
|
99
|
+
| `stripe-demo-account` | sales tabs and table (`sales-tabs-and-table`) | component | approximation |
|
|
100
|
+
|
|
101
|
+
## Elevation/blur semantic effects
|
|
102
|
+
|
|
103
|
+
Key: `elevation-effects` · 10 backgrounds
|
|
104
|
+
|
|
105
|
+
Backgrounds: `ai-growth-marketing`, `audit-log`, `data-source-browser`, `email-compose`, `investor-profile`, `model-overview`, `profile-menu`, `refund-simulation`, `school-assignments`, `share-of-voice`
|
|
106
|
+
|
|
107
|
+
| Background | Gap | Kind | Status |
|
|
108
|
+
| --- | --- | --- | --- |
|
|
109
|
+
| `ai-growth-marketing` | near-black overlay and chart glow (`near-black-overlay-and-chart-glow`) | token | missing |
|
|
110
|
+
| `audit-log` | audit blur and elevation (`audit-blur-and-elevation`) | token | missing |
|
|
111
|
+
| `data-source-browser` | browser chrome radius and elevation (`browser-chrome-radius-and-elevation`) | token | missing |
|
|
112
|
+
| `email-compose` | large composer radius/elevation (`large-composer-radius-elevation`) | token | missing |
|
|
113
|
+
| `investor-profile` | large card radius and soft elevation (`large-card-radius-and-soft-elevation`) | token | missing |
|
|
114
|
+
| `model-overview` | backdrop blur and modal elevation (`backdrop-blur-and-modal-elevation`) | token | missing |
|
|
115
|
+
| `profile-menu` | large radius and reflection elevation (`large-radius-and-reflection-elevation`) | token | missing |
|
|
116
|
+
| `refund-simulation` | warm canvas and large elevation (`warm-canvas-and-large-elevation`) | token | missing |
|
|
117
|
+
| `school-assignments` | warm dark backdrop and oversized shadow (`warm-dark-backdrop-and-oversized-shadow`) | token | missing |
|
|
118
|
+
| `share-of-voice` | dark translucent elevation and reflection (`share-of-voice-dark-elevation`) | token | approximation |
|
|
119
|
+
|
|
120
|
+
## Avatar image assets
|
|
121
|
+
|
|
122
|
+
Key: `avatar-image-assets` · 9 backgrounds
|
|
123
|
+
|
|
124
|
+
Backgrounds: `delivery-tracking`, `investor-profile`, `mcp-settings`, `profile-menu`, `recent-orders`, `refund-simulation`, `remove-model`, `school-assignments`, `stripe-demo-account`
|
|
125
|
+
|
|
126
|
+
| Background | Gap | Kind | Status |
|
|
127
|
+
| --- | --- | --- | --- |
|
|
128
|
+
| `delivery-tracking` | courier avatar asset (`delivery-courier-avatar-asset`) | image asset | approximation |
|
|
129
|
+
| `investor-profile` | avatar artwork (`avatar-artwork`) | image asset | missing |
|
|
130
|
+
| `mcp-settings` | account avatar badge (`account-avatar-badge`) | image asset | missing |
|
|
131
|
+
| `profile-menu` | avatar and hand cursor (`avatar-and-hand-cursor`) | image asset | missing |
|
|
132
|
+
| `recent-orders` | brand mark and customer avatar (`recent-orders-brand-avatar-assets`) | image asset | approximation |
|
|
133
|
+
| `refund-simulation` | agent blue mosaic avatar (`agent-blue-mosaic-avatar`) | image asset | missing |
|
|
134
|
+
| `remove-model` | user and provider avatar crops (`remove-model-provider-assets`) | image asset | approximation |
|
|
135
|
+
| `school-assignments` | teacher avatar (`teacher-avatar`) | image asset | missing |
|
|
136
|
+
| `stripe-demo-account` | Stripe mark and account avatar (`stripe-brand-and-avatar-assets`) | image asset | approximation |
|
|
137
|
+
|
|
138
|
+
## Progress/step indicator
|
|
139
|
+
|
|
140
|
+
Key: `progress-step-indicator` · 5 backgrounds
|
|
141
|
+
|
|
142
|
+
Backgrounds: `accounting-workspace-setup`, `benefits-enrollment`, `mcp-settings`, `quran-audio-add-employee`, `refund-simulation`
|
|
143
|
+
|
|
144
|
+
| Background | Gap | Kind | Status |
|
|
145
|
+
| --- | --- | --- | --- |
|
|
146
|
+
| `accounting-workspace-setup` | step progress indicator (`setup-progress-indicator`) | component | approximation |
|
|
147
|
+
| `benefits-enrollment` | enrollment progress header (`enrollment-progress-header`) | component | missing |
|
|
148
|
+
| `mcp-settings` | numbered setup steps (`numbered-setup-steps`) | component | missing |
|
|
149
|
+
| `quran-audio-add-employee` | three-step employee progress indicator (`quran-audio-progress-stepper`) | component | approximation |
|
|
150
|
+
| `refund-simulation` | refund progress timeline (`refund-progress-timeline`) | component | missing |
|
|
151
|
+
|
|
152
|
+
## Composer pattern
|
|
153
|
+
|
|
154
|
+
Key: `composer-pattern` · 3 backgrounds
|
|
155
|
+
|
|
156
|
+
Backgrounds: `acme-finance-advisor`, `email-compose`, `order-shipment-timeline`
|
|
157
|
+
|
|
158
|
+
| Background | Gap | Kind | Status |
|
|
159
|
+
| --- | --- | --- | --- |
|
|
160
|
+
| `acme-finance-advisor` | advisor prompt composer (`acme-advisor-composer`) | component | approximation |
|
|
161
|
+
| `email-compose` | compose modal shell (`compose-modal-shell`) | layout/composition pattern | missing |
|
|
162
|
+
| `order-shipment-timeline` | note composer (`note-composer`) | component | missing |
|
|
163
|
+
|
|
164
|
+
## Review rule
|
|
165
|
+
|
|
166
|
+
A report entry is a prioritization signal, not automatic authorization to add a primitive. Review the mapped backgrounds, define the smallest stable API, migrate at least one real background, and remove the resolved gap metadata only after behavior, RTL, accessibility, and visual checks pass.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
## Requirements
|
|
4
|
+
|
|
5
|
+
Banhaten installs source into a React 18.2/19 project using Tailwind CSS 4. Use Node 18.18 or newer.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx banhaten init
|
|
9
|
+
npx banhaten add button input select
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Run the package-manager command printed by the CLI. It detects npm, pnpm, Yarn, and Bun from `packageManager` or lockfiles.
|
|
13
|
+
|
|
14
|
+
Dependency declarations are validated with npm-compatible semantic-version
|
|
15
|
+
ranges. A consumer range is kept only when every version it allows satisfies the
|
|
16
|
+
Banhaten requirement. If the Banhaten range is wholly contained by a broader
|
|
17
|
+
consumer range, the CLI safely narrows the declaration in its existing package
|
|
18
|
+
section, updates `package.json`, and prints an install command so the package
|
|
19
|
+
manager can reconcile its lockfile. Partial overlaps, disjoint ranges, mutable
|
|
20
|
+
tags, workspace protocols, aliases, Git URLs, and local file specs fail without
|
|
21
|
+
writing. Banhaten deliberately does not treat a current lockfile resolution as a
|
|
22
|
+
durable compatibility guarantee. When the manifest is already safe, the CLI also
|
|
23
|
+
checks package versions inside the target project or declared workspace boundary.
|
|
24
|
+
For npm lockfiles v2 and v3 it verifies the importer declarations and exact locked
|
|
25
|
+
resolutions; stale, missing, incompatible, or opaque lock state keeps the install
|
|
26
|
+
action visible. Machine-readable output exposes the same
|
|
27
|
+
`{ required, command, cwd }` state, including the project or workspace directory
|
|
28
|
+
where the command must run.
|
|
29
|
+
|
|
30
|
+
## Vite
|
|
31
|
+
|
|
32
|
+
Before writing, the CLI resolves a canonical install plan from
|
|
33
|
+
`banhaten.config.json`, the TypeScript `@/*` path, and the Vite `@` alias. If
|
|
34
|
+
TypeScript and Vite agree, that root is used even when another `src` directory
|
|
35
|
+
exists. If only one side declares the alias, the CLI mirrors it to the other.
|
|
36
|
+
Conflicting roots, multi-target TypeScript paths, destination-overlapping aliases,
|
|
37
|
+
inherited TypeScript aliases without local `baseUrl`/`paths`, and Vite aliases
|
|
38
|
+
that cannot be inspected statically fail without changing the project. When a
|
|
39
|
+
supported Vite config exists, `init` also adds the Tailwind Vite plugin while
|
|
40
|
+
preserving its existing structure.
|
|
41
|
+
|
|
42
|
+
CLI commands use strict schemas. Unknown or duplicate flags, missing values, and
|
|
43
|
+
unexpected positional arguments are rejected before project discovery. The
|
|
44
|
+
install receipt pins the resolved destinations; changing roots later requires
|
|
45
|
+
moving or removing the old generated files and receipt first.
|
|
46
|
+
|
|
47
|
+
## Next.js and other frameworks
|
|
48
|
+
|
|
49
|
+
Without Vite, the CLI installs Tailwind and writes the configured global stylesheet, aliases, `cn` utility, and direction hook. Import the generated global stylesheet from the framework root layout and ensure the `@/*` TypeScript alias resolves to the source directory.
|
|
50
|
+
|
|
51
|
+
## Fonts and direction
|
|
52
|
+
|
|
53
|
+
The generated stylesheet imports Inter weights 400–700 and IBM Plex Sans Arabic weights 400–700. Set document language and direction at the application boundary:
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
<html lang="ar" dir="rtl" data-theme="blue" data-radius="default">
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Wrap server-rendered component trees in `DirectionProvider` when request data already determines the direction; this keeps the first server and client snapshots identical. It is also the boundary for nested surfaces that differ from the document. Without it, components hydrate from a stable LTR snapshot and then synchronize from the document through one shared observer.
|
|
60
|
+
|
|
61
|
+
## Updating safely
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx banhaten diff
|
|
65
|
+
npx banhaten update
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The receipt records generated hashes. Unmodified files update automatically. Locally modified files and token blocks stop without writing; pass `--force` only after reviewing the unified diff. Put product overrides outside the marked token block and product composition in wrapper components.
|