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,83 @@
|
|
|
1
|
+
import { ArrowRightIcon, PlusIcon, Trash2Icon } from "lucide-react"
|
|
2
|
+
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import { Spinner } from "@/components/ui/spinner"
|
|
5
|
+
|
|
6
|
+
export function ButtonDemo() {
|
|
7
|
+
return (
|
|
8
|
+
<div className="flex flex-col gap-6">
|
|
9
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
10
|
+
<Button>Primary</Button>
|
|
11
|
+
<Button variant="secondary">Secondary</Button>
|
|
12
|
+
<Button variant="soft">Soft</Button>
|
|
13
|
+
<Button variant="outline">Outline</Button>
|
|
14
|
+
<Button variant="ghost">Ghost</Button>
|
|
15
|
+
<Button variant="ghost-primary">Ghost Primary</Button>
|
|
16
|
+
<Button variant="danger">Danger</Button>
|
|
17
|
+
<Button variant="soft-danger">Soft Danger</Button>
|
|
18
|
+
<Button variant="white">White</Button>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
22
|
+
<Button size="xs">XS</Button>
|
|
23
|
+
<Button size="sm">Small</Button>
|
|
24
|
+
<Button>Medium</Button>
|
|
25
|
+
<Button size="lg">Large</Button>
|
|
26
|
+
<Button size="xl">XL</Button>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
30
|
+
<Button size="icon-xs" aria-label="Add item">
|
|
31
|
+
<PlusIcon />
|
|
32
|
+
</Button>
|
|
33
|
+
<Button size="icon-sm" aria-label="Add item">
|
|
34
|
+
<PlusIcon />
|
|
35
|
+
</Button>
|
|
36
|
+
<Button size="icon" aria-label="Add item">
|
|
37
|
+
<PlusIcon />
|
|
38
|
+
</Button>
|
|
39
|
+
<Button size="icon-lg" aria-label="Add item">
|
|
40
|
+
<PlusIcon />
|
|
41
|
+
</Button>
|
|
42
|
+
<Button size="icon-xl" aria-label="Add item">
|
|
43
|
+
<PlusIcon />
|
|
44
|
+
</Button>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
48
|
+
<Button>
|
|
49
|
+
<PlusIcon data-icon="inline-start" />
|
|
50
|
+
New item
|
|
51
|
+
</Button>
|
|
52
|
+
<Button variant="outline">
|
|
53
|
+
Continue
|
|
54
|
+
<ArrowRightIcon data-icon="inline-end" data-rtl-flip="true" />
|
|
55
|
+
</Button>
|
|
56
|
+
<Button variant="danger">
|
|
57
|
+
<Trash2Icon data-icon="inline-start" />
|
|
58
|
+
Delete
|
|
59
|
+
</Button>
|
|
60
|
+
<Button disabled aria-busy="true">
|
|
61
|
+
<Spinner data-icon="inline-start" />
|
|
62
|
+
Loading
|
|
63
|
+
</Button>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div dir="rtl" className="flex flex-wrap items-center gap-3">
|
|
67
|
+
<Button>إرسال</Button>
|
|
68
|
+
<Button variant="outline">
|
|
69
|
+
متابعة
|
|
70
|
+
<ArrowRightIcon data-icon="inline-end" data-rtl-flip="true" />
|
|
71
|
+
</Button>
|
|
72
|
+
<Button variant="danger">
|
|
73
|
+
<Trash2Icon data-icon="inline-start" />
|
|
74
|
+
حذف
|
|
75
|
+
</Button>
|
|
76
|
+
<Button disabled aria-busy="true">
|
|
77
|
+
<Spinner data-icon="inline-start" />
|
|
78
|
+
جاري التحميل
|
|
79
|
+
</Button>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PlusIcon } from "lucide-react"
|
|
2
|
+
|
|
3
|
+
import { ButtonGroup, ButtonGroupItem } from "@/components/ui/button-group"
|
|
4
|
+
|
|
5
|
+
export function ButtonGroupDemo() {
|
|
6
|
+
return (
|
|
7
|
+
<div className="grid gap-6">
|
|
8
|
+
<ButtonGroup aria-label="Button group">
|
|
9
|
+
{Array.from({ length: 7 }).map((_, index) => (
|
|
10
|
+
<ButtonGroupItem
|
|
11
|
+
key={index}
|
|
12
|
+
aria-pressed={index === 3 || undefined}
|
|
13
|
+
>
|
|
14
|
+
<PlusIcon data-icon="inline-start" />
|
|
15
|
+
Button
|
|
16
|
+
<PlusIcon data-icon="inline-end" />
|
|
17
|
+
</ButtonGroupItem>
|
|
18
|
+
))}
|
|
19
|
+
</ButtonGroup>
|
|
20
|
+
|
|
21
|
+
<ButtonGroup aria-label="Small icon button group" size="sm" mode="iconOnly">
|
|
22
|
+
{Array.from({ length: 7 }).map((_, index) => (
|
|
23
|
+
<ButtonGroupItem key={index} aria-label={`Action ${index + 1}`}>
|
|
24
|
+
<PlusIcon />
|
|
25
|
+
</ButtonGroupItem>
|
|
26
|
+
))}
|
|
27
|
+
</ButtonGroup>
|
|
28
|
+
|
|
29
|
+
<div dir="rtl">
|
|
30
|
+
<ButtonGroup aria-label="Arabic button group" size="xs">
|
|
31
|
+
{Array.from({ length: 7 }).map((_, index) => (
|
|
32
|
+
<ButtonGroupItem key={index} disabled={index === 4}>
|
|
33
|
+
<PlusIcon data-icon="inline-start" />
|
|
34
|
+
{"\u0627\u0646\u0642\u0631 \u0647\u0646\u0627"}
|
|
35
|
+
<PlusIcon data-icon="inline-end" />
|
|
36
|
+
</ButtonGroupItem>
|
|
37
|
+
))}
|
|
38
|
+
</ButtonGroup>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Card } from "@/components/ui/card"
|
|
2
|
+
|
|
3
|
+
const cardImage = new URL("../assets/images/art-01.jpg", import.meta.url).href
|
|
4
|
+
|
|
5
|
+
const rtlCardCopy = {
|
|
6
|
+
action: "\u0627\u0646\u0642\u0631 \u0647\u0646\u0627",
|
|
7
|
+
subtitle:
|
|
8
|
+
"\u0639\u0646\u0648\u0627\u0646 \u0641\u0631\u0639\u064a \u0644\u0644\u0628\u0637\u0627\u0642\u0629",
|
|
9
|
+
title:
|
|
10
|
+
"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0637\u0627\u0642\u0629",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function CardDemo() {
|
|
14
|
+
return (
|
|
15
|
+
<div className="grid gap-6">
|
|
16
|
+
<div className="flex flex-wrap items-start gap-4">
|
|
17
|
+
<Card imageSrc={cardImage} />
|
|
18
|
+
<Card imageSrc={cardImage} type="full-image" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div className="grid gap-4">
|
|
22
|
+
<Card imageSrc={cardImage} orientation="horizontal" />
|
|
23
|
+
<Card imageSrc={cardImage} orientation="horizontal" type="trailing-image" />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div dir="rtl" className="flex flex-wrap items-start gap-4">
|
|
27
|
+
<Card
|
|
28
|
+
dir="rtl"
|
|
29
|
+
primaryActionLabel={rtlCardCopy.action}
|
|
30
|
+
secondaryActionLabel={rtlCardCopy.action}
|
|
31
|
+
imageSrc={cardImage}
|
|
32
|
+
subtitle={rtlCardCopy.subtitle}
|
|
33
|
+
title={rtlCardCopy.title}
|
|
34
|
+
/>
|
|
35
|
+
<Card
|
|
36
|
+
breakpoint="mobile"
|
|
37
|
+
dir="rtl"
|
|
38
|
+
orientation="horizontal"
|
|
39
|
+
primaryActionLabel={rtlCardCopy.action}
|
|
40
|
+
secondaryActionLabel={rtlCardCopy.action}
|
|
41
|
+
imageSrc={cardImage}
|
|
42
|
+
subtitle={rtlCardCopy.subtitle}
|
|
43
|
+
title={rtlCardCopy.title}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { Checkbox, CheckboxCard } from "@/components/ui/checkbox"
|
|
4
|
+
|
|
5
|
+
export function CheckboxDemo() {
|
|
6
|
+
const [checked, setChecked] = React.useState(true)
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div className="grid gap-6">
|
|
10
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
11
|
+
<Checkbox
|
|
12
|
+
checked={checked}
|
|
13
|
+
onCheckedChange={(value) => setChecked(value === true)}
|
|
14
|
+
aria-label="Toggle option"
|
|
15
|
+
/>
|
|
16
|
+
<Checkbox checked aria-label="Selected option" />
|
|
17
|
+
<Checkbox aria-label="Unselected option" />
|
|
18
|
+
<Checkbox disabled aria-label="Disabled option" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div className="grid gap-3">
|
|
22
|
+
<CheckboxCard
|
|
23
|
+
checked
|
|
24
|
+
label="Label"
|
|
25
|
+
description="checkbox card description"
|
|
26
|
+
media={<UserLineIcon />}
|
|
27
|
+
/>
|
|
28
|
+
<CheckboxCard
|
|
29
|
+
controlPosition="start"
|
|
30
|
+
label="Label"
|
|
31
|
+
description="checkbox card description"
|
|
32
|
+
/>
|
|
33
|
+
<CheckboxCard
|
|
34
|
+
disabled
|
|
35
|
+
label="Label"
|
|
36
|
+
description="checkbox card description"
|
|
37
|
+
media={<UserLineIcon />}
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div dir="rtl" className="grid gap-3">
|
|
42
|
+
<CheckboxCard
|
|
43
|
+
checked
|
|
44
|
+
label={"\u0627\u0644\u062a\u0633\u0645\u064a\u0629"}
|
|
45
|
+
description={"\u0648\u0635\u0641 \u0628\u0637\u0627\u0642\u0629 \u0645\u0631\u0628\u0639 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631"}
|
|
46
|
+
media={<UserLineIcon />}
|
|
47
|
+
/>
|
|
48
|
+
<CheckboxCard
|
|
49
|
+
controlPosition="start"
|
|
50
|
+
label={"\u0627\u0644\u062a\u0633\u0645\u064a\u0629"}
|
|
51
|
+
description={"\u0648\u0635\u0641 \u0628\u0637\u0627\u0642\u0629 \u0645\u0631\u0628\u0639 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631"}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function UserLineIcon() {
|
|
59
|
+
return (
|
|
60
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24">
|
|
61
|
+
<path
|
|
62
|
+
fill="currentColor"
|
|
63
|
+
d="M4 22A8 8 0 0 1 20 22H18A6 6 0 0 0 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z"
|
|
64
|
+
/>
|
|
65
|
+
</svg>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Calendar,
|
|
3
|
+
DatePicker,
|
|
4
|
+
DateRangePicker,
|
|
5
|
+
RangeCalendar,
|
|
6
|
+
type CalendarRange,
|
|
7
|
+
} from "@/components/ui/date-picker"
|
|
8
|
+
|
|
9
|
+
const selectedDate = new Date(2050, 6, 18)
|
|
10
|
+
const selectedRange: CalendarRange = {
|
|
11
|
+
from: new Date(2050, 6, 15),
|
|
12
|
+
to: new Date(2050, 7, 23),
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function DatePickerDemo() {
|
|
16
|
+
return (
|
|
17
|
+
<div className="grid gap-8">
|
|
18
|
+
<div className="flex flex-wrap items-start gap-6">
|
|
19
|
+
<Calendar value={selectedDate} />
|
|
20
|
+
<Calendar view="month-year" value={selectedDate} />
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div className="grid gap-6 xl:grid-cols-2">
|
|
24
|
+
<DatePicker defaultValue={selectedDate} />
|
|
25
|
+
<DatePicker defaultOpen defaultValue={selectedDate} />
|
|
26
|
+
<div dir="rtl">
|
|
27
|
+
<DatePicker
|
|
28
|
+
dir="rtl"
|
|
29
|
+
placeholder="\u0627\u062e\u062a\u0631 \u062a\u0627\u0631\u064a\u062e"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
<div dir="rtl">
|
|
33
|
+
<DatePicker
|
|
34
|
+
defaultOpen
|
|
35
|
+
defaultValue={selectedDate}
|
|
36
|
+
dir="rtl"
|
|
37
|
+
placeholder="\u0627\u062e\u062a\u0631 \u062a\u0627\u0631\u064a\u062e"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div className="grid gap-6 overflow-x-auto">
|
|
43
|
+
<RangeCalendar value={selectedRange} />
|
|
44
|
+
<RangeCalendar type="double-with-presets" value={selectedRange} />
|
|
45
|
+
<RangeCalendar type="single" value={selectedRange} />
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div className="grid gap-6 xl:grid-cols-2">
|
|
49
|
+
<DateRangePicker value={selectedRange} />
|
|
50
|
+
<DateRangePicker
|
|
51
|
+
defaultOpen
|
|
52
|
+
type="double-with-presets"
|
|
53
|
+
value={selectedRange}
|
|
54
|
+
/>
|
|
55
|
+
<div dir="rtl">
|
|
56
|
+
<DateRangePicker
|
|
57
|
+
dir="rtl"
|
|
58
|
+
placeholder="\u0627\u062e\u062a\u0631 \u0646\u0637\u0627\u0642 \u0627\u0644\u062a\u0627\u0631\u064a\u062e"
|
|
59
|
+
value={selectedRange}
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
<div dir="rtl">
|
|
63
|
+
<DateRangePicker
|
|
64
|
+
defaultOpen
|
|
65
|
+
dir="rtl"
|
|
66
|
+
placeholder="\u064a\u0648\u0645 / \u0634\u0647\u0631 / \u0633\u0646\u0629"
|
|
67
|
+
type="double-with-presets"
|
|
68
|
+
value={selectedRange}
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Divider } from "@/components/ui/divider"
|
|
2
|
+
|
|
3
|
+
export function DividerDemo() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="grid gap-6">
|
|
6
|
+
<div className="grid gap-4">
|
|
7
|
+
<Divider />
|
|
8
|
+
<Divider type="dotted" />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div className="flex h-[var(--bh-space-15xl-224)] items-start gap-6">
|
|
12
|
+
<Divider direction="vertical" type="dotted" />
|
|
13
|
+
<Divider direction="vertical" />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ActivityFeed,
|
|
3
|
+
type ActivityFeedItemProps,
|
|
4
|
+
} from "@/components/ui/expanded/ActivityFeed"
|
|
5
|
+
|
|
6
|
+
const activityItems: ActivityFeedItemProps[] = Array.from({ length: 4 }, () => ({
|
|
7
|
+
actions: [
|
|
8
|
+
{ label: "Button", variant: "primary" },
|
|
9
|
+
{ label: "Button", variant: "secondary" },
|
|
10
|
+
],
|
|
11
|
+
caption: "Caption text",
|
|
12
|
+
label: "Label",
|
|
13
|
+
link: "#Link",
|
|
14
|
+
slotContent: "Slot content",
|
|
15
|
+
supportText: "Support Text",
|
|
16
|
+
timestamp: "Mar 15. 2050",
|
|
17
|
+
type: "caption",
|
|
18
|
+
}))
|
|
19
|
+
|
|
20
|
+
export function ActivityFeedDemo() {
|
|
21
|
+
return <ActivityFeed ariaLabel="Activity feed" items={activityItems} />
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Banner } from "@/components/ui/expanded/Banner"
|
|
2
|
+
import { BannerBoard as ExpandedBannerBoard } from "@/components/ui/expanded/BannerBoard"
|
|
3
|
+
|
|
4
|
+
const bannerDemoCopy = {
|
|
5
|
+
actionLabel: "Button",
|
|
6
|
+
ariaLabel: "Announcement banner",
|
|
7
|
+
closeLabel: "Dismiss banner",
|
|
8
|
+
description: "Discover the Latest Updates in Our New Release",
|
|
9
|
+
inputAriaLabel: "Banner input",
|
|
10
|
+
inputPlaceholder: "Placeholder",
|
|
11
|
+
linkLabel: "Link button",
|
|
12
|
+
title: "Big news!",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function BannerDemo() {
|
|
16
|
+
return (
|
|
17
|
+
<div className="grid gap-6">
|
|
18
|
+
<Banner {...bannerDemoCopy} />
|
|
19
|
+
<Banner {...bannerDemoCopy} type="input" />
|
|
20
|
+
<ExpandedBannerBoard />
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnboardingStepListItem } from "@/components/ui/expanded/OnboardingStepListItem"
|
|
2
|
+
|
|
3
|
+
export function OnboardingStepDemo() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="flex gap-2">
|
|
6
|
+
<OnboardingStepListItem label="Finished" state="finished" />
|
|
7
|
+
<OnboardingStepListItem label="Active" state="active" />
|
|
8
|
+
<OnboardingStepListItem label="Inactive" state="inactive" />
|
|
9
|
+
</div>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PageHeader } from "@/components/ui/expanded/PageHeader"
|
|
2
|
+
|
|
3
|
+
export function PageHeaderDemo() {
|
|
4
|
+
return (
|
|
5
|
+
<PageHeader
|
|
6
|
+
actions={[{ label: "Export" }, { label: "Share" }]}
|
|
7
|
+
breadcrumbLabel="Breadcrumb"
|
|
8
|
+
breadcrumbs={[
|
|
9
|
+
{ label: "Home" },
|
|
10
|
+
{ label: "Design system" },
|
|
11
|
+
{ label: "Components", current: true },
|
|
12
|
+
]}
|
|
13
|
+
description="Section description"
|
|
14
|
+
metaInfo="Meta info"
|
|
15
|
+
tabs={{ ariaLabel: "Page sections", items: ["Overview", "Details", "Settings"] }}
|
|
16
|
+
title="Section Title"
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Slideout, SlideoutFiltersExample } from "@/components/ui/expanded/Slideout"
|
|
2
|
+
|
|
3
|
+
export function SlideoutDemo() {
|
|
4
|
+
return (
|
|
5
|
+
<Slideout
|
|
6
|
+
actionLabel="Action"
|
|
7
|
+
closeLabel="Close"
|
|
8
|
+
primaryActionLabel="Apply"
|
|
9
|
+
secondaryActionLabel="Cancel"
|
|
10
|
+
title="Heading"
|
|
11
|
+
>
|
|
12
|
+
<SlideoutFiltersExample />
|
|
13
|
+
</Slideout>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Steps, type StepItem } from "@/components/ui/expanded/Steps"
|
|
2
|
+
|
|
3
|
+
const stepItems: StepItem[] = Array.from({ length: 6 }, (_, index) => ({
|
|
4
|
+
caption: "Caption",
|
|
5
|
+
label: "Label",
|
|
6
|
+
number: index + 1,
|
|
7
|
+
slotContent: <div className="ds-step-slot">Slot content</div>,
|
|
8
|
+
supportText: "Support",
|
|
9
|
+
}))
|
|
10
|
+
|
|
11
|
+
export function StepsDemo() {
|
|
12
|
+
return (
|
|
13
|
+
<div className="grid gap-8">
|
|
14
|
+
<Steps items={stepItems} />
|
|
15
|
+
<Steps direction="vertical" items={stepItems} />
|
|
16
|
+
</div>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Tabs } from "@/components/ui/expanded/Tabs"
|
|
2
|
+
|
|
3
|
+
const tabItems = ["Overview", "Details", "Settings", "Activity", "Files"]
|
|
4
|
+
|
|
5
|
+
export function TabsDemo() {
|
|
6
|
+
return (
|
|
7
|
+
<div className="grid gap-6">
|
|
8
|
+
<Tabs ariaLabel="Tabs" items={tabItems} />
|
|
9
|
+
<Tabs ariaLabel="Tabs" items={tabItems} variant="segment" />
|
|
10
|
+
<Tabs ariaLabel="Tabs" items={tabItems} variant="rounded" />
|
|
11
|
+
</div>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Timeline, type TimelineStep } from "@/components/ui/expanded/Timeline"
|
|
2
|
+
|
|
3
|
+
const timelineSteps: TimelineStep[] = Array.from({ length: 6 }, (_, index) => ({
|
|
4
|
+
caption: "Caption",
|
|
5
|
+
date: "Mar 15. 2050",
|
|
6
|
+
id: `timeline-demo-${index}`,
|
|
7
|
+
label: "Label",
|
|
8
|
+
state: "finished",
|
|
9
|
+
}))
|
|
10
|
+
|
|
11
|
+
export function TimelineDemo() {
|
|
12
|
+
return (
|
|
13
|
+
<div className="grid gap-8">
|
|
14
|
+
<Timeline ariaLabel="Timeline" steps={timelineSteps} />
|
|
15
|
+
<Timeline ariaLabel="Timeline" orientation="horizontal" steps={timelineSteps} />
|
|
16
|
+
</div>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Input } from "@/components/ui/input"
|
|
2
|
+
|
|
3
|
+
const demoTags = [{ label: "Label" }, { label: "Label" }, { label: "Label" }]
|
|
4
|
+
const demoRtlTags = [
|
|
5
|
+
{ label: "\u0645\u0644\u0635\u0642" },
|
|
6
|
+
{ label: "\u0645\u0644\u0635\u0642" },
|
|
7
|
+
{ label: "\u0645\u0644\u0635\u0642" },
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
const demoInputProps = {
|
|
11
|
+
buttonLabel: "Button",
|
|
12
|
+
errorMessage: "Error message",
|
|
13
|
+
inlineLeadingAddon: "https://",
|
|
14
|
+
inlineTrailingAddon: ".com",
|
|
15
|
+
label: "Label",
|
|
16
|
+
leadingAddon: "https://",
|
|
17
|
+
message: "This is a hint text",
|
|
18
|
+
optionalText: "(Optional)",
|
|
19
|
+
placeholder: "Placeholder",
|
|
20
|
+
quantityLabel: "Quantity",
|
|
21
|
+
trailingAddon: ".com",
|
|
22
|
+
valueText: "Text here",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const demoRtlInputProps = {
|
|
26
|
+
...demoInputProps,
|
|
27
|
+
errorMessage: "\u0631\u0633\u0627\u0644\u0629 \u062e\u0637\u0623",
|
|
28
|
+
label: "\u0645\u0644\u0635\u0642",
|
|
29
|
+
message: "\u0647\u0630\u0627 \u0646\u0635 \u062a\u0644\u0645\u064a\u062d.",
|
|
30
|
+
optionalText: "(\u062e\u064a\u0627\u0631\u064a)",
|
|
31
|
+
placeholder: "\u0627\u0644\u0646\u0635",
|
|
32
|
+
valueText: "\u0646\u0635 \u0647\u0646\u0627",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function InputDemo() {
|
|
36
|
+
return (
|
|
37
|
+
<div className="grid gap-6">
|
|
38
|
+
<div className="flex flex-wrap items-start gap-6">
|
|
39
|
+
<Input {...demoInputProps} />
|
|
40
|
+
<Input {...demoInputProps} state="filled" />
|
|
41
|
+
<Input {...demoInputProps} state="error" />
|
|
42
|
+
<Input {...demoInputProps} state="disabled" />
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div className="flex flex-wrap items-start gap-6">
|
|
46
|
+
<Input {...demoInputProps} kind="shortcut" />
|
|
47
|
+
<Input {...demoInputProps} kind="add-on" />
|
|
48
|
+
<Input {...demoInputProps} kind="inline-add-on" />
|
|
49
|
+
<Input {...demoInputProps} kind="tags" state="filled" tags={demoTags} />
|
|
50
|
+
<Input
|
|
51
|
+
{...demoInputProps}
|
|
52
|
+
kind="inline-tags"
|
|
53
|
+
state="filled"
|
|
54
|
+
tags={demoTags}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div className="flex flex-wrap items-start gap-6">
|
|
59
|
+
<Input {...demoInputProps} kind="leading-dropdown" />
|
|
60
|
+
<Input {...demoInputProps} kind="trailing-dropdown" />
|
|
61
|
+
<Input {...demoInputProps} kind="leading-button" />
|
|
62
|
+
<Input {...demoInputProps} kind="trailing-button" />
|
|
63
|
+
<Input {...demoInputProps} kind="quantity" state="filled" valueText="1" />
|
|
64
|
+
<Input {...demoInputProps} kind="quantity-2" state="filled" valueText="1" />
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div className="flex flex-wrap items-start gap-6">
|
|
68
|
+
<Input {...demoInputProps} size="md" />
|
|
69
|
+
<Input {...demoInputProps} size="md" variant="soft" />
|
|
70
|
+
<Input {...demoInputProps} size="md" variant="soft" state="error" />
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div dir="rtl" className="flex flex-wrap items-start gap-6">
|
|
74
|
+
<Input {...demoRtlInputProps} dir="rtl" />
|
|
75
|
+
<Input {...demoRtlInputProps} dir="rtl" state="filled" />
|
|
76
|
+
<Input {...demoRtlInputProps} dir="rtl" state="error" />
|
|
77
|
+
<Input
|
|
78
|
+
{...demoRtlInputProps}
|
|
79
|
+
dir="rtl"
|
|
80
|
+
kind="inline-tags"
|
|
81
|
+
state="filled"
|
|
82
|
+
tags={demoRtlTags}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
)
|
|
87
|
+
}
|