velloo 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUN-LICENSE.md +91 -0
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +288 -2
- package/THIRD-PARTY-NOTICES.md +467 -0
- package/assets/elsewhere-alps-9fqhv029.jpg +0 -0
- package/assets/elsewhere-bali-vp60g115.jpg +0 -0
- package/assets/elsewhere-forest-xgn23zrj.jpg +0 -0
- package/assets/elsewhere-japan-qs7qkbr2.jpg +0 -0
- package/assets/elsewhere-kyoto-map-n2bvkrya.svg +1 -0
- package/assets/elsewhere-kyoto-qemtn6nk.jpg +0 -0
- package/assets/elsewhere-room-g1gaw7cs.jpg +0 -0
- package/canvas/apple-touch-icon.png +0 -0
- package/canvas/assets/index-BCvDZiBo.css +2 -0
- package/canvas/assets/index-ClaBqcaS.js +28 -0
- package/canvas/assets/lucide-all-iIF-pmzN.js +1 -0
- package/canvas/assets/radix-C3HaOB-d.js +41 -0
- package/canvas/assets/react-D0Ec-185.js +9 -0
- package/canvas/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/canvas/assets/vendor-CKmQ-Zst.js +53 -0
- package/canvas/favicon.ico +0 -0
- package/canvas/favicon.svg +12 -0
- package/canvas/fonts/OFL-1.1.txt +93 -0
- package/canvas/fonts/poppins-700.woff2 +0 -0
- package/canvas/icon-192.png +0 -0
- package/canvas/icon-512.png +0 -0
- package/canvas/index.html +22 -0
- package/canvas/site.webmanifest +11 -0
- package/chunk-08sv3k41.js +4 -0
- package/chunk-0fe83yzt.js +2 -0
- package/chunk-0t68szgr.js +3 -0
- package/chunk-1h55s5he.js +2 -0
- package/chunk-2c7jbx46.js +2 -0
- package/chunk-2smsg2ct.js +7 -0
- package/chunk-308ynsxd.js +2 -0
- package/chunk-3e8vez4d.js +1229 -0
- package/chunk-40xgcth8.js +63 -0
- package/chunk-4dn75m6t.js +3 -0
- package/chunk-4fj5tahv.js +3 -0
- package/chunk-6nqghjda.js +3 -0
- package/chunk-6tx68d90.js +3 -0
- package/chunk-6w6ch4ce.js +2 -0
- package/chunk-735ezz23.js +86 -0
- package/chunk-7eq7nx37.js +7 -0
- package/chunk-7eyb8yrf.js +6 -0
- package/chunk-80fjfyha.js +86 -0
- package/chunk-80r93t2e.js +4 -0
- package/chunk-94vx1yb0.js +3 -0
- package/chunk-9vg3yafz.js +3 -0
- package/chunk-a84n72m2.js +4 -0
- package/chunk-ampmdzz4.js +10 -0
- package/chunk-avns4dbf.js +2 -0
- package/chunk-ayrb3qnm.js +3 -0
- package/chunk-bwnvcncx.js +3 -0
- package/chunk-ccszg02q.js +5 -0
- package/chunk-cvn689d5.js +3 -0
- package/chunk-cxe6jjwj.js +3 -0
- package/chunk-dg6z4vdd.js +3 -0
- package/chunk-dgwjpbp9.js +3 -0
- package/chunk-dy41n60j.js +52 -0
- package/chunk-ek71z2fv.js +226 -0
- package/chunk-er1fxb7d.js +2 -0
- package/chunk-eyr8hrzf.js +2 -0
- package/chunk-fjbzk4sw.js +3 -0
- package/chunk-fsbsksga.js +3 -0
- package/chunk-h6gchare.js +3 -0
- package/chunk-hcb68zt7.js +85 -0
- package/chunk-hggap8fq.js +3 -0
- package/chunk-j11fyeqh.js +2 -0
- package/chunk-jb21jkp1.js +8 -0
- package/chunk-jfx9xjmr.js +18 -0
- package/chunk-jr0ss0mm.js +303 -0
- package/chunk-jrsknzjt.js +3 -0
- package/chunk-jv0xggh0.js +2 -0
- package/chunk-k17gfwq3.js +2 -0
- package/chunk-mh2pr7cq.js +5 -0
- package/chunk-mnapdp1y.js +2 -0
- package/chunk-mzhdrawd.js +3 -0
- package/chunk-n9gs6yx9.js +2 -0
- package/chunk-ngnymg2q.js +3 -0
- package/chunk-nwx5700b.js +3 -0
- package/chunk-pjtg3wnm.js +4 -0
- package/chunk-pp86v6m6.js +3 -0
- package/chunk-r22epxz2.js +3 -0
- package/chunk-rgasy862.js +5 -0
- package/chunk-rpwpeph5.js +3 -0
- package/chunk-s23gtejf.js +3 -0
- package/chunk-sjgqnykd.js +6 -0
- package/chunk-sn3x2m0m.js +6 -0
- package/chunk-t448rrfr.js +2 -0
- package/chunk-tdsk5wxa.js +451 -0
- package/chunk-v40fn08f.js +442 -0
- package/chunk-vbk1qhdz.js +3 -0
- package/chunk-vdkrbzh1.js +2 -0
- package/chunk-vgmr98cv.js +40 -0
- package/chunk-vsv8z729.js +6 -0
- package/chunk-x4f4k9pp.js +26 -0
- package/chunk-xt5ayg7g.js +4 -0
- package/chunk-ydhwv29b.js +244 -0
- package/chunk-zb6hc1y0.js +2 -0
- package/cli.js +3 -0
- package/launcher.cjs +97 -0
- package/package.json +58 -5
- package/pkgs/helpers/src/box.tsx +21 -0
- package/pkgs/helpers/src/cn.ts +32 -0
- package/pkgs/helpers/src/descriptors.ts +270 -0
- package/pkgs/helpers/src/divider.tsx +123 -0
- package/pkgs/helpers/src/gradient.tsx +90 -0
- package/pkgs/helpers/src/heading.tsx +20 -0
- package/pkgs/helpers/src/icon-data.ts +8009 -0
- package/pkgs/helpers/src/icon.tsx +53 -0
- package/pkgs/helpers/src/image.tsx +111 -0
- package/pkgs/helpers/src/index.ts +29 -0
- package/pkgs/helpers/src/layer.tsx +61 -0
- package/pkgs/helpers/src/lowering.ts +53 -0
- package/pkgs/helpers/src/paths.ts +47 -0
- package/pkgs/helpers/src/placeholder.tsx +88 -0
- package/pkgs/helpers/src/prose.tsx +42 -0
- package/pkgs/helpers/src/registry.ts +41 -0
- package/pkgs/helpers/src/svg.tsx +62 -0
- package/pkgs/helpers/src/text.tsx +16 -0
- package/pkgs/provider-antd/src/index.ts +78 -0
- package/pkgs/provider-antd/src/intro.ts +14 -0
- package/pkgs/provider-antd/src/manifest.ts +439 -0
- package/pkgs/provider-antd/src/overlays.ts +176 -0
- package/pkgs/provider-antd/src/registry.ts +104 -0
- package/pkgs/provider-antd/src/render-pass.ts +43 -0
- package/pkgs/provider-antd/src/tailwind-entry.css +21 -0
- package/pkgs/provider-antd/src/theme.ts +132 -0
- package/pkgs/provider-antd/src/version.ts +8 -0
- package/pkgs/provider-chakra/src/index.ts +80 -0
- package/pkgs/provider-chakra/src/intro.ts +14 -0
- package/pkgs/provider-chakra/src/manifest.ts +421 -0
- package/pkgs/provider-chakra/src/overlays.ts +246 -0
- package/pkgs/provider-chakra/src/registry.ts +227 -0
- package/pkgs/provider-chakra/src/render-pass.ts +55 -0
- package/pkgs/provider-chakra/src/tailwind-entry.css +21 -0
- package/pkgs/provider-chakra/src/theme.ts +180 -0
- package/pkgs/provider-chakra/src/version.ts +8 -0
- package/pkgs/provider-mui/src/index.ts +117 -0
- package/pkgs/provider-mui/src/intro.ts +12 -0
- package/pkgs/provider-mui/src/manifest.ts +263 -0
- package/pkgs/provider-mui/src/overlays.ts +124 -0
- package/pkgs/provider-mui/src/registry.ts +120 -0
- package/pkgs/provider-mui/src/render-pass.ts +36 -0
- package/pkgs/provider-mui/src/tailwind-entry.css +21 -0
- package/pkgs/provider-mui/src/theme.ts +129 -0
- package/pkgs/provider-mui/src/version.ts +8 -0
- package/pkgs/provider-none/src/components-inline.tsx +204 -0
- package/pkgs/provider-none/src/components.tsx +155 -0
- package/pkgs/provider-none/src/index.ts +57 -0
- package/pkgs/provider-none/src/intro.ts +18 -0
- package/pkgs/provider-none/src/manifest.ts +163 -0
- package/pkgs/provider-none/src/registry-inline.ts +36 -0
- package/pkgs/provider-none/src/registry.ts +39 -0
- package/pkgs/provider-none/src/tailwind-entry.css +57 -0
- package/pkgs/provider-none/src/version.ts +10 -0
- package/pkgs/schema/src/annotation.ts +120 -0
- package/pkgs/schema/src/asset.ts +66 -0
- package/pkgs/schema/src/board.ts +71 -0
- package/pkgs/schema/src/comment.ts +107 -0
- package/pkgs/schema/src/config.ts +185 -0
- package/pkgs/schema/src/css-sanitize.ts +56 -0
- package/pkgs/schema/src/extension.ts +105 -0
- package/pkgs/schema/src/fonts.ts +690 -0
- package/pkgs/schema/src/frame.ts +40 -0
- package/pkgs/schema/src/icon-name.ts +21 -0
- package/pkgs/schema/src/ids.ts +14 -0
- package/pkgs/schema/src/index.ts +169 -0
- package/pkgs/schema/src/migrate.ts +297 -0
- package/pkgs/schema/src/node.ts +229 -0
- package/pkgs/schema/src/paths.ts +28 -0
- package/pkgs/schema/src/repo.ts +134 -0
- package/pkgs/schema/src/screen.ts +30 -0
- package/pkgs/schema/src/snippet-resolve.ts +193 -0
- package/pkgs/schema/src/snippet.ts +104 -0
- package/pkgs/schema/src/svg-sanitize.ts +487 -0
- package/pkgs/schema/src/theme.ts +218 -0
- package/pkgs/schema/src/typeset.ts +693 -0
- package/pkgs/schema/src/validate-ids.ts +46 -0
- package/pkgs/schema/src/viewport.ts +8 -0
- package/pkgs/shadcn-snapshot/dist/manifest.json +8109 -0
- package/pkgs/shadcn-snapshot/src/components/canvas-portal.tsx +55 -0
- package/pkgs/shadcn-snapshot/src/components/ui/accordion.tsx +122 -0
- package/pkgs/shadcn-snapshot/src/components/ui/alert-dialog.tsx +164 -0
- package/pkgs/shadcn-snapshot/src/components/ui/alert.tsx +74 -0
- package/pkgs/shadcn-snapshot/src/components/ui/aspect-ratio.tsx +13 -0
- package/pkgs/shadcn-snapshot/src/components/ui/attachment.tsx +197 -0
- package/pkgs/shadcn-snapshot/src/components/ui/avatar.tsx +100 -0
- package/pkgs/shadcn-snapshot/src/components/ui/badge.tsx +50 -0
- package/pkgs/shadcn-snapshot/src/components/ui/breadcrumb.tsx +109 -0
- package/pkgs/shadcn-snapshot/src/components/ui/bubble.tsx +130 -0
- package/pkgs/shadcn-snapshot/src/components/ui/button-group.tsx +82 -0
- package/pkgs/shadcn-snapshot/src/components/ui/button.tsx +72 -0
- package/pkgs/shadcn-snapshot/src/components/ui/calendar.tsx +229 -0
- package/pkgs/shadcn-snapshot/src/components/ui/card.tsx +92 -0
- package/pkgs/shadcn-snapshot/src/components/ui/carousel.tsx +235 -0
- package/pkgs/shadcn-snapshot/src/components/ui/chart-option.ts +250 -0
- package/pkgs/shadcn-snapshot/src/components/ui/chart.tsx +177 -0
- package/pkgs/shadcn-snapshot/src/components/ui/checkbox.tsx +41 -0
- package/pkgs/shadcn-snapshot/src/components/ui/collapsible.tsx +32 -0
- package/pkgs/shadcn-snapshot/src/components/ui/combobox.tsx +196 -0
- package/pkgs/shadcn-snapshot/src/components/ui/context-menu.tsx +227 -0
- package/pkgs/shadcn-snapshot/src/components/ui/dialog.tsx +131 -0
- package/pkgs/shadcn-snapshot/src/components/ui/direction.tsx +24 -0
- package/pkgs/shadcn-snapshot/src/components/ui/drawer.tsx +112 -0
- package/pkgs/shadcn-snapshot/src/components/ui/dropdown-menu.tsx +205 -0
- package/pkgs/shadcn-snapshot/src/components/ui/empty.tsx +98 -0
- package/pkgs/shadcn-snapshot/src/components/ui/field.tsx +228 -0
- package/pkgs/shadcn-snapshot/src/components/ui/hover-card.tsx +51 -0
- package/pkgs/shadcn-snapshot/src/components/ui/input-group.tsx +148 -0
- package/pkgs/shadcn-snapshot/src/components/ui/input.tsx +43 -0
- package/pkgs/shadcn-snapshot/src/components/ui/item.tsx +187 -0
- package/pkgs/shadcn-snapshot/src/components/ui/kbd.tsx +30 -0
- package/pkgs/shadcn-snapshot/src/components/ui/label.tsx +25 -0
- package/pkgs/shadcn-snapshot/src/components/ui/marker.tsx +71 -0
- package/pkgs/shadcn-snapshot/src/components/ui/menubar.tsx +243 -0
- package/pkgs/shadcn-snapshot/src/components/ui/message.tsx +89 -0
- package/pkgs/shadcn-snapshot/src/components/ui/native-select.tsx +60 -0
- package/pkgs/shadcn-snapshot/src/components/ui/navigation-menu.tsx +165 -0
- package/pkgs/shadcn-snapshot/src/components/ui/pagination.tsx +117 -0
- package/pkgs/shadcn-snapshot/src/components/ui/popover.tsx +66 -0
- package/pkgs/shadcn-snapshot/src/components/ui/progress.tsx +35 -0
- package/pkgs/shadcn-snapshot/src/components/ui/radio-group.tsx +48 -0
- package/pkgs/shadcn-snapshot/src/components/ui/scroll-area.tsx +59 -0
- package/pkgs/shadcn-snapshot/src/components/ui/select.tsx +180 -0
- package/pkgs/shadcn-snapshot/src/components/ui/separator.tsx +32 -0
- package/pkgs/shadcn-snapshot/src/components/ui/sheet.tsx +107 -0
- package/pkgs/shadcn-snapshot/src/components/ui/skeleton.tsx +17 -0
- package/pkgs/shadcn-snapshot/src/components/ui/slider.tsx +68 -0
- package/pkgs/shadcn-snapshot/src/components/ui/sonner.tsx +91 -0
- package/pkgs/shadcn-snapshot/src/components/ui/spinner.tsx +21 -0
- package/pkgs/shadcn-snapshot/src/components/ui/switch.tsx +41 -0
- package/pkgs/shadcn-snapshot/src/components/ui/table.tsx +93 -0
- package/pkgs/shadcn-snapshot/src/components/ui/tabs.tsx +84 -0
- package/pkgs/shadcn-snapshot/src/components/ui/textarea.tsx +24 -0
- package/pkgs/shadcn-snapshot/src/components/ui/toggle-group.tsx +94 -0
- package/pkgs/shadcn-snapshot/src/components/ui/toggle.tsx +50 -0
- package/pkgs/shadcn-snapshot/src/components/ui/tooltip.tsx +47 -0
- package/pkgs/shadcn-snapshot/src/examples.ts +36 -0
- package/pkgs/shadcn-snapshot/src/groups.ts +87 -0
- package/pkgs/shadcn-snapshot/src/index.ts +43 -0
- package/pkgs/shadcn-snapshot/src/lib/utils.ts +4 -0
- package/pkgs/shadcn-snapshot/src/manifest.ts +12 -0
- package/pkgs/shadcn-snapshot/src/notes.ts +97 -0
- package/pkgs/shadcn-snapshot/src/paths.ts +47 -0
- package/pkgs/shadcn-snapshot/src/registry-files.ts +293 -0
- package/pkgs/shadcn-snapshot/src/registry.ts +631 -0
- package/pkgs/shadcn-snapshot/src/shadcn-tailwind.css +632 -0
- package/pkgs/shadcn-snapshot/src/tailwind-entry.css +159 -0
- package/pkgs/shadcn-snapshot/src/version.ts +8 -0
- package/plugins/claude/velloo/.claude-plugin/plugin.json +6 -0
- package/plugins/claude/velloo/agents/velloo-design-reviewer.md +33 -0
- package/plugins/claude/velloo/agents/velloo-designer.md +39 -0
- package/plugins/claude/velloo/commands/design.md +11 -0
- package/plugins/claude/velloo/commands/implement.md +10 -0
- package/plugins/claude/velloo/commands/review.md +8 -0
- package/plugins/gemini/GEMINI.md +31 -0
- package/plugins/gemini/commands/velloo/design.toml +10 -0
- package/plugins/gemini/commands/velloo/implement.toml +9 -0
- package/plugins/gemini/gemini-extension.json +9 -0
- package/skills/velloo-brand/SKILL.md +124 -0
- package/skills/velloo-design/SKILL.md +144 -0
- package/skills/velloo-design-system/SKILL.md +90 -0
- package/skills/velloo-implement/SKILL.md +101 -0
- package/skills/velloo-logo/SKILL.md +93 -0
- package/skills/velloo-setup/SKILL.md +156 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/native-select).
|
|
2
|
+
// Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
|
|
3
|
+
// Regenerate with `bun run vendor` — do not hand-edit unless you are adding a
|
|
4
|
+
// canvas adaptation, in which case add the id to vendor.ts's ADAPTED set.
|
|
5
|
+
|
|
6
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
7
|
+
import type * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { cn } from "../../lib/utils.ts";
|
|
10
|
+
|
|
11
|
+
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
|
|
12
|
+
size?: "sm" | "default";
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function NativeSelect({ className, size = "default", ...props }: NativeSelectProps) {
|
|
16
|
+
return (
|
|
17
|
+
<div
|
|
18
|
+
className={cn(
|
|
19
|
+
"group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
20
|
+
className,
|
|
21
|
+
)}
|
|
22
|
+
data-slot="native-select-wrapper"
|
|
23
|
+
data-size={size}
|
|
24
|
+
>
|
|
25
|
+
<select
|
|
26
|
+
data-slot="native-select"
|
|
27
|
+
data-size={size}
|
|
28
|
+
className="h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
<ChevronDownIcon
|
|
32
|
+
className="pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none"
|
|
33
|
+
aria-hidden="true"
|
|
34
|
+
data-slot="native-select-icon"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function NativeSelectOption({ className, ...props }: React.ComponentProps<"option">) {
|
|
41
|
+
return (
|
|
42
|
+
<option
|
|
43
|
+
data-slot="native-select-option"
|
|
44
|
+
className={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<"optgroup">) {
|
|
51
|
+
return (
|
|
52
|
+
<optgroup
|
|
53
|
+
data-slot="native-select-optgroup"
|
|
54
|
+
className={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/navigation-menu).
|
|
2
|
+
// Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
|
|
3
|
+
// Regenerate with `bun run vendor` — do not hand-edit unless you are adding a
|
|
4
|
+
// canvas adaptation, in which case add the id to vendor.ts's ADAPTED set.
|
|
5
|
+
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
8
|
+
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
|
|
9
|
+
import type * as React from "react";
|
|
10
|
+
|
|
11
|
+
import { cn } from "../../lib/utils.ts";
|
|
12
|
+
|
|
13
|
+
function NavigationMenu({
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
viewport = true,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
19
|
+
viewport?: boolean;
|
|
20
|
+
}) {
|
|
21
|
+
return (
|
|
22
|
+
<NavigationMenuPrimitive.Root
|
|
23
|
+
data-slot="navigation-menu"
|
|
24
|
+
data-viewport={viewport}
|
|
25
|
+
className={cn(
|
|
26
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
{...props}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
{viewport && <NavigationMenuViewport />}
|
|
33
|
+
</NavigationMenuPrimitive.Root>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function NavigationMenuList({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
|
|
41
|
+
return (
|
|
42
|
+
<NavigationMenuPrimitive.List
|
|
43
|
+
data-slot="navigation-menu-list"
|
|
44
|
+
className={cn("group flex flex-1 list-none items-center justify-center gap-0", className)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function NavigationMenuItem({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
|
|
54
|
+
return (
|
|
55
|
+
<NavigationMenuPrimitive.Item
|
|
56
|
+
data-slot="navigation-menu-item"
|
|
57
|
+
className={cn("relative", className)}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const navigationMenuTriggerStyle = cva(
|
|
64
|
+
"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted",
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
function NavigationMenuTrigger({
|
|
68
|
+
className,
|
|
69
|
+
children,
|
|
70
|
+
...props
|
|
71
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
|
|
72
|
+
return (
|
|
73
|
+
<NavigationMenuPrimitive.Trigger
|
|
74
|
+
data-slot="navigation-menu-trigger"
|
|
75
|
+
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
76
|
+
{...props}
|
|
77
|
+
>
|
|
78
|
+
{children}{" "}
|
|
79
|
+
<ChevronDownIcon
|
|
80
|
+
className="relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180"
|
|
81
|
+
aria-hidden="true"
|
|
82
|
+
/>
|
|
83
|
+
</NavigationMenuPrimitive.Trigger>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function NavigationMenuContent({
|
|
88
|
+
className,
|
|
89
|
+
...props
|
|
90
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
|
|
91
|
+
return (
|
|
92
|
+
<NavigationMenuPrimitive.Content
|
|
93
|
+
data-slot="navigation-menu-content"
|
|
94
|
+
className={cn(
|
|
95
|
+
"top-0 left-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
|
|
96
|
+
className,
|
|
97
|
+
)}
|
|
98
|
+
{...props}
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function NavigationMenuViewport({
|
|
104
|
+
className,
|
|
105
|
+
...props
|
|
106
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
|
|
107
|
+
return (
|
|
108
|
+
<div className={cn("absolute top-full left-0 isolate z-50 flex justify-center")}>
|
|
109
|
+
<NavigationMenuPrimitive.Viewport
|
|
110
|
+
data-slot="navigation-menu-viewport"
|
|
111
|
+
className={cn(
|
|
112
|
+
"origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90",
|
|
113
|
+
className,
|
|
114
|
+
)}
|
|
115
|
+
{...props}
|
|
116
|
+
/>
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function NavigationMenuLink({
|
|
122
|
+
className,
|
|
123
|
+
...props
|
|
124
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
|
|
125
|
+
return (
|
|
126
|
+
<NavigationMenuPrimitive.Link
|
|
127
|
+
data-slot="navigation-menu-link"
|
|
128
|
+
className={cn(
|
|
129
|
+
"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
130
|
+
className,
|
|
131
|
+
)}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function NavigationMenuIndicator({
|
|
138
|
+
className,
|
|
139
|
+
...props
|
|
140
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
|
|
141
|
+
return (
|
|
142
|
+
<NavigationMenuPrimitive.Indicator
|
|
143
|
+
data-slot="navigation-menu-indicator"
|
|
144
|
+
className={cn(
|
|
145
|
+
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
146
|
+
className,
|
|
147
|
+
)}
|
|
148
|
+
{...props}
|
|
149
|
+
>
|
|
150
|
+
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
|
|
151
|
+
</NavigationMenuPrimitive.Indicator>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export {
|
|
156
|
+
NavigationMenu,
|
|
157
|
+
NavigationMenuContent,
|
|
158
|
+
NavigationMenuIndicator,
|
|
159
|
+
NavigationMenuItem,
|
|
160
|
+
NavigationMenuLink,
|
|
161
|
+
NavigationMenuList,
|
|
162
|
+
NavigationMenuTrigger,
|
|
163
|
+
NavigationMenuViewport,
|
|
164
|
+
navigationMenuTriggerStyle,
|
|
165
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/pagination).
|
|
2
|
+
// Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
|
|
3
|
+
// Regenerate with `bun run vendor` — do not hand-edit unless you are adding a
|
|
4
|
+
// canvas adaptation, in which case add the id to vendor.ts's ADAPTED set.
|
|
5
|
+
|
|
6
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
7
|
+
import type * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { cn } from "../../lib/utils.ts";
|
|
10
|
+
import { Button } from "./button.tsx";
|
|
11
|
+
|
|
12
|
+
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
13
|
+
return (
|
|
14
|
+
<nav
|
|
15
|
+
role="navigation"
|
|
16
|
+
aria-label="pagination"
|
|
17
|
+
data-slot="pagination"
|
|
18
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function PaginationContent({ className, ...props }: React.ComponentProps<"ul">) {
|
|
25
|
+
return (
|
|
26
|
+
<ul
|
|
27
|
+
data-slot="pagination-content"
|
|
28
|
+
className={cn("flex items-center gap-0.5", className)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function PaginationItem({ ...props }: React.ComponentProps<"li">) {
|
|
35
|
+
return <li data-slot="pagination-item" {...props} />;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type PaginationLinkProps = {
|
|
39
|
+
isActive?: boolean;
|
|
40
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> &
|
|
41
|
+
React.ComponentProps<"a">;
|
|
42
|
+
|
|
43
|
+
function PaginationLink({ className, isActive, size = "icon", ...props }: PaginationLinkProps) {
|
|
44
|
+
return (
|
|
45
|
+
<Button asChild variant={isActive ? "outline" : "ghost"} size={size} className={cn(className)}>
|
|
46
|
+
<a
|
|
47
|
+
aria-current={isActive ? "page" : undefined}
|
|
48
|
+
data-slot="pagination-link"
|
|
49
|
+
data-active={isActive}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
</Button>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function PaginationPrevious({
|
|
57
|
+
className,
|
|
58
|
+
text = "Previous",
|
|
59
|
+
...props
|
|
60
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
61
|
+
return (
|
|
62
|
+
<PaginationLink
|
|
63
|
+
aria-label="Go to previous page"
|
|
64
|
+
size="default"
|
|
65
|
+
className={cn("pl-1.5!", className)}
|
|
66
|
+
{...props}
|
|
67
|
+
>
|
|
68
|
+
<ChevronLeftIcon data-icon="inline-start" className="cn-rtl-flip" />
|
|
69
|
+
<span className="hidden sm:block">{text}</span>
|
|
70
|
+
</PaginationLink>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function PaginationNext({
|
|
75
|
+
className,
|
|
76
|
+
text = "Next",
|
|
77
|
+
...props
|
|
78
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
79
|
+
return (
|
|
80
|
+
<PaginationLink
|
|
81
|
+
aria-label="Go to next page"
|
|
82
|
+
size="default"
|
|
83
|
+
className={cn("pr-1.5!", className)}
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
<span className="hidden sm:block">{text}</span>
|
|
87
|
+
<ChevronRightIcon data-icon="inline-end" className="cn-rtl-flip" />
|
|
88
|
+
</PaginationLink>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">) {
|
|
93
|
+
return (
|
|
94
|
+
<span
|
|
95
|
+
aria-hidden
|
|
96
|
+
data-slot="pagination-ellipsis"
|
|
97
|
+
className={cn(
|
|
98
|
+
"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
99
|
+
className,
|
|
100
|
+
)}
|
|
101
|
+
{...props}
|
|
102
|
+
>
|
|
103
|
+
<MoreHorizontalIcon />
|
|
104
|
+
<span className="sr-only">More pages</span>
|
|
105
|
+
</span>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export {
|
|
110
|
+
Pagination,
|
|
111
|
+
PaginationContent,
|
|
112
|
+
PaginationEllipsis,
|
|
113
|
+
PaginationItem,
|
|
114
|
+
PaginationLink,
|
|
115
|
+
PaginationNext,
|
|
116
|
+
PaginationPrevious,
|
|
117
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/popover).
|
|
2
|
+
// Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
|
|
3
|
+
// Canvas-safe: see ../canvas-portal.tsx.
|
|
4
|
+
"use client";
|
|
5
|
+
|
|
6
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
7
|
+
import type * as React from "react";
|
|
8
|
+
import { cn } from "../../lib/utils.ts";
|
|
9
|
+
import { inlineOpenAttrs, pinOpenInDesignMode } from "../canvas-portal.tsx";
|
|
10
|
+
|
|
11
|
+
export function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
12
|
+
return <PopoverPrimitive.Root data-slot="popover" {...pinOpenInDesignMode(props)} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function PopoverTrigger({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
18
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
22
|
+
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function PopoverContent({
|
|
26
|
+
className,
|
|
27
|
+
align: _align,
|
|
28
|
+
sideOffset: _sideOffset,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<"div"> & { align?: string; sideOffset?: number }) {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
data-slot="popover-content"
|
|
34
|
+
{...inlineOpenAttrs()}
|
|
35
|
+
className={cn(
|
|
36
|
+
"z-50 flex w-72 flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden",
|
|
37
|
+
className,
|
|
38
|
+
)}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
data-slot="popover-header"
|
|
48
|
+
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function PopoverTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
55
|
+
return <div data-slot="popover-title" className={cn("font-medium", className)} {...props} />;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function PopoverDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
59
|
+
return (
|
|
60
|
+
<p
|
|
61
|
+
data-slot="popover-description"
|
|
62
|
+
className={cn("text-muted-foreground", className)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/progress).
|
|
2
|
+
// Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
|
|
3
|
+
// Regenerate with `bun run vendor` — do not hand-edit unless you are adding a
|
|
4
|
+
// canvas adaptation, in which case add the id to vendor.ts's ADAPTED set.
|
|
5
|
+
"use client";
|
|
6
|
+
|
|
7
|
+
import { Progress as ProgressPrimitive } from "radix-ui";
|
|
8
|
+
import type * as React from "react";
|
|
9
|
+
|
|
10
|
+
import { cn } from "../../lib/utils.ts";
|
|
11
|
+
|
|
12
|
+
function Progress({
|
|
13
|
+
className,
|
|
14
|
+
value,
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
|
17
|
+
return (
|
|
18
|
+
<ProgressPrimitive.Root
|
|
19
|
+
data-slot="progress"
|
|
20
|
+
className={cn(
|
|
21
|
+
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
{...props}
|
|
25
|
+
>
|
|
26
|
+
<ProgressPrimitive.Indicator
|
|
27
|
+
data-slot="progress-indicator"
|
|
28
|
+
className="size-full flex-1 bg-primary transition-all"
|
|
29
|
+
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
30
|
+
/>
|
|
31
|
+
</ProgressPrimitive.Root>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { Progress };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/radio-group).
|
|
2
|
+
// Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
|
|
3
|
+
// Regenerate with `bun run vendor` — do not hand-edit unless you are adding a
|
|
4
|
+
// canvas adaptation, in which case add the id to vendor.ts's ADAPTED set.
|
|
5
|
+
"use client";
|
|
6
|
+
|
|
7
|
+
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
8
|
+
import type * as React from "react";
|
|
9
|
+
|
|
10
|
+
import { cn } from "../../lib/utils.ts";
|
|
11
|
+
|
|
12
|
+
function RadioGroup({
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
|
|
16
|
+
return (
|
|
17
|
+
<RadioGroupPrimitive.Root
|
|
18
|
+
data-slot="radio-group"
|
|
19
|
+
className={cn("grid w-full gap-2", className)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function RadioGroupItem({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
|
|
29
|
+
return (
|
|
30
|
+
<RadioGroupPrimitive.Item
|
|
31
|
+
data-slot="radio-group-item"
|
|
32
|
+
className={cn(
|
|
33
|
+
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
|
|
34
|
+
className,
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
>
|
|
38
|
+
<RadioGroupPrimitive.Indicator
|
|
39
|
+
data-slot="radio-group-indicator"
|
|
40
|
+
className="flex size-4 items-center justify-center"
|
|
41
|
+
>
|
|
42
|
+
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
|
|
43
|
+
</RadioGroupPrimitive.Indicator>
|
|
44
|
+
</RadioGroupPrimitive.Item>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Vendored from shadcn-ui (https://ui.shadcn.com/docs/components/radix/scroll-area).
|
|
2
|
+
// Snapshot version: see packages/shadcn-snapshot/package.json#snapshotVersion.
|
|
3
|
+
// Regenerate with `bun run vendor` — do not hand-edit unless you are adding a
|
|
4
|
+
// canvas adaptation, in which case add the id to vendor.ts's ADAPTED set.
|
|
5
|
+
"use client";
|
|
6
|
+
|
|
7
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
8
|
+
import type * as React from "react";
|
|
9
|
+
|
|
10
|
+
import { cn } from "../../lib/utils.ts";
|
|
11
|
+
|
|
12
|
+
function ScrollArea({
|
|
13
|
+
className,
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
17
|
+
return (
|
|
18
|
+
<ScrollAreaPrimitive.Root
|
|
19
|
+
data-slot="scroll-area"
|
|
20
|
+
className={cn("relative", className)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
<ScrollAreaPrimitive.Viewport
|
|
24
|
+
data-slot="scroll-area-viewport"
|
|
25
|
+
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
26
|
+
>
|
|
27
|
+
{children}
|
|
28
|
+
</ScrollAreaPrimitive.Viewport>
|
|
29
|
+
<ScrollBar />
|
|
30
|
+
<ScrollAreaPrimitive.Corner />
|
|
31
|
+
</ScrollAreaPrimitive.Root>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function ScrollBar({
|
|
36
|
+
className,
|
|
37
|
+
orientation = "vertical",
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
40
|
+
return (
|
|
41
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
42
|
+
data-slot="scroll-area-scrollbar"
|
|
43
|
+
data-orientation={orientation}
|
|
44
|
+
orientation={orientation}
|
|
45
|
+
className={cn(
|
|
46
|
+
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
47
|
+
className,
|
|
48
|
+
)}
|
|
49
|
+
{...props}
|
|
50
|
+
>
|
|
51
|
+
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
52
|
+
data-slot="scroll-area-thumb"
|
|
53
|
+
className="relative flex-1 rounded-full bg-border"
|
|
54
|
+
/>
|
|
55
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { ScrollArea, ScrollBar };
|