@easyops-cn/a2ui-react 0.0.4 → 0.0.5
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/0.8/components/display/AudioPlayerComponent.js +2 -2
- package/dist/0.8/components/display/DividerComponent.js +1 -1
- package/dist/0.8/components/display/IconComponent.js +2 -2
- package/dist/0.8/components/display/ImageComponent.js +2 -2
- package/dist/0.8/components/display/TextComponent.js +2 -2
- package/dist/0.8/components/display/VideoComponent.js +2 -2
- package/dist/0.8/components/interactive/ButtonComponent.js +2 -2
- package/dist/0.8/components/interactive/CheckBoxComponent.js +4 -4
- package/dist/0.8/components/interactive/DateTimeInputComponent.js +6 -6
- package/dist/0.8/components/interactive/MultipleChoiceComponent.js +5 -5
- package/dist/0.8/components/interactive/SliderComponent.js +3 -3
- package/dist/0.8/components/interactive/TextFieldComponent.js +5 -5
- package/dist/0.8/components/layout/CardComponent.js +1 -1
- package/dist/0.8/components/layout/ColumnComponent.js +3 -3
- package/dist/0.8/components/layout/ListComponent.js +3 -3
- package/dist/0.8/components/layout/ModalComponent.js +1 -1
- package/dist/0.8/components/layout/RowComponent.js +3 -3
- package/dist/0.8/components/layout/TabsComponent.js +2 -2
- package/dist/0.8/hooks/useDataBinding.js +17 -12
- package/dist/components/ui/button.js +53 -0
- package/dist/components/ui/calendar.js +173 -0
- package/dist/components/ui/card.js +29 -0
- package/dist/components/ui/checkbox.js +31 -0
- package/dist/components/ui/dialog.js +77 -0
- package/dist/components/ui/input.js +21 -0
- package/dist/components/ui/label.js +22 -0
- package/dist/components/ui/popover.js +38 -0
- package/dist/components/ui/select.js +144 -0
- package/dist/components/ui/separator.js +26 -0
- package/dist/components/ui/slider.js +63 -0
- package/dist/components/ui/tabs.js +67 -0
- package/dist/components/ui/textarea.js +18 -0
- package/dist/lib/utils.js +8 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as m } from "react";
|
|
3
|
-
import { useDataBinding as n } from "
|
|
4
|
-
import { cn as a } from "
|
|
3
|
+
import { useDataBinding as n } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { cn as a } from "../../../lib/utils.js";
|
|
5
5
|
const u = m(function({
|
|
6
6
|
surfaceId: o,
|
|
7
7
|
url: i,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { memo as t } from "react";
|
|
3
|
-
import { Separator as e } from "
|
|
3
|
+
import { Separator as e } from "../../../components/ui/separator.js";
|
|
4
4
|
const i = t(function({
|
|
5
5
|
axis: o = "horizontal"
|
|
6
6
|
}) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as i } from "react";
|
|
3
|
-
import { useDataBinding as l } from "
|
|
3
|
+
import { useDataBinding as l } from "../../hooks/useDataBinding.js";
|
|
4
4
|
import { AlertTriangle as c, EyeOff as f, Eye as s, Upload as m, StarOff as p, StarHalf as d, Star as h, ShoppingCart as C, Share2 as u, Settings as w, Send as O, Search as g, RefreshCw as k, Printer as y, Image as H, Phone as o, User as I, CreditCard as S, Bell as U, BellOff as A, MoreHorizontal as M, MoreVertical as P, Menu as v, Mail as B, Unlock as D, Lock as F, MapPin as N, Info as T, Home as b, HelpCircle as x, Folder as z, HeartOff as E, Heart as L, AlertCircle as R, CalendarDays as V, Pencil as j, Download as X, Trash2 as $, X as q, Check as G, Camera as J, Calendar as K, Paperclip as Q, ArrowRight as W, ArrowLeft as Y, Plus as Z, UserCircle as _ } from "lucide-react";
|
|
5
|
-
import { cn as ee } from "
|
|
5
|
+
import { cn as ee } from "../../../lib/utils.js";
|
|
6
6
|
const re = {
|
|
7
7
|
accountCircle: _,
|
|
8
8
|
add: Z,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { memo as m } from "react";
|
|
3
|
-
import { useDataBinding as i } from "
|
|
4
|
-
import { cn as s } from "
|
|
3
|
+
import { useDataBinding as i } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
5
5
|
const t = {
|
|
6
6
|
contain: "object-contain",
|
|
7
7
|
cover: "object-cover",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import { memo as x } from "react";
|
|
3
|
-
import { useDataBinding as l } from "
|
|
4
|
-
import { cn as r } from "
|
|
3
|
+
import { useDataBinding as l } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { cn as r } from "../../../lib/utils.js";
|
|
5
5
|
const o = {
|
|
6
6
|
h1: "text-3xl font-bold tracking-tight",
|
|
7
7
|
h2: "text-2xl font-semibold tracking-tight",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { memo as i } from "react";
|
|
3
|
-
import { useDataBinding as s } from "
|
|
4
|
-
import { cn as m } from "
|
|
3
|
+
import { useDataBinding as s } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { cn as m } from "../../../lib/utils.js";
|
|
5
5
|
const d = i(function({
|
|
6
6
|
surfaceId: r,
|
|
7
7
|
url: e
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { memo as p, useCallback as s } from "react";
|
|
3
|
-
import { useDispatchAction as c } from "
|
|
4
|
-
import { Button as u } from "
|
|
3
|
+
import { useDispatchAction as c } from "../../hooks/useDispatchAction.js";
|
|
4
|
+
import { Button as u } from "../../../components/ui/button.js";
|
|
5
5
|
import { ComponentRenderer as a } from "../ComponentRenderer.js";
|
|
6
6
|
const f = p(function({
|
|
7
7
|
surfaceId: t,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as p, useCallback as C } from "react";
|
|
3
|
-
import { useDataBinding as d, useFormBinding as x } from "
|
|
4
|
-
import { Checkbox as k } from "
|
|
5
|
-
import { Label as f } from "
|
|
6
|
-
import { cn as b } from "
|
|
3
|
+
import { useDataBinding as d, useFormBinding as x } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { Checkbox as k } from "../../../components/ui/checkbox.js";
|
|
5
|
+
import { Label as f } from "../../../components/ui/label.js";
|
|
6
|
+
import { cn as b } from "../../../lib/utils.js";
|
|
7
7
|
const g = p(function({
|
|
8
8
|
surfaceId: e,
|
|
9
9
|
componentId: m,
|
|
@@ -2,12 +2,12 @@ import { jsx as i, jsxs as f } from "react/jsx-runtime";
|
|
|
2
2
|
import { memo as V, useMemo as l, useCallback as M } from "react";
|
|
3
3
|
import { CalendarIcon as j } from "lucide-react";
|
|
4
4
|
import { parse as p, isValid as P, format as m } from "date-fns";
|
|
5
|
-
import { useFormBinding as B } from "
|
|
6
|
-
import { cn as y } from "
|
|
7
|
-
import { Button as F } from "
|
|
8
|
-
import { Calendar as S } from "
|
|
9
|
-
import { Popover as k, PopoverTrigger as A, PopoverContent as L } from "
|
|
10
|
-
import { Input as g } from "
|
|
5
|
+
import { useFormBinding as B } from "../../hooks/useDataBinding.js";
|
|
6
|
+
import { cn as y } from "../../../lib/utils.js";
|
|
7
|
+
import { Button as F } from "../../../components/ui/button.js";
|
|
8
|
+
import { Calendar as S } from "../../../components/ui/calendar.js";
|
|
9
|
+
import { Popover as k, PopoverTrigger as A, PopoverContent as L } from "../../../components/ui/popover.js";
|
|
10
|
+
import { Input as g } from "../../../components/ui/input.js";
|
|
11
11
|
const U = V(function({
|
|
12
12
|
surfaceId: v,
|
|
13
13
|
componentId: w,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r, jsxs as g, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import { memo as N, useCallback as p } from "react";
|
|
3
|
-
import { useFormBinding as V, useDataBinding as S } from "
|
|
4
|
-
import { Select as F, SelectTrigger as $, SelectValue as j, SelectContent as B, SelectItem as D } from "
|
|
5
|
-
import { Checkbox as L } from "
|
|
6
|
-
import { Label as T } from "
|
|
7
|
-
import { cn as h } from "
|
|
3
|
+
import { useFormBinding as V, useDataBinding as S } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { Select as F, SelectTrigger as $, SelectValue as j, SelectContent as B, SelectItem as D } from "../../../components/ui/select.js";
|
|
5
|
+
import { Checkbox as L } from "../../../components/ui/checkbox.js";
|
|
6
|
+
import { Label as T } from "../../../components/ui/label.js";
|
|
7
|
+
import { cn as h } from "../../../lib/utils.js";
|
|
8
8
|
const A = N(function({
|
|
9
9
|
surfaceId: a,
|
|
10
10
|
componentId: o,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { memo as a, useCallback as c } from "react";
|
|
3
|
-
import { useFormBinding as p } from "
|
|
4
|
-
import { Slider as f } from "
|
|
5
|
-
import { cn as h } from "
|
|
3
|
+
import { useFormBinding as p } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { Slider as f } from "../../../components/ui/slider.js";
|
|
5
|
+
import { cn as h } from "../../../lib/utils.js";
|
|
6
6
|
const u = a(function({
|
|
7
7
|
surfaceId: m,
|
|
8
8
|
value: s,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as T, useCallback as f } from "react";
|
|
3
|
-
import { useDataBinding as g, useFormBinding as h } from "
|
|
4
|
-
import { Input as b } from "
|
|
5
|
-
import { Textarea as C } from "
|
|
6
|
-
import { Label as F } from "
|
|
7
|
-
import { cn as v } from "
|
|
3
|
+
import { useDataBinding as g, useFormBinding as h } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { Input as b } from "../../../components/ui/input.js";
|
|
5
|
+
import { Textarea as C } from "../../../components/ui/textarea.js";
|
|
6
|
+
import { Label as F } from "../../../components/ui/label.js";
|
|
7
|
+
import { cn as v } from "../../../lib/utils.js";
|
|
8
8
|
const y = {
|
|
9
9
|
shortText: "text",
|
|
10
10
|
longText: "text",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { memo as m } from "react";
|
|
3
|
-
import { Card as n, CardContent as t } from "
|
|
3
|
+
import { Card as n, CardContent as t } from "../../../components/ui/card.js";
|
|
4
4
|
import { ComponentRenderer as p } from "../ComponentRenderer.js";
|
|
5
5
|
const a = m(function({
|
|
6
6
|
surfaceId: e,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as u } from "react";
|
|
3
|
-
import { useDataModel as d } from "
|
|
4
|
-
import { cn as y } from "
|
|
5
|
-
import { getValueByPath as j } from "
|
|
3
|
+
import { useDataModel as d } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { cn as y } from "../../../lib/utils.js";
|
|
5
|
+
import { getValueByPath as j } from "../../utils/pathUtils.js";
|
|
6
6
|
import { ComponentRenderer as r } from "../ComponentRenderer.js";
|
|
7
7
|
const v = {
|
|
8
8
|
start: "justify-start",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as d } from "react";
|
|
3
|
-
import { useDataModel as x } from "
|
|
4
|
-
import { cn as u } from "
|
|
5
|
-
import { getValueByPath as v } from "
|
|
3
|
+
import { useDataModel as x } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { cn as u } from "../../../lib/utils.js";
|
|
5
|
+
import { getValueByPath as v } from "../../utils/pathUtils.js";
|
|
6
6
|
import { ComponentRenderer as r } from "../ComponentRenderer.js";
|
|
7
7
|
const L = {
|
|
8
8
|
start: "items-start",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { memo as l, useState as a } from "react";
|
|
3
|
-
import { Dialog as s, DialogTrigger as d, DialogContent as c } from "
|
|
3
|
+
import { Dialog as s, DialogTrigger as d, DialogContent as c } from "../../../components/ui/dialog.js";
|
|
4
4
|
import { ComponentRenderer as t } from "../ComponentRenderer.js";
|
|
5
5
|
const f = l(function({
|
|
6
6
|
surfaceId: e,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as l } from "react";
|
|
3
|
-
import { useDataModel as u } from "
|
|
4
|
-
import { cn as y } from "
|
|
5
|
-
import { getValueByPath as j } from "
|
|
3
|
+
import { useDataModel as u } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { cn as y } from "../../../lib/utils.js";
|
|
5
|
+
import { getValueByPath as j } from "../../utils/pathUtils.js";
|
|
6
6
|
import { ComponentRenderer as r } from "../ComponentRenderer.js";
|
|
7
7
|
const v = {
|
|
8
8
|
start: "justify-start",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as a, jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import { memo as d } from "react";
|
|
3
|
-
import { useDataBinding as m } from "
|
|
4
|
-
import { Tabs as p, TabsList as s, TabsTrigger as T, TabsContent as h } from "
|
|
3
|
+
import { useDataBinding as m } from "../../hooks/useDataBinding.js";
|
|
4
|
+
import { Tabs as p, TabsList as s, TabsTrigger as T, TabsContent as h } from "../../../components/ui/tabs.js";
|
|
5
5
|
import { ComponentRenderer as u } from "../ComponentRenderer.js";
|
|
6
6
|
const f = d(function({
|
|
7
7
|
surfaceId: r,
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { useDataModelContext as
|
|
3
|
-
import { resolveValue as
|
|
1
|
+
import { useMemo as i } from "react";
|
|
2
|
+
import { useDataModelContext as l } from "../contexts/DataModelContext.js";
|
|
3
|
+
import { resolveValue as m } from "../utils/dataBinding.js";
|
|
4
4
|
function s(n, t, o) {
|
|
5
|
-
const { getDataModel: e } =
|
|
6
|
-
return
|
|
5
|
+
const { getDataModel: e } = l();
|
|
6
|
+
return i(() => {
|
|
7
7
|
const a = e(n);
|
|
8
|
-
return
|
|
8
|
+
return m(t, a, o);
|
|
9
9
|
}, [e, n, t, o]);
|
|
10
10
|
}
|
|
11
|
+
function u(n) {
|
|
12
|
+
const { getDataModel: t } = l();
|
|
13
|
+
return i(() => t(n), [t, n]);
|
|
14
|
+
}
|
|
11
15
|
function h(n, t, o) {
|
|
12
|
-
const { getDataModel: e, setDataValue: a } =
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
}, [e, n, t, o]),
|
|
16
|
-
t && "path" in t && a(n, t.path,
|
|
16
|
+
const { getDataModel: e, setDataValue: a } = l(), M = i(() => {
|
|
17
|
+
const r = e(n);
|
|
18
|
+
return m(t, r, o);
|
|
19
|
+
}, [e, n, t, o]), D = i(() => (r) => {
|
|
20
|
+
t && "path" in t && a(n, t.path, r);
|
|
17
21
|
}, [a, n, t]);
|
|
18
|
-
return [
|
|
22
|
+
return [M, D];
|
|
19
23
|
}
|
|
20
24
|
export {
|
|
21
25
|
s as useDataBinding,
|
|
26
|
+
u as useDataModel,
|
|
22
27
|
h as useFormBinding
|
|
23
28
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as a } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as s } from "class-variance-authority";
|
|
4
|
+
import { cn as d } from "../../lib/utils.js";
|
|
5
|
+
const u = s(
|
|
6
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
12
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
14
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
15
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
19
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
20
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
21
|
+
icon: "size-9",
|
|
22
|
+
"icon-sm": "size-8",
|
|
23
|
+
"icon-lg": "size-10"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
function b({
|
|
33
|
+
className: t,
|
|
34
|
+
variant: e = "default",
|
|
35
|
+
size: r = "default",
|
|
36
|
+
asChild: i = !1,
|
|
37
|
+
...n
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ o(
|
|
40
|
+
i ? a : "button",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "button",
|
|
43
|
+
"data-variant": e,
|
|
44
|
+
"data-size": r,
|
|
45
|
+
className: d(u({ variant: e, size: r, className: t })),
|
|
46
|
+
...n
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
b as Button,
|
|
52
|
+
u as buttonVariants
|
|
53
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { ChevronLeftIcon as b, ChevronRightIcon as h, ChevronDownIcon as w } from "lucide-react";
|
|
4
|
+
import { getDefaultClassNames as p, DayPicker as _ } from "react-day-picker";
|
|
5
|
+
import { cn as e } from "../../lib/utils.js";
|
|
6
|
+
import { buttonVariants as f, Button as y } from "./button.js";
|
|
7
|
+
function j({
|
|
8
|
+
className: c,
|
|
9
|
+
classNames: i,
|
|
10
|
+
showOutsideDays: r = !0,
|
|
11
|
+
captionLayout: l = "label",
|
|
12
|
+
buttonVariant: s = "ghost",
|
|
13
|
+
formatters: u,
|
|
14
|
+
components: x,
|
|
15
|
+
...g
|
|
16
|
+
}) {
|
|
17
|
+
const t = p();
|
|
18
|
+
return /* @__PURE__ */ n(
|
|
19
|
+
_,
|
|
20
|
+
{
|
|
21
|
+
showOutsideDays: r,
|
|
22
|
+
className: e(
|
|
23
|
+
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
24
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
25
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
26
|
+
c
|
|
27
|
+
),
|
|
28
|
+
captionLayout: l,
|
|
29
|
+
formatters: {
|
|
30
|
+
formatMonthDropdown: (a) => a.toLocaleString("default", { month: "short" }),
|
|
31
|
+
...u
|
|
32
|
+
},
|
|
33
|
+
classNames: {
|
|
34
|
+
root: e("w-fit", t.root),
|
|
35
|
+
months: e(
|
|
36
|
+
"flex gap-4 flex-col md:flex-row relative",
|
|
37
|
+
t.months
|
|
38
|
+
),
|
|
39
|
+
month: e("flex flex-col w-full gap-4", t.month),
|
|
40
|
+
nav: e(
|
|
41
|
+
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
42
|
+
t.nav
|
|
43
|
+
),
|
|
44
|
+
button_previous: e(
|
|
45
|
+
f({ variant: s }),
|
|
46
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
47
|
+
t.button_previous
|
|
48
|
+
),
|
|
49
|
+
button_next: e(
|
|
50
|
+
f({ variant: s }),
|
|
51
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
52
|
+
t.button_next
|
|
53
|
+
),
|
|
54
|
+
month_caption: e(
|
|
55
|
+
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
56
|
+
t.month_caption
|
|
57
|
+
),
|
|
58
|
+
dropdowns: e(
|
|
59
|
+
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
60
|
+
t.dropdowns
|
|
61
|
+
),
|
|
62
|
+
dropdown_root: e(
|
|
63
|
+
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
64
|
+
t.dropdown_root
|
|
65
|
+
),
|
|
66
|
+
dropdown: e(
|
|
67
|
+
"absolute bg-popover inset-0 opacity-0",
|
|
68
|
+
t.dropdown
|
|
69
|
+
),
|
|
70
|
+
caption_label: e(
|
|
71
|
+
"select-none font-medium",
|
|
72
|
+
l === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
73
|
+
t.caption_label
|
|
74
|
+
),
|
|
75
|
+
table: "w-full border-collapse",
|
|
76
|
+
weekdays: e("flex", t.weekdays),
|
|
77
|
+
weekday: e(
|
|
78
|
+
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
79
|
+
t.weekday
|
|
80
|
+
),
|
|
81
|
+
week: e("flex w-full mt-2", t.week),
|
|
82
|
+
week_number_header: e(
|
|
83
|
+
"select-none w-(--cell-size)",
|
|
84
|
+
t.week_number_header
|
|
85
|
+
),
|
|
86
|
+
week_number: e(
|
|
87
|
+
"text-[0.8rem] select-none text-muted-foreground",
|
|
88
|
+
t.week_number
|
|
89
|
+
),
|
|
90
|
+
day: e(
|
|
91
|
+
"relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
92
|
+
g.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
93
|
+
t.day
|
|
94
|
+
),
|
|
95
|
+
range_start: e(
|
|
96
|
+
"rounded-l-md bg-accent",
|
|
97
|
+
t.range_start
|
|
98
|
+
),
|
|
99
|
+
range_middle: e("rounded-none", t.range_middle),
|
|
100
|
+
range_end: e("rounded-r-md bg-accent", t.range_end),
|
|
101
|
+
today: e(
|
|
102
|
+
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
103
|
+
t.today
|
|
104
|
+
),
|
|
105
|
+
outside: e(
|
|
106
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
107
|
+
t.outside
|
|
108
|
+
),
|
|
109
|
+
disabled: e(
|
|
110
|
+
"text-muted-foreground opacity-50",
|
|
111
|
+
t.disabled
|
|
112
|
+
),
|
|
113
|
+
hidden: e("invisible", t.hidden),
|
|
114
|
+
...i
|
|
115
|
+
},
|
|
116
|
+
components: {
|
|
117
|
+
Root: ({ className: a, rootRef: d, ...o }) => /* @__PURE__ */ n(
|
|
118
|
+
"div",
|
|
119
|
+
{
|
|
120
|
+
"data-slot": "calendar",
|
|
121
|
+
ref: d,
|
|
122
|
+
className: e(a),
|
|
123
|
+
...o
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
Chevron: ({ className: a, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n(b, { className: e("size-4", a), ...o }) : d === "right" ? /* @__PURE__ */ n(
|
|
127
|
+
h,
|
|
128
|
+
{
|
|
129
|
+
className: e("size-4", a),
|
|
130
|
+
...o
|
|
131
|
+
}
|
|
132
|
+
) : /* @__PURE__ */ n(w, { className: e("size-4", a), ...o }),
|
|
133
|
+
DayButton: v,
|
|
134
|
+
WeekNumber: ({ children: a, ...d }) => /* @__PURE__ */ n("td", { ...d, children: /* @__PURE__ */ n("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: a }) }),
|
|
135
|
+
...x
|
|
136
|
+
},
|
|
137
|
+
...g
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function v({
|
|
142
|
+
className: c,
|
|
143
|
+
day: i,
|
|
144
|
+
modifiers: r,
|
|
145
|
+
...l
|
|
146
|
+
}) {
|
|
147
|
+
const s = p(), u = m.useRef(null);
|
|
148
|
+
return m.useEffect(() => {
|
|
149
|
+
r.focused && u.current?.focus();
|
|
150
|
+
}, [r.focused]), /* @__PURE__ */ n(
|
|
151
|
+
y,
|
|
152
|
+
{
|
|
153
|
+
ref: u,
|
|
154
|
+
variant: "ghost",
|
|
155
|
+
size: "icon",
|
|
156
|
+
"data-day": i.date.toLocaleDateString(),
|
|
157
|
+
"data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
|
|
158
|
+
"data-range-start": r.range_start,
|
|
159
|
+
"data-range-end": r.range_end,
|
|
160
|
+
"data-range-middle": r.range_middle,
|
|
161
|
+
className: e(
|
|
162
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
163
|
+
s.day,
|
|
164
|
+
c
|
|
165
|
+
),
|
|
166
|
+
...l
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
export {
|
|
171
|
+
j as Calendar,
|
|
172
|
+
v as CalendarDayButton
|
|
173
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as a } from "../../lib/utils.js";
|
|
3
|
+
function n({ className: r, ...o }) {
|
|
4
|
+
return /* @__PURE__ */ t(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "card",
|
|
8
|
+
className: a(
|
|
9
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
10
|
+
r
|
|
11
|
+
),
|
|
12
|
+
...o
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function c({ className: r, ...o }) {
|
|
17
|
+
return /* @__PURE__ */ t(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "card-content",
|
|
21
|
+
className: a("px-6", r),
|
|
22
|
+
...o
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
n as Card,
|
|
28
|
+
c as CardContent
|
|
29
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "@radix-ui/react-checkbox";
|
|
3
|
+
import { CheckIcon as t } from "lucide-react";
|
|
4
|
+
import { cn as o } from "../../lib/utils.js";
|
|
5
|
+
function s({
|
|
6
|
+
className: i,
|
|
7
|
+
...a
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ r(
|
|
10
|
+
e.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "checkbox",
|
|
13
|
+
className: o(
|
|
14
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
i
|
|
16
|
+
),
|
|
17
|
+
...a,
|
|
18
|
+
children: /* @__PURE__ */ r(
|
|
19
|
+
e.Indicator,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "checkbox-indicator",
|
|
22
|
+
className: "grid place-content-center text-current transition-none",
|
|
23
|
+
children: /* @__PURE__ */ r(t, { className: "size-3.5" })
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
s as Checkbox
|
|
31
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-dialog";
|
|
3
|
+
import { XIcon as l } from "lucide-react";
|
|
4
|
+
import { cn as i } from "../../lib/utils.js";
|
|
5
|
+
function m({
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ a(o.Root, { "data-slot": "dialog", ...t });
|
|
9
|
+
}
|
|
10
|
+
function p({
|
|
11
|
+
...t
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ a(o.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
14
|
+
}
|
|
15
|
+
function d({
|
|
16
|
+
...t
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ a(o.Portal, { "data-slot": "dialog-portal", ...t });
|
|
19
|
+
}
|
|
20
|
+
function g({
|
|
21
|
+
className: t,
|
|
22
|
+
...e
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ a(
|
|
25
|
+
o.Overlay,
|
|
26
|
+
{
|
|
27
|
+
"data-slot": "dialog-overlay",
|
|
28
|
+
className: i(
|
|
29
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
30
|
+
t
|
|
31
|
+
),
|
|
32
|
+
...e
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function v({
|
|
37
|
+
className: t,
|
|
38
|
+
children: e,
|
|
39
|
+
showCloseButton: s = !0,
|
|
40
|
+
...r
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */ n(d, { "data-slot": "dialog-portal", children: [
|
|
43
|
+
/* @__PURE__ */ a(g, {}),
|
|
44
|
+
/* @__PURE__ */ n(
|
|
45
|
+
o.Content,
|
|
46
|
+
{
|
|
47
|
+
"data-slot": "dialog-content",
|
|
48
|
+
className: i(
|
|
49
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
|
|
50
|
+
t
|
|
51
|
+
),
|
|
52
|
+
...r,
|
|
53
|
+
children: [
|
|
54
|
+
e,
|
|
55
|
+
s && /* @__PURE__ */ n(
|
|
56
|
+
o.Close,
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "dialog-close",
|
|
59
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ a(l, {}),
|
|
62
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
m as Dialog,
|
|
73
|
+
v as DialogContent,
|
|
74
|
+
g as DialogOverlay,
|
|
75
|
+
d as DialogPortal,
|
|
76
|
+
p as DialogTrigger
|
|
77
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../../lib/utils.js";
|
|
3
|
+
function a({ className: e, type: i, ...r }) {
|
|
4
|
+
return /* @__PURE__ */ t(
|
|
5
|
+
"input",
|
|
6
|
+
{
|
|
7
|
+
type: i,
|
|
8
|
+
"data-slot": "input",
|
|
9
|
+
className: n(
|
|
10
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
11
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
12
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...r
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
a as Input
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "@radix-ui/react-label";
|
|
3
|
+
import { cn as r } from "../../lib/utils.js";
|
|
4
|
+
function l({
|
|
5
|
+
className: e,
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
a.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "label",
|
|
12
|
+
className: r(
|
|
13
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
14
|
+
e
|
|
15
|
+
),
|
|
16
|
+
...t
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
l as Label
|
|
22
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "@radix-ui/react-popover";
|
|
3
|
+
import { cn as n } from "../../lib/utils.js";
|
|
4
|
+
function s({
|
|
5
|
+
...o
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ t(e.Root, { "data-slot": "popover", ...o });
|
|
8
|
+
}
|
|
9
|
+
function m({
|
|
10
|
+
...o
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ t(e.Trigger, { "data-slot": "popover-trigger", ...o });
|
|
13
|
+
}
|
|
14
|
+
function f({
|
|
15
|
+
className: o,
|
|
16
|
+
align: r = "center",
|
|
17
|
+
sideOffset: a = 4,
|
|
18
|
+
...i
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ t(
|
|
21
|
+
e.Content,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "popover-content",
|
|
24
|
+
align: r,
|
|
25
|
+
sideOffset: a,
|
|
26
|
+
className: n(
|
|
27
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
28
|
+
o
|
|
29
|
+
),
|
|
30
|
+
...i
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
s as Popover,
|
|
36
|
+
f as PopoverContent,
|
|
37
|
+
m as PopoverTrigger
|
|
38
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "@radix-ui/react-select";
|
|
3
|
+
import { ChevronDownIcon as l, CheckIcon as c, ChevronUpIcon as u } from "lucide-react";
|
|
4
|
+
import { cn as o } from "../../lib/utils.js";
|
|
5
|
+
function h({
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(a.Root, { "data-slot": "select", ...t });
|
|
9
|
+
}
|
|
10
|
+
function x({
|
|
11
|
+
...t
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ e(a.Value, { "data-slot": "select-value", ...t });
|
|
14
|
+
}
|
|
15
|
+
function b({
|
|
16
|
+
className: t,
|
|
17
|
+
size: s = "default",
|
|
18
|
+
children: r,
|
|
19
|
+
...n
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ i(
|
|
22
|
+
a.Trigger,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "select-trigger",
|
|
25
|
+
"data-size": s,
|
|
26
|
+
className: o(
|
|
27
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
28
|
+
t
|
|
29
|
+
),
|
|
30
|
+
...n,
|
|
31
|
+
children: [
|
|
32
|
+
r,
|
|
33
|
+
/* @__PURE__ */ e(a.Icon, { asChild: !0, children: /* @__PURE__ */ e(l, { className: "size-4 opacity-50" }) })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function w({
|
|
39
|
+
className: t,
|
|
40
|
+
children: s,
|
|
41
|
+
position: r = "item-aligned",
|
|
42
|
+
align: n = "center",
|
|
43
|
+
...d
|
|
44
|
+
}) {
|
|
45
|
+
return /* @__PURE__ */ e(a.Portal, { children: /* @__PURE__ */ i(
|
|
46
|
+
a.Content,
|
|
47
|
+
{
|
|
48
|
+
"data-slot": "select-content",
|
|
49
|
+
className: o(
|
|
50
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
51
|
+
r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
52
|
+
t
|
|
53
|
+
),
|
|
54
|
+
position: r,
|
|
55
|
+
align: n,
|
|
56
|
+
...d,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ e(m, {}),
|
|
59
|
+
/* @__PURE__ */ e(
|
|
60
|
+
a.Viewport,
|
|
61
|
+
{
|
|
62
|
+
className: o(
|
|
63
|
+
"p-1",
|
|
64
|
+
r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
65
|
+
),
|
|
66
|
+
children: s
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ e(p, {})
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
) });
|
|
73
|
+
}
|
|
74
|
+
function y({
|
|
75
|
+
className: t,
|
|
76
|
+
children: s,
|
|
77
|
+
...r
|
|
78
|
+
}) {
|
|
79
|
+
return /* @__PURE__ */ i(
|
|
80
|
+
a.Item,
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "select-item",
|
|
83
|
+
className: o(
|
|
84
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
85
|
+
t
|
|
86
|
+
),
|
|
87
|
+
...r,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ e(
|
|
90
|
+
"span",
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "select-item-indicator",
|
|
93
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
94
|
+
children: /* @__PURE__ */ e(a.ItemIndicator, { children: /* @__PURE__ */ e(c, { className: "size-4" }) })
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ e(a.ItemText, { children: s })
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function m({
|
|
103
|
+
className: t,
|
|
104
|
+
...s
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */ e(
|
|
107
|
+
a.ScrollUpButton,
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "select-scroll-up-button",
|
|
110
|
+
className: o(
|
|
111
|
+
"flex cursor-default items-center justify-center py-1",
|
|
112
|
+
t
|
|
113
|
+
),
|
|
114
|
+
...s,
|
|
115
|
+
children: /* @__PURE__ */ e(u, { className: "size-4" })
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function p({
|
|
120
|
+
className: t,
|
|
121
|
+
...s
|
|
122
|
+
}) {
|
|
123
|
+
return /* @__PURE__ */ e(
|
|
124
|
+
a.ScrollDownButton,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "select-scroll-down-button",
|
|
127
|
+
className: o(
|
|
128
|
+
"flex cursor-default items-center justify-center py-1",
|
|
129
|
+
t
|
|
130
|
+
),
|
|
131
|
+
...s,
|
|
132
|
+
children: /* @__PURE__ */ e(l, { className: "size-4" })
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
h as Select,
|
|
138
|
+
w as SelectContent,
|
|
139
|
+
y as SelectItem,
|
|
140
|
+
p as SelectScrollDownButton,
|
|
141
|
+
m as SelectScrollUpButton,
|
|
142
|
+
b as SelectTrigger,
|
|
143
|
+
x as SelectValue
|
|
144
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "@radix-ui/react-separator";
|
|
3
|
+
import { cn as e } from "../../lib/utils.js";
|
|
4
|
+
function m({
|
|
5
|
+
className: t,
|
|
6
|
+
orientation: o = "horizontal",
|
|
7
|
+
decorative: r = !0,
|
|
8
|
+
...a
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ i(
|
|
11
|
+
n.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "separator",
|
|
14
|
+
decorative: r,
|
|
15
|
+
orientation: o,
|
|
16
|
+
className: e(
|
|
17
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
18
|
+
t
|
|
19
|
+
),
|
|
20
|
+
...a
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
m as Separator
|
|
26
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import * as a from "@radix-ui/react-slider";
|
|
4
|
+
import { cn as n } from "../../lib/utils.js";
|
|
5
|
+
function v({
|
|
6
|
+
className: l,
|
|
7
|
+
defaultValue: r,
|
|
8
|
+
value: t,
|
|
9
|
+
min: i = 0,
|
|
10
|
+
max: o = 100,
|
|
11
|
+
...s
|
|
12
|
+
}) {
|
|
13
|
+
const d = m.useMemo(
|
|
14
|
+
() => Array.isArray(t) ? t : Array.isArray(r) ? r : [i, o],
|
|
15
|
+
[t, r, i, o]
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ h(
|
|
18
|
+
a.Root,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "slider",
|
|
21
|
+
defaultValue: r,
|
|
22
|
+
value: t,
|
|
23
|
+
min: i,
|
|
24
|
+
max: o,
|
|
25
|
+
className: n(
|
|
26
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
27
|
+
l
|
|
28
|
+
),
|
|
29
|
+
...s,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ e(
|
|
32
|
+
a.Track,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "slider-track",
|
|
35
|
+
className: n(
|
|
36
|
+
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
37
|
+
),
|
|
38
|
+
children: /* @__PURE__ */ e(
|
|
39
|
+
a.Range,
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "slider-range",
|
|
42
|
+
className: n(
|
|
43
|
+
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
Array.from({ length: d.length }, (f, c) => /* @__PURE__ */ e(
|
|
50
|
+
a.Thumb,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "slider-thumb",
|
|
53
|
+
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
54
|
+
},
|
|
55
|
+
c
|
|
56
|
+
))
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
v as Slider
|
|
63
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "@radix-ui/react-tabs";
|
|
3
|
+
import { cn as i } from "../../lib/utils.js";
|
|
4
|
+
function o({
|
|
5
|
+
className: t,
|
|
6
|
+
...e
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ a(
|
|
9
|
+
s.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "tabs",
|
|
12
|
+
className: i("flex flex-col gap-2", t),
|
|
13
|
+
...e
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function d({
|
|
18
|
+
className: t,
|
|
19
|
+
...e
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ a(
|
|
22
|
+
s.List,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "tabs-list",
|
|
25
|
+
className: i(
|
|
26
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
27
|
+
t
|
|
28
|
+
),
|
|
29
|
+
...e
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function c({
|
|
34
|
+
className: t,
|
|
35
|
+
...e
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ a(
|
|
38
|
+
s.Trigger,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "tabs-trigger",
|
|
41
|
+
className: i(
|
|
42
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
43
|
+
t
|
|
44
|
+
),
|
|
45
|
+
...e
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
function l({
|
|
50
|
+
className: t,
|
|
51
|
+
...e
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ a(
|
|
54
|
+
s.Content,
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "tabs-content",
|
|
57
|
+
className: i("flex-1 outline-none", t),
|
|
58
|
+
...e
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
o as Tabs,
|
|
64
|
+
l as TabsContent,
|
|
65
|
+
d as TabsList,
|
|
66
|
+
c as TabsTrigger
|
|
67
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../lib/utils.js";
|
|
3
|
+
function n({ className: r, ...e }) {
|
|
4
|
+
return /* @__PURE__ */ i(
|
|
5
|
+
"textarea",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "textarea",
|
|
8
|
+
className: t(
|
|
9
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
10
|
+
r
|
|
11
|
+
),
|
|
12
|
+
...e
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
n as Textarea
|
|
18
|
+
};
|