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
|
@@ -13,15 +13,15 @@ const selectedRange: CalendarRange = {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const staticPopoverClassName =
|
|
16
|
-
"static left-auto top-auto mt-
|
|
16
|
+
"static left-auto top-auto mt-[var(--bh-space-md-8)] translate-x-0"
|
|
17
17
|
const datePickerClassName =
|
|
18
18
|
"w-[var(--bh-date-surface-width-picker)] max-w-full"
|
|
19
19
|
const dateRangePickerClassName = "w-max max-w-none"
|
|
20
20
|
|
|
21
21
|
export function DatePickerDemo() {
|
|
22
22
|
return (
|
|
23
|
-
<div className="grid gap-
|
|
24
|
-
<div className="grid gap-
|
|
23
|
+
<div className="grid gap-[var(--bh-space-6xl-32)]">
|
|
24
|
+
<div className="grid gap-[var(--bh-space-5xl-24)] lg:grid-cols-[repeat(auto-fit,minmax(calc(var(--bh-space-16xl-256)_+_var(--bh-space-xs-4)),max-content))]">
|
|
25
25
|
<div data-date-demo-item>
|
|
26
26
|
<Calendar value={selectedDate} />
|
|
27
27
|
</div>
|
|
@@ -30,7 +30,7 @@ export function DatePickerDemo() {
|
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
|
-
<div className="grid gap-
|
|
33
|
+
<div className="grid gap-[var(--bh-space-5xl-24)] xl:grid-cols-2">
|
|
34
34
|
<div data-date-demo-item>
|
|
35
35
|
<DatePicker
|
|
36
36
|
calendarProps={{ className: staticPopoverClassName }}
|
|
@@ -48,7 +48,7 @@ export function DatePickerDemo() {
|
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
|
-
<div className="grid gap-
|
|
51
|
+
<div className="grid gap-[var(--bh-space-5xl-24)] xl:grid-cols-2">
|
|
52
52
|
<div data-date-demo-item>
|
|
53
53
|
<DatePicker
|
|
54
54
|
calendarProps={{ className: staticPopoverClassName }}
|
|
@@ -69,7 +69,7 @@ export function DatePickerDemo() {
|
|
|
69
69
|
</div>
|
|
70
70
|
</div>
|
|
71
71
|
|
|
72
|
-
<div className="grid gap-
|
|
72
|
+
<div className="grid gap-[var(--bh-space-5xl-24)] overflow-x-auto">
|
|
73
73
|
<div data-date-demo-item>
|
|
74
74
|
<RangeCalendar value={selectedRange} />
|
|
75
75
|
</div>
|
|
@@ -81,15 +81,15 @@ export function DatePickerDemo() {
|
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
|
|
84
|
-
<div className="grid gap-
|
|
85
|
-
<div data-date-demo-item className="overflow-x-auto pb-
|
|
84
|
+
<div className="grid gap-[var(--bh-space-5xl-24)] xl:grid-cols-2">
|
|
85
|
+
<div data-date-demo-item className="overflow-x-auto pb-[var(--bh-space-md-8)]">
|
|
86
86
|
<DateRangePicker
|
|
87
87
|
calendarProps={{ className: staticPopoverClassName }}
|
|
88
88
|
className={dateRangePickerClassName}
|
|
89
89
|
value={selectedRange}
|
|
90
90
|
/>
|
|
91
91
|
</div>
|
|
92
|
-
<div data-date-demo-item className="overflow-x-auto pb-
|
|
92
|
+
<div data-date-demo-item className="overflow-x-auto pb-[var(--bh-space-md-8)]" dir="rtl">
|
|
93
93
|
<DateRangePicker
|
|
94
94
|
calendarProps={{ className: staticPopoverClassName }}
|
|
95
95
|
className={dateRangePickerClassName}
|
|
@@ -100,8 +100,8 @@ export function DatePickerDemo() {
|
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
|
-
<div className="grid gap-
|
|
104
|
-
<div data-date-demo-item className="overflow-x-auto pb-
|
|
103
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
104
|
+
<div data-date-demo-item className="overflow-x-auto pb-[var(--bh-space-md-8)]">
|
|
105
105
|
<DateRangePicker
|
|
106
106
|
calendarProps={{ className: staticPopoverClassName }}
|
|
107
107
|
className={dateRangePickerClassName}
|
|
@@ -110,7 +110,7 @@ export function DatePickerDemo() {
|
|
|
110
110
|
value={selectedRange}
|
|
111
111
|
/>
|
|
112
112
|
</div>
|
|
113
|
-
<div data-date-demo-item className="overflow-x-auto pb-
|
|
113
|
+
<div data-date-demo-item className="overflow-x-auto pb-[var(--bh-space-md-8)]" dir="rtl">
|
|
114
114
|
<DateRangePicker
|
|
115
115
|
calendarProps={{ className: staticPopoverClassName }}
|
|
116
116
|
className={dateRangePickerClassName}
|
|
@@ -2,13 +2,13 @@ import { Divider } from "@/components/ui/divider"
|
|
|
2
2
|
|
|
3
3
|
export function DividerDemo() {
|
|
4
4
|
return (
|
|
5
|
-
<div className="grid gap-
|
|
6
|
-
<div className="grid gap-
|
|
5
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
6
|
+
<div className="grid gap-[var(--bh-space-3xl-16)]">
|
|
7
7
|
<Divider />
|
|
8
8
|
<Divider type="dotted" />
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
<div className="flex h-[var(--bh-space-15xl-224)] items-start gap-
|
|
11
|
+
<div className="flex h-[var(--bh-space-15xl-224)] items-start gap-[var(--bh-space-5xl-24)]">
|
|
12
12
|
<Divider direction="vertical" type="dotted" />
|
|
13
13
|
<Divider direction="vertical" />
|
|
14
14
|
</div>
|
|
@@ -20,7 +20,7 @@ const rtlBannerDemoCopy = {
|
|
|
20
20
|
|
|
21
21
|
export function BannerDemo() {
|
|
22
22
|
return (
|
|
23
|
-
<div className="grid gap-
|
|
23
|
+
<div className="grid gap-[var(--bh-space-3xl-16)]">
|
|
24
24
|
<Banner {...bannerDemoCopy} />
|
|
25
25
|
<Banner {...bannerDemoCopy} type="single-action-inline" />
|
|
26
26
|
<Banner {...bannerDemoCopy} size="full-width" type="single-action" />
|
|
@@ -29,7 +29,7 @@ const rtlBreadcrumbItems: BreadcrumbItem[] = [
|
|
|
29
29
|
|
|
30
30
|
export function BreadcrumbsDemo() {
|
|
31
31
|
return (
|
|
32
|
-
<div className="grid gap-
|
|
32
|
+
<div className="grid gap-[var(--bh-space-3xl-16)]">
|
|
33
33
|
<Breadcrumbs aria-label="Breadcrumb" items={breadcrumbItems} overflowLabel="More" />
|
|
34
34
|
<Breadcrumbs
|
|
35
35
|
aria-label="Breadcrumb"
|
|
@@ -19,7 +19,7 @@ const inboxActions: EmptyStateAction[] = [
|
|
|
19
19
|
|
|
20
20
|
export function EmptyStateDemo() {
|
|
21
21
|
return (
|
|
22
|
-
<div className="grid gap-
|
|
22
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
23
23
|
<EmptyState
|
|
24
24
|
actions={searchActions}
|
|
25
25
|
description="Try adjusting your search or filters"
|
|
@@ -37,7 +37,7 @@ const uploadFiles: FileUploadFile[] = [
|
|
|
37
37
|
|
|
38
38
|
export function FileUploadDemo() {
|
|
39
39
|
return (
|
|
40
|
-
<div className="grid items-start gap-
|
|
40
|
+
<div className="grid items-start gap-[var(--bh-space-4xl-20)] xl:grid-cols-2">
|
|
41
41
|
<FileUpload
|
|
42
42
|
files={uploadFiles}
|
|
43
43
|
multiple
|
|
@@ -2,7 +2,7 @@ import { OnboardingStepListItem } from "@/components/ui/expanded/OnboardingStepL
|
|
|
2
2
|
|
|
3
3
|
export function OnboardingStepDemo() {
|
|
4
4
|
return (
|
|
5
|
-
<div className="flex gap-
|
|
5
|
+
<div className="flex gap-[var(--bh-space-md-8)]">
|
|
6
6
|
<OnboardingStepListItem label="Finished" state="finished" />
|
|
7
7
|
<OnboardingStepListItem label="Active" state="active" />
|
|
8
8
|
<OnboardingStepListItem label="Inactive" state="inactive" />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Slideout
|
|
1
|
+
import { Slideout } from "@/components/ui/expanded/Slideout"
|
|
2
2
|
|
|
3
3
|
export function SlideoutDemo() {
|
|
4
4
|
return (
|
|
@@ -9,7 +9,7 @@ export function SlideoutDemo() {
|
|
|
9
9
|
secondaryActionLabel="Cancel"
|
|
10
10
|
title="Heading"
|
|
11
11
|
>
|
|
12
|
-
<
|
|
12
|
+
<p>Slideout content</p>
|
|
13
13
|
</Slideout>
|
|
14
14
|
)
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@ const stepItems: StepItem[] = Array.from({ length: 6 }, (_, index) => ({
|
|
|
21
21
|
|
|
22
22
|
export function StepsDemo() {
|
|
23
23
|
return (
|
|
24
|
-
<div className="grid gap-
|
|
24
|
+
<div className="grid gap-[var(--bh-space-6xl-32)]">
|
|
25
25
|
<Steps items={stepItems} />
|
|
26
26
|
<Steps direction="vertical" items={stepItems} />
|
|
27
27
|
</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Tabs } from "@/components/ui/
|
|
1
|
+
import { Tabs } from "@/components/ui/tabs"
|
|
2
2
|
|
|
3
3
|
const tabItems = ["Overview", "Details", "Settings", "Activity", "Files"]
|
|
4
4
|
|
|
5
5
|
export function TabsDemo() {
|
|
6
6
|
return (
|
|
7
|
-
<div className="grid gap-
|
|
7
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
8
8
|
<Tabs ariaLabel="Tabs" items={tabItems} />
|
|
9
9
|
<Tabs ariaLabel="Tabs" items={tabItems} variant="segment" />
|
|
10
10
|
<Tabs ariaLabel="Tabs" items={tabItems} variant="rounded" />
|
|
@@ -10,7 +10,7 @@ const timelineSteps: TimelineStep[] = Array.from({ length: 6 }, (_, index) => ({
|
|
|
10
10
|
|
|
11
11
|
export function TimelineDemo() {
|
|
12
12
|
return (
|
|
13
|
-
<div className="grid gap-
|
|
13
|
+
<div className="grid gap-[var(--bh-space-6xl-32)]">
|
|
14
14
|
<Timeline ariaLabel="Timeline" steps={timelineSteps} />
|
|
15
15
|
<Timeline ariaLabel="Timeline" orientation="horizontal" steps={timelineSteps} />
|
|
16
16
|
</div>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Button } from "@/components/ui/button"
|
|
2
|
+
import {
|
|
3
|
+
Field,
|
|
4
|
+
FieldContent,
|
|
5
|
+
FieldControl,
|
|
6
|
+
FieldDescription,
|
|
7
|
+
FieldError,
|
|
8
|
+
FieldGroup,
|
|
9
|
+
FieldLabel,
|
|
10
|
+
FieldLegend,
|
|
11
|
+
FieldSet,
|
|
12
|
+
} from "@/components/ui/field"
|
|
13
|
+
import { Input } from "@/components/ui/input"
|
|
14
|
+
import { Textarea } from "@/components/ui/textarea"
|
|
15
|
+
|
|
16
|
+
export function FieldDemo() {
|
|
17
|
+
return (
|
|
18
|
+
<FieldSet>
|
|
19
|
+
<FieldLegend>Account details</FieldLegend>
|
|
20
|
+
<FieldGroup>
|
|
21
|
+
<Field>
|
|
22
|
+
<FieldLabel>Email</FieldLabel>
|
|
23
|
+
<FieldControl>
|
|
24
|
+
<Input placeholder="name@example.com" />
|
|
25
|
+
</FieldControl>
|
|
26
|
+
<FieldDescription>Use your work email for team access.</FieldDescription>
|
|
27
|
+
</Field>
|
|
28
|
+
|
|
29
|
+
<Field invalid>
|
|
30
|
+
<FieldLabel>Workspace</FieldLabel>
|
|
31
|
+
<FieldControl>
|
|
32
|
+
<Input state="error" valueText="Banhaten" />
|
|
33
|
+
</FieldControl>
|
|
34
|
+
<FieldError>Workspace name is already taken.</FieldError>
|
|
35
|
+
</Field>
|
|
36
|
+
|
|
37
|
+
<Field orientation="responsive">
|
|
38
|
+
<FieldContent>
|
|
39
|
+
<FieldLabel>Notes</FieldLabel>
|
|
40
|
+
<FieldDescription>Visible to workspace administrators.</FieldDescription>
|
|
41
|
+
</FieldContent>
|
|
42
|
+
<FieldControl>
|
|
43
|
+
<Textarea placeholder="Add setup notes..." />
|
|
44
|
+
</FieldControl>
|
|
45
|
+
</Field>
|
|
46
|
+
|
|
47
|
+
<Button size="sm">Save details</Button>
|
|
48
|
+
</FieldGroup>
|
|
49
|
+
</FieldSet>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HoverCard,
|
|
3
|
+
HoverCardContent,
|
|
4
|
+
HoverCardTrigger,
|
|
5
|
+
} from "@/components/ui/hover-card"
|
|
6
|
+
|
|
7
|
+
export function HoverCardDemo() {
|
|
8
|
+
return (
|
|
9
|
+
<HoverCard>
|
|
10
|
+
<HoverCardTrigger className="underline underline-offset-[var(--bh-space-xs-4)]">
|
|
11
|
+
Workspace profile
|
|
12
|
+
</HoverCardTrigger>
|
|
13
|
+
<HoverCardContent>
|
|
14
|
+
<div className="grid gap-[var(--bh-space-xs-4)]">
|
|
15
|
+
<strong>Design System</strong>
|
|
16
|
+
<span className="text-sm text-[var(--bh-content-subtle)]">
|
|
17
|
+
Tokens, components, and RTL-ready examples.
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
</HoverCardContent>
|
|
21
|
+
</HoverCard>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -34,15 +34,15 @@ const demoRtlInputProps = {
|
|
|
34
34
|
|
|
35
35
|
export function InputDemo() {
|
|
36
36
|
return (
|
|
37
|
-
<div className="grid gap-
|
|
38
|
-
<div className="flex flex-wrap items-start gap-
|
|
37
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
38
|
+
<div className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
39
39
|
<Input {...demoInputProps} />
|
|
40
40
|
<Input {...demoInputProps} state="filled" />
|
|
41
41
|
<Input {...demoInputProps} state="error" />
|
|
42
42
|
<Input {...demoInputProps} state="disabled" />
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
|
-
<div className="flex flex-wrap items-start gap-
|
|
45
|
+
<div className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
46
46
|
<Input {...demoInputProps} kind="shortcut" />
|
|
47
47
|
<Input {...demoInputProps} kind="add-on" />
|
|
48
48
|
<Input {...demoInputProps} kind="inline-add-on" />
|
|
@@ -55,7 +55,7 @@ export function InputDemo() {
|
|
|
55
55
|
/>
|
|
56
56
|
</div>
|
|
57
57
|
|
|
58
|
-
<div className="flex flex-wrap items-start gap-
|
|
58
|
+
<div className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
59
59
|
<Input {...demoInputProps} kind="leading-dropdown" />
|
|
60
60
|
<Input {...demoInputProps} kind="trailing-dropdown" />
|
|
61
61
|
<Input {...demoInputProps} kind="leading-button" />
|
|
@@ -64,13 +64,13 @@ export function InputDemo() {
|
|
|
64
64
|
<Input {...demoInputProps} kind="quantity-2" state="filled" valueText="1" />
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
|
-
<div className="flex flex-wrap items-start gap-
|
|
67
|
+
<div className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
68
68
|
<Input {...demoInputProps} size="md" />
|
|
69
69
|
<Input {...demoInputProps} size="md" variant="soft" />
|
|
70
70
|
<Input {...demoInputProps} size="md" variant="soft" state="error" />
|
|
71
71
|
</div>
|
|
72
72
|
|
|
73
|
-
<div dir="rtl" className="flex flex-wrap items-start gap-
|
|
73
|
+
<div dir="rtl" className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
74
74
|
<Input {...demoRtlInputProps} dir="rtl" />
|
|
75
75
|
<Input {...demoRtlInputProps} dir="rtl" state="filled" />
|
|
76
76
|
<Input {...demoRtlInputProps} dir="rtl" state="error" />
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
InputGroup,
|
|
3
|
+
InputGroupAddon,
|
|
4
|
+
InputGroupButton,
|
|
5
|
+
InputGroupInput,
|
|
6
|
+
} from "@/components/ui/input-group"
|
|
7
|
+
|
|
8
|
+
export function InputGroupDemo() {
|
|
9
|
+
return (
|
|
10
|
+
<InputGroup>
|
|
11
|
+
<InputGroupAddon>https://</InputGroupAddon>
|
|
12
|
+
<InputGroupInput aria-label="Workspace URL" defaultValue="banhaten.design" />
|
|
13
|
+
<InputGroupButton>Save</InputGroupButton>
|
|
14
|
+
</InputGroup>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
@@ -2,8 +2,8 @@ import { InputOTP } from "@/components/ui/input-otp"
|
|
|
2
2
|
|
|
3
3
|
export function InputOTPDemo() {
|
|
4
4
|
return (
|
|
5
|
-
<div className="grid gap-
|
|
6
|
-
<div className="flex flex-wrap items-start gap-
|
|
5
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
6
|
+
<div className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
7
7
|
<InputOTP
|
|
8
8
|
label="Verification code"
|
|
9
9
|
message="Enter the code from your authenticator."
|
|
@@ -27,7 +27,7 @@ export function InputOTPDemo() {
|
|
|
27
27
|
/>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
-
<div className="flex flex-wrap items-start gap-
|
|
30
|
+
<div className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
31
31
|
<InputOTP
|
|
32
32
|
defaultValue="482159"
|
|
33
33
|
label="Masked code"
|
|
@@ -52,7 +52,7 @@ export function InputOTPDemo() {
|
|
|
52
52
|
/>
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
|
-
<div dir="rtl" className="flex flex-wrap items-start gap-
|
|
55
|
+
<div dir="rtl" className="flex flex-wrap items-start gap-[var(--bh-space-5xl-24)]">
|
|
56
56
|
<InputOTP
|
|
57
57
|
defaultValue="482159"
|
|
58
58
|
dir="rtl"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ChevronRightIcon, FileTextIcon } from "lucide-react"
|
|
2
|
+
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import {
|
|
5
|
+
Item,
|
|
6
|
+
ItemActions,
|
|
7
|
+
ItemContent,
|
|
8
|
+
ItemDescription,
|
|
9
|
+
ItemGroup,
|
|
10
|
+
ItemMedia,
|
|
11
|
+
ItemSeparator,
|
|
12
|
+
ItemTitle,
|
|
13
|
+
} from "@/components/ui/item"
|
|
14
|
+
|
|
15
|
+
export function ItemDemo() {
|
|
16
|
+
return (
|
|
17
|
+
<ItemGroup aria-label="Recent documents">
|
|
18
|
+
<Item role="listitem" variant="outline">
|
|
19
|
+
<ItemMedia>
|
|
20
|
+
<FileTextIcon aria-hidden="true" />
|
|
21
|
+
</ItemMedia>
|
|
22
|
+
<ItemContent>
|
|
23
|
+
<ItemTitle>Launch checklist</ItemTitle>
|
|
24
|
+
<ItemDescription>Updated five minutes ago</ItemDescription>
|
|
25
|
+
</ItemContent>
|
|
26
|
+
<ItemActions>
|
|
27
|
+
<Button aria-label="Open Launch checklist" size="icon" variant="ghost">
|
|
28
|
+
<ChevronRightIcon aria-hidden="true" data-rtl-flip="true" />
|
|
29
|
+
</Button>
|
|
30
|
+
</ItemActions>
|
|
31
|
+
</Item>
|
|
32
|
+
<ItemSeparator />
|
|
33
|
+
<div dir="rtl">
|
|
34
|
+
<Item role="listitem" variant="muted">
|
|
35
|
+
<ItemMedia>
|
|
36
|
+
<FileTextIcon aria-hidden="true" />
|
|
37
|
+
</ItemMedia>
|
|
38
|
+
<ItemContent>
|
|
39
|
+
<ItemTitle>{"\u062e\u0637\u0629 \u0627\u0644\u0625\u0637\u0644\u0627\u0642"}</ItemTitle>
|
|
40
|
+
<ItemDescription>{"\u062a\u0645 \u0627\u0644\u062a\u062d\u062f\u064a\u062b \u0645\u0646\u0630 \u062e\u0645\u0633 \u062f\u0642\u0627\u0626\u0642"}</ItemDescription>
|
|
41
|
+
</ItemContent>
|
|
42
|
+
</Item>
|
|
43
|
+
</div>
|
|
44
|
+
</ItemGroup>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Checkbox } from "@/components/ui/checkbox"
|
|
2
|
+
import { Label } from "@/components/ui/label"
|
|
3
|
+
|
|
4
|
+
export function LabelDemo() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="grid gap-[var(--bh-space-3xl-16)]">
|
|
7
|
+
<div className="flex items-center gap-[var(--bh-space-md-8)]">
|
|
8
|
+
<Checkbox id="terms" />
|
|
9
|
+
<Label htmlFor="terms">Accept terms and conditions</Label>
|
|
10
|
+
</div>
|
|
11
|
+
<Label optionalText="(Optional)">Project name</Label>
|
|
12
|
+
<div dir="rtl" className="flex items-center gap-[var(--bh-space-md-8)]">
|
|
13
|
+
<Checkbox id="terms-rtl" />
|
|
14
|
+
<Label htmlFor="terms-rtl" required>
|
|
15
|
+
قبول الشروط والأحكام
|
|
16
|
+
</Label>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
|
|
33
33
|
export function MenuDemo() {
|
|
34
34
|
return (
|
|
35
|
-
<div className="flex min-h-[var(--bh-space-16xl-256)] items-start justify-center p-
|
|
35
|
+
<div className="flex min-h-[var(--bh-space-16xl-256)] items-start justify-center p-[var(--bh-space-5xl-24)]">
|
|
36
36
|
<MenuRoot>
|
|
37
37
|
<MenuTrigger asChild>
|
|
38
38
|
<Button size="sm" variant="outline">
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Menubar,
|
|
3
|
+
MenubarContent,
|
|
4
|
+
MenubarItem,
|
|
5
|
+
MenubarMenu,
|
|
6
|
+
MenubarSeparator,
|
|
7
|
+
MenubarShortcut,
|
|
8
|
+
MenubarTrigger,
|
|
9
|
+
} from "@/components/ui/menubar"
|
|
10
|
+
|
|
11
|
+
export function MenubarDemo() {
|
|
12
|
+
return (
|
|
13
|
+
<Menubar>
|
|
14
|
+
<MenubarMenu>
|
|
15
|
+
<MenubarTrigger>File</MenubarTrigger>
|
|
16
|
+
<MenubarContent>
|
|
17
|
+
<MenubarItem>
|
|
18
|
+
New
|
|
19
|
+
<MenubarShortcut>⌘N</MenubarShortcut>
|
|
20
|
+
</MenubarItem>
|
|
21
|
+
<MenubarItem>Open</MenubarItem>
|
|
22
|
+
<MenubarSeparator />
|
|
23
|
+
<MenubarItem>Export</MenubarItem>
|
|
24
|
+
</MenubarContent>
|
|
25
|
+
</MenubarMenu>
|
|
26
|
+
<MenubarMenu>
|
|
27
|
+
<MenubarTrigger>View</MenubarTrigger>
|
|
28
|
+
<MenubarContent>
|
|
29
|
+
<MenubarItem>Toggle sidebar</MenubarItem>
|
|
30
|
+
</MenubarContent>
|
|
31
|
+
</MenubarMenu>
|
|
32
|
+
</Menubar>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
@@ -1,15 +1,73 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import {
|
|
5
|
+
arabicModalMessages,
|
|
6
|
+
Modal,
|
|
7
|
+
ModalActionButton,
|
|
8
|
+
ModalActions,
|
|
9
|
+
ModalBody,
|
|
10
|
+
ModalCloseButton,
|
|
11
|
+
ModalContent,
|
|
12
|
+
ModalDescription,
|
|
13
|
+
ModalDivider,
|
|
14
|
+
ModalFooter,
|
|
15
|
+
ModalHeader,
|
|
16
|
+
ModalHeaderIcon,
|
|
17
|
+
ModalRoot,
|
|
18
|
+
ModalTitle,
|
|
19
|
+
ModalTrigger,
|
|
20
|
+
} from "@/components/ui/modal"
|
|
2
21
|
|
|
3
22
|
export function ModalDemo() {
|
|
23
|
+
// The Modal shorthand builds the whole structure from props, so it is driven
|
|
24
|
+
// by open state rather than a trigger child.
|
|
25
|
+
const [confirmOpen, setConfirmOpen] = React.useState(false)
|
|
26
|
+
|
|
4
27
|
return (
|
|
5
|
-
<div className="grid gap-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
28
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
29
|
+
{/* Compose the primitives when a control in the page opens the modal. */}
|
|
30
|
+
<ModalRoot>
|
|
31
|
+
<ModalTrigger asChild>
|
|
32
|
+
<Button variant="outline">Publish release</Button>
|
|
33
|
+
</ModalTrigger>
|
|
34
|
+
<ModalContent size="default">
|
|
35
|
+
<ModalHeader>
|
|
36
|
+
<ModalHeaderIcon />
|
|
37
|
+
<ModalTitle>Publish this release?</ModalTitle>
|
|
38
|
+
<ModalCloseButton />
|
|
39
|
+
</ModalHeader>
|
|
40
|
+
<ModalBody>
|
|
41
|
+
<ModalDescription>
|
|
42
|
+
Everyone on the team will see the new version immediately. You can
|
|
43
|
+
roll it back from the releases page.
|
|
44
|
+
</ModalDescription>
|
|
45
|
+
</ModalBody>
|
|
46
|
+
<ModalDivider />
|
|
47
|
+
<ModalFooter>
|
|
48
|
+
<ModalActions>
|
|
49
|
+
<ModalActionButton variant="soft">Cancel</ModalActionButton>
|
|
50
|
+
<ModalActionButton>Publish</ModalActionButton>
|
|
51
|
+
</ModalActions>
|
|
52
|
+
</ModalFooter>
|
|
53
|
+
</ModalContent>
|
|
54
|
+
</ModalRoot>
|
|
55
|
+
|
|
56
|
+
{/* `messages` localizes the chrome; `title` and `description` are your
|
|
57
|
+
content, so the caller always supplies them. */}
|
|
58
|
+
<div dir="rtl">
|
|
59
|
+
<Button onClick={() => setConfirmOpen(true)} variant="outline">
|
|
60
|
+
نشر الإصدار
|
|
61
|
+
</Button>
|
|
62
|
+
<Modal
|
|
63
|
+
description="راجع التفاصيل قبل المتابعة. يمكنك التراجع لاحقًا من صفحة الإصدارات."
|
|
64
|
+
dir="rtl"
|
|
65
|
+
messages={arabicModalMessages}
|
|
66
|
+
onOpenChange={setConfirmOpen}
|
|
67
|
+
open={confirmOpen}
|
|
68
|
+
size="default"
|
|
69
|
+
title="هل تريد نشر هذا الإصدار؟"
|
|
70
|
+
/>
|
|
13
71
|
</div>
|
|
14
72
|
</div>
|
|
15
73
|
)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NativeSelect } from "@/components/ui/native-select"
|
|
2
|
+
|
|
3
|
+
export function NativeSelectDemo() {
|
|
4
|
+
return (
|
|
5
|
+
<NativeSelect
|
|
6
|
+
label="Workspace"
|
|
7
|
+
defaultValue="design"
|
|
8
|
+
helperText="Native select for platform forms."
|
|
9
|
+
options={[
|
|
10
|
+
{ label: "Design", value: "design" },
|
|
11
|
+
{ label: "Engineering", value: "engineering" },
|
|
12
|
+
{ label: "Operations", value: "operations" },
|
|
13
|
+
]}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NavigationMenu,
|
|
3
|
+
NavigationMenuContent,
|
|
4
|
+
NavigationMenuItem,
|
|
5
|
+
NavigationMenuLink,
|
|
6
|
+
NavigationMenuList,
|
|
7
|
+
NavigationMenuTrigger,
|
|
8
|
+
NavigationMenuViewport,
|
|
9
|
+
} from "@/components/ui/navigation-menu"
|
|
10
|
+
|
|
11
|
+
export function NavigationMenuDemo() {
|
|
12
|
+
return (
|
|
13
|
+
<NavigationMenu>
|
|
14
|
+
<NavigationMenuList>
|
|
15
|
+
<NavigationMenuItem>
|
|
16
|
+
<NavigationMenuTrigger>Product</NavigationMenuTrigger>
|
|
17
|
+
<NavigationMenuContent>
|
|
18
|
+
<div className="grid gap-[var(--bh-space-md-8)]">
|
|
19
|
+
<NavigationMenuLink href="#">Components</NavigationMenuLink>
|
|
20
|
+
<NavigationMenuLink href="#">Tokens</NavigationMenuLink>
|
|
21
|
+
<NavigationMenuLink href="#">Patterns</NavigationMenuLink>
|
|
22
|
+
</div>
|
|
23
|
+
</NavigationMenuContent>
|
|
24
|
+
</NavigationMenuItem>
|
|
25
|
+
</NavigationMenuList>
|
|
26
|
+
<NavigationMenuViewport />
|
|
27
|
+
</NavigationMenu>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
arabicPaginationMessages,
|
|
3
|
+
Pagination,
|
|
4
|
+
} from "@/components/ui/pagination"
|
|
2
5
|
|
|
3
6
|
export function PaginationDemo() {
|
|
4
7
|
return (
|
|
5
|
-
<div className="grid gap-
|
|
8
|
+
<div className="grid gap-[var(--bh-space-5xl-24)]">
|
|
6
9
|
<Pagination />
|
|
7
10
|
<Pagination variant="ghost" />
|
|
8
11
|
|
|
@@ -10,7 +13,7 @@ export function PaginationDemo() {
|
|
|
10
13
|
<Pagination type="summary" />
|
|
11
14
|
|
|
12
15
|
<div dir="rtl">
|
|
13
|
-
<Pagination dir="rtl" />
|
|
16
|
+
<Pagination dir="rtl" messages={arabicPaginationMessages} />
|
|
14
17
|
</div>
|
|
15
18
|
</div>
|
|
16
19
|
)
|