treege 3.0.0-beta.3 → 3.0.0-beta.30
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/LICENSE +18 -12
- package/README.md +305 -49
- package/dist/ThemeContext-D49eu_oE.js +1472 -0
- package/dist/editor/components/input/ComboboxWithCreate.d.ts +2 -1
- package/dist/editor/constants/defaultNode.d.ts +1 -1
- package/dist/editor/constants/edgeTypes.d.ts +3 -2
- package/dist/editor/constants/nodeSpacing.d.ts +20 -0
- package/dist/editor/constants/nodeTypes.d.ts +5 -5
- package/dist/editor/context/TreegeEditorContext.d.ts +24 -1
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/edges/ConditionalEdge.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/edges/DefaultEdge.d.ts +3 -0
- package/dist/editor/features/TreegeEditor/forms/SubmitConfigForm.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/inputs/ComboboxPattern.d.ts +2 -1
- package/dist/editor/features/TreegeEditor/inputs/OptionImageField.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeLabelInput.d.ts +9 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +8 -0
- package/dist/editor/features/TreegeEditor/nodes/components/OpenSheetButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/SubTypeBadge.d.ts +8 -0
- package/dist/editor/features/TreegeEditor/nodes/layout/NodeWrapper.d.ts +2 -1
- package/dist/editor/features/TreegeEditor/panel/AIGeneratorDialog.d.ts +16 -0
- package/dist/editor/hooks/useFlowActions.d.ts +2 -0
- package/dist/editor/hooks/useFlowConnections.d.ts +4 -0
- package/dist/editor/hooks/useNodesSelection.d.ts +5 -5
- package/dist/editor/types/ai.d.ts +65 -0
- package/dist/editor/types/editor.d.ts +9 -8
- package/dist/editor/utils/aiFlowGenerator.d.ts +5 -0
- package/dist/editor/utils/image.d.ts +7 -0
- package/dist/editor-DnrJgSrC.js +3567 -0
- package/dist/editor.js +3 -7
- package/dist/main.js +5 -52
- package/dist/renderer/context/TreegeRendererContext.d.ts +4 -1
- package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +19 -11
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.d.ts +7 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +7 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +26 -15
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButton.d.ts +9 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButtonWrapper.d.ts +11 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +8 -7
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAddressInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAutocompleteInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultCheckboxInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultFileInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHiddenInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHttpInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultNumberInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultPasswordInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultRadioInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSelectInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSwitchInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextareaInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +84 -24
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultSubmitButton.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultFileInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHiddenInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultNumberInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSelectInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSubmitInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts +1 -1
- package/dist/renderer/hooks/useRenderNode.d.ts +55 -0
- package/dist/renderer/hooks/useSubmitHandler.d.ts +34 -0
- package/dist/renderer/hooks/useTranslate.d.ts +6 -4
- package/dist/renderer/index.d.ts +2 -0
- package/dist/renderer/index.native.d.ts +19 -0
- package/dist/renderer/types/renderer.d.ts +60 -6
- package/dist/renderer/utils/form.d.ts +22 -2
- package/dist/renderer/utils/http.d.ts +101 -0
- package/dist/renderer/utils/node.d.ts +9 -1
- package/dist/renderer/utils/sanitize.d.ts +85 -0
- package/dist/renderer/utils/sanitize.native.d.ts +69 -0
- package/dist/renderer/utils/submit.d.ts +47 -0
- package/dist/renderer-MCPhNlp1.js +1157 -0
- package/dist/renderer-native.d.ts +2 -0
- package/dist/renderer-native.js +3408 -0
- package/dist/renderer.js +4 -45
- package/dist/separator-gO82kpxa.js +350 -0
- package/dist/shared/components/ui/alert-dialog.d.ts +14 -0
- package/dist/shared/components/ui/badge.d.ts +2 -2
- package/dist/shared/components/ui/button.d.ts +1 -1
- package/dist/shared/components/ui/popover.d.ts +3 -1
- package/dist/shared/components/ui/select.d.ts +3 -1
- package/dist/shared/constants/colors.d.ts +45 -0
- package/dist/shared/constants/inputType.d.ts +1 -0
- package/dist/shared/context/ThemeContext.d.ts +2 -0
- package/dist/shared/context/ThemeContext.native.d.ts +22 -0
- package/dist/shared/hooks/useThemeColors.d.ts +37 -0
- package/dist/shared/locales/ar.json.d.ts +102 -9
- package/dist/shared/locales/de.json.d.ts +102 -9
- package/dist/shared/locales/en.json.d.ts +103 -10
- package/dist/shared/locales/es.json.d.ts +102 -9
- package/dist/shared/locales/fr.json.d.ts +102 -9
- package/dist/shared/locales/it.json.d.ts +102 -9
- package/dist/shared/locales/pt.json.d.ts +102 -9
- package/dist/shared/types/node.d.ts +56 -0
- package/dist/useRenderNode-B_GPMTPf.js +774 -0
- package/package.json +36 -9
- package/dist/ThemeContext-BIvs8Kw-.js +0 -758
- package/dist/TreegeEditor-BSPfQQk3.js +0 -2151
- package/dist/TreegeRenderer-D3EvsEfJ.js +0 -1413
- package/dist/_name_.css +0 -1
- package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +0 -6
package/dist/renderer.js
CHANGED
|
@@ -1,45 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
s as DefaultAutocompleteInput,
|
|
6
|
-
u as DefaultCheckboxInput,
|
|
7
|
-
l as DefaultDateInput,
|
|
8
|
-
r as DefaultDateRangeInput,
|
|
9
|
-
n as DefaultFileInput,
|
|
10
|
-
i as DefaultGroup,
|
|
11
|
-
o as DefaultHiddenInput,
|
|
12
|
-
f as DefaultHttpInput,
|
|
13
|
-
d as DefaultNumberInput,
|
|
14
|
-
p as DefaultPasswordInput,
|
|
15
|
-
D as DefaultRadioInput,
|
|
16
|
-
I as DefaultSelectInput,
|
|
17
|
-
T as DefaultSwitchInput,
|
|
18
|
-
m as DefaultTextAreaInput,
|
|
19
|
-
g as DefaultTextInput,
|
|
20
|
-
F as DefaultTimeInput,
|
|
21
|
-
c as DefaultTimeRangeInput,
|
|
22
|
-
v as Divider,
|
|
23
|
-
J as ThemeProvider,
|
|
24
|
-
x as Title,
|
|
25
|
-
R as TreegeConfigProvider,
|
|
26
|
-
S as TreegeRenderer,
|
|
27
|
-
b as checkFormFieldHasValue,
|
|
28
|
-
h as convertFormValuesToNamedFormat,
|
|
29
|
-
C as defaultInputRenderers,
|
|
30
|
-
w as defaultUI,
|
|
31
|
-
z as evaluateCondition,
|
|
32
|
-
A as evaluateConditions,
|
|
33
|
-
H as fileToSerializable,
|
|
34
|
-
N as filesToSerializable,
|
|
35
|
-
k as findStartNode,
|
|
36
|
-
P as getFlowRenderState,
|
|
37
|
-
K as getTranslatedText,
|
|
38
|
-
y as isFieldEmpty,
|
|
39
|
-
E as isStartNode,
|
|
40
|
-
G as mergeFlows,
|
|
41
|
-
V as serializableToFile,
|
|
42
|
-
U as useTheme,
|
|
43
|
-
j as useTreegeConfig,
|
|
44
|
-
q as useTreegeRenderer
|
|
45
|
-
};
|
|
1
|
+
import { n as e, s as t, t as n } from "./ThemeContext-D49eu_oE.js";
|
|
2
|
+
import { C as r, _ as i, a, b as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, p as h, r as g, u as _, v, w as y, x as b, y as x } from "./useRenderNode-B_GPMTPf.js";
|
|
3
|
+
import { C as S, S as C, _ as w, a as T, b as E, c as D, d as O, f as k, g as A, h as j, i as M, l as N, m as P, n as F, o as I, p as L, r as R, s as z, t as B, u as V, v as H, x as U, y as W } from "./renderer-MCPhNlp1.js";
|
|
4
|
+
export { C as DefaultAddressInput, U as DefaultAutocompleteInput, E as DefaultCheckboxInput, W as DefaultDateInput, H as DefaultDateRangeInput, w as DefaultFileInput, S as DefaultGroup, A as DefaultHiddenInput, j as DefaultHttpInput, P as DefaultNumberInput, L as DefaultPasswordInput, k as DefaultRadioInput, O as DefaultSelectInput, V as DefaultSwitchInput, N as DefaultTextAreaInput, D as DefaultTextInput, z as DefaultTimeInput, I as DefaultTimeRangeInput, F as Divider, n as ThemeProvider, R as Title, r as TreegeConfigProvider, B as TreegeRenderer, i as applyReferenceTransformation, v as calculateReferenceFieldUpdates, x as checkFormFieldHasValue, o as convertFormValuesToNamedFormat, T as defaultInputRenderers, M as defaultUI, h as evaluateCondition, p as evaluateConditions, m as fileToSerializable, g as filesToSerializable, f as findStartNode, _ as getFlowRenderState, t as getTranslatedText, b as isFieldEmpty, s as isStartNode, c as mergeFlows, u as sanitize, l as sanitizeHttpResponse, d as serializableToFile, e as useTheme, y as useTreegeConfig, a as useTreegeRenderer };
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import { f as e } from "./ThemeContext-D49eu_oE.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { CheckIcon as t, ChevronDownIcon as n, ChevronUpIcon as r, SearchIcon as i, XIcon as a } from "lucide-react";
|
|
4
|
+
import { Slot as o } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as s } from "class-variance-authority";
|
|
6
|
+
import { clsx as c } from "clsx";
|
|
7
|
+
import { twMerge as l } from "tailwind-merge";
|
|
8
|
+
import * as u from "@radix-ui/react-checkbox";
|
|
9
|
+
import * as d from "@radix-ui/react-label";
|
|
10
|
+
import * as f from "@radix-ui/react-popover";
|
|
11
|
+
import * as p from "@radix-ui/react-select";
|
|
12
|
+
import * as m from "@radix-ui/react-dialog";
|
|
13
|
+
import * as h from "@radix-ui/react-switch";
|
|
14
|
+
import { Command as g } from "cmdk";
|
|
15
|
+
import * as _ from "@radix-ui/react-separator";
|
|
16
|
+
//#region src/shared/lib/utils.ts
|
|
17
|
+
function v(...e) {
|
|
18
|
+
return l(c(e));
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/shared/components/ui/button.tsx
|
|
22
|
+
var y = e(), b = s("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
|
+
},
|
|
36
|
+
variant: {
|
|
37
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
38
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
39
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
40
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
41
|
+
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",
|
|
42
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function x({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
|
|
47
|
+
return /* @__PURE__ */ (0, y.jsx)(r ? o : "button", {
|
|
48
|
+
"data-slot": "button",
|
|
49
|
+
className: v(b({
|
|
50
|
+
className: e,
|
|
51
|
+
size: n,
|
|
52
|
+
variant: t
|
|
53
|
+
})),
|
|
54
|
+
...i
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/shared/components/ui/checkbox.tsx
|
|
59
|
+
function S({ className: e, ...n }) {
|
|
60
|
+
return /* @__PURE__ */ (0, y.jsx)(u.Root, {
|
|
61
|
+
"data-slot": "checkbox",
|
|
62
|
+
className: v("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", e),
|
|
63
|
+
...n,
|
|
64
|
+
children: /* @__PURE__ */ (0, y.jsx)(u.Indicator, {
|
|
65
|
+
"data-slot": "checkbox-indicator",
|
|
66
|
+
className: "grid place-content-center text-current transition-none",
|
|
67
|
+
children: /* @__PURE__ */ (0, y.jsx)(t, { className: "size-3.5" })
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/shared/components/ui/form.tsx
|
|
73
|
+
function C({ className: e, ...t }) {
|
|
74
|
+
return /* @__PURE__ */ (0, y.jsx)("div", {
|
|
75
|
+
"data-slot": "form-item",
|
|
76
|
+
className: v("grid gap-2", e),
|
|
77
|
+
...t
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function w({ className: e, ...t }) {
|
|
81
|
+
return /* @__PURE__ */ (0, y.jsx)("p", {
|
|
82
|
+
"data-slot": "form-description",
|
|
83
|
+
className: v("text-muted-foreground text-xs", e),
|
|
84
|
+
...t
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function T({ className: e, ...t }) {
|
|
88
|
+
return /* @__PURE__ */ (0, y.jsx)("p", {
|
|
89
|
+
"data-slot": "form-error",
|
|
90
|
+
className: v("text-destructive text-xs", e),
|
|
91
|
+
...t
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/shared/components/ui/input.tsx
|
|
96
|
+
function E({ className: e, type: t, ...n }) {
|
|
97
|
+
return /* @__PURE__ */ (0, y.jsx)("input", {
|
|
98
|
+
type: t,
|
|
99
|
+
"data-slot": "input",
|
|
100
|
+
className: v("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", e),
|
|
101
|
+
...n
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/shared/components/ui/label.tsx
|
|
106
|
+
var D = ({ className: e, ...t }) => /* @__PURE__ */ (0, y.jsx)(d.Root, {
|
|
107
|
+
"data-slot": "label",
|
|
108
|
+
className: v("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", e),
|
|
109
|
+
...t
|
|
110
|
+
});
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/shared/components/ui/popover.tsx
|
|
113
|
+
function O({ ...e }) {
|
|
114
|
+
return /* @__PURE__ */ (0, y.jsx)(f.Root, {
|
|
115
|
+
"data-slot": "popover",
|
|
116
|
+
...e
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function k({ ...e }) {
|
|
120
|
+
return /* @__PURE__ */ (0, y.jsx)(f.Trigger, {
|
|
121
|
+
"data-slot": "popover-trigger",
|
|
122
|
+
...e
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function A({ className: e, align: t = "center", sideOffset: n = 4, disablePortal: r = !1, ...i }) {
|
|
126
|
+
let a = /* @__PURE__ */ (0, y.jsx)(f.Content, {
|
|
127
|
+
"data-slot": "popover-content",
|
|
128
|
+
align: t,
|
|
129
|
+
sideOffset: n,
|
|
130
|
+
className: v("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", e),
|
|
131
|
+
...i
|
|
132
|
+
});
|
|
133
|
+
return r ? a : /* @__PURE__ */ (0, y.jsx)(f.Portal, { children: a });
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/shared/components/ui/select.tsx
|
|
137
|
+
var j = ({ ...e }) => /* @__PURE__ */ (0, y.jsx)(p.Root, {
|
|
138
|
+
"data-slot": "select",
|
|
139
|
+
...e
|
|
140
|
+
}), M = ({ ...e }) => /* @__PURE__ */ (0, y.jsx)(p.Group, {
|
|
141
|
+
"data-slot": "select-group",
|
|
142
|
+
...e
|
|
143
|
+
}), N = ({ ...e }) => /* @__PURE__ */ (0, y.jsx)(p.Value, {
|
|
144
|
+
"data-slot": "select-value",
|
|
145
|
+
...e
|
|
146
|
+
}), P = ({ className: e, size: t = "default", children: r, ...i }) => /* @__PURE__ */ (0, y.jsxs)(p.Trigger, {
|
|
147
|
+
"data-slot": "select-trigger",
|
|
148
|
+
"data-size": t,
|
|
149
|
+
className: v("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", e),
|
|
150
|
+
...i,
|
|
151
|
+
children: [r, /* @__PURE__ */ (0, y.jsx)(p.Icon, {
|
|
152
|
+
asChild: !0,
|
|
153
|
+
children: /* @__PURE__ */ (0, y.jsx)(n, { className: "size-4 opacity-50" })
|
|
154
|
+
})]
|
|
155
|
+
}), F = ({ className: e, children: t, position: n = "popper", ...r }) => /* @__PURE__ */ (0, y.jsx)(p.Portal, { children: /* @__PURE__ */ (0, y.jsxs)(p.Content, {
|
|
156
|
+
"data-slot": "select-content",
|
|
157
|
+
className: v("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", n === "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", e),
|
|
158
|
+
position: n,
|
|
159
|
+
...r,
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ (0, y.jsx)(L, {}),
|
|
162
|
+
/* @__PURE__ */ (0, y.jsx)(p.Viewport, {
|
|
163
|
+
className: v("p-1", n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
164
|
+
children: t
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ (0, y.jsx)(R, {})
|
|
167
|
+
]
|
|
168
|
+
}) }), ee = ({ className: e, htmlFor: t, children: n, ...r }) => /* @__PURE__ */ (0, y.jsx)(p.Label, {
|
|
169
|
+
"data-slot": "select-label",
|
|
170
|
+
className: v("pb-1.5 font-medium text-muted-foreground text-sm", e),
|
|
171
|
+
...r,
|
|
172
|
+
children: /* @__PURE__ */ (0, y.jsx)("label", {
|
|
173
|
+
htmlFor: t,
|
|
174
|
+
children: n
|
|
175
|
+
})
|
|
176
|
+
}), I = ({ className: e, children: n, ...r }) => /* @__PURE__ */ (0, y.jsxs)(p.Item, {
|
|
177
|
+
"data-slot": "select-item",
|
|
178
|
+
className: v("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", e),
|
|
179
|
+
...r,
|
|
180
|
+
children: [/* @__PURE__ */ (0, y.jsx)("span", {
|
|
181
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
182
|
+
children: /* @__PURE__ */ (0, y.jsx)(p.ItemIndicator, { children: /* @__PURE__ */ (0, y.jsx)(t, { className: "size-4" }) })
|
|
183
|
+
}), /* @__PURE__ */ (0, y.jsx)(p.ItemText, { children: n })]
|
|
184
|
+
}), L = ({ className: e, ...t }) => /* @__PURE__ */ (0, y.jsx)(p.ScrollUpButton, {
|
|
185
|
+
"data-slot": "select-scroll-up-button",
|
|
186
|
+
className: v("flex cursor-default items-center justify-center py-1", e),
|
|
187
|
+
...t,
|
|
188
|
+
children: /* @__PURE__ */ (0, y.jsx)(r, { className: "size-4" })
|
|
189
|
+
}), R = ({ className: e, ...t }) => /* @__PURE__ */ (0, y.jsx)(p.ScrollDownButton, {
|
|
190
|
+
"data-slot": "select-scroll-down-button",
|
|
191
|
+
className: v("flex cursor-default items-center justify-center py-1", e),
|
|
192
|
+
...t,
|
|
193
|
+
children: /* @__PURE__ */ (0, y.jsx)(n, { className: "size-4" })
|
|
194
|
+
});
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/shared/components/ui/dialog.tsx
|
|
197
|
+
function z({ ...e }) {
|
|
198
|
+
return /* @__PURE__ */ (0, y.jsx)(m.Root, {
|
|
199
|
+
"data-slot": "dialog",
|
|
200
|
+
...e
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
function B({ ...e }) {
|
|
204
|
+
return /* @__PURE__ */ (0, y.jsx)(m.Trigger, {
|
|
205
|
+
"data-slot": "dialog-trigger",
|
|
206
|
+
...e
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function V({ ...e }) {
|
|
210
|
+
return /* @__PURE__ */ (0, y.jsx)(m.Portal, {
|
|
211
|
+
"data-slot": "dialog-portal",
|
|
212
|
+
...e
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
function H({ className: e, ...t }) {
|
|
216
|
+
return /* @__PURE__ */ (0, y.jsx)(m.Overlay, {
|
|
217
|
+
"data-slot": "dialog-overlay",
|
|
218
|
+
className: v("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", e),
|
|
219
|
+
...t
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function U({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
223
|
+
return /* @__PURE__ */ (0, y.jsxs)(V, {
|
|
224
|
+
"data-slot": "dialog-portal",
|
|
225
|
+
children: [/* @__PURE__ */ (0, y.jsx)(H, {}), /* @__PURE__ */ (0, y.jsxs)(m.Content, {
|
|
226
|
+
"data-slot": "dialog-content",
|
|
227
|
+
className: v("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", e),
|
|
228
|
+
...r,
|
|
229
|
+
children: [t, n && /* @__PURE__ */ (0, y.jsxs)(m.Close, {
|
|
230
|
+
"data-slot": "dialog-close",
|
|
231
|
+
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",
|
|
232
|
+
children: [/* @__PURE__ */ (0, y.jsx)(a, {}), /* @__PURE__ */ (0, y.jsx)("span", {
|
|
233
|
+
className: "sr-only",
|
|
234
|
+
children: "Close"
|
|
235
|
+
})]
|
|
236
|
+
})]
|
|
237
|
+
})]
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function W({ className: e, ...t }) {
|
|
241
|
+
return /* @__PURE__ */ (0, y.jsx)("div", {
|
|
242
|
+
"data-slot": "dialog-header",
|
|
243
|
+
className: v("flex flex-col gap-2 text-center sm:text-left", e),
|
|
244
|
+
...t
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function G({ className: e, ...t }) {
|
|
248
|
+
return /* @__PURE__ */ (0, y.jsx)("div", {
|
|
249
|
+
"data-slot": "dialog-footer",
|
|
250
|
+
className: v("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
251
|
+
...t
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function K({ className: e, ...t }) {
|
|
255
|
+
return /* @__PURE__ */ (0, y.jsx)(m.Title, {
|
|
256
|
+
"data-slot": "dialog-title",
|
|
257
|
+
className: v("font-semibold text-lg leading-none", e),
|
|
258
|
+
...t
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
function q({ className: e, ...t }) {
|
|
262
|
+
return /* @__PURE__ */ (0, y.jsx)(m.Description, {
|
|
263
|
+
"data-slot": "dialog-description",
|
|
264
|
+
className: v("text-muted-foreground text-sm", e),
|
|
265
|
+
...t
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region src/shared/components/ui/textarea.tsx
|
|
270
|
+
function J({ className: e, ...t }) {
|
|
271
|
+
return /* @__PURE__ */ (0, y.jsx)("textarea", {
|
|
272
|
+
"data-slot": "textarea",
|
|
273
|
+
className: v("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", e),
|
|
274
|
+
...t
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/shared/components/ui/switch.tsx
|
|
279
|
+
function Y({ className: e, ...t }) {
|
|
280
|
+
return /* @__PURE__ */ (0, y.jsx)(h.Root, {
|
|
281
|
+
"data-slot": "switch",
|
|
282
|
+
className: v("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", e),
|
|
283
|
+
...t,
|
|
284
|
+
children: /* @__PURE__ */ (0, y.jsx)(h.Thumb, {
|
|
285
|
+
"data-slot": "switch-thumb",
|
|
286
|
+
className: v("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")
|
|
287
|
+
})
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/shared/components/ui/command.tsx
|
|
292
|
+
function X({ className: e, ...t }) {
|
|
293
|
+
return /* @__PURE__ */ (0, y.jsx)(g, {
|
|
294
|
+
"data-slot": "command",
|
|
295
|
+
className: v("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", e),
|
|
296
|
+
...t
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
function Z({ className: e, ...t }) {
|
|
300
|
+
return /* @__PURE__ */ (0, y.jsxs)("div", {
|
|
301
|
+
"data-slot": "command-input-wrapper",
|
|
302
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
303
|
+
children: [/* @__PURE__ */ (0, y.jsx)(i, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ (0, y.jsx)(g.Input, {
|
|
304
|
+
"data-slot": "command-input",
|
|
305
|
+
className: v("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", e),
|
|
306
|
+
...t
|
|
307
|
+
})]
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function Q({ className: e, ...t }) {
|
|
311
|
+
return /* @__PURE__ */ (0, y.jsx)(g.List, {
|
|
312
|
+
"data-slot": "command-list",
|
|
313
|
+
className: v("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", e),
|
|
314
|
+
...t
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
function $({ ...e }) {
|
|
318
|
+
return /* @__PURE__ */ (0, y.jsx)(g.Empty, {
|
|
319
|
+
"data-slot": "command-empty",
|
|
320
|
+
className: "py-6 text-center text-sm",
|
|
321
|
+
...e
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
function te({ className: e, ...t }) {
|
|
325
|
+
return /* @__PURE__ */ (0, y.jsx)(g.Group, {
|
|
326
|
+
"data-slot": "command-group",
|
|
327
|
+
className: v("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", e),
|
|
328
|
+
...t
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
function ne({ className: e, ...t }) {
|
|
332
|
+
return /* @__PURE__ */ (0, y.jsx)(g.Item, {
|
|
333
|
+
"data-slot": "command-item",
|
|
334
|
+
className: v("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", e),
|
|
335
|
+
...t
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region src/shared/components/ui/separator.tsx
|
|
340
|
+
function re({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
341
|
+
return /* @__PURE__ */ (0, y.jsx)(_.Root, {
|
|
342
|
+
"data-slot": "separator",
|
|
343
|
+
decorative: n,
|
|
344
|
+
orientation: t,
|
|
345
|
+
className: v("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px", e),
|
|
346
|
+
...r
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
//#endregion
|
|
350
|
+
export { T as A, N as C, D, k as E, v 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 };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "purple" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "blue" | "purple" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
7
|
asChild?: boolean;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
size?: "default" | "icon" | "icon-lg" | "icon-sm" | "lg" | "sm" | null | undefined;
|
|
5
5
|
variant?: "default" | "link" | "destructive" | "ghost" | "outline" | "secondary" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,8 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, disablePortal, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
6
|
+
disablePortal?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -7,7 +7,9 @@ declare const SelectTrigger: ({ className, size, children, ...props }: React.Com
|
|
|
7
7
|
size?: "sm" | "default";
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare const SelectContent: ({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare const SelectLabel: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>
|
|
10
|
+
declare const SelectLabel: ({ className, htmlFor, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Label> & {
|
|
11
|
+
htmlFor?: string;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
declare const SelectItem: ({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
declare const SelectSeparator: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
declare const SelectScrollUpButton: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const COLORS: {
|
|
2
|
+
dark: {
|
|
3
|
+
background: string;
|
|
4
|
+
border: string;
|
|
5
|
+
borderFocus: string;
|
|
6
|
+
card: string;
|
|
7
|
+
error: string;
|
|
8
|
+
errorBg: string;
|
|
9
|
+
errorLight: string;
|
|
10
|
+
input: string;
|
|
11
|
+
muted: string;
|
|
12
|
+
primary: string;
|
|
13
|
+
primaryDisabled: string;
|
|
14
|
+
primaryForeground: string;
|
|
15
|
+
primaryLight: string;
|
|
16
|
+
separator: string;
|
|
17
|
+
success: string;
|
|
18
|
+
successBg: string;
|
|
19
|
+
text: string;
|
|
20
|
+
textMuted: string;
|
|
21
|
+
textSecondary: string;
|
|
22
|
+
};
|
|
23
|
+
light: {
|
|
24
|
+
background: string;
|
|
25
|
+
border: string;
|
|
26
|
+
borderFocus: string;
|
|
27
|
+
card: string;
|
|
28
|
+
error: string;
|
|
29
|
+
errorBg: string;
|
|
30
|
+
errorLight: string;
|
|
31
|
+
input: string;
|
|
32
|
+
muted: string;
|
|
33
|
+
primary: string;
|
|
34
|
+
primaryDisabled: string;
|
|
35
|
+
primaryForeground: string;
|
|
36
|
+
primaryLight: string;
|
|
37
|
+
separator: string;
|
|
38
|
+
success: string;
|
|
39
|
+
successBg: string;
|
|
40
|
+
text: string;
|
|
41
|
+
textMuted: string;
|
|
42
|
+
textSecondary: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type ThemeColors = typeof COLORS.light;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ThemeColors } from '../constants/colors';
|
|
2
3
|
type Theme = "dark" | "light" | "system";
|
|
3
4
|
interface ThemeProviderProps {
|
|
4
5
|
children: ReactNode;
|
|
@@ -7,6 +8,7 @@ interface ThemeProviderProps {
|
|
|
7
8
|
theme?: "dark" | "light";
|
|
8
9
|
}
|
|
9
10
|
interface ThemeProviderState {
|
|
11
|
+
colors: ThemeColors;
|
|
10
12
|
theme: Theme;
|
|
11
13
|
setTheme: (theme: Theme) => void;
|
|
12
14
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ThemeColors } from '../constants/colors';
|
|
3
|
+
type Theme = "dark" | "light" | "system";
|
|
4
|
+
interface ThemeProviderProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
defaultTheme?: Theme;
|
|
7
|
+
storageKey?: string;
|
|
8
|
+
theme?: "dark" | "light";
|
|
9
|
+
}
|
|
10
|
+
interface ThemeProviderState {
|
|
11
|
+
colors: ThemeColors;
|
|
12
|
+
theme: Theme;
|
|
13
|
+
setTheme: (theme: Theme) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* ThemeProvider for React Native
|
|
17
|
+
* Unlike the web version, this doesn't manipulate DOM classes
|
|
18
|
+
* Provides theme colors directly through the context
|
|
19
|
+
*/
|
|
20
|
+
export declare const ThemeProvider: ({ children, defaultTheme, theme: controlledTheme, ...props }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const useTheme: () => ThemeProviderState;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useThemeColors hook for Web
|
|
3
|
+
*
|
|
4
|
+
* On web, theming is handled via CSS classes and CSS variables in the global stylesheet.
|
|
5
|
+
* This hook provides color values that map to CSS variables or returns empty strings
|
|
6
|
+
* since actual colors are defined in the CSS theme.
|
|
7
|
+
*
|
|
8
|
+
* React Native uses this same interface but returns actual color values.
|
|
9
|
+
*/
|
|
10
|
+
export type ThemeColors = {
|
|
11
|
+
background: string;
|
|
12
|
+
card: string;
|
|
13
|
+
input: string;
|
|
14
|
+
border: string;
|
|
15
|
+
borderFocus: string;
|
|
16
|
+
error: string;
|
|
17
|
+
errorBg: string;
|
|
18
|
+
errorLight: string;
|
|
19
|
+
muted: string;
|
|
20
|
+
primary: string;
|
|
21
|
+
primaryDisabled: string;
|
|
22
|
+
primaryLight: string;
|
|
23
|
+
success: string;
|
|
24
|
+
successBg: string;
|
|
25
|
+
text: string;
|
|
26
|
+
textMuted: string;
|
|
27
|
+
textSecondary: string;
|
|
28
|
+
separator: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* For web, we don't need to return actual color values since theming
|
|
32
|
+
* is handled via CSS classes (`.light` / `.dark`) and CSS variables.
|
|
33
|
+
*
|
|
34
|
+
* Components should use CSS classes for styling on web instead of inline styles.
|
|
35
|
+
* This hook exists for API compatibility with React Native.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useThemeColors: () => ThemeColors;
|