treege 3.0.0-beta.39 → 3.0.0-beta.40
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/DefaultInputs-8yJMEyMh.js +1557 -0
- package/dist/ThemeContext-Ejgu9Mwr.js +1603 -0
- package/dist/editor/constants/nodeTypes.d.ts +3 -3
- package/dist/editor/context/TreegeEditorContext.d.ts +18 -1
- package/dist/editor/features/TreegeEditor/dialogs/ChangeNodeTypeDialog.d.ts +2 -0
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/nodes/components/NodeInputPreview.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +7 -0
- package/dist/editor/hooks/useFlowActions.d.ts +2 -2
- package/dist/editor/utils/edge.d.ts +14 -0
- package/dist/{editor-CAj1BX2r.js → editor-DWJ95r4g.js} +1340 -1114
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -5
- package/dist/renderer/utils/node.d.ts +9 -0
- package/dist/renderer-native.js +680 -681
- package/dist/renderer.js +3 -4
- package/dist/shared/locales/ar.json.d.ts +7 -0
- package/dist/shared/locales/de.json.d.ts +7 -0
- package/dist/shared/locales/en.json.d.ts +7 -0
- package/dist/shared/locales/es.json.d.ts +7 -0
- package/dist/shared/locales/fr.json.d.ts +7 -0
- package/dist/shared/locales/it.json.d.ts +7 -0
- package/dist/shared/locales/pt.json.d.ts +7 -0
- package/package.json +1 -1
- package/dist/ThemeContext-PGG6Ht__.js +0 -813
- package/dist/editor/features/TreegeEditor/inputs/SelectInputType.d.ts +0 -7
- package/dist/editor/features/TreegeEditor/nodes/components/InputTypeBadge.d.ts +0 -7
- package/dist/renderer-BOjgk8F8.js +0 -1199
- package/dist/separator-Cdfv5nIR.js +0 -351
- package/dist/useRenderNode-OgRe_mb5.js +0 -775
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { CheckIcon as n, ChevronDownIcon as r, ChevronUpIcon as i, SearchIcon as a, XIcon as o } from "lucide-react";
|
|
3
|
-
import "react";
|
|
4
|
-
import { Slot as s } from "@radix-ui/react-slot";
|
|
5
|
-
import { cva as c } from "class-variance-authority";
|
|
6
|
-
import { clsx as l } from "clsx";
|
|
7
|
-
import { twMerge as u } from "tailwind-merge";
|
|
8
|
-
import * as d from "@radix-ui/react-checkbox";
|
|
9
|
-
import * as f from "@radix-ui/react-label";
|
|
10
|
-
import * as p from "@radix-ui/react-popover";
|
|
11
|
-
import * as m from "@radix-ui/react-select";
|
|
12
|
-
import * as h from "@radix-ui/react-dialog";
|
|
13
|
-
import * as g from "@radix-ui/react-switch";
|
|
14
|
-
import { Command as _ } from "cmdk";
|
|
15
|
-
import * as v from "@radix-ui/react-separator";
|
|
16
|
-
//#region src/shared/lib/utils.ts
|
|
17
|
-
function y(...e) {
|
|
18
|
-
return u(l(e));
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/shared/components/ui/button.tsx
|
|
22
|
-
var b = c("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", {
|
|
23
|
-
defaultVariants: {
|
|
24
|
-
size: "default",
|
|
25
|
-
variant: "default"
|
|
26
|
-
},
|
|
27
|
-
variants: {
|
|
28
|
-
size: {
|
|
29
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
30
|
-
icon: "size-9",
|
|
31
|
-
"icon-lg": "size-10",
|
|
32
|
-
"icon-sm": "size-8",
|
|
33
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
34
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
35
|
-
xs: "h-6 rounded-md gap-1 px-2 text-xs has-[>svg]:px-1.5"
|
|
36
|
-
},
|
|
37
|
-
variant: {
|
|
38
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
39
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
40
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
41
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
42
|
-
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",
|
|
43
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
function x({ className: t, variant: n, size: r, asChild: i = !1, ...a }) {
|
|
48
|
-
return /* @__PURE__ */ e(i ? s : "button", {
|
|
49
|
-
"data-slot": "button",
|
|
50
|
-
className: y(b({
|
|
51
|
-
className: t,
|
|
52
|
-
size: r,
|
|
53
|
-
variant: n
|
|
54
|
-
})),
|
|
55
|
-
...a
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/shared/components/ui/checkbox.tsx
|
|
60
|
-
function S({ className: t, ...r }) {
|
|
61
|
-
return /* @__PURE__ */ e(d.Root, {
|
|
62
|
-
"data-slot": "checkbox",
|
|
63
|
-
className: y("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40", t),
|
|
64
|
-
...r,
|
|
65
|
-
children: /* @__PURE__ */ e(d.Indicator, {
|
|
66
|
-
"data-slot": "checkbox-indicator",
|
|
67
|
-
className: "grid place-content-center text-current transition-none",
|
|
68
|
-
children: /* @__PURE__ */ e(n, { className: "size-3.5" })
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/shared/components/ui/form.tsx
|
|
74
|
-
function C({ className: t, ...n }) {
|
|
75
|
-
return /* @__PURE__ */ e("div", {
|
|
76
|
-
"data-slot": "form-item",
|
|
77
|
-
className: y("grid gap-2", t),
|
|
78
|
-
...n
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function w({ className: t, ...n }) {
|
|
82
|
-
return /* @__PURE__ */ e("p", {
|
|
83
|
-
"data-slot": "form-description",
|
|
84
|
-
className: y("text-muted-foreground text-xs", t),
|
|
85
|
-
...n
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function T({ className: t, ...n }) {
|
|
89
|
-
return /* @__PURE__ */ e("p", {
|
|
90
|
-
"data-slot": "form-error",
|
|
91
|
-
className: y("text-destructive text-xs", t),
|
|
92
|
-
...n
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/shared/components/ui/input.tsx
|
|
97
|
-
function E({ className: t, type: n, ...r }) {
|
|
98
|
-
return /* @__PURE__ */ e("input", {
|
|
99
|
-
type: n,
|
|
100
|
-
"data-slot": "input",
|
|
101
|
-
className: y("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", t),
|
|
102
|
-
...r
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region src/shared/components/ui/label.tsx
|
|
107
|
-
var D = ({ className: t, ...n }) => /* @__PURE__ */ e(f.Root, {
|
|
108
|
-
"data-slot": "label",
|
|
109
|
-
className: y("flex select-none items-center gap-2 font-medium text-muted-foreground text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50", t),
|
|
110
|
-
...n
|
|
111
|
-
});
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/shared/components/ui/popover.tsx
|
|
114
|
-
function O({ ...t }) {
|
|
115
|
-
return /* @__PURE__ */ e(p.Root, {
|
|
116
|
-
"data-slot": "popover",
|
|
117
|
-
...t
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function k({ ...t }) {
|
|
121
|
-
return /* @__PURE__ */ e(p.Trigger, {
|
|
122
|
-
"data-slot": "popover-trigger",
|
|
123
|
-
...t
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function A({ className: t, align: n = "center", sideOffset: r = 4, disablePortal: i = !1, ...a }) {
|
|
127
|
-
let o = /* @__PURE__ */ e(p.Content, {
|
|
128
|
-
"data-slot": "popover-content",
|
|
129
|
-
align: n,
|
|
130
|
-
sideOffset: r,
|
|
131
|
-
className: y("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 bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in", t),
|
|
132
|
-
...a
|
|
133
|
-
});
|
|
134
|
-
return i ? o : /* @__PURE__ */ e(p.Portal, { children: o });
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/shared/components/ui/select.tsx
|
|
138
|
-
var j = ({ ...t }) => /* @__PURE__ */ e(m.Root, {
|
|
139
|
-
"data-slot": "select",
|
|
140
|
-
...t
|
|
141
|
-
}), M = ({ ...t }) => /* @__PURE__ */ e(m.Group, {
|
|
142
|
-
"data-slot": "select-group",
|
|
143
|
-
...t
|
|
144
|
-
}), N = ({ ...t }) => /* @__PURE__ */ e(m.Value, {
|
|
145
|
-
"data-slot": "select-value",
|
|
146
|
-
...t
|
|
147
|
-
}), P = ({ className: n, size: i = "default", children: a, ...o }) => /* @__PURE__ */ t(m.Trigger, {
|
|
148
|
-
"data-slot": "select-trigger",
|
|
149
|
-
"data-size": i,
|
|
150
|
-
className: y("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", n),
|
|
151
|
-
...o,
|
|
152
|
-
children: [a, /* @__PURE__ */ e(m.Icon, {
|
|
153
|
-
asChild: !0,
|
|
154
|
-
children: /* @__PURE__ */ e(r, { className: "size-4 opacity-50" })
|
|
155
|
-
})]
|
|
156
|
-
}), F = ({ className: n, children: r, position: i = "popper", ...a }) => /* @__PURE__ */ e(m.Portal, { children: /* @__PURE__ */ t(m.Content, {
|
|
157
|
-
"data-slot": "select-content",
|
|
158
|
-
className: y("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-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", i === "popper" && "data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1", n),
|
|
159
|
-
position: i,
|
|
160
|
-
...a,
|
|
161
|
-
children: [
|
|
162
|
-
/* @__PURE__ */ e(L, {}),
|
|
163
|
-
/* @__PURE__ */ e(m.Viewport, {
|
|
164
|
-
className: y("p-1", i === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
165
|
-
children: r
|
|
166
|
-
}),
|
|
167
|
-
/* @__PURE__ */ e(R, {})
|
|
168
|
-
]
|
|
169
|
-
}) }), ee = ({ className: t, htmlFor: n, children: r, ...i }) => /* @__PURE__ */ e(m.Label, {
|
|
170
|
-
"data-slot": "select-label",
|
|
171
|
-
className: y("pb-1.5 font-medium text-muted-foreground text-sm", t),
|
|
172
|
-
...i,
|
|
173
|
-
children: /* @__PURE__ */ e("label", {
|
|
174
|
-
htmlFor: n,
|
|
175
|
-
children: r
|
|
176
|
-
})
|
|
177
|
-
}), I = ({ className: r, children: i, ...a }) => /* @__PURE__ */ t(m.Item, {
|
|
178
|
-
"data-slot": "select-item",
|
|
179
|
-
className: y("relative flex w-full cursor-pointer select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", r),
|
|
180
|
-
...a,
|
|
181
|
-
children: [/* @__PURE__ */ e("span", {
|
|
182
|
-
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
183
|
-
children: /* @__PURE__ */ e(m.ItemIndicator, { children: /* @__PURE__ */ e(n, { className: "size-4" }) })
|
|
184
|
-
}), /* @__PURE__ */ e(m.ItemText, { children: i })]
|
|
185
|
-
}), L = ({ className: t, ...n }) => /* @__PURE__ */ e(m.ScrollUpButton, {
|
|
186
|
-
"data-slot": "select-scroll-up-button",
|
|
187
|
-
className: y("flex cursor-default items-center justify-center py-1", t),
|
|
188
|
-
...n,
|
|
189
|
-
children: /* @__PURE__ */ e(i, { className: "size-4" })
|
|
190
|
-
}), R = ({ className: t, ...n }) => /* @__PURE__ */ e(m.ScrollDownButton, {
|
|
191
|
-
"data-slot": "select-scroll-down-button",
|
|
192
|
-
className: y("flex cursor-default items-center justify-center py-1", t),
|
|
193
|
-
...n,
|
|
194
|
-
children: /* @__PURE__ */ e(r, { className: "size-4" })
|
|
195
|
-
});
|
|
196
|
-
//#endregion
|
|
197
|
-
//#region src/shared/components/ui/dialog.tsx
|
|
198
|
-
function z({ ...t }) {
|
|
199
|
-
return /* @__PURE__ */ e(h.Root, {
|
|
200
|
-
"data-slot": "dialog",
|
|
201
|
-
...t
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
function B({ ...t }) {
|
|
205
|
-
return /* @__PURE__ */ e(h.Trigger, {
|
|
206
|
-
"data-slot": "dialog-trigger",
|
|
207
|
-
...t
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
function V({ ...t }) {
|
|
211
|
-
return /* @__PURE__ */ e(h.Portal, {
|
|
212
|
-
"data-slot": "dialog-portal",
|
|
213
|
-
...t
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
function H({ className: t, ...n }) {
|
|
217
|
-
return /* @__PURE__ */ e(h.Overlay, {
|
|
218
|
-
"data-slot": "dialog-overlay",
|
|
219
|
-
className: y("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", t),
|
|
220
|
-
...n
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
function U({ className: n, children: r, showCloseButton: i = !0, ...a }) {
|
|
224
|
-
return /* @__PURE__ */ t(V, {
|
|
225
|
-
"data-slot": "dialog-portal",
|
|
226
|
-
children: [/* @__PURE__ */ e(H, {}), /* @__PURE__ */ t(h.Content, {
|
|
227
|
-
"data-slot": "dialog-content",
|
|
228
|
-
className: y("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 bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg", n),
|
|
229
|
-
...a,
|
|
230
|
-
children: [r, i && /* @__PURE__ */ t(h.Close, {
|
|
231
|
-
"data-slot": "dialog-close",
|
|
232
|
-
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
233
|
-
children: [/* @__PURE__ */ e(o, {}), /* @__PURE__ */ e("span", {
|
|
234
|
-
className: "sr-only",
|
|
235
|
-
children: "Close"
|
|
236
|
-
})]
|
|
237
|
-
})]
|
|
238
|
-
})]
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
function W({ className: t, ...n }) {
|
|
242
|
-
return /* @__PURE__ */ e("div", {
|
|
243
|
-
"data-slot": "dialog-header",
|
|
244
|
-
className: y("flex flex-col gap-2 text-center sm:text-left", t),
|
|
245
|
-
...n
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
function G({ className: t, ...n }) {
|
|
249
|
-
return /* @__PURE__ */ e("div", {
|
|
250
|
-
"data-slot": "dialog-footer",
|
|
251
|
-
className: y("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t),
|
|
252
|
-
...n
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
function K({ className: t, ...n }) {
|
|
256
|
-
return /* @__PURE__ */ e(h.Title, {
|
|
257
|
-
"data-slot": "dialog-title",
|
|
258
|
-
className: y("font-semibold text-lg leading-none", t),
|
|
259
|
-
...n
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
function q({ className: t, ...n }) {
|
|
263
|
-
return /* @__PURE__ */ e(h.Description, {
|
|
264
|
-
"data-slot": "dialog-description",
|
|
265
|
-
className: y("text-muted-foreground text-sm", t),
|
|
266
|
-
...n
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region src/shared/components/ui/textarea.tsx
|
|
271
|
-
function J({ className: t, ...n }) {
|
|
272
|
-
return /* @__PURE__ */ e("textarea", {
|
|
273
|
-
"data-slot": "textarea",
|
|
274
|
-
className: y("field-sizing-content flex min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", t),
|
|
275
|
-
...n
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region src/shared/components/ui/switch.tsx
|
|
280
|
-
function Y({ className: t, ...n }) {
|
|
281
|
-
return /* @__PURE__ */ e(g.Root, {
|
|
282
|
-
"data-slot": "switch",
|
|
283
|
-
className: y("peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80", t),
|
|
284
|
-
...n,
|
|
285
|
-
children: /* @__PURE__ */ e(g.Thumb, {
|
|
286
|
-
"data-slot": "switch-thumb",
|
|
287
|
-
className: y("pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")
|
|
288
|
-
})
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
//#endregion
|
|
292
|
-
//#region src/shared/components/ui/command.tsx
|
|
293
|
-
function X({ className: t, ...n }) {
|
|
294
|
-
return /* @__PURE__ */ e(_, {
|
|
295
|
-
"data-slot": "command",
|
|
296
|
-
className: y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", t),
|
|
297
|
-
...n
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
function Z({ className: n, ...r }) {
|
|
301
|
-
return /* @__PURE__ */ t("div", {
|
|
302
|
-
"data-slot": "command-input-wrapper",
|
|
303
|
-
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
304
|
-
children: [/* @__PURE__ */ e(a, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ e(_.Input, {
|
|
305
|
-
"data-slot": "command-input",
|
|
306
|
-
className: y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", n),
|
|
307
|
-
...r
|
|
308
|
-
})]
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
function Q({ className: t, ...n }) {
|
|
312
|
-
return /* @__PURE__ */ e(_.List, {
|
|
313
|
-
"data-slot": "command-list",
|
|
314
|
-
className: y("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", t),
|
|
315
|
-
...n
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
function $({ ...t }) {
|
|
319
|
-
return /* @__PURE__ */ e(_.Empty, {
|
|
320
|
-
"data-slot": "command-empty",
|
|
321
|
-
className: "py-6 text-center text-sm",
|
|
322
|
-
...t
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
function te({ className: t, ...n }) {
|
|
326
|
-
return /* @__PURE__ */ e(_.Group, {
|
|
327
|
-
"data-slot": "command-group",
|
|
328
|
-
className: y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs", t),
|
|
329
|
-
...n
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
function ne({ className: t, ...n }) {
|
|
333
|
-
return /* @__PURE__ */ e(_.Item, {
|
|
334
|
-
"data-slot": "command-item",
|
|
335
|
-
className: y("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", t),
|
|
336
|
-
...n
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
//#endregion
|
|
340
|
-
//#region src/shared/components/ui/separator.tsx
|
|
341
|
-
function re({ className: t, orientation: n = "horizontal", decorative: r = !0, ...i }) {
|
|
342
|
-
return /* @__PURE__ */ e(v.Root, {
|
|
343
|
-
"data-slot": "separator",
|
|
344
|
-
decorative: r,
|
|
345
|
-
orientation: n,
|
|
346
|
-
className: y("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px", t),
|
|
347
|
-
...i
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
//#endregion
|
|
351
|
-
export { T as A, N as C, D, k as E, y as F, S as M, x as N, E as O, b as P, P as S, A as T, j as _, Z as a, I as b, Y as c, U as d, q as f, B as g, K as h, te as i, C as j, w as k, J as l, W as m, X as n, ne as o, G as p, $ as r, Q as s, re as t, z as u, F as v, O as w, ee as x, M as y };
|