@siyahi/ui 0.1.9-next.34 → 0.1.9-next.36
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/DESIGN.md +43 -26
- package/README.md +12 -14
- package/THIRD_PARTY_NOTICES.md +10 -11
- package/agents/examples/app-sidebar.tsx +0 -2
- package/agents/examples/chart-panels.tsx +0 -4
- package/agents/examples/{section-cards-select.tsx → metric-strip-select.tsx} +5 -5
- package/agents/examples/metric-strip-trend.tsx +33 -0
- package/agents/examples/overview-dashboard.tsx +4 -4
- package/agents/examples/scatter-chart.tsx +0 -1
- package/agents/examples/stale-blocks.tsx +9 -9
- package/agents/examples/surfaces.tsx +2 -3
- package/agents/manifest.json +27 -49
- package/dist/components/registry/dashboardcn/kpi-row-card.d.ts +14 -6
- package/dist/components/registry/dashboardcn/kpi-row-card.js +49 -32
- package/dist/components/registry/niko-table/core/data-table-error-boundary.js +1 -1
- package/dist/components/registry/niko-table/filters/table-faceted-filter.js +2 -2
- package/dist/components/siyahi/panel-grid.d.ts +5 -6
- package/dist/components/siyahi/panel-grid.js +10 -9
- package/dist/components/siyahi/scatter-chart.d.ts +3 -3
- package/dist/components/siyahi/scatter-chart.js +6 -3
- package/dist/components/siyahi/siyahi-provider.d.ts +5 -6
- package/dist/components/siyahi/siyahi-provider.js +1 -1
- package/dist/components/siyahi/status-badge.js +1 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +94 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.js +104 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.js +73 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/carousel.d.ts +30 -0
- package/dist/components/ui/carousel.js +131 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +20 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +162 -0
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +1 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +123 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.js +59 -0
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.js +36 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +46 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.js +121 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +19 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.js +43 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +136 -0
- package/dist/components/ui/message-scroller.d.ts +12 -0
- package/dist/components/ui/message-scroller.js +60 -0
- package/dist/components/ui/message.d.ts +12 -0
- package/dist/components/ui/message.js +49 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +38 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +82 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +80 -0
- package/dist/components/ui/questionnaire.d.ts +21 -0
- package/dist/components/ui/questionnaire.js +170 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +26 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.js +28 -0
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +15 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +123 -0
- package/dist/components/ui/trace.d.ts +20 -0
- package/dist/components/ui/trace.js +75 -0
- package/dist/index.d.ts +32 -3
- package/dist/index.js +35 -5
- package/dist/lib/chart-frame.d.ts +1 -1
- package/dist/lib/chart-frame.js +3 -1
- package/dist/lib/chart-series.d.ts +10 -2
- package/dist/lib/chart-series.js +10 -0
- package/package.json +5 -3
- package/registry.lock.json +0 -8
- package/styles/siyahi.css +257 -109
- package/agents/examples/section-cards-trend.tsx +0 -32
- package/agents/examples/section-cards.tsx +0 -48
- package/agents/report-rules.json +0 -7
- package/dist/components/registry/dashboard-01/section-cards.d.ts +0 -30
- package/dist/components/registry/dashboard-01/section-cards.js +0 -74
- package/report.css +0 -146
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { buttonVariants } from "./button.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import "react";
|
|
7
|
+
import { Questionnaire as Questionnaire$1 } from "@shadcn/react/questionnaire";
|
|
8
|
+
//#region src/components/ui/questionnaire.tsx
|
|
9
|
+
function Questionnaire({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Root, {
|
|
11
|
+
"data-slot": "questionnaire",
|
|
12
|
+
className: cn("flex w-full min-w-0 flex-col gap-4", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function QuestionnaireProgress({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Progress, {
|
|
18
|
+
"data-slot": "questionnaire-progress",
|
|
19
|
+
className: cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function QuestionnaireItem({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Item, {
|
|
25
|
+
"data-slot": "questionnaire-item",
|
|
26
|
+
className: cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function QuestionnaireTitle({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Title, {
|
|
32
|
+
"data-slot": "questionnaire-title",
|
|
33
|
+
className: cn("font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function QuestionnaireDescription({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Description, {
|
|
39
|
+
"data-slot": "questionnaire-description",
|
|
40
|
+
className: cn("text-sm text-pretty text-muted-foreground", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function QuestionnaireChoices({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Choices, {
|
|
46
|
+
"data-slot": "questionnaire-choices",
|
|
47
|
+
className: cn("group/questionnaire-choices grid min-w-0 gap-2", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function QuestionnaireChoice({ children, className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(Questionnaire$1.Choice, {
|
|
53
|
+
"data-slot": "questionnaire-choice",
|
|
54
|
+
className: cn("group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
55
|
+
...props,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceInput, {
|
|
58
|
+
"data-slot": "questionnaire-choice-input",
|
|
59
|
+
className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsxs("span", {
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
"data-slot": "questionnaire-choice-indicator",
|
|
64
|
+
className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
|
|
65
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
66
|
+
"data-slot": "questionnaire-choice-indicator-dot",
|
|
67
|
+
className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
|
|
68
|
+
}), /* @__PURE__ */ jsx(CheckIcon, {
|
|
69
|
+
"data-slot": "questionnaire-choice-indicator-check",
|
|
70
|
+
className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
|
|
71
|
+
})]
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceLabel, {
|
|
74
|
+
"data-slot": "questionnaire-choice-label",
|
|
75
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
|
|
76
|
+
children
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceShortcut, {
|
|
79
|
+
"data-slot": "questionnaire-choice-shortcut",
|
|
80
|
+
className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function QuestionnaireChoiceDescription({ className, ...props }) {
|
|
86
|
+
return /* @__PURE__ */ jsx("span", {
|
|
87
|
+
"data-slot": "questionnaire-choice-description",
|
|
88
|
+
className: cn("text-muted-foreground", className),
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function QuestionnaireInput({ className, ...props }) {
|
|
93
|
+
return /* @__PURE__ */ jsx("div", {
|
|
94
|
+
"data-slot": "questionnaire-input-wrapper",
|
|
95
|
+
className: "group/questionnaire-input relative w-full min-w-0",
|
|
96
|
+
children: /* @__PURE__ */ jsx(Questionnaire$1.Input, {
|
|
97
|
+
"data-slot": "questionnaire-input",
|
|
98
|
+
className: cn("h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", className),
|
|
99
|
+
...props
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function QuestionnaireError({ className, ...props }) {
|
|
104
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Error, {
|
|
105
|
+
"data-slot": "questionnaire-error",
|
|
106
|
+
className: cn("mt-2 text-sm text-destructive", className),
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function QuestionnaireActions({ className, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx("div", {
|
|
112
|
+
"data-slot": "questionnaire-actions",
|
|
113
|
+
className: cn("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", className),
|
|
114
|
+
...props
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function QuestionnairePrevious({ children, className, size = "default", variant = "outline", ...props }) {
|
|
118
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Previous, {
|
|
119
|
+
"data-slot": "questionnaire-previous",
|
|
120
|
+
"data-size": size,
|
|
121
|
+
"data-variant": variant,
|
|
122
|
+
className: cn(buttonVariants({
|
|
123
|
+
size,
|
|
124
|
+
variant
|
|
125
|
+
}), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", className),
|
|
126
|
+
...props,
|
|
127
|
+
children: children ?? "Previous"
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function QuestionnaireSkip({ children, className, size = "default", variant = "outline", ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Skip, {
|
|
132
|
+
"data-slot": "questionnaire-skip",
|
|
133
|
+
"data-size": size,
|
|
134
|
+
"data-variant": variant,
|
|
135
|
+
className: cn(buttonVariants({
|
|
136
|
+
size,
|
|
137
|
+
variant
|
|
138
|
+
}), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
139
|
+
...props,
|
|
140
|
+
children: children ?? "Skip"
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function QuestionnaireNext({ children, className, size = "default", variant = "default", ...props }) {
|
|
144
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Next, {
|
|
145
|
+
"data-slot": "questionnaire-next",
|
|
146
|
+
"data-size": size,
|
|
147
|
+
"data-variant": variant,
|
|
148
|
+
className: cn(buttonVariants({
|
|
149
|
+
size,
|
|
150
|
+
variant
|
|
151
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
152
|
+
...props,
|
|
153
|
+
children: children ?? "Next"
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function QuestionnaireSubmit({ children, className, size = "default", variant = "default", ...props }) {
|
|
157
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Submit, {
|
|
158
|
+
"data-slot": "questionnaire-submit",
|
|
159
|
+
"data-size": size,
|
|
160
|
+
"data-variant": variant,
|
|
161
|
+
className: cn(buttonVariants({
|
|
162
|
+
size,
|
|
163
|
+
variant
|
|
164
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
165
|
+
...props,
|
|
166
|
+
children: children ?? "Submit"
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
export { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Radio } from "@base-ui/react/radio";
|
|
2
|
+
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
3
|
+
//#region src/components/ui/radio-group.d.ts
|
|
4
|
+
declare function RadioGroup({ className, ...props }: RadioGroup$1.Props): import("react").JSX.Element;
|
|
5
|
+
declare function RadioGroupItem({ className, ...props }: Radio.Root.Props): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Radio } from "@base-ui/react/radio";
|
|
4
|
+
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
5
|
+
//#region src/components/ui/radio-group.tsx
|
|
6
|
+
function RadioGroup({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
8
|
+
"data-slot": "radio-group",
|
|
9
|
+
className: cn("grid w-full gap-2", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function RadioGroupItem({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
15
|
+
"data-slot": "radio-group-item",
|
|
16
|
+
className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", className),
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {
|
|
19
|
+
"data-slot": "radio-group-indicator",
|
|
20
|
+
className: "flex size-4 items-center justify-center",
|
|
21
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
//#region src/components/ui/resizable.d.ts
|
|
3
|
+
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react").JSX.Element;
|
|
4
|
+
declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react").JSX.Element;
|
|
5
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
|
|
6
|
+
withHandle?: boolean;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
5
|
+
//#region src/components/ui/resizable.tsx
|
|
6
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Group, {
|
|
8
|
+
"data-slot": "resizable-panel-group",
|
|
9
|
+
className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function ResizablePanel({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
|
|
15
|
+
"data-slot": "resizable-panel",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
|
|
21
|
+
"data-slot": "resizable-handle",
|
|
22
|
+
className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
|
-
import { Input } from "./input.js";
|
|
3
2
|
import { Separator } from "./separator.js";
|
|
3
|
+
import { Input } from "./input.js";
|
|
4
4
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.js";
|
|
5
5
|
import { useIsMobile } from "../../hooks/use-mobile.js";
|
|
6
6
|
import { Skeleton } from "./skeleton.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { Loader2Icon } from "lucide-react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/spinner.tsx
|
|
5
|
+
function Spinner({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Loader2Icon, {
|
|
7
|
+
"data-slot": "spinner",
|
|
8
|
+
role: "status",
|
|
9
|
+
"aria-label": "Loading",
|
|
10
|
+
className: cn("size-4 animate-spin", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Spinner };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
2
|
+
//#region src/components/ui/switch.d.ts
|
|
3
|
+
declare function Switch({ className, size, ...props }: Switch$1.Root.Props & {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Switch };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
5
|
+
//#region src/components/ui/switch.tsx
|
|
6
|
+
function Switch({ className, size = "default", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
8
|
+
"data-slot": "switch",
|
|
9
|
+
"data-size": size,
|
|
10
|
+
className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
13
|
+
"data-slot": "switch-thumb",
|
|
14
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Switch };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Toast as Toast$1 } from "@base-ui/react/toast";
|
|
3
|
+
//#region src/components/ui/toast.d.ts
|
|
4
|
+
declare const toast: import("@base-ui/react").ToastManager<any>;
|
|
5
|
+
declare function ToastProvider({ ...props }: Toast$1.Provider.Props): React$1.JSX.Element;
|
|
6
|
+
declare function ToastPortal({ ...props }: Toast$1.Portal.Props): React$1.JSX.Element;
|
|
7
|
+
declare function ToastViewport({ className, ...props }: Toast$1.Viewport.Props): React$1.JSX.Element;
|
|
8
|
+
declare function Toast({ className, ...props }: Toast$1.Root.Props): React$1.JSX.Element;
|
|
9
|
+
declare function ToastContent({ className, ...props }: Toast$1.Content.Props): React$1.JSX.Element;
|
|
10
|
+
declare function ToastTitle({ className, ...props }: Toast$1.Title.Props): React$1.JSX.Element;
|
|
11
|
+
declare function ToastDescription({ className, ...props }: Toast$1.Description.Props): React$1.JSX.Element;
|
|
12
|
+
declare function ToastAction({ className, render, ...props }: Toast$1.Action.Props): React$1.JSX.Element;
|
|
13
|
+
declare function ToastClose({ className, children, render, ...props }: Toast$1.Close.Props): React$1.JSX.Element;
|
|
14
|
+
declare function Toaster({ children, toastManager, ...props }: Toast$1.Provider.Props): React$1.JSX.Element;
|
|
15
|
+
declare const createToastManager: typeof Toast$1.createToastManager;
|
|
16
|
+
declare const useToastManager: typeof Toast$1.useToastManager;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, createToastManager, toast, useToastManager };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import "react";
|
|
7
|
+
import { Toast as Toast$1 } from "@base-ui/react/toast";
|
|
8
|
+
//#region src/components/ui/toast.tsx
|
|
9
|
+
const toast = Toast$1.createToastManager();
|
|
10
|
+
function ToastProvider({ ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Toast$1.Provider, { ...props });
|
|
12
|
+
}
|
|
13
|
+
function ToastPortal({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Toast$1.Portal, {
|
|
15
|
+
"data-slot": "toast-portal",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function ToastViewport({ className, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Toast$1.Viewport, {
|
|
21
|
+
"data-slot": "toast-viewport",
|
|
22
|
+
className: cn("pointer-events-none fixed inset-x-4 bottom-4 z-50 mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function Toast({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Toast$1.Root, {
|
|
28
|
+
"data-slot": "toast",
|
|
29
|
+
className: cn("group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]", "h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]", "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']", "data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]", "data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]", "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]", "data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", "data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function ToastContent({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(Toast$1.Content, {
|
|
35
|
+
"data-slot": "toast-content",
|
|
36
|
+
className: cn("flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] data-behind:opacity-0 data-expanded:opacity-100", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function ToastTitle({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(Toast$1.Title, {
|
|
42
|
+
"data-slot": "toast-title",
|
|
43
|
+
className: cn("text-sm font-medium", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function ToastDescription({ className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(Toast$1.Description, {
|
|
49
|
+
"data-slot": "toast-description",
|
|
50
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function ToastAction({ className, render = /* @__PURE__ */ jsx(Button, {
|
|
55
|
+
variant: "outline",
|
|
56
|
+
size: "sm"
|
|
57
|
+
}), ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsx(Toast$1.Action, {
|
|
59
|
+
"data-slot": "toast-action",
|
|
60
|
+
render,
|
|
61
|
+
className: cn("shrink-0", className),
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function ToastClose({ className, children, render = /* @__PURE__ */ jsx(Button, {
|
|
66
|
+
variant: "ghost",
|
|
67
|
+
size: "icon-sm"
|
|
68
|
+
}), ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(Toast$1.Close, {
|
|
70
|
+
"data-slot": "toast-close",
|
|
71
|
+
"aria-label": "Close toast",
|
|
72
|
+
render,
|
|
73
|
+
className: cn("relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground", className),
|
|
74
|
+
...props,
|
|
75
|
+
children: children ?? /* @__PURE__ */ jsx(XIcon, { "aria-hidden": "true" })
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function ToastIcon({ type }) {
|
|
79
|
+
let icon = null;
|
|
80
|
+
if (type === "success") icon = /* @__PURE__ */ jsx(CircleCheckIcon, { "aria-hidden": "true" });
|
|
81
|
+
if (type === "info") icon = /* @__PURE__ */ jsx(InfoIcon, { "aria-hidden": "true" });
|
|
82
|
+
if (type === "warning") icon = /* @__PURE__ */ jsx(TriangleAlertIcon, { "aria-hidden": "true" });
|
|
83
|
+
if (type === "error") icon = /* @__PURE__ */ jsx(OctagonXIcon, {
|
|
84
|
+
className: "text-destructive",
|
|
85
|
+
"aria-hidden": "true"
|
|
86
|
+
});
|
|
87
|
+
if (type === "loading") icon = /* @__PURE__ */ jsx(Loader2Icon, {
|
|
88
|
+
className: "animate-spin",
|
|
89
|
+
"aria-hidden": "true"
|
|
90
|
+
});
|
|
91
|
+
if (!icon) return null;
|
|
92
|
+
return /* @__PURE__ */ jsx("span", {
|
|
93
|
+
"data-slot": "toast-icon",
|
|
94
|
+
className: "shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
95
|
+
children: icon
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function ToastList() {
|
|
99
|
+
const { toasts } = Toast$1.useToastManager();
|
|
100
|
+
return toasts.map((toastItem) => /* @__PURE__ */ jsx(Toast, {
|
|
101
|
+
toast: toastItem,
|
|
102
|
+
children: /* @__PURE__ */ jsxs(ToastContent, { children: [
|
|
103
|
+
/* @__PURE__ */ jsx(ToastIcon, { type: toastItem.type }),
|
|
104
|
+
/* @__PURE__ */ jsxs("div", {
|
|
105
|
+
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
106
|
+
children: [/* @__PURE__ */ jsx(ToastTitle, {}), /* @__PURE__ */ jsx(ToastDescription, {})]
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsx(ToastAction, {}),
|
|
109
|
+
/* @__PURE__ */ jsx(ToastClose, {})
|
|
110
|
+
] })
|
|
111
|
+
}, toastItem.id));
|
|
112
|
+
}
|
|
113
|
+
function Toaster({ children, toastManager = toast, ...props }) {
|
|
114
|
+
return /* @__PURE__ */ jsxs(ToastProvider, {
|
|
115
|
+
toastManager,
|
|
116
|
+
...props,
|
|
117
|
+
children: [children, /* @__PURE__ */ jsx(ToastPortal, { children: /* @__PURE__ */ jsx(ToastViewport, { children: /* @__PURE__ */ jsx(ToastList, {}) }) })]
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
const createToastManager = Toast$1.createToastManager;
|
|
121
|
+
const useToastManager = Toast$1.useToastManager;
|
|
122
|
+
//#endregion
|
|
123
|
+
export { Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, createToastManager, toast, useToastManager };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
//#region src/components/ui/trace.d.ts
|
|
4
|
+
declare function Trace({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
5
|
+
declare function TraceLine({ className, status, ...props }: React$1.ComponentProps<"span"> & {
|
|
6
|
+
status?: "running" | "error" | "pending";
|
|
7
|
+
}): React$1.JSX.Element;
|
|
8
|
+
declare function TraceIcon({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
9
|
+
declare function TraceTitle({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
10
|
+
declare function TraceDescription({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
11
|
+
declare function TraceCollapsible({ className, ...props }: Omit<React$1.ComponentProps<typeof Collapsible>, "open"> & ({
|
|
12
|
+
open?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
open: boolean;
|
|
15
|
+
onOpenChange: NonNullable<React$1.ComponentProps<typeof Collapsible>["onOpenChange"]>;
|
|
16
|
+
})): React$1.JSX.Element;
|
|
17
|
+
declare function TraceCollapsibleTrigger({ className, children, ...props }: React$1.ComponentProps<typeof CollapsibleTrigger>): React$1.JSX.Element;
|
|
18
|
+
declare function TraceCollapsibleContent({ className, children, ...props }: React$1.ComponentProps<typeof CollapsibleContent>): React$1.JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
//#region src/components/ui/trace.tsx
|
|
7
|
+
function Trace({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
"data-slot": "trace",
|
|
10
|
+
className: cn("flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function TraceLine({ className, status, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("span", {
|
|
16
|
+
"data-slot": "trace-line",
|
|
17
|
+
"data-status": status,
|
|
18
|
+
className: cn("flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function TraceIcon({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("span", {
|
|
24
|
+
"data-slot": "trace-icon",
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
className: cn("flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function TraceTitle({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("span", {
|
|
32
|
+
"data-slot": "trace-title",
|
|
33
|
+
className: cn("min-w-0 truncate motion-reduce:shimmer-none", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function TraceDescription({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("span", {
|
|
39
|
+
"data-slot": "trace-description",
|
|
40
|
+
className: cn("shrink-0 text-muted-foreground/70 tabular-nums", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function TraceCollapsible({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx(Collapsible, {
|
|
46
|
+
"data-slot": "trace-collapsible",
|
|
47
|
+
className: cn("flex w-full min-w-0 flex-col", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function TraceCollapsibleTrigger({ className, children, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
53
|
+
"data-slot": "trace-collapsible-trigger",
|
|
54
|
+
className: cn("group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive", className),
|
|
55
|
+
...props,
|
|
56
|
+
children: [children, /* @__PURE__ */ jsx(TraceIcon, {
|
|
57
|
+
className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90",
|
|
58
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function TraceCollapsibleContent({ className, children, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
64
|
+
"data-slot": "trace-collapsible-content",
|
|
65
|
+
className: "h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0",
|
|
66
|
+
...props,
|
|
67
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
68
|
+
"data-slot": "trace-collapsible-content-inner",
|
|
69
|
+
className: cn("mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground", className),
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|