banhaten 0.1.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/LICENSE +21 -0
- package/README.md +361 -0
- package/banhaten.config.example.json +13 -0
- package/package.json +59 -0
- package/registry/assets/activity-feed-avatar.png +0 -0
- package/registry/assets/avatars/avatar-01.jpg +0 -0
- 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 +744 -0
- package/registry/assets/images/art-01.jpg +0 -0
- 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/accordion.tsx +119 -0
- package/registry/components/alert.tsx +282 -0
- package/registry/components/attribute.tsx +452 -0
- package/registry/components/avatar.tsx +142 -0
- package/registry/components/badge.tsx +567 -0
- package/registry/components/button-group.tsx +246 -0
- package/registry/components/button.tsx +102 -0
- package/registry/components/card.tsx +613 -0
- package/registry/components/checkbox.tsx +244 -0
- package/registry/components/date-picker.tsx +1143 -0
- package/registry/components/divider.tsx +82 -0
- package/registry/components/expanded/ActivityFeed.tsx +226 -0
- package/registry/components/expanded/Banner.tsx +145 -0
- package/registry/components/expanded/BannerBoard.tsx +225 -0
- package/registry/components/expanded/Breadcrumbs.tsx +156 -0
- package/registry/components/expanded/CatalogComponentsShowcase.tsx +211 -0
- package/registry/components/expanded/CatalogDivider.tsx +48 -0
- package/registry/components/expanded/CatalogTag.tsx +92 -0
- package/registry/components/expanded/CommandBar.tsx +406 -0
- package/registry/components/expanded/FileUpload.tsx +231 -0
- package/registry/components/expanded/IconExplorer.tsx +612 -0
- package/registry/components/expanded/OnboardingStepListItem.tsx +67 -0
- package/registry/components/expanded/PageHeader.tsx +184 -0
- package/registry/components/expanded/Slideout.tsx +514 -0
- package/registry/components/expanded/Steps.tsx +266 -0
- package/registry/components/expanded/Table.tsx +1014 -0
- package/registry/components/expanded/Tabs.tsx +86 -0
- package/registry/components/expanded/Timeline.tsx +235 -0
- package/registry/components/expanded/TimelineShowcase.tsx +158 -0
- package/registry/components/expanded/activityFeed.css +292 -0
- package/registry/components/expanded/banner.css +312 -0
- package/registry/components/expanded/breadcrumbs.css +140 -0
- package/registry/components/expanded/catalogComponentsShowcase.css +87 -0
- package/registry/components/expanded/commandBar.css +473 -0
- package/registry/components/expanded/divider.css +75 -0
- package/registry/components/expanded/fileUpload.css +228 -0
- package/registry/components/expanded/iconExplorer.css +764 -0
- package/registry/components/expanded/iconPacks.ts +866 -0
- package/registry/components/expanded/onboardingStepListItem.css +126 -0
- package/registry/components/expanded/pageHeader.css +287 -0
- package/registry/components/expanded/slideout.css +955 -0
- package/registry/components/expanded/steps.css +329 -0
- package/registry/components/expanded/table.css +607 -0
- package/registry/components/expanded/tabs.css +197 -0
- package/registry/components/expanded/tag.css +148 -0
- package/registry/components/expanded/timeline.css +282 -0
- package/registry/components/input-content.ts +106 -0
- package/registry/components/input.tsx +866 -0
- package/registry/components/menu.tsx +758 -0
- package/registry/components/modal.tsx +799 -0
- package/registry/components/pagination.tsx +543 -0
- package/registry/components/progress-slider.tsx +216 -0
- package/registry/components/progress.tsx +367 -0
- package/registry/components/radio-card.tsx +654 -0
- package/registry/components/radio-group.tsx +570 -0
- package/registry/components/select-content.tsx +313 -0
- package/registry/components/select.tsx +871 -0
- package/registry/components/slider.tsx +380 -0
- package/registry/components/social-button.tsx +360 -0
- package/registry/components/spinner.tsx +31 -0
- package/registry/components/tag.tsx +423 -0
- package/registry/components/textarea.tsx +625 -0
- package/registry/components/toggle.tsx +272 -0
- package/registry/components/toolbar.tsx +467 -0
- package/registry/components/tooltip.tsx +427 -0
- package/registry/examples/accordion-demo.tsx +34 -0
- package/registry/examples/alert-demo.tsx +14 -0
- package/registry/examples/attribute-demo.tsx +65 -0
- package/registry/examples/avatar-demo.tsx +74 -0
- package/registry/examples/badge-demo.tsx +53 -0
- package/registry/examples/button-demo.tsx +83 -0
- package/registry/examples/button-group-demo.tsx +42 -0
- package/registry/examples/card-demo.tsx +48 -0
- package/registry/examples/checkbox-demo.tsx +67 -0
- package/registry/examples/date-picker-demo.tsx +74 -0
- package/registry/examples/divider-demo.tsx +17 -0
- package/registry/examples/expanded/activity-feed-demo.tsx +22 -0
- package/registry/examples/expanded/banner-demo.tsx +23 -0
- package/registry/examples/expanded/catalog-components-demo.tsx +5 -0
- package/registry/examples/expanded/command-bar-demo.tsx +10 -0
- package/registry/examples/expanded/icons-demo.tsx +5 -0
- package/registry/examples/expanded/onboarding-step-demo.tsx +11 -0
- package/registry/examples/expanded/page-header-demo.tsx +19 -0
- package/registry/examples/expanded/slideout-demo.tsx +15 -0
- package/registry/examples/expanded/steps-demo.tsx +18 -0
- package/registry/examples/expanded/tabs-demo.tsx +13 -0
- package/registry/examples/expanded/timeline-demo.tsx +18 -0
- package/registry/examples/input-demo.tsx +87 -0
- package/registry/examples/menu-demo.tsx +109 -0
- package/registry/examples/modal-demo.tsx +16 -0
- package/registry/examples/pagination-demo.tsx +17 -0
- package/registry/examples/progress-demo.tsx +37 -0
- package/registry/examples/progress-slider-demo.tsx +29 -0
- package/registry/examples/radio-card-demo.tsx +51 -0
- package/registry/examples/radio-group-demo.tsx +62 -0
- package/registry/examples/select-demo.tsx +73 -0
- package/registry/examples/slider-demo.tsx +31 -0
- package/registry/examples/social-button-demo.tsx +51 -0
- package/registry/examples/tag-demo.tsx +29 -0
- package/registry/examples/textarea-demo.tsx +79 -0
- package/registry/examples/toggle-demo.tsx +59 -0
- package/registry/examples/toolbar-demo.tsx +80 -0
- package/registry/examples/tooltip-demo.tsx +115 -0
- package/registry/hooks/use-direction.ts +27 -0
- package/registry/index.json +1213 -0
- package/registry/styles/globals.css +4600 -0
- package/registry/utils/cn.ts +6 -0
- package/src/cli/index.js +826 -0
- 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
- package/tokens/banhaten.tokens.json +5525 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DownloadIcon, PlusIcon } from "lucide-react"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Toolbar,
|
|
5
|
+
ToolbarBadge,
|
|
6
|
+
ToolbarButton,
|
|
7
|
+
ToolbarFilterButton,
|
|
8
|
+
ToolbarMoreButton,
|
|
9
|
+
ToolbarSearch,
|
|
10
|
+
ToolbarSection,
|
|
11
|
+
ToolbarSelect,
|
|
12
|
+
ToolbarText,
|
|
13
|
+
} from "@/components/ui/toolbar"
|
|
14
|
+
|
|
15
|
+
export function ToolbarDemo() {
|
|
16
|
+
return (
|
|
17
|
+
<div className="grid w-full max-w-5xl gap-[var(--bh-space-3xl-16)]">
|
|
18
|
+
<Toolbar layout="split" wrap>
|
|
19
|
+
<ToolbarSection grow wrap>
|
|
20
|
+
<ToolbarSearch aria-label="Search objects" width="default" />
|
|
21
|
+
<ToolbarSelect value="Status" />
|
|
22
|
+
<ToolbarSelect value="Owner" />
|
|
23
|
+
<ToolbarFilterButton />
|
|
24
|
+
</ToolbarSection>
|
|
25
|
+
<ToolbarSection wrap align="end">
|
|
26
|
+
<ToolbarMoreButton />
|
|
27
|
+
<ToolbarButton variant="soft">
|
|
28
|
+
<DownloadIcon data-icon="inline-start" />
|
|
29
|
+
Export
|
|
30
|
+
</ToolbarButton>
|
|
31
|
+
<ToolbarButton>
|
|
32
|
+
<PlusIcon data-icon="inline-start" />
|
|
33
|
+
Create Object
|
|
34
|
+
</ToolbarButton>
|
|
35
|
+
</ToolbarSection>
|
|
36
|
+
</Toolbar>
|
|
37
|
+
|
|
38
|
+
<Toolbar layout="split" wrap>
|
|
39
|
+
<ToolbarSection grow wrap>
|
|
40
|
+
<ToolbarSearch aria-label="Search selected rows" width="default" />
|
|
41
|
+
<ToolbarBadge>24 selected</ToolbarBadge>
|
|
42
|
+
<ToolbarButton variant="link">Clear filters</ToolbarButton>
|
|
43
|
+
</ToolbarSection>
|
|
44
|
+
<ToolbarSection wrap align="end">
|
|
45
|
+
<ToolbarMoreButton />
|
|
46
|
+
<ToolbarButton variant="soft">Export selected</ToolbarButton>
|
|
47
|
+
<ToolbarButton>Bulk Edit</ToolbarButton>
|
|
48
|
+
</ToolbarSection>
|
|
49
|
+
</Toolbar>
|
|
50
|
+
|
|
51
|
+
<Toolbar wrap>
|
|
52
|
+
<ToolbarSection wrap>
|
|
53
|
+
<ToolbarButton>Filter 1</ToolbarButton>
|
|
54
|
+
<ToolbarButton variant="soft">Filter</ToolbarButton>
|
|
55
|
+
<ToolbarButton variant="soft">Filter</ToolbarButton>
|
|
56
|
+
<ToolbarButton variant="soft">Filter</ToolbarButton>
|
|
57
|
+
<ToolbarButton variant="soft">
|
|
58
|
+
<span aria-hidden="true" data-icon="inline-start">
|
|
59
|
+
1
|
|
60
|
+
</span>
|
|
61
|
+
Filters - 1
|
|
62
|
+
</ToolbarButton>
|
|
63
|
+
<ToolbarButton variant="link">Clear</ToolbarButton>
|
|
64
|
+
</ToolbarSection>
|
|
65
|
+
</Toolbar>
|
|
66
|
+
|
|
67
|
+
<Toolbar layout="split" wrap>
|
|
68
|
+
<ToolbarSection wrap>
|
|
69
|
+
<ToolbarText>Filter by</ToolbarText>
|
|
70
|
+
<ToolbarSelect value="Label" />
|
|
71
|
+
<ToolbarButton variant="soft">More filters</ToolbarButton>
|
|
72
|
+
<ToolbarButton variant="ghost">Save segment</ToolbarButton>
|
|
73
|
+
</ToolbarSection>
|
|
74
|
+
<ToolbarSection align="end" grow>
|
|
75
|
+
<ToolbarSearch aria-label="Search segment" width="default" />
|
|
76
|
+
</ToolbarSection>
|
|
77
|
+
</Toolbar>
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { InfoIcon, SettingsIcon } from "lucide-react"
|
|
2
|
+
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import {
|
|
5
|
+
Tooltip,
|
|
6
|
+
TooltipContent,
|
|
7
|
+
TooltipProvider,
|
|
8
|
+
TooltipTrigger,
|
|
9
|
+
} from "@/components/ui/tooltip"
|
|
10
|
+
|
|
11
|
+
const supportText =
|
|
12
|
+
"You may notice that we've made some updates to our look and feel."
|
|
13
|
+
const rtlLabel = "\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0643\u062b\u0631"
|
|
14
|
+
const rtlSupportText =
|
|
15
|
+
"\u0642\u062f \u062a\u0644\u0627\u062d\u0638 \u0623\u0646\u0646\u0627 \u0623\u062c\u0631\u064a\u0646\u0627 \u0628\u0639\u0636 \u0627\u0644\u062a\u062d\u062f\u064a\u062b\u0627\u062a \u0639\u0644\u0649 \u0634\u0643\u0644\u0646\u0627 \u0648\u0645\u0638\u0647\u0631\u0646\u0627."
|
|
16
|
+
|
|
17
|
+
export function TooltipDemo() {
|
|
18
|
+
return (
|
|
19
|
+
<TooltipProvider delayDuration={0}>
|
|
20
|
+
<div className="grid gap-8">
|
|
21
|
+
<div className="flex flex-wrap items-center gap-8">
|
|
22
|
+
<Tooltip defaultOpen>
|
|
23
|
+
<TooltipTrigger asChild>
|
|
24
|
+
<Button size="icon" variant="secondary" aria-label="More information">
|
|
25
|
+
<InfoIcon />
|
|
26
|
+
</Button>
|
|
27
|
+
</TooltipTrigger>
|
|
28
|
+
<TooltipContent pointerPosition="top-left">
|
|
29
|
+
More information
|
|
30
|
+
</TooltipContent>
|
|
31
|
+
</Tooltip>
|
|
32
|
+
|
|
33
|
+
<Tooltip defaultOpen>
|
|
34
|
+
<TooltipTrigger asChild>
|
|
35
|
+
<Button size="icon" variant="outline" aria-label="Settings help">
|
|
36
|
+
<SettingsIcon />
|
|
37
|
+
</Button>
|
|
38
|
+
</TooltipTrigger>
|
|
39
|
+
<TooltipContent pointerPosition="bottom-center" variant="default">
|
|
40
|
+
More information
|
|
41
|
+
</TooltipContent>
|
|
42
|
+
</Tooltip>
|
|
43
|
+
|
|
44
|
+
<Tooltip defaultOpen>
|
|
45
|
+
<TooltipTrigger asChild>
|
|
46
|
+
<Button size="icon" variant="ghost-primary" aria-label="No pointer help">
|
|
47
|
+
<InfoIcon />
|
|
48
|
+
</Button>
|
|
49
|
+
</TooltipTrigger>
|
|
50
|
+
<TooltipContent pointerPosition="none" showPointer={false}>
|
|
51
|
+
More information
|
|
52
|
+
</TooltipContent>
|
|
53
|
+
</Tooltip>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div className="flex flex-wrap items-center gap-8">
|
|
57
|
+
<Tooltip defaultOpen>
|
|
58
|
+
<TooltipTrigger asChild>
|
|
59
|
+
<Button variant="secondary">Dark large</Button>
|
|
60
|
+
</TooltipTrigger>
|
|
61
|
+
<TooltipContent
|
|
62
|
+
pointerPosition="center-right"
|
|
63
|
+
size="lg"
|
|
64
|
+
supportText={supportText}
|
|
65
|
+
>
|
|
66
|
+
More information
|
|
67
|
+
</TooltipContent>
|
|
68
|
+
</Tooltip>
|
|
69
|
+
|
|
70
|
+
<Tooltip defaultOpen>
|
|
71
|
+
<TooltipTrigger asChild>
|
|
72
|
+
<Button variant="outline">Default large</Button>
|
|
73
|
+
</TooltipTrigger>
|
|
74
|
+
<TooltipContent
|
|
75
|
+
pointerPosition="top-center"
|
|
76
|
+
size="lg"
|
|
77
|
+
supportText={supportText}
|
|
78
|
+
variant="default"
|
|
79
|
+
>
|
|
80
|
+
More information
|
|
81
|
+
</TooltipContent>
|
|
82
|
+
</Tooltip>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div dir="rtl" className="flex flex-wrap items-center gap-8">
|
|
86
|
+
<Tooltip defaultOpen>
|
|
87
|
+
<TooltipTrigger asChild>
|
|
88
|
+
<Button size="icon" variant="secondary" aria-label={rtlLabel}>
|
|
89
|
+
<InfoIcon />
|
|
90
|
+
</Button>
|
|
91
|
+
</TooltipTrigger>
|
|
92
|
+
<TooltipContent dir="rtl" pointerPosition="top-left">
|
|
93
|
+
{rtlLabel}
|
|
94
|
+
</TooltipContent>
|
|
95
|
+
</Tooltip>
|
|
96
|
+
|
|
97
|
+
<Tooltip defaultOpen>
|
|
98
|
+
<TooltipTrigger asChild>
|
|
99
|
+
<Button variant="outline">{rtlLabel}</Button>
|
|
100
|
+
</TooltipTrigger>
|
|
101
|
+
<TooltipContent
|
|
102
|
+
dir="rtl"
|
|
103
|
+
pointerPosition="top-left"
|
|
104
|
+
size="lg"
|
|
105
|
+
supportText={rtlSupportText}
|
|
106
|
+
variant="default"
|
|
107
|
+
>
|
|
108
|
+
{rtlLabel}
|
|
109
|
+
</TooltipContent>
|
|
110
|
+
</Tooltip>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</TooltipProvider>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
|
|
5
|
+
export type Direction = "ltr" | "rtl"
|
|
6
|
+
|
|
7
|
+
export function useDirection(defaultDirection: Direction = "ltr") {
|
|
8
|
+
const [direction, setDirection] = React.useState<Direction>(defaultDirection)
|
|
9
|
+
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
const htmlDirection = document.documentElement.getAttribute("dir")
|
|
12
|
+
|
|
13
|
+
if (htmlDirection === "ltr" || htmlDirection === "rtl") {
|
|
14
|
+
setDirection(htmlDirection)
|
|
15
|
+
return
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
document.documentElement.setAttribute("dir", defaultDirection)
|
|
19
|
+
}, [defaultDirection])
|
|
20
|
+
|
|
21
|
+
const updateDirection = React.useCallback((nextDirection: Direction) => {
|
|
22
|
+
document.documentElement.setAttribute("dir", nextDirection)
|
|
23
|
+
setDirection(nextDirection)
|
|
24
|
+
}, [])
|
|
25
|
+
|
|
26
|
+
return [direction, updateDirection] as const
|
|
27
|
+
}
|