banhaten 0.1.0 → 0.1.2
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/README.md +21 -9
- package/package.json +8 -2
- package/registry/components/accordion.tsx +37 -1
- package/registry/components/alert.tsx +14 -28
- package/registry/components/attribute.tsx +6 -10
- package/registry/components/autocomplete.tsx +637 -0
- package/registry/components/avatar.tsx +259 -24
- package/registry/components/badge.tsx +97 -35
- package/registry/components/button-group.tsx +1 -1
- package/registry/components/card.tsx +1 -1
- package/registry/components/checkbox.tsx +19 -16
- package/registry/components/date-picker-state.ts +253 -0
- package/registry/components/date-picker.tsx +115 -158
- package/registry/components/expanded/ActivityFeed.tsx +37 -23
- package/registry/components/expanded/Banner.tsx +54 -19
- package/registry/components/expanded/Breadcrumbs.tsx +10 -38
- package/registry/components/expanded/CatalogComponentsShowcase.tsx +11 -16
- package/registry/components/expanded/CatalogTag.tsx +4 -11
- package/registry/components/expanded/CommandBar.tsx +33 -53
- package/registry/components/expanded/EmptyState.tsx +155 -0
- package/registry/components/expanded/FileUpload.tsx +362 -59
- package/registry/components/expanded/OnboardingStepListItem.tsx +6 -10
- package/registry/components/expanded/PageHeader.tsx +2 -11
- package/registry/components/expanded/Slideout.tsx +12 -23
- package/registry/components/expanded/Steps.tsx +6 -8
- package/registry/components/expanded/Table.tsx +18 -40
- package/registry/components/expanded/Timeline.tsx +5 -24
- package/registry/components/expanded/activityFeed.css +10 -54
- package/registry/components/expanded/banner.css +8 -75
- package/registry/components/expanded/breadcrumbs.css +1 -1
- package/registry/components/expanded/commandBar.css +23 -26
- package/registry/components/expanded/divider.css +1 -1
- package/registry/components/expanded/emptyState.css +111 -0
- package/registry/components/expanded/fileUpload.css +304 -75
- package/registry/components/expanded/pageHeader.css +1 -1
- package/registry/components/expanded/slideout.css +1 -0
- package/registry/components/expanded/steps.css +15 -51
- package/registry/components/expanded/table.css +6 -1
- package/registry/components/expanded/timeline.css +18 -15
- package/registry/components/input-otp.tsx +574 -0
- package/registry/components/input.tsx +140 -59
- package/registry/components/menu.tsx +470 -80
- package/registry/components/pagination.tsx +6 -18
- package/registry/components/popover.tsx +840 -0
- package/registry/components/radio-card.tsx +25 -31
- package/registry/components/select-content.tsx +28 -123
- package/registry/components/select.tsx +13 -9
- package/registry/components/skeleton.css +57 -0
- package/registry/components/skeleton.tsx +482 -0
- package/registry/components/social-button.tsx +24 -90
- package/registry/components/spinner.tsx +91 -7
- package/registry/components/textarea.tsx +21 -36
- package/registry/components/toggle.tsx +7 -23
- package/registry/components/tooltip.tsx +8 -4
- package/registry/examples/attribute-demo.tsx +2 -2
- package/registry/examples/autocomplete-demo.tsx +109 -0
- package/registry/examples/avatar-demo.tsx +102 -47
- package/registry/examples/badge-demo.tsx +16 -0
- package/registry/examples/checkbox-demo.tsx +3 -8
- package/registry/examples/date-picker-demo.tsx +75 -22
- package/registry/examples/expanded/banner-demo.tsx +31 -6
- package/registry/examples/expanded/breadcrumbs-demo.tsx +59 -0
- package/registry/examples/expanded/command-bar-demo.tsx +236 -0
- package/registry/examples/expanded/empty-state-demo.tsx +39 -0
- package/registry/examples/expanded/file-upload-demo.tsx +60 -0
- package/registry/examples/expanded/steps-demo.tsx +11 -0
- package/registry/examples/expanded/table-demo.tsx +142 -0
- package/registry/examples/input-demo.tsx +1 -1
- package/registry/examples/input-otp-demo.tsx +72 -0
- package/registry/examples/menu-demo.tsx +101 -88
- package/registry/examples/popover-demo.tsx +546 -0
- package/registry/examples/progress-demo.tsx +2 -2
- package/registry/examples/select-demo.tsx +32 -18
- package/registry/examples/skeleton-demo.tsx +56 -0
- package/registry/examples/social-button-demo.tsx +33 -33
- package/registry/examples/spinner-demo.tsx +59 -0
- package/registry/examples/tag-demo.tsx +1 -1
- package/registry/examples/textarea-demo.tsx +1 -1
- package/registry/index.json +266 -20
- package/registry/styles/globals.css +93 -3
- package/src/cli/index.js +997 -62
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Skeleton,
|
|
3
|
+
SkeletonAvatar,
|
|
4
|
+
SkeletonButton,
|
|
5
|
+
SkeletonCard,
|
|
6
|
+
SkeletonForm,
|
|
7
|
+
SkeletonInput,
|
|
8
|
+
SkeletonList,
|
|
9
|
+
SkeletonTable,
|
|
10
|
+
SkeletonText,
|
|
11
|
+
} from "@/components/ui/skeleton"
|
|
12
|
+
|
|
13
|
+
export function SkeletonDemo() {
|
|
14
|
+
return (
|
|
15
|
+
<div className="grid w-full max-w-5xl gap-[var(--bh-space-5xl-24)]">
|
|
16
|
+
<div className="grid gap-[var(--bh-space-4xl-20)] lg:grid-cols-2">
|
|
17
|
+
<div className="grid gap-[var(--bh-space-4xl-20)] rounded-[var(--bh-radius-lg-8)] border border-[var(--bh-border-default)] bg-[var(--bh-bg-raised)] p-[var(--bh-space-5xl-24)]">
|
|
18
|
+
<div className="flex items-start gap-[var(--bh-space-xl-12)]">
|
|
19
|
+
<SkeletonAvatar />
|
|
20
|
+
<SkeletonText
|
|
21
|
+
className="flex-1"
|
|
22
|
+
lineCount={3}
|
|
23
|
+
widths={["76%", "92%", "52%"]}
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
<div className="flex flex-wrap gap-[var(--bh-space-md-8)]">
|
|
27
|
+
<SkeletonButton size="sm" />
|
|
28
|
+
<SkeletonButton size="icon" />
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<SkeletonForm fields={3} />
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div className="grid gap-[var(--bh-space-4xl-20)] xl:grid-cols-[minmax(0,0.95fr)_minmax(0,1.05fr)]">
|
|
36
|
+
<SkeletonCard />
|
|
37
|
+
<SkeletonTable columns={4} rows={4} />
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div className="grid gap-[var(--bh-space-4xl-20)] lg:grid-cols-2">
|
|
41
|
+
<SkeletonList rows={4} />
|
|
42
|
+
<div
|
|
43
|
+
dir="rtl"
|
|
44
|
+
className="grid gap-[var(--bh-space-4xl-20)] rounded-[var(--bh-radius-lg-8)] border border-[var(--bh-border-default)] bg-[var(--bh-bg-raised)] p-[var(--bh-space-5xl-24)]"
|
|
45
|
+
>
|
|
46
|
+
<SkeletonInput />
|
|
47
|
+
<div className="flex flex-wrap gap-[var(--bh-space-md-8)]">
|
|
48
|
+
<SkeletonButton />
|
|
49
|
+
<SkeletonButton size="sm" tone="brand" />
|
|
50
|
+
</div>
|
|
51
|
+
<Skeleton className="rounded-[var(--bh-radius-full)]" tone="brand" />
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { SocialButton } from "@/components/ui/social-button"
|
|
1
|
+
import { SocialButton, type SocialPlatform } from "@/components/ui/social-button"
|
|
2
|
+
|
|
3
|
+
const socialPlatforms: SocialPlatform[] = [
|
|
4
|
+
"apple",
|
|
5
|
+
"facebook",
|
|
6
|
+
"google",
|
|
7
|
+
"linkedin",
|
|
8
|
+
"twitter",
|
|
9
|
+
"whatsapp",
|
|
10
|
+
]
|
|
2
11
|
|
|
3
12
|
export function SocialButtonDemo() {
|
|
4
13
|
return (
|
|
5
14
|
<div className="flex flex-col gap-6">
|
|
6
15
|
<div className="flex flex-wrap items-center gap-3">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<SocialButton platform="linkedin" />
|
|
11
|
-
<SocialButton platform="twitter" />
|
|
12
|
-
<SocialButton platform="whatsapp" />
|
|
16
|
+
{socialPlatforms.map((platform) => (
|
|
17
|
+
<SocialButton key={platform} platform={platform} />
|
|
18
|
+
))}
|
|
13
19
|
</div>
|
|
14
20
|
|
|
15
21
|
<div className="flex flex-wrap items-center gap-3">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<SocialButton platform="linkedin" variant="outline" />
|
|
20
|
-
<SocialButton platform="twitter" variant="outline" />
|
|
21
|
-
<SocialButton platform="whatsapp" variant="outline" />
|
|
22
|
+
{socialPlatforms.map((platform) => (
|
|
23
|
+
<SocialButton key={platform} platform={platform} variant="outline" />
|
|
24
|
+
))}
|
|
22
25
|
</div>
|
|
23
26
|
|
|
24
27
|
<div className="flex flex-wrap items-center gap-3">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
{socialPlatforms.map((platform) => (
|
|
29
|
+
<SocialButton key={platform} platform={platform} size="icon" />
|
|
30
|
+
))}
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div dir="rtl" className="flex flex-wrap items-center gap-3">
|
|
34
|
+
{socialPlatforms.map((platform) => (
|
|
35
|
+
<SocialButton key={platform} dir="rtl" platform={platform} />
|
|
36
|
+
))}
|
|
31
37
|
</div>
|
|
32
38
|
|
|
33
39
|
<div dir="rtl" className="flex flex-wrap items-center gap-3">
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/>
|
|
43
|
-
<SocialButton
|
|
44
|
-
label="تسجيل الدخول باستخدام جوجل"
|
|
45
|
-
platform="google"
|
|
46
|
-
variant="outline"
|
|
47
|
-
/>
|
|
40
|
+
{socialPlatforms.map((platform) => (
|
|
41
|
+
<SocialButton
|
|
42
|
+
key={platform}
|
|
43
|
+
dir="rtl"
|
|
44
|
+
platform={platform}
|
|
45
|
+
variant="outline"
|
|
46
|
+
/>
|
|
47
|
+
))}
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
50
|
)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { DynamicSpinner, Spinner } from "@/components/ui/spinner"
|
|
4
|
+
|
|
5
|
+
export function SpinnerDemo() {
|
|
6
|
+
return (
|
|
7
|
+
<div className="grid gap-6">
|
|
8
|
+
<div className="flex flex-wrap items-center gap-6">
|
|
9
|
+
<Spinner
|
|
10
|
+
className="text-primary"
|
|
11
|
+
style={{ "--bh-spinner-size": "16px" } as React.CSSProperties}
|
|
12
|
+
/>
|
|
13
|
+
<Spinner
|
|
14
|
+
className="text-success"
|
|
15
|
+
style={{ "--bh-spinner-size": "20px" } as React.CSSProperties}
|
|
16
|
+
/>
|
|
17
|
+
<Spinner
|
|
18
|
+
className="text-danger"
|
|
19
|
+
style={{ "--bh-spinner-size": "24px" } as React.CSSProperties}
|
|
20
|
+
/>
|
|
21
|
+
<DynamicSpinner
|
|
22
|
+
className="text-primary"
|
|
23
|
+
style={{ "--bh-spinner-size": "16px" } as React.CSSProperties}
|
|
24
|
+
/>
|
|
25
|
+
<DynamicSpinner
|
|
26
|
+
className="text-success"
|
|
27
|
+
style={{ "--bh-spinner-size": "20px" } as React.CSSProperties}
|
|
28
|
+
/>
|
|
29
|
+
<DynamicSpinner
|
|
30
|
+
className="text-danger"
|
|
31
|
+
style={{ "--bh-spinner-size": "24px" } as React.CSSProperties}
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
36
|
+
<div
|
|
37
|
+
className="inline-flex items-center gap-2 text-sm text-muted-foreground"
|
|
38
|
+
role="status"
|
|
39
|
+
>
|
|
40
|
+
<Spinner
|
|
41
|
+
className="text-current"
|
|
42
|
+
style={{ "--bh-spinner-size": "18px" } as React.CSSProperties}
|
|
43
|
+
/>
|
|
44
|
+
Loading
|
|
45
|
+
</div>
|
|
46
|
+
<div
|
|
47
|
+
className="inline-flex items-center gap-2 text-sm text-muted-foreground"
|
|
48
|
+
role="status"
|
|
49
|
+
>
|
|
50
|
+
<DynamicSpinner
|
|
51
|
+
className="text-current"
|
|
52
|
+
style={{ "--bh-spinner-size": "18px" } as React.CSSProperties}
|
|
53
|
+
/>
|
|
54
|
+
Syncing
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -21,7 +21,7 @@ export function TagDemo() {
|
|
|
21
21
|
<Tag closeLabel="Remove tag" type="icon" icon={<PlusIcon aria-hidden="true" />} showCloseButton>
|
|
22
22
|
Add
|
|
23
23
|
</Tag>
|
|
24
|
-
<Tag closeLabel="\u0625\u0632\u0627\u0644\u0629 \u0648\u0633\u0645" dir="rtl" showCloseButton>
|
|
24
|
+
<Tag closeLabel={"\u0625\u0632\u0627\u0644\u0629 \u0648\u0633\u0645"} dir="rtl" showCloseButton>
|
|
25
25
|
ملصق
|
|
26
26
|
</Tag>
|
|
27
27
|
</div>
|
|
@@ -24,7 +24,7 @@ const demoRtlTextareaProps = {
|
|
|
24
24
|
"\u062a\u0648\u0641\u0631 \u0628\u0646\u064a\u062a\u0646\u0627 \u0627\u0644\u062a\u062d\u062a\u064a\u0629 \u0627\u0644\u0645\u062a\u0642\u062f\u0645\u0629 \u0644\u0644\u0625\u0633\u062a\u062f\u0644\u0627\u0644 \u0623\u0648\u0642\u0627\u062a \u0627\u0633\u062a\u062c\u0627\u0628\u0629 \u0642\u0635\u064a\u0631\u0629 \u0644\u0644\u063a\u0627\u064a\u0629.",
|
|
25
25
|
errorMessage: "\u0631\u0633\u0627\u0644\u0629 \u062e\u0637\u0623",
|
|
26
26
|
label: "\u0645\u0644\u0635\u0642",
|
|
27
|
-
message: "\
|
|
27
|
+
message: "\u0646\u0635 \u062a\u0648\u0636\u064a\u062d\u064a",
|
|
28
28
|
optionalText: "(\u062e\u064a\u0627\u0631\u064a)",
|
|
29
29
|
tagInputText: "\u0628\u0631\u0627\u0646\u062f\u0648...",
|
|
30
30
|
}
|