rechtspilot-ui 1.4.2 → 1.5.0
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/chunks-native.cjs +1 -1
- package/dist/chunks-native.js +426 -408
- package/dist/chunks.cjs +1 -1
- package/dist/chunks.js +23 -4
- package/dist/icons.cjs +1 -1
- package/dist/icons.d.ts +2 -0
- package/dist/icons.es.js +2 -2
- package/dist/icons.native.cjs +1 -1
- package/dist/icons.native.es.js +2 -2
- package/dist/index.cjs +96 -96
- package/dist/index.es.js +301 -301
- package/dist/index.native.cjs +3 -1
- package/dist/index.native.es.js +1047 -267
- package/dist/native/components/Badge/Badge.native.d.ts +10 -0
- package/dist/native/components/Card/Card.native.d.ts +12 -0
- package/dist/native/components/Divider/Divider.native.d.ts +2 -0
- package/dist/native/components/EmptyState/EmptyState.native.d.ts +9 -0
- package/dist/native/components/Input/Input.native.d.ts +3 -1
- package/dist/native/components/Letter/Letter.native.d.ts +69 -0
- package/dist/native/components/MenuItem/MenuItem.native.d.ts +10 -0
- package/dist/native/components/RadioCard/RadioCard.native.d.ts +11 -0
- package/dist/native/components/Sheet/Sheet.native.d.ts +3 -1
- package/dist/native/components/Spinner/Spinner.native.d.ts +2 -1
- package/dist/native/components/StepProgress/StepProgress.native.d.ts +11 -0
- package/dist/native/components/Toaster/Toaster.native.d.ts +1 -0
- package/dist/native/icons/Warning.d.ts +2 -0
- package/dist/native/icons/index.d.ts +1 -0
- package/dist/native/icons/index.native.d.ts +1 -0
- package/dist/native/icons/native/Warning.native.d.ts +2 -0
- package/dist/native/icons/toast/Error.native.d.ts +1 -0
- package/dist/native/icons/toast/Info.native.d.ts +1 -0
- package/dist/native/icons/toast/Success.native.d.ts +1 -0
- package/dist/native/icons/toast/Warning.native.d.ts +1 -0
- package/dist/native/index.native.d.ts +16 -0
- package/package.json +2 -2
package/dist/index.native.es.js
CHANGED
|
@@ -1,47 +1,96 @@
|
|
|
1
|
-
import { G as e, J as t, K as n,
|
|
2
|
-
import * as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { Animated as
|
|
5
|
-
import { Circle as x, Path as S, Svg as C } from "react-native-svg";
|
|
1
|
+
import { G as e, J as t, K as n, W as r, Y as i, q as a, t as o } from "./chunks-native.js";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { createContext as c, useContext as l, useEffect as u, useRef as d, useState as f } from "react";
|
|
4
|
+
import { Animated as p, Easing as m, KeyboardAvoidingView as h, Modal as g, Platform as _, Pressable as v, ScrollView as y, StyleSheet as b, Text as x, TextInput as ee, TouchableOpacity as S, View as C } from "react-native";
|
|
6
5
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
6
|
+
import { Circle as D, Path as O, Svg as k } from "react-native-svg";
|
|
7
|
+
import { useSafeAreaInsets as te } from "react-native-safe-area-context";
|
|
8
|
+
//#region src/components/Text/Text.native.tsx
|
|
9
|
+
var ne = {
|
|
10
|
+
heading: 20,
|
|
11
|
+
title: 16,
|
|
12
|
+
label: 13,
|
|
13
|
+
body: 15,
|
|
14
|
+
caption: 12
|
|
15
|
+
};
|
|
16
|
+
function A({ variant: e = "body", color: t, style: n, ...r }) {
|
|
17
|
+
return /* @__PURE__ */ T(x, {
|
|
18
|
+
style: [
|
|
19
|
+
i[e],
|
|
20
|
+
{ fontSize: ne[e] },
|
|
21
|
+
t ? { color: t } : void 0,
|
|
22
|
+
n
|
|
23
|
+
],
|
|
24
|
+
...r
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/Badge/Badge.native.tsx
|
|
29
|
+
function re({ icon: e, children: n, backgroundColor: r = t.neutral["800-A08"], textColor: i = t.fg.primary, style: a }) {
|
|
30
|
+
return /* @__PURE__ */ E(C, {
|
|
31
|
+
style: [
|
|
32
|
+
ie.badge,
|
|
33
|
+
{ backgroundColor: r },
|
|
34
|
+
a
|
|
35
|
+
],
|
|
36
|
+
children: [e, /* @__PURE__ */ T(A, {
|
|
37
|
+
variant: "label",
|
|
38
|
+
color: i,
|
|
39
|
+
style: ie.label,
|
|
40
|
+
children: n
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
var ie = b.create({
|
|
45
|
+
badge: {
|
|
46
|
+
flexDirection: "row",
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
gap: 4,
|
|
49
|
+
height: 30,
|
|
50
|
+
paddingHorizontal: 6,
|
|
51
|
+
borderRadius: 8
|
|
52
|
+
},
|
|
53
|
+
label: { textTransform: "uppercase" }
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
8
56
|
//#region src/components/Spinner/Spinner.native.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
57
|
+
function j({ size: e = 24, color: n = t.fg.primary, trackColor: r = t.neutral["800-A08"], duration: i = 1e3, style: a }) {
|
|
58
|
+
let o = d(new p.Value(0)).current;
|
|
59
|
+
u(() => {
|
|
60
|
+
o.setValue(0);
|
|
61
|
+
let e = p.loop(p.timing(o, {
|
|
13
62
|
toValue: 1,
|
|
14
|
-
duration:
|
|
15
|
-
easing:
|
|
63
|
+
duration: i,
|
|
64
|
+
easing: m.linear,
|
|
16
65
|
useNativeDriver: !0
|
|
17
66
|
}));
|
|
18
67
|
return e.start(), () => e.stop();
|
|
19
|
-
}, [
|
|
20
|
-
let
|
|
68
|
+
}, [o, i]);
|
|
69
|
+
let s = o.interpolate({
|
|
21
70
|
inputRange: [0, 1],
|
|
22
71
|
outputRange: ["0deg", "360deg"]
|
|
23
72
|
});
|
|
24
|
-
return /* @__PURE__ */ T(
|
|
73
|
+
return /* @__PURE__ */ T(p.View, {
|
|
25
74
|
style: [{
|
|
26
75
|
width: e,
|
|
27
76
|
height: e,
|
|
28
|
-
transform: [{ rotate:
|
|
29
|
-
},
|
|
30
|
-
children: /* @__PURE__ */ E(
|
|
77
|
+
transform: [{ rotate: s }]
|
|
78
|
+
}, a],
|
|
79
|
+
children: /* @__PURE__ */ E(k, {
|
|
31
80
|
width: e,
|
|
32
81
|
height: e,
|
|
33
82
|
viewBox: "0 0 24 24",
|
|
34
83
|
fill: "none",
|
|
35
|
-
children: [/* @__PURE__ */ T(
|
|
84
|
+
children: [/* @__PURE__ */ T(D, {
|
|
36
85
|
cx: "12",
|
|
37
86
|
cy: "12",
|
|
38
87
|
r: "8",
|
|
39
|
-
stroke:
|
|
88
|
+
stroke: r,
|
|
40
89
|
strokeWidth: 3,
|
|
41
90
|
fill: "none"
|
|
42
|
-
}), /* @__PURE__ */ T(
|
|
91
|
+
}), /* @__PURE__ */ T(O, {
|
|
43
92
|
d: "M12 4C16.4183 4 20 7.58172 20 12C20 14.1304 19.1672 16.0663 17.8095 17.5",
|
|
44
|
-
stroke:
|
|
93
|
+
stroke: n,
|
|
45
94
|
strokeWidth: 3,
|
|
46
95
|
strokeLinecap: "round",
|
|
47
96
|
fill: "none"
|
|
@@ -51,7 +100,7 @@ function O({ size: e = 24, color: t = r.fg.primary, trackColor: n = r.neutral["8
|
|
|
51
100
|
}
|
|
52
101
|
//#endregion
|
|
53
102
|
//#region src/components/Button/Button.native.tsx
|
|
54
|
-
var
|
|
103
|
+
var ae = (e) => {
|
|
55
104
|
let n = {
|
|
56
105
|
alignItems: "center",
|
|
57
106
|
borderRadius: 12,
|
|
@@ -60,8 +109,8 @@ var k = (e) => {
|
|
|
60
109
|
height: 48,
|
|
61
110
|
justifyContent: "center",
|
|
62
111
|
paddingHorizontal: 16
|
|
63
|
-
},
|
|
64
|
-
fontFamily:
|
|
112
|
+
}, r = {
|
|
113
|
+
fontFamily: i.body.fontFamily,
|
|
65
114
|
fontSize: 15,
|
|
66
115
|
fontWeight: "500",
|
|
67
116
|
textAlign: "center"
|
|
@@ -70,114 +119,207 @@ var k = (e) => {
|
|
|
70
119
|
case "primary": return {
|
|
71
120
|
container: {
|
|
72
121
|
...n,
|
|
73
|
-
backgroundColor:
|
|
74
|
-
borderColor:
|
|
122
|
+
backgroundColor: t.primary[500],
|
|
123
|
+
borderColor: t.neutral["800-A16"]
|
|
75
124
|
},
|
|
76
125
|
text: {
|
|
77
|
-
...
|
|
78
|
-
color:
|
|
126
|
+
...r,
|
|
127
|
+
color: t.primary[900]
|
|
79
128
|
}
|
|
80
129
|
};
|
|
81
130
|
case "secondary": return {
|
|
82
131
|
container: {
|
|
83
132
|
...n,
|
|
84
|
-
backgroundColor:
|
|
85
|
-
borderColor:
|
|
133
|
+
backgroundColor: t.primary[900],
|
|
134
|
+
borderColor: t.neutral["800-A16"]
|
|
86
135
|
},
|
|
87
136
|
text: {
|
|
88
|
-
...
|
|
89
|
-
color:
|
|
137
|
+
...r,
|
|
138
|
+
color: t.white
|
|
90
139
|
}
|
|
91
140
|
};
|
|
92
141
|
case "tertiary": return {
|
|
93
142
|
container: {
|
|
94
143
|
...n,
|
|
95
|
-
backgroundColor:
|
|
96
|
-
borderColor:
|
|
144
|
+
backgroundColor: t.neutral["800-A04"],
|
|
145
|
+
borderColor: t.neutral["800-A08"]
|
|
97
146
|
},
|
|
98
147
|
text: {
|
|
99
|
-
...
|
|
100
|
-
color:
|
|
148
|
+
...r,
|
|
149
|
+
color: t.primary[900]
|
|
101
150
|
}
|
|
102
151
|
};
|
|
103
152
|
case "destructive": return {
|
|
104
153
|
container: {
|
|
105
154
|
...n,
|
|
106
|
-
backgroundColor:
|
|
107
|
-
borderColor:
|
|
155
|
+
backgroundColor: t.fg.accent.error,
|
|
156
|
+
borderColor: t.fg.accent.error
|
|
108
157
|
},
|
|
109
158
|
text: {
|
|
110
|
-
...
|
|
111
|
-
color:
|
|
159
|
+
...r,
|
|
160
|
+
color: t.white
|
|
112
161
|
}
|
|
113
162
|
};
|
|
114
163
|
case "destructiveSubtle": return {
|
|
115
164
|
container: {
|
|
116
165
|
...n,
|
|
117
|
-
backgroundColor:
|
|
118
|
-
borderColor:
|
|
166
|
+
backgroundColor: t.cream,
|
|
167
|
+
borderColor: t.palePeach
|
|
119
168
|
},
|
|
120
169
|
text: {
|
|
121
|
-
...
|
|
122
|
-
color:
|
|
170
|
+
...r,
|
|
171
|
+
color: t.fg.accent.error
|
|
123
172
|
}
|
|
124
173
|
};
|
|
125
174
|
}
|
|
126
175
|
};
|
|
127
|
-
function
|
|
128
|
-
let c =
|
|
129
|
-
return /* @__PURE__ */ E(
|
|
130
|
-
style:
|
|
176
|
+
function oe({ variant: e = "primary", fullWidth: n = !1, children: r, loading: i = !1, disabled: a = !1, onPress: o, ...s }) {
|
|
177
|
+
let c = ae(e);
|
|
178
|
+
return /* @__PURE__ */ E(S, {
|
|
179
|
+
style: b.flatten([
|
|
131
180
|
c.container,
|
|
132
|
-
|
|
181
|
+
n && { width: "100%" },
|
|
133
182
|
(a || i) && { opacity: .4 }
|
|
134
183
|
]),
|
|
135
184
|
onPress: o,
|
|
136
185
|
disabled: a || i,
|
|
137
186
|
activeOpacity: .7,
|
|
138
187
|
...s,
|
|
139
|
-
children: [typeof
|
|
188
|
+
children: [typeof r == "string" ? /* @__PURE__ */ T(x, {
|
|
140
189
|
style: c.text,
|
|
141
|
-
children:
|
|
142
|
-
}) :
|
|
190
|
+
children: r
|
|
191
|
+
}) : r, i && /* @__PURE__ */ T(j, {
|
|
143
192
|
size: 16,
|
|
144
|
-
color: e === "secondary" ?
|
|
193
|
+
color: e === "secondary" ? t.primary[600] : e === "destructiveSubtle" ? t.fg.accent.error : t.white
|
|
145
194
|
})]
|
|
146
195
|
});
|
|
147
196
|
}
|
|
148
197
|
//#endregion
|
|
149
|
-
//#region src/components/
|
|
150
|
-
var
|
|
198
|
+
//#region src/components/Card/Card.native.tsx
|
|
199
|
+
var se = {
|
|
200
|
+
outlined: {
|
|
201
|
+
backgroundColor: t.white,
|
|
202
|
+
borderWidth: 1,
|
|
203
|
+
borderColor: t.neutral["800-A08"]
|
|
204
|
+
},
|
|
205
|
+
tinted: { backgroundColor: t.primary["600-A08"] },
|
|
206
|
+
elevated: {
|
|
207
|
+
backgroundColor: t.bg.base,
|
|
208
|
+
shadowColor: t.black,
|
|
209
|
+
shadowOpacity: .24,
|
|
210
|
+
shadowRadius: 16,
|
|
211
|
+
shadowOffset: {
|
|
212
|
+
width: 0,
|
|
213
|
+
height: 0
|
|
214
|
+
},
|
|
215
|
+
elevation: 8
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
function ce({ variant: e = "outlined", radius: t = 16, padding: n = 16, backgroundColor: r, style: i, children: a }) {
|
|
219
|
+
return /* @__PURE__ */ T(C, {
|
|
220
|
+
style: [
|
|
221
|
+
le.base,
|
|
222
|
+
se[e],
|
|
223
|
+
{
|
|
224
|
+
borderRadius: t,
|
|
225
|
+
padding: n
|
|
226
|
+
},
|
|
227
|
+
r ? { backgroundColor: r } : void 0,
|
|
228
|
+
i
|
|
229
|
+
],
|
|
230
|
+
children: a
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
var le = b.create({ base: { width: "100%" } });
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/components/Divider/Divider.native.tsx
|
|
236
|
+
function ue({ style: e, ...t }) {
|
|
237
|
+
return /* @__PURE__ */ T(C, {
|
|
238
|
+
style: [de.divider, e],
|
|
239
|
+
...t
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
var de = b.create({ divider: {
|
|
243
|
+
height: 1,
|
|
244
|
+
width: "100%",
|
|
245
|
+
backgroundColor: t.border.default,
|
|
246
|
+
marginVertical: 12
|
|
247
|
+
} });
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/components/EmptyState/EmptyState.native.tsx
|
|
250
|
+
function fe({ icon: e, title: n, description: r, actionLabel: i, onAction: a }) {
|
|
251
|
+
return /* @__PURE__ */ E(C, {
|
|
252
|
+
style: M.container,
|
|
253
|
+
children: [
|
|
254
|
+
e,
|
|
255
|
+
/* @__PURE__ */ T(A, {
|
|
256
|
+
variant: "title",
|
|
257
|
+
style: M.title,
|
|
258
|
+
children: n
|
|
259
|
+
}),
|
|
260
|
+
r && /* @__PURE__ */ T(A, {
|
|
261
|
+
variant: "body",
|
|
262
|
+
color: t.fg.secondary,
|
|
263
|
+
style: M.description,
|
|
264
|
+
children: r
|
|
265
|
+
}),
|
|
266
|
+
i && a && /* @__PURE__ */ T(C, {
|
|
267
|
+
style: M.action,
|
|
268
|
+
children: /* @__PURE__ */ T(oe, {
|
|
269
|
+
variant: "secondary",
|
|
270
|
+
onPress: a,
|
|
271
|
+
children: i
|
|
272
|
+
})
|
|
273
|
+
})
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
var M = b.create({
|
|
278
|
+
container: {
|
|
279
|
+
alignItems: "center",
|
|
280
|
+
justifyContent: "center",
|
|
281
|
+
padding: 24
|
|
282
|
+
},
|
|
283
|
+
title: {
|
|
284
|
+
marginTop: 12,
|
|
285
|
+
textAlign: "center"
|
|
286
|
+
},
|
|
287
|
+
description: {
|
|
288
|
+
marginTop: 4,
|
|
289
|
+
textAlign: "center"
|
|
290
|
+
},
|
|
291
|
+
action: { marginTop: 16 }
|
|
292
|
+
}), pe = {
|
|
151
293
|
sm: 32,
|
|
152
294
|
md: 40,
|
|
153
295
|
lg: 48
|
|
154
|
-
},
|
|
155
|
-
base: { backgroundColor:
|
|
156
|
-
primary: { backgroundColor:
|
|
296
|
+
}, me = {
|
|
297
|
+
base: { backgroundColor: t.sf.base },
|
|
298
|
+
primary: { backgroundColor: t.primary["600-A08"] },
|
|
157
299
|
outline: {
|
|
158
300
|
borderWidth: 1,
|
|
159
|
-
borderColor:
|
|
301
|
+
borderColor: t.sf.base
|
|
160
302
|
}
|
|
161
|
-
},
|
|
162
|
-
base: { backgroundColor:
|
|
163
|
-
primary: { backgroundColor:
|
|
164
|
-
outline: { backgroundColor:
|
|
303
|
+
}, he = {
|
|
304
|
+
base: { backgroundColor: t.neutral["800-A08"] },
|
|
305
|
+
primary: { backgroundColor: t.primary[50] },
|
|
306
|
+
outline: { backgroundColor: t.sf.tertiaryHover }
|
|
165
307
|
};
|
|
166
|
-
function
|
|
167
|
-
let o =
|
|
308
|
+
function N({ children: e, size: t = "md", variant: n = "base", disabled: r = !1, hitSlop: i = 10, ...a }) {
|
|
309
|
+
let o = pe[t], s = {
|
|
168
310
|
width: o,
|
|
169
311
|
height: o,
|
|
170
312
|
borderRadius: o / 2,
|
|
171
313
|
alignItems: "center",
|
|
172
314
|
justifyContent: "center"
|
|
173
315
|
};
|
|
174
|
-
return /* @__PURE__ */ T(
|
|
316
|
+
return /* @__PURE__ */ T(v, {
|
|
175
317
|
accessibilityRole: "button",
|
|
176
318
|
...a,
|
|
177
319
|
style: ({ pressed: e }) => [
|
|
178
320
|
s,
|
|
179
|
-
|
|
180
|
-
e &&
|
|
321
|
+
me[n],
|
|
322
|
+
e && he[n],
|
|
181
323
|
r && { opacity: .4 }
|
|
182
324
|
],
|
|
183
325
|
disabled: r,
|
|
@@ -187,7 +329,7 @@ function P({ children: e, size: t = "md", variant: n = "base", disabled: r = !1,
|
|
|
187
329
|
}
|
|
188
330
|
//#endregion
|
|
189
331
|
//#region src/components/Input/Input.native.tsx
|
|
190
|
-
var
|
|
332
|
+
var P = b.create({
|
|
191
333
|
container: { marginBottom: 8 },
|
|
192
334
|
fieldContainer: {
|
|
193
335
|
height: 49,
|
|
@@ -195,17 +337,17 @@ var F = g.create({
|
|
|
195
337
|
borderRadius: 12,
|
|
196
338
|
flexDirection: "row",
|
|
197
339
|
alignItems: "center",
|
|
198
|
-
backgroundColor:
|
|
340
|
+
backgroundColor: t.bg.secondary,
|
|
199
341
|
borderWidth: 2,
|
|
200
|
-
borderColor:
|
|
342
|
+
borderColor: t.bg.tertiary
|
|
201
343
|
},
|
|
202
|
-
fieldContainerError: { borderColor:
|
|
203
|
-
fieldContainerFocused: { borderColor:
|
|
204
|
-
fieldContainerFocusedError: { borderColor:
|
|
344
|
+
fieldContainerError: { borderColor: t.fg.accent.error },
|
|
345
|
+
fieldContainerFocused: { borderColor: t.fg.base },
|
|
346
|
+
fieldContainerFocusedError: { borderColor: t.fg.accent.error },
|
|
205
347
|
formGroup: {
|
|
206
348
|
position: "relative",
|
|
207
349
|
paddingVertical: 14,
|
|
208
|
-
|
|
350
|
+
flex: 1,
|
|
209
351
|
height: "100%",
|
|
210
352
|
justifyContent: "center"
|
|
211
353
|
},
|
|
@@ -213,32 +355,42 @@ var F = g.create({
|
|
|
213
355
|
width: "100%",
|
|
214
356
|
paddingTop: 4,
|
|
215
357
|
backgroundColor: "transparent",
|
|
216
|
-
fontFamily:
|
|
358
|
+
fontFamily: i.body.fontFamily,
|
|
217
359
|
fontSize: 15,
|
|
218
360
|
fontWeight: "500",
|
|
219
|
-
color:
|
|
361
|
+
color: t.primary[900],
|
|
220
362
|
paddingBottom: 0
|
|
221
363
|
},
|
|
222
364
|
label: {
|
|
223
365
|
position: "absolute",
|
|
224
366
|
left: 0,
|
|
225
|
-
fontFamily:
|
|
367
|
+
fontFamily: i.body.fontFamily,
|
|
226
368
|
fontSize: 15,
|
|
227
369
|
fontWeight: "500",
|
|
228
|
-
color:
|
|
370
|
+
color: t.fg.tertiary
|
|
229
371
|
},
|
|
230
372
|
currencyPrefix: {
|
|
231
|
-
fontFamily:
|
|
373
|
+
fontFamily: i.body.fontFamily,
|
|
232
374
|
fontSize: 15,
|
|
233
375
|
fontWeight: "400",
|
|
234
|
-
color:
|
|
376
|
+
color: t.fg.secondary,
|
|
235
377
|
marginRight: 4,
|
|
236
378
|
alignSelf: "center"
|
|
237
379
|
},
|
|
380
|
+
prefixContainer: {
|
|
381
|
+
alignSelf: "center",
|
|
382
|
+
justifyContent: "center"
|
|
383
|
+
},
|
|
384
|
+
fieldDivider: {
|
|
385
|
+
width: 1,
|
|
386
|
+
height: 21,
|
|
387
|
+
backgroundColor: t.neutral["800-A08"],
|
|
388
|
+
marginHorizontal: 8
|
|
389
|
+
},
|
|
238
390
|
labelFloating: {
|
|
239
391
|
top: 2,
|
|
240
392
|
fontSize: 12,
|
|
241
|
-
color:
|
|
393
|
+
color: t.fg.secondary
|
|
242
394
|
},
|
|
243
395
|
labelNormal: {
|
|
244
396
|
top: "50%",
|
|
@@ -249,120 +401,456 @@ var F = g.create({
|
|
|
249
401
|
fontSize: 12,
|
|
250
402
|
paddingHorizontal: 4
|
|
251
403
|
},
|
|
252
|
-
helperError: { color:
|
|
253
|
-
helperNormal: { color:
|
|
404
|
+
helperError: { color: t.fg.accent.error },
|
|
405
|
+
helperNormal: { color: t.fg.secondary }
|
|
254
406
|
});
|
|
255
|
-
function
|
|
256
|
-
let [
|
|
257
|
-
|
|
258
|
-
i &&
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
],
|
|
407
|
+
function ge({ label: e, value: n = "", onChange: r, error: i, helperText: a, placeholder: o, secureTextEntry: s = !1, keyboardType: c, autoCapitalize: l = "sentences", editable: u = !0, multiline: d = !1, numberOfLines: p = 1, currency: m = !1, prefix: h, ...g }) {
|
|
408
|
+
let [_, v] = f(!1), y = n.length > 0, S = _ || y || m, D = [
|
|
409
|
+
P.fieldContainer,
|
|
410
|
+
i && P.fieldContainerError,
|
|
411
|
+
_ && !i && P.fieldContainerFocused,
|
|
412
|
+
_ && i && P.fieldContainerFocusedError
|
|
413
|
+
], O = [P.label, S ? P.labelFloating : P.labelNormal], k = b.flatten([P.input, d && {
|
|
262
414
|
height: p * 20,
|
|
263
415
|
textAlignVertical: "top"
|
|
264
416
|
}]);
|
|
265
|
-
return /* @__PURE__ */ E(
|
|
266
|
-
style:
|
|
267
|
-
children: [/* @__PURE__ */ E(
|
|
268
|
-
style:
|
|
269
|
-
children: [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
children: [/* @__PURE__ */ T(
|
|
275
|
-
style:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
417
|
+
return /* @__PURE__ */ E(C, {
|
|
418
|
+
style: P.container,
|
|
419
|
+
children: [/* @__PURE__ */ E(C, {
|
|
420
|
+
style: D,
|
|
421
|
+
children: [
|
|
422
|
+
m && /* @__PURE__ */ T(x, {
|
|
423
|
+
style: P.currencyPrefix,
|
|
424
|
+
children: "€"
|
|
425
|
+
}),
|
|
426
|
+
h && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(C, {
|
|
427
|
+
style: P.prefixContainer,
|
|
428
|
+
children: h
|
|
429
|
+
}), /* @__PURE__ */ T(C, { style: P.fieldDivider })] }),
|
|
430
|
+
/* @__PURE__ */ E(C, {
|
|
431
|
+
style: P.formGroup,
|
|
432
|
+
children: [/* @__PURE__ */ T(ee, {
|
|
433
|
+
style: k,
|
|
434
|
+
value: n,
|
|
435
|
+
onChangeText: r,
|
|
436
|
+
onFocus: () => v(!0),
|
|
437
|
+
onBlur: () => v(!1),
|
|
438
|
+
placeholder: S ? o : "",
|
|
439
|
+
placeholderTextColor: t.fg.tertiary,
|
|
440
|
+
secureTextEntry: s,
|
|
441
|
+
keyboardType: c ?? (m ? "numeric" : "default"),
|
|
442
|
+
autoCapitalize: l,
|
|
443
|
+
editable: u,
|
|
444
|
+
multiline: d,
|
|
445
|
+
numberOfLines: p,
|
|
446
|
+
...g
|
|
447
|
+
}), /* @__PURE__ */ T(x, {
|
|
448
|
+
style: O,
|
|
449
|
+
pointerEvents: "none",
|
|
450
|
+
children: e
|
|
451
|
+
})]
|
|
452
|
+
})
|
|
453
|
+
]
|
|
454
|
+
}), (i || a) && /* @__PURE__ */ T(x, {
|
|
455
|
+
style: [P.helper, i ? P.helperError : P.helperNormal],
|
|
296
456
|
children: i || a
|
|
297
457
|
})]
|
|
298
458
|
});
|
|
299
459
|
}
|
|
300
460
|
//#endregion
|
|
461
|
+
//#region src/components/Letter/Letter.native.tsx
|
|
462
|
+
var _e = 96 / 25.4, ve = 96 / 72, F = (e, t) => e * _e * t, I = (e, t) => e * ve * t, L = i.body.fontFamily, R = (e) => (e ?? "").replace(/<br\s*\/?>/gi, "\n").replace(/<[^>]+>/g, ""), ye = c(1);
|
|
463
|
+
function z(e) {
|
|
464
|
+
let t = l(ye);
|
|
465
|
+
return e ?? t;
|
|
466
|
+
}
|
|
467
|
+
function be({ children: e }) {
|
|
468
|
+
return /* @__PURE__ */ T(w, { children: e || "Date" });
|
|
469
|
+
}
|
|
470
|
+
function xe({ children: e }) {
|
|
471
|
+
return /* @__PURE__ */ T(w, { children: e || "Sehr geehrte Damen und Herren" });
|
|
472
|
+
}
|
|
473
|
+
function Se({ children: e }) {
|
|
474
|
+
return /* @__PURE__ */ T(w, { children: e || "Mit freundlichen Grüßen" });
|
|
475
|
+
}
|
|
476
|
+
function Ce({ address: e, children: n, scale: r }) {
|
|
477
|
+
let i = z(r);
|
|
478
|
+
return !n && !e ? null : /* @__PURE__ */ T(x, {
|
|
479
|
+
style: {
|
|
480
|
+
position: "absolute",
|
|
481
|
+
top: F(45, i),
|
|
482
|
+
left: F(15, i),
|
|
483
|
+
width: F(100, i),
|
|
484
|
+
height: F(8, i),
|
|
485
|
+
fontFamily: L,
|
|
486
|
+
fontSize: I(9, i),
|
|
487
|
+
lineHeight: I(9 * 1.22, i),
|
|
488
|
+
color: t.black
|
|
489
|
+
},
|
|
490
|
+
children: n || R(e)
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
function we({ address: e, children: n, scale: r }) {
|
|
494
|
+
let i = z(r);
|
|
495
|
+
return /* @__PURE__ */ T(x, {
|
|
496
|
+
style: {
|
|
497
|
+
position: "absolute",
|
|
498
|
+
top: F(72, i),
|
|
499
|
+
left: F(15, i),
|
|
500
|
+
width: F(85, i),
|
|
501
|
+
height: F(32, i),
|
|
502
|
+
fontFamily: L,
|
|
503
|
+
fontSize: I(9, i),
|
|
504
|
+
lineHeight: I(9 * 1.22, i),
|
|
505
|
+
color: t.black
|
|
506
|
+
},
|
|
507
|
+
children: n || R(e)
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
function Te({ address: e, children: n, scale: r }) {
|
|
511
|
+
let i = z(r);
|
|
512
|
+
return /* @__PURE__ */ T(x, {
|
|
513
|
+
style: {
|
|
514
|
+
position: "absolute",
|
|
515
|
+
top: F(20, i),
|
|
516
|
+
left: F(105, i),
|
|
517
|
+
width: F(90, i),
|
|
518
|
+
textAlign: "right",
|
|
519
|
+
fontFamily: L,
|
|
520
|
+
fontSize: I(10, i),
|
|
521
|
+
lineHeight: I(10 * 1.22, i),
|
|
522
|
+
color: t.black
|
|
523
|
+
},
|
|
524
|
+
children: n || R(e)
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
var Ee = [
|
|
528
|
+
195.7333333333,
|
|
529
|
+
185.149999999,
|
|
530
|
+
174.566666665,
|
|
531
|
+
163.983333331
|
|
532
|
+
];
|
|
533
|
+
function De({ identificationFields: e = [], children: n, scale: r }) {
|
|
534
|
+
let i = z(r);
|
|
535
|
+
return !n && e.length === 0 ? null : n ? /* @__PURE__ */ T(w, { children: n }) : /* @__PURE__ */ T(w, { children: e.slice(0, Ee.length).map((e, n) => /* @__PURE__ */ T(C, {
|
|
536
|
+
style: {
|
|
537
|
+
position: "absolute",
|
|
538
|
+
right: F(15, i),
|
|
539
|
+
width: F(95.25, i),
|
|
540
|
+
height: F(42.9166666667, i),
|
|
541
|
+
bottom: F(Ee[n], i)
|
|
542
|
+
},
|
|
543
|
+
children: /* @__PURE__ */ E(x, {
|
|
544
|
+
style: {
|
|
545
|
+
textAlign: "right",
|
|
546
|
+
fontFamily: L,
|
|
547
|
+
fontSize: I(10, i),
|
|
548
|
+
lineHeight: I(10 * 1.22, i),
|
|
549
|
+
color: t.black
|
|
550
|
+
},
|
|
551
|
+
children: [
|
|
552
|
+
e.label,
|
|
553
|
+
"\n",
|
|
554
|
+
/* @__PURE__ */ T(x, {
|
|
555
|
+
style: { fontWeight: "bold" },
|
|
556
|
+
children: e.value
|
|
557
|
+
})
|
|
558
|
+
]
|
|
559
|
+
})
|
|
560
|
+
}, n)) });
|
|
561
|
+
}
|
|
562
|
+
function Oe({ date: e, children: n, scale: r }) {
|
|
563
|
+
let i = z(r);
|
|
564
|
+
return !n && !e ? null : /* @__PURE__ */ T(x, {
|
|
565
|
+
style: {
|
|
566
|
+
position: "absolute",
|
|
567
|
+
right: F(15, i),
|
|
568
|
+
width: F(95.25, i),
|
|
569
|
+
height: F(42.9166666667, i),
|
|
570
|
+
bottom: F(153.872222, i),
|
|
571
|
+
textAlign: "right",
|
|
572
|
+
fontFamily: L,
|
|
573
|
+
fontSize: I(10, i),
|
|
574
|
+
lineHeight: I(10 * 1.22, i),
|
|
575
|
+
color: t.black
|
|
576
|
+
},
|
|
577
|
+
children: n || /* @__PURE__ */ E(w, { children: [
|
|
578
|
+
/* @__PURE__ */ T(be, {}),
|
|
579
|
+
": ",
|
|
580
|
+
e
|
|
581
|
+
] })
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
function ke({ letterSubject: e, letterText: n, userFullName: r, children: i, scale: a }) {
|
|
585
|
+
let o = z(a);
|
|
586
|
+
return /* @__PURE__ */ T(C, {
|
|
587
|
+
style: {
|
|
588
|
+
position: "absolute",
|
|
589
|
+
top: F(105, o),
|
|
590
|
+
left: F(15, o),
|
|
591
|
+
width: F(175, o)
|
|
592
|
+
},
|
|
593
|
+
children: i || /* @__PURE__ */ E(w, { children: [
|
|
594
|
+
/* @__PURE__ */ T(x, {
|
|
595
|
+
style: {
|
|
596
|
+
fontFamily: L,
|
|
597
|
+
fontSize: I(10, o),
|
|
598
|
+
fontWeight: "700",
|
|
599
|
+
color: t.black
|
|
600
|
+
},
|
|
601
|
+
children: e
|
|
602
|
+
}),
|
|
603
|
+
/* @__PURE__ */ E(x, {
|
|
604
|
+
style: {
|
|
605
|
+
marginVertical: F(5.2916666667, o),
|
|
606
|
+
fontFamily: L,
|
|
607
|
+
fontSize: I(10, o),
|
|
608
|
+
color: t.black
|
|
609
|
+
},
|
|
610
|
+
children: [/* @__PURE__ */ T(xe, {}), ","]
|
|
611
|
+
}),
|
|
612
|
+
/* @__PURE__ */ T(x, {
|
|
613
|
+
style: {
|
|
614
|
+
fontFamily: L,
|
|
615
|
+
fontSize: I(10, o),
|
|
616
|
+
lineHeight: I(13, o),
|
|
617
|
+
color: t.black
|
|
618
|
+
},
|
|
619
|
+
children: R(n)
|
|
620
|
+
}),
|
|
621
|
+
/* @__PURE__ */ T(x, {
|
|
622
|
+
style: {
|
|
623
|
+
marginVertical: F(5.2916666667, o),
|
|
624
|
+
fontFamily: L,
|
|
625
|
+
fontSize: I(10, o),
|
|
626
|
+
color: t.black
|
|
627
|
+
},
|
|
628
|
+
children: /* @__PURE__ */ T(Se, {})
|
|
629
|
+
}),
|
|
630
|
+
/* @__PURE__ */ T(x, {
|
|
631
|
+
style: {
|
|
632
|
+
marginVertical: F(5.2916666667, o),
|
|
633
|
+
fontFamily: L,
|
|
634
|
+
fontSize: I(10, o),
|
|
635
|
+
color: t.black
|
|
636
|
+
},
|
|
637
|
+
children: r
|
|
638
|
+
})
|
|
639
|
+
] })
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
function Ae({ senderAddressSlim: e, vendorAddress: n, senderAddress: r, identificationFields: i = [], date: a, letterSubject: o, letterText: s, userFullName: c, scale: l = 1, children: u }) {
|
|
643
|
+
return /* @__PURE__ */ T(ye.Provider, {
|
|
644
|
+
value: l,
|
|
645
|
+
children: /* @__PURE__ */ T(C, {
|
|
646
|
+
style: {
|
|
647
|
+
width: F(210, l),
|
|
648
|
+
height: F(297, l),
|
|
649
|
+
backgroundColor: t.white
|
|
650
|
+
},
|
|
651
|
+
children: u || /* @__PURE__ */ E(w, { children: [
|
|
652
|
+
/* @__PURE__ */ T(Ce, { address: e }),
|
|
653
|
+
/* @__PURE__ */ T(we, { address: n }),
|
|
654
|
+
/* @__PURE__ */ T(Te, { address: r }),
|
|
655
|
+
/* @__PURE__ */ T(De, { identificationFields: i }),
|
|
656
|
+
/* @__PURE__ */ T(Oe, { date: a }),
|
|
657
|
+
/* @__PURE__ */ T(ke, {
|
|
658
|
+
letterSubject: o,
|
|
659
|
+
letterText: s,
|
|
660
|
+
userFullName: c
|
|
661
|
+
})
|
|
662
|
+
] })
|
|
663
|
+
})
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
//#endregion
|
|
667
|
+
//#region src/components/MenuItem/MenuItem.native.tsx
|
|
668
|
+
function je({ label: e, onPress: n, icon: r, destructive: i = !1, loading: a = !1, disabled: o = !1 }) {
|
|
669
|
+
let s = i ? t.fg.accent.error : t.fg.accent.action;
|
|
670
|
+
return /* @__PURE__ */ E(v, {
|
|
671
|
+
accessibilityRole: "menuitem",
|
|
672
|
+
accessibilityState: { disabled: o || a },
|
|
673
|
+
onPress: n,
|
|
674
|
+
disabled: o || a,
|
|
675
|
+
style: [B.row, (o || a) && B.disabled],
|
|
676
|
+
children: [
|
|
677
|
+
r,
|
|
678
|
+
/* @__PURE__ */ T(A, {
|
|
679
|
+
variant: "label",
|
|
680
|
+
color: s,
|
|
681
|
+
style: B.label,
|
|
682
|
+
children: e
|
|
683
|
+
}),
|
|
684
|
+
a && /* @__PURE__ */ T(j, {
|
|
685
|
+
size: 18,
|
|
686
|
+
color: s
|
|
687
|
+
})
|
|
688
|
+
]
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
var B = b.create({
|
|
692
|
+
row: {
|
|
693
|
+
flexDirection: "row",
|
|
694
|
+
alignItems: "center",
|
|
695
|
+
gap: 8,
|
|
696
|
+
paddingVertical: 12,
|
|
697
|
+
paddingHorizontal: 16
|
|
698
|
+
},
|
|
699
|
+
label: { flex: 1 },
|
|
700
|
+
disabled: { opacity: .4 }
|
|
701
|
+
});
|
|
702
|
+
//#endregion
|
|
703
|
+
//#region src/components/RadioCard/RadioCard.native.tsx
|
|
704
|
+
function Me({ selected: e, onSelect: n, icon: r, title: i, description: o, trailing: s, disabled: c = !1 }) {
|
|
705
|
+
return /* @__PURE__ */ E(v, {
|
|
706
|
+
accessibilityRole: "radio",
|
|
707
|
+
accessibilityState: {
|
|
708
|
+
checked: e,
|
|
709
|
+
disabled: c
|
|
710
|
+
},
|
|
711
|
+
onPress: n,
|
|
712
|
+
disabled: c,
|
|
713
|
+
style: [
|
|
714
|
+
V.card,
|
|
715
|
+
e && V.cardSelected,
|
|
716
|
+
c && V.cardDisabled
|
|
717
|
+
],
|
|
718
|
+
children: [/* @__PURE__ */ T(C, {
|
|
719
|
+
style: [V.indicator, e && V.indicatorSelected],
|
|
720
|
+
children: e && /* @__PURE__ */ T(a, {
|
|
721
|
+
size: "small",
|
|
722
|
+
color: t.white
|
|
723
|
+
})
|
|
724
|
+
}), /* @__PURE__ */ E(C, {
|
|
725
|
+
style: V.content,
|
|
726
|
+
children: [/* @__PURE__ */ E(C, {
|
|
727
|
+
style: V.titleRow,
|
|
728
|
+
children: [
|
|
729
|
+
r,
|
|
730
|
+
/* @__PURE__ */ T(A, {
|
|
731
|
+
variant: "label",
|
|
732
|
+
style: V.title,
|
|
733
|
+
children: i
|
|
734
|
+
}),
|
|
735
|
+
s
|
|
736
|
+
]
|
|
737
|
+
}), o && /* @__PURE__ */ T(A, {
|
|
738
|
+
variant: "body",
|
|
739
|
+
color: t.fg.secondary,
|
|
740
|
+
children: o
|
|
741
|
+
})]
|
|
742
|
+
})]
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
var V = b.create({
|
|
746
|
+
card: {
|
|
747
|
+
minHeight: 110,
|
|
748
|
+
width: "100%",
|
|
749
|
+
flexDirection: "row",
|
|
750
|
+
alignItems: "center",
|
|
751
|
+
gap: 12,
|
|
752
|
+
borderRadius: 20,
|
|
753
|
+
borderWidth: 1,
|
|
754
|
+
borderColor: t.neutral["800-A08"],
|
|
755
|
+
backgroundColor: t.white,
|
|
756
|
+
padding: 16
|
|
757
|
+
},
|
|
758
|
+
cardSelected: {
|
|
759
|
+
borderWidth: 2,
|
|
760
|
+
borderColor: t.border.action,
|
|
761
|
+
backgroundColor: t.primary["600-A08"]
|
|
762
|
+
},
|
|
763
|
+
cardDisabled: { opacity: .4 },
|
|
764
|
+
indicator: {
|
|
765
|
+
width: 20,
|
|
766
|
+
height: 20,
|
|
767
|
+
borderRadius: 10,
|
|
768
|
+
borderWidth: 2,
|
|
769
|
+
borderColor: t.neutral["800-A16"],
|
|
770
|
+
alignItems: "center",
|
|
771
|
+
justifyContent: "center"
|
|
772
|
+
},
|
|
773
|
+
indicatorSelected: {
|
|
774
|
+
borderWidth: 0,
|
|
775
|
+
backgroundColor: t.border.action
|
|
776
|
+
},
|
|
777
|
+
content: {
|
|
778
|
+
flex: 1,
|
|
779
|
+
gap: 4
|
|
780
|
+
},
|
|
781
|
+
titleRow: {
|
|
782
|
+
flexDirection: "row",
|
|
783
|
+
alignItems: "center",
|
|
784
|
+
gap: 8
|
|
785
|
+
},
|
|
786
|
+
title: { flex: 1 }
|
|
787
|
+
});
|
|
788
|
+
//#endregion
|
|
301
789
|
//#region src/components/Select/Select.native.tsx
|
|
302
|
-
function
|
|
303
|
-
let [
|
|
304
|
-
|
|
305
|
-
a.length === 1 && !
|
|
306
|
-
}, [a,
|
|
307
|
-
let
|
|
308
|
-
return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(
|
|
309
|
-
style:
|
|
310
|
-
children: [/* @__PURE__ */ E(
|
|
790
|
+
function Ne({ label: e, value: r, onChange: i, options: a, error: o, disabled: s = !1 }) {
|
|
791
|
+
let [c, l] = f(!1);
|
|
792
|
+
u(() => {
|
|
793
|
+
a.length === 1 && !r && i(a[0].value);
|
|
794
|
+
}, [a, r]);
|
|
795
|
+
let d = a.find((e) => e.value === r), p = o ? t.fg.accent.error : c ? t.fg.base : t.bg.tertiary;
|
|
796
|
+
return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(C, {
|
|
797
|
+
style: H.container,
|
|
798
|
+
children: [/* @__PURE__ */ E(v, {
|
|
311
799
|
style: [
|
|
312
|
-
|
|
313
|
-
{ borderColor:
|
|
314
|
-
|
|
800
|
+
H.trigger,
|
|
801
|
+
{ borderColor: p },
|
|
802
|
+
s && H.triggerDisabled
|
|
315
803
|
],
|
|
316
|
-
onPress: () =>
|
|
317
|
-
disabled:
|
|
804
|
+
onPress: () => l(!0),
|
|
805
|
+
disabled: s,
|
|
318
806
|
accessibilityRole: "combobox",
|
|
319
807
|
accessibilityLabel: e,
|
|
320
808
|
accessibilityState: {
|
|
321
|
-
expanded:
|
|
322
|
-
disabled:
|
|
809
|
+
expanded: c,
|
|
810
|
+
disabled: s
|
|
323
811
|
},
|
|
324
|
-
children: [/* @__PURE__ */ E(
|
|
325
|
-
style:
|
|
326
|
-
children: [/* @__PURE__ */ T(
|
|
327
|
-
style: [
|
|
812
|
+
children: [/* @__PURE__ */ E(C, {
|
|
813
|
+
style: H.triggerContent,
|
|
814
|
+
children: [/* @__PURE__ */ T(x, {
|
|
815
|
+
style: [H.labelText, d && H.labelFloating],
|
|
328
816
|
children: e
|
|
329
|
-
}),
|
|
330
|
-
style:
|
|
817
|
+
}), d && /* @__PURE__ */ T(x, {
|
|
818
|
+
style: H.valueText,
|
|
331
819
|
numberOfLines: 1,
|
|
332
|
-
children:
|
|
820
|
+
children: d.text
|
|
333
821
|
})]
|
|
334
822
|
}), /* @__PURE__ */ T(n, {
|
|
335
823
|
direction: "down",
|
|
336
|
-
color:
|
|
824
|
+
color: t.fg.secondary,
|
|
337
825
|
size: "small"
|
|
338
826
|
})]
|
|
339
|
-
}),
|
|
340
|
-
style:
|
|
341
|
-
children:
|
|
827
|
+
}), o && /* @__PURE__ */ T(x, {
|
|
828
|
+
style: H.errorText,
|
|
829
|
+
children: o
|
|
342
830
|
})]
|
|
343
|
-
}), /* @__PURE__ */ T(
|
|
344
|
-
visible:
|
|
831
|
+
}), /* @__PURE__ */ T(g, {
|
|
832
|
+
visible: c,
|
|
345
833
|
transparent: !0,
|
|
346
834
|
animationType: "fade",
|
|
347
|
-
onRequestClose: () =>
|
|
348
|
-
children: /* @__PURE__ */ T(
|
|
349
|
-
style:
|
|
350
|
-
onPress: () =>
|
|
351
|
-
children: /* @__PURE__ */ E(
|
|
352
|
-
style:
|
|
353
|
-
children: [/* @__PURE__ */ T(
|
|
835
|
+
onRequestClose: () => l(!1),
|
|
836
|
+
children: /* @__PURE__ */ T(v, {
|
|
837
|
+
style: H.backdrop,
|
|
838
|
+
onPress: () => l(!1),
|
|
839
|
+
children: /* @__PURE__ */ E(C, {
|
|
840
|
+
style: H.sheet,
|
|
841
|
+
children: [/* @__PURE__ */ T(C, { style: H.sheetHandle }), /* @__PURE__ */ T(y, {
|
|
354
842
|
bounces: !1,
|
|
355
843
|
children: a.map((e) => {
|
|
356
|
-
let
|
|
357
|
-
return /* @__PURE__ */ T(
|
|
358
|
-
style: [
|
|
844
|
+
let t = e.value === r;
|
|
845
|
+
return /* @__PURE__ */ T(v, {
|
|
846
|
+
style: [H.option, t && H.optionActive],
|
|
359
847
|
onPress: () => {
|
|
360
|
-
i(e.value),
|
|
848
|
+
i(e.value), l(!1);
|
|
361
849
|
},
|
|
362
850
|
accessibilityRole: "menuitem",
|
|
363
|
-
accessibilityState: { selected:
|
|
364
|
-
children: /* @__PURE__ */ T(
|
|
365
|
-
style: [
|
|
851
|
+
accessibilityState: { selected: t },
|
|
852
|
+
children: /* @__PURE__ */ T(x, {
|
|
853
|
+
style: [H.optionText, t && H.optionTextActive],
|
|
366
854
|
children: e.text
|
|
367
855
|
})
|
|
368
856
|
}, e.value);
|
|
@@ -372,7 +860,7 @@ function L({ label: e, value: t, onChange: i, options: a, error: s, disabled: l
|
|
|
372
860
|
})
|
|
373
861
|
})] });
|
|
374
862
|
}
|
|
375
|
-
var
|
|
863
|
+
var H = b.create({
|
|
376
864
|
container: { marginBottom: 8 },
|
|
377
865
|
trigger: {
|
|
378
866
|
height: 50,
|
|
@@ -380,7 +868,7 @@ var R = g.create({
|
|
|
380
868
|
borderRadius: 12,
|
|
381
869
|
flexDirection: "row",
|
|
382
870
|
alignItems: "center",
|
|
383
|
-
backgroundColor:
|
|
871
|
+
backgroundColor: t.bg.secondary,
|
|
384
872
|
borderWidth: 2
|
|
385
873
|
},
|
|
386
874
|
triggerDisabled: { opacity: .4 },
|
|
@@ -389,27 +877,27 @@ var R = g.create({
|
|
|
389
877
|
justifyContent: "center"
|
|
390
878
|
},
|
|
391
879
|
labelText: {
|
|
392
|
-
fontFamily:
|
|
880
|
+
fontFamily: i.body.fontFamily,
|
|
393
881
|
fontSize: 15,
|
|
394
|
-
color:
|
|
882
|
+
color: t.fg.tertiary
|
|
395
883
|
},
|
|
396
884
|
labelFloating: {
|
|
397
885
|
fontSize: 12,
|
|
398
|
-
color:
|
|
886
|
+
color: t.fg.secondary,
|
|
399
887
|
marginBottom: 2
|
|
400
888
|
},
|
|
401
889
|
valueText: {
|
|
402
|
-
fontFamily:
|
|
890
|
+
fontFamily: i.body.fontFamily,
|
|
403
891
|
fontSize: 15,
|
|
404
892
|
fontWeight: "500",
|
|
405
|
-
color:
|
|
893
|
+
color: t.primary[900]
|
|
406
894
|
},
|
|
407
895
|
errorText: {
|
|
408
896
|
marginTop: 4,
|
|
409
897
|
fontSize: 12,
|
|
410
898
|
paddingHorizontal: 4,
|
|
411
|
-
color:
|
|
412
|
-
fontFamily:
|
|
899
|
+
color: t.fg.accent.error,
|
|
900
|
+
fontFamily: i.body.fontFamily
|
|
413
901
|
},
|
|
414
902
|
backdrop: {
|
|
415
903
|
flex: 1,
|
|
@@ -417,7 +905,7 @@ var R = g.create({
|
|
|
417
905
|
justifyContent: "flex-end"
|
|
418
906
|
},
|
|
419
907
|
sheet: {
|
|
420
|
-
backgroundColor:
|
|
908
|
+
backgroundColor: t.bg.base,
|
|
421
909
|
borderTopLeftRadius: 16,
|
|
422
910
|
borderTopRightRadius: 16,
|
|
423
911
|
paddingBottom: 32,
|
|
@@ -427,7 +915,7 @@ var R = g.create({
|
|
|
427
915
|
width: 36,
|
|
428
916
|
height: 4,
|
|
429
917
|
borderRadius: 2,
|
|
430
|
-
backgroundColor:
|
|
918
|
+
backgroundColor: t.border.default,
|
|
431
919
|
alignSelf: "center",
|
|
432
920
|
marginTop: 8,
|
|
433
921
|
marginBottom: 8
|
|
@@ -436,94 +924,81 @@ var R = g.create({
|
|
|
436
924
|
paddingVertical: 16,
|
|
437
925
|
paddingHorizontal: 20,
|
|
438
926
|
borderBottomWidth: 1,
|
|
439
|
-
borderBottomColor:
|
|
927
|
+
borderBottomColor: t.border.default
|
|
440
928
|
},
|
|
441
|
-
optionActive: { backgroundColor:
|
|
929
|
+
optionActive: { backgroundColor: t.primary[50] },
|
|
442
930
|
optionText: {
|
|
443
|
-
fontFamily:
|
|
931
|
+
fontFamily: i.body.fontFamily,
|
|
444
932
|
fontSize: 15,
|
|
445
|
-
color:
|
|
933
|
+
color: t.fg.base
|
|
446
934
|
},
|
|
447
935
|
optionTextActive: {
|
|
448
|
-
color:
|
|
936
|
+
color: t.primary[900],
|
|
449
937
|
fontWeight: "500"
|
|
450
938
|
}
|
|
451
|
-
})
|
|
452
|
-
heading: 20,
|
|
453
|
-
title: 16,
|
|
454
|
-
label: 13,
|
|
455
|
-
body: 15,
|
|
456
|
-
caption: 12
|
|
457
|
-
};
|
|
458
|
-
function B({ variant: e = "body", color: n, style: r, ...i }) {
|
|
459
|
-
return /* @__PURE__ */ T(_, {
|
|
460
|
-
style: [
|
|
461
|
-
t[e],
|
|
462
|
-
{ fontSize: z[e] },
|
|
463
|
-
n ? { color: n } : void 0,
|
|
464
|
-
r
|
|
465
|
-
],
|
|
466
|
-
...i
|
|
467
|
-
});
|
|
468
|
-
}
|
|
939
|
+
});
|
|
469
940
|
//#endregion
|
|
470
941
|
//#region src/components/Sheet/Sheet.native.tsx
|
|
471
|
-
function
|
|
472
|
-
let
|
|
473
|
-
return /* @__PURE__ */ T(
|
|
474
|
-
visible:
|
|
942
|
+
function Pe({ open: r, onClose: i, onGoBack: a, title: o, children: s, footer: c, background: l, headerBackgroundColor: u }) {
|
|
943
|
+
let d = te();
|
|
944
|
+
return /* @__PURE__ */ T(g, {
|
|
945
|
+
visible: r,
|
|
475
946
|
animationType: "slide",
|
|
476
947
|
presentationStyle: "pageSheet",
|
|
477
948
|
onRequestClose: i,
|
|
478
|
-
children: /* @__PURE__ */ T(
|
|
479
|
-
style:
|
|
480
|
-
behavior:
|
|
481
|
-
children: /* @__PURE__ */ E(
|
|
482
|
-
style: [
|
|
949
|
+
children: /* @__PURE__ */ T(h, {
|
|
950
|
+
style: U.flex,
|
|
951
|
+
behavior: _.OS === "ios" ? "padding" : void 0,
|
|
952
|
+
children: /* @__PURE__ */ E(C, {
|
|
953
|
+
style: [U.container, { paddingTop: Math.max(d.top, 16) }],
|
|
483
954
|
children: [
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
style:
|
|
955
|
+
l && /* @__PURE__ */ T(C, {
|
|
956
|
+
style: b.absoluteFillObject,
|
|
957
|
+
children: l
|
|
958
|
+
}),
|
|
959
|
+
/* @__PURE__ */ E(C, {
|
|
960
|
+
style: [U.header, u ? { backgroundColor: u } : void 0],
|
|
486
961
|
children: [
|
|
487
|
-
/* @__PURE__ */ T(
|
|
488
|
-
style:
|
|
489
|
-
children: a && /* @__PURE__ */ T(
|
|
962
|
+
/* @__PURE__ */ T(C, {
|
|
963
|
+
style: U.headerSide,
|
|
964
|
+
children: a && /* @__PURE__ */ T(N, {
|
|
490
965
|
variant: "base",
|
|
491
966
|
size: "md",
|
|
492
967
|
accessibilityLabel: "Go back",
|
|
493
968
|
onPress: a,
|
|
494
969
|
children: /* @__PURE__ */ T(n, {
|
|
495
|
-
color:
|
|
970
|
+
color: t.fg.secondary,
|
|
496
971
|
direction: "left"
|
|
497
972
|
})
|
|
498
973
|
})
|
|
499
974
|
}),
|
|
500
|
-
o ? /* @__PURE__ */ T(
|
|
975
|
+
o ? /* @__PURE__ */ T(A, {
|
|
501
976
|
variant: "heading",
|
|
502
|
-
style:
|
|
977
|
+
style: U.headerTitle,
|
|
503
978
|
children: o
|
|
504
|
-
}) : /* @__PURE__ */ T(
|
|
505
|
-
/* @__PURE__ */ T(
|
|
506
|
-
style: [
|
|
507
|
-
children: /* @__PURE__ */ T(
|
|
979
|
+
}) : /* @__PURE__ */ T(C, { style: U.flex }),
|
|
980
|
+
/* @__PURE__ */ T(C, {
|
|
981
|
+
style: [U.headerSide, U.headerSideRight],
|
|
982
|
+
children: /* @__PURE__ */ T(N, {
|
|
508
983
|
variant: "base",
|
|
509
984
|
size: "md",
|
|
510
985
|
accessibilityLabel: "Close",
|
|
511
986
|
onPress: i,
|
|
512
987
|
children: /* @__PURE__ */ T(e, {
|
|
513
|
-
color:
|
|
988
|
+
color: t.fg.secondary,
|
|
514
989
|
size: "small"
|
|
515
990
|
})
|
|
516
991
|
})
|
|
517
992
|
})
|
|
518
993
|
]
|
|
519
994
|
}),
|
|
520
|
-
/* @__PURE__ */ T(
|
|
521
|
-
style:
|
|
522
|
-
contentContainerStyle:
|
|
995
|
+
/* @__PURE__ */ T(y, {
|
|
996
|
+
style: U.flex,
|
|
997
|
+
contentContainerStyle: U.body,
|
|
523
998
|
children: s
|
|
524
999
|
}),
|
|
525
|
-
c && /* @__PURE__ */ T(
|
|
526
|
-
style:
|
|
1000
|
+
c && /* @__PURE__ */ T(C, {
|
|
1001
|
+
style: U.footer,
|
|
527
1002
|
children: c
|
|
528
1003
|
})
|
|
529
1004
|
]
|
|
@@ -531,11 +1006,11 @@ function V({ open: t, onClose: i, onGoBack: a, title: o, children: s, footer: c
|
|
|
531
1006
|
})
|
|
532
1007
|
});
|
|
533
1008
|
}
|
|
534
|
-
var
|
|
1009
|
+
var U = b.create({
|
|
535
1010
|
flex: { flex: 1 },
|
|
536
1011
|
container: {
|
|
537
1012
|
flex: 1,
|
|
538
|
-
backgroundColor:
|
|
1013
|
+
backgroundColor: t.bg.base
|
|
539
1014
|
},
|
|
540
1015
|
header: {
|
|
541
1016
|
flexDirection: "row",
|
|
@@ -558,35 +1033,135 @@ var H = g.create({
|
|
|
558
1033
|
paddingHorizontal: 20,
|
|
559
1034
|
paddingVertical: 24,
|
|
560
1035
|
borderTopWidth: 1,
|
|
561
|
-
borderTopColor:
|
|
1036
|
+
borderTopColor: t.border.default
|
|
562
1037
|
}
|
|
563
|
-
}),
|
|
564
|
-
|
|
565
|
-
return
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
1038
|
+
}), W = 24, G = 8, K = 12, Fe = 2 * Math.PI * G, Ie = p.createAnimatedComponent(D);
|
|
1039
|
+
function Le() {
|
|
1040
|
+
return /* @__PURE__ */ T(k, {
|
|
1041
|
+
width: W,
|
|
1042
|
+
height: W,
|
|
1043
|
+
viewBox: "0 0 24 24",
|
|
1044
|
+
fill: "none",
|
|
1045
|
+
children: /* @__PURE__ */ T(D, {
|
|
1046
|
+
cx: K,
|
|
1047
|
+
cy: K,
|
|
1048
|
+
r: G,
|
|
1049
|
+
stroke: t.neutral["800-A16"],
|
|
1050
|
+
strokeWidth: 3,
|
|
1051
|
+
fill: "none"
|
|
1052
|
+
})
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
function Re({ durationMs: e = 1500 }) {
|
|
1056
|
+
let n = d(new p.Value(0)).current;
|
|
1057
|
+
u(() => {
|
|
1058
|
+
n.setValue(0);
|
|
1059
|
+
let t = p.timing(n, {
|
|
1060
|
+
toValue: 1,
|
|
1061
|
+
duration: e,
|
|
1062
|
+
useNativeDriver: !1
|
|
1063
|
+
});
|
|
1064
|
+
return t.start(), () => t.stop();
|
|
1065
|
+
}, [n, e]);
|
|
1066
|
+
let r = n.interpolate({
|
|
1067
|
+
inputRange: [0, 1],
|
|
1068
|
+
outputRange: [Fe, 0]
|
|
1069
|
+
});
|
|
1070
|
+
return /* @__PURE__ */ E(k, {
|
|
1071
|
+
width: W,
|
|
1072
|
+
height: W,
|
|
1073
|
+
viewBox: "0 0 24 24",
|
|
1074
|
+
fill: "none",
|
|
1075
|
+
children: [/* @__PURE__ */ T(D, {
|
|
1076
|
+
cx: K,
|
|
1077
|
+
cy: K,
|
|
1078
|
+
r: G,
|
|
1079
|
+
stroke: t.neutral["800-A16"],
|
|
1080
|
+
strokeWidth: 3,
|
|
1081
|
+
fill: "none"
|
|
1082
|
+
}), /* @__PURE__ */ T(Ie, {
|
|
1083
|
+
cx: K,
|
|
1084
|
+
cy: K,
|
|
1085
|
+
r: G,
|
|
1086
|
+
stroke: t.fg.accent.action,
|
|
1087
|
+
strokeWidth: 3,
|
|
1088
|
+
fill: "none",
|
|
1089
|
+
strokeDasharray: Fe,
|
|
1090
|
+
strokeDashoffset: r,
|
|
1091
|
+
strokeLinecap: "round",
|
|
1092
|
+
rotation: "-90",
|
|
1093
|
+
origin: `${K}, ${K}`
|
|
1094
|
+
})]
|
|
1095
|
+
});
|
|
575
1096
|
}
|
|
576
|
-
|
|
577
|
-
|
|
1097
|
+
function ze({ state: e, mode: n = "determinate", durationMs: i }) {
|
|
1098
|
+
switch (e) {
|
|
1099
|
+
case "pending": return /* @__PURE__ */ T(Le, {});
|
|
1100
|
+
case "loading": return n === "indeterminate" ? /* @__PURE__ */ T(j, {
|
|
1101
|
+
size: W,
|
|
1102
|
+
color: t.fg.accent.action,
|
|
1103
|
+
trackColor: t.neutral["800-A16"]
|
|
1104
|
+
}) : /* @__PURE__ */ T(Re, { durationMs: i });
|
|
1105
|
+
case "complete": return /* @__PURE__ */ T(a, {
|
|
1106
|
+
size: W,
|
|
1107
|
+
color: t.fg.accent.action
|
|
1108
|
+
});
|
|
1109
|
+
case "error": return /* @__PURE__ */ T(r, {
|
|
1110
|
+
size: W,
|
|
1111
|
+
color: t.fg.accent.error
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
function Be({ steps: e }) {
|
|
1116
|
+
return /* @__PURE__ */ T(C, {
|
|
1117
|
+
style: q.container,
|
|
1118
|
+
children: e.map((e, t) => /* @__PURE__ */ E(C, {
|
|
1119
|
+
style: q.row,
|
|
1120
|
+
children: [/* @__PURE__ */ T(C, {
|
|
1121
|
+
style: q.iconSlot,
|
|
1122
|
+
children: /* @__PURE__ */ T(ze, {
|
|
1123
|
+
state: e.state,
|
|
1124
|
+
mode: e.mode,
|
|
1125
|
+
durationMs: e.durationMs
|
|
1126
|
+
})
|
|
1127
|
+
}), /* @__PURE__ */ T(A, {
|
|
1128
|
+
variant: "body",
|
|
1129
|
+
children: e.label
|
|
1130
|
+
})]
|
|
1131
|
+
}, t))
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
var q = b.create({
|
|
1135
|
+
container: { gap: 12 },
|
|
1136
|
+
row: {
|
|
1137
|
+
flexDirection: "row",
|
|
1138
|
+
alignItems: "center",
|
|
1139
|
+
gap: 12
|
|
1140
|
+
},
|
|
1141
|
+
iconSlot: {
|
|
1142
|
+
width: W,
|
|
1143
|
+
height: W,
|
|
1144
|
+
alignItems: "center",
|
|
1145
|
+
justifyContent: "center"
|
|
1146
|
+
}
|
|
1147
|
+
}), Ve = 1, He = 1e6, J = 0;
|
|
1148
|
+
function Ue() {
|
|
1149
|
+
return J = (J + 1) % (2 ** 53 - 1), J.toString();
|
|
1150
|
+
}
|
|
1151
|
+
var Y = /* @__PURE__ */ new Map(), We = (e) => {
|
|
1152
|
+
if (Y.has(e)) return;
|
|
578
1153
|
let t = setTimeout(() => {
|
|
579
|
-
|
|
1154
|
+
Y.delete(e), Q({
|
|
580
1155
|
type: "REMOVE_TOAST",
|
|
581
1156
|
toastId: e
|
|
582
1157
|
});
|
|
583
|
-
},
|
|
584
|
-
|
|
585
|
-
},
|
|
1158
|
+
}, He);
|
|
1159
|
+
Y.set(e, t);
|
|
1160
|
+
}, Ge = (e, t) => {
|
|
586
1161
|
switch (t.type) {
|
|
587
1162
|
case "ADD_TOAST": return {
|
|
588
1163
|
...e,
|
|
589
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
1164
|
+
toasts: [t.toast, ...e.toasts].slice(0, Ve)
|
|
590
1165
|
};
|
|
591
1166
|
case "UPDATE_TOAST": return {
|
|
592
1167
|
...e,
|
|
@@ -597,8 +1172,8 @@ var J = /* @__PURE__ */ new Map(), Y = (e) => {
|
|
|
597
1172
|
};
|
|
598
1173
|
case "DISMISS_TOAST": {
|
|
599
1174
|
let { toastId: n } = t;
|
|
600
|
-
return n ?
|
|
601
|
-
|
|
1175
|
+
return n ? We(n) : e.toasts.forEach((e) => {
|
|
1176
|
+
We(e.id);
|
|
602
1177
|
}), {
|
|
603
1178
|
...e,
|
|
604
1179
|
toasts: e.toasts.map((e) => e.id === n || n === void 0 ? {
|
|
@@ -615,24 +1190,24 @@ var J = /* @__PURE__ */ new Map(), Y = (e) => {
|
|
|
615
1190
|
toasts: e.toasts.filter((e) => e.id !== t.toastId)
|
|
616
1191
|
};
|
|
617
1192
|
}
|
|
618
|
-
},
|
|
619
|
-
function
|
|
620
|
-
|
|
621
|
-
e(
|
|
1193
|
+
}, X = [], Z = { toasts: [] };
|
|
1194
|
+
function Q(e) {
|
|
1195
|
+
Z = Ge(Z, e), X.forEach((e) => {
|
|
1196
|
+
e(Z);
|
|
622
1197
|
});
|
|
623
1198
|
}
|
|
624
|
-
function
|
|
625
|
-
let t =
|
|
1199
|
+
function Ke({ ...e }) {
|
|
1200
|
+
let t = Ue(), n = (e) => Q({
|
|
626
1201
|
type: "UPDATE_TOAST",
|
|
627
1202
|
toast: {
|
|
628
1203
|
...e,
|
|
629
1204
|
id: t
|
|
630
1205
|
}
|
|
631
|
-
}), r = () =>
|
|
1206
|
+
}), r = () => Q({
|
|
632
1207
|
type: "DISMISS_TOAST",
|
|
633
1208
|
toastId: t
|
|
634
1209
|
});
|
|
635
|
-
return
|
|
1210
|
+
return Q({
|
|
636
1211
|
type: "ADD_TOAST",
|
|
637
1212
|
toast: {
|
|
638
1213
|
...e,
|
|
@@ -648,19 +1223,224 @@ function ee({ ...e }) {
|
|
|
648
1223
|
update: n
|
|
649
1224
|
};
|
|
650
1225
|
}
|
|
651
|
-
function
|
|
652
|
-
let [e, t] =
|
|
653
|
-
return
|
|
654
|
-
let e =
|
|
655
|
-
e > -1 &&
|
|
1226
|
+
function qe() {
|
|
1227
|
+
let [e, t] = s.useState(Z);
|
|
1228
|
+
return s.useEffect(() => (X.push(t), () => {
|
|
1229
|
+
let e = X.indexOf(t);
|
|
1230
|
+
e > -1 && X.splice(e, 1);
|
|
656
1231
|
}), [e]), {
|
|
657
1232
|
...e,
|
|
658
|
-
toast:
|
|
659
|
-
dismiss: (e) =>
|
|
1233
|
+
toast: Ke,
|
|
1234
|
+
dismiss: (e) => Q({
|
|
660
1235
|
type: "DISMISS_TOAST",
|
|
661
1236
|
toastId: e
|
|
662
1237
|
})
|
|
663
1238
|
};
|
|
664
1239
|
}
|
|
665
1240
|
//#endregion
|
|
666
|
-
|
|
1241
|
+
//#region src/icons/toast/Error.native.tsx
|
|
1242
|
+
function Je() {
|
|
1243
|
+
return /* @__PURE__ */ T(k, {
|
|
1244
|
+
width: "24",
|
|
1245
|
+
height: "24",
|
|
1246
|
+
viewBox: "0 0 24 24",
|
|
1247
|
+
fill: "none",
|
|
1248
|
+
children: /* @__PURE__ */ T(O, {
|
|
1249
|
+
fillRule: "evenodd",
|
|
1250
|
+
clipRule: "evenodd",
|
|
1251
|
+
d: "M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM9 7.58579L7.58579 9L10.5858 12L7.58579 15L9 16.4142L12 13.4142L15 16.4142L16.4142 15L13.4142 12L16.4142 9L15 7.58579L12 10.5858L9 7.58579Z",
|
|
1252
|
+
fill: "#FE4C00"
|
|
1253
|
+
})
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region src/icons/toast/Info.native.tsx
|
|
1258
|
+
function Ye() {
|
|
1259
|
+
return /* @__PURE__ */ T(k, {
|
|
1260
|
+
width: "24",
|
|
1261
|
+
height: "24",
|
|
1262
|
+
viewBox: "0 0 24 24",
|
|
1263
|
+
fill: "none",
|
|
1264
|
+
children: /* @__PURE__ */ T(O, {
|
|
1265
|
+
fillRule: "evenodd",
|
|
1266
|
+
clipRule: "evenodd",
|
|
1267
|
+
d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM10 10H13V17H11V12H10V10ZM11 9V7H13V9H11Z",
|
|
1268
|
+
fill: "#9DA7A2"
|
|
1269
|
+
})
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
//#endregion
|
|
1273
|
+
//#region src/icons/toast/Success.native.tsx
|
|
1274
|
+
function Xe() {
|
|
1275
|
+
return /* @__PURE__ */ T(k, {
|
|
1276
|
+
width: "24",
|
|
1277
|
+
height: "24",
|
|
1278
|
+
viewBox: "0 0 24 24",
|
|
1279
|
+
fill: "none",
|
|
1280
|
+
children: /* @__PURE__ */ T(O, {
|
|
1281
|
+
fillRule: "evenodd",
|
|
1282
|
+
clipRule: "evenodd",
|
|
1283
|
+
d: "M12 21.9996C17.5228 21.9996 22 17.5225 22 11.9996C22 6.47679 17.5228 1.99963 12 1.99963C6.47715 1.99963 2 6.47679 2 11.9996C2 17.5225 6.47715 21.9996 12 21.9996ZM10.5744 16.4881L16.4073 9.35888L14.8594 8.09241L10.4259 13.5112L8.50015 11.5854L7.08594 12.9996L10.5744 16.4881Z",
|
|
1284
|
+
fill: "#3B872C"
|
|
1285
|
+
})
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1288
|
+
//#endregion
|
|
1289
|
+
//#region src/icons/toast/Warning.native.tsx
|
|
1290
|
+
function Ze() {
|
|
1291
|
+
return /* @__PURE__ */ T(k, {
|
|
1292
|
+
width: "24",
|
|
1293
|
+
height: "24",
|
|
1294
|
+
viewBox: "0 0 24 24",
|
|
1295
|
+
fill: "none",
|
|
1296
|
+
children: /* @__PURE__ */ T(O, {
|
|
1297
|
+
fillRule: "evenodd",
|
|
1298
|
+
clipRule: "evenodd",
|
|
1299
|
+
d: "M13.7367 4.53861C12.9689 3.19498 11.0315 3.19498 10.2637 4.53861L1.71007 19.5075C0.948179 20.8408 1.91091 22.4998 3.44656 22.4998H20.5538C22.0895 22.4998 23.0522 20.8408 22.2903 19.5075L13.7367 4.53861ZM11 9.49997H13V15.5H11V9.49997ZM11 17.5H13V19.5H11V17.5Z",
|
|
1300
|
+
fill: "#FEA900"
|
|
1301
|
+
})
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
//#endregion
|
|
1305
|
+
//#region src/components/Toaster/Toaster.native.tsx
|
|
1306
|
+
var Qe = {
|
|
1307
|
+
success: {
|
|
1308
|
+
background: t.sf.light.action,
|
|
1309
|
+
color: t.fg.accent.action
|
|
1310
|
+
},
|
|
1311
|
+
error: {
|
|
1312
|
+
background: t.sf.light.error,
|
|
1313
|
+
color: t.fg.accent.error
|
|
1314
|
+
},
|
|
1315
|
+
info: {
|
|
1316
|
+
background: t.sf.light.tertiary,
|
|
1317
|
+
color: t.fg.base
|
|
1318
|
+
},
|
|
1319
|
+
warning: {
|
|
1320
|
+
background: t.sf.light.warning,
|
|
1321
|
+
color: t.fg.accent.warning
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
function $e({ variant: e }) {
|
|
1325
|
+
switch (e) {
|
|
1326
|
+
case "success": return /* @__PURE__ */ T(Xe, {});
|
|
1327
|
+
case "error": return /* @__PURE__ */ T(Je, {});
|
|
1328
|
+
case "warning": return /* @__PURE__ */ T(Ze, {});
|
|
1329
|
+
default: return /* @__PURE__ */ T(Ye, {});
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
var et = 5e3;
|
|
1333
|
+
function tt({ id: t, title: n, description: r, variant: i = "info", duration: a, onDismiss: o }) {
|
|
1334
|
+
let { background: s, color: c } = Qe[i], l = d(new p.Value(0)).current;
|
|
1335
|
+
u(() => {
|
|
1336
|
+
let e = p.timing(l, {
|
|
1337
|
+
toValue: 1,
|
|
1338
|
+
duration: 200,
|
|
1339
|
+
useNativeDriver: !0
|
|
1340
|
+
});
|
|
1341
|
+
return e.start(), () => e.stop();
|
|
1342
|
+
}, [l]);
|
|
1343
|
+
let f = d(o);
|
|
1344
|
+
f.current = o, u(() => {
|
|
1345
|
+
let e = setTimeout(() => f.current(t), a ?? et);
|
|
1346
|
+
return () => clearTimeout(e);
|
|
1347
|
+
}, [t, a]);
|
|
1348
|
+
let m = l.interpolate({
|
|
1349
|
+
inputRange: [0, 1],
|
|
1350
|
+
outputRange: [-16, 0]
|
|
1351
|
+
});
|
|
1352
|
+
return /* @__PURE__ */ E(p.View, {
|
|
1353
|
+
style: [$.card, {
|
|
1354
|
+
backgroundColor: s,
|
|
1355
|
+
opacity: l,
|
|
1356
|
+
transform: [{ translateY: m }]
|
|
1357
|
+
}],
|
|
1358
|
+
children: [
|
|
1359
|
+
/* @__PURE__ */ T(C, {
|
|
1360
|
+
style: $.iconWrapper,
|
|
1361
|
+
children: /* @__PURE__ */ T($e, { variant: i })
|
|
1362
|
+
}),
|
|
1363
|
+
/* @__PURE__ */ E(C, {
|
|
1364
|
+
style: $.content,
|
|
1365
|
+
children: [n && /* @__PURE__ */ T(A, {
|
|
1366
|
+
variant: "label",
|
|
1367
|
+
color: c,
|
|
1368
|
+
children: n
|
|
1369
|
+
}), r && /* @__PURE__ */ T(A, {
|
|
1370
|
+
variant: "body",
|
|
1371
|
+
color: c,
|
|
1372
|
+
style: $.description,
|
|
1373
|
+
children: r
|
|
1374
|
+
})]
|
|
1375
|
+
}),
|
|
1376
|
+
/* @__PURE__ */ T(N, {
|
|
1377
|
+
size: "sm",
|
|
1378
|
+
accessibilityLabel: "Dismiss",
|
|
1379
|
+
onPress: () => o(t),
|
|
1380
|
+
children: /* @__PURE__ */ T(e, {
|
|
1381
|
+
size: "small",
|
|
1382
|
+
color: c
|
|
1383
|
+
})
|
|
1384
|
+
})
|
|
1385
|
+
]
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
function nt() {
|
|
1389
|
+
let { toasts: e, dismiss: t } = qe(), n = te(), r = e.filter((e) => e.open !== !1);
|
|
1390
|
+
return r.length === 0 ? null : /* @__PURE__ */ T(C, {
|
|
1391
|
+
style: [$.container, { top: Math.max(n.top, 16) }],
|
|
1392
|
+
pointerEvents: "box-none",
|
|
1393
|
+
children: r.map((e) => /* @__PURE__ */ T(tt, {
|
|
1394
|
+
id: e.id,
|
|
1395
|
+
title: e.title,
|
|
1396
|
+
description: e.description,
|
|
1397
|
+
variant: e.variant,
|
|
1398
|
+
duration: e.duration,
|
|
1399
|
+
onDismiss: t
|
|
1400
|
+
}, e.id))
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
var $ = b.create({
|
|
1404
|
+
container: {
|
|
1405
|
+
position: "absolute",
|
|
1406
|
+
left: 0,
|
|
1407
|
+
right: 0,
|
|
1408
|
+
alignItems: "center",
|
|
1409
|
+
paddingHorizontal: 16
|
|
1410
|
+
},
|
|
1411
|
+
card: {
|
|
1412
|
+
width: "100%",
|
|
1413
|
+
flexDirection: "row",
|
|
1414
|
+
alignItems: "center",
|
|
1415
|
+
gap: 8,
|
|
1416
|
+
borderRadius: 16,
|
|
1417
|
+
padding: 12,
|
|
1418
|
+
shadowColor: t.black,
|
|
1419
|
+
shadowOpacity: .04,
|
|
1420
|
+
shadowRadius: 16,
|
|
1421
|
+
shadowOffset: {
|
|
1422
|
+
width: 0,
|
|
1423
|
+
height: 0
|
|
1424
|
+
},
|
|
1425
|
+
elevation: 4
|
|
1426
|
+
},
|
|
1427
|
+
iconWrapper: {
|
|
1428
|
+
width: 24,
|
|
1429
|
+
height: 24,
|
|
1430
|
+
alignItems: "center",
|
|
1431
|
+
justifyContent: "center"
|
|
1432
|
+
},
|
|
1433
|
+
content: { flex: 1 },
|
|
1434
|
+
description: { fontSize: 13 }
|
|
1435
|
+
}), rt = () => {
|
|
1436
|
+
let [e, t] = f(window.innerWidth <= 768), n = d(window.innerWidth);
|
|
1437
|
+
return u(() => {
|
|
1438
|
+
let e = () => {
|
|
1439
|
+
let e = window.innerWidth;
|
|
1440
|
+
e <= 768 && n.current > 768 ? t(!0) : e > 768 && n.current <= 768 && t(!1), n.current = e;
|
|
1441
|
+
};
|
|
1442
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1443
|
+
}, []), e;
|
|
1444
|
+
};
|
|
1445
|
+
//#endregion
|
|
1446
|
+
export { re as Badge, oe as Button, ce as Card, ue as Divider, fe as EmptyState, N as IconButton, ge as Input, Ae as Letter, je as MenuItem, Me as RadioCard, Ne as Select, Pe as Sheet, j as Spinner, Be as StepProgress, A as Text, nt as Toaster, t as colors, o as icons, i as typography, rt as useIsMobile, qe as useToast };
|