treege 3.0.0-beta.26 → 3.0.0-beta.28
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/README.md +188 -24
- package/dist/ThemeContext-BBEqRK_Q.js +429 -0
- package/dist/{TreegeEditor-WqTXkYl3.js → TreegeEditor-Bi7GcSKl.js} +198 -197
- package/dist/TreegeRenderer-DbE0m_4e.js +1047 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +50 -49
- 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 +81 -23
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/hooks/useRenderNode.d.ts +55 -0
- package/dist/renderer/index.d.ts +1 -0
- package/dist/renderer/index.native.d.ts +19 -0
- package/dist/renderer/types/renderer.d.ts +20 -4
- package/dist/renderer/utils/sanitize.native.d.ts +69 -0
- package/dist/renderer/utils/submit.d.ts +1 -1
- package/dist/renderer-native.d.ts +2 -0
- package/dist/renderer-native.js +2833 -0
- package/dist/renderer.js +48 -47
- package/dist/separator-oCo7kxCK.js +364 -0
- package/dist/shared/constants/colors.d.ts +45 -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 +13 -5
- package/dist/shared/locales/de.json.d.ts +13 -5
- package/dist/shared/locales/en.json.d.ts +13 -5
- package/dist/shared/locales/es.json.d.ts +13 -5
- package/dist/shared/locales/fr.json.d.ts +13 -5
- package/dist/shared/locales/it.json.d.ts +13 -5
- package/dist/shared/locales/pt.json.d.ts +13 -5
- package/dist/shared/types/node.d.ts +2 -2
- package/dist/useRenderNode-BACcrUML.js +863 -0
- package/package.json +24 -1
- package/dist/ThemeContext-BIT4DHqC.js +0 -764
- package/dist/TreegeRenderer-BSR_ez96.js +0 -1812
package/dist/renderer.js
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as
|
|
1
|
+
import { T as t, l as s, n as u, j as l, k as n, e as r, b as i, f as o, c as f, d as p, g as d, h as D, i as T, m as I, o as m, p as g, s as c, u as F, a as R } from "./useRenderNode-BACcrUML.js";
|
|
2
|
+
import { T as h, g as x, u as S } from "./ThemeContext-BBEqRK_Q.js";
|
|
3
|
+
import { a as z, b as C, c as k, d as w, e as H, f as N, D as A, g as P, h as j, i as y, j as U, k as V, l as q, m as E, n as G, o as B, p as J, q as K, s as L, t as M, T as O, r as Q, u as W } from "./TreegeRenderer-DbE0m_4e.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
5
|
+
z as DefaultAddressInput,
|
|
6
|
+
C as DefaultAutocompleteInput,
|
|
7
|
+
k as DefaultCheckboxInput,
|
|
8
|
+
w as DefaultDateInput,
|
|
9
|
+
H as DefaultDateRangeInput,
|
|
10
|
+
N as DefaultFileInput,
|
|
11
|
+
A as DefaultGroup,
|
|
12
|
+
P as DefaultHiddenInput,
|
|
13
|
+
j as DefaultHttpInput,
|
|
14
|
+
y as DefaultNumberInput,
|
|
15
|
+
U as DefaultPasswordInput,
|
|
16
|
+
V as DefaultRadioInput,
|
|
17
|
+
q as DefaultSelectInput,
|
|
18
|
+
E as DefaultSwitchInput,
|
|
19
|
+
G as DefaultTextAreaInput,
|
|
20
|
+
B as DefaultTextInput,
|
|
21
|
+
J as DefaultTimeInput,
|
|
22
|
+
K as DefaultTimeRangeInput,
|
|
23
|
+
L as Divider,
|
|
24
|
+
h as ThemeProvider,
|
|
25
|
+
M as Title,
|
|
26
|
+
t as TreegeConfigProvider,
|
|
27
|
+
O as TreegeRenderer,
|
|
28
|
+
s as applyReferenceTransformation,
|
|
29
|
+
u as calculateReferenceFieldUpdates,
|
|
30
|
+
l as checkFormFieldHasValue,
|
|
31
|
+
n as convertFormValuesToNamedFormat,
|
|
32
|
+
Q as defaultInputRenderers,
|
|
33
|
+
W as defaultUI,
|
|
34
|
+
r as evaluateCondition,
|
|
35
|
+
i as evaluateConditions,
|
|
36
|
+
o as fileToSerializable,
|
|
37
|
+
f as filesToSerializable,
|
|
38
|
+
p as findStartNode,
|
|
39
|
+
d as getFlowRenderState,
|
|
40
|
+
x as getTranslatedText,
|
|
41
|
+
D as isFieldEmpty,
|
|
42
|
+
T as isStartNode,
|
|
43
|
+
I as mergeFlows,
|
|
44
|
+
m as sanitize,
|
|
45
|
+
g as sanitizeHttpResponse,
|
|
46
|
+
c as serializableToFile,
|
|
47
|
+
S as useTheme,
|
|
48
|
+
F as useTreegeConfig,
|
|
49
|
+
R as useTreegeRenderer
|
|
49
50
|
};
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { j as t } from "./ThemeContext-BBEqRK_Q.js";
|
|
2
|
+
import { Slot as f } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as x } from "class-variance-authority";
|
|
4
|
+
import * as u from "@radix-ui/react-checkbox";
|
|
5
|
+
import { CheckIcon as p, ChevronDownIcon as g, ChevronUpIcon as b, SearchIcon as v } from "lucide-react";
|
|
6
|
+
import * as h from "@radix-ui/react-label";
|
|
7
|
+
import * as l from "@radix-ui/react-popover";
|
|
8
|
+
import * as s from "@radix-ui/react-select";
|
|
9
|
+
import * as m from "@radix-ui/react-switch";
|
|
10
|
+
import { Command as i } from "cmdk";
|
|
11
|
+
import "@radix-ui/react-dialog";
|
|
12
|
+
import * as w from "@radix-ui/react-separator";
|
|
13
|
+
import { clsx as j } from "clsx";
|
|
14
|
+
import { twMerge as k } from "tailwind-merge";
|
|
15
|
+
function r(...e) {
|
|
16
|
+
return k(j(e));
|
|
17
|
+
}
|
|
18
|
+
const y = x(
|
|
19
|
+
"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",
|
|
20
|
+
{
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
size: "default",
|
|
23
|
+
variant: "default"
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
size: {
|
|
27
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
28
|
+
icon: "size-9",
|
|
29
|
+
"icon-lg": "size-10",
|
|
30
|
+
"icon-sm": "size-8",
|
|
31
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
32
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5"
|
|
33
|
+
},
|
|
34
|
+
variant: {
|
|
35
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
36
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
37
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
38
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
39
|
+
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",
|
|
40
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
function B({
|
|
46
|
+
className: e,
|
|
47
|
+
variant: a,
|
|
48
|
+
size: o,
|
|
49
|
+
asChild: n = !1,
|
|
50
|
+
...c
|
|
51
|
+
}) {
|
|
52
|
+
const d = n ? f : "button";
|
|
53
|
+
return /* @__PURE__ */ t.jsx(d, { "data-slot": "button", className: r(y({ className: e, size: o, variant: a })), ...c });
|
|
54
|
+
}
|
|
55
|
+
function V({ className: e, ...a }) {
|
|
56
|
+
return /* @__PURE__ */ t.jsx(
|
|
57
|
+
u.Root,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "checkbox",
|
|
60
|
+
className: r(
|
|
61
|
+
"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",
|
|
62
|
+
e
|
|
63
|
+
),
|
|
64
|
+
...a,
|
|
65
|
+
children: /* @__PURE__ */ t.jsx(u.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none", children: /* @__PURE__ */ t.jsx(p, { className: "size-3.5" }) })
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function D({ className: e, ...a }) {
|
|
70
|
+
return /* @__PURE__ */ t.jsx("div", { "data-slot": "form-item", className: r("grid gap-2", e), ...a });
|
|
71
|
+
}
|
|
72
|
+
function E({ className: e, ...a }) {
|
|
73
|
+
return /* @__PURE__ */ t.jsx("p", { "data-slot": "form-description", className: r("text-muted-foreground text-xs", e), ...a });
|
|
74
|
+
}
|
|
75
|
+
function F({ className: e, ...a }) {
|
|
76
|
+
return /* @__PURE__ */ t.jsx("p", { "data-slot": "form-error", className: r("text-destructive text-xs", e), ...a });
|
|
77
|
+
}
|
|
78
|
+
function G({ className: e, type: a, ...o }) {
|
|
79
|
+
return /* @__PURE__ */ t.jsx(
|
|
80
|
+
"input",
|
|
81
|
+
{
|
|
82
|
+
type: a,
|
|
83
|
+
"data-slot": "input",
|
|
84
|
+
className: r(
|
|
85
|
+
"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",
|
|
86
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
87
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
88
|
+
e
|
|
89
|
+
),
|
|
90
|
+
...o
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
const U = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx(
|
|
95
|
+
h.Root,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "label",
|
|
98
|
+
className: r(
|
|
99
|
+
"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",
|
|
100
|
+
e
|
|
101
|
+
),
|
|
102
|
+
...a
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
function q({ ...e }) {
|
|
106
|
+
return /* @__PURE__ */ t.jsx(l.Root, { "data-slot": "popover", ...e });
|
|
107
|
+
}
|
|
108
|
+
function M({ ...e }) {
|
|
109
|
+
return /* @__PURE__ */ t.jsx(l.Trigger, { "data-slot": "popover-trigger", ...e });
|
|
110
|
+
}
|
|
111
|
+
function $({
|
|
112
|
+
className: e,
|
|
113
|
+
align: a = "center",
|
|
114
|
+
sideOffset: o = 4,
|
|
115
|
+
disablePortal: n = !1,
|
|
116
|
+
...c
|
|
117
|
+
}) {
|
|
118
|
+
const d = /* @__PURE__ */ t.jsx(
|
|
119
|
+
l.Content,
|
|
120
|
+
{
|
|
121
|
+
"data-slot": "popover-content",
|
|
122
|
+
align: a,
|
|
123
|
+
sideOffset: o,
|
|
124
|
+
className: r(
|
|
125
|
+
"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",
|
|
126
|
+
e
|
|
127
|
+
),
|
|
128
|
+
...c
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
return n ? d : /* @__PURE__ */ t.jsx(l.Portal, { children: d });
|
|
132
|
+
}
|
|
133
|
+
const A = ({ ...e }) => /* @__PURE__ */ t.jsx(s.Root, { "data-slot": "select", ...e }), H = ({ ...e }) => /* @__PURE__ */ t.jsx(s.Group, { "data-slot": "select-group", ...e }), J = ({ ...e }) => /* @__PURE__ */ t.jsx(s.Value, { "data-slot": "select-value", ...e }), K = ({
|
|
134
|
+
className: e,
|
|
135
|
+
size: a = "default",
|
|
136
|
+
children: o,
|
|
137
|
+
...n
|
|
138
|
+
}) => /* @__PURE__ */ t.jsxs(
|
|
139
|
+
s.Trigger,
|
|
140
|
+
{
|
|
141
|
+
"data-slot": "select-trigger",
|
|
142
|
+
"data-size": a,
|
|
143
|
+
className: r(
|
|
144
|
+
"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",
|
|
145
|
+
e
|
|
146
|
+
),
|
|
147
|
+
...n,
|
|
148
|
+
children: [
|
|
149
|
+
o,
|
|
150
|
+
/* @__PURE__ */ t.jsx(s.Icon, { asChild: !0, children: /* @__PURE__ */ t.jsx(g, { className: "size-4 opacity-50" }) })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
), O = ({ className: e, children: a, position: o = "popper", ...n }) => /* @__PURE__ */ t.jsx(s.Portal, { children: /* @__PURE__ */ t.jsxs(
|
|
154
|
+
s.Content,
|
|
155
|
+
{
|
|
156
|
+
"data-slot": "select-content",
|
|
157
|
+
className: r(
|
|
158
|
+
"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",
|
|
159
|
+
o === "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",
|
|
160
|
+
e
|
|
161
|
+
),
|
|
162
|
+
position: o,
|
|
163
|
+
...n,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ t.jsx(z, {}),
|
|
166
|
+
/* @__PURE__ */ t.jsx(
|
|
167
|
+
s.Viewport,
|
|
168
|
+
{
|
|
169
|
+
className: r(
|
|
170
|
+
"p-1",
|
|
171
|
+
o === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
172
|
+
),
|
|
173
|
+
children: a
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ t.jsx(N, {})
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
) }), Q = ({
|
|
180
|
+
className: e,
|
|
181
|
+
htmlFor: a,
|
|
182
|
+
children: o,
|
|
183
|
+
...n
|
|
184
|
+
}) => /* @__PURE__ */ t.jsx(s.Label, { "data-slot": "select-label", className: r("pb-1.5 font-medium text-muted-foreground text-sm", e), ...n, children: /* @__PURE__ */ t.jsx("label", { htmlFor: a, children: o }) }), W = ({ className: e, children: a, ...o }) => /* @__PURE__ */ t.jsxs(
|
|
185
|
+
s.Item,
|
|
186
|
+
{
|
|
187
|
+
"data-slot": "select-item",
|
|
188
|
+
className: r(
|
|
189
|
+
"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",
|
|
190
|
+
e
|
|
191
|
+
),
|
|
192
|
+
...o,
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(s.ItemIndicator, { children: /* @__PURE__ */ t.jsx(p, { className: "size-4" }) }) }),
|
|
195
|
+
/* @__PURE__ */ t.jsx(s.ItemText, { children: a })
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
), z = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx(
|
|
199
|
+
s.ScrollUpButton,
|
|
200
|
+
{
|
|
201
|
+
"data-slot": "select-scroll-up-button",
|
|
202
|
+
className: r("flex cursor-default items-center justify-center py-1", e),
|
|
203
|
+
...a,
|
|
204
|
+
children: /* @__PURE__ */ t.jsx(b, { className: "size-4" })
|
|
205
|
+
}
|
|
206
|
+
), N = ({ className: e, ...a }) => /* @__PURE__ */ t.jsx(
|
|
207
|
+
s.ScrollDownButton,
|
|
208
|
+
{
|
|
209
|
+
"data-slot": "select-scroll-down-button",
|
|
210
|
+
className: r("flex cursor-default items-center justify-center py-1", e),
|
|
211
|
+
...a,
|
|
212
|
+
children: /* @__PURE__ */ t.jsx(g, { className: "size-4" })
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
function X({ className: e, ...a }) {
|
|
216
|
+
return /* @__PURE__ */ t.jsx(
|
|
217
|
+
"textarea",
|
|
218
|
+
{
|
|
219
|
+
"data-slot": "textarea",
|
|
220
|
+
className: r(
|
|
221
|
+
"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",
|
|
222
|
+
e
|
|
223
|
+
),
|
|
224
|
+
...a
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
function Y({ className: e, ...a }) {
|
|
229
|
+
return /* @__PURE__ */ t.jsx(
|
|
230
|
+
m.Root,
|
|
231
|
+
{
|
|
232
|
+
"data-slot": "switch",
|
|
233
|
+
className: r(
|
|
234
|
+
"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",
|
|
235
|
+
e
|
|
236
|
+
),
|
|
237
|
+
...a,
|
|
238
|
+
children: /* @__PURE__ */ t.jsx(
|
|
239
|
+
m.Thumb,
|
|
240
|
+
{
|
|
241
|
+
"data-slot": "switch-thumb",
|
|
242
|
+
className: r(
|
|
243
|
+
"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"
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
function Z({ className: e, ...a }) {
|
|
251
|
+
return /* @__PURE__ */ t.jsx(
|
|
252
|
+
i,
|
|
253
|
+
{
|
|
254
|
+
"data-slot": "command",
|
|
255
|
+
className: r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", e),
|
|
256
|
+
...a
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
function ee({ className: e, ...a }) {
|
|
261
|
+
return /* @__PURE__ */ t.jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [
|
|
262
|
+
/* @__PURE__ */ t.jsx(v, { className: "size-4 shrink-0 opacity-50" }),
|
|
263
|
+
/* @__PURE__ */ t.jsx(
|
|
264
|
+
i.Input,
|
|
265
|
+
{
|
|
266
|
+
"data-slot": "command-input",
|
|
267
|
+
className: r(
|
|
268
|
+
"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",
|
|
269
|
+
e
|
|
270
|
+
),
|
|
271
|
+
...a
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
] });
|
|
275
|
+
}
|
|
276
|
+
function te({ className: e, ...a }) {
|
|
277
|
+
return /* @__PURE__ */ t.jsx(
|
|
278
|
+
i.List,
|
|
279
|
+
{
|
|
280
|
+
"data-slot": "command-list",
|
|
281
|
+
className: r("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", e),
|
|
282
|
+
...a
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
function ae({ ...e }) {
|
|
287
|
+
return /* @__PURE__ */ t.jsx(i.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...e });
|
|
288
|
+
}
|
|
289
|
+
function re({ className: e, ...a }) {
|
|
290
|
+
return /* @__PURE__ */ t.jsx(
|
|
291
|
+
i.Group,
|
|
292
|
+
{
|
|
293
|
+
"data-slot": "command-group",
|
|
294
|
+
className: r(
|
|
295
|
+
"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",
|
|
296
|
+
e
|
|
297
|
+
),
|
|
298
|
+
...a
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
function oe({ className: e, ...a }) {
|
|
303
|
+
return /* @__PURE__ */ t.jsx(
|
|
304
|
+
i.Item,
|
|
305
|
+
{
|
|
306
|
+
"data-slot": "command-item",
|
|
307
|
+
className: r(
|
|
308
|
+
"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",
|
|
309
|
+
e
|
|
310
|
+
),
|
|
311
|
+
...a
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
function se({
|
|
316
|
+
className: e,
|
|
317
|
+
orientation: a = "horizontal",
|
|
318
|
+
decorative: o = !0,
|
|
319
|
+
...n
|
|
320
|
+
}) {
|
|
321
|
+
return /* @__PURE__ */ t.jsx(
|
|
322
|
+
w.Root,
|
|
323
|
+
{
|
|
324
|
+
"data-slot": "separator",
|
|
325
|
+
decorative: o,
|
|
326
|
+
orientation: a,
|
|
327
|
+
className: r(
|
|
328
|
+
"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
|
|
329
|
+
e
|
|
330
|
+
),
|
|
331
|
+
...n
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
export {
|
|
336
|
+
B,
|
|
337
|
+
Z as C,
|
|
338
|
+
D as F,
|
|
339
|
+
G as I,
|
|
340
|
+
U as L,
|
|
341
|
+
q as P,
|
|
342
|
+
A as S,
|
|
343
|
+
X as T,
|
|
344
|
+
te as a,
|
|
345
|
+
ae as b,
|
|
346
|
+
re as c,
|
|
347
|
+
oe as d,
|
|
348
|
+
F as e,
|
|
349
|
+
E as f,
|
|
350
|
+
M as g,
|
|
351
|
+
$ as h,
|
|
352
|
+
ee as i,
|
|
353
|
+
r as j,
|
|
354
|
+
V as k,
|
|
355
|
+
y as l,
|
|
356
|
+
K as m,
|
|
357
|
+
J as n,
|
|
358
|
+
O as o,
|
|
359
|
+
H as p,
|
|
360
|
+
W as q,
|
|
361
|
+
Y as r,
|
|
362
|
+
se as s,
|
|
363
|
+
Q as t
|
|
364
|
+
};
|
|
@@ -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;
|
|
@@ -125,8 +125,8 @@ declare const _default: {
|
|
|
125
125
|
"searchParameterDesc": "إذا تم تعيينه، يتم تمكين مربع بحث يضيف هذا المعامل إلى استدعاءات API (مثال: ?q=باريس)",
|
|
126
126
|
"searchParameterPlaceholder": "q، بحث، استعلام...",
|
|
127
127
|
"selectMethod": "اختر الطريقة",
|
|
128
|
-
"
|
|
129
|
-
"
|
|
128
|
+
"sendAllFormValues": "إرسال جميع بيانات النموذج",
|
|
129
|
+
"sendAllFormValuesDesc": "إرسال جميع قيم النموذج تلقائياً كمحتوى JSON",
|
|
130
130
|
"showLoadingState": "إظهار حالة التحميل",
|
|
131
131
|
"valueField": "حقل القيمة",
|
|
132
132
|
"valueFieldDesc": "الحقل المستخدم كقيمة خيار (مثال: id)",
|
|
@@ -239,8 +239,8 @@ declare const _default: {
|
|
|
239
239
|
"requestBodyDesc": "استخدم {{fieldId}} للإشارة إلى حقول أخرى. تأكد من تنسيق JSON الصحيح بما في ذلك علامات الاقتباس حول القيم النصية.",
|
|
240
240
|
"requestBodyPlaceholder": "{\"name\": \"{{userName}}\", \"email\": \"{{userEmail}}\"}",
|
|
241
241
|
"selectMethod": "اختر الطريقة",
|
|
242
|
-
"
|
|
243
|
-
"
|
|
242
|
+
"sendAllFormValues": "إرسال جميع بيانات النموذج",
|
|
243
|
+
"sendAllFormValuesDesc": "إرسال جميع قيم النموذج تلقائياً كمحتوى JSON",
|
|
244
244
|
"showLoadingState": "إظهار حالة التحميل",
|
|
245
245
|
"successMessage": "رسالة النجاح",
|
|
246
246
|
"successMessageDesc": "الرسالة المعروضة عند نجاح الإرسال",
|
|
@@ -256,7 +256,9 @@ declare const _default: {
|
|
|
256
256
|
"renderer": {
|
|
257
257
|
"defaultAddressInput": {
|
|
258
258
|
"enterAddress": "أدخل عنواناً...",
|
|
259
|
-
"noAddressesFound": "لم يتم العثور على عناوين."
|
|
259
|
+
"noAddressesFound": "لم يتم العثور على عناوين.",
|
|
260
|
+
"searching": "جاري البحث...",
|
|
261
|
+
"typeMinChars": "اكتب 3 أحرف على الأقل للبحث"
|
|
260
262
|
},
|
|
261
263
|
"defaultAutocompleteInput": {
|
|
262
264
|
"noResults": "لم يتم العثور على نتائج.",
|
|
@@ -276,11 +278,17 @@ declare const _default: {
|
|
|
276
278
|
"waitingForRequiredFields": "في انتظار الحقول المطلوبة"
|
|
277
279
|
},
|
|
278
280
|
"defaultInputs": {
|
|
281
|
+
"addMoreFiles": "إضافة المزيد من الملفات",
|
|
279
282
|
"endDate": "تاريخ الانتهاء",
|
|
280
283
|
"endTime": "وقت الانتهاء",
|
|
284
|
+
"filePickerError": "فشل في اختيار الملف",
|
|
285
|
+
"filePickerUnavailable": "اختيار الملفات غير متاح. يرجى تثبيت react-native-document-picker.",
|
|
286
|
+
"replaceFile": "استبدال الملف",
|
|
281
287
|
"required": "*",
|
|
282
288
|
"selectDate": "اختر التاريخ",
|
|
283
289
|
"selectDateRange": "اختر نطاق التاريخ",
|
|
290
|
+
"selectFile": "اختر ملف",
|
|
291
|
+
"selectFiles": "اختر ملفات",
|
|
284
292
|
"startDate": "تاريخ البدء",
|
|
285
293
|
"startTime": "وقت البدء"
|
|
286
294
|
},
|