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
|
@@ -5,8 +5,8 @@ import { Spinner } from "@/components/ui/spinner"
|
|
|
5
5
|
|
|
6
6
|
export function ButtonDemo() {
|
|
7
7
|
return (
|
|
8
|
-
<div className="flex flex-col gap-
|
|
9
|
-
<div className="flex flex-wrap items-center gap-
|
|
8
|
+
<div className="flex flex-col gap-[var(--bh-space-5xl-24)]">
|
|
9
|
+
<div className="flex flex-wrap items-center gap-[var(--bh-space-xl-12)]">
|
|
10
10
|
<Button>Primary</Button>
|
|
11
11
|
<Button variant="secondary">Secondary</Button>
|
|
12
12
|
<Button variant="soft">Soft</Button>
|
|
@@ -18,7 +18,7 @@ export function ButtonDemo() {
|
|
|
18
18
|
<Button variant="white">White</Button>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
<div className="flex flex-wrap items-center gap-
|
|
21
|
+
<div className="flex flex-wrap items-center gap-[var(--bh-space-xl-12)]">
|
|
22
22
|
<Button size="xs">XS</Button>
|
|
23
23
|
<Button size="sm">Small</Button>
|
|
24
24
|
<Button>Medium</Button>
|
|
@@ -26,7 +26,7 @@ export function ButtonDemo() {
|
|
|
26
26
|
<Button size="xl">XL</Button>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<div className="flex flex-wrap items-center gap-
|
|
29
|
+
<div className="flex flex-wrap items-center gap-[var(--bh-space-xl-12)]">
|
|
30
30
|
<Button size="icon-xs" aria-label="Add item">
|
|
31
31
|
<PlusIcon />
|
|
32
32
|
</Button>
|
|
@@ -44,7 +44,7 @@ export function ButtonDemo() {
|
|
|
44
44
|
</Button>
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
|
-
<div className="flex flex-wrap items-center gap-
|
|
47
|
+
<div className="flex flex-wrap items-center gap-[var(--bh-space-xl-12)]">
|
|
48
48
|
<Button>
|
|
49
49
|
<PlusIcon data-icon="inline-start" />
|
|
50
50
|
New item
|
|
@@ -63,7 +63,7 @@ export function ButtonDemo() {
|
|
|
63
63
|
</Button>
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
|
-
<div dir="rtl" className="flex flex-wrap items-center gap-
|
|
66
|
+
<div dir="rtl" className="flex flex-wrap items-center gap-[var(--bh-space-xl-12)]">
|
|
67
67
|
<Button>إرسال</Button>
|
|
68
68
|
<Button variant="outline">
|
|
69
69
|
متابعة
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { PlusIcon } from "lucide-react"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ButtonGroup,
|
|
5
|
+
ButtonGroupItem,
|
|
6
|
+
ToggleGroup,
|
|
7
|
+
ToggleGroupItem,
|
|
8
|
+
} from "@/components/ui/button-group"
|
|
4
9
|
|
|
5
10
|
export function ButtonGroupDemo() {
|
|
6
11
|
return (
|
|
7
|
-
<div className="grid gap-
|
|
12
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
8
13
|
<ButtonGroup aria-label="Button group">
|
|
9
14
|
{Array.from({ length: 7 }).map((_, index) => (
|
|
10
15
|
<ButtonGroupItem
|
|
@@ -37,6 +42,22 @@ export function ButtonGroupDemo() {
|
|
|
37
42
|
))}
|
|
38
43
|
</ButtonGroup>
|
|
39
44
|
</div>
|
|
45
|
+
|
|
46
|
+
<ToggleGroup aria-label="Text alignment" defaultValue="start">
|
|
47
|
+
<ToggleGroupItem value="start">Start</ToggleGroupItem>
|
|
48
|
+
<ToggleGroupItem value="center">Center</ToggleGroupItem>
|
|
49
|
+
<ToggleGroupItem value="end">End</ToggleGroupItem>
|
|
50
|
+
</ToggleGroup>
|
|
51
|
+
|
|
52
|
+
<ToggleGroup
|
|
53
|
+
aria-label="Text styles"
|
|
54
|
+
defaultValue={["bold"]}
|
|
55
|
+
type="multiple"
|
|
56
|
+
>
|
|
57
|
+
<ToggleGroupItem value="bold">Bold</ToggleGroupItem>
|
|
58
|
+
<ToggleGroupItem value="italic">Italic</ToggleGroupItem>
|
|
59
|
+
<ToggleGroupItem value="underline">Underline</ToggleGroupItem>
|
|
60
|
+
</ToggleGroup>
|
|
40
61
|
</div>
|
|
41
62
|
)
|
|
42
63
|
}
|
|
@@ -4,28 +4,65 @@ const cardImage = new URL("../assets/images/art-01.jpg", import.meta.url).href
|
|
|
4
4
|
|
|
5
5
|
const rtlCardCopy = {
|
|
6
6
|
action: "\u0627\u0646\u0642\u0631 \u0647\u0646\u0627",
|
|
7
|
+
description:
|
|
8
|
+
"\u0627\u0646\u0637\u0644\u0642 \u0641\u064a \u0631\u062d\u0644\u0629 \u0639\u0628\u0631 \u0627\u0644\u0632\u0645\u0646 \u0644\u0627\u0633\u062a\u0643\u0634\u0627\u0641 \u0623\u0633\u0631\u0627\u0631 \u0627\u0644\u0623\u0647\u0631\u0627\u0645\u0627\u062a \u0627\u0644\u0643\u0628\u0631\u0649.",
|
|
7
9
|
subtitle:
|
|
8
10
|
"\u0639\u0646\u0648\u0627\u0646 \u0641\u0631\u0639\u064a \u0644\u0644\u0628\u0637\u0627\u0642\u0629",
|
|
9
11
|
title:
|
|
10
12
|
"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0637\u0627\u0642\u0629",
|
|
11
13
|
}
|
|
12
14
|
|
|
15
|
+
const ltrCardCopy = {
|
|
16
|
+
action: "Explore",
|
|
17
|
+
description:
|
|
18
|
+
"Journey through time as we explore the mysteries of the Great Pyramids and the Sphinx.",
|
|
19
|
+
subtitle: "Ancient Egypt",
|
|
20
|
+
title: "The Great Pyramids",
|
|
21
|
+
}
|
|
22
|
+
|
|
13
23
|
export function CardDemo() {
|
|
14
24
|
return (
|
|
15
|
-
<div className="grid gap-
|
|
16
|
-
<div className="flex flex-wrap items-start gap-
|
|
17
|
-
<Card
|
|
18
|
-
|
|
25
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
26
|
+
<div className="flex flex-wrap items-start gap-[var(--bh-space-3xl-16)]">
|
|
27
|
+
<Card
|
|
28
|
+
description={ltrCardCopy.description}
|
|
29
|
+
imageSrc={cardImage}
|
|
30
|
+
primaryActionLabel={ltrCardCopy.action}
|
|
31
|
+
subtitle={ltrCardCopy.subtitle}
|
|
32
|
+
title={ltrCardCopy.title}
|
|
33
|
+
/>
|
|
34
|
+
<Card
|
|
35
|
+
imageSrc={cardImage}
|
|
36
|
+
subtitle={ltrCardCopy.subtitle}
|
|
37
|
+
title={ltrCardCopy.title}
|
|
38
|
+
type="full-image"
|
|
39
|
+
/>
|
|
19
40
|
</div>
|
|
20
41
|
|
|
21
|
-
<div className="grid gap-
|
|
22
|
-
<Card
|
|
23
|
-
|
|
42
|
+
<div className="grid gap-[var(--bh-space-3xl-16)]">
|
|
43
|
+
<Card
|
|
44
|
+
description={ltrCardCopy.description}
|
|
45
|
+
imageSrc={cardImage}
|
|
46
|
+
orientation="horizontal"
|
|
47
|
+
primaryActionLabel={ltrCardCopy.action}
|
|
48
|
+
subtitle={ltrCardCopy.subtitle}
|
|
49
|
+
title={ltrCardCopy.title}
|
|
50
|
+
/>
|
|
51
|
+
<Card
|
|
52
|
+
description={ltrCardCopy.description}
|
|
53
|
+
imageSrc={cardImage}
|
|
54
|
+
orientation="horizontal"
|
|
55
|
+
primaryActionLabel={ltrCardCopy.action}
|
|
56
|
+
subtitle={ltrCardCopy.subtitle}
|
|
57
|
+
title={ltrCardCopy.title}
|
|
58
|
+
type="trailing-image"
|
|
59
|
+
/>
|
|
24
60
|
</div>
|
|
25
61
|
|
|
26
|
-
<div dir="rtl" className="flex flex-wrap items-start gap-
|
|
62
|
+
<div dir="rtl" className="flex flex-wrap items-start gap-[var(--bh-space-3xl-16)]">
|
|
27
63
|
<Card
|
|
28
64
|
dir="rtl"
|
|
65
|
+
description={rtlCardCopy.description}
|
|
29
66
|
primaryActionLabel={rtlCardCopy.action}
|
|
30
67
|
secondaryActionLabel={rtlCardCopy.action}
|
|
31
68
|
imageSrc={cardImage}
|
|
@@ -35,6 +72,7 @@ export function CardDemo() {
|
|
|
35
72
|
<Card
|
|
36
73
|
breakpoint="mobile"
|
|
37
74
|
dir="rtl"
|
|
75
|
+
description={rtlCardCopy.description}
|
|
38
76
|
orientation="horizontal"
|
|
39
77
|
primaryActionLabel={rtlCardCopy.action}
|
|
40
78
|
secondaryActionLabel={rtlCardCopy.action}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
arabicCarouselMessages,
|
|
3
|
+
Carousel,
|
|
4
|
+
CarouselContent,
|
|
5
|
+
CarouselItem,
|
|
6
|
+
CarouselNext,
|
|
7
|
+
CarouselPrevious,
|
|
8
|
+
} from "@/components/ui/carousel"
|
|
9
|
+
|
|
10
|
+
export function CarouselDemo() {
|
|
11
|
+
return (
|
|
12
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
13
|
+
<Carousel className="w-full max-w-sm">
|
|
14
|
+
<CarouselSlides />
|
|
15
|
+
</Carousel>
|
|
16
|
+
<Carousel
|
|
17
|
+
className="w-full max-w-sm"
|
|
18
|
+
dir="rtl"
|
|
19
|
+
messages={arabicCarouselMessages}
|
|
20
|
+
>
|
|
21
|
+
<CarouselSlides />
|
|
22
|
+
</Carousel>
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function CarouselSlides() {
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
<CarouselContent>
|
|
31
|
+
{[1, 2, 3].map((item) => (
|
|
32
|
+
<CarouselItem key={item}>
|
|
33
|
+
<div className="flex aspect-video items-center justify-center rounded-xl bg-[var(--bh-bg-neutral-subtle)] text-lg font-semibold">
|
|
34
|
+
{item}
|
|
35
|
+
</div>
|
|
36
|
+
</CarouselItem>
|
|
37
|
+
))}
|
|
38
|
+
</CarouselContent>
|
|
39
|
+
<CarouselPrevious />
|
|
40
|
+
<CarouselNext />
|
|
41
|
+
</>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Line, LineChart, XAxis, YAxis } from "recharts"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ChartContainer,
|
|
5
|
+
ChartTooltip,
|
|
6
|
+
ChartTooltipContent,
|
|
7
|
+
} from "@/components/ui/chart"
|
|
8
|
+
|
|
9
|
+
const data = [
|
|
10
|
+
{ month: "Jan", revenue: 120 },
|
|
11
|
+
{ month: "Feb", revenue: 180 },
|
|
12
|
+
{ month: "Mar", revenue: 150 },
|
|
13
|
+
{ month: "Apr", revenue: 220 },
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
export function ChartDemo() {
|
|
17
|
+
return (
|
|
18
|
+
<ChartContainer config={{ revenue: { color: "var(--bh-chart-1)" } }}>
|
|
19
|
+
<LineChart data={data}>
|
|
20
|
+
<XAxis dataKey="month" tickLine={false} axisLine={false} />
|
|
21
|
+
<YAxis tickLine={false} axisLine={false} width={32} />
|
|
22
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
23
|
+
<Line
|
|
24
|
+
dataKey="revenue"
|
|
25
|
+
type="monotone"
|
|
26
|
+
stroke="var(--color-revenue)"
|
|
27
|
+
strokeWidth="var(--bh-icon-stroke-200)"
|
|
28
|
+
dot={false}
|
|
29
|
+
/>
|
|
30
|
+
</LineChart>
|
|
31
|
+
</ChartContainer>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -8,8 +8,8 @@ export function CheckboxDemo() {
|
|
|
8
8
|
const [checked, setChecked] = React.useState(true)
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<div className="grid gap-
|
|
12
|
-
<div className="flex flex-wrap items-center gap-
|
|
11
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
12
|
+
<div className="flex flex-wrap items-center gap-[var(--bh-space-3xl-16)]">
|
|
13
13
|
<Checkbox
|
|
14
14
|
checked={checked}
|
|
15
15
|
onCheckedChange={(value) => setChecked(value === true)}
|
|
@@ -20,7 +20,7 @@ export function CheckboxDemo() {
|
|
|
20
20
|
<Checkbox disabled aria-label="Disabled option" />
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
|
-
<div className="grid gap-
|
|
23
|
+
<div className="grid gap-[var(--bh-space-xl-12)]">
|
|
24
24
|
<CheckboxCard
|
|
25
25
|
checked
|
|
26
26
|
label="Label"
|
|
@@ -40,7 +40,7 @@ export function CheckboxDemo() {
|
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
|
-
<div dir="rtl" className="grid gap-
|
|
43
|
+
<div dir="rtl" className="grid gap-[var(--bh-space-xl-12)]">
|
|
44
44
|
<CheckboxCard
|
|
45
45
|
checked
|
|
46
46
|
label={"\u0627\u0644\u062a\u0633\u0645\u064a\u0629"}
|
|
@@ -58,5 +58,5 @@ export function CheckboxDemo() {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
function UserLineIcon() {
|
|
61
|
-
return <UserIcon aria-hidden="true" focusable="false" strokeWidth=
|
|
61
|
+
return <UserIcon aria-hidden="true" focusable="false" strokeWidth="var(--bh-icon-stroke-210)" />
|
|
62
62
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Collapsible,
|
|
3
|
+
CollapsibleContent,
|
|
4
|
+
CollapsibleTrigger,
|
|
5
|
+
} from "@/components/ui/collapsible"
|
|
6
|
+
|
|
7
|
+
export function CollapsibleDemo() {
|
|
8
|
+
return (
|
|
9
|
+
<Collapsible defaultOpen className="w-full max-w-md rounded-xl border border-[var(--bh-border-subtle)] bg-[var(--bh-bg-raised)]">
|
|
10
|
+
<CollapsibleTrigger>Workspace details</CollapsibleTrigger>
|
|
11
|
+
<CollapsibleContent>
|
|
12
|
+
Billing, members, and audit controls are grouped in this section.
|
|
13
|
+
</CollapsibleContent>
|
|
14
|
+
</Collapsible>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
|
|
5
|
+
import { DatePicker } from "@/components/ui/date-picker"
|
|
6
|
+
import { Field, FieldLabel } from "@/components/ui/field"
|
|
7
|
+
import {
|
|
8
|
+
Select,
|
|
9
|
+
SelectMenuItem,
|
|
10
|
+
} from "@/components/ui/select"
|
|
11
|
+
import {
|
|
12
|
+
ToolbarButton,
|
|
13
|
+
ToolbarSearch,
|
|
14
|
+
} from "@/components/ui/toolbar"
|
|
15
|
+
|
|
16
|
+
const typeLabels = {
|
|
17
|
+
everything: "Everything",
|
|
18
|
+
articles: "Articles",
|
|
19
|
+
videos: "Videos",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const orderLabels = {
|
|
23
|
+
recent: "Recently bookmarked",
|
|
24
|
+
oldest: "Oldest bookmarked",
|
|
25
|
+
title: "Title",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function CollectionFilterBarDemo() {
|
|
29
|
+
const [typeFilter, setTypeFilter] = React.useState<keyof typeof typeLabels>(
|
|
30
|
+
"everything"
|
|
31
|
+
)
|
|
32
|
+
const [order, setOrder] = React.useState<keyof typeof orderLabels>("recent")
|
|
33
|
+
const [dateRevision, setDateRevision] = React.useState(0)
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<form
|
|
37
|
+
aria-label="Collection filters"
|
|
38
|
+
data-recipe="collection-filter-bar"
|
|
39
|
+
className="grid w-full min-w-0 gap-[var(--bh-space-xl-12)] rounded-[var(--bh-radius-2xl-12)] bg-[var(--bh-bg-raised)] p-[var(--bh-space-3xl-16)] shadow-[var(--shadow-component-default)]"
|
|
40
|
+
onReset={() => {
|
|
41
|
+
setTypeFilter("everything")
|
|
42
|
+
setOrder("recent")
|
|
43
|
+
setDateRevision((revision) => revision + 1)
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<ToolbarSearch
|
|
47
|
+
aria-label="Search bookmarks"
|
|
48
|
+
density="default"
|
|
49
|
+
placeholder="Search words, people, or folders"
|
|
50
|
+
shortcutKeys={["Mod", "F"]}
|
|
51
|
+
width="full"
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<div className="flex min-w-0 flex-wrap items-end gap-[var(--bh-space-xl-12)]">
|
|
55
|
+
<Field
|
|
56
|
+
className="flex-[1_1_var(--bh-date-trigger-width)]"
|
|
57
|
+
controlId="collection-filter-from"
|
|
58
|
+
>
|
|
59
|
+
<FieldLabel tone="subtle">From</FieldLabel>
|
|
60
|
+
<DatePicker
|
|
61
|
+
key={`from-${dateRevision}`}
|
|
62
|
+
className="w-full"
|
|
63
|
+
density="default"
|
|
64
|
+
placeholder="dd/mm/yyyy"
|
|
65
|
+
triggerClassName="w-full"
|
|
66
|
+
triggerProps={{ id: "collection-filter-from" }}
|
|
67
|
+
/>
|
|
68
|
+
</Field>
|
|
69
|
+
|
|
70
|
+
<Field
|
|
71
|
+
className="flex-[1_1_var(--bh-date-trigger-width)]"
|
|
72
|
+
controlId="collection-filter-to"
|
|
73
|
+
>
|
|
74
|
+
<FieldLabel tone="subtle">To</FieldLabel>
|
|
75
|
+
<DatePicker
|
|
76
|
+
key={`to-${dateRevision}`}
|
|
77
|
+
className="w-full"
|
|
78
|
+
density="default"
|
|
79
|
+
placeholder="dd/mm/yyyy"
|
|
80
|
+
triggerClassName="w-full"
|
|
81
|
+
triggerProps={{ id: "collection-filter-to" }}
|
|
82
|
+
/>
|
|
83
|
+
</Field>
|
|
84
|
+
|
|
85
|
+
<Field
|
|
86
|
+
className="flex-[1_1_var(--bh-date-trigger-width)]"
|
|
87
|
+
controlId="collection-filter-type"
|
|
88
|
+
>
|
|
89
|
+
<FieldLabel tone="subtle">Type</FieldLabel>
|
|
90
|
+
<Select
|
|
91
|
+
className="w-full"
|
|
92
|
+
density="default"
|
|
93
|
+
onValueChange={(value) =>
|
|
94
|
+
setTypeFilter(value as keyof typeof typeLabels)
|
|
95
|
+
}
|
|
96
|
+
selectValue={typeFilter}
|
|
97
|
+
triggerId="collection-filter-type"
|
|
98
|
+
value={typeLabels[typeFilter]}
|
|
99
|
+
>
|
|
100
|
+
<SelectMenuItem label="Everything" value="everything" />
|
|
101
|
+
<SelectMenuItem label="Articles" value="articles" />
|
|
102
|
+
<SelectMenuItem label="Videos" value="videos" />
|
|
103
|
+
</Select>
|
|
104
|
+
</Field>
|
|
105
|
+
|
|
106
|
+
<Field
|
|
107
|
+
className="flex-[1_1_var(--bh-date-trigger-width)]"
|
|
108
|
+
controlId="collection-filter-order"
|
|
109
|
+
>
|
|
110
|
+
<FieldLabel tone="subtle">Order</FieldLabel>
|
|
111
|
+
<Select
|
|
112
|
+
className="w-full"
|
|
113
|
+
density="default"
|
|
114
|
+
onValueChange={(value) =>
|
|
115
|
+
setOrder(value as keyof typeof orderLabels)
|
|
116
|
+
}
|
|
117
|
+
selectValue={order}
|
|
118
|
+
triggerId="collection-filter-order"
|
|
119
|
+
value={orderLabels[order]}
|
|
120
|
+
>
|
|
121
|
+
<SelectMenuItem label="Recently bookmarked" value="recent" />
|
|
122
|
+
<SelectMenuItem label="Oldest bookmarked" value="oldest" />
|
|
123
|
+
<SelectMenuItem label="Title" value="title" />
|
|
124
|
+
</Select>
|
|
125
|
+
</Field>
|
|
126
|
+
|
|
127
|
+
<div className="flex items-end">
|
|
128
|
+
<ToolbarButton density="default" type="reset" variant="link">
|
|
129
|
+
Reset
|
|
130
|
+
</ToolbarButton>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</form>
|
|
134
|
+
)
|
|
135
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FileTextIcon, SettingsIcon, UserIcon } from "lucide-react"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Command,
|
|
5
|
+
CommandEmpty,
|
|
6
|
+
CommandGroup,
|
|
7
|
+
CommandInput,
|
|
8
|
+
CommandItem,
|
|
9
|
+
CommandList,
|
|
10
|
+
CommandSeparator,
|
|
11
|
+
CommandShortcut,
|
|
12
|
+
} from "@/components/ui/command"
|
|
13
|
+
|
|
14
|
+
export function CommandDemo() {
|
|
15
|
+
return (
|
|
16
|
+
<Command>
|
|
17
|
+
<CommandInput />
|
|
18
|
+
<CommandList>
|
|
19
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
20
|
+
<CommandGroup heading="Pages">
|
|
21
|
+
<CommandItem value="profile">
|
|
22
|
+
<UserIcon className="size-[var(--bh-space-3xl-16)]" />
|
|
23
|
+
Profile
|
|
24
|
+
<CommandShortcut>⌘P</CommandShortcut>
|
|
25
|
+
</CommandItem>
|
|
26
|
+
<CommandItem value="docs">
|
|
27
|
+
<FileTextIcon className="size-[var(--bh-space-3xl-16)]" />
|
|
28
|
+
Docs
|
|
29
|
+
<CommandShortcut>⌘D</CommandShortcut>
|
|
30
|
+
</CommandItem>
|
|
31
|
+
</CommandGroup>
|
|
32
|
+
<CommandSeparator />
|
|
33
|
+
<CommandGroup heading="Actions">
|
|
34
|
+
<CommandItem value="settings">
|
|
35
|
+
<SettingsIcon className="size-[var(--bh-space-3xl-16)]" />
|
|
36
|
+
Settings
|
|
37
|
+
</CommandItem>
|
|
38
|
+
</CommandGroup>
|
|
39
|
+
</CommandList>
|
|
40
|
+
</Command>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -21,7 +21,7 @@ import { Avatar, AvatarIcon, AvatarStatus } from "@/components/ui/avatar"
|
|
|
21
21
|
import { Badge } from "@/components/ui/badge"
|
|
22
22
|
import { Button } from "@/components/ui/button"
|
|
23
23
|
import {
|
|
24
|
-
|
|
24
|
+
MenuPreview,
|
|
25
25
|
MenuItem,
|
|
26
26
|
MenuItemDescription,
|
|
27
27
|
MenuItemText,
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
ToolbarSearch,
|
|
35
35
|
ToolbarSection,
|
|
36
36
|
} from "@/components/ui/toolbar"
|
|
37
|
-
import { CommandBar } from "@/components/ui/expanded/CommandBar"
|
|
38
37
|
|
|
39
38
|
type ToolTone = "neutral" | "blue" | "green" | "amber" | "purple" | "sky"
|
|
40
39
|
type ToolIcon = React.ComponentType<React.SVGProps<SVGSVGElement>>
|
|
@@ -96,16 +95,7 @@ const toolToneClassNames: Record<ToolTone, string> = {
|
|
|
96
95
|
sky: "text-[var(--bh-content-accent-sky-default)]",
|
|
97
96
|
}
|
|
98
97
|
|
|
99
|
-
export function
|
|
100
|
-
return (
|
|
101
|
-
<div className="grid gap-6">
|
|
102
|
-
<CommandBar />
|
|
103
|
-
<CommandBar type="results" />
|
|
104
|
-
</div>
|
|
105
|
-
)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export function AddToolPickerExample() {
|
|
98
|
+
export function CommandPaletteDemo() {
|
|
109
99
|
return (
|
|
110
100
|
<ModalSurface
|
|
111
101
|
aria-label="Add tool command example"
|
|
@@ -197,7 +187,7 @@ function ToolRow({ item }: { item: ToolItem }) {
|
|
|
197
187
|
const tone = item.tone ?? "neutral"
|
|
198
188
|
|
|
199
189
|
return (
|
|
200
|
-
<
|
|
190
|
+
<MenuPreview
|
|
201
191
|
aria-label={`${item.title} tool action`}
|
|
202
192
|
className="w-full bg-transparent p-0 shadow-none"
|
|
203
193
|
width="auto"
|
|
@@ -217,7 +207,7 @@ function ToolRow({ item }: { item: ToolItem }) {
|
|
|
217
207
|
].join(" ")}
|
|
218
208
|
size="lg"
|
|
219
209
|
>
|
|
220
|
-
<Icon aria-hidden="true" strokeWidth=
|
|
210
|
+
<Icon aria-hidden="true" strokeWidth="var(--bh-icon-stroke-200)" />
|
|
221
211
|
</AvatarIcon>
|
|
222
212
|
{item.added ? <AvatarStatus size="small" status="available" /> : null}
|
|
223
213
|
</Avatar>
|
|
@@ -241,6 +231,6 @@ function ToolRow({ item }: { item: ToolItem }) {
|
|
|
241
231
|
) : null}
|
|
242
232
|
</MenuItemText>
|
|
243
233
|
</MenuItem>
|
|
244
|
-
</
|
|
234
|
+
</MenuPreview>
|
|
245
235
|
)
|
|
246
236
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContextMenu,
|
|
3
|
+
ContextMenuContent,
|
|
4
|
+
ContextMenuItem,
|
|
5
|
+
ContextMenuLabel,
|
|
6
|
+
ContextMenuSeparator,
|
|
7
|
+
ContextMenuShortcut,
|
|
8
|
+
ContextMenuTrigger,
|
|
9
|
+
} from "@/components/ui/context-menu"
|
|
10
|
+
|
|
11
|
+
export function ContextMenuDemo() {
|
|
12
|
+
return (
|
|
13
|
+
<ContextMenu>
|
|
14
|
+
<ContextMenuTrigger className="flex h-[var(--bh-space-12xl-128)] w-[var(--bh-space-16xl-256)] items-center justify-center rounded-xl border border-dashed border-[var(--bh-border-default)] text-sm">
|
|
15
|
+
Right click
|
|
16
|
+
</ContextMenuTrigger>
|
|
17
|
+
<ContextMenuContent>
|
|
18
|
+
<ContextMenuLabel>Project</ContextMenuLabel>
|
|
19
|
+
<ContextMenuItem>
|
|
20
|
+
Open
|
|
21
|
+
<ContextMenuShortcut>⌘O</ContextMenuShortcut>
|
|
22
|
+
</ContextMenuItem>
|
|
23
|
+
<ContextMenuItem>Duplicate</ContextMenuItem>
|
|
24
|
+
<ContextMenuSeparator />
|
|
25
|
+
<ContextMenuItem>Archive</ContextMenuItem>
|
|
26
|
+
</ContextMenuContent>
|
|
27
|
+
</ContextMenu>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Button } from "@/components/ui/button"
|
|
2
|
+
import { DatePicker } from "@/components/ui/date-picker"
|
|
3
|
+
import { Input } from "@/components/ui/input"
|
|
4
|
+
import {
|
|
5
|
+
SegmentedControl,
|
|
6
|
+
SegmentedControlItem,
|
|
7
|
+
} from "@/components/ui/segmented-control"
|
|
8
|
+
import { Select } from "@/components/ui/select"
|
|
9
|
+
import { ToolbarSearch } from "@/components/ui/toolbar"
|
|
10
|
+
|
|
11
|
+
const densities = ["compact", "default", "comfortable"] as const
|
|
12
|
+
|
|
13
|
+
export function ControlDensityContractDemo() {
|
|
14
|
+
return (
|
|
15
|
+
<div
|
|
16
|
+
id="control-density-contract"
|
|
17
|
+
className="grid w-full min-w-0 gap-[var(--bh-space-3xl-16)]"
|
|
18
|
+
>
|
|
19
|
+
{densities.map((density) => (
|
|
20
|
+
<section
|
|
21
|
+
key={density}
|
|
22
|
+
data-control-density-row={density}
|
|
23
|
+
className="grid min-w-0 gap-[var(--bh-space-md-8)] rounded-[var(--bh-radius-xl-10)] bg-[var(--bh-bg-default)] p-[var(--bh-space-xl-12)]"
|
|
24
|
+
>
|
|
25
|
+
<p className="font-mono text-[length:var(--bh-text-body-xs-medium-font-size)] font-[var(--bh-text-body-xs-medium-font-weight)] uppercase text-[var(--bh-content-subtle)]">
|
|
26
|
+
{density}
|
|
27
|
+
</p>
|
|
28
|
+
<div className="flex min-w-0 flex-wrap items-center gap-[var(--bh-space-xl-12)]">
|
|
29
|
+
<Input
|
|
30
|
+
density={density}
|
|
31
|
+
hasHelperText={false}
|
|
32
|
+
hasLabel={false}
|
|
33
|
+
placeholder="Input"
|
|
34
|
+
/>
|
|
35
|
+
<Select density={density} value="Select" />
|
|
36
|
+
<DatePicker
|
|
37
|
+
density={density}
|
|
38
|
+
placeholder="Date"
|
|
39
|
+
triggerProps={{ "aria-label": `${density} date` }}
|
|
40
|
+
/>
|
|
41
|
+
<Button density={density}>Button</Button>
|
|
42
|
+
<SegmentedControl
|
|
43
|
+
aria-label={`${density} view`}
|
|
44
|
+
defaultValue="grid"
|
|
45
|
+
density={density}
|
|
46
|
+
>
|
|
47
|
+
<SegmentedControlItem value="grid">Grid</SegmentedControlItem>
|
|
48
|
+
<SegmentedControlItem value="list">List</SegmentedControlItem>
|
|
49
|
+
</SegmentedControl>
|
|
50
|
+
<ToolbarSearch
|
|
51
|
+
aria-label={`${density} search`}
|
|
52
|
+
density={density}
|
|
53
|
+
placeholder="Search"
|
|
54
|
+
width="compact"
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
</section>
|
|
58
|
+
))}
|
|
59
|
+
</div>
|
|
60
|
+
)
|
|
61
|
+
}
|