banhaten 0.1.2 → 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 +145 -328
- package/SECURITY.md +15 -0
- package/banhaten.config.example.json +1 -3
- package/docs/design-system/README.md +20 -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 +189 -0
- package/docs/design-system/appearances/default.md +94 -0
- package/docs/design-system/appearances/rounded.md +95 -0
- package/docs/design-system/appearances/sharp.md +95 -0
- package/docs/design-system/component-docs-pattern.md +81 -0
- package/docs/design-system/component-showcase-consistency-report.md +217 -0
- package/docs/design-system/component-token-consistency-audit.md +173 -0
- package/docs/design-system/components/README.md +75 -0
- package/docs/design-system/components/accordion.md +67 -0
- package/docs/design-system/components/activity-feed.md +106 -0
- package/docs/design-system/components/alert-dialog.md +87 -0
- package/docs/design-system/components/alert.md +111 -0
- package/docs/design-system/components/aspect-ratio.md +59 -0
- package/docs/design-system/components/attribute.md +103 -0
- package/docs/design-system/components/autocomplete.md +93 -0
- package/docs/design-system/components/avatar.md +70 -0
- package/docs/design-system/components/badge.md +72 -0
- package/docs/design-system/components/banner.md +99 -0
- package/docs/design-system/components/breadcrumbs.md +188 -0
- package/docs/design-system/components/button-group.md +117 -0
- package/docs/design-system/components/button.md +95 -0
- package/docs/design-system/components/card.md +95 -0
- package/docs/design-system/components/carousel.md +61 -0
- package/docs/design-system/components/catalog-components.md +59 -0
- package/docs/design-system/components/chart.md +58 -0
- package/docs/design-system/components/checkbox.md +68 -0
- package/docs/design-system/components/collapsible.md +63 -0
- package/docs/design-system/components/command.md +75 -0
- package/docs/design-system/components/context-menu.md +59 -0
- package/docs/design-system/components/date-picker.md +97 -0
- package/docs/design-system/components/divider.md +117 -0
- package/docs/design-system/components/empty-state.md +72 -0
- package/docs/design-system/components/field.md +86 -0
- package/docs/design-system/components/file-upload.md +199 -0
- package/docs/design-system/components/hover-card.md +61 -0
- package/docs/design-system/components/icons.md +48 -0
- package/docs/design-system/components/input-group.md +73 -0
- package/docs/design-system/components/input-otp.md +73 -0
- package/docs/design-system/components/input.md +84 -0
- package/docs/design-system/components/item.md +72 -0
- package/docs/design-system/components/kbd.md +62 -0
- package/docs/design-system/components/label.md +64 -0
- package/docs/design-system/components/menu.md +76 -0
- package/docs/design-system/components/menubar.md +60 -0
- package/docs/design-system/components/modal.md +119 -0
- package/docs/design-system/components/native-select.md +70 -0
- package/docs/design-system/components/navigation-menu.md +63 -0
- package/docs/design-system/components/onboarding-step-list-item.md +94 -0
- package/docs/design-system/components/page-header.md +98 -0
- package/docs/design-system/components/pagination.md +71 -0
- package/docs/design-system/components/popover.md +77 -0
- package/docs/design-system/components/progress-slider.md +66 -0
- package/docs/design-system/components/progress.md +92 -0
- package/docs/design-system/components/radio-card.md +65 -0
- package/docs/design-system/components/radio-group.md +72 -0
- package/docs/design-system/components/resizable.md +57 -0
- package/docs/design-system/components/scroll-area.md +60 -0
- package/docs/design-system/components/segmented-control.md +71 -0
- package/docs/design-system/components/select.md +87 -0
- package/docs/design-system/components/sheet.md +82 -0
- package/docs/design-system/components/sidebar.md +83 -0
- package/docs/design-system/components/skeleton.md +91 -0
- package/docs/design-system/components/slideout.md +77 -0
- package/docs/design-system/components/slider.md +81 -0
- package/docs/design-system/components/social-button.md +65 -0
- package/docs/design-system/components/spinner.md +77 -0
- package/docs/design-system/components/steps.md +77 -0
- package/docs/design-system/components/table.md +411 -0
- package/docs/design-system/components/tabs.md +69 -0
- package/docs/design-system/components/tag.md +95 -0
- package/docs/design-system/components/textarea.md +64 -0
- package/docs/design-system/components/timeline.md +95 -0
- package/docs/design-system/components/toast.md +73 -0
- package/docs/design-system/components/toggle.md +96 -0
- package/docs/design-system/components/toolbar.md +105 -0
- package/docs/design-system/components/tooltip.md +107 -0
- package/docs/design-system/components/typography.md +18 -0
- package/docs/design-system/density-and-elevation.md +44 -0
- package/docs/design-system/design-system-test-missing-items.md +368 -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/icons.md +69 -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 +64 -0
- 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 +53 -0
- package/docs/design-system/token-governance.md +60 -0
- package/package.json +97 -65
- package/registry/component-contract.json +40 -0
- package/registry/components/alert-dialog.tsx +297 -0
- package/registry/components/alert.tsx +86 -65
- package/registry/components/aspect-ratio.tsx +30 -0
- 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 +282 -0
- package/registry/components/chart.tsx +203 -0
- package/registry/components/checkbox.tsx +3 -3
- package/registry/components/collapsible.tsx +69 -0
- package/registry/components/command.tsx +174 -0
- package/registry/components/context-menu.tsx +236 -0
- package/registry/components/date-picker.tsx +246 -105
- 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 +14 -14
- 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 +139 -139
- package/registry/components/expanded/catalogComponentsShowcase.css +83 -83
- 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 +274 -274
- package/registry/components/expanded/table.css +2 -2
- package/registry/components/expanded/timeline.css +264 -264
- package/registry/components/field.tsx +230 -0
- package/registry/components/hover-card.tsx +48 -0
- package/registry/components/input-content.ts +1 -0
- package/registry/components/input-group.tsx +130 -0
- package/registry/components/input-otp.tsx +13 -3
- package/registry/components/input.tsx +70 -45
- package/registry/components/item.tsx +189 -0
- package/registry/components/kbd.tsx +151 -0
- package/registry/components/label.tsx +78 -0
- package/registry/components/menu.tsx +34 -246
- package/registry/components/menubar.tsx +226 -0
- package/registry/components/modal.tsx +216 -143
- package/registry/components/native-select.tsx +205 -0
- package/registry/components/navigation-menu.tsx +171 -0
- 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/radio-group.tsx +1 -1
- package/registry/components/resizable.tsx +74 -0
- package/registry/components/scroll-area.tsx +67 -0
- package/registry/components/segmented-control.tsx +87 -0
- package/registry/components/select-content.tsx +2 -2
- package/registry/components/select.tsx +54 -20
- package/registry/components/sheet.tsx +305 -0
- package/registry/components/sidebar.tsx +352 -0
- package/registry/components/skeleton.css +0 -3
- package/registry/components/social-button.tsx +116 -30
- package/registry/components/spinner.tsx +18 -55
- package/registry/components/{expanded/tabs.css → tabs.css} +127 -106
- package/registry/components/tabs.tsx +246 -0
- package/registry/components/tag.tsx +2 -2
- package/registry/components/textarea.tsx +4 -4
- package/registry/components/toast.tsx +136 -0
- 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/alert-dialog-demo.tsx +42 -0
- package/registry/examples/aspect-ratio-demo.tsx +11 -0
- 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 +43 -0
- package/registry/examples/chart-demo.tsx +33 -0
- package/registry/examples/checkbox-demo.tsx +5 -5
- package/registry/examples/collapsible-demo.tsx +16 -0
- package/registry/examples/collection-filter-bar-demo.tsx +135 -0
- package/registry/examples/command-demo.tsx +42 -0
- package/registry/examples/{expanded/command-bar-demo.tsx → command-palette-demo.tsx} +5 -15
- package/registry/examples/context-menu-demo.tsx +29 -0
- 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 +2 -2
- package/registry/examples/expanded/timeline-demo.tsx +1 -1
- package/registry/examples/field-demo.tsx +51 -0
- package/registry/examples/hover-card-demo.tsx +23 -0
- package/registry/examples/input-demo.tsx +6 -6
- package/registry/examples/input-group-demo.tsx +16 -0
- package/registry/examples/input-otp-demo.tsx +4 -4
- package/registry/examples/item-demo.tsx +46 -0
- package/registry/examples/kbd-demo.tsx +11 -0
- package/registry/examples/label-demo.tsx +20 -0
- package/registry/examples/menu-demo.tsx +1 -1
- package/registry/examples/menubar-demo.tsx +34 -0
- package/registry/examples/modal-demo.tsx +67 -9
- package/registry/examples/native-select-demo.tsx +16 -0
- package/registry/examples/navigation-menu-demo.tsx +29 -0
- 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 +22 -0
- package/registry/examples/results-toolbar-demo.tsx +44 -0
- package/registry/examples/scroll-area-demo.tsx +15 -0
- package/registry/examples/segmented-control-demo.tsx +39 -0
- package/registry/examples/select-demo.tsx +1 -1
- package/registry/examples/sheet-demo.tsx +47 -0
- package/registry/examples/sidebar-demo.tsx +55 -0
- 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 +13 -0
- package/registry/examples/tag-demo.tsx +1 -1
- package/registry/examples/textarea-demo.tsx +4 -4
- package/registry/examples/toast-demo.tsx +35 -0
- 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 +6010 -432
- package/registry/styles/globals.css +3112 -4690
- package/registry.json +1582 -0
- package/schema/config.schema.json +51 -0
- package/schema/registry.schema.json +190 -0
- package/schema/tokens.schema.json +163 -0
- 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 +639 -1391
- 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 +4313 -310
- package/registry/assets/avatars/avatar-02.jpg +0 -0
- package/registry/assets/avatars/avatar-03.jpg +0 -0
- package/registry/assets/avatars/avatar-04.jpg +0 -0
- package/registry/assets/avatars/avatar-05.jpg +0 -0
- package/registry/assets/avatars/avatar-06.jpg +0 -0
- package/registry/assets/avatars/avatar-07.jpg +0 -0
- package/registry/assets/avatars/avatar-08.jpg +0 -0
- package/registry/assets/avatars/avatar-09.jpg +0 -0
- package/registry/assets/avatars/avatar-10.jpg +0 -0
- package/registry/assets/avatars/avatar-11.jpg +0 -0
- package/registry/assets/avatars/avatar-12.jpg +0 -0
- package/registry/assets/avatars/avatar-13.jpg +0 -0
- package/registry/assets/avatars/avatar-14.jpg +0 -0
- package/registry/assets/avatars/avatar-15.jpg +0 -0
- package/registry/assets/avatars/avatar-16.jpg +0 -0
- package/registry/assets/avatars/avatar-17.jpg +0 -0
- package/registry/assets/avatars/avatar-18.jpg +0 -0
- package/registry/assets/avatars/avatar-19.jpg +0 -0
- package/registry/assets/avatars/avatar-20.jpg +0 -0
- package/registry/assets/avatars/avatar-21.jpg +0 -0
- package/registry/assets/avatars/avatar-22.jpg +0 -0
- package/registry/assets/avatars/avatar-23.jpg +0 -0
- package/registry/assets/avatars/avatar-24.jpg +0 -0
- package/registry/assets/avatars/avatar-25.jpg +0 -0
- package/registry/assets/avatars/avatar-26.jpg +0 -0
- package/registry/assets/avatars/avatar-27.jpg +0 -0
- package/registry/assets/avatars/avatar-28.jpg +0 -0
- package/registry/assets/avatars/avatar-29.jpg +0 -0
- package/registry/assets/avatars/avatar-30.jpg +0 -0
- package/registry/assets/avatars/avatar-31.jpg +0 -0
- package/registry/assets/avatars/avatar-32.jpg +0 -0
- package/registry/assets/avatars/avatar-33.jpg +0 -0
- package/registry/assets/avatars/avatar-34.jpg +0 -0
- package/registry/assets/avatars/avatar-35.jpg +0 -0
- package/registry/assets/image-assets.json +0 -744
- package/registry/assets/images/art-02.jpg +0 -0
- package/registry/assets/images/art-03.jpg +0 -0
- package/registry/assets/images/art-04.jpg +0 -0
- package/registry/assets/images/art-05.jpg +0 -0
- package/registry/assets/images/art-06.jpg +0 -0
- package/registry/assets/images/art-07.jpg +0 -0
- package/registry/assets/images/art-08.jpg +0 -0
- package/registry/assets/images/art-09.jpg +0 -0
- package/registry/assets/images/art-10.jpg +0 -0
- package/registry/assets/images/art-11.jpg +0 -0
- package/registry/assets/images/art-12.jpg +0 -0
- package/registry/assets/images/art-13.jpg +0 -0
- package/registry/assets/images/art-14.jpg +0 -0
- package/registry/assets/images/art-15.jpg +0 -0
- package/registry/assets/images/art-16.jpg +0 -0
- package/registry/assets/images/art-17.jpg +0 -0
- package/registry/assets/images/art-18.jpg +0 -0
- package/registry/assets/images/art-19.jpg +0 -0
- package/registry/assets/images/art-20.jpg +0 -0
- package/registry/assets/images/art-21.jpg +0 -0
- package/registry/assets/images/art-22.jpg +0 -0
- package/registry/assets/images/art-23.jpg +0 -0
- package/registry/assets/images/art-24.jpg +0 -0
- package/registry/assets/images/art-25.jpg +0 -0
- package/registry/assets/images/art-26.jpg +0 -0
- package/registry/assets/images/art-27.jpg +0 -0
- package/registry/assets/images/nature-01.jpg +0 -0
- package/registry/assets/images/nature-02.jpg +0 -0
- package/registry/assets/images/nature-03.jpg +0 -0
- package/registry/assets/images/nature-04.jpg +0 -0
- package/registry/assets/images/nature-05.jpg +0 -0
- package/registry/assets/images/nature-06.jpg +0 -0
- package/registry/assets/images/nature-07.jpg +0 -0
- package/registry/assets/images/nature-08.jpg +0 -0
- package/registry/assets/images/nature-09.jpg +0 -0
- package/registry/assets/images/nature-10.jpg +0 -0
- package/registry/assets/images/nature-11.jpg +0 -0
- package/registry/assets/images/nature-12.jpg +0 -0
- package/registry/assets/images/nature-13.jpg +0 -0
- package/registry/assets/images/nature-14.jpg +0 -0
- package/registry/assets/images/nature-15.jpg +0 -0
- package/registry/assets/images/nature-16.jpg +0 -0
- package/registry/assets/images/nature-17.jpg +0 -0
- package/registry/assets/images/nature-18.jpg +0 -0
- package/registry/assets/images/nature-19.jpg +0 -0
- package/registry/assets/images/nature-20.jpg +0 -0
- 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/Tabs.tsx +0 -86
- 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
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Token Governance
|
|
2
|
+
|
|
3
|
+
Banhaten components must be built from Banhaten tokens. Component source may use:
|
|
4
|
+
|
|
5
|
+
- Generated `--bh-*` semantic tokens.
|
|
6
|
+
- System, typography, effect, and component variables compiled from their owned
|
|
7
|
+
fragments under `tokens/source/` into the published `cssVariables` contract.
|
|
8
|
+
- shadcn alias bridge variables such as `--background`, `--foreground`, and `--ring` only when they point back to Banhaten tokens.
|
|
9
|
+
- Documented exception-ledger values when the value is external, brand-owned, or required by a third-party primitive API.
|
|
10
|
+
|
|
11
|
+
Do not add raw component styling literals directly to `registry/components`:
|
|
12
|
+
|
|
13
|
+
- Raw color literals.
|
|
14
|
+
- Raw `px`, `rem`, or `ms` values outside approved media-query breakpoints.
|
|
15
|
+
- Raw opacity utilities such as `opacity-0` or `opacity-100`.
|
|
16
|
+
- Raw z-index, ring width, duration, icon size, or compact spacing utilities.
|
|
17
|
+
- Component-local `color-mix()` percentages.
|
|
18
|
+
- Legacy `--ds-*` fallbacks.
|
|
19
|
+
|
|
20
|
+
`npm run tokens:check` enforces the generated CSS contract and component token usage.
|
|
21
|
+
|
|
22
|
+
Structured tokens and aliases are authored in the domain and component-owned
|
|
23
|
+
fragments under `tokens/source/`. `tokens/banhaten.tokens.json` is output-only
|
|
24
|
+
and deterministically compiled from that manifest. Authored Tailwind mappings,
|
|
25
|
+
keyframes, global and accessibility rules, and typography utilities live in
|
|
26
|
+
`tokens/banhaten.utilities.css`. The distributable
|
|
27
|
+
`registry/styles/globals.css` is regenerated from the compiled token catalog and
|
|
28
|
+
that authored CSS source.
|
|
29
|
+
|
|
30
|
+
The generator emits the complete default-theme graph once, then emits only declarations whose values differ for each alternate theme. Dark mode and alternate themes inherit unchanged scoped aliases through the cascade. This keeps the live graph auditable without duplicating identical declarations.
|
|
31
|
+
|
|
32
|
+
The default appearance deliberately composes two concerns: `blue` owns brand
|
|
33
|
+
roles and `gray` owns the neutral ramp. As a result, default product surfaces
|
|
34
|
+
are achromatic, while links, focus states, and primary actions remain blue.
|
|
35
|
+
`cssContract.defaultTheme` and `cssContract.defaultNeutralTheme` record that
|
|
36
|
+
composition. `npm run tokens:build` synchronizes it into the authored default
|
|
37
|
+
theme and semantic color-mode values before compiling the public artifacts.
|
|
38
|
+
Alternate brand themes keep their reviewed neutral ramps unless their source is
|
|
39
|
+
explicitly changed.
|
|
40
|
+
|
|
41
|
+
Color values are design-owned. The generated Color Contrast page reports failing combinations and recommendations, but automation must not silently change source colors. A color change requires an explicit design review and regeneration of the contrast baseline.
|
|
42
|
+
|
|
43
|
+
## Exception Ledger
|
|
44
|
+
|
|
45
|
+
The following exceptions are allowed only in token generation or documented alias source, not directly in component implementation:
|
|
46
|
+
|
|
47
|
+
| Exception | Reason | Owner |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| Social provider marks | Apple, Facebook, Google, LinkedIn, Twitter, and WhatsApp colors and icon geometry must preserve provider identity; color must still flow through `currentColor` and Banhaten social variables. | Component alias source and social button source |
|
|
50
|
+
| Payment or illustrative mark geometry | Some Figma-matched marks use fractional geometry that cannot be expressed cleanly through the global spacing scale. | Component alias source |
|
|
51
|
+
| Effect and shadow stops | The supplied token zips do not include effect tokens, so component shadow aliases document those values. | Component alias source |
|
|
52
|
+
| Media-query breakpoints | CSS custom properties are not reliable in media-query conditions. | Component CSS with local comment |
|
|
53
|
+
| Radix numeric offsets | Some Radix APIs require JavaScript numbers instead of CSS variables; comments must pair each number with its matching token. | Component source |
|
|
54
|
+
| Expanded composition widths | Larger app compositions may expose public layout aliases or documentation-only layout aliases. | Expanded component docs |
|
|
55
|
+
|
|
56
|
+
If a new literal is needed, add it to an alias or the exception ledger before using it.
|
|
57
|
+
|
|
58
|
+
## Public Override Surface
|
|
59
|
+
|
|
60
|
+
Stable override points are CSS variables emitted in `registry/styles/globals.css`. Prefer overriding component aliases rather than editing installed component source. Product teams should use local wrapper components for behavior and keep Banhaten files generated-owned.
|
package/package.json
CHANGED
|
@@ -1,65 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "banhaten",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Banhaten design system: an Arabic and English-first React design system with shadcn-style component installation.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"banhaten": "src/cli/index.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"src",
|
|
11
|
-
"registry",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "banhaten",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Banhaten design system: an Arabic and English-first React design system with shadcn-style component installation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"banhaten": "src/cli/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"registry/index.json",
|
|
12
|
+
"registry/component-contract.json",
|
|
13
|
+
"registry/components",
|
|
14
|
+
"registry/examples",
|
|
15
|
+
"registry/guidance",
|
|
16
|
+
"registry/hooks",
|
|
17
|
+
"registry/styles",
|
|
18
|
+
"registry/utils",
|
|
19
|
+
"registry/assets/activity-feed-avatar.png",
|
|
20
|
+
"registry/assets/avatars/avatar-01.jpg",
|
|
21
|
+
"registry/assets/images/art-01.jpg",
|
|
22
|
+
"registry.json",
|
|
23
|
+
"tokens/banhaten.tokens.json",
|
|
24
|
+
"schema",
|
|
25
|
+
"docs",
|
|
26
|
+
"banhaten.config.example.json",
|
|
27
|
+
"README.md",
|
|
28
|
+
"CHANGELOG.md",
|
|
29
|
+
"CONTRIBUTING.md",
|
|
30
|
+
"SECURITY.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "npm --prefix playground ci --include=dev --include=optional && npm --prefix playground run build",
|
|
35
|
+
"build:railway": "npm --prefix playground ci --include=dev --include=optional && npm --prefix playground run build:railway",
|
|
36
|
+
"start": "node playground/scripts/serve-static.mjs playground/dist",
|
|
37
|
+
"check": "node --check src/cli/index.js && node --check src/cli/command-line.js && node --check src/cli/doctor.js && node --check src/cli/config-editors.js && node --check src/cli/source-scanner.js && node --check src/cli/jsonc.js && node --check src/cli/vite-config.js && node --check src/cli/install-plan.js && node --check src/cli/install-receipt.js && node --check src/cli/package-install-state.js && node --check src/cli/package-manager.js && node --check src/cli/package-plan.js && node --check src/cli/package-version.js && node --check scripts/compile-token-catalog.mjs && node --check scripts/sync-default-theme-neutral-values.mjs && node --check scripts/token-catalog-test.mjs && node --check scripts/registry-catalog.mjs && node --check scripts/generate-registry-index.mjs && node --check scripts/generate-shadcn-registry.mjs && node --check scripts/normalize-component-docs.mjs && node --check scripts/package-artifact.mjs && node --check scripts/check-package-contents.mjs && node --check scripts/select-react-compatibility.mjs && npm run contracts:check && npm run cli:test && npm run tokens:check && npm run registry:check && npm run docs:check && npm run package:check && npm run playground:build && npm run playground:test:browser && npm run playground:audit",
|
|
38
|
+
"contracts:check": "node scripts/validate-contracts.mjs",
|
|
39
|
+
"cli:test": "node scripts/cli-argument-test.mjs && node scripts/cli-dependency-test.mjs && node scripts/cli-install-plan-test.mjs && node scripts/cli-integration-test.mjs && node scripts/cli-doctor-test.mjs",
|
|
40
|
+
"playground:build": "npm --prefix playground run build",
|
|
41
|
+
"playground:dev": "npm --prefix playground run dev",
|
|
42
|
+
"playground:test": "npm --prefix playground run test",
|
|
43
|
+
"playground:test:browser": "npm --prefix playground run test:browser",
|
|
44
|
+
"playground:audit": "npm --prefix playground audit --audit-level=high",
|
|
45
|
+
"package:check": "node scripts/generate-registry-index.mjs --check && node scripts/compile-token-catalog.mjs --check && node scripts/check-package-contents.mjs",
|
|
46
|
+
"registry:build": "node scripts/generate-registry-index.mjs --write",
|
|
47
|
+
"registry:check": "node scripts/generate-registry-index.mjs --check && node scripts/check-registry-mirrors.mjs && node scripts/generate-shadcn-registry.mjs --check && node scripts/registry-runtime-exports-test.mjs && node scripts/check-isolated-registry-installs.mjs --packed",
|
|
48
|
+
"registry:export": "node scripts/generate-registry-index.mjs --write && node scripts/generate-shadcn-registry.mjs --write",
|
|
49
|
+
"registry:exports": "node scripts/check-isolated-registry-installs.mjs --write-exports",
|
|
50
|
+
"registry:sync": "node scripts/check-registry-mirrors.mjs --write",
|
|
51
|
+
"components:tokens:check": "node scripts/check-component-token-usage.mjs",
|
|
52
|
+
"components:tokens:metadata": "node scripts/sync-component-token-metadata.mjs",
|
|
53
|
+
"docs:check": "node scripts/check-component-docs.mjs && node scripts/normalize-component-docs.mjs",
|
|
54
|
+
"docs:normalize": "node scripts/normalize-component-docs.mjs --write",
|
|
55
|
+
"smoke": "node src/cli/index.js list",
|
|
56
|
+
"tokens:aliases:check": "node scripts/sync-default-theme-neutral-values.mjs",
|
|
57
|
+
"tokens:aliases:sync": "node scripts/sync-default-theme-neutral-values.mjs --write",
|
|
58
|
+
"tokens:build": "npm run tokens:aliases:sync && node scripts/compile-token-catalog.mjs --write && node scripts/generate-token-css.mjs --write",
|
|
59
|
+
"tokens:check": "npm run tokens:aliases:check && node scripts/compile-token-catalog.mjs --check && node scripts/token-catalog-test.mjs && node scripts/generate-token-css.mjs --check && node scripts/check-token-css-reproducibility.mjs && node scripts/check-token-contract.mjs && npm run components:tokens:check && npm run components:tokens:metadata"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=18.18"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
66
|
+
"react-dom": "^18.2.0 || ^19.0.0",
|
|
67
|
+
"tailwindcss": "^4.0.0"
|
|
68
|
+
},
|
|
69
|
+
"keywords": [
|
|
70
|
+
"banhaten",
|
|
71
|
+
"design-system",
|
|
72
|
+
"react",
|
|
73
|
+
"shadcn",
|
|
74
|
+
"rtl",
|
|
75
|
+
"arabic",
|
|
76
|
+
"components"
|
|
77
|
+
],
|
|
78
|
+
"license": "MIT",
|
|
79
|
+
"repository": {
|
|
80
|
+
"type": "git",
|
|
81
|
+
"url": "git+https://github.com/AhmadGalal85/Banhaten-design-system.git"
|
|
82
|
+
},
|
|
83
|
+
"bugs": {
|
|
84
|
+
"url": "https://github.com/AhmadGalal85/Banhaten-design-system/issues"
|
|
85
|
+
},
|
|
86
|
+
"homepage": "https://github.com/AhmadGalal85/Banhaten-design-system/tree/main/docs",
|
|
87
|
+
"directories": {
|
|
88
|
+
"doc": "docs"
|
|
89
|
+
},
|
|
90
|
+
"author": "Ahmad Galal",
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"ajv": "^8.20.0",
|
|
93
|
+
"minimatch": "^10.2.5",
|
|
94
|
+
"semver": "^7.8.5",
|
|
95
|
+
"yaml": "^2.9.0"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"capabilities": {
|
|
3
|
+
"actions": "Actions",
|
|
4
|
+
"alignments": "Alignments",
|
|
5
|
+
"breakpoints": "Breakpoints",
|
|
6
|
+
"cardPositions": "Card Positions",
|
|
7
|
+
"colors": "Colors",
|
|
8
|
+
"controlPositions": "Control Positions",
|
|
9
|
+
"densities": "Densities",
|
|
10
|
+
"directions": "Directions",
|
|
11
|
+
"features": "Features",
|
|
12
|
+
"forms": "Forms",
|
|
13
|
+
"indicators": "Indicators",
|
|
14
|
+
"intents": "Intents",
|
|
15
|
+
"itemKinds": "Item Kinds",
|
|
16
|
+
"itemTypes": "Item Types",
|
|
17
|
+
"kinds": "Kinds",
|
|
18
|
+
"labelPositions": "Label Positions",
|
|
19
|
+
"layouts": "Layouts",
|
|
20
|
+
"modes": "Modes",
|
|
21
|
+
"offsets": "Offsets",
|
|
22
|
+
"options": "Options",
|
|
23
|
+
"orientations": "Orientations",
|
|
24
|
+
"platforms": "Platforms",
|
|
25
|
+
"pointerPositions": "Pointer Positions",
|
|
26
|
+
"selectionTypes": "Selection Types",
|
|
27
|
+
"shapes": "Shapes",
|
|
28
|
+
"sides": "Sides",
|
|
29
|
+
"sizes": "Sizes",
|
|
30
|
+
"states": "States",
|
|
31
|
+
"statusColors": "Status Colors",
|
|
32
|
+
"styles": "Styles",
|
|
33
|
+
"tokens": "Tokens",
|
|
34
|
+
"tones": "Tones",
|
|
35
|
+
"types": "Types",
|
|
36
|
+
"valueModes": "Value Modes",
|
|
37
|
+
"variants": "Variants",
|
|
38
|
+
"widths": "Widths"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
|
+
import { TriangleAlertIcon } from "lucide-react"
|
|
7
|
+
|
|
8
|
+
import { Button, type ButtonProps } from "@/components/ui/button"
|
|
9
|
+
import { cn } from "@/lib/utils"
|
|
10
|
+
|
|
11
|
+
type AlertDialogIntent = "default" | "warning" | "danger"
|
|
12
|
+
type AlertDialogSize = "sm" | "default" | "lg"
|
|
13
|
+
|
|
14
|
+
const alertDialogContentVariants = cva(
|
|
15
|
+
[
|
|
16
|
+
"fixed left-1/2 top-1/2 z-[var(--bh-z-overlay)] flex max-h-[calc(100vh-(var(--bh-space-8xl-48)*2))] w-[var(--bh-alert-dialog-width)]",
|
|
17
|
+
"max-w-[calc(100vw-(var(--bh-space-4xl-20)*2))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden",
|
|
18
|
+
"rounded-[var(--bh-radius-2xl-12)] bg-[var(--bh-bg-raised)] text-[var(--bh-content-default)] shadow-[var(--shadow-modal)] outline-none",
|
|
19
|
+
"[--bh-alert-dialog-border:var(--bh-border-subtle)] [--shadow-modal:inset_0px_0px_0px_var(--bh-border-width-default)_var(--bh-alert-dialog-border),var(--shadow-component-default)]",
|
|
20
|
+
],
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
size: {
|
|
24
|
+
default:
|
|
25
|
+
"[--bh-alert-dialog-width:calc(var(--bh-space-19xl-384)+var(--bh-space-12xl-128)+var(--bh-space-8xl-48))]",
|
|
26
|
+
lg: "[--bh-alert-dialog-width:calc(var(--bh-space-19xl-384)+var(--bh-space-16xl-256)+var(--bh-space-9xl-64)-var(--bh-space-xs-4))]",
|
|
27
|
+
sm: "[--bh-alert-dialog-width:calc(var(--bh-space-19xl-384)+var(--bh-space-8xl-48)+var(--bh-space-md-8))]",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: "sm",
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
const intentClassNames: Record<AlertDialogIntent, string> = {
|
|
37
|
+
danger:
|
|
38
|
+
"bg-[var(--bh-bg-danger-subtle)] text-[var(--bh-content-danger-default)]",
|
|
39
|
+
default:
|
|
40
|
+
"bg-[var(--bh-bg-neutral-subtle)] text-[var(--bh-content-subtle)]",
|
|
41
|
+
warning:
|
|
42
|
+
"bg-[var(--bh-bg-warning-subtle)] text-[var(--bh-content-warning-default)]",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>
|
|
46
|
+
type AlertDialogTriggerProps = React.ComponentProps<
|
|
47
|
+
typeof AlertDialogPrimitive.Trigger
|
|
48
|
+
>
|
|
49
|
+
type AlertDialogPortalProps = React.ComponentProps<
|
|
50
|
+
typeof AlertDialogPrimitive.Portal
|
|
51
|
+
>
|
|
52
|
+
type AlertDialogOverlayProps = React.ComponentPropsWithoutRef<
|
|
53
|
+
typeof AlertDialogPrimitive.Overlay
|
|
54
|
+
>
|
|
55
|
+
type AlertDialogContentProps = React.ComponentPropsWithoutRef<
|
|
56
|
+
typeof AlertDialogPrimitive.Content
|
|
57
|
+
> &
|
|
58
|
+
VariantProps<typeof alertDialogContentVariants> & {
|
|
59
|
+
overlayClassName?: string
|
|
60
|
+
}
|
|
61
|
+
type AlertDialogHeaderProps = React.ComponentProps<"header">
|
|
62
|
+
type AlertDialogBodyProps = React.ComponentProps<"div">
|
|
63
|
+
type AlertDialogFooterProps = React.ComponentProps<"footer">
|
|
64
|
+
type AlertDialogTitleProps = React.ComponentPropsWithoutRef<
|
|
65
|
+
typeof AlertDialogPrimitive.Title
|
|
66
|
+
>
|
|
67
|
+
type AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<
|
|
68
|
+
typeof AlertDialogPrimitive.Description
|
|
69
|
+
>
|
|
70
|
+
type AlertDialogIconProps = React.ComponentProps<"span"> & {
|
|
71
|
+
intent?: AlertDialogIntent
|
|
72
|
+
}
|
|
73
|
+
type AlertDialogActionProps = ButtonProps
|
|
74
|
+
type AlertDialogCancelProps = ButtonProps
|
|
75
|
+
|
|
76
|
+
const AlertDialog = AlertDialogPrimitive.Root
|
|
77
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger
|
|
78
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal
|
|
79
|
+
|
|
80
|
+
const AlertDialogOverlay = React.forwardRef<
|
|
81
|
+
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
|
82
|
+
AlertDialogOverlayProps
|
|
83
|
+
>(function AlertDialogOverlay({ className, ...props }, ref) {
|
|
84
|
+
return (
|
|
85
|
+
<AlertDialogPrimitive.Overlay
|
|
86
|
+
data-slot="alert-dialog-overlay"
|
|
87
|
+
ref={ref}
|
|
88
|
+
className={cn(
|
|
89
|
+
"fixed inset-0 z-[var(--bh-z-overlay)] bg-[var(--bh-bg-backdrop)]",
|
|
90
|
+
className
|
|
91
|
+
)}
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
94
|
+
)
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
const AlertDialogContent = React.forwardRef<
|
|
98
|
+
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
|
99
|
+
AlertDialogContentProps
|
|
100
|
+
>(function AlertDialogContent(
|
|
101
|
+
{ children, className, overlayClassName, size, ...props },
|
|
102
|
+
ref
|
|
103
|
+
) {
|
|
104
|
+
return (
|
|
105
|
+
<AlertDialogPortal>
|
|
106
|
+
<AlertDialogOverlay className={overlayClassName} />
|
|
107
|
+
<AlertDialogPrimitive.Content
|
|
108
|
+
data-size={size ?? "sm"}
|
|
109
|
+
data-slot="alert-dialog-content"
|
|
110
|
+
ref={ref}
|
|
111
|
+
className={cn(alertDialogContentVariants({ size, className }))}
|
|
112
|
+
{...props}
|
|
113
|
+
>
|
|
114
|
+
{children}
|
|
115
|
+
</AlertDialogPrimitive.Content>
|
|
116
|
+
</AlertDialogPortal>
|
|
117
|
+
)
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
const AlertDialogHeader = React.forwardRef<HTMLElement, AlertDialogHeaderProps>(
|
|
121
|
+
function AlertDialogHeader({ className, ...props }, ref) {
|
|
122
|
+
return (
|
|
123
|
+
<header
|
|
124
|
+
data-slot="alert-dialog-header"
|
|
125
|
+
ref={ref}
|
|
126
|
+
className={cn(
|
|
127
|
+
"flex w-full shrink-0 items-start gap-[var(--bh-space-sm-6)] px-[var(--bh-space-4xl-20)] pb-[var(--bh-space-md-8)] pt-[var(--bh-space-4xl-20)] text-start",
|
|
128
|
+
className
|
|
129
|
+
)}
|
|
130
|
+
{...props}
|
|
131
|
+
/>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
const AlertDialogBody = React.forwardRef<HTMLDivElement, AlertDialogBodyProps>(
|
|
137
|
+
function AlertDialogBody({ className, ...props }, ref) {
|
|
138
|
+
return (
|
|
139
|
+
<div
|
|
140
|
+
data-slot="alert-dialog-body"
|
|
141
|
+
ref={ref}
|
|
142
|
+
className={cn(
|
|
143
|
+
"flex w-full shrink-0 items-start px-[var(--bh-space-4xl-20)] pb-[var(--bh-space-4xl-20)] pt-[var(--bh-space-lg-10)]",
|
|
144
|
+
className
|
|
145
|
+
)}
|
|
146
|
+
{...props}
|
|
147
|
+
/>
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
const AlertDialogFooter = React.forwardRef<
|
|
153
|
+
HTMLElement,
|
|
154
|
+
AlertDialogFooterProps
|
|
155
|
+
>(function AlertDialogFooter({ className, ...props }, ref) {
|
|
156
|
+
return (
|
|
157
|
+
<footer
|
|
158
|
+
data-slot="alert-dialog-footer"
|
|
159
|
+
ref={ref}
|
|
160
|
+
className={cn(
|
|
161
|
+
"flex w-full shrink-0 items-center justify-end gap-[var(--bh-space-lg-10)] border-t border-[var(--bh-border-subtle)] px-[var(--bh-space-4xl-20)] py-[var(--bh-space-3xl-16)]",
|
|
162
|
+
className
|
|
163
|
+
)}
|
|
164
|
+
{...props}
|
|
165
|
+
/>
|
|
166
|
+
)
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
const AlertDialogTitle = React.forwardRef<
|
|
170
|
+
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
171
|
+
AlertDialogTitleProps
|
|
172
|
+
>(function AlertDialogTitle({ className, dir = "auto", ...props }, ref) {
|
|
173
|
+
return (
|
|
174
|
+
<AlertDialogPrimitive.Title
|
|
175
|
+
data-slot="alert-dialog-title"
|
|
176
|
+
dir={dir}
|
|
177
|
+
ref={ref}
|
|
178
|
+
className={cn(
|
|
179
|
+
"min-w-0 flex-1 text-start text-[length:var(--bh-text-heading-sm-semibold-font-size)] font-[var(--bh-text-heading-sm-semibold-font-weight)] leading-[var(--bh-text-heading-sm-semibold-line-height)] tracking-[var(--bh-text-heading-sm-semibold-letter-spacing)] text-[var(--bh-content-default)]",
|
|
180
|
+
className
|
|
181
|
+
)}
|
|
182
|
+
{...props}
|
|
183
|
+
/>
|
|
184
|
+
)
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
const AlertDialogDescription = React.forwardRef<
|
|
188
|
+
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
189
|
+
AlertDialogDescriptionProps
|
|
190
|
+
>(function AlertDialogDescription({ className, dir = "auto", ...props }, ref) {
|
|
191
|
+
return (
|
|
192
|
+
<AlertDialogPrimitive.Description
|
|
193
|
+
data-slot="alert-dialog-description"
|
|
194
|
+
dir={dir}
|
|
195
|
+
ref={ref}
|
|
196
|
+
className={cn(
|
|
197
|
+
"min-w-0 flex-1 text-start text-[length:var(--bh-text-body-md-regular-font-size)] font-[var(--bh-text-body-md-regular-font-weight)] leading-[var(--bh-text-body-md-regular-line-height)] tracking-[var(--bh-text-body-md-regular-letter-spacing)] text-[var(--bh-content-subtle)]",
|
|
198
|
+
className
|
|
199
|
+
)}
|
|
200
|
+
{...props}
|
|
201
|
+
/>
|
|
202
|
+
)
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
function AlertDialogIcon({
|
|
206
|
+
children,
|
|
207
|
+
className,
|
|
208
|
+
intent = "danger",
|
|
209
|
+
...props
|
|
210
|
+
}: AlertDialogIconProps) {
|
|
211
|
+
return (
|
|
212
|
+
<span
|
|
213
|
+
aria-hidden="true"
|
|
214
|
+
data-intent={intent}
|
|
215
|
+
data-slot="alert-dialog-icon"
|
|
216
|
+
className={cn(
|
|
217
|
+
"inline-flex size-[var(--bh-space-5xl-24)] shrink-0 items-center justify-center rounded-[var(--bh-radius-full)]",
|
|
218
|
+
intentClassNames[intent],
|
|
219
|
+
className
|
|
220
|
+
)}
|
|
221
|
+
{...props}
|
|
222
|
+
>
|
|
223
|
+
{children ?? (
|
|
224
|
+
<TriangleAlertIcon
|
|
225
|
+
className="size-[var(--bh-space-3xl-16)]"
|
|
226
|
+
strokeWidth="var(--bh-icon-stroke-200)"
|
|
227
|
+
/>
|
|
228
|
+
)}
|
|
229
|
+
</span>
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const AlertDialogAction = React.forwardRef<
|
|
234
|
+
HTMLButtonElement,
|
|
235
|
+
AlertDialogActionProps
|
|
236
|
+
>(function AlertDialogAction(
|
|
237
|
+
{ asChild = false, children = "Confirm", size = "sm", variant = "danger", ...props },
|
|
238
|
+
ref
|
|
239
|
+
) {
|
|
240
|
+
return (
|
|
241
|
+
<AlertDialogPrimitive.Action asChild>
|
|
242
|
+
<Button asChild={asChild} ref={ref} size={size} variant={variant} {...props}>
|
|
243
|
+
{children}
|
|
244
|
+
</Button>
|
|
245
|
+
</AlertDialogPrimitive.Action>
|
|
246
|
+
)
|
|
247
|
+
})
|
|
248
|
+
|
|
249
|
+
const AlertDialogCancel = React.forwardRef<
|
|
250
|
+
HTMLButtonElement,
|
|
251
|
+
AlertDialogCancelProps
|
|
252
|
+
>(function AlertDialogCancel(
|
|
253
|
+
{ asChild = false, children = "Cancel", size = "sm", variant = "soft", ...props },
|
|
254
|
+
ref
|
|
255
|
+
) {
|
|
256
|
+
return (
|
|
257
|
+
<AlertDialogPrimitive.Cancel asChild>
|
|
258
|
+
<Button asChild={asChild} ref={ref} size={size} variant={variant} {...props}>
|
|
259
|
+
{children}
|
|
260
|
+
</Button>
|
|
261
|
+
</AlertDialogPrimitive.Cancel>
|
|
262
|
+
)
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
export {
|
|
266
|
+
AlertDialog,
|
|
267
|
+
AlertDialogAction,
|
|
268
|
+
AlertDialogBody,
|
|
269
|
+
AlertDialogCancel,
|
|
270
|
+
AlertDialogContent,
|
|
271
|
+
AlertDialogDescription,
|
|
272
|
+
AlertDialogFooter,
|
|
273
|
+
AlertDialogHeader,
|
|
274
|
+
AlertDialogIcon,
|
|
275
|
+
AlertDialogOverlay,
|
|
276
|
+
AlertDialogPortal,
|
|
277
|
+
AlertDialogTitle,
|
|
278
|
+
AlertDialogTrigger,
|
|
279
|
+
alertDialogContentVariants,
|
|
280
|
+
}
|
|
281
|
+
export type {
|
|
282
|
+
AlertDialogActionProps,
|
|
283
|
+
AlertDialogBodyProps,
|
|
284
|
+
AlertDialogCancelProps,
|
|
285
|
+
AlertDialogContentProps,
|
|
286
|
+
AlertDialogDescriptionProps,
|
|
287
|
+
AlertDialogFooterProps,
|
|
288
|
+
AlertDialogHeaderProps,
|
|
289
|
+
AlertDialogIconProps,
|
|
290
|
+
AlertDialogIntent,
|
|
291
|
+
AlertDialogOverlayProps,
|
|
292
|
+
AlertDialogPortalProps,
|
|
293
|
+
AlertDialogProps,
|
|
294
|
+
AlertDialogSize,
|
|
295
|
+
AlertDialogTitleProps,
|
|
296
|
+
AlertDialogTriggerProps,
|
|
297
|
+
}
|