@betfin/ui 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/dist/chunk-3CAXHUAL.js +23 -0
- package/dist/chunk-3CAXHUAL.js.map +1 -0
- package/dist/chunk-3YCD2QLS.js +113 -0
- package/dist/chunk-3YCD2QLS.js.map +1 -0
- package/dist/chunk-5CXIFF6J.js +46 -0
- package/dist/chunk-5CXIFF6J.js.map +1 -0
- package/dist/chunk-EP6DYU4N.js +26 -0
- package/dist/chunk-EP6DYU4N.js.map +1 -0
- package/dist/chunk-FHYW2QBY.js +21 -0
- package/dist/chunk-FHYW2QBY.js.map +1 -0
- package/dist/chunk-HRFMTZ55.js +49 -0
- package/dist/chunk-HRFMTZ55.js.map +1 -0
- package/dist/chunk-ILNHKDYA.js +107 -0
- package/dist/chunk-ILNHKDYA.js.map +1 -0
- package/dist/chunk-JTVU6ANA.js +37 -0
- package/dist/chunk-JTVU6ANA.js.map +1 -0
- package/dist/chunk-K7JWN6NH.js +21 -0
- package/dist/chunk-K7JWN6NH.js.map +1 -0
- package/dist/chunk-QZIKXMHP.js +131 -0
- package/dist/chunk-QZIKXMHP.js.map +1 -0
- package/dist/chunk-SSC2M625.js +24 -0
- package/dist/chunk-SSC2M625.js.map +1 -0
- package/dist/chunk-TLULUIYC.js +14 -0
- package/dist/chunk-TLULUIYC.js.map +1 -0
- package/dist/chunk-VJ6P5FFS.js +90 -0
- package/dist/chunk-VJ6P5FFS.js.map +1 -0
- package/dist/chunk-Y2TKUANL.js +11 -0
- package/dist/chunk-Y2TKUANL.js.map +1 -0
- package/dist/components/accordion.d.ts +6 -0
- package/dist/components/accordion.js +59 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +18 -0
- package/dist/components/alert-dialog.js +144 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/app-header.d.ts +19 -0
- package/dist/components/app-header.js +17 -0
- package/dist/components/app-header.js.map +1 -0
- package/dist/components/badge.d.ts +7 -0
- package/dist/components/badge.js +47 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/bet-value.d.ts +49 -0
- package/dist/components/bet-value.js +12 -0
- package/dist/components/bet-value.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumb.js +65 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.d.ts +8 -0
- package/dist/components/button.js +10 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +10 -0
- package/dist/components/calendar.js +145 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/carousel.d.ts +28 -0
- package/dist/components/carousel.js +153 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/chart.d.ts +39 -0
- package/dist/components/chart.js +219 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.d.ts +3 -0
- package/dist/components/checkbox.js +26 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/collapsible.js +20 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/command.d.ts +19 -0
- package/dist/components/command.js +130 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/context-menu.d.ts +29 -0
- package/dist/components/context-menu.js +186 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/dialog.d.ts +17 -0
- package/dist/components/dialog.js +28 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.d.ts +16 -0
- package/dist/components/drawer.js +164 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +29 -0
- package/dist/components/dropdown-menu.js +207 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/input-group.d.ts +18 -0
- package/dist/components/input-group.js +22 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.js +8 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/loading.d.ts +9 -0
- package/dist/components/loading.js +26 -0
- package/dist/components/loading.js.map +1 -0
- package/dist/components/member-profile.d.ts +79 -0
- package/dist/components/member-profile.js +342 -0
- package/dist/components/member-profile.js.map +1 -0
- package/dist/components/popover.d.ts +9 -0
- package/dist/components/popover.js +52 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +7 -0
- package/dist/components/progress.js +40 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.js +31 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/scroll-area.d.ts +4 -0
- package/dist/components/scroll-area.js +42 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +136 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +3 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +14 -0
- package/dist/components/sheet.js +23 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +63 -0
- package/dist/components/sidebar.js +536 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +8 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +3 -0
- package/dist/components/slider.js +45 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.d.ts +3 -0
- package/dist/components/sonner.js +39 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.js +36 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +56 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +10 -0
- package/dist/components/tabs.js +63 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +8 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toggle-group.d.ts +11 -0
- package/dist/components/toggle-group.js +80 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +8 -0
- package/dist/components/toggle.js +11 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.d.ts +6 -0
- package/dist/components/tooltip.js +14 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +7 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/lib/date.d.ts +14 -0
- package/dist/lib/date.js +24 -0
- package/dist/lib/date.js.map +1 -0
- package/dist/lib/format.d.ts +16 -0
- package/dist/lib/format.js +9 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +7 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +71 -0
- package/src/styles/globals.css +151 -0
- package/src/styles/theme.css +144 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Textarea
|
|
3
|
+
} from "./chunk-SSC2M625.js";
|
|
4
|
+
import {
|
|
5
|
+
Input
|
|
6
|
+
} from "./chunk-EP6DYU4N.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-5CXIFF6J.js";
|
|
10
|
+
import {
|
|
11
|
+
cn
|
|
12
|
+
} from "./chunk-Y2TKUANL.js";
|
|
13
|
+
|
|
14
|
+
// src/components/input-group.tsx
|
|
15
|
+
import { cva } from "class-variance-authority";
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
function InputGroup({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "input-group",
|
|
22
|
+
role: "group",
|
|
23
|
+
className: cn(
|
|
24
|
+
"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input outline-none transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-start]]:h-auto has-[>textarea]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:flex-col has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot][aria-invalid=true]]:border-destructive has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
...props
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
var inputGroupAddonVariants = cva(
|
|
32
|
+
"flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 font-medium text-muted-foreground text-sm group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
align: {
|
|
36
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
37
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
38
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
39
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
align: "inline-start"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
role: "group",
|
|
52
|
+
"data-slot": "input-group-addon",
|
|
53
|
+
"data-align": align,
|
|
54
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
55
|
+
onClick: (e) => {
|
|
56
|
+
if (e.target.closest("button")) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
60
|
+
},
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
var inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
66
|
+
variants: {
|
|
67
|
+
size: {
|
|
68
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
69
|
+
sm: "",
|
|
70
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
71
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: {
|
|
75
|
+
size: "xs"
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
function InputGroupButton({
|
|
79
|
+
className,
|
|
80
|
+
type = "button",
|
|
81
|
+
variant = "ghost",
|
|
82
|
+
size = "xs",
|
|
83
|
+
...props
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */ jsx(Button, { type, "data-size": size, variant, className: cn(inputGroupButtonVariants({ size }), className), ...props });
|
|
86
|
+
}
|
|
87
|
+
function InputGroupText({ className, ...props }) {
|
|
88
|
+
return /* @__PURE__ */ jsx(
|
|
89
|
+
"span",
|
|
90
|
+
{
|
|
91
|
+
className: cn("flex items-center gap-2 text-muted-foreground text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none", className),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function InputGroupInput({ className, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
98
|
+
Input,
|
|
99
|
+
{
|
|
100
|
+
"data-slot": "input-group-control",
|
|
101
|
+
className: cn(
|
|
102
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
103
|
+
className
|
|
104
|
+
),
|
|
105
|
+
...props
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
Textarea,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "input-group-control",
|
|
114
|
+
className: cn(
|
|
115
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
116
|
+
className
|
|
117
|
+
),
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export {
|
|
124
|
+
InputGroup,
|
|
125
|
+
InputGroupAddon,
|
|
126
|
+
InputGroupButton,
|
|
127
|
+
InputGroupText,
|
|
128
|
+
InputGroupInput,
|
|
129
|
+
InputGroupTextarea
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=chunk-QZIKXMHP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/input-group.tsx"],"sourcesContent":["'use client';\n\nimport { Button } from '@betfin/ui/components/button';\nimport { Input } from '@betfin/ui/components/input';\nimport { Textarea } from '@betfin/ui/components/textarea';\nimport { cn } from '@betfin/ui/lib/utils';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type * as React from 'react';\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"input-group\"\n\t\t\trole=\"group\"\n\t\t\tclassName={cn(\n\t\t\t\t'group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input outline-none transition-colors in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-start]]:h-auto has-[>textarea]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:flex-col has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot][aria-invalid=true]]:border-destructive has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-start]]:[&>input]:pl-1.5',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst inputGroupAddonVariants = cva(\n\t\"flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 font-medium text-muted-foreground text-sm group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4\",\n\t{\n\t\tvariants: {\n\t\t\talign: {\n\t\t\t\t'inline-start': 'order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]',\n\t\t\t\t'inline-end': 'order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]',\n\t\t\t\t'block-start': 'order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2',\n\t\t\t\t'block-end': 'order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\talign: 'inline-start',\n\t\t},\n\t},\n);\n\nfunction InputGroupAddon({ className, align = 'inline-start', ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n\treturn (\n\t\t<div\n\t\t\trole=\"group\"\n\t\t\tdata-slot=\"input-group-addon\"\n\t\t\tdata-align={align}\n\t\t\tclassName={cn(inputGroupAddonVariants({ align }), className)}\n\t\t\tonClick={(e) => {\n\t\t\t\tif ((e.target as HTMLElement).closest('button')) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\te.currentTarget.parentElement?.querySelector('input')?.focus();\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst inputGroupButtonVariants = cva('flex items-center gap-2 text-sm shadow-none', {\n\tvariants: {\n\t\tsize: {\n\t\t\txs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n\t\t\tsm: '',\n\t\t\t'icon-xs': 'size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0',\n\t\t\t'icon-sm': 'size-8 p-0 has-[>svg]:p-0',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: 'xs',\n\t},\n});\n\nfunction InputGroupButton({\n\tclassName,\n\ttype = 'button',\n\tvariant = 'ghost',\n\tsize = 'xs',\n\t...props\n}: Omit<React.ComponentProps<typeof Button>, 'size' | 'type'> &\n\tVariantProps<typeof inputGroupButtonVariants> & {\n\t\ttype?: 'button' | 'submit' | 'reset';\n\t}) {\n\treturn <Button type={type} data-size={size} variant={variant} className={cn(inputGroupButtonVariants({ size }), className)} {...props} />;\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"flex items-center gap-2 text-muted-foreground text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupInput({ className, ...props }: React.ComponentProps<'input'>) {\n\treturn (\n\t\t<Input\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\tclassName={cn(\n\t\t\t\t'flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<Textarea\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\tclassName={cn(\n\t\t\t\t'flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };\n"],"mappings":";;;;;;;;;;;;;;AAMA,SAAS,WAA8B;AAKrC;AAFF,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACzE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,MAAK;AAAA,MACL,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,IAAM,0BAA0B;AAAA,EAC/B;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,OAAO;AAAA,QACN,gBAAgB;AAAA,QAChB,cAAc;AAAA,QACd,eAAe;AAAA,QACf,aAAa;AAAA,MACd;AAAA,IACD;AAAA,IACA,iBAAiB;AAAA,MAChB,OAAO;AAAA,IACR;AAAA,EACD;AACD;AAEA,SAAS,gBAAgB,EAAE,WAAW,QAAQ,gBAAgB,GAAG,MAAM,GAA+E;AACrJ,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,aAAU;AAAA,MACV,cAAY;AAAA,MACZ,WAAW,GAAG,wBAAwB,EAAE,MAAM,CAAC,GAAG,SAAS;AAAA,MAC3D,SAAS,CAAC,MAAM;AACf,YAAK,EAAE,OAAuB,QAAQ,QAAQ,GAAG;AAChD;AAAA,QACD;AACA,UAAE,cAAc,eAAe,cAAc,OAAO,GAAG,MAAM;AAAA,MAC9D;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,IAAM,2BAA2B,IAAI,+CAA+C;AAAA,EACnF,UAAU;AAAA,IACT,MAAM;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,WAAW;AAAA,IACZ;AAAA,EACD;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,EACP;AACD,CAAC;AAED,SAAS,iBAAiB;AAAA,EACzB;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACJ,GAGI;AACH,SAAO,oBAAC,UAAO,MAAY,aAAW,MAAM,SAAkB,WAAW,GAAG,yBAAyB,EAAE,KAAK,CAAC,GAAG,SAAS,GAAI,GAAG,OAAO;AACxI;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAAiC;AAC9E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAW,GAAG,0HAA0H,SAAS;AAAA,MAChJ,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAkC;AAChF,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,MAAM,GAAqC;AACtF,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-Y2TKUANL.js";
|
|
4
|
+
|
|
5
|
+
// src/components/textarea.tsx
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function Textarea({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"textarea",
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "textarea",
|
|
12
|
+
className: cn(
|
|
13
|
+
"field-sizing-content flex min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:disabled:bg-input/80",
|
|
14
|
+
className
|
|
15
|
+
),
|
|
16
|
+
...props
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
Textarea
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-SSC2M625.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/textarea.tsx"],"sourcesContent":["import { cn } from '@betfin/ui/lib/utils';\nimport type * as React from 'react';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot=\"textarea\"\n\t\t\tclassName={cn(\n\t\t\t\t'field-sizing-content flex min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:disabled:bg-input/80',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Textarea };\n"],"mappings":";;;;;AAKE;AAFF,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAAqC;AAC5E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-Y2TKUANL.js";
|
|
4
|
+
|
|
5
|
+
// src/components/skeleton.tsx
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function Skeleton({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
Skeleton
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=chunk-TLULUIYC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/skeleton.tsx"],"sourcesContent":["import { cn } from '@betfin/ui/lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn <div data-slot=\"skeleton\" className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"mappings":";;;;;AAGQ;AADR,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAAgC;AACvE,SAAO,oBAAC,SAAI,aAAU,YAAW,WAAW,GAAG,qCAAqC,SAAS,GAAI,GAAG,OAAO;AAC5G;","names":[]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "./chunk-5CXIFF6J.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-Y2TKUANL.js";
|
|
7
|
+
|
|
8
|
+
// src/components/sheet.tsx
|
|
9
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
10
|
+
import { XIcon } from "lucide-react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
function Sheet({ ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
14
|
+
}
|
|
15
|
+
function SheetTrigger({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
17
|
+
}
|
|
18
|
+
function SheetClose({ ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
20
|
+
}
|
|
21
|
+
function SheetPortal({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
23
|
+
}
|
|
24
|
+
function SheetOverlay({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
SheetPrimitive.Backdrop,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "sheet-overlay",
|
|
29
|
+
className: cn(
|
|
30
|
+
"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function SheetContent({
|
|
38
|
+
className,
|
|
39
|
+
children,
|
|
40
|
+
side = "right",
|
|
41
|
+
showCloseButton = true,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
46
|
+
/* @__PURE__ */ jsxs(
|
|
47
|
+
SheetPrimitive.Popup,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "sheet-content",
|
|
50
|
+
"data-side": side,
|
|
51
|
+
className: cn(
|
|
52
|
+
"fixed z-50 flex max-h-dvh flex-col gap-4 overflow-y-auto bg-popover bg-clip-padding text-popover-foreground text-sm shadow-lg transition duration-200 ease-in-out data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=bottom]:inset-x-0 data-[side=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
...props,
|
|
56
|
+
children: [
|
|
57
|
+
children,
|
|
58
|
+
showCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: /* @__PURE__ */ jsx(Button, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm" }), children: [
|
|
59
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
60
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
61
|
+
] })
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
67
|
+
function SheetHeader({ className, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-0.5 p-4", className), ...props });
|
|
69
|
+
}
|
|
70
|
+
function SheetFooter({ className, ...props }) {
|
|
71
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
|
|
72
|
+
}
|
|
73
|
+
function SheetTitle({ className, ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("font-heading font-medium text-base text-foreground", className), ...props });
|
|
75
|
+
}
|
|
76
|
+
function SheetDescription({ className, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-muted-foreground text-sm", className), ...props });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
Sheet,
|
|
82
|
+
SheetTrigger,
|
|
83
|
+
SheetClose,
|
|
84
|
+
SheetContent,
|
|
85
|
+
SheetHeader,
|
|
86
|
+
SheetFooter,
|
|
87
|
+
SheetTitle,
|
|
88
|
+
SheetDescription
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=chunk-VJ6P5FFS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/sheet.tsx"],"sourcesContent":["import { Dialog as SheetPrimitive } from '@base-ui/react/dialog';\nimport { Button } from '@betfin/ui/components/button';\n\nimport { cn } from '@betfin/ui/lib/utils';\nimport { XIcon } from 'lucide-react';\nimport type * as React from 'react';\n\nfunction Sheet({ ...props }: SheetPrimitive.Root.Props) {\n\treturn <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {\n\treturn <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose({ ...props }: SheetPrimitive.Close.Props) {\n\treturn <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nfunction SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {\n\treturn <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\nfunction SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {\n\treturn (\n\t\t<SheetPrimitive.Backdrop\n\t\t\tdata-slot=\"sheet-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t'fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SheetContent({\n\tclassName,\n\tchildren,\n\tside = 'right',\n\tshowCloseButton = true,\n\t...props\n}: SheetPrimitive.Popup.Props & {\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\tshowCloseButton?: boolean;\n}) {\n\treturn (\n\t\t<SheetPortal>\n\t\t\t<SheetOverlay />\n\t\t\t<SheetPrimitive.Popup\n\t\t\t\tdata-slot=\"sheet-content\"\n\t\t\t\tdata-side={side}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'fixed z-50 flex max-h-dvh flex-col gap-4 overflow-y-auto bg-popover bg-clip-padding text-popover-foreground text-sm shadow-lg transition duration-200 ease-in-out data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=bottom]:inset-x-0 data-[side=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t{showCloseButton && (\n\t\t\t\t\t<SheetPrimitive.Close data-slot=\"sheet-close\" render={<Button variant=\"ghost\" className=\"absolute top-3 right-3\" size=\"icon-sm\" />}>\n\t\t\t\t\t\t<XIcon />\n\t\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t\t</SheetPrimitive.Close>\n\t\t\t\t)}\n\t\t\t</SheetPrimitive.Popup>\n\t\t</SheetPortal>\n\t);\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn <div data-slot=\"sheet-header\" className={cn('flex flex-col gap-0.5 p-4', className)} {...props} />;\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn <div data-slot=\"sheet-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\nfunction SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {\n\treturn <SheetPrimitive.Title data-slot=\"sheet-title\" className={cn('font-heading font-medium text-base text-foreground', className)} {...props} />;\n}\n\nfunction SheetDescription({ className, ...props }: SheetPrimitive.Description.Props) {\n\treturn <SheetPrimitive.Description data-slot=\"sheet-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />;\n}\n\nexport { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };\n"],"mappings":";;;;;;;;AAAA,SAAS,UAAU,sBAAsB;AAIzC,SAAS,aAAa;AAId,cAoDH,YApDG;AADR,SAAS,MAAM,EAAE,GAAG,MAAM,GAA8B;AACvD,SAAO,oBAAC,eAAe,MAAf,EAAoB,aAAU,SAAS,GAAG,OAAO;AAC1D;AAEA,SAAS,aAAa,EAAE,GAAG,MAAM,GAAiC;AACjE,SAAO,oBAAC,eAAe,SAAf,EAAuB,aAAU,iBAAiB,GAAG,OAAO;AACrE;AAEA,SAAS,WAAW,EAAE,GAAG,MAAM,GAA+B;AAC7D,SAAO,oBAAC,eAAe,OAAf,EAAqB,aAAU,eAAe,GAAG,OAAO;AACjE;AAEA,SAAS,YAAY,EAAE,GAAG,MAAM,GAAgC;AAC/D,SAAO,oBAAC,eAAe,QAAf,EAAsB,aAAU,gBAAgB,GAAG,OAAO;AACnE;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC7E,SACC;AAAA,IAAC,eAAe;AAAA,IAAf;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,aAAa;AAAA,EACrB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,GAAG;AACJ,GAGG;AACF,SACC,qBAAC,eACA;AAAA,wBAAC,gBAAa;AAAA,IACd;AAAA,MAAC,eAAe;AAAA,MAAf;AAAA,QACA,aAAU;AAAA,QACV,aAAW;AAAA,QACX,WAAW;AAAA,UACV;AAAA,UACA;AAAA,QACD;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,UACA,mBACA,qBAAC,eAAe,OAAf,EAAqB,aAAU,eAAc,QAAQ,oBAAC,UAAO,SAAQ,SAAQ,WAAU,0BAAyB,MAAK,WAAU,GAC/H;AAAA,gCAAC,SAAM;AAAA,YACP,oBAAC,UAAK,WAAU,WAAU,mBAAK;AAAA,aAChC;AAAA;AAAA;AAAA,IAEF;AAAA,KACD;AAEF;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC1E,SAAO,oBAAC,SAAI,aAAU,gBAAe,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAAO;AACxG;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC1E,SAAO,oBAAC,SAAI,aAAU,gBAAe,WAAW,GAAG,mCAAmC,SAAS,GAAI,GAAG,OAAO;AAC9G;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAA+B;AACxE,SAAO,oBAAC,eAAe,OAAf,EAAqB,aAAU,eAAc,WAAW,GAAG,sDAAsD,SAAS,GAAI,GAAG,OAAO;AACjJ;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,MAAM,GAAqC;AACpF,SAAO,oBAAC,eAAe,aAAf,EAA2B,aAAU,qBAAoB,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AACxI;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC3C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC5B;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
|
|
2
|
+
declare function Accordion({ className, ...props }: AccordionPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
|
+
declare function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props): import("react").JSX.Element;
|
|
4
|
+
declare function AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
declare function AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props): import("react").JSX.Element;
|
|
6
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "../chunk-Y2TKUANL.js";
|
|
4
|
+
|
|
5
|
+
// src/components/accordion.tsx
|
|
6
|
+
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
7
|
+
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function Accordion({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", className: cn("flex w-full flex-col", className), ...props });
|
|
11
|
+
}
|
|
12
|
+
function AccordionItem({ className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("not-last:border-b", className), ...props });
|
|
14
|
+
}
|
|
15
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
17
|
+
AccordionPrimitive.Trigger,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "accordion-trigger",
|
|
20
|
+
className: cn(
|
|
21
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left font-medium text-sm outline-none transition-all hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
children,
|
|
27
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" }),
|
|
28
|
+
/* @__PURE__ */ jsx(ChevronUpIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
) });
|
|
32
|
+
}
|
|
33
|
+
function AccordionContent({ className, children, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
AccordionPrimitive.Panel,
|
|
36
|
+
{
|
|
37
|
+
"data-slot": "accordion-content",
|
|
38
|
+
className: "overflow-hidden text-sm data-closed:animate-accordion-up data-open:animate-accordion-down",
|
|
39
|
+
...props,
|
|
40
|
+
children: /* @__PURE__ */ jsx(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: cn(
|
|
44
|
+
"h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
children
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
Accordion,
|
|
55
|
+
AccordionContent,
|
|
56
|
+
AccordionItem,
|
|
57
|
+
AccordionTrigger
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/accordion.tsx"],"sourcesContent":["import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';\n\nimport { cn } from '@betfin/ui/lib/utils';\nimport { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n\treturn <AccordionPrimitive.Root data-slot=\"accordion\" className={cn('flex w-full flex-col', className)} {...props} />;\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n\treturn <AccordionPrimitive.Item data-slot=\"accordion-item\" className={cn('not-last:border-b', className)} {...props} />;\n}\n\nfunction AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props) {\n\treturn (\n\t\t<AccordionPrimitive.Header className=\"flex\">\n\t\t\t<AccordionPrimitive.Trigger\n\t\t\t\tdata-slot=\"accordion-trigger\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left font-medium text-sm outline-none transition-all hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t<ChevronDownIcon data-slot=\"accordion-trigger-icon\" className=\"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden\" />\n\t\t\t\t<ChevronUpIcon data-slot=\"accordion-trigger-icon\" className=\"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline\" />\n\t\t\t</AccordionPrimitive.Trigger>\n\t\t</AccordionPrimitive.Header>\n\t);\n}\n\nfunction AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props) {\n\treturn (\n\t\t<AccordionPrimitive.Panel\n\t\t\tdata-slot=\"accordion-content\"\n\t\t\tclassName=\"overflow-hidden text-sm data-closed:animate-accordion-up data-open:animate-accordion-down\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</AccordionPrimitive.Panel>\n\t);\n}\n\nexport { Accordion, AccordionContent, AccordionItem, AccordionTrigger };\n"],"mappings":";;;;;AAAA,SAAS,aAAa,0BAA0B;AAGhD,SAAS,iBAAiB,qBAAqB;AAGvC,cAUL,YAVK;AADR,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC1E,SAAO,oBAAC,mBAAmB,MAAnB,EAAwB,aAAU,aAAY,WAAW,GAAG,wBAAwB,SAAS,GAAI,GAAG,OAAO;AACpH;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC9E,SAAO,oBAAC,mBAAmB,MAAnB,EAAwB,aAAU,kBAAiB,WAAW,GAAG,qBAAqB,SAAS,GAAI,GAAG,OAAO;AACtH;AAEA,SAAS,iBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAqC;AAC9F,SACC,oBAAC,mBAAmB,QAAnB,EAA0B,WAAU,QACpC;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACD,oBAAC,mBAAgB,aAAU,0BAAyB,WAAU,6EAA4E;AAAA,QAC1I,oBAAC,iBAAc,aAAU,0BAAyB,WAAU,oFAAmF;AAAA;AAAA;AAAA,EAChJ,GACD;AAEF;AAEA,SAAS,iBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAmC;AAC5F,SACC;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACA,WAAW;AAAA,YACV;AAAA,YACA;AAAA,UACD;AAAA,UAEC;AAAA;AAAA,MACF;AAAA;AAAA,EACD;AAEF;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
|
|
2
|
+
import { Button } from '@betfin/ui/components/button';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
declare function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props): React.JSX.Element;
|
|
7
|
+
declare function AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props): React.JSX.Element;
|
|
8
|
+
declare function AlertDialogContent({ className, size, ...props }: AlertDialogPrimitive.Popup.Props & {
|
|
9
|
+
size?: 'default' | 'sm';
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
12
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
13
|
+
declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
14
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
|
|
15
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
|
|
16
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
17
|
+
declare function AlertDialogCancel({ className, variant, size, ...props }: AlertDialogPrimitive.Close.Props & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>): React.JSX.Element;
|
|
18
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "../chunk-5CXIFF6J.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "../chunk-Y2TKUANL.js";
|
|
7
|
+
|
|
8
|
+
// src/components/alert-dialog.tsx
|
|
9
|
+
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
function AlertDialog({ ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
13
|
+
}
|
|
14
|
+
function AlertDialogTrigger({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
16
|
+
}
|
|
17
|
+
function AlertDialogPortal({ ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
19
|
+
}
|
|
20
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
AlertDialogPrimitive.Backdrop,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "alert-dialog-overlay",
|
|
25
|
+
className: cn(
|
|
26
|
+
"data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function AlertDialogContent({
|
|
34
|
+
className,
|
|
35
|
+
size = "default",
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
39
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
AlertDialogPrimitive.Popup,
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "alert-dialog-content",
|
|
44
|
+
"data-size": size,
|
|
45
|
+
className: cn(
|
|
46
|
+
"group/alert-dialog-content data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid max-h-[90dvh] w-full -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-popover-foreground outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "alert-dialog-header",
|
|
59
|
+
className: cn(
|
|
60
|
+
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
61
|
+
className
|
|
62
|
+
),
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "alert-dialog-footer",
|
|
72
|
+
className: cn(
|
|
73
|
+
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function AlertDialogMedia({ className, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "alert-dialog-media",
|
|
85
|
+
className: cn(
|
|
86
|
+
"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
AlertDialogPrimitive.Title,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "alert-dialog-title",
|
|
98
|
+
className: cn(
|
|
99
|
+
"font-heading font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
108
|
+
AlertDialogPrimitive.Description,
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "alert-dialog-description",
|
|
111
|
+
className: cn(
|
|
112
|
+
"text-balance text-muted-foreground text-sm md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function AlertDialogAction({ className, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ jsx(Button, { "data-slot": "alert-dialog-action", className: cn(className), ...props });
|
|
121
|
+
}
|
|
122
|
+
function AlertDialogCancel({
|
|
123
|
+
className,
|
|
124
|
+
variant = "outline",
|
|
125
|
+
size = "default",
|
|
126
|
+
...props
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Close, { "data-slot": "alert-dialog-cancel", className: cn(className), render: /* @__PURE__ */ jsx(Button, { variant, size }), ...props });
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
AlertDialog,
|
|
132
|
+
AlertDialogAction,
|
|
133
|
+
AlertDialogCancel,
|
|
134
|
+
AlertDialogContent,
|
|
135
|
+
AlertDialogDescription,
|
|
136
|
+
AlertDialogFooter,
|
|
137
|
+
AlertDialogHeader,
|
|
138
|
+
AlertDialogMedia,
|
|
139
|
+
AlertDialogOverlay,
|
|
140
|
+
AlertDialogPortal,
|
|
141
|
+
AlertDialogTitle,
|
|
142
|
+
AlertDialogTrigger
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/alert-dialog.tsx"],"sourcesContent":["import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\nimport { Button } from '@betfin/ui/components/button';\n\nimport { cn } from '@betfin/ui/lib/utils';\nimport type * as React from 'react';\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n\treturn <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n\treturn <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props) {\n\treturn (\n\t\t<AlertDialogPrimitive.Backdrop\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t'data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({\n\tclassName,\n\tsize = 'default',\n\t...props\n}: AlertDialogPrimitive.Popup.Props & {\n\tsize?: 'default' | 'sm';\n}) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Popup\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tdata-size={size}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'group/alert-dialog-content data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid max-h-[90dvh] w-full -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-popover-foreground outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn(\n\t\t\t\t'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t'-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-media\"\n\t\t\tclassName={cn(\n\t\t\t\t\"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn(\n\t\t\t\t'font-heading font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn(\n\t\t\t\t'text-balance text-muted-foreground text-sm md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>) {\n\treturn <Button data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n\tclassName,\n\tvariant = 'outline',\n\tsize = 'default',\n\t...props\n}: AlertDialogPrimitive.Close.Props & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {\n\treturn <AlertDialogPrimitive.Close data-slot=\"alert-dialog-cancel\" className={cn(className)} render={<Button variant={variant} size={size} />} {...props} />;\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogMedia,\n\tAlertDialogOverlay,\n\tAlertDialogPortal,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n};\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe,4BAA4B;AAO5C,cAgCN,YAhCM;AADR,SAAS,YAAY,EAAE,GAAG,MAAM,GAAoC;AACnE,SAAO,oBAAC,qBAAqB,MAArB,EAA0B,aAAU,gBAAgB,GAAG,OAAO;AACvE;AAEA,SAAS,mBAAmB,EAAE,GAAG,MAAM,GAAuC;AAC7E,SAAO,oBAAC,qBAAqB,SAArB,EAA6B,aAAU,wBAAwB,GAAG,OAAO;AAClF;AAEA,SAAS,kBAAkB,EAAE,GAAG,MAAM,GAAsC;AAC3E,SAAO,oBAAC,qBAAqB,QAArB,EAA4B,aAAU,uBAAuB,GAAG,OAAO;AAChF;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,MAAM,GAAwC;AACzF,SACC;AAAA,IAAC,qBAAqB;AAAA,IAArB;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,mBAAmB;AAAA,EAC3B;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACJ,GAEG;AACF,SACC,qBAAC,qBACA;AAAA,wBAAC,sBAAmB;AAAA,IACpB;AAAA,MAAC,qBAAqB;AAAA,MAArB;AAAA,QACA,aAAU;AAAA,QACV,aAAW;AAAA,QACX,WAAW;AAAA,UACV;AAAA,UACA;AAAA,QACD;AAAA,QACC,GAAG;AAAA;AAAA,IACL;AAAA,KACD;AAEF;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAAgC;AAChF,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAAgC;AAChF,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC/E,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,MAAM,GAA4D;AAC3G,SACC;AAAA,IAAC,qBAAqB;AAAA,IAArB;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,uBAAuB,EAAE,WAAW,GAAG,MAAM,GAAkE;AACvH,SACC;AAAA,IAAC,qBAAqB;AAAA,IAArB;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAAwC;AACxF,SAAO,oBAAC,UAAO,aAAU,uBAAsB,WAAW,GAAG,SAAS,GAAI,GAAG,OAAO;AACrF;AAEA,SAAS,kBAAkB;AAAA,EAC1B;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACJ,GAAqG;AACpG,SAAO,oBAAC,qBAAqB,OAArB,EAA2B,aAAU,uBAAsB,WAAW,GAAG,SAAS,GAAG,QAAQ,oBAAC,UAAO,SAAkB,MAAY,GAAK,GAAG,OAAO;AAC3J;","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The single app header shared across every Betfin app (staking, affiliate, …).
|
|
4
|
+
* Presentational: optional actions and a wallet slot on the right. The app is
|
|
5
|
+
* dark-only, so there is no theme toggle. The brand mark lives in the sidebar, so
|
|
6
|
+
* the header carries no logo/title. Apps pass `<ConnectButton />` (from
|
|
7
|
+
* @workspace/web3) as `wallet` so connect / account / disconnect behaves
|
|
8
|
+
* identically everywhere. The fixed height aligns the header's bottom border with
|
|
9
|
+
* the sidebar's header separator.
|
|
10
|
+
*/
|
|
11
|
+
export interface AppHeaderProps {
|
|
12
|
+
/** Left-aligned leading slot (e.g. the mobile menu trigger). */
|
|
13
|
+
leading?: ReactNode;
|
|
14
|
+
/** Extra controls placed before the wallet slot (e.g. notifications). */
|
|
15
|
+
actions?: ReactNode;
|
|
16
|
+
/** Wallet control — typically `<ConnectButton />`. */
|
|
17
|
+
wallet?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function AppHeader({ leading, actions, wallet }: AppHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/app-header.tsx
|
|
4
|
+
import { jsxs } from "react/jsx-runtime";
|
|
5
|
+
function AppHeader({ leading, actions, wallet }) {
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-[70px] items-center gap-3 border-border border-b", children: [
|
|
7
|
+
leading,
|
|
8
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-3", children: [
|
|
9
|
+
actions,
|
|
10
|
+
wallet
|
|
11
|
+
] })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
AppHeader
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=app-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/app-header.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode } from 'react';\n\n/**\n * The single app header shared across every Betfin app (staking, affiliate, …).\n * Presentational: optional actions and a wallet slot on the right. The app is\n * dark-only, so there is no theme toggle. The brand mark lives in the sidebar, so\n * the header carries no logo/title. Apps pass `<ConnectButton />` (from\n * @workspace/web3) as `wallet` so connect / account / disconnect behaves\n * identically everywhere. The fixed height aligns the header's bottom border with\n * the sidebar's header separator.\n */\nexport interface AppHeaderProps {\n\t/** Left-aligned leading slot (e.g. the mobile menu trigger). */\n\tleading?: ReactNode;\n\t/** Extra controls placed before the wallet slot (e.g. notifications). */\n\tactions?: ReactNode;\n\t/** Wallet control — typically `<ConnectButton />`. */\n\twallet?: ReactNode;\n}\n\nexport function AppHeader({ leading, actions, wallet }: AppHeaderProps) {\n\treturn (\n\t\t<div className=\"flex h-[70px] items-center gap-3 border-border border-b\">\n\t\t\t{leading}\n\t\t\t<div className=\"ml-auto flex items-center gap-3\">\n\t\t\t\t{actions}\n\t\t\t\t{wallet}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;AA0BG;AAJI,SAAS,UAAU,EAAE,SAAS,SAAS,OAAO,GAAmB;AACvE,SACC,qBAAC,SAAI,WAAU,2DACb;AAAA;AAAA,IACD,qBAAC,SAAI,WAAU,mCACb;AAAA;AAAA,MACA;AAAA,OACF;AAAA,KACD;AAEF;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<'span'> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
+
export { Badge, badgeVariants };
|