banhaten 0.1.3 → 0.3.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 +73 -0
- package/CONTRIBUTING.md +44 -0
- package/README.md +65 -13
- package/SECURITY.md +15 -0
- package/banhaten.config.example.json +0 -2
- package/docs/design-system/README.md +9 -0
- package/docs/design-system/adoption-quality-remediation.md +87 -0
- package/docs/design-system/agent-usage.md +13 -0
- package/docs/design-system/appearance-presets.md +6 -1
- package/docs/design-system/component-docs-pattern.md +81 -0
- package/docs/design-system/component-implementation-ownership-audit.md +244 -0
- package/docs/design-system/component-quality-audit-2026-08-20.md +223 -0
- package/docs/design-system/component-showcase-consistency-report.md +2 -0
- package/docs/design-system/component-token-consistency-audit.md +13 -3
- package/docs/design-system/components/README.md +4 -2
- package/docs/design-system/components/accordion.md +16 -0
- package/docs/design-system/components/activity-feed.md +17 -1
- package/docs/design-system/components/activity-heatmap.md +73 -0
- package/docs/design-system/components/alert-dialog.md +17 -0
- package/docs/design-system/components/alert.md +46 -14
- package/docs/design-system/components/aspect-ratio.md +15 -0
- package/docs/design-system/components/attribute.md +16 -0
- package/docs/design-system/components/autocomplete.md +19 -0
- package/docs/design-system/components/avatar.md +18 -0
- package/docs/design-system/components/badge.md +19 -0
- package/docs/design-system/components/banner.md +19 -1
- package/docs/design-system/components/breadcrumbs.md +17 -0
- package/docs/design-system/components/button-group.md +35 -0
- package/docs/design-system/components/button.md +18 -0
- package/docs/design-system/components/card.md +26 -1
- package/docs/design-system/components/carousel.md +20 -3
- package/docs/design-system/components/catalog-components.md +18 -1
- package/docs/design-system/components/chart.md +15 -0
- package/docs/design-system/components/checkbox.md +16 -0
- package/docs/design-system/components/collapsible.md +15 -0
- package/docs/design-system/components/command.md +15 -0
- package/docs/design-system/components/context-menu.md +15 -0
- package/docs/design-system/components/date-picker.md +21 -1
- package/docs/design-system/components/divider.md +16 -0
- package/docs/design-system/components/empty-state.md +17 -0
- package/docs/design-system/components/field.md +17 -0
- package/docs/design-system/components/file-upload.md +18 -0
- package/docs/design-system/components/hover-card.md +15 -0
- package/docs/design-system/components/input-group.md +17 -0
- package/docs/design-system/components/input-otp.md +18 -0
- package/docs/design-system/components/input.md +43 -7
- package/docs/design-system/components/item.md +72 -0
- package/docs/design-system/components/kbd.md +18 -0
- package/docs/design-system/components/label.md +16 -0
- package/docs/design-system/components/menu.md +17 -0
- package/docs/design-system/components/menubar.md +15 -0
- package/docs/design-system/components/modal.md +25 -4
- package/docs/design-system/components/native-select.md +18 -0
- package/docs/design-system/components/navigation-menu.md +15 -0
- package/docs/design-system/components/onboarding-step-list-item.md +16 -1
- package/docs/design-system/components/page-header.md +17 -1
- package/docs/design-system/components/pagination.md +31 -8
- package/docs/design-system/components/popover.md +19 -0
- package/docs/design-system/components/progress-slider.md +18 -0
- package/docs/design-system/components/progress.md +17 -0
- package/docs/design-system/components/radio-card.md +16 -0
- package/docs/design-system/components/radio-group.md +17 -0
- package/docs/design-system/components/resizable.md +15 -0
- package/docs/design-system/components/scroll-area.md +20 -1
- package/docs/design-system/components/segmented-control.md +71 -0
- package/docs/design-system/components/select.md +44 -7
- package/docs/design-system/components/sheet.md +17 -0
- package/docs/design-system/components/sidebar.md +17 -0
- package/docs/design-system/components/skeleton.md +18 -0
- package/docs/design-system/components/slideout.md +17 -0
- package/docs/design-system/components/slider.md +20 -0
- package/docs/design-system/components/social-button.md +21 -3
- package/docs/design-system/components/spinner.md +16 -0
- package/docs/design-system/components/steps.md +19 -0
- package/docs/design-system/components/table.md +36 -4
- package/docs/design-system/components/tabs.md +17 -0
- package/docs/design-system/components/tag.md +17 -0
- package/docs/design-system/components/textarea.md +16 -0
- package/docs/design-system/components/timeline.md +17 -0
- package/docs/design-system/components/toast.md +17 -0
- package/docs/design-system/components/toggle.md +17 -0
- package/docs/design-system/components/toolbar.md +21 -1
- package/docs/design-system/components/tooltip.md +18 -1
- package/docs/design-system/density-and-elevation.md +61 -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 +100 -0
- package/docs/design-system/installation.md +68 -0
- package/docs/design-system/launch-comparison-shadcn.md +98 -0
- package/docs/design-system/registry-and-cli.md +30 -7
- package/docs/design-system/release-policy.md +30 -0
- package/docs/design-system/roadmap.md +14 -0
- package/docs/design-system/support-matrix.md +23 -0
- package/docs/design-system/tabs.md +1 -1
- package/docs/design-system/token-governance.md +23 -1
- package/package.json +30 -15
- package/registry/component-contract.json +40 -0
- package/registry/components/alert-dialog.tsx +2 -2
- package/registry/components/alert.tsx +101 -76
- package/registry/components/autocomplete.tsx +23 -9
- package/registry/components/avatar.tsx +14 -10
- package/registry/components/badge.tsx +18 -18
- package/registry/components/button-group.tsx +324 -5
- package/registry/components/button.tsx +38 -17
- package/registry/components/card.tsx +87 -62
- package/registry/components/carousel.tsx +67 -5
- package/registry/components/chart.tsx +36 -3
- package/registry/components/checkbox.tsx +3 -3
- package/registry/components/collapsible.tsx +1 -1
- package/registry/components/command.tsx +38 -4
- package/registry/components/context-menu.tsx +1 -1
- package/registry/components/date-picker.tsx +312 -135
- package/registry/components/expanded/ActivityFeed.tsx +9 -22
- package/registry/components/expanded/ActivityHeatmap.tsx +64 -0
- package/registry/components/expanded/Banner.tsx +3 -4
- package/registry/components/expanded/Breadcrumbs.tsx +8 -5
- package/registry/components/expanded/CatalogComponentsShowcase.tsx +16 -17
- package/registry/components/expanded/CatalogDivider.tsx +4 -3
- package/registry/components/expanded/EmptyState.tsx +1 -1
- package/registry/components/expanded/FileUpload.tsx +16 -7
- package/registry/components/expanded/OnboardingStepListItem.tsx +2 -6
- package/registry/components/expanded/PageHeader.tsx +47 -56
- package/registry/components/expanded/Slideout.tsx +29 -424
- package/registry/components/expanded/Steps.tsx +151 -13
- package/registry/components/expanded/Table.tsx +161 -82
- package/registry/components/expanded/Timeline.tsx +14 -27
- package/registry/components/expanded/activityFeed.css +9 -9
- package/registry/components/expanded/activityHeatmap.css +66 -0
- package/registry/components/expanded/banner.css +21 -11
- package/registry/components/expanded/breadcrumbs.css +2 -2
- package/registry/components/expanded/divider.css +1 -1
- package/registry/components/expanded/emptyState.css +1 -1
- package/registry/components/expanded/fileUpload.css +7 -7
- package/registry/components/expanded/onboardingStepListItem.css +2 -2
- package/registry/components/expanded/pageHeader.css +14 -11
- package/registry/components/expanded/slideout.css +10 -690
- package/registry/components/expanded/steps.css +78 -15
- package/registry/components/expanded/table.css +60 -69
- package/registry/components/expanded/timeline.css +19 -18
- package/registry/components/field.tsx +61 -8
- package/registry/components/input-content.ts +1 -0
- package/registry/components/input-otp.tsx +13 -3
- package/registry/components/input.tsx +68 -43
- package/registry/components/item.tsx +189 -0
- package/registry/components/kbd.tsx +111 -4
- package/registry/components/menu.tsx +87 -251
- package/registry/components/menubar.tsx +1 -1
- package/registry/components/modal.tsx +143 -103
- package/registry/components/native-select.tsx +2 -2
- package/registry/components/navigation-menu.tsx +1 -1
- package/registry/components/pagination.css +36 -0
- package/registry/components/pagination.tsx +88 -64
- package/registry/components/popover.tsx +162 -664
- package/registry/components/progress-slider.tsx +1 -1
- package/registry/components/radio-card.tsx +116 -87
- package/registry/components/resizable.tsx +36 -2
- package/registry/components/scroll-area.tsx +30 -6
- package/registry/components/segmented-control.tsx +87 -0
- package/registry/components/select-content.tsx +2 -2
- package/registry/components/select.tsx +86 -27
- package/registry/components/sheet.tsx +1 -1
- package/registry/components/sidebar.tsx +12 -6
- package/registry/components/skeleton.css +0 -3
- package/registry/components/social-button.tsx +59 -30
- package/registry/components/spinner.tsx +18 -55
- package/registry/components/table-elements.tsx +128 -0
- package/registry/components/tabs.css +1 -1
- package/registry/components/tabs.tsx +13 -14
- package/registry/components/tag.tsx +3 -3
- package/registry/components/textarea.tsx +3 -3
- package/registry/components/toast.tsx +16 -11
- package/registry/components/toggle.tsx +4 -4
- package/registry/components/toolbar.tsx +94 -22
- package/registry/components/tooltip.tsx +2 -2
- package/registry/examples/alert-demo.tsx +25 -5
- package/registry/examples/attribute-demo.tsx +1 -1
- package/registry/examples/autocomplete-demo.tsx +3 -3
- package/registry/examples/avatar-demo.tsx +14 -11
- package/registry/examples/badge-demo.tsx +1 -1
- package/registry/examples/button-demo.tsx +6 -6
- package/registry/examples/button-group-demo.tsx +23 -2
- package/registry/examples/card-demo.tsx +46 -8
- package/registry/examples/carousel-demo.tsx +20 -2
- package/registry/examples/chart-demo.tsx +1 -1
- package/registry/examples/checkbox-demo.tsx +5 -5
- package/registry/examples/collection-filter-bar-demo.tsx +135 -0
- package/registry/examples/command-demo.tsx +3 -3
- package/registry/examples/{expanded/command-bar-demo.tsx → command-palette-demo.tsx} +5 -15
- package/registry/examples/context-menu-demo.tsx +1 -1
- package/registry/examples/control-density-contract-demo.tsx +61 -0
- package/registry/examples/date-picker-demo.tsx +12 -12
- package/registry/examples/divider-demo.tsx +3 -3
- package/registry/examples/expanded/activity-heatmap-demo.tsx +29 -0
- package/registry/examples/expanded/banner-demo.tsx +1 -1
- package/registry/examples/expanded/breadcrumbs-demo.tsx +4 -4
- package/registry/examples/expanded/empty-state-demo.tsx +1 -1
- package/registry/examples/expanded/file-upload-demo.tsx +1 -1
- package/registry/examples/expanded/onboarding-step-demo.tsx +1 -1
- package/registry/examples/expanded/slideout-demo.tsx +2 -2
- package/registry/examples/expanded/steps-demo.tsx +1 -1
- package/registry/examples/expanded/tabs-demo.tsx +1 -1
- package/registry/examples/expanded/timeline-demo.tsx +1 -1
- package/registry/examples/hover-card-demo.tsx +2 -2
- package/registry/examples/input-demo.tsx +6 -6
- package/registry/examples/input-otp-demo.tsx +4 -4
- package/registry/examples/item-demo.tsx +46 -0
- package/registry/examples/kbd-demo.tsx +1 -1
- package/registry/examples/label-demo.tsx +1 -1
- package/registry/examples/menu-demo.tsx +1 -1
- package/registry/examples/modal-demo.tsx +67 -9
- package/registry/examples/navigation-menu-demo.tsx +1 -1
- package/registry/examples/pagination-demo.tsx +10 -7
- package/registry/examples/popover-demo.tsx +19 -19
- package/registry/examples/progress-demo.tsx +1 -1
- package/registry/examples/progress-slider-demo.tsx +1 -1
- package/registry/examples/radio-card-demo.tsx +4 -4
- package/registry/examples/radio-group-demo.tsx +2 -2
- package/registry/examples/resizable-demo.tsx +1 -1
- package/registry/examples/results-toolbar-demo.tsx +44 -0
- package/registry/examples/scroll-area-demo.tsx +3 -3
- package/registry/examples/segmented-control-demo.tsx +39 -0
- package/registry/examples/select-demo.tsx +1 -1
- package/registry/examples/sidebar-demo.tsx +5 -3
- package/registry/examples/slider-demo.tsx +3 -3
- package/registry/examples/social-button-demo.tsx +18 -8
- package/registry/examples/spinner-demo.tsx +13 -13
- package/registry/examples/tabs-demo.tsx +1 -1
- package/registry/examples/tag-demo.tsx +1 -1
- package/registry/examples/textarea-demo.tsx +4 -4
- package/registry/examples/toast-demo.tsx +1 -1
- package/registry/examples/toggle-demo.tsx +6 -6
- package/registry/examples/tooltip-demo.tsx +4 -4
- package/registry/guidance/USAGE.md +27 -0
- package/registry/hooks/use-direction.ts +193 -13
- package/registry/index.json +5668 -375
- package/registry/styles/globals.css +2404 -3999
- package/registry.json +156 -149
- package/schema/config.schema.json +11 -8
- package/schema/registry.schema.json +150 -45
- package/schema/tokens.schema.json +134 -34
- package/src/cli/command-line.js +194 -0
- package/src/cli/config-editors.js +9 -0
- package/src/cli/doctor.js +399 -0
- package/src/cli/file-transaction.js +295 -0
- package/src/cli/global-css.js +153 -0
- package/src/cli/index.js +567 -1613
- package/src/cli/install-plan.js +592 -0
- package/src/cli/install-receipt.js +171 -0
- package/src/cli/jsonc.js +203 -0
- package/src/cli/package-install-state.js +254 -0
- package/src/cli/package-manager.js +238 -0
- package/src/cli/package-plan.js +185 -0
- package/src/cli/package-version.js +97 -0
- package/src/cli/registry-query.js +207 -0
- package/src/cli/reporting.js +55 -0
- package/src/cli/schema-validation.js +19 -0
- package/src/cli/source-scanner.js +686 -0
- package/src/cli/vite-config.js +478 -0
- package/tokens/banhaten.tokens.json +4444 -331
- package/docs/design-system/components/command-bar.md +0 -57
- package/registry/components/expanded/BannerBoard.tsx +0 -225
- package/registry/components/expanded/CatalogTag.tsx +0 -85
- package/registry/components/expanded/CommandBar.tsx +0 -386
- package/registry/components/expanded/IconExplorer.tsx +0 -612
- package/registry/components/expanded/TimelineShowcase.tsx +0 -158
- package/registry/components/expanded/commandBar.css +0 -470
- package/registry/components/expanded/iconExplorer.css +0 -764
- package/registry/components/expanded/iconPacks.ts +0 -866
- package/registry/components/expanded/tag.css +0 -148
- package/registry/examples/expanded/icons-demo.tsx +0 -5
- package/tokens/Color mode.zip +0 -0
- package/tokens/Numbers.zip +0 -0
- package/tokens/Radius.zip +0 -0
- package/tokens/Theme.zip +0 -0
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
} from "lucide-react"
|
|
11
11
|
|
|
12
12
|
import { cn } from "@/lib/utils"
|
|
13
|
+
import { useResolvedDirection } from "@/hooks/use-direction"
|
|
14
|
+
import { Button } from "@/components/ui/button"
|
|
13
15
|
|
|
14
16
|
const alertVariants = cva(
|
|
15
17
|
[
|
|
@@ -21,13 +23,13 @@ const alertVariants = cva(
|
|
|
21
23
|
variants: {
|
|
22
24
|
status: {
|
|
23
25
|
danger:
|
|
24
|
-
"[--alert-bg:var(--bh-bg-danger-subtle)] [--alert-border:var(--bh-border-danger-subtle)] [--alert-title:var(--bh-content-danger-strong)] [--alert-description:var(--bh-content-danger-
|
|
26
|
+
"[--alert-bg:var(--bh-bg-danger-subtle)] [--alert-border:var(--bh-border-danger-subtle)] [--alert-title:var(--bh-content-danger-strong)] [--alert-description:var(--bh-content-danger-strong)] [--alert-icon:var(--bh-content-danger-default)]",
|
|
25
27
|
success:
|
|
26
|
-
"[--alert-bg:var(--bh-bg-success-subtle)] [--alert-border:var(--bh-border-success-subtle)] [--alert-title:var(--bh-content-success-strong)] [--alert-description:var(--bh-content-success-
|
|
28
|
+
"[--alert-bg:var(--bh-bg-success-subtle)] [--alert-border:var(--bh-border-success-subtle)] [--alert-title:var(--bh-content-success-strong)] [--alert-description:var(--bh-content-success-strong)] [--alert-icon:var(--bh-content-success-default)]",
|
|
27
29
|
warning:
|
|
28
|
-
"[--alert-bg:var(--bh-bg-warning-subtle)] [--alert-border:var(--bh-border-warning-subtle)] [--alert-title:var(--bh-content-warning-strong)] [--alert-description:var(--bh-content-warning-
|
|
30
|
+
"[--alert-bg:var(--bh-bg-warning-subtle)] [--alert-border:var(--bh-border-warning-subtle)] [--alert-title:var(--bh-content-warning-strong)] [--alert-description:var(--bh-content-warning-strong)] [--alert-icon:var(--bh-content-warning-default)]",
|
|
29
31
|
info:
|
|
30
|
-
"[--alert-bg:var(--bh-bg-info-subtle)] [--alert-border:var(--bh-border-info-subtle)] [--alert-title:var(--bh-content-brand-strong)] [--alert-description:var(--bh-content-brand-
|
|
32
|
+
"[--alert-bg:var(--bh-bg-info-subtle)] [--alert-border:var(--bh-border-info-subtle)] [--alert-title:var(--bh-content-brand-strong)] [--alert-description:var(--bh-content-brand-strong)] [--alert-icon:var(--bh-content-brand-default)]",
|
|
31
33
|
neutral:
|
|
32
34
|
"[--alert-bg:var(--bh-bg-neutral-subtle)] [--alert-border:var(--bh-border-subtle)] [--alert-title:var(--bh-content-default)] [--alert-description:var(--bh-content-default)] [--alert-icon:var(--bh-content-default)]",
|
|
33
35
|
},
|
|
@@ -35,11 +37,11 @@ const alertVariants = cva(
|
|
|
35
37
|
false:
|
|
36
38
|
"h-[var(--bh-alert-compact-height)] w-[var(--bh-alert-compact-width)] items-center gap-[var(--bh-space-xl-12)] rounded-[var(--bh-alert-compact-radius)] p-[var(--bh-alert-compact-padding)]",
|
|
37
39
|
true:
|
|
38
|
-
"
|
|
40
|
+
"w-[var(--bh-alert-expanded-width)] items-start gap-[var(--bh-space-xl-12)] rounded-[var(--bh-alert-expanded-radius)] px-[var(--bh-alert-expanded-padding-x)] py-[var(--bh-alert-expanded-padding-y)]",
|
|
39
41
|
},
|
|
40
42
|
},
|
|
41
43
|
defaultVariants: {
|
|
42
|
-
status: "
|
|
44
|
+
status: "neutral",
|
|
43
45
|
isExpandable: false,
|
|
44
46
|
},
|
|
45
47
|
}
|
|
@@ -48,9 +50,21 @@ const alertVariants = cva(
|
|
|
48
50
|
type AlertStatus = "danger" | "success" | "warning" | "info" | "neutral"
|
|
49
51
|
type AlertDirection = "ltr" | "rtl"
|
|
50
52
|
|
|
53
|
+
type AlertMessages = {
|
|
54
|
+
close: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const defaultAlertMessages: AlertMessages = {
|
|
58
|
+
close: "Close alert",
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const arabicAlertMessages: AlertMessages = {
|
|
62
|
+
close: "\u0625\u063a\u0644\u0627\u0642 \u0627\u0644\u062a\u0646\u0628\u064a\u0647",
|
|
63
|
+
}
|
|
64
|
+
|
|
51
65
|
type AlertAction = {
|
|
52
66
|
label: React.ReactNode
|
|
53
|
-
onClick
|
|
67
|
+
onClick: () => void
|
|
54
68
|
}
|
|
55
69
|
|
|
56
70
|
type AlertProps = Omit<
|
|
@@ -62,6 +76,7 @@ type AlertProps = Omit<
|
|
|
62
76
|
closeLabel?: string
|
|
63
77
|
description?: React.ReactNode
|
|
64
78
|
dir?: AlertDirection
|
|
79
|
+
messages?: Partial<AlertMessages>
|
|
65
80
|
onClose?: () => void
|
|
66
81
|
showActions?: boolean
|
|
67
82
|
showCloseButton?: boolean
|
|
@@ -69,28 +84,6 @@ type AlertProps = Omit<
|
|
|
69
84
|
title?: React.ReactNode
|
|
70
85
|
}
|
|
71
86
|
|
|
72
|
-
const defaultActions: Record<AlertDirection, AlertAction[]> = {
|
|
73
|
-
ltr: [{ label: "Action" }, { label: "Action" }],
|
|
74
|
-
rtl: [
|
|
75
|
-
{ label: "\u0632\u0631 \u0627\u0644\u0631\u0627\u0628\u0637" },
|
|
76
|
-
{ label: "\u0632\u0631 \u0627\u0644\u0631\u0627\u0628\u0637" },
|
|
77
|
-
],
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const defaultCopy = {
|
|
81
|
-
ltr: {
|
|
82
|
-
title: "Alert title",
|
|
83
|
-
description:
|
|
84
|
-
"Lorem ipsum dolor sit amet consectetur. Libero feugiat velit risus egestas blandit eget curabitur.",
|
|
85
|
-
},
|
|
86
|
-
rtl: {
|
|
87
|
-
title:
|
|
88
|
-
"\u0623\u062f\u062e\u0644 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u062a\u0646\u0628\u064a\u0647 \u0627\u0644\u062e\u0627\u0635 \u0628\u0643 \u0647\u0646\u0627!",
|
|
89
|
-
description:
|
|
90
|
-
"\u0623\u062f\u062e\u0644 \u0648\u0635\u0641 \u0627\u0644\u062a\u0646\u0628\u064a\u0647 \u0647\u0646\u0627\u060c \u0633\u064a\u0628\u062f\u0648 \u0623\u0641\u0636\u0644 \u0643\u0633\u0637\u0631\u064a\u0646 \u0645\u0646 \u0627\u0644\u0646\u0635.",
|
|
91
|
-
},
|
|
92
|
-
}
|
|
93
|
-
|
|
94
87
|
const Alert = React.forwardRef<HTMLElement, AlertProps>(function Alert(
|
|
95
88
|
{
|
|
96
89
|
actions,
|
|
@@ -98,37 +91,57 @@ const Alert = React.forwardRef<HTMLElement, AlertProps>(function Alert(
|
|
|
98
91
|
className,
|
|
99
92
|
closeLabel,
|
|
100
93
|
description,
|
|
101
|
-
dir
|
|
94
|
+
dir,
|
|
102
95
|
isExpandable = false,
|
|
96
|
+
messages: messageOverrides,
|
|
103
97
|
onClose,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
role,
|
|
99
|
+
showActions,
|
|
100
|
+
showCloseButton,
|
|
101
|
+
status = "neutral",
|
|
107
102
|
title,
|
|
108
103
|
...props
|
|
109
104
|
},
|
|
110
105
|
ref
|
|
111
106
|
) {
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
107
|
+
const rootRef = React.useRef<HTMLElement | null>(null)
|
|
108
|
+
const resolvedDirection = useResolvedDirection(dir, rootRef)
|
|
109
|
+
const setRootRef = React.useCallback(
|
|
110
|
+
(node: HTMLElement | null) => {
|
|
111
|
+
rootRef.current = node
|
|
112
|
+
if (typeof ref === "function") ref(node)
|
|
113
|
+
else if (ref) ref.current = node
|
|
114
|
+
},
|
|
115
|
+
[ref]
|
|
116
|
+
)
|
|
117
|
+
const resolvedStatus = status ?? "neutral"
|
|
118
|
+
const renderedTitle = title ?? children
|
|
119
|
+
const requestedActions = (showActions ?? Boolean(actions?.length))
|
|
120
|
+
? (actions ?? [])
|
|
121
|
+
: []
|
|
122
|
+
const expanded = Boolean(isExpandable && requestedActions.length > 0)
|
|
123
|
+
const visibleActions = requestedActions.slice(0, expanded ? 2 : 1)
|
|
124
|
+
const visibleCloseButton = showCloseButton ?? Boolean(onClose)
|
|
125
|
+
const resolvedCloseLabel =
|
|
126
|
+
closeLabel ?? messageOverrides?.close ?? defaultAlertMessages.close
|
|
127
|
+
const resolvedRole =
|
|
128
|
+
role ??
|
|
129
|
+
(resolvedStatus === "danger" || resolvedStatus === "warning"
|
|
130
|
+
? "alert"
|
|
131
|
+
: "status")
|
|
119
132
|
|
|
120
133
|
return (
|
|
121
134
|
<section
|
|
122
135
|
data-slot="alert"
|
|
123
136
|
data-status={resolvedStatus}
|
|
124
137
|
data-expandable={expanded ? "true" : "false"}
|
|
125
|
-
dir={
|
|
126
|
-
ref={
|
|
138
|
+
dir={resolvedDirection}
|
|
139
|
+
ref={setRootRef}
|
|
140
|
+
role={resolvedRole}
|
|
127
141
|
className={cn(
|
|
128
142
|
alertVariants({ status: resolvedStatus, isExpandable: expanded }),
|
|
129
|
-
expanded && dir === "rtl" && "h-[var(--bh-alert-expanded-rtl-height)]",
|
|
130
143
|
expanded &&
|
|
131
|
-
|
|
144
|
+
resolvedDirection === "ltr" &&
|
|
132
145
|
resolvedStatus === "neutral" &&
|
|
133
146
|
"[--alert-border:var(--bh-border-default)]",
|
|
134
147
|
className
|
|
@@ -154,36 +167,39 @@ const Alert = React.forwardRef<HTMLElement, AlertProps>(function Alert(
|
|
|
154
167
|
data-slot="alert-copy"
|
|
155
168
|
className={cn(
|
|
156
169
|
"flex flex-[1_0_0] min-w-0 text-start",
|
|
157
|
-
expanded && "flex-col
|
|
158
|
-
|
|
170
|
+
expanded && "flex-col gap-[var(--bh-space-xl-12)]",
|
|
171
|
+
resolvedDirection === "rtl" && "text-right"
|
|
159
172
|
)}
|
|
160
173
|
>
|
|
161
174
|
<div
|
|
162
175
|
data-slot="alert-info"
|
|
163
176
|
className={cn(
|
|
164
177
|
"flex w-full min-w-0 flex-[1_0_0] flex-col justify-center gap-[var(--bh-space-xs-4)]",
|
|
165
|
-
|
|
178
|
+
expanded && "flex-none",
|
|
179
|
+
resolvedDirection === "rtl" && "items-end text-right"
|
|
166
180
|
)}
|
|
167
181
|
>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
182
|
+
{renderedTitle !== undefined ? (
|
|
183
|
+
<p
|
|
184
|
+
data-slot="alert-title"
|
|
185
|
+
dir="auto"
|
|
186
|
+
className={cn(
|
|
187
|
+
"m-0 min-w-0 w-full break-words text-[length:var(--bh-text-body-md-medium-font-size)] font-[var(--bh-font-weight-medium)] leading-[var(--bh-text-body-md-medium-line-height)] tracking-[var(--bh-text-body-md-medium-letter-spacing)] text-[var(--alert-title)]",
|
|
188
|
+
resolvedDirection === "rtl" && "[direction:rtl] text-right leading-[var(--bh-text-body-sm-regular-line-height)]"
|
|
189
|
+
)}
|
|
190
|
+
>
|
|
191
|
+
{renderedTitle}
|
|
192
|
+
</p>
|
|
193
|
+
) : null}
|
|
194
|
+
{expanded && description !== undefined ? (
|
|
179
195
|
<p
|
|
180
196
|
data-slot="alert-description"
|
|
181
197
|
dir="auto"
|
|
182
|
-
className="m-0 w-full break-words text-[length:var(--bh-text-body-sm-regular-font-size)] font-[var(--bh-font-weight-regular)] leading-[var(--bh-text-body-sm-regular-line-height)] tracking-[var(--bh-text-body-sm-regular-letter-spacing)] text-[var(--alert-description)]
|
|
198
|
+
className="m-0 w-full break-words text-[length:var(--bh-text-body-sm-regular-font-size)] font-[var(--bh-font-weight-regular)] leading-[var(--bh-text-body-sm-regular-line-height)] tracking-[var(--bh-text-body-sm-regular-letter-spacing)] text-[var(--alert-description)]"
|
|
183
199
|
>
|
|
184
|
-
{
|
|
200
|
+
{description}
|
|
185
201
|
</p>
|
|
186
|
-
)}
|
|
202
|
+
) : null}
|
|
187
203
|
</div>
|
|
188
204
|
|
|
189
205
|
{expanded && visibleActions.length > 0 && (
|
|
@@ -196,37 +212,44 @@ const Alert = React.forwardRef<HTMLElement, AlertProps>(function Alert(
|
|
|
196
212
|
<AlertActions actions={visibleActions} />
|
|
197
213
|
)}
|
|
198
214
|
|
|
199
|
-
{
|
|
200
|
-
<
|
|
215
|
+
{visibleCloseButton && (
|
|
216
|
+
<Button
|
|
201
217
|
data-slot="alert-close"
|
|
202
|
-
aria-label={
|
|
203
|
-
className="
|
|
218
|
+
aria-label={resolvedCloseLabel}
|
|
219
|
+
className="size-[var(--bh-alert-icon-size)] shrink-0 rounded-[var(--bh-radius-full)] p-0 text-[var(--bh-content-subtle)]"
|
|
204
220
|
onClick={onClose}
|
|
221
|
+
size="icon-xs"
|
|
205
222
|
type="button"
|
|
223
|
+
variant="ghost"
|
|
206
224
|
>
|
|
207
225
|
<CloseIcon />
|
|
208
|
-
</
|
|
226
|
+
</Button>
|
|
209
227
|
)}
|
|
210
228
|
</section>
|
|
211
229
|
)
|
|
212
230
|
})
|
|
213
231
|
|
|
214
|
-
function AlertActions({
|
|
232
|
+
function AlertActions({
|
|
233
|
+
actions,
|
|
234
|
+
}: {
|
|
235
|
+
actions: AlertAction[]
|
|
236
|
+
}) {
|
|
215
237
|
return (
|
|
216
238
|
<div
|
|
217
239
|
data-slot="alert-actions"
|
|
218
240
|
className="flex shrink-0 items-center gap-[var(--bh-space-3xl-16)]"
|
|
219
241
|
>
|
|
220
242
|
{actions.map((action, index) => (
|
|
221
|
-
<
|
|
243
|
+
<Button
|
|
222
244
|
data-slot="alert-action"
|
|
223
|
-
className="
|
|
245
|
+
className="h-auto shrink-0 gap-[var(--bh-space-xxs-2)] p-0 text-start text-[length:var(--bh-text-body-md-underline-font-size)] font-[var(--bh-text-body-md-underline-font-weight)] leading-[var(--bh-text-body-md-underline-line-height)] tracking-[var(--bh-text-body-md-underline-letter-spacing)] text-[var(--bh-content-default)] underline [text-underline-position:from-font]"
|
|
224
246
|
key={index}
|
|
225
247
|
onClick={action.onClick}
|
|
226
248
|
type="button"
|
|
249
|
+
variant="ghost"
|
|
227
250
|
>
|
|
228
251
|
{action.label}
|
|
229
|
-
</
|
|
252
|
+
</Button>
|
|
230
253
|
))}
|
|
231
254
|
</div>
|
|
232
255
|
)
|
|
@@ -234,35 +257,37 @@ function AlertActions({ actions }: { actions: AlertAction[] }) {
|
|
|
234
257
|
|
|
235
258
|
function AlertStatusIcon({ status }: { status: AlertStatus }) {
|
|
236
259
|
if (status === "success") {
|
|
237
|
-
return <CircleCheckIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth=
|
|
260
|
+
return <CircleCheckIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth="var(--bh-icon-stroke-225)" />
|
|
238
261
|
}
|
|
239
262
|
|
|
240
263
|
if (status === "warning") {
|
|
241
|
-
return <TriangleAlertIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth=
|
|
264
|
+
return <TriangleAlertIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth="var(--bh-icon-stroke-225)" />
|
|
242
265
|
}
|
|
243
266
|
|
|
244
267
|
if (status === "info") {
|
|
245
|
-
return <InfoIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth=
|
|
268
|
+
return <InfoIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth="var(--bh-icon-stroke-225)" />
|
|
246
269
|
}
|
|
247
270
|
|
|
248
271
|
if (status === "neutral") {
|
|
249
|
-
return <StarIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth=
|
|
272
|
+
return <StarIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth="var(--bh-icon-stroke-225)" />
|
|
250
273
|
}
|
|
251
274
|
|
|
252
|
-
return <CircleAlertIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth=
|
|
275
|
+
return <CircleAlertIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth="var(--bh-icon-stroke-225)" />
|
|
253
276
|
}
|
|
254
277
|
|
|
255
278
|
function CloseIcon() {
|
|
256
279
|
return (
|
|
257
|
-
<XIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth=
|
|
280
|
+
<XIcon aria-hidden="true" className="size-[var(--bh-alert-icon-size)]" strokeWidth="var(--bh-icon-stroke-225)" />
|
|
258
281
|
)
|
|
259
282
|
}
|
|
260
283
|
|
|
261
284
|
export {
|
|
285
|
+
arabicAlertMessages,
|
|
262
286
|
Alert,
|
|
263
287
|
alertVariants,
|
|
264
288
|
type AlertAction,
|
|
265
289
|
type AlertDirection,
|
|
290
|
+
type AlertMessages,
|
|
266
291
|
type AlertProps,
|
|
267
292
|
type AlertStatus,
|
|
268
293
|
}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
type SelectItemType,
|
|
14
14
|
} from "./select"
|
|
15
15
|
import { Tag, type TagSize } from "./tag"
|
|
16
|
+
import { Popover, PopoverAnchor, PopoverContent } from "./popover"
|
|
16
17
|
|
|
17
18
|
import { cn } from "@/lib/utils"
|
|
18
19
|
|
|
@@ -404,8 +405,13 @@ const Autocomplete = React.forwardRef<HTMLDivElement, AutocompleteProps>(
|
|
|
404
405
|
</div>
|
|
405
406
|
) : null}
|
|
406
407
|
|
|
407
|
-
<
|
|
408
|
-
|
|
408
|
+
<Popover
|
|
409
|
+
className="w-full"
|
|
410
|
+
open={menuOpen}
|
|
411
|
+
onOpenChange={setMenuOpen}
|
|
412
|
+
>
|
|
413
|
+
<PopoverAnchor asChild>
|
|
414
|
+
<Input
|
|
409
415
|
aria-activedescendant={activeOptionId}
|
|
410
416
|
aria-autocomplete="list"
|
|
411
417
|
aria-controls={menuOpen ? listboxId : undefined}
|
|
@@ -424,7 +430,7 @@ const Autocomplete = React.forwardRef<HTMLDivElement, AutocompleteProps>(
|
|
|
424
430
|
aria-hidden="true"
|
|
425
431
|
className="size-[var(--bh-input-icon-size)]"
|
|
426
432
|
focusable="false"
|
|
427
|
-
strokeWidth=
|
|
433
|
+
strokeWidth="var(--bh-icon-stroke-225)"
|
|
428
434
|
/>
|
|
429
435
|
}
|
|
430
436
|
placeholder={placeholder}
|
|
@@ -439,14 +445,22 @@ const Autocomplete = React.forwardRef<HTMLDivElement, AutocompleteProps>(
|
|
|
439
445
|
onClick={handleInputClick}
|
|
440
446
|
onFocus={handleInputFocus}
|
|
441
447
|
onKeyDown={handleInputKeyDown}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
448
|
+
/>
|
|
449
|
+
</PopoverAnchor>
|
|
450
|
+
|
|
451
|
+
<PopoverContent
|
|
452
|
+
align="start"
|
|
453
|
+
role="presentation"
|
|
454
|
+
showArrow={false}
|
|
455
|
+
size="auto"
|
|
456
|
+
className="w-[var(--bh-select-menu-width)] bg-transparent p-0 shadow-none"
|
|
457
|
+
onOpenAutoFocus={(event) => event.preventDefault()}
|
|
458
|
+
>
|
|
445
459
|
<SelectMenu
|
|
446
460
|
aria-multiselectable={isMultiple || undefined}
|
|
447
461
|
id={listboxId}
|
|
448
462
|
className={cn(
|
|
449
|
-
"
|
|
463
|
+
"max-h-[var(--bh-autocomplete-menu-max-height,var(--bh-space-18xl-320))] overflow-y-auto",
|
|
450
464
|
menuClassName
|
|
451
465
|
)}
|
|
452
466
|
>
|
|
@@ -486,8 +500,8 @@ const Autocomplete = React.forwardRef<HTMLDivElement, AutocompleteProps>(
|
|
|
486
500
|
</div>
|
|
487
501
|
)}
|
|
488
502
|
</SelectMenu>
|
|
489
|
-
|
|
490
|
-
</
|
|
503
|
+
</PopoverContent>
|
|
504
|
+
</Popover>
|
|
491
505
|
|
|
492
506
|
{shouldRenderHelper ? (
|
|
493
507
|
<SelectHelperText
|
|
@@ -50,7 +50,7 @@ const avatarVariants = cva(
|
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
const avatarFallbackVariants = cva(
|
|
53
|
-
"flex size-full items-center justify-center rounded-[var(--bh-avatar-radius,var(--bh-radius-full))] bg-[var(--bh-bg-neutral-subtle)] text-[length:var(--bh-avatar-fallback-size,var(--bh-text-body-sm-medium-font-size))] font-[var(--bh-font-weight-semibold)] leading-none text-[var(--bh-content-
|
|
53
|
+
"flex size-full items-center justify-center rounded-[var(--bh-avatar-radius,var(--bh-radius-full))] bg-[var(--bh-bg-neutral-subtle)] text-[length:var(--bh-avatar-fallback-size,var(--bh-text-body-sm-medium-font-size))] font-[var(--bh-font-weight-semibold)] leading-none text-[var(--bh-content-default)] whitespace-nowrap",
|
|
54
54
|
{
|
|
55
55
|
variants: {
|
|
56
56
|
size: avatarSizeVariants,
|
|
@@ -62,7 +62,7 @@ const avatarFallbackVariants = cva(
|
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
const avatarIconVariants = cva(
|
|
65
|
-
"flex size-full items-center justify-center rounded-[var(--bh-avatar-radius,var(--bh-radius-full))] bg-[var(--bh-bg-neutral-subtle)] text-[var(--bh-content-
|
|
65
|
+
"flex size-full items-center justify-center rounded-[var(--bh-avatar-radius,var(--bh-radius-full))] bg-[var(--bh-bg-neutral-subtle)] text-[var(--bh-content-default)]",
|
|
66
66
|
{
|
|
67
67
|
variants: {
|
|
68
68
|
size: avatarSizeVariants,
|
|
@@ -147,7 +147,9 @@ const avatarActionVariants = cva(
|
|
|
147
147
|
)
|
|
148
148
|
|
|
149
149
|
function Avatar({
|
|
150
|
+
"aria-label": ariaLabel,
|
|
150
151
|
className,
|
|
152
|
+
role,
|
|
151
153
|
size,
|
|
152
154
|
shape,
|
|
153
155
|
...props
|
|
@@ -155,9 +157,11 @@ function Avatar({
|
|
|
155
157
|
VariantProps<typeof avatarVariants>) {
|
|
156
158
|
return (
|
|
157
159
|
<AvatarPrimitive.Root
|
|
160
|
+
aria-label={ariaLabel}
|
|
158
161
|
data-slot="avatar"
|
|
159
162
|
data-size={size ?? "default"}
|
|
160
163
|
data-shape={shape ?? "circular"}
|
|
164
|
+
role={role ?? (ariaLabel ? "img" : undefined)}
|
|
161
165
|
className={cn(avatarVariants({ size, shape, className }))}
|
|
162
166
|
{...props}
|
|
163
167
|
/>
|
|
@@ -212,7 +216,7 @@ function AvatarIcon({
|
|
|
212
216
|
<UserIcon
|
|
213
217
|
aria-hidden="true"
|
|
214
218
|
className="size-[var(--bh-avatar-icon-size)]"
|
|
215
|
-
strokeWidth=
|
|
219
|
+
strokeWidth="var(--bh-icon-stroke-210)"
|
|
216
220
|
/>
|
|
217
221
|
)}
|
|
218
222
|
</span>
|
|
@@ -253,7 +257,7 @@ function AvatarStatus({
|
|
|
253
257
|
<BanIcon
|
|
254
258
|
aria-hidden="true"
|
|
255
259
|
className="size-full"
|
|
256
|
-
strokeWidth=
|
|
260
|
+
strokeWidth="var(--bh-icon-stroke-240)"
|
|
257
261
|
/>
|
|
258
262
|
) : null}
|
|
259
263
|
</span>
|
|
@@ -298,7 +302,7 @@ function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
298
302
|
function AvatarGroupCount({
|
|
299
303
|
className,
|
|
300
304
|
children,
|
|
301
|
-
dir
|
|
305
|
+
dir,
|
|
302
306
|
size,
|
|
303
307
|
...props
|
|
304
308
|
}: React.ComponentProps<"span"> & VariantProps<typeof avatarVariants>) {
|
|
@@ -307,7 +311,7 @@ function AvatarGroupCount({
|
|
|
307
311
|
data-slot="avatar-group-count"
|
|
308
312
|
className={cn(
|
|
309
313
|
avatarVariants({ size }),
|
|
310
|
-
"-ms-[var(--bh-space-md-8)] bg-[var(--bh-bg-neutral-subtle)] text-[length:var(--bh-avatar-fallback-size,var(--bh-text-body-sm-medium-font-size))] font-[var(--bh-font-weight-semibold)] leading-none text-[var(--bh-content-
|
|
314
|
+
"-ms-[var(--bh-space-md-8)] bg-[var(--bh-bg-neutral-subtle)] text-[length:var(--bh-avatar-fallback-size,var(--bh-text-body-sm-medium-font-size))] font-[var(--bh-font-weight-semibold)] leading-none text-[var(--bh-content-default)] ring-[var(--bh-space-xxs-2)] ring-[var(--bh-bg-default)]",
|
|
311
315
|
className
|
|
312
316
|
)}
|
|
313
317
|
{...props}
|
|
@@ -327,7 +331,7 @@ function AvatarActionIcon({
|
|
|
327
331
|
<PencilIcon
|
|
328
332
|
aria-hidden="true"
|
|
329
333
|
className="size-[var(--bh-avatar-action-icon-size)]"
|
|
330
|
-
strokeWidth=
|
|
334
|
+
strokeWidth="var(--bh-icon-stroke-260)"
|
|
331
335
|
/>
|
|
332
336
|
)
|
|
333
337
|
}
|
|
@@ -337,7 +341,7 @@ function AvatarActionIcon({
|
|
|
337
341
|
<XIcon
|
|
338
342
|
aria-hidden="true"
|
|
339
343
|
className="size-[var(--bh-avatar-action-icon-size)]"
|
|
340
|
-
strokeWidth=
|
|
344
|
+
strokeWidth="var(--bh-icon-stroke-280)"
|
|
341
345
|
/>
|
|
342
346
|
)
|
|
343
347
|
}
|
|
@@ -347,7 +351,7 @@ function AvatarActionIcon({
|
|
|
347
351
|
<BadgeCheckIcon
|
|
348
352
|
aria-hidden="true"
|
|
349
353
|
className="size-[var(--bh-avatar-action-size)] fill-current text-[var(--bh-bg-accent-sky-base)] [stroke:var(--bh-content-on-brand)]"
|
|
350
|
-
strokeWidth=
|
|
354
|
+
strokeWidth="var(--bh-icon-stroke-240)"
|
|
351
355
|
/>
|
|
352
356
|
)
|
|
353
357
|
}
|
|
@@ -356,7 +360,7 @@ function AvatarActionIcon({
|
|
|
356
360
|
<PlusIcon
|
|
357
361
|
aria-hidden="true"
|
|
358
362
|
className="size-[var(--bh-avatar-action-icon-size)]"
|
|
359
|
-
strokeWidth=
|
|
363
|
+
strokeWidth="var(--bh-icon-stroke-260)"
|
|
360
364
|
/>
|
|
361
365
|
)
|
|
362
366
|
}
|
|
@@ -60,7 +60,7 @@ const legacyVariantMap: Record<
|
|
|
60
60
|
badgeStyle: "light",
|
|
61
61
|
color: "blue",
|
|
62
62
|
className:
|
|
63
|
-
"bg-[var(--bh-interactive-ghost-default)] px-[var(--bh-space-none)] text-[var(--bh-content-link)] underline-offset-4 [a&]:hover:underline",
|
|
63
|
+
"bg-[var(--bh-interactive-ghost-default)] px-[var(--bh-space-none)] text-[var(--bh-content-link)] underline-offset-[var(--bh-space-xs-4)] [a&]:hover:underline",
|
|
64
64
|
},
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -192,13 +192,13 @@ const badgeVariants = cva(
|
|
|
192
192
|
badgeStyle: "outline",
|
|
193
193
|
color: "neutral",
|
|
194
194
|
class:
|
|
195
|
-
"border-[var(--bh-border-strong)] text-[var(--bh-content-
|
|
195
|
+
"border-[var(--bh-border-strong)] text-[var(--bh-content-default)] [--badge-dot-color:var(--bh-content-default)] [--badge-split-border-color:var(--bh-border-default)]",
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
badgeStyle: "solid",
|
|
199
199
|
color: "neutral",
|
|
200
200
|
class:
|
|
201
|
-
"bg-[var(--bh-bg-neutral-
|
|
201
|
+
"bg-[var(--bh-bg-neutral-bold)] text-[var(--bh-content-on-neutral)] [--badge-dot-color:var(--bh-content-on-neutral)] [--badge-split-border-color:var(--bh-border-subtle)]",
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
badgeStyle: "light",
|
|
@@ -210,13 +210,13 @@ const badgeVariants = cva(
|
|
|
210
210
|
badgeStyle: "outline",
|
|
211
211
|
color: "blue",
|
|
212
212
|
class:
|
|
213
|
-
"border-[var(--bh-border-accent-blue-strong)] text-[var(--bh-content-accent-blue-
|
|
213
|
+
"border-[var(--bh-border-accent-blue-strong)] text-[var(--bh-content-accent-blue-strong)] [--badge-dot-color:var(--bh-content-accent-blue-strong)] [--badge-split-border-color:var(--bh-border-accent-blue-subtle)]",
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
badgeStyle: "solid",
|
|
217
217
|
color: "blue",
|
|
218
218
|
class:
|
|
219
|
-
"bg-[var(--bh-bg-accent-blue-
|
|
219
|
+
"bg-[var(--bh-bg-accent-blue-bold)] text-[var(--bh-content-on-color)] [--badge-dot-color:var(--bh-content-on-color)] [--badge-split-border-color:var(--bh-border-accent-blue-subtle)]",
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
222
|
badgeStyle: "light",
|
|
@@ -228,13 +228,13 @@ const badgeVariants = cva(
|
|
|
228
228
|
badgeStyle: "outline",
|
|
229
229
|
color: "green",
|
|
230
230
|
class:
|
|
231
|
-
"border-[var(--bh-border-accent-green-strong)] text-[var(--bh-content-accent-green-
|
|
231
|
+
"border-[var(--bh-border-accent-green-strong)] text-[var(--bh-content-accent-green-strong)] [--badge-dot-color:var(--bh-content-accent-green-strong)] [--badge-split-border-color:var(--bh-border-accent-green-subtle)]",
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
badgeStyle: "solid",
|
|
235
235
|
color: "green",
|
|
236
236
|
class:
|
|
237
|
-
"bg-[var(--bh-bg-accent-green-default)] text-[var(--bh-content-on-
|
|
237
|
+
"bg-[var(--bh-bg-accent-green-default)] text-[var(--bh-content-on-light)] [--badge-dot-color:var(--bh-content-on-light)] [--badge-split-border-color:var(--bh-border-accent-green-subtle)]",
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
badgeStyle: "light",
|
|
@@ -246,13 +246,13 @@ const badgeVariants = cva(
|
|
|
246
246
|
badgeStyle: "outline",
|
|
247
247
|
color: "amber",
|
|
248
248
|
class:
|
|
249
|
-
"border-[var(--bh-border-accent-amber-strong)] text-[var(--bh-content-accent-amber-
|
|
249
|
+
"border-[var(--bh-border-accent-amber-strong)] text-[var(--bh-content-accent-amber-strong)] [--badge-dot-color:var(--bh-content-accent-amber-strong)] [--badge-split-border-color:var(--bh-border-accent-amber-subtle)]",
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
badgeStyle: "solid",
|
|
253
253
|
color: "amber",
|
|
254
254
|
class:
|
|
255
|
-
"bg-[var(--bh-bg-accent-amber-default)] text-[var(--bh-content-on-
|
|
255
|
+
"bg-[var(--bh-bg-accent-amber-default)] text-[var(--bh-content-on-light)] [--badge-dot-color:var(--bh-content-on-light)] [--badge-split-border-color:var(--bh-border-accent-amber-subtle)]",
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
258
|
badgeStyle: "light",
|
|
@@ -264,7 +264,7 @@ const badgeVariants = cva(
|
|
|
264
264
|
badgeStyle: "outline",
|
|
265
265
|
color: "danger",
|
|
266
266
|
class:
|
|
267
|
-
"border-[var(--bh-border-accent-red-strong)] text-[var(--bh-content-accent-red-
|
|
267
|
+
"border-[var(--bh-border-accent-red-strong)] text-[var(--bh-content-accent-red-strong)] [--badge-dot-color:var(--bh-content-accent-red-strong)] [--badge-split-border-color:var(--bh-border-accent-red-subtle)]",
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
badgeStyle: "solid",
|
|
@@ -282,7 +282,7 @@ const badgeVariants = cva(
|
|
|
282
282
|
badgeStyle: "outline",
|
|
283
283
|
color: "purple",
|
|
284
284
|
class:
|
|
285
|
-
"border-[var(--bh-border-accent-purple-strong)] text-[var(--bh-content-accent-purple-
|
|
285
|
+
"border-[var(--bh-border-accent-purple-strong)] text-[var(--bh-content-accent-purple-strong)] [--badge-dot-color:var(--bh-content-accent-purple-strong)] [--badge-split-border-color:var(--bh-border-accent-purple-subtle)]",
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
badgeStyle: "solid",
|
|
@@ -300,13 +300,13 @@ const badgeVariants = cva(
|
|
|
300
300
|
badgeStyle: "outline",
|
|
301
301
|
color: "fuchsia",
|
|
302
302
|
class:
|
|
303
|
-
"border-[var(--bh-border-accent-fuchsia-strong)] text-[var(--bh-content-accent-fuchsia-
|
|
303
|
+
"border-[var(--bh-border-accent-fuchsia-strong)] text-[var(--bh-content-accent-fuchsia-strong)] [--badge-dot-color:var(--bh-content-accent-fuchsia-strong)] [--badge-split-border-color:var(--bh-border-accent-fuchsia-subtle)]",
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
badgeStyle: "solid",
|
|
307
307
|
color: "fuchsia",
|
|
308
308
|
class:
|
|
309
|
-
"bg-[var(--bh-bg-accent-fuchsia-default)] text-[var(--bh-content-on-
|
|
309
|
+
"bg-[var(--bh-bg-accent-fuchsia-default)] text-[var(--bh-content-on-light)] [--badge-dot-color:var(--bh-content-on-light)] [--badge-split-border-color:var(--bh-border-accent-fuchsia-subtle)]",
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
312
|
badgeStyle: "light",
|
|
@@ -318,13 +318,13 @@ const badgeVariants = cva(
|
|
|
318
318
|
badgeStyle: "outline",
|
|
319
319
|
color: "rose",
|
|
320
320
|
class:
|
|
321
|
-
"border-[var(--bh-border-accent-rose-strong)] text-[var(--bh-content-accent-rose-
|
|
321
|
+
"border-[var(--bh-border-accent-rose-strong)] text-[var(--bh-content-accent-rose-strong)] [--badge-dot-color:var(--bh-content-accent-rose-strong)] [--badge-split-border-color:var(--bh-border-accent-rose-subtle)]",
|
|
322
322
|
},
|
|
323
323
|
{
|
|
324
324
|
badgeStyle: "solid",
|
|
325
325
|
color: "rose",
|
|
326
326
|
class:
|
|
327
|
-
"bg-[var(--bh-bg-accent-rose-
|
|
327
|
+
"bg-[var(--bh-bg-accent-rose-bold)] text-[var(--bh-content-on-color)] [--badge-dot-color:var(--bh-content-on-color)] [--badge-split-border-color:var(--bh-border-accent-rose-subtle)]",
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
330
|
badgeStyle: "light",
|
|
@@ -336,13 +336,13 @@ const badgeVariants = cva(
|
|
|
336
336
|
badgeStyle: "outline",
|
|
337
337
|
color: "sky",
|
|
338
338
|
class:
|
|
339
|
-
"border-[var(--bh-border-accent-sky-strong)] text-[var(--bh-content-accent-sky-
|
|
339
|
+
"border-[var(--bh-border-accent-sky-strong)] text-[var(--bh-content-accent-sky-strong)] [--badge-dot-color:var(--bh-content-accent-sky-strong)] [--badge-split-border-color:var(--bh-border-accent-sky-subtle)]",
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
badgeStyle: "solid",
|
|
343
343
|
color: "sky",
|
|
344
344
|
class:
|
|
345
|
-
"bg-[var(--bh-bg-accent-sky-base)] text-[var(--bh-content-on-
|
|
345
|
+
"bg-[var(--bh-bg-accent-sky-base)] text-[var(--bh-content-on-light)] [--badge-dot-color:var(--bh-content-on-light)] [--badge-split-border-color:var(--bh-border-accent-sky-subtle)]",
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
badgeStyle: "light",
|
|
@@ -354,7 +354,7 @@ const badgeVariants = cva(
|
|
|
354
354
|
badgeStyle: "outline",
|
|
355
355
|
color: "golden",
|
|
356
356
|
class:
|
|
357
|
-
"border-[var(--bh-border-accent-golden-strong)] text-[var(--bh-content-accent-golden-
|
|
357
|
+
"border-[var(--bh-border-accent-golden-strong)] text-[var(--bh-content-accent-golden-strong)] [--badge-dot-color:var(--bh-content-accent-golden-strong)] [--badge-split-border-color:var(--bh-border-accent-golden-subtle)]",
|
|
358
358
|
},
|
|
359
359
|
{
|
|
360
360
|
badgeStyle: "solid",
|