@gnome-ui/react-native 1.6.0 → 1.8.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/README.md +533 -4
- package/dist/components/Bin/Bin.d.ts +18 -0
- package/dist/components/Bin/index.d.ts +2 -0
- package/dist/components/Blockquote/Blockquote.d.ts +40 -0
- package/dist/components/Blockquote/index.d.ts +2 -0
- package/dist/components/BottomTabBar/BottomTabBar.d.ts +106 -0
- package/dist/components/BottomTabBar/index.d.ts +2 -0
- package/dist/components/ButtonRow/ButtonRow.d.ts +41 -0
- package/dist/components/ButtonRow/index.d.ts +2 -0
- package/dist/components/Callout/Callout.d.ts +36 -0
- package/dist/components/Callout/index.d.ts +2 -0
- package/dist/components/CheckRow/CheckRow.d.ts +47 -0
- package/dist/components/CheckRow/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +81 -0
- package/dist/components/ColorPicker/ColorSwatch.d.ts +50 -0
- package/dist/components/ColorPicker/index.d.ts +4 -0
- package/dist/components/ComboRow/ComboRow.d.ts +77 -0
- package/dist/components/ComboRow/index.d.ts +2 -0
- package/dist/components/EntryRow/EntryRow.d.ts +77 -0
- package/dist/components/EntryRow/index.d.ts +2 -0
- package/dist/components/ExpanderRow/ExpanderRow.d.ts +58 -0
- package/dist/components/ExpanderRow/index.d.ts +2 -0
- package/dist/components/FieldGroup/FieldGroup.d.ts +52 -0
- package/dist/components/FieldGroup/index.d.ts +2 -0
- package/dist/components/FilterableMultiSelectDropdown/FilterableMultiSelectDropdown.d.ts +46 -0
- package/dist/components/FilterableMultiSelectDropdown/index.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +11 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +55 -0
- package/dist/components/MultiSelectDropdown/index.d.ts +2 -0
- package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +45 -0
- package/dist/components/PasswordEntryRow/index.d.ts +2 -0
- package/dist/components/PasswordField/PasswordField.d.ts +48 -0
- package/dist/components/PasswordField/index.d.ts +2 -0
- package/dist/components/RangeSlider/RangeSlider.d.ts +73 -0
- package/dist/components/RangeSlider/index.d.ts +2 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +47 -0
- package/dist/components/StatusBadge/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.js +2454 -778
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Children as e, Fragment as t, cloneElement as n, createContext as r, forwardRef as i, isValidElement as a, useCallback as o, useContext as s, useEffect as c, useImperativeHandle as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
2
2
|
import { AccessibilityInfo as p, Animated as m, BackHandler as h, Dimensions as g, Easing as _, I18nManager as v, Image as y, Linking as b, Modal as x, PanResponder as S, Platform as C, Pressable as w, ScrollView as T, StyleSheet as E, Text as D, TextInput as O, View as k, useColorScheme as A } from "react-native";
|
|
3
3
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
5
|
-
import { Circle as
|
|
4
|
+
import { Add as P, ApplicationXExecutable as F, AudioXGeneric as I, Check as L, Close as R, Connecting as z, DialogInformation as B, DialogWarning as V, Document as H, Downloading as ee, Folder as te, FontXGeneric as ne, ImageXGeneric as re, PackageXGeneric as ie, PanDown as ae, PanEnd as oe, Recording as se, Search as ce, Syncing as le, TextXGeneric as ue, VideoXGeneric as de, ViewConceal as fe, ViewReveal as pe, XOfficeDocument as me, XOfficePresentation as he, XOfficeSpreadsheet as ge } from "@gnome-ui/icons";
|
|
5
|
+
import _e, { Circle as ve, G as ye, Path as U, Svg as be, SvgXml as xe } from "react-native-svg";
|
|
6
6
|
//#region src/theme/tokens.generated.ts
|
|
7
|
-
var
|
|
7
|
+
var Se = {
|
|
8
8
|
accentBgColor: "#3584e4",
|
|
9
9
|
accentColor: "#3584e4",
|
|
10
10
|
accentFgColor: "#fff",
|
|
@@ -145,7 +145,7 @@ var me = {
|
|
|
145
145
|
yellow3: "#f6d32d",
|
|
146
146
|
yellow4: "#f5c211",
|
|
147
147
|
yellow5: "#e5a50a"
|
|
148
|
-
},
|
|
148
|
+
}, Ce = {
|
|
149
149
|
accentBgColor: "#3584e4",
|
|
150
150
|
accentColor: "#62a0ea",
|
|
151
151
|
accentFgColor: "#fff",
|
|
@@ -286,7 +286,7 @@ var me = {
|
|
|
286
286
|
yellow3: "#f6d32d",
|
|
287
287
|
yellow4: "#f5c211",
|
|
288
288
|
yellow5: "#e5a50a"
|
|
289
|
-
},
|
|
289
|
+
}, we = {
|
|
290
290
|
accentBgColor: "#1a5fb4",
|
|
291
291
|
accentColor: "#1a5fb4",
|
|
292
292
|
accentFgColor: "#fff",
|
|
@@ -427,7 +427,7 @@ var me = {
|
|
|
427
427
|
yellow3: "#f6d32d",
|
|
428
428
|
yellow4: "#f5c211",
|
|
429
429
|
yellow5: "#e5a50a"
|
|
430
|
-
},
|
|
430
|
+
}, Te = {
|
|
431
431
|
accentBgColor: "#62a0ea",
|
|
432
432
|
accentColor: "#99c1f1",
|
|
433
433
|
accentFgColor: "#fff",
|
|
@@ -568,7 +568,7 @@ var me = {
|
|
|
568
568
|
yellow3: "#f6d32d",
|
|
569
569
|
yellow4: "#f5c211",
|
|
570
570
|
yellow5: "#e5a50a"
|
|
571
|
-
},
|
|
571
|
+
}, Ee = {
|
|
572
572
|
"--gnome-accent-bg-color": "#3584e4",
|
|
573
573
|
"--gnome-accent-color": "#3584e4",
|
|
574
574
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -709,7 +709,7 @@ var me = {
|
|
|
709
709
|
"--gnome-yellow-3": "#f6d32d",
|
|
710
710
|
"--gnome-yellow-4": "#f5c211",
|
|
711
711
|
"--gnome-yellow-5": "#e5a50a"
|
|
712
|
-
},
|
|
712
|
+
}, De = {
|
|
713
713
|
"--gnome-accent-bg-color": "#3584e4",
|
|
714
714
|
"--gnome-accent-color": "#62a0ea",
|
|
715
715
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -850,7 +850,7 @@ var me = {
|
|
|
850
850
|
"--gnome-yellow-3": "#f6d32d",
|
|
851
851
|
"--gnome-yellow-4": "#f5c211",
|
|
852
852
|
"--gnome-yellow-5": "#e5a50a"
|
|
853
|
-
},
|
|
853
|
+
}, Oe = {
|
|
854
854
|
"--gnome-accent-bg-color": "#1a5fb4",
|
|
855
855
|
"--gnome-accent-color": "#1a5fb4",
|
|
856
856
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -991,7 +991,7 @@ var me = {
|
|
|
991
991
|
"--gnome-yellow-3": "#f6d32d",
|
|
992
992
|
"--gnome-yellow-4": "#f5c211",
|
|
993
993
|
"--gnome-yellow-5": "#e5a50a"
|
|
994
|
-
},
|
|
994
|
+
}, ke = {
|
|
995
995
|
"--gnome-accent-bg-color": "#62a0ea",
|
|
996
996
|
"--gnome-accent-color": "#99c1f1",
|
|
997
997
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -1132,7 +1132,7 @@ var me = {
|
|
|
1132
1132
|
"--gnome-yellow-3": "#f6d32d",
|
|
1133
1133
|
"--gnome-yellow-4": "#f5c211",
|
|
1134
1134
|
"--gnome-yellow-5": "#e5a50a"
|
|
1135
|
-
},
|
|
1135
|
+
}, W = r({
|
|
1136
1136
|
locale: void 0,
|
|
1137
1137
|
dir: "ltr",
|
|
1138
1138
|
numberFormat: void 0,
|
|
@@ -1142,16 +1142,16 @@ var me = {
|
|
|
1142
1142
|
contrast: "system",
|
|
1143
1143
|
resolvedContrast: "normal",
|
|
1144
1144
|
accentColor: "blue",
|
|
1145
|
-
theme:
|
|
1145
|
+
theme: Se
|
|
1146
1146
|
});
|
|
1147
|
-
function
|
|
1148
|
-
return s(
|
|
1147
|
+
function Ae() {
|
|
1148
|
+
return s(W).locale;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return s(
|
|
1150
|
+
function je() {
|
|
1151
|
+
return s(W).dir;
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
let { locale: t, numberFormat: n } = s(
|
|
1153
|
+
function Me(e) {
|
|
1154
|
+
let { locale: t, numberFormat: n } = s(W);
|
|
1155
1155
|
return u(() => new Intl.NumberFormat(t, {
|
|
1156
1156
|
...n,
|
|
1157
1157
|
...e
|
|
@@ -1161,8 +1161,8 @@ function we(e) {
|
|
|
1161
1161
|
e
|
|
1162
1162
|
]);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
let { locale: t, dateTimeFormat: n } = s(
|
|
1164
|
+
function Ne(e) {
|
|
1165
|
+
let { locale: t, dateTimeFormat: n } = s(W);
|
|
1166
1166
|
return u(() => new Intl.DateTimeFormat(t, {
|
|
1167
1167
|
...n,
|
|
1168
1168
|
...e
|
|
@@ -1172,32 +1172,32 @@ function Te(e) {
|
|
|
1172
1172
|
e
|
|
1173
1173
|
]);
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return s(
|
|
1175
|
+
function Pe() {
|
|
1176
|
+
return s(W).colorScheme;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return s(
|
|
1178
|
+
function G() {
|
|
1179
|
+
return s(W).resolvedColorScheme;
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1182
|
-
return s(
|
|
1181
|
+
function Fe() {
|
|
1182
|
+
return s(W).contrast;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return s(
|
|
1184
|
+
function K() {
|
|
1185
|
+
return s(W).resolvedContrast;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return s(
|
|
1187
|
+
function Ie() {
|
|
1188
|
+
return s(W).accentColor;
|
|
1189
1189
|
}
|
|
1190
1190
|
function q() {
|
|
1191
|
-
return s(
|
|
1191
|
+
return s(W).theme;
|
|
1192
1192
|
}
|
|
1193
1193
|
//#endregion
|
|
1194
1194
|
//#region src/theme/resolveTheme.ts
|
|
1195
|
-
function
|
|
1196
|
-
return t === "more" ? e === "dark" ?
|
|
1195
|
+
function Le({ colorScheme: e, contrast: t = "normal" }) {
|
|
1196
|
+
return t === "more" ? e === "dark" ? Te : we : e === "dark" ? Ce : Se;
|
|
1197
1197
|
}
|
|
1198
1198
|
//#endregion
|
|
1199
1199
|
//#region src/GnomeProvider/resolveContext.ts
|
|
1200
|
-
var
|
|
1200
|
+
var Re = new Set([
|
|
1201
1201
|
"blue",
|
|
1202
1202
|
"green",
|
|
1203
1203
|
"yellow",
|
|
@@ -1206,15 +1206,15 @@ var je = new Set([
|
|
|
1206
1206
|
"purple",
|
|
1207
1207
|
"brown"
|
|
1208
1208
|
]);
|
|
1209
|
-
function
|
|
1209
|
+
function ze(e, t) {
|
|
1210
1210
|
return e === "system" ? t === "dark" ? "dark" : "light" : e;
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Be(e, t) {
|
|
1213
1213
|
return e === "system" ? t ? "more" : "normal" : e;
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function Ve(e, t, n, r) {
|
|
1216
1216
|
if (t === "blue") return e;
|
|
1217
|
-
let i =
|
|
1217
|
+
let i = Re.has(t), a = i ? e[`${t}${n === "dark" ? 2 : 3}`] : t, o = i ? e[`${t}3`] : t;
|
|
1218
1218
|
return {
|
|
1219
1219
|
...e,
|
|
1220
1220
|
accentColor: a,
|
|
@@ -1224,7 +1224,7 @@ function Pe(e, t, n, r) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
//#endregion
|
|
1226
1226
|
//#region src/GnomeProvider/GnomeProvider.tsx
|
|
1227
|
-
function
|
|
1227
|
+
function He() {
|
|
1228
1228
|
let [e, t] = f(!1);
|
|
1229
1229
|
return c(() => {
|
|
1230
1230
|
let e = C.OS === "android" ? p.isHighTextContrastEnabled : C.OS === "ios" ? p.isDarkerSystemColorsEnabled : void 0;
|
|
@@ -1254,8 +1254,8 @@ function J() {
|
|
|
1254
1254
|
};
|
|
1255
1255
|
}, []), e;
|
|
1256
1256
|
}
|
|
1257
|
-
var
|
|
1258
|
-
let c = A(), l =
|
|
1257
|
+
var Ue = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme: i = "system", contrast: a = "system", accentColor: o = "blue", children: s }) => {
|
|
1258
|
+
let c = A(), l = He(), d = ze(i, c), f = Be(a, l), p = t ?? (v.isRTL ? "rtl" : "ltr"), m = u(() => ({
|
|
1259
1259
|
locale: e,
|
|
1260
1260
|
dir: p,
|
|
1261
1261
|
numberFormat: n,
|
|
@@ -1265,7 +1265,7 @@ var Ie = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme:
|
|
|
1265
1265
|
contrast: a,
|
|
1266
1266
|
resolvedContrast: f,
|
|
1267
1267
|
accentColor: o,
|
|
1268
|
-
theme:
|
|
1268
|
+
theme: Ve(Le({
|
|
1269
1269
|
colorScheme: d,
|
|
1270
1270
|
contrast: f
|
|
1271
1271
|
}), o, d, f)
|
|
@@ -1280,11 +1280,11 @@ var Ie = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme:
|
|
|
1280
1280
|
f,
|
|
1281
1281
|
o
|
|
1282
1282
|
]);
|
|
1283
|
-
return /* @__PURE__ */ M(
|
|
1283
|
+
return /* @__PURE__ */ M(W.Provider, {
|
|
1284
1284
|
value: m,
|
|
1285
1285
|
children: s
|
|
1286
1286
|
});
|
|
1287
|
-
},
|
|
1287
|
+
}, We = new Set([
|
|
1288
1288
|
"large-title",
|
|
1289
1289
|
"title-1",
|
|
1290
1290
|
"title-2",
|
|
@@ -1292,7 +1292,7 @@ var Ie = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme:
|
|
|
1292
1292
|
"title-4",
|
|
1293
1293
|
"heading"
|
|
1294
1294
|
]);
|
|
1295
|
-
function
|
|
1295
|
+
function Ge(e, t) {
|
|
1296
1296
|
let n = (e) => String(e);
|
|
1297
1297
|
switch (t) {
|
|
1298
1298
|
case "large-title": return {
|
|
@@ -1361,7 +1361,7 @@ function Re(e, t) {
|
|
|
1361
1361
|
};
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function Ke(e, t) {
|
|
1365
1365
|
switch (t) {
|
|
1366
1366
|
case "dim": return {
|
|
1367
1367
|
color: e.windowFgColor,
|
|
@@ -1379,17 +1379,17 @@ var Y = i(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1379
1379
|
let s = q();
|
|
1380
1380
|
return /* @__PURE__ */ M(D, {
|
|
1381
1381
|
ref: o,
|
|
1382
|
-
accessibilityRole: i ?? (
|
|
1382
|
+
accessibilityRole: i ?? (We.has(e) ? "header" : void 0),
|
|
1383
1383
|
style: [
|
|
1384
1384
|
{ fontFamily: s.fontFamily },
|
|
1385
|
-
|
|
1386
|
-
|
|
1385
|
+
Ge(s, e),
|
|
1386
|
+
Ke(s, t),
|
|
1387
1387
|
n
|
|
1388
1388
|
],
|
|
1389
1389
|
...a,
|
|
1390
1390
|
children: r
|
|
1391
1391
|
});
|
|
1392
|
-
}),
|
|
1392
|
+
}), qe = i(function({ title: e, subtitle: t, leading: n, trailing: r, interactive: i = !1, variant: a = "default", style: o, disabled: s, ...c }, l) {
|
|
1393
1393
|
let u = q(), d = a === "property", f = {
|
|
1394
1394
|
flexDirection: "row",
|
|
1395
1395
|
alignItems: "center",
|
|
@@ -1456,12 +1456,12 @@ var Y = i(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1456
1456
|
...c,
|
|
1457
1457
|
children: p
|
|
1458
1458
|
});
|
|
1459
|
-
}),
|
|
1459
|
+
}), Je = {
|
|
1460
1460
|
sm: 12,
|
|
1461
1461
|
md: 16,
|
|
1462
1462
|
lg: 20
|
|
1463
1463
|
};
|
|
1464
|
-
function
|
|
1464
|
+
function Ye(e, t) {
|
|
1465
1465
|
switch (t) {
|
|
1466
1466
|
case "blue": return e.blue3;
|
|
1467
1467
|
case "green": return e.green4;
|
|
@@ -1473,7 +1473,7 @@ function He(e, t) {
|
|
|
1473
1473
|
default: return e.windowFgColor;
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1476
|
+
function Xe(e) {
|
|
1477
1477
|
return e ? {
|
|
1478
1478
|
accessible: !0,
|
|
1479
1479
|
accessibilityLabel: e,
|
|
@@ -1485,37 +1485,37 @@ function Ue(e) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
//#endregion
|
|
1487
1487
|
//#region src/components/Icon/Icon.tsx
|
|
1488
|
-
function
|
|
1488
|
+
function Ze(e) {
|
|
1489
1489
|
return "paths" in e && Array.isArray(e.paths) ? !0 : typeof e.svg == "string" && !("path" in e);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function Qe(e) {
|
|
1492
1492
|
return e === "nonzero" || e === "evenodd" ? e : void 0;
|
|
1493
1493
|
}
|
|
1494
|
-
var X = ({ icon: e, size: t = "md", width: n, height: r, label: i, color: a,
|
|
1495
|
-
let
|
|
1494
|
+
var X = ({ icon: e, size: t = "md", width: n, height: r, label: i, color: a, tintColor: o, style: s }) => {
|
|
1495
|
+
let c = q(), l = Je[t], u = o ?? Ye(c, a), d = Ze(e) ? e.viewBox : e.viewBox ?? "0 0 24 24", f = Ze(e) ? e.svg : void 0, p = Ze(e) ? e.svg ? void 0 : e.paths?.map((e, t) => /* @__PURE__ */ M(U, {
|
|
1496
1496
|
d: e.d,
|
|
1497
|
-
fillRule:
|
|
1498
|
-
clipRule:
|
|
1497
|
+
fillRule: Qe(e.fillRule),
|
|
1498
|
+
clipRule: Qe(e.clipRule),
|
|
1499
1499
|
transform: e.transform
|
|
1500
|
-
}, t)) : [/* @__PURE__ */ M(
|
|
1501
|
-
return
|
|
1502
|
-
xml: `<svg viewBox="${
|
|
1503
|
-
width: n ??
|
|
1504
|
-
height: r ??
|
|
1505
|
-
fill:
|
|
1506
|
-
style:
|
|
1507
|
-
...
|
|
1508
|
-
}) : /* @__PURE__ */ M(
|
|
1509
|
-
viewBox:
|
|
1510
|
-
width: n ??
|
|
1511
|
-
height: r ??
|
|
1512
|
-
fill:
|
|
1513
|
-
style:
|
|
1514
|
-
...
|
|
1515
|
-
children:
|
|
1500
|
+
}, t)) : [/* @__PURE__ */ M(U, { d: e.path }, 0)], m = Xe(i);
|
|
1501
|
+
return f ? /* @__PURE__ */ M(xe, {
|
|
1502
|
+
xml: `<svg viewBox="${d}">${f}</svg>`,
|
|
1503
|
+
width: n ?? l,
|
|
1504
|
+
height: r ?? l,
|
|
1505
|
+
fill: u,
|
|
1506
|
+
style: s,
|
|
1507
|
+
...m
|
|
1508
|
+
}) : /* @__PURE__ */ M(be, {
|
|
1509
|
+
viewBox: d,
|
|
1510
|
+
width: n ?? l,
|
|
1511
|
+
height: r ?? l,
|
|
1512
|
+
fill: u,
|
|
1513
|
+
style: s,
|
|
1514
|
+
...m,
|
|
1515
|
+
children: p
|
|
1516
1516
|
});
|
|
1517
|
-
},
|
|
1518
|
-
function
|
|
1517
|
+
}, $e = m.createAnimatedComponent(ye), et = m.createAnimatedComponent(U), tt = m.createAnimatedComponent(ve);
|
|
1518
|
+
function nt(e) {
|
|
1519
1519
|
let t = d(new m.Value(0)).current;
|
|
1520
1520
|
return c(() => {
|
|
1521
1521
|
let n = m.loop(m.timing(t, {
|
|
@@ -1527,7 +1527,7 @@ function Ye(e) {
|
|
|
1527
1527
|
return n.start(), () => n.stop();
|
|
1528
1528
|
}, [t, e]), t;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function rt(e, t) {
|
|
1531
1531
|
let n = d(new m.Value(0)).current;
|
|
1532
1532
|
return c(() => {
|
|
1533
1533
|
let r = m.sequence([m.delay(t), m.loop(m.timing(n, {
|
|
@@ -1543,17 +1543,17 @@ function Xe(e, t) {
|
|
|
1543
1543
|
t
|
|
1544
1544
|
]), n;
|
|
1545
1545
|
}
|
|
1546
|
-
var
|
|
1547
|
-
transform:
|
|
1546
|
+
var it = ({ fill: e }) => /* @__PURE__ */ M($e, {
|
|
1547
|
+
transform: nt(1500).interpolate({
|
|
1548
1548
|
inputRange: [0, 1],
|
|
1549
1549
|
outputRange: ["rotate(0, 8, 8)", "rotate(360, 8, 8)"]
|
|
1550
1550
|
}),
|
|
1551
|
-
children: /* @__PURE__ */ M(
|
|
1551
|
+
children: /* @__PURE__ */ M(U, {
|
|
1552
1552
|
fill: e,
|
|
1553
1553
|
fillRule: "evenodd",
|
|
1554
1554
|
d: "M8 2a6 6 0 0 0-6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1-4 4v-2L5 13l3 3v-2a6 6 0 0 0 6-6 6 6 0 0 0-6-6z"
|
|
1555
1555
|
})
|
|
1556
|
-
}),
|
|
1556
|
+
}), at = ({ fill: e }) => {
|
|
1557
1557
|
let t = d(new m.Value(1)).current;
|
|
1558
1558
|
return c(() => {
|
|
1559
1559
|
let e = _.inOut(_.ease), n = m.loop(m.sequence([m.timing(t, {
|
|
@@ -1568,13 +1568,13 @@ var Ze = ({ fill: e }) => /* @__PURE__ */ M(Ke, {
|
|
|
1568
1568
|
useNativeDriver: !1
|
|
1569
1569
|
})]));
|
|
1570
1570
|
return n.start(), () => n.stop();
|
|
1571
|
-
}, [t]), /* @__PURE__ */ M(
|
|
1571
|
+
}, [t]), /* @__PURE__ */ M(et, {
|
|
1572
1572
|
fill: e,
|
|
1573
1573
|
opacity: t,
|
|
1574
1574
|
d: "m 15 8 c 0 3.867188 -3.132812 7 -7 7 s -7 -3.132812 -7 -7 s 3.132812 -7 7 -7 s 7 3.132812 7 7 z m 0 0"
|
|
1575
1575
|
});
|
|
1576
|
-
},
|
|
1577
|
-
let t =
|
|
1576
|
+
}, ot = ({ fill: e }) => {
|
|
1577
|
+
let t = nt(1400), n = [
|
|
1578
1578
|
0,
|
|
1579
1579
|
.2,
|
|
1580
1580
|
.5,
|
|
@@ -1602,30 +1602,30 @@ var Ze = ({ fill: e }) => /* @__PURE__ */ M(Ke, {
|
|
|
1602
1602
|
1
|
|
1603
1603
|
]
|
|
1604
1604
|
});
|
|
1605
|
-
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(
|
|
1605
|
+
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(U, {
|
|
1606
1606
|
fill: e,
|
|
1607
1607
|
d: "M2 13h12v2H2z"
|
|
1608
|
-
}), /* @__PURE__ */ M(
|
|
1608
|
+
}), /* @__PURE__ */ M($e, {
|
|
1609
1609
|
transform: r,
|
|
1610
1610
|
opacity: i,
|
|
1611
|
-
children: /* @__PURE__ */ M(
|
|
1611
|
+
children: /* @__PURE__ */ M(U, {
|
|
1612
1612
|
fill: e,
|
|
1613
1613
|
fillRule: "evenodd",
|
|
1614
1614
|
d: "m2.5 5 5.5 6 5.5-6z"
|
|
1615
1615
|
})
|
|
1616
1616
|
})] });
|
|
1617
1617
|
};
|
|
1618
|
-
function
|
|
1618
|
+
function st(e, t, n) {
|
|
1619
1619
|
return `translate(${e}, ${t}) scale(${n}) translate(${-e}, ${-t})`;
|
|
1620
1620
|
}
|
|
1621
|
-
var
|
|
1622
|
-
let i =
|
|
1621
|
+
var ct = ({ cx: e, cy: t, fill: n, delay: r }) => {
|
|
1622
|
+
let i = rt(1200, r), a = [
|
|
1623
1623
|
0,
|
|
1624
1624
|
.2,
|
|
1625
1625
|
.4,
|
|
1626
1626
|
1
|
|
1627
1627
|
];
|
|
1628
|
-
return /* @__PURE__ */ M(
|
|
1628
|
+
return /* @__PURE__ */ M(tt, {
|
|
1629
1629
|
cx: e,
|
|
1630
1630
|
cy: t,
|
|
1631
1631
|
r: 2,
|
|
@@ -1642,43 +1642,43 @@ var tt = ({ cx: e, cy: t, fill: n, delay: r }) => {
|
|
|
1642
1642
|
transform: i.interpolate({
|
|
1643
1643
|
inputRange: a,
|
|
1644
1644
|
outputRange: [
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1645
|
+
st(e, t, 1),
|
|
1646
|
+
st(e, t, .7),
|
|
1647
|
+
st(e, t, 1),
|
|
1648
|
+
st(e, t, 1)
|
|
1649
1649
|
]
|
|
1650
1650
|
})
|
|
1651
1651
|
});
|
|
1652
|
-
},
|
|
1653
|
-
[
|
|
1654
|
-
[
|
|
1655
|
-
[
|
|
1656
|
-
[
|
|
1657
|
-
/* @__PURE__ */ M(
|
|
1652
|
+
}, lt = new Map([
|
|
1653
|
+
[le, it],
|
|
1654
|
+
[se, at],
|
|
1655
|
+
[ee, ot],
|
|
1656
|
+
[z, ({ fill: e }) => /* @__PURE__ */ N(j, { children: [
|
|
1657
|
+
/* @__PURE__ */ M(U, {
|
|
1658
1658
|
fill: e,
|
|
1659
1659
|
d: "m 8 1.992188 c -2.617188 0 -5.238281 0.933593 -7.195312 2.808593 l -0.496094 0.480469 c -0.3984378 0.378906 -0.410156 1.011719 -0.03125 1.410156 c 0.003906 0.007813 0.011718 0.011719 0.019531 0.015625 c 0.480469 -1.011719 1.503906 -1.707031 2.703125 -1.707031 h 0.9375 c 2.480469 -1.292969 5.644531 -1.292969 8.125 0 h 0.9375 c 1.199219 0 2.222656 0.695312 2.707031 1.707031 c 0.003907 -0.007812 0.011719 -0.011719 0.015625 -0.015625 c 0.378906 -0.398437 0.367188 -1.03125 -0.03125 -1.410156 l -0.496094 -0.480469 c -1.957031 -1.875 -4.578124 -2.808593 -7.195312 -2.808593 z m -1.730469 9.007812 c -0.441406 0.765625 -0.339843 1.757812 0.316407 2.414062 c 0.78125 0.78125 2.046874 0.78125 2.828124 0 c 0.65625 -0.65625 0.757813 -1.648437 0.316407 -2.414062 z m 0 0"
|
|
1660
1660
|
}),
|
|
1661
|
-
/* @__PURE__ */ M(
|
|
1661
|
+
/* @__PURE__ */ M(ct, {
|
|
1662
1662
|
cx: 3,
|
|
1663
1663
|
cy: 8,
|
|
1664
1664
|
fill: e,
|
|
1665
1665
|
delay: 0
|
|
1666
1666
|
}),
|
|
1667
|
-
/* @__PURE__ */ M(
|
|
1667
|
+
/* @__PURE__ */ M(ct, {
|
|
1668
1668
|
cx: 8,
|
|
1669
1669
|
cy: 8,
|
|
1670
1670
|
fill: e,
|
|
1671
1671
|
delay: 150
|
|
1672
1672
|
}),
|
|
1673
|
-
/* @__PURE__ */ M(
|
|
1673
|
+
/* @__PURE__ */ M(ct, {
|
|
1674
1674
|
cx: 13,
|
|
1675
1675
|
cy: 8,
|
|
1676
1676
|
fill: e,
|
|
1677
1677
|
delay: 300
|
|
1678
1678
|
})
|
|
1679
1679
|
] })]
|
|
1680
|
-
]),
|
|
1681
|
-
let s = q(), c = J(), l = t && !c ?
|
|
1680
|
+
]), ut = ({ icon: e, playing: t = !0, size: n = "md", width: r, height: i, label: a, color: o }) => {
|
|
1681
|
+
let s = q(), c = J(), l = t && !c ? lt.get(e) : void 0;
|
|
1682
1682
|
if (!l) return /* @__PURE__ */ M(X, {
|
|
1683
1683
|
icon: e,
|
|
1684
1684
|
size: n,
|
|
@@ -1687,15 +1687,15 @@ var tt = ({ cx: e, cy: t, fill: n, delay: r }) => {
|
|
|
1687
1687
|
label: a,
|
|
1688
1688
|
color: o
|
|
1689
1689
|
});
|
|
1690
|
-
let u =
|
|
1691
|
-
return /* @__PURE__ */ M(
|
|
1690
|
+
let u = Je[n], d = Ye(s, o), f = Xe(a);
|
|
1691
|
+
return /* @__PURE__ */ M(be, {
|
|
1692
1692
|
viewBox: e.viewBox,
|
|
1693
1693
|
width: r ?? u,
|
|
1694
1694
|
height: i ?? u,
|
|
1695
1695
|
...f,
|
|
1696
1696
|
children: /* @__PURE__ */ M(l, { fill: d })
|
|
1697
1697
|
});
|
|
1698
|
-
},
|
|
1698
|
+
}, dt = [
|
|
1699
1699
|
"blue",
|
|
1700
1700
|
"green",
|
|
1701
1701
|
"yellow",
|
|
@@ -1705,27 +1705,27 @@ var tt = ({ cx: e, cy: t, fill: n, delay: r }) => {
|
|
|
1705
1705
|
"brown",
|
|
1706
1706
|
"teal",
|
|
1707
1707
|
"slate"
|
|
1708
|
-
],
|
|
1708
|
+
], ft = {
|
|
1709
1709
|
sm: 24,
|
|
1710
1710
|
md: 32,
|
|
1711
1711
|
lg: 48,
|
|
1712
1712
|
xl: 64
|
|
1713
|
-
},
|
|
1713
|
+
}, pt = {
|
|
1714
1714
|
sm: .5,
|
|
1715
1715
|
md: .6,
|
|
1716
1716
|
lg: 1,
|
|
1717
1717
|
xl: 1.4
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function mt(e) {
|
|
1720
1720
|
let t = 0;
|
|
1721
1721
|
for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) >>> 0;
|
|
1722
|
-
return
|
|
1722
|
+
return dt[t % dt.length];
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function ht(e) {
|
|
1725
1725
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
1726
1726
|
return t.length === 0 ? "" : t.length === 1 ? t[0].charAt(0).toUpperCase() : t[0].charAt(0).toUpperCase() + t[t.length - 1].charAt(0).toUpperCase();
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function gt(e, t) {
|
|
1729
1729
|
switch (t) {
|
|
1730
1730
|
case "blue": return {
|
|
1731
1731
|
backgroundColor: e.blue3,
|
|
@@ -1765,8 +1765,8 @@ function lt(e, t) {
|
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
|
-
var
|
|
1769
|
-
let o = q(), s =
|
|
1768
|
+
var _t = ({ name: e = "", src: t, alt: n, size: r = "md", color: i, style: a }) => {
|
|
1769
|
+
let o = q(), s = G(), c = i ?? (e ? mt(e) : "blue"), l = ht(e), u = ft[r], { backgroundColor: d, initialsColor: f } = gt(o, c), p = s === "dark" ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.08)";
|
|
1770
1770
|
return /* @__PURE__ */ M(k, {
|
|
1771
1771
|
accessible: !0,
|
|
1772
1772
|
role: "img",
|
|
@@ -1798,30 +1798,30 @@ var ut = ({ name: e = "", src: t, alt: n, size: r = "md", color: i, style: a })
|
|
|
1798
1798
|
style: {
|
|
1799
1799
|
fontFamily: o.fontFamily,
|
|
1800
1800
|
fontWeight: String(o.fontWeightSemibold),
|
|
1801
|
-
fontSize: o.fontSizeBody *
|
|
1802
|
-
lineHeight: o.fontSizeBody *
|
|
1801
|
+
fontSize: o.fontSizeBody * pt[r],
|
|
1802
|
+
lineHeight: o.fontSizeBody * pt[r],
|
|
1803
1803
|
color: f
|
|
1804
1804
|
},
|
|
1805
1805
|
children: l
|
|
1806
1806
|
})
|
|
1807
1807
|
});
|
|
1808
|
-
},
|
|
1808
|
+
}, vt = {
|
|
1809
1809
|
sm: 6,
|
|
1810
1810
|
md: 8,
|
|
1811
1811
|
lg: 12,
|
|
1812
1812
|
xl: 16
|
|
1813
|
-
},
|
|
1813
|
+
}, yt = {
|
|
1814
1814
|
sm: 24,
|
|
1815
1815
|
md: 32,
|
|
1816
1816
|
lg: 48,
|
|
1817
1817
|
xl: 64
|
|
1818
|
-
},
|
|
1818
|
+
}, bt = {
|
|
1819
1819
|
sm: 8,
|
|
1820
1820
|
md: 9.6,
|
|
1821
1821
|
lg: 14,
|
|
1822
1822
|
xl: 17.6
|
|
1823
|
-
},
|
|
1824
|
-
let o = q(), s = e.length > t ? e.slice(0, t) : e, c = e.length > t ? e.length - t : 0, l = e.map((e) => e.name).filter(Boolean).join(", "), u = r ?? (l ? c > 0 ? `${l} and ${c} more` : l : "Avatar group"), d =
|
|
1823
|
+
}, xt = ({ avatars: e, max: t = 5, size: n = "md", accessibilityLabel: r, style: i, testID: a }) => {
|
|
1824
|
+
let o = q(), s = e.length > t ? e.slice(0, t) : e, c = e.length > t ? e.length - t : 0, l = e.map((e) => e.name).filter(Boolean).join(", "), u = r ?? (l ? c > 0 ? `${l} and ${c} more` : l : "Avatar group"), d = vt[n];
|
|
1825
1825
|
return /* @__PURE__ */ N(k, {
|
|
1826
1826
|
testID: a,
|
|
1827
1827
|
accessible: !0,
|
|
@@ -1831,7 +1831,7 @@ var ut = ({ name: e = "", src: t, alt: n, size: r = "md", color: i, style: a })
|
|
|
1831
1831
|
flexDirection: "row",
|
|
1832
1832
|
alignItems: "center"
|
|
1833
1833
|
}, i],
|
|
1834
|
-
children: [s.map((e, t) => /* @__PURE__ */ M(
|
|
1834
|
+
children: [s.map((e, t) => /* @__PURE__ */ M(_t, {
|
|
1835
1835
|
name: e.name,
|
|
1836
1836
|
src: e.src,
|
|
1837
1837
|
alt: e.alt ?? e.name,
|
|
@@ -1846,8 +1846,8 @@ var ut = ({ name: e = "", src: t, alt: n, size: r = "md", color: i, style: a })
|
|
|
1846
1846
|
accessible: !0,
|
|
1847
1847
|
accessibilityLabel: `+${c} more`,
|
|
1848
1848
|
style: {
|
|
1849
|
-
width:
|
|
1850
|
-
height:
|
|
1849
|
+
width: yt[n],
|
|
1850
|
+
height: yt[n],
|
|
1851
1851
|
marginStart: -d,
|
|
1852
1852
|
borderRadius: o.radiusPill,
|
|
1853
1853
|
borderWidth: 2,
|
|
@@ -1862,7 +1862,7 @@ var ut = ({ name: e = "", src: t, alt: n, size: r = "md", color: i, style: a })
|
|
|
1862
1862
|
style: {
|
|
1863
1863
|
fontFamily: o.fontFamily,
|
|
1864
1864
|
fontWeight: String(o.fontWeightSemibold),
|
|
1865
|
-
fontSize:
|
|
1865
|
+
fontSize: bt[n],
|
|
1866
1866
|
color: "#fff"
|
|
1867
1867
|
},
|
|
1868
1868
|
children: `+${c}`
|
|
@@ -1872,15 +1872,15 @@ var ut = ({ name: e = "", src: t, alt: n, size: r = "md", color: i, style: a })
|
|
|
1872
1872
|
};
|
|
1873
1873
|
//#endregion
|
|
1874
1874
|
//#region src/components/AvatarRotator/AvatarRotator.tsx
|
|
1875
|
-
function
|
|
1875
|
+
function St(e, t) {
|
|
1876
1876
|
return t <= 0 ? 0 : (e % t + t) % t;
|
|
1877
1877
|
}
|
|
1878
|
-
var
|
|
1878
|
+
var Ct = {
|
|
1879
1879
|
sm: 24,
|
|
1880
1880
|
md: 32,
|
|
1881
1881
|
lg: 48,
|
|
1882
1882
|
xl: 64
|
|
1883
|
-
},
|
|
1883
|
+
}, wt = ({ active: e, duration: t, reducedMotion: n, children: r }) => {
|
|
1884
1884
|
let i = d(new m.Value(+!!e)).current;
|
|
1885
1885
|
return c(() => {
|
|
1886
1886
|
if (n) {
|
|
@@ -1903,12 +1903,12 @@ var gt = {
|
|
|
1903
1903
|
style: [E.absoluteFill, { opacity: i }],
|
|
1904
1904
|
children: r
|
|
1905
1905
|
});
|
|
1906
|
-
},
|
|
1907
|
-
let h = J(), g = t.map((e) => e.trim()).filter(Boolean), _ = l !== void 0, [v, y] = f(u), [b, x] = f(!1), S =
|
|
1906
|
+
}, Tt = ({ name: e = "", avatars: t = [], alt: n, size: r = "md", color: i, interval: a = 3e3, transitionDuration: o = 240, pauseOnPress: s = !0, activeIndex: l, defaultActiveIndex: u = 0, onIndexChange: d, style: p, testID: m }) => {
|
|
1907
|
+
let h = J(), g = t.map((e) => e.trim()).filter(Boolean), _ = l !== void 0, [v, y] = f(u), [b, x] = f(!1), S = St(_ ? l : v, g.length);
|
|
1908
1908
|
if (c(() => {
|
|
1909
1909
|
if (g.length <= 1 || a <= 0 || b || h) return;
|
|
1910
1910
|
let e = setInterval(() => {
|
|
1911
|
-
let e =
|
|
1911
|
+
let e = St(S + 1, g.length);
|
|
1912
1912
|
_ || y(e), d?.(e);
|
|
1913
1913
|
}, a);
|
|
1914
1914
|
return () => clearInterval(e);
|
|
@@ -1920,14 +1920,14 @@ var gt = {
|
|
|
1920
1920
|
d,
|
|
1921
1921
|
h,
|
|
1922
1922
|
g.length
|
|
1923
|
-
]), g.length === 0) return /* @__PURE__ */ M(
|
|
1923
|
+
]), g.length === 0) return /* @__PURE__ */ M(_t, {
|
|
1924
1924
|
name: e,
|
|
1925
1925
|
alt: n,
|
|
1926
1926
|
size: r,
|
|
1927
1927
|
color: i,
|
|
1928
1928
|
style: p
|
|
1929
1929
|
});
|
|
1930
|
-
let C = n ?? (e || void 0) ?? "Avatar", T =
|
|
1930
|
+
let C = n ?? (e || void 0) ?? "Avatar", T = Ct[r];
|
|
1931
1931
|
return /* @__PURE__ */ M(w, {
|
|
1932
1932
|
testID: m,
|
|
1933
1933
|
accessible: !0,
|
|
@@ -1941,11 +1941,11 @@ var gt = {
|
|
|
1941
1941
|
borderRadius: T / 2,
|
|
1942
1942
|
overflow: "hidden"
|
|
1943
1943
|
}, p],
|
|
1944
|
-
children: g.map((t, n) => /* @__PURE__ */ M(
|
|
1944
|
+
children: g.map((t, n) => /* @__PURE__ */ M(wt, {
|
|
1945
1945
|
active: n === S,
|
|
1946
1946
|
duration: Math.max(0, o),
|
|
1947
1947
|
reducedMotion: h,
|
|
1948
|
-
children: /* @__PURE__ */ M(
|
|
1948
|
+
children: /* @__PURE__ */ M(_t, {
|
|
1949
1949
|
name: e,
|
|
1950
1950
|
src: t,
|
|
1951
1951
|
size: r
|
|
@@ -1955,7 +1955,7 @@ var gt = {
|
|
|
1955
1955
|
};
|
|
1956
1956
|
//#endregion
|
|
1957
1957
|
//#region src/components/Badge/Badge.tsx
|
|
1958
|
-
function
|
|
1958
|
+
function Et(e, t, n) {
|
|
1959
1959
|
switch (n) {
|
|
1960
1960
|
case "accent": return {
|
|
1961
1961
|
backgroundColor: e.accentBgColor,
|
|
@@ -1979,8 +1979,8 @@ function yt(e, t, n) {
|
|
|
1979
1979
|
};
|
|
1980
1980
|
}
|
|
1981
1981
|
}
|
|
1982
|
-
var
|
|
1983
|
-
let a = q(), { backgroundColor: o, color: s } =
|
|
1982
|
+
var Dt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i }) => {
|
|
1983
|
+
let a = q(), { backgroundColor: o, color: s } = Et(a, G(), e), c = /* @__PURE__ */ M(k, {
|
|
1984
1984
|
testID: "badge-ring",
|
|
1985
1985
|
style: [{
|
|
1986
1986
|
padding: 2,
|
|
@@ -2019,7 +2019,7 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2019
2019
|
style: { alignSelf: "flex-start" },
|
|
2020
2020
|
children: [r, c]
|
|
2021
2021
|
}) : c;
|
|
2022
|
-
},
|
|
2022
|
+
}, Ot = ({ variant: e = "info", children: t, actionLabel: n, onAction: r, dismissible: i = !1, onDismiss: a, style: o, ...s }) => {
|
|
2023
2023
|
let c = q(), l = {
|
|
2024
2024
|
info: {
|
|
2025
2025
|
bg: c.accentBgColor,
|
|
@@ -2111,7 +2111,67 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2111
2111
|
})]
|
|
2112
2112
|
})]
|
|
2113
2113
|
});
|
|
2114
|
-
},
|
|
2114
|
+
}, kt = i(function(e, t) {
|
|
2115
|
+
return /* @__PURE__ */ M(k, {
|
|
2116
|
+
ref: t,
|
|
2117
|
+
...e
|
|
2118
|
+
});
|
|
2119
|
+
}), At = {
|
|
2120
|
+
info: "14",
|
|
2121
|
+
warning: "24",
|
|
2122
|
+
error: "14",
|
|
2123
|
+
success: "14"
|
|
2124
|
+
}, jt = ({ variant: e = "default", icon: t, cite: n, children: r, style: i, ...a }) => {
|
|
2125
|
+
let o = q(), s = o.borderSubtle, c = "transparent";
|
|
2126
|
+
if (e !== "default") {
|
|
2127
|
+
let t = {
|
|
2128
|
+
info: o.accentBgColor,
|
|
2129
|
+
warning: o.warningBgColor,
|
|
2130
|
+
error: o.errorBgColor,
|
|
2131
|
+
success: o.successBgColor
|
|
2132
|
+
}[e];
|
|
2133
|
+
s = t, c = `${t}${At[e]}`;
|
|
2134
|
+
}
|
|
2135
|
+
return /* @__PURE__ */ N(k, {
|
|
2136
|
+
style: [{
|
|
2137
|
+
paddingVertical: o.space2,
|
|
2138
|
+
paddingHorizontal: o.space3,
|
|
2139
|
+
borderLeftWidth: 3,
|
|
2140
|
+
borderLeftColor: s,
|
|
2141
|
+
borderTopRightRadius: o.radiusSm,
|
|
2142
|
+
borderBottomRightRadius: o.radiusSm,
|
|
2143
|
+
backgroundColor: c
|
|
2144
|
+
}, i],
|
|
2145
|
+
...a,
|
|
2146
|
+
children: [/* @__PURE__ */ N(k, {
|
|
2147
|
+
style: {
|
|
2148
|
+
flexDirection: "row",
|
|
2149
|
+
alignItems: "flex-start",
|
|
2150
|
+
gap: o.space2
|
|
2151
|
+
},
|
|
2152
|
+
children: [t && /* @__PURE__ */ M(k, {
|
|
2153
|
+
style: { marginTop: 2 },
|
|
2154
|
+
accessibilityElementsHidden: !0,
|
|
2155
|
+
importantForAccessibility: "no",
|
|
2156
|
+
children: t
|
|
2157
|
+
}), /* @__PURE__ */ M(Y, {
|
|
2158
|
+
variant: "body",
|
|
2159
|
+
style: {
|
|
2160
|
+
flex: 1,
|
|
2161
|
+
minWidth: 0
|
|
2162
|
+
},
|
|
2163
|
+
children: r
|
|
2164
|
+
})]
|
|
2165
|
+
}), n !== void 0 && /* @__PURE__ */ M(k, {
|
|
2166
|
+
style: { marginTop: o.space1 },
|
|
2167
|
+
children: /* @__PURE__ */ M(Y, {
|
|
2168
|
+
variant: "caption",
|
|
2169
|
+
color: "dim",
|
|
2170
|
+
children: n
|
|
2171
|
+
})
|
|
2172
|
+
})]
|
|
2173
|
+
});
|
|
2174
|
+
}, Mt = m.createAnimatedComponent(w), Nt = 150, Pt = ({ open: e, title: t, children: n, onClose: r, closeOnBackdrop: i = !0, style: a, testID: o }) => {
|
|
2115
2175
|
let s = q(), l = J(), [p, _] = f(e), [v, y] = f(0), b = d(new m.Value(g.get("window").height)).current, C = d(new m.Value(0)).current, T = d(!1);
|
|
2116
2176
|
c(() => {
|
|
2117
2177
|
e && _(!0);
|
|
@@ -2169,7 +2229,7 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2169
2229
|
b.setValue(Math.max(0, t.dy));
|
|
2170
2230
|
},
|
|
2171
2231
|
onPanResponderRelease: (e, t) => {
|
|
2172
|
-
T.current = !1, Math.max(0, t.dy) >=
|
|
2232
|
+
T.current = !1, Math.max(0, t.dy) >= Nt ? r?.() : m.timing(b, {
|
|
2173
2233
|
toValue: 0,
|
|
2174
2234
|
duration: s.durationNormal,
|
|
2175
2235
|
useNativeDriver: !0
|
|
@@ -2186,7 +2246,7 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2186
2246
|
animationType: "none",
|
|
2187
2247
|
statusBarTranslucent: !0,
|
|
2188
2248
|
onRequestClose: r,
|
|
2189
|
-
children: /* @__PURE__ */ M(
|
|
2249
|
+
children: /* @__PURE__ */ M(Mt, {
|
|
2190
2250
|
testID: o,
|
|
2191
2251
|
onPress: i ? r : void 0,
|
|
2192
2252
|
accessible: !1,
|
|
@@ -2267,28 +2327,102 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2267
2327
|
})
|
|
2268
2328
|
})
|
|
2269
2329
|
}) : null;
|
|
2270
|
-
},
|
|
2330
|
+
}, Ft = ({ items: e, value: t, onChange: n, bottomInset: r = 0, style: i, testID: a }) => {
|
|
2331
|
+
let o = q();
|
|
2332
|
+
return /* @__PURE__ */ M(k, {
|
|
2333
|
+
testID: a,
|
|
2334
|
+
accessible: !0,
|
|
2335
|
+
role: "tablist",
|
|
2336
|
+
style: [{
|
|
2337
|
+
flexDirection: "row",
|
|
2338
|
+
backgroundColor: o.headerbarBgColor,
|
|
2339
|
+
borderTopWidth: 1,
|
|
2340
|
+
borderTopColor: o.headerbarBorderColor,
|
|
2341
|
+
paddingTop: 8,
|
|
2342
|
+
paddingBottom: 4 + r
|
|
2343
|
+
}, i],
|
|
2344
|
+
children: e.map((e) => {
|
|
2345
|
+
let r = e.value === t, i = r ? e.activeIcon ?? e.icon : e.icon, s = r ? o.accentColor : o.windowFgColor, c = /* @__PURE__ */ M(X, {
|
|
2346
|
+
icon: i,
|
|
2347
|
+
size: "lg",
|
|
2348
|
+
tintColor: r ? o.accentColor : void 0,
|
|
2349
|
+
style: r ? void 0 : { opacity: o.opacityDim }
|
|
2350
|
+
});
|
|
2351
|
+
return /* @__PURE__ */ N(w, {
|
|
2352
|
+
testID: a ? `${a}-${e.value}` : void 0,
|
|
2353
|
+
disabled: e.disabled,
|
|
2354
|
+
role: "tab",
|
|
2355
|
+
accessibilityLabel: e.label,
|
|
2356
|
+
accessibilityState: {
|
|
2357
|
+
selected: r,
|
|
2358
|
+
disabled: !!e.disabled
|
|
2359
|
+
},
|
|
2360
|
+
onPress: () => n(e.value),
|
|
2361
|
+
style: ({ pressed: t }) => ({
|
|
2362
|
+
flex: 1,
|
|
2363
|
+
alignItems: "center",
|
|
2364
|
+
gap: 2,
|
|
2365
|
+
paddingVertical: 4,
|
|
2366
|
+
backgroundColor: t ? o.activeOverlay : "transparent",
|
|
2367
|
+
opacity: e.disabled ? o.opacityDisabled : 1
|
|
2368
|
+
}),
|
|
2369
|
+
children: [/* @__PURE__ */ N(k, {
|
|
2370
|
+
style: { position: "relative" },
|
|
2371
|
+
children: [c, e.badge !== void 0 && e.badge !== !1 && /* @__PURE__ */ M(k, {
|
|
2372
|
+
style: {
|
|
2373
|
+
position: "absolute",
|
|
2374
|
+
top: -4,
|
|
2375
|
+
end: -6
|
|
2376
|
+
},
|
|
2377
|
+
children: /* @__PURE__ */ M(Dt, {
|
|
2378
|
+
variant: "error",
|
|
2379
|
+
dot: e.badge === !0,
|
|
2380
|
+
style: e.badge === !0 ? {
|
|
2381
|
+
minWidth: 8,
|
|
2382
|
+
height: 8
|
|
2383
|
+
} : {
|
|
2384
|
+
minWidth: 14,
|
|
2385
|
+
height: 14,
|
|
2386
|
+
paddingHorizontal: 3
|
|
2387
|
+
},
|
|
2388
|
+
children: typeof e.badge == "number" ? e.badge > 99 ? "99+" : e.badge : void 0
|
|
2389
|
+
})
|
|
2390
|
+
})]
|
|
2391
|
+
}), /* @__PURE__ */ M(Y, {
|
|
2392
|
+
numberOfLines: 1,
|
|
2393
|
+
style: {
|
|
2394
|
+
fontSize: o.fontSizeCaption,
|
|
2395
|
+
fontWeight: String(r ? o.fontWeightSemibold : o.fontWeightNormal),
|
|
2396
|
+
color: s,
|
|
2397
|
+
opacity: r ? 1 : o.opacityDim
|
|
2398
|
+
},
|
|
2399
|
+
children: e.label
|
|
2400
|
+
})]
|
|
2401
|
+
}, e.value);
|
|
2402
|
+
})
|
|
2403
|
+
});
|
|
2404
|
+
}, It = {
|
|
2271
2405
|
start: "flex-start",
|
|
2272
2406
|
center: "center",
|
|
2273
2407
|
end: "flex-end",
|
|
2274
2408
|
stretch: "stretch",
|
|
2275
2409
|
baseline: "baseline"
|
|
2276
|
-
},
|
|
2410
|
+
}, Lt = {
|
|
2277
2411
|
start: "flex-start",
|
|
2278
2412
|
center: "center",
|
|
2279
2413
|
end: "flex-end",
|
|
2280
2414
|
"space-between": "space-between",
|
|
2281
2415
|
"space-around": "space-around",
|
|
2282
2416
|
"space-evenly": "space-evenly"
|
|
2283
|
-
},
|
|
2417
|
+
}, Rt = i(function({ orientation: e = "vertical", spacing: t = 6, align: n, justify: r = "start", padding: i, children: a, style: o, ...s }, c) {
|
|
2284
2418
|
return /* @__PURE__ */ M(k, {
|
|
2285
2419
|
ref: c,
|
|
2286
2420
|
style: [
|
|
2287
2421
|
{
|
|
2288
2422
|
flexDirection: e === "horizontal" ? "row" : "column",
|
|
2289
2423
|
gap: t,
|
|
2290
|
-
alignItems:
|
|
2291
|
-
justifyContent:
|
|
2424
|
+
alignItems: It[n ?? (e === "horizontal" ? "center" : "stretch")],
|
|
2425
|
+
justifyContent: Lt[r]
|
|
2292
2426
|
},
|
|
2293
2427
|
i !== void 0 && { padding: i },
|
|
2294
2428
|
o
|
|
@@ -2296,7 +2430,7 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2296
2430
|
...s,
|
|
2297
2431
|
children: a
|
|
2298
2432
|
});
|
|
2299
|
-
}),
|
|
2433
|
+
}), zt = i(function({ orientation: e = "horizontal", style: t, ...n }, r) {
|
|
2300
2434
|
return /* @__PURE__ */ M(k, {
|
|
2301
2435
|
ref: r,
|
|
2302
2436
|
accessible: !1,
|
|
@@ -2317,7 +2451,7 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2317
2451
|
],
|
|
2318
2452
|
...n
|
|
2319
2453
|
});
|
|
2320
|
-
}),
|
|
2454
|
+
}), Bt = i(function({ children: t, variant: n = "default", style: r, ...i }, a) {
|
|
2321
2455
|
let o = q(), s = e.toArray(t).filter(Boolean);
|
|
2322
2456
|
return n === "separate" ? /* @__PURE__ */ M(k, {
|
|
2323
2457
|
ref: a,
|
|
@@ -2347,12 +2481,12 @@ var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2347
2481
|
overflow: "hidden"
|
|
2348
2482
|
}, r],
|
|
2349
2483
|
...i,
|
|
2350
|
-
children: s.map((e, t) => /* @__PURE__ */ N(k, { children: [t > 0 && /* @__PURE__ */ M(
|
|
2484
|
+
children: s.map((e, t) => /* @__PURE__ */ N(k, { children: [t > 0 && /* @__PURE__ */ M(zt, { testID: "boxed-list-separator" }), e] }, t))
|
|
2351
2485
|
});
|
|
2352
2486
|
});
|
|
2353
2487
|
//#endregion
|
|
2354
2488
|
//#region src/components/Button/Button.tsx
|
|
2355
|
-
function
|
|
2489
|
+
function Vt(e, t) {
|
|
2356
2490
|
switch (t) {
|
|
2357
2491
|
case "sm": return {
|
|
2358
2492
|
minHeight: 28,
|
|
@@ -2377,14 +2511,14 @@ function At(e, t) {
|
|
|
2377
2511
|
};
|
|
2378
2512
|
}
|
|
2379
2513
|
}
|
|
2380
|
-
function
|
|
2514
|
+
function Ht(e) {
|
|
2381
2515
|
switch (e) {
|
|
2382
2516
|
case "sm": return 28;
|
|
2383
2517
|
case "lg": return 42;
|
|
2384
2518
|
default: return 34;
|
|
2385
2519
|
}
|
|
2386
2520
|
}
|
|
2387
|
-
function
|
|
2521
|
+
function Ut(e, t, n, r) {
|
|
2388
2522
|
if (r) return {
|
|
2389
2523
|
backgroundColor: n ? "rgba(0, 0, 0, 0.85)" : "rgba(0, 0, 0, 0.65)",
|
|
2390
2524
|
borderColor: "rgba(255, 255, 255, 0.12)",
|
|
@@ -2413,15 +2547,15 @@ function Mt(e, t, n, r) {
|
|
|
2413
2547
|
};
|
|
2414
2548
|
}
|
|
2415
2549
|
}
|
|
2416
|
-
var
|
|
2417
|
-
let f = q(), p =
|
|
2550
|
+
var Wt = i(function({ variant: e = "default", size: t = "md", shape: n = "default", osd: r = !1, leadingIcon: i, trailingIcon: a, children: o, style: s, textStyle: c, disabled: l, ...u }, d) {
|
|
2551
|
+
let f = q(), p = K();
|
|
2418
2552
|
return /* @__PURE__ */ M(w, {
|
|
2419
2553
|
ref: d,
|
|
2420
2554
|
disabled: l,
|
|
2421
2555
|
accessibilityRole: "button",
|
|
2422
2556
|
accessibilityState: { disabled: !!l },
|
|
2423
2557
|
style: ({ pressed: i }) => {
|
|
2424
|
-
let { backgroundColor: a, borderColor: o } =
|
|
2558
|
+
let { backgroundColor: a, borderColor: o } = Ut(f, e, i, r), c = !r && (e === "suggested" || e === "destructive"), u = n === "circular" ? Ht(t) : void 0, { minHeight: d, minWidth: m, paddingVertical: h, paddingHorizontal: g } = Vt(f, t);
|
|
2425
2559
|
return [{
|
|
2426
2560
|
flexDirection: "row",
|
|
2427
2561
|
alignItems: "center",
|
|
@@ -2442,7 +2576,7 @@ var Nt = i(function({ variant: e = "default", size: t = "md", shape: n = "defaul
|
|
|
2442
2576
|
},
|
|
2443
2577
|
...u,
|
|
2444
2578
|
children: ({ pressed: n }) => {
|
|
2445
|
-
let { fontSize: s } =
|
|
2579
|
+
let { fontSize: s } = Vt(f, t), { color: l } = Ut(f, e, n, r);
|
|
2446
2580
|
return /* @__PURE__ */ N(j, { children: [
|
|
2447
2581
|
i,
|
|
2448
2582
|
typeof o == "string" ? /* @__PURE__ */ M(D, {
|
|
@@ -2458,10 +2592,133 @@ var Nt = i(function({ variant: e = "default", size: t = "md", shape: n = "defaul
|
|
|
2458
2592
|
] });
|
|
2459
2593
|
}
|
|
2460
2594
|
});
|
|
2461
|
-
})
|
|
2595
|
+
}), Gt = {
|
|
2596
|
+
default: "default",
|
|
2597
|
+
suggested: "accent",
|
|
2598
|
+
destructive: "destructive"
|
|
2599
|
+
}, Kt = i(function({ title: e, variant: t = "default", leading: n, trailing: r, style: i, disabled: a, ...o }, s) {
|
|
2600
|
+
let c = q();
|
|
2601
|
+
return /* @__PURE__ */ M(w, {
|
|
2602
|
+
ref: s,
|
|
2603
|
+
disabled: a,
|
|
2604
|
+
accessibilityRole: "button",
|
|
2605
|
+
accessibilityState: { disabled: !!a },
|
|
2606
|
+
accessibilityLabel: e,
|
|
2607
|
+
style: [{
|
|
2608
|
+
flexDirection: "row",
|
|
2609
|
+
alignItems: "center",
|
|
2610
|
+
gap: c.space2,
|
|
2611
|
+
paddingVertical: c.space2,
|
|
2612
|
+
paddingHorizontal: c.space4,
|
|
2613
|
+
minHeight: 52,
|
|
2614
|
+
width: "100%",
|
|
2615
|
+
opacity: a ? c.opacityDisabled : 1
|
|
2616
|
+
}, i],
|
|
2617
|
+
...o,
|
|
2618
|
+
children: ({ pressed: i }) => /* @__PURE__ */ N(j, { children: [
|
|
2619
|
+
n && /* @__PURE__ */ M(k, {
|
|
2620
|
+
style: { flexShrink: 0 },
|
|
2621
|
+
children: n
|
|
2622
|
+
}),
|
|
2623
|
+
/* @__PURE__ */ M(Y, {
|
|
2624
|
+
variant: "body",
|
|
2625
|
+
color: Gt[t],
|
|
2626
|
+
style: {
|
|
2627
|
+
flex: 1,
|
|
2628
|
+
textAlign: "center",
|
|
2629
|
+
fontWeight: String(c.fontWeightSemibold)
|
|
2630
|
+
},
|
|
2631
|
+
children: e
|
|
2632
|
+
}),
|
|
2633
|
+
r && /* @__PURE__ */ M(k, {
|
|
2634
|
+
style: { flexShrink: 0 },
|
|
2635
|
+
children: r
|
|
2636
|
+
}),
|
|
2637
|
+
i && !a ? /* @__PURE__ */ M(k, {
|
|
2638
|
+
pointerEvents: "none",
|
|
2639
|
+
style: [E.absoluteFill, { backgroundColor: c.activeOverlay }]
|
|
2640
|
+
}) : null
|
|
2641
|
+
] })
|
|
2642
|
+
});
|
|
2643
|
+
}), qt = {
|
|
2644
|
+
info: B,
|
|
2645
|
+
warning: V,
|
|
2646
|
+
tip: B
|
|
2647
|
+
}, Jt = {
|
|
2648
|
+
info: "blue",
|
|
2649
|
+
warning: "yellow",
|
|
2650
|
+
tip: "green"
|
|
2651
|
+
}, Yt = {
|
|
2652
|
+
info: "1a",
|
|
2653
|
+
warning: "26",
|
|
2654
|
+
tip: "1a"
|
|
2655
|
+
}, Xt = ({ variant: e = "info", children: t, dismissible: n = !1, onDismiss: r, style: i, ...a }) => {
|
|
2656
|
+
let o = q(), s = {
|
|
2657
|
+
info: o.accentBgColor,
|
|
2658
|
+
warning: o.warningBgColor,
|
|
2659
|
+
tip: o.successBgColor
|
|
2660
|
+
}[e];
|
|
2661
|
+
return /* @__PURE__ */ N(k, {
|
|
2662
|
+
role: "note",
|
|
2663
|
+
accessible: !0,
|
|
2664
|
+
style: [{
|
|
2665
|
+
flexDirection: "row",
|
|
2666
|
+
alignItems: "flex-start",
|
|
2667
|
+
gap: o.space2,
|
|
2668
|
+
padding: o.space2,
|
|
2669
|
+
paddingHorizontal: o.space3,
|
|
2670
|
+
borderRadius: o.radiusMd,
|
|
2671
|
+
borderStartWidth: 3,
|
|
2672
|
+
borderStartColor: s,
|
|
2673
|
+
backgroundColor: `${s}${Yt[e]}`
|
|
2674
|
+
}, i],
|
|
2675
|
+
...a,
|
|
2676
|
+
children: [
|
|
2677
|
+
/* @__PURE__ */ M(k, {
|
|
2678
|
+
style: { marginTop: 2 },
|
|
2679
|
+
accessibilityElementsHidden: !0,
|
|
2680
|
+
importantForAccessibility: "no",
|
|
2681
|
+
children: /* @__PURE__ */ M(X, {
|
|
2682
|
+
icon: qt[e],
|
|
2683
|
+
size: "md",
|
|
2684
|
+
color: Jt[e]
|
|
2685
|
+
})
|
|
2686
|
+
}),
|
|
2687
|
+
/* @__PURE__ */ M(Y, {
|
|
2688
|
+
variant: "body",
|
|
2689
|
+
style: {
|
|
2690
|
+
flex: 1,
|
|
2691
|
+
minWidth: 0
|
|
2692
|
+
},
|
|
2693
|
+
children: t
|
|
2694
|
+
}),
|
|
2695
|
+
n && /* @__PURE__ */ M(w, {
|
|
2696
|
+
accessibilityRole: "button",
|
|
2697
|
+
accessibilityLabel: "Dismiss",
|
|
2698
|
+
hitSlop: 4,
|
|
2699
|
+
onPress: r,
|
|
2700
|
+
style: ({ pressed: e }) => [{
|
|
2701
|
+
flexShrink: 0,
|
|
2702
|
+
marginTop: -2,
|
|
2703
|
+
padding: 4,
|
|
2704
|
+
borderRadius: o.radiusMd,
|
|
2705
|
+
opacity: e ? 1 : .6,
|
|
2706
|
+
backgroundColor: e ? o.activeOverlay : "transparent"
|
|
2707
|
+
}],
|
|
2708
|
+
children: /* @__PURE__ */ M(k, {
|
|
2709
|
+
pointerEvents: "none",
|
|
2710
|
+
children: /* @__PURE__ */ M(X, {
|
|
2711
|
+
icon: R,
|
|
2712
|
+
size: "sm"
|
|
2713
|
+
})
|
|
2714
|
+
})
|
|
2715
|
+
})
|
|
2716
|
+
]
|
|
2717
|
+
});
|
|
2718
|
+
};
|
|
2462
2719
|
//#endregion
|
|
2463
2720
|
//#region src/components/Card/Card.tsx
|
|
2464
|
-
function
|
|
2721
|
+
function Zt(e, t) {
|
|
2465
2722
|
switch (t) {
|
|
2466
2723
|
case "none": return 0;
|
|
2467
2724
|
case "sm": return e.space2;
|
|
@@ -2469,14 +2726,14 @@ function Pt(e, t) {
|
|
|
2469
2726
|
default: return e.space4;
|
|
2470
2727
|
}
|
|
2471
2728
|
}
|
|
2472
|
-
var
|
|
2729
|
+
var Qt = i(function({ interactive: e = !1, padding: t = "md", style: n, children: r, disabled: i, ...a }, o) {
|
|
2473
2730
|
let s = q(), c = {
|
|
2474
2731
|
backgroundColor: s.cardBgColor,
|
|
2475
2732
|
borderWidth: 1,
|
|
2476
2733
|
borderColor: s.cardShadeColor,
|
|
2477
2734
|
borderRadius: s.radiusLg,
|
|
2478
2735
|
overflow: "hidden",
|
|
2479
|
-
padding:
|
|
2736
|
+
padding: Zt(s, t)
|
|
2480
2737
|
};
|
|
2481
2738
|
return e ? /* @__PURE__ */ M(w, {
|
|
2482
2739
|
ref: o,
|
|
@@ -2505,8 +2762,8 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2505
2762
|
...a,
|
|
2506
2763
|
children: r
|
|
2507
2764
|
});
|
|
2508
|
-
}),
|
|
2509
|
-
let s = q(), l =
|
|
2765
|
+
}), $t = 18, en = i(function({ value: e, indeterminate: t = !1, onValueChange: n, disabled: r, style: i, ...a }, o) {
|
|
2766
|
+
let s = q(), l = G(), u = K(), f = e || t, p = d(new m.Value(+!!f)).current, h = d(!0);
|
|
2510
2767
|
c(() => {
|
|
2511
2768
|
if (h.current) {
|
|
2512
2769
|
h.current = !1;
|
|
@@ -2545,8 +2802,8 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2545
2802
|
...a,
|
|
2546
2803
|
children: /* @__PURE__ */ M(m.View, {
|
|
2547
2804
|
style: {
|
|
2548
|
-
width:
|
|
2549
|
-
height:
|
|
2805
|
+
width: $t,
|
|
2806
|
+
height: $t,
|
|
2550
2807
|
alignItems: "center",
|
|
2551
2808
|
justifyContent: "center",
|
|
2552
2809
|
borderRadius: s.radiusSm,
|
|
@@ -2572,7 +2829,114 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2572
2829
|
})
|
|
2573
2830
|
})
|
|
2574
2831
|
});
|
|
2575
|
-
}),
|
|
2832
|
+
}), tn = 20, nn = i(function({ title: e, subtitle: t, leading: n, checked: r, defaultChecked: i = !1, onCheckedChange: a, disabled: o, style: s, ...l }, u) {
|
|
2833
|
+
let p = q(), h = G(), g = K(), v = r !== void 0, [y, b] = f(i), x = v ? r : y, S = d(new m.Value(+!!x)).current, C = d(!0);
|
|
2834
|
+
c(() => {
|
|
2835
|
+
if (C.current) {
|
|
2836
|
+
C.current = !1;
|
|
2837
|
+
return;
|
|
2838
|
+
}
|
|
2839
|
+
let [e, t, n, r] = p.easingDefault;
|
|
2840
|
+
m.timing(S, {
|
|
2841
|
+
toValue: +!!x,
|
|
2842
|
+
duration: p.durationFast,
|
|
2843
|
+
easing: _.bezier(e, t, n, r),
|
|
2844
|
+
useNativeDriver: !1
|
|
2845
|
+
}).start();
|
|
2846
|
+
}, [
|
|
2847
|
+
x,
|
|
2848
|
+
S,
|
|
2849
|
+
p.durationFast,
|
|
2850
|
+
p.easingDefault
|
|
2851
|
+
]);
|
|
2852
|
+
let T = g === "more" ? p.windowFgColor : h === "dark" ? p.dark1 : p.light4, D = S.interpolate({
|
|
2853
|
+
inputRange: [0, 1],
|
|
2854
|
+
outputRange: [T, p.accentBgColor]
|
|
2855
|
+
}), O = S.interpolate({
|
|
2856
|
+
inputRange: [0, 1],
|
|
2857
|
+
outputRange: ["transparent", p.accentBgColor]
|
|
2858
|
+
});
|
|
2859
|
+
return /* @__PURE__ */ M(w, {
|
|
2860
|
+
ref: u,
|
|
2861
|
+
disabled: o,
|
|
2862
|
+
accessibilityRole: "checkbox",
|
|
2863
|
+
accessibilityState: {
|
|
2864
|
+
checked: x,
|
|
2865
|
+
disabled: !!o
|
|
2866
|
+
},
|
|
2867
|
+
accessibilityLabel: t ? `${e}, ${t}` : e,
|
|
2868
|
+
onPress: () => {
|
|
2869
|
+
let e = !x;
|
|
2870
|
+
v || b(e), a?.(e);
|
|
2871
|
+
},
|
|
2872
|
+
style: [{
|
|
2873
|
+
flexDirection: "row",
|
|
2874
|
+
alignItems: "center",
|
|
2875
|
+
gap: p.space2,
|
|
2876
|
+
paddingVertical: p.space2,
|
|
2877
|
+
paddingHorizontal: p.space4,
|
|
2878
|
+
minHeight: 52,
|
|
2879
|
+
width: "100%",
|
|
2880
|
+
opacity: o ? p.opacityDisabled : 1
|
|
2881
|
+
}, s],
|
|
2882
|
+
...l,
|
|
2883
|
+
children: ({ pressed: r }) => /* @__PURE__ */ N(j, { children: [
|
|
2884
|
+
/* @__PURE__ */ M(m.View, {
|
|
2885
|
+
style: {
|
|
2886
|
+
width: tn,
|
|
2887
|
+
height: tn,
|
|
2888
|
+
flexShrink: 0,
|
|
2889
|
+
alignItems: "center",
|
|
2890
|
+
justifyContent: "center",
|
|
2891
|
+
borderRadius: p.radiusSm,
|
|
2892
|
+
borderWidth: g === "more" ? 2 : 1.5,
|
|
2893
|
+
borderColor: D,
|
|
2894
|
+
backgroundColor: O
|
|
2895
|
+
},
|
|
2896
|
+
children: /* @__PURE__ */ M(m.Text, {
|
|
2897
|
+
style: {
|
|
2898
|
+
opacity: S,
|
|
2899
|
+
color: "#fff",
|
|
2900
|
+
fontSize: 13,
|
|
2901
|
+
fontWeight: "bold",
|
|
2902
|
+
lineHeight: 13
|
|
2903
|
+
},
|
|
2904
|
+
children: "✓"
|
|
2905
|
+
})
|
|
2906
|
+
}),
|
|
2907
|
+
n && /* @__PURE__ */ M(k, {
|
|
2908
|
+
style: { flexShrink: 0 },
|
|
2909
|
+
children: n
|
|
2910
|
+
}),
|
|
2911
|
+
/* @__PURE__ */ N(k, {
|
|
2912
|
+
style: {
|
|
2913
|
+
flex: 1,
|
|
2914
|
+
gap: 2
|
|
2915
|
+
},
|
|
2916
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
2917
|
+
variant: "body",
|
|
2918
|
+
numberOfLines: 1,
|
|
2919
|
+
ellipsizeMode: "tail",
|
|
2920
|
+
style: {
|
|
2921
|
+
color: p.cardFgColor,
|
|
2922
|
+
fontWeight: String(p.fontWeightNormal)
|
|
2923
|
+
},
|
|
2924
|
+
children: e
|
|
2925
|
+
}), t && /* @__PURE__ */ M(Y, {
|
|
2926
|
+
variant: "caption",
|
|
2927
|
+
color: "dim",
|
|
2928
|
+
numberOfLines: 1,
|
|
2929
|
+
ellipsizeMode: "tail",
|
|
2930
|
+
children: t
|
|
2931
|
+
})]
|
|
2932
|
+
}),
|
|
2933
|
+
r && !o ? /* @__PURE__ */ M(k, {
|
|
2934
|
+
pointerEvents: "none",
|
|
2935
|
+
style: [E.absoluteFill, { backgroundColor: p.activeOverlay }]
|
|
2936
|
+
}) : null
|
|
2937
|
+
] })
|
|
2938
|
+
});
|
|
2939
|
+
}), rn = ({ label: e, icon: t, onRemove: n, selectable: r = !1, selected: i = !1, onToggle: a, disabled: o = !1, style: s, testID: c }) => {
|
|
2576
2940
|
let l = q(), u = r && !n, d = {
|
|
2577
2941
|
flexDirection: "row",
|
|
2578
2942
|
alignItems: "center",
|
|
@@ -2611,7 +2975,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2611
2975
|
opacity: o ? l.opacityDisabled : 1
|
|
2612
2976
|
},
|
|
2613
2977
|
children: /* @__PURE__ */ M(X, {
|
|
2614
|
-
icon:
|
|
2978
|
+
icon: R,
|
|
2615
2979
|
size: "sm"
|
|
2616
2980
|
})
|
|
2617
2981
|
})
|
|
@@ -2644,23 +3008,23 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2644
3008
|
],
|
|
2645
3009
|
children: p
|
|
2646
3010
|
});
|
|
2647
|
-
},
|
|
3011
|
+
}, an = (e) => Math.min(Math.max(e, 0), 1), on = i(function({ maximumSize: e = 600, tighteningThreshold: t = 1, children: n, style: r, ...i }, a) {
|
|
2648
3012
|
return /* @__PURE__ */ M(k, {
|
|
2649
3013
|
ref: a,
|
|
2650
3014
|
style: [{
|
|
2651
|
-
width: `${
|
|
3015
|
+
width: `${an(t) * 100}%`,
|
|
2652
3016
|
maxWidth: e,
|
|
2653
3017
|
alignSelf: "center"
|
|
2654
3018
|
}, r],
|
|
2655
3019
|
...i,
|
|
2656
3020
|
children: n
|
|
2657
3021
|
});
|
|
2658
|
-
}),
|
|
3022
|
+
}), sn = 12, Z = 12, cn = 7, ln = (e, t) => ({
|
|
2659
3023
|
top: e.top - t,
|
|
2660
3024
|
left: e.left - t,
|
|
2661
3025
|
width: e.width + t * 2,
|
|
2662
3026
|
height: e.height + t * 2
|
|
2663
|
-
}),
|
|
3027
|
+
}), un = (e, t, n, r) => {
|
|
2664
3028
|
let i = e.left + e.width, a = e.top + e.height, o = e.left + e.width / 2, s = e.top + e.height / 2, c = [...new Set([
|
|
2665
3029
|
r,
|
|
2666
3030
|
{
|
|
@@ -2676,20 +3040,20 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2676
3040
|
])], l = (n) => {
|
|
2677
3041
|
switch (n) {
|
|
2678
3042
|
case "bottom": return {
|
|
2679
|
-
top: a +
|
|
3043
|
+
top: a + sn,
|
|
2680
3044
|
left: o - t.width / 2
|
|
2681
3045
|
};
|
|
2682
3046
|
case "top": return {
|
|
2683
|
-
top: e.top - t.height -
|
|
3047
|
+
top: e.top - t.height - sn,
|
|
2684
3048
|
left: o - t.width / 2
|
|
2685
3049
|
};
|
|
2686
3050
|
case "left": return {
|
|
2687
3051
|
top: s - t.height / 2,
|
|
2688
|
-
left: e.left - t.width -
|
|
3052
|
+
left: e.left - t.width - sn
|
|
2689
3053
|
};
|
|
2690
3054
|
default: return {
|
|
2691
3055
|
top: s - t.height / 2,
|
|
2692
|
-
left: i +
|
|
3056
|
+
left: i + sn
|
|
2693
3057
|
};
|
|
2694
3058
|
}
|
|
2695
3059
|
};
|
|
@@ -2711,7 +3075,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2711
3075
|
top: r,
|
|
2712
3076
|
left: a,
|
|
2713
3077
|
placement: e,
|
|
2714
|
-
arrowOffset: Math.max(11, Math.min(s, t.width -
|
|
3078
|
+
arrowOffset: Math.max(11, Math.min(s, t.width - cn - 4))
|
|
2715
3079
|
};
|
|
2716
3080
|
}
|
|
2717
3081
|
if (!(i >= Z && i + t.width <= n.width - Z)) continue;
|
|
@@ -2720,17 +3084,17 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2720
3084
|
top: a,
|
|
2721
3085
|
left: i,
|
|
2722
3086
|
placement: e,
|
|
2723
|
-
arrowOffset: Math.max(11, Math.min(c, t.height -
|
|
3087
|
+
arrowOffset: Math.max(11, Math.min(c, t.height - cn - 4))
|
|
2724
3088
|
};
|
|
2725
3089
|
}
|
|
2726
|
-
let u = a +
|
|
3090
|
+
let u = a + sn, d = o - t.width / 2, f = Math.max(Z, Math.min(u, n.height - t.height - Z)), p = Math.max(Z, Math.min(d, n.width - t.width - Z)), m = o - p;
|
|
2727
3091
|
return {
|
|
2728
3092
|
top: f,
|
|
2729
3093
|
left: p,
|
|
2730
3094
|
placement: "bottom",
|
|
2731
|
-
arrowOffset: Math.max(11, Math.min(m, t.width -
|
|
3095
|
+
arrowOffset: Math.max(11, Math.min(m, t.width - cn - 4))
|
|
2732
3096
|
};
|
|
2733
|
-
},
|
|
3097
|
+
}, dn = 7, fn = "rgba(0, 0, 0, 0.55)", pn = ({ open: e, targetRef: t, title: n, description: r, placement: i = "bottom", spotlight: a = !0, spotlightPadding: o = 8, dismissOnBackdrop: s = !1, step: l, stepCount: u, primaryAction: p, secondaryAction: _, onDismiss: v, style: y, testID: b }) => {
|
|
2734
3098
|
let S = q(), C = J(), [T, D] = f(null), [O, A] = f(null), [P, F] = f(null), I = d(new m.Value(0)).current;
|
|
2735
3099
|
c(() => {
|
|
2736
3100
|
if (!e) {
|
|
@@ -2755,7 +3119,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2755
3119
|
]), c(() => {
|
|
2756
3120
|
if (!T || !O) return;
|
|
2757
3121
|
let { width: e, height: t } = g.get("window");
|
|
2758
|
-
F(
|
|
3122
|
+
F(un(T, O, {
|
|
2759
3123
|
width: e,
|
|
2760
3124
|
height: t
|
|
2761
3125
|
}, i));
|
|
@@ -2793,11 +3157,11 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2793
3157
|
});
|
|
2794
3158
|
};
|
|
2795
3159
|
if (!e) return null;
|
|
2796
|
-
let R = T ?
|
|
3160
|
+
let R = T ? ln(T, o) : null, { width: z } = g.get("window"), B = {
|
|
2797
3161
|
position: "absolute",
|
|
2798
3162
|
width: 0,
|
|
2799
3163
|
height: 0,
|
|
2800
|
-
borderWidth:
|
|
3164
|
+
borderWidth: dn,
|
|
2801
3165
|
borderColor: "transparent"
|
|
2802
3166
|
}, V = (() => {
|
|
2803
3167
|
if (!P) return null;
|
|
@@ -2805,25 +3169,25 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2805
3169
|
case "top": return {
|
|
2806
3170
|
...B,
|
|
2807
3171
|
bottom: -14,
|
|
2808
|
-
left: P.arrowOffset -
|
|
3172
|
+
left: P.arrowOffset - dn,
|
|
2809
3173
|
borderTopColor: S.cardBgColor
|
|
2810
3174
|
};
|
|
2811
3175
|
case "bottom": return {
|
|
2812
3176
|
...B,
|
|
2813
3177
|
top: -14,
|
|
2814
|
-
left: P.arrowOffset -
|
|
3178
|
+
left: P.arrowOffset - dn,
|
|
2815
3179
|
borderBottomColor: S.cardBgColor
|
|
2816
3180
|
};
|
|
2817
3181
|
case "left": return {
|
|
2818
3182
|
...B,
|
|
2819
3183
|
right: -14,
|
|
2820
|
-
top: P.arrowOffset -
|
|
3184
|
+
top: P.arrowOffset - dn,
|
|
2821
3185
|
borderLeftColor: S.cardBgColor
|
|
2822
3186
|
};
|
|
2823
3187
|
default: return {
|
|
2824
3188
|
...B,
|
|
2825
3189
|
left: -14,
|
|
2826
|
-
top: P.arrowOffset -
|
|
3190
|
+
top: P.arrowOffset - dn,
|
|
2827
3191
|
borderRightColor: S.cardBgColor
|
|
2828
3192
|
};
|
|
2829
3193
|
}
|
|
@@ -2852,7 +3216,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2852
3216
|
left: 0,
|
|
2853
3217
|
right: 0,
|
|
2854
3218
|
height: Math.max(0, R.top),
|
|
2855
|
-
backgroundColor:
|
|
3219
|
+
backgroundColor: fn
|
|
2856
3220
|
} }),
|
|
2857
3221
|
/* @__PURE__ */ M(k, { style: {
|
|
2858
3222
|
position: "absolute",
|
|
@@ -2860,7 +3224,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2860
3224
|
left: 0,
|
|
2861
3225
|
right: 0,
|
|
2862
3226
|
bottom: 0,
|
|
2863
|
-
backgroundColor:
|
|
3227
|
+
backgroundColor: fn
|
|
2864
3228
|
} }),
|
|
2865
3229
|
/* @__PURE__ */ M(k, { style: {
|
|
2866
3230
|
position: "absolute",
|
|
@@ -2868,7 +3232,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2868
3232
|
left: 0,
|
|
2869
3233
|
width: Math.max(0, R.left),
|
|
2870
3234
|
height: R.height,
|
|
2871
|
-
backgroundColor:
|
|
3235
|
+
backgroundColor: fn
|
|
2872
3236
|
} }),
|
|
2873
3237
|
/* @__PURE__ */ M(k, { style: {
|
|
2874
3238
|
position: "absolute",
|
|
@@ -2876,7 +3240,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2876
3240
|
left: Math.max(0, R.left + R.width),
|
|
2877
3241
|
right: 0,
|
|
2878
3242
|
height: R.height,
|
|
2879
|
-
backgroundColor:
|
|
3243
|
+
backgroundColor: fn
|
|
2880
3244
|
} }),
|
|
2881
3245
|
/* @__PURE__ */ M(k, {
|
|
2882
3246
|
pointerEvents: "none",
|
|
@@ -2960,12 +3324,12 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2960
3324
|
gap: S.space2,
|
|
2961
3325
|
marginTop: S.space3
|
|
2962
3326
|
},
|
|
2963
|
-
children: [_ && /* @__PURE__ */ M(
|
|
3327
|
+
children: [_ && /* @__PURE__ */ M(Wt, {
|
|
2964
3328
|
variant: "flat",
|
|
2965
3329
|
size: "sm",
|
|
2966
3330
|
onPress: _.onPress,
|
|
2967
3331
|
children: _.label
|
|
2968
|
-
}), p && /* @__PURE__ */ M(
|
|
3332
|
+
}), p && /* @__PURE__ */ M(Wt, {
|
|
2969
3333
|
variant: "suggested",
|
|
2970
3334
|
size: "sm",
|
|
2971
3335
|
onPress: p.onPress,
|
|
@@ -2976,18 +3340,18 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2976
3340
|
})]
|
|
2977
3341
|
})
|
|
2978
3342
|
});
|
|
2979
|
-
},
|
|
3343
|
+
}, mn = {
|
|
2980
3344
|
next: "Next",
|
|
2981
3345
|
back: "Back",
|
|
2982
3346
|
skip: "Skip",
|
|
2983
3347
|
finish: "Done"
|
|
2984
|
-
},
|
|
3348
|
+
}, hn = ({ steps: e, open: t, startIndex: n = 0, onFinish: r, onSkip: i, onStepChange: a, placement: o = "bottom", spotlight: s = !0, dismissOnBackdrop: l = !1, labels: u, testID: d }) => {
|
|
2985
3349
|
let [p, m] = f(n);
|
|
2986
3350
|
if (c(() => {
|
|
2987
3351
|
t && m(n);
|
|
2988
3352
|
}, [t, n]), !t || e.length === 0) return null;
|
|
2989
3353
|
let h = Math.min(p, e.length - 1), g = e[h], _ = h === 0, v = h === e.length - 1, y = {
|
|
2990
|
-
...
|
|
3354
|
+
...mn,
|
|
2991
3355
|
...u
|
|
2992
3356
|
}, b = (e) => {
|
|
2993
3357
|
m(e), a?.(e);
|
|
@@ -3001,7 +3365,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
3001
3365
|
label: y.back,
|
|
3002
3366
|
onPress: () => b(h - 1)
|
|
3003
3367
|
};
|
|
3004
|
-
return /* @__PURE__ */ M(
|
|
3368
|
+
return /* @__PURE__ */ M(pn, {
|
|
3005
3369
|
open: t,
|
|
3006
3370
|
targetRef: g.targetRef,
|
|
3007
3371
|
title: g.title,
|
|
@@ -3016,70 +3380,461 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
3016
3380
|
onDismiss: () => i?.(),
|
|
3017
3381
|
testID: d
|
|
3018
3382
|
});
|
|
3019
|
-
},
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3383
|
+
}, gn = {
|
|
3384
|
+
start: "flex-start",
|
|
3385
|
+
center: "center",
|
|
3386
|
+
end: "flex-end",
|
|
3387
|
+
stretch: "stretch"
|
|
3388
|
+
}, _n = {
|
|
3389
|
+
start: "flex-start",
|
|
3390
|
+
center: "center",
|
|
3391
|
+
end: "flex-end",
|
|
3392
|
+
"space-between": "space-between",
|
|
3393
|
+
"space-around": "space-around",
|
|
3394
|
+
"space-evenly": "space-evenly"
|
|
3395
|
+
}, vn = i(function({ childSpacing: e = 6, lineSpacing: t, justify: n = "start", align: r = "center", wrapReverse: i = !1, children: a, style: o, ...s }, c) {
|
|
3396
|
+
return /* @__PURE__ */ M(k, {
|
|
3397
|
+
ref: c,
|
|
3398
|
+
style: [{
|
|
3399
|
+
flexDirection: "row",
|
|
3400
|
+
flexWrap: i ? "wrap-reverse" : "wrap",
|
|
3401
|
+
columnGap: e,
|
|
3402
|
+
rowGap: t ?? e,
|
|
3403
|
+
justifyContent: _n[n],
|
|
3404
|
+
alignItems: gn[r],
|
|
3405
|
+
alignContent: "stretch"
|
|
3406
|
+
}, o],
|
|
3407
|
+
...s,
|
|
3408
|
+
children: a
|
|
3409
|
+
});
|
|
3410
|
+
}), yn = {
|
|
3411
|
+
sm: 22,
|
|
3412
|
+
md: 30,
|
|
3413
|
+
lg: 38
|
|
3414
|
+
}, bn = i(function({ color: e, selected: t = !1, size: n = "md", onSelect: r, accessibilityLabel: i, disabled: a = !1, style: o, ...s }, c) {
|
|
3415
|
+
let l = q(), u = G() === "dark", d = yn[n], f = u ? "rgba(255, 255, 255, 0.12)" : "rgba(0, 0, 0, 0.15)", p = Math.round(d * .55);
|
|
3416
|
+
return /* @__PURE__ */ M(k, {
|
|
3417
|
+
style: [
|
|
3418
|
+
{
|
|
3419
|
+
padding: 2,
|
|
3420
|
+
borderRadius: l.radiusPill,
|
|
3421
|
+
backgroundColor: t ? e : "transparent",
|
|
3422
|
+
alignSelf: "flex-start",
|
|
3423
|
+
opacity: a ? l.opacityDisabled : 1
|
|
3424
|
+
},
|
|
3425
|
+
t ? { transform: [{ scale: 1.05 }] } : null,
|
|
3426
|
+
o
|
|
3427
|
+
],
|
|
3428
|
+
children: /* @__PURE__ */ M(w, {
|
|
3429
|
+
ref: c,
|
|
3430
|
+
disabled: a,
|
|
3431
|
+
onPress: () => r?.(e),
|
|
3432
|
+
accessibilityRole: "radio",
|
|
3433
|
+
accessibilityState: {
|
|
3434
|
+
checked: t,
|
|
3435
|
+
disabled: a
|
|
3436
|
+
},
|
|
3437
|
+
accessibilityLabel: i ?? e,
|
|
3438
|
+
style: {
|
|
3439
|
+
width: d,
|
|
3440
|
+
height: d,
|
|
3441
|
+
borderRadius: l.radiusPill,
|
|
3442
|
+
alignItems: "center",
|
|
3443
|
+
justifyContent: "center",
|
|
3444
|
+
backgroundColor: e,
|
|
3445
|
+
borderWidth: t ? 2 : 1,
|
|
3446
|
+
borderColor: t ? "rgba(255, 255, 255, 0.9)" : f
|
|
3447
|
+
},
|
|
3448
|
+
...s,
|
|
3449
|
+
children: t ? /* @__PURE__ */ N(_e, {
|
|
3450
|
+
width: p,
|
|
3451
|
+
height: p,
|
|
3452
|
+
viewBox: "0 0 16 16",
|
|
3453
|
+
children: [/* @__PURE__ */ M(U, {
|
|
3454
|
+
d: "M3 8l3.5 3.5L13 5",
|
|
3455
|
+
stroke: "rgba(0, 0, 0, 0.35)",
|
|
3456
|
+
strokeWidth: 2,
|
|
3457
|
+
strokeLinecap: "round",
|
|
3458
|
+
strokeLinejoin: "round",
|
|
3459
|
+
fill: "none",
|
|
3460
|
+
translateY: 1
|
|
3461
|
+
}), /* @__PURE__ */ M(U, {
|
|
3462
|
+
d: "M3 8l3.5 3.5L13 5",
|
|
3463
|
+
stroke: "white",
|
|
3464
|
+
strokeWidth: 2,
|
|
3465
|
+
strokeLinecap: "round",
|
|
3466
|
+
strokeLinejoin: "round",
|
|
3467
|
+
fill: "none"
|
|
3468
|
+
})]
|
|
3469
|
+
}) : null
|
|
3470
|
+
})
|
|
3471
|
+
});
|
|
3472
|
+
}), xn = [
|
|
3473
|
+
{
|
|
3474
|
+
value: "#3584e4",
|
|
3475
|
+
label: "Blue"
|
|
3476
|
+
},
|
|
3477
|
+
{
|
|
3478
|
+
value: "#2ec27e",
|
|
3479
|
+
label: "Green"
|
|
3480
|
+
},
|
|
3481
|
+
{
|
|
3482
|
+
value: "#f6d32d",
|
|
3483
|
+
label: "Yellow"
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
value: "#ff7800",
|
|
3487
|
+
label: "Orange"
|
|
3488
|
+
},
|
|
3489
|
+
{
|
|
3490
|
+
value: "#e01b24",
|
|
3491
|
+
label: "Red"
|
|
3492
|
+
},
|
|
3493
|
+
{
|
|
3494
|
+
value: "#9141ac",
|
|
3495
|
+
label: "Purple"
|
|
3496
|
+
},
|
|
3497
|
+
{
|
|
3498
|
+
value: "#986a44",
|
|
3499
|
+
label: "Brown"
|
|
3500
|
+
},
|
|
3501
|
+
{
|
|
3502
|
+
value: "#2190a4",
|
|
3503
|
+
label: "Teal"
|
|
3504
|
+
},
|
|
3505
|
+
{
|
|
3506
|
+
value: "#5e5c64",
|
|
3507
|
+
label: "Slate"
|
|
3508
|
+
}
|
|
3509
|
+
], Sn = ({ value: e, onChange: t, colors: n = xn, allowCustom: r = !1, onRequestCustom: i, size: a = "md", accessibilityLabel: o = "Color", disabled: s = !1, style: c, testID: l }) => {
|
|
3510
|
+
let u = q(), d = G() === "dark", f = yn[a], p = e !== void 0 && !n.some((t) => t.value === e);
|
|
3511
|
+
return /* @__PURE__ */ N(vn, {
|
|
3512
|
+
testID: l,
|
|
3513
|
+
accessibilityRole: "radiogroup",
|
|
3514
|
+
accessibilityLabel: o,
|
|
3515
|
+
childSpacing: 8,
|
|
3516
|
+
align: "center",
|
|
3517
|
+
style: c,
|
|
3518
|
+
children: [n.map((n) => /* @__PURE__ */ M(bn, {
|
|
3519
|
+
color: n.value,
|
|
3520
|
+
size: a,
|
|
3521
|
+
selected: n.value === e,
|
|
3522
|
+
disabled: s,
|
|
3523
|
+
onSelect: t,
|
|
3524
|
+
accessibilityLabel: n.label ?? n.value
|
|
3525
|
+
}, n.value)), r ? /* @__PURE__ */ N(j, { children: [p && e ? /* @__PURE__ */ M(bn, {
|
|
3526
|
+
color: e,
|
|
3527
|
+
size: a,
|
|
3528
|
+
selected: !0,
|
|
3529
|
+
disabled: s,
|
|
3530
|
+
onSelect: i,
|
|
3531
|
+
accessibilityLabel: "Custom color"
|
|
3532
|
+
}) : null, /* @__PURE__ */ M(k, {
|
|
3533
|
+
style: {
|
|
3534
|
+
padding: 2,
|
|
3535
|
+
alignSelf: "flex-start"
|
|
3536
|
+
},
|
|
3537
|
+
children: /* @__PURE__ */ M(w, {
|
|
3538
|
+
disabled: s,
|
|
3539
|
+
onPress: i,
|
|
3540
|
+
accessibilityRole: "button",
|
|
3541
|
+
accessibilityLabel: "Choose custom color",
|
|
3542
|
+
accessibilityState: { disabled: s },
|
|
3543
|
+
style: ({ pressed: e }) => ({
|
|
3544
|
+
width: f,
|
|
3545
|
+
height: f,
|
|
3546
|
+
borderRadius: u.radiusPill,
|
|
3547
|
+
alignItems: "center",
|
|
3548
|
+
justifyContent: "center",
|
|
3549
|
+
borderWidth: 1.5,
|
|
3550
|
+
borderStyle: "dashed",
|
|
3551
|
+
borderColor: d ? "rgba(255, 255, 255, 0.25)" : u.cardShadeColor,
|
|
3552
|
+
backgroundColor: e && !s ? u.activeOverlay : u.cardBgColor,
|
|
3553
|
+
opacity: s ? u.opacityDisabled : 1
|
|
3554
|
+
}),
|
|
3555
|
+
children: /* @__PURE__ */ M(X, {
|
|
3556
|
+
icon: P,
|
|
3557
|
+
width: Math.round(f * .5),
|
|
3558
|
+
height: Math.round(f * .5)
|
|
3559
|
+
})
|
|
3560
|
+
})
|
|
3561
|
+
})] }) : null]
|
|
3562
|
+
});
|
|
3563
|
+
}, Cn = 4, wn = 8, Tn = 280;
|
|
3564
|
+
function En(e, t) {
|
|
3565
|
+
let { height: n } = g.get("window"), r = n - (e.y + e.height) < t && e.y > t, i = r ? e.y - t - Cn : e.y + e.height + Cn;
|
|
3566
|
+
return {
|
|
3567
|
+
top: Math.max(wn, Math.min(i, n - t - wn)),
|
|
3568
|
+
left: e.x,
|
|
3569
|
+
width: e.width,
|
|
3570
|
+
flipUp: r
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3573
|
+
var Dn = ({ options: e, value: t, onChange: n, placeholder: r = "Select an option", accessibilityLabel: i, disabled: a, style: o, testID: s }) => {
|
|
3574
|
+
let l = q(), u = J(), [p, h] = f(!1), [g, _] = f(null), [v, y] = f(null), [b, S] = f(null), C = d(null), E = d(new m.Value(0)).current, D = e.find((e) => e.value === t), O = () => {
|
|
3575
|
+
a || h(!0);
|
|
3576
|
+
}, A = () => h(!1), j = (e) => {
|
|
3577
|
+
e.disabled || (n?.(e.value), A());
|
|
3578
|
+
};
|
|
3579
|
+
return c(() => {
|
|
3580
|
+
if (!p) {
|
|
3581
|
+
_(null), y(null), S(null);
|
|
3582
|
+
return;
|
|
3583
|
+
}
|
|
3584
|
+
C.current?.measureInWindow((e, t, n, r) => {
|
|
3585
|
+
_({
|
|
3586
|
+
x: e,
|
|
3587
|
+
y: t,
|
|
3588
|
+
width: n,
|
|
3589
|
+
height: r
|
|
3590
|
+
});
|
|
3591
|
+
});
|
|
3592
|
+
}, [p]), c(() => {
|
|
3593
|
+
g === null || v === null || S(En(g, v));
|
|
3594
|
+
}, [g, v]), c(() => {
|
|
3595
|
+
if (b) {
|
|
3596
|
+
if (u) {
|
|
3597
|
+
E.setValue(1);
|
|
3598
|
+
return;
|
|
3599
|
+
}
|
|
3600
|
+
E.setValue(0), m.timing(E, {
|
|
3601
|
+
toValue: 1,
|
|
3602
|
+
duration: l.durationFast,
|
|
3603
|
+
useNativeDriver: !0
|
|
3604
|
+
}).start();
|
|
3605
|
+
}
|
|
3606
|
+
}, [
|
|
3607
|
+
b,
|
|
3608
|
+
u,
|
|
3609
|
+
E,
|
|
3610
|
+
l.durationFast
|
|
3611
|
+
]), /* @__PURE__ */ N(k, {
|
|
3612
|
+
style: o,
|
|
3613
|
+
children: [/* @__PURE__ */ N(w, {
|
|
3614
|
+
ref: C,
|
|
3615
|
+
testID: s,
|
|
3616
|
+
role: "combobox",
|
|
3617
|
+
accessibilityLabel: i,
|
|
3618
|
+
accessibilityState: {
|
|
3619
|
+
expanded: p,
|
|
3620
|
+
disabled: !!a
|
|
3621
|
+
},
|
|
3622
|
+
disabled: a,
|
|
3623
|
+
onPress: () => p ? A() : O(),
|
|
3624
|
+
style: ({ pressed: e }) => ({
|
|
3625
|
+
flexDirection: "row",
|
|
3626
|
+
alignItems: "center",
|
|
3627
|
+
justifyContent: "space-between",
|
|
3628
|
+
gap: l.space1,
|
|
3629
|
+
minHeight: 36,
|
|
3630
|
+
minWidth: 160,
|
|
3631
|
+
paddingVertical: 7,
|
|
3632
|
+
paddingHorizontal: l.space2,
|
|
3633
|
+
backgroundColor: e ? l.activeOverlay : l.cardBgColor,
|
|
3634
|
+
borderWidth: 1,
|
|
3635
|
+
borderColor: p ? l.accentColor : l.cardShadeColor,
|
|
3636
|
+
borderRadius: l.radiusMd,
|
|
3637
|
+
opacity: a ? l.opacityDisabled : 1
|
|
3638
|
+
}),
|
|
3639
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
3640
|
+
numberOfLines: 1,
|
|
3641
|
+
style: {
|
|
3642
|
+
flex: 1,
|
|
3643
|
+
fontSize: l.fontSizeBody,
|
|
3644
|
+
color: l.windowFgColor,
|
|
3645
|
+
opacity: D ? 1 : l.opacityDim
|
|
3646
|
+
},
|
|
3647
|
+
children: D?.label ?? r
|
|
3648
|
+
}), /* @__PURE__ */ M(X, {
|
|
3649
|
+
icon: ae,
|
|
3650
|
+
size: "md",
|
|
3651
|
+
color: "default",
|
|
3652
|
+
style: { transform: [{ rotate: p ? "180deg" : "0deg" }] }
|
|
3653
|
+
})]
|
|
3654
|
+
}), /* @__PURE__ */ M(x, {
|
|
3655
|
+
visible: p,
|
|
3656
|
+
transparent: !0,
|
|
3657
|
+
animationType: "none",
|
|
3658
|
+
statusBarTranslucent: !0,
|
|
3659
|
+
children: /* @__PURE__ */ M(w, {
|
|
3660
|
+
onPress: A,
|
|
3661
|
+
accessible: !1,
|
|
3662
|
+
style: { flex: 1 },
|
|
3663
|
+
testID: s ? `${s}-backdrop` : void 0,
|
|
3664
|
+
children: /* @__PURE__ */ M(m.View, {
|
|
3665
|
+
onLayout: (e) => {
|
|
3666
|
+
y(Math.min(e.nativeEvent.layout.height, Tn));
|
|
3667
|
+
},
|
|
3668
|
+
role: "list",
|
|
3669
|
+
accessible: !0,
|
|
3670
|
+
style: [{
|
|
3671
|
+
position: "absolute",
|
|
3672
|
+
maxHeight: Tn,
|
|
3673
|
+
backgroundColor: l.popoverBgColor,
|
|
3674
|
+
borderWidth: 1,
|
|
3675
|
+
borderColor: l.cardShadeColor,
|
|
3676
|
+
borderRadius: l.radiusMd,
|
|
3677
|
+
paddingVertical: 4,
|
|
3678
|
+
shadowColor: "#000",
|
|
3679
|
+
shadowOffset: {
|
|
3680
|
+
width: 0,
|
|
3681
|
+
height: 4
|
|
3682
|
+
},
|
|
3683
|
+
shadowOpacity: .15,
|
|
3684
|
+
shadowRadius: 12,
|
|
3685
|
+
elevation: 6
|
|
3686
|
+
}, b ? {
|
|
3687
|
+
top: b.top,
|
|
3688
|
+
left: b.left,
|
|
3689
|
+
width: b.width,
|
|
3690
|
+
opacity: E
|
|
3691
|
+
} : {
|
|
3692
|
+
top: -9999,
|
|
3693
|
+
left: -9999,
|
|
3694
|
+
width: 200,
|
|
3695
|
+
opacity: 0
|
|
3696
|
+
}],
|
|
3697
|
+
children: /* @__PURE__ */ M(T, {
|
|
3698
|
+
bounces: !1,
|
|
3699
|
+
children: e.map((e) => {
|
|
3700
|
+
let n = e.value === t;
|
|
3701
|
+
return /* @__PURE__ */ N(w, {
|
|
3702
|
+
role: "option",
|
|
3703
|
+
accessibilityState: {
|
|
3704
|
+
selected: n,
|
|
3705
|
+
disabled: !!e.disabled
|
|
3706
|
+
},
|
|
3707
|
+
disabled: e.disabled,
|
|
3708
|
+
onPress: () => j(e),
|
|
3709
|
+
style: ({ pressed: t }) => ({
|
|
3710
|
+
flexDirection: "row",
|
|
3711
|
+
alignItems: "center",
|
|
3712
|
+
gap: l.space2,
|
|
3713
|
+
minHeight: 40,
|
|
3714
|
+
paddingVertical: 8,
|
|
3715
|
+
paddingHorizontal: l.space2,
|
|
3716
|
+
backgroundColor: t ? l.activeOverlay : "transparent",
|
|
3717
|
+
opacity: e.disabled ? l.opacityDisabled : 1
|
|
3718
|
+
}),
|
|
3719
|
+
children: [/* @__PURE__ */ N(k, {
|
|
3720
|
+
style: {
|
|
3721
|
+
flex: 1,
|
|
3722
|
+
gap: 1
|
|
3723
|
+
},
|
|
3724
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
3725
|
+
numberOfLines: 1,
|
|
3726
|
+
style: {
|
|
3727
|
+
fontSize: l.fontSizeBody,
|
|
3728
|
+
color: l.windowFgColor,
|
|
3729
|
+
fontWeight: n ? String(l.fontWeightSemibold) : void 0
|
|
3730
|
+
},
|
|
3731
|
+
children: e.label
|
|
3732
|
+
}), e.description && /* @__PURE__ */ M(Y, {
|
|
3733
|
+
numberOfLines: 1,
|
|
3734
|
+
style: {
|
|
3735
|
+
fontSize: l.fontSizeCaption,
|
|
3736
|
+
color: l.windowFgColor,
|
|
3737
|
+
opacity: l.opacityDim
|
|
3738
|
+
},
|
|
3739
|
+
children: e.description
|
|
3740
|
+
})]
|
|
3741
|
+
}), n && /* @__PURE__ */ M(X, {
|
|
3742
|
+
icon: L,
|
|
3743
|
+
size: "md",
|
|
3744
|
+
color: "blue"
|
|
3745
|
+
})]
|
|
3746
|
+
}, e.value);
|
|
3747
|
+
})
|
|
3748
|
+
})
|
|
3749
|
+
})
|
|
3750
|
+
})
|
|
3751
|
+
})]
|
|
3752
|
+
});
|
|
3753
|
+
}, On = 120, kn = ({ title: e, subtitle: t, leading: n, options: r, value: i, defaultValue: a, onValueChange: o, placeholder: s = "—", accessibilityLabel: c, disabled: l = !1, style: u, testID: d }) => {
|
|
3754
|
+
let p = q(), m = i !== void 0, [h, g] = f(a), _ = m ? i : h;
|
|
3755
|
+
return /* @__PURE__ */ M(qe, {
|
|
3756
|
+
testID: d,
|
|
3757
|
+
title: e,
|
|
3758
|
+
subtitle: t,
|
|
3759
|
+
leading: n,
|
|
3760
|
+
disabled: l,
|
|
3761
|
+
style: [l ? { opacity: p.opacityDisabled } : null, u],
|
|
3762
|
+
trailing: /* @__PURE__ */ M(Dn, {
|
|
3763
|
+
options: r,
|
|
3764
|
+
value: _,
|
|
3765
|
+
placeholder: s,
|
|
3766
|
+
accessibilityLabel: c ?? e,
|
|
3767
|
+
disabled: l,
|
|
3768
|
+
onChange: (e) => {
|
|
3769
|
+
m || g(e), o?.(e);
|
|
3770
|
+
},
|
|
3771
|
+
style: { minWidth: On }
|
|
3772
|
+
})
|
|
3773
|
+
});
|
|
3774
|
+
}, An = m.createAnimatedComponent(w), jn = ({ open: e, title: t, children: n, buttons: r = [], onClose: i, closeOnBackdrop: a = !0, role: o = "dialog", responses: s, onResponse: l, style: u, testID: f }) => {
|
|
3775
|
+
let p = q(), g = G(), v = J(), y = d(new m.Value(+!!v)).current, b = !!s, S = () => {
|
|
3776
|
+
let e = s?.find((e) => e.variant !== "destructive" && !e.disabled);
|
|
3777
|
+
e && l?.(e.id);
|
|
3778
|
+
}, C = () => {
|
|
3779
|
+
b ? S() : i?.();
|
|
3780
|
+
}, T = b ? S : a ? i : void 0;
|
|
3781
|
+
c(() => {
|
|
3782
|
+
if (!e) return;
|
|
3783
|
+
if (v) {
|
|
3784
|
+
y.setValue(1);
|
|
3785
|
+
return;
|
|
3786
|
+
}
|
|
3787
|
+
y.setValue(0);
|
|
3788
|
+
let [t, n, r, i] = p.easingDefault;
|
|
3789
|
+
m.timing(y, {
|
|
3790
|
+
toValue: 1,
|
|
3791
|
+
duration: p.durationNormal,
|
|
3792
|
+
easing: _.bezier(t, n, r, i),
|
|
3793
|
+
useNativeDriver: !0
|
|
3794
|
+
}).start();
|
|
3795
|
+
}, [
|
|
3796
|
+
e,
|
|
3797
|
+
v,
|
|
3798
|
+
y,
|
|
3799
|
+
p.durationNormal,
|
|
3800
|
+
p.easingDefault
|
|
3801
|
+
]), c(() => {
|
|
3802
|
+
if (!e) return;
|
|
3803
|
+
let t = h.addEventListener("hardwareBackPress", () => (C(), !0));
|
|
3804
|
+
return () => t.remove();
|
|
3805
|
+
}, [
|
|
3806
|
+
e,
|
|
3807
|
+
b,
|
|
3808
|
+
s,
|
|
3809
|
+
l,
|
|
3810
|
+
i
|
|
3811
|
+
]);
|
|
3812
|
+
let E = () => {
|
|
3813
|
+
let e = b && s ? s : r;
|
|
3814
|
+
return e.length === 0 ? null : /* @__PURE__ */ M(k, {
|
|
3815
|
+
style: {
|
|
3816
|
+
borderTopWidth: 1,
|
|
3817
|
+
borderTopColor: p.cardShadeColor
|
|
3818
|
+
},
|
|
3819
|
+
children: e.map((t, n) => {
|
|
3820
|
+
let r = t.variant ?? "default", i = r === "destructive" ? p.destructiveColor : p.accentColor, a = b ? () => l?.(t.id) : t.onPress;
|
|
3821
|
+
return /* @__PURE__ */ M(w, {
|
|
3822
|
+
accessibilityRole: "button",
|
|
3823
|
+
accessibilityState: { disabled: t.disabled },
|
|
3824
|
+
disabled: t.disabled,
|
|
3825
|
+
onPress: a,
|
|
3826
|
+
style: ({ pressed: r }) => ({
|
|
3827
|
+
paddingVertical: 14,
|
|
3828
|
+
paddingHorizontal: p.space4,
|
|
3829
|
+
borderBottomWidth: +(n < e.length - 1),
|
|
3830
|
+
borderBottomColor: p.cardShadeColor,
|
|
3831
|
+
backgroundColor: r ? p.activeOverlay : "transparent",
|
|
3832
|
+
opacity: t.disabled ? p.opacityDisabled : 1
|
|
3833
|
+
}),
|
|
3834
|
+
children: /* @__PURE__ */ M(Y, {
|
|
3835
|
+
variant: "body",
|
|
3836
|
+
style: {
|
|
3837
|
+
textAlign: "center",
|
|
3083
3838
|
color: i,
|
|
3084
3839
|
fontWeight: r === "suggested" ? String(p.fontWeightSemibold) : void 0
|
|
3085
3840
|
},
|
|
@@ -3103,7 +3858,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
3103
3858
|
animationType: "none",
|
|
3104
3859
|
statusBarTranslucent: !0,
|
|
3105
3860
|
onRequestClose: C,
|
|
3106
|
-
children: /* @__PURE__ */ M(
|
|
3861
|
+
children: /* @__PURE__ */ M(An, {
|
|
3107
3862
|
testID: f,
|
|
3108
3863
|
onPress: T,
|
|
3109
3864
|
style: {
|
|
@@ -3175,7 +3930,7 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
3175
3930
|
})
|
|
3176
3931
|
})
|
|
3177
3932
|
});
|
|
3178
|
-
},
|
|
3933
|
+
}, Mn = ({ children: e, accessibilityLabel: t, style: n, testID: r }) => {
|
|
3179
3934
|
let i = q(), a = !!e;
|
|
3180
3935
|
return /* @__PURE__ */ N(k, {
|
|
3181
3936
|
testID: r,
|
|
@@ -3202,8 +3957,8 @@ var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
3202
3957
|
backgroundColor: i.cardShadeColor
|
|
3203
3958
|
} })] })]
|
|
3204
3959
|
});
|
|
3205
|
-
},
|
|
3206
|
-
function
|
|
3960
|
+
}, Nn = 6, Q = 8, Pn = 5;
|
|
3961
|
+
function Fn(e, t) {
|
|
3207
3962
|
if (e) {
|
|
3208
3963
|
if (typeof e == "function") {
|
|
3209
3964
|
e(t);
|
|
@@ -3212,27 +3967,27 @@ function tn(e, t) {
|
|
|
3212
3967
|
e.current = t;
|
|
3213
3968
|
}
|
|
3214
3969
|
}
|
|
3215
|
-
function
|
|
3970
|
+
function In(e, t, n) {
|
|
3216
3971
|
switch (n) {
|
|
3217
3972
|
case "top": return {
|
|
3218
|
-
top: e.y - t.height -
|
|
3973
|
+
top: e.y - t.height - Nn,
|
|
3219
3974
|
left: e.x + e.width / 2 - t.width / 2
|
|
3220
3975
|
};
|
|
3221
3976
|
case "bottom": return {
|
|
3222
|
-
top: e.y + e.height +
|
|
3977
|
+
top: e.y + e.height + Nn,
|
|
3223
3978
|
left: e.x + e.width / 2 - t.width / 2
|
|
3224
3979
|
};
|
|
3225
3980
|
case "left": return {
|
|
3226
3981
|
top: e.y + e.height / 2 - t.height / 2,
|
|
3227
|
-
left: e.x - t.width -
|
|
3982
|
+
left: e.x - t.width - Nn
|
|
3228
3983
|
};
|
|
3229
3984
|
case "right": return {
|
|
3230
3985
|
top: e.y + e.height / 2 - t.height / 2,
|
|
3231
|
-
left: e.x + e.width +
|
|
3986
|
+
left: e.x + e.width + Nn
|
|
3232
3987
|
};
|
|
3233
3988
|
}
|
|
3234
3989
|
}
|
|
3235
|
-
function
|
|
3990
|
+
function Ln(e, t, n) {
|
|
3236
3991
|
let { width: r, height: i } = g.get("window"), a = [
|
|
3237
3992
|
n,
|
|
3238
3993
|
n === "top" ? "bottom" : n === "bottom" ? "top" : n === "left" ? "right" : "left",
|
|
@@ -3242,22 +3997,22 @@ function rn(e, t, n) {
|
|
|
3242
3997
|
"right"
|
|
3243
3998
|
];
|
|
3244
3999
|
for (let n of a) {
|
|
3245
|
-
let { top: a, left: o } =
|
|
4000
|
+
let { top: a, left: o } = In(e, t, n), s = o >= Q && o + t.width <= r - Q, c = a >= Q && a + t.height <= i - Q;
|
|
3246
4001
|
if (s && c) return {
|
|
3247
4002
|
top: Math.max(Q, Math.min(a, i - t.height - Q)),
|
|
3248
4003
|
left: Math.max(Q, Math.min(o, r - t.width - Q)),
|
|
3249
4004
|
placement: n
|
|
3250
4005
|
};
|
|
3251
4006
|
}
|
|
3252
|
-
let { top: o, left: s } =
|
|
4007
|
+
let { top: o, left: s } = In(e, t, n);
|
|
3253
4008
|
return {
|
|
3254
4009
|
top: Math.max(Q, Math.min(o, i - t.height - Q)),
|
|
3255
4010
|
left: Math.max(Q, Math.min(s, r - t.width - Q)),
|
|
3256
4011
|
placement: n
|
|
3257
4012
|
};
|
|
3258
4013
|
}
|
|
3259
|
-
var
|
|
3260
|
-
let a = q(), s =
|
|
4014
|
+
var Rn = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
4015
|
+
let a = q(), s = G(), l = J(), [u, p] = f(!1), [h, g] = f(null), [_, v] = f(null), [y, b] = f(null), S = d(null), C = d(null), w = d(new m.Value(0)).current, T = o(() => {
|
|
3261
4016
|
C.current &&= (clearTimeout(C.current), null);
|
|
3262
4017
|
}, []), D = o(() => {
|
|
3263
4018
|
T(), p(!0);
|
|
@@ -3284,7 +4039,7 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3284
4039
|
});
|
|
3285
4040
|
});
|
|
3286
4041
|
}, [u]), c(() => {
|
|
3287
|
-
!h || !_ || b(
|
|
4042
|
+
!h || !_ || b(Ln(h, _, t));
|
|
3288
4043
|
}, [
|
|
3289
4044
|
h,
|
|
3290
4045
|
_,
|
|
@@ -3325,7 +4080,7 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3325
4080
|
position: "absolute",
|
|
3326
4081
|
width: 0,
|
|
3327
4082
|
height: 0,
|
|
3328
|
-
borderWidth:
|
|
4083
|
+
borderWidth: Pn,
|
|
3329
4084
|
borderColor: "transparent"
|
|
3330
4085
|
}, z = (() => {
|
|
3331
4086
|
switch (y?.placement) {
|
|
@@ -3362,7 +4117,7 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3362
4117
|
})(), B = i.props.ref;
|
|
3363
4118
|
return /* @__PURE__ */ N(j, { children: [n(i, {
|
|
3364
4119
|
ref: (e) => {
|
|
3365
|
-
S.current = e,
|
|
4120
|
+
S.current = e, Fn(B, e);
|
|
3366
4121
|
},
|
|
3367
4122
|
delayLongPress: r,
|
|
3368
4123
|
accessibilityHint: i.props.accessibilityHint ?? e,
|
|
@@ -3431,12 +4186,12 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3431
4186
|
})
|
|
3432
4187
|
})
|
|
3433
4188
|
})] });
|
|
3434
|
-
},
|
|
4189
|
+
}, zn = {
|
|
3435
4190
|
sm: "sm",
|
|
3436
4191
|
md: "md",
|
|
3437
4192
|
lg: "lg"
|
|
3438
|
-
},
|
|
3439
|
-
let u = /* @__PURE__ */ M(
|
|
4193
|
+
}, Bn = i(function({ icon: e, label: t, variant: n = "default", size: r = "md", iconSize: i, tooltip: a, tooltipPlacement: o, tooltipDelay: s, ...c }, l) {
|
|
4194
|
+
let u = /* @__PURE__ */ M(Wt, {
|
|
3440
4195
|
ref: l,
|
|
3441
4196
|
accessibilityLabel: t,
|
|
3442
4197
|
shape: "circular",
|
|
@@ -3446,20 +4201,20 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3446
4201
|
...c,
|
|
3447
4202
|
children: /* @__PURE__ */ M(X, {
|
|
3448
4203
|
icon: e,
|
|
3449
|
-
size: i ??
|
|
4204
|
+
size: i ?? zn[r]
|
|
3450
4205
|
})
|
|
3451
4206
|
});
|
|
3452
|
-
return a ? /* @__PURE__ */ M(
|
|
4207
|
+
return a ? /* @__PURE__ */ M(Rn, {
|
|
3453
4208
|
label: a,
|
|
3454
4209
|
placement: o,
|
|
3455
4210
|
delay: s,
|
|
3456
4211
|
children: u
|
|
3457
4212
|
}) : u;
|
|
3458
|
-
}),
|
|
4213
|
+
}), Vn = m.createAnimatedComponent(w), Hn = r(0), Un = {
|
|
3459
4214
|
classic: 420,
|
|
3460
4215
|
wide: 640
|
|
3461
|
-
},
|
|
3462
|
-
let v = q(), y =
|
|
4216
|
+
}, Wn = .85, Gn = 240, Kn = ({ open: e, side: t = "right", size: n = "classic", title: r, content: i, children: a, onClose: o, closeOnBackdrop: l = !0, rail: u, style: f, testID: p }) => {
|
|
4217
|
+
let v = q(), y = G(), b = J(), S = s(Hn), C = i === void 0 ? a : i, T = Un[n], E = S > 0 ? Math.max(Gn, Math.round(T * Wn ** S)) : T, D = g.get("window").width - v.space3 * 2, O = Math.min(E, D), A = d(new m.Value(+!!b)).current;
|
|
3463
4218
|
c(() => {
|
|
3464
4219
|
if (!e) return;
|
|
3465
4220
|
if (b) {
|
|
@@ -3506,7 +4261,7 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3506
4261
|
[t === "right" ? "borderRightWidth" : "borderLeftWidth"]: 1,
|
|
3507
4262
|
borderColor: v.cardShadeColor
|
|
3508
4263
|
},
|
|
3509
|
-
children: u.map((e) => /* @__PURE__ */ M(
|
|
4264
|
+
children: u.map((e) => /* @__PURE__ */ M(Bn, {
|
|
3510
4265
|
icon: e.icon,
|
|
3511
4266
|
label: e.label,
|
|
3512
4267
|
tooltip: e.label,
|
|
@@ -3527,7 +4282,7 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3527
4282
|
animationType: "none",
|
|
3528
4283
|
statusBarTranslucent: !0,
|
|
3529
4284
|
onRequestClose: o,
|
|
3530
|
-
children: /* @__PURE__ */ M(
|
|
4285
|
+
children: /* @__PURE__ */ M(Vn, {
|
|
3531
4286
|
testID: p,
|
|
3532
4287
|
onPress: l ? o : void 0,
|
|
3533
4288
|
accessible: !1,
|
|
@@ -3546,266 +4301,195 @@ var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
3546
4301
|
children: /* @__PURE__ */ N(m.View, {
|
|
3547
4302
|
accessible: !0,
|
|
3548
4303
|
role: "dialog",
|
|
3549
|
-
accessibilityViewIsModal: !0,
|
|
3550
|
-
style: [{
|
|
3551
|
-
flex: 1,
|
|
3552
|
-
flexDirection: "row",
|
|
3553
|
-
overflow: "hidden",
|
|
3554
|
-
borderRadius: v.radiusXl,
|
|
3555
|
-
backgroundColor: v.dialogBgColor,
|
|
3556
|
-
shadowColor: "#000",
|
|
3557
|
-
shadowOffset: {
|
|
3558
|
-
width: t === "left" ? 4 : -4,
|
|
3559
|
-
height: 0
|
|
3560
|
-
},
|
|
3561
|
-
...F,
|
|
3562
|
-
transform: [{ translateX: P }]
|
|
3563
|
-
}, f],
|
|
3564
|
-
children: [
|
|
3565
|
-
t === "right" && I,
|
|
3566
|
-
/* @__PURE__ */ N(k, {
|
|
3567
|
-
style: {
|
|
3568
|
-
flex: 1,
|
|
3569
|
-
minWidth: 0
|
|
3570
|
-
},
|
|
3571
|
-
children: [r && /* @__PURE__ */ N(k, {
|
|
3572
|
-
style: {
|
|
3573
|
-
flexDirection: "row",
|
|
3574
|
-
alignItems: "center",
|
|
3575
|
-
gap: v.space2,
|
|
3576
|
-
padding: v.space4,
|
|
3577
|
-
paddingBottom: v.space2
|
|
3578
|
-
},
|
|
3579
|
-
children: [/* @__PURE__ */ M(Y, {
|
|
3580
|
-
variant: "title-4",
|
|
3581
|
-
style: {
|
|
3582
|
-
flex: 1,
|
|
3583
|
-
fontWeight: String(v.fontWeightBold)
|
|
3584
|
-
},
|
|
3585
|
-
children: r
|
|
3586
|
-
}), o && /* @__PURE__ */ M(Nt, {
|
|
3587
|
-
variant: "flat",
|
|
3588
|
-
shape: "circular",
|
|
3589
|
-
size: "sm",
|
|
3590
|
-
accessibilityLabel: "Close",
|
|
3591
|
-
onPress: o,
|
|
3592
|
-
children: /* @__PURE__ */ M(X, {
|
|
3593
|
-
icon: L,
|
|
3594
|
-
size: "sm"
|
|
3595
|
-
})
|
|
3596
|
-
})]
|
|
3597
|
-
}), C !== void 0 && /* @__PURE__ */ M(k, {
|
|
3598
|
-
style: {
|
|
3599
|
-
flex: 1,
|
|
3600
|
-
padding: v.space4,
|
|
3601
|
-
paddingTop: r ? 0 : v.space4
|
|
3602
|
-
},
|
|
3603
|
-
children: /* @__PURE__ */ M(ln.Provider, {
|
|
3604
|
-
value: S + 1,
|
|
3605
|
-
children: typeof C == "string" ? /* @__PURE__ */ M(Y, {
|
|
3606
|
-
variant: "body",
|
|
3607
|
-
children: C
|
|
3608
|
-
}) : C
|
|
3609
|
-
})
|
|
3610
|
-
})]
|
|
3611
|
-
}),
|
|
3612
|
-
t === "left" && I
|
|
3613
|
-
]
|
|
3614
|
-
})
|
|
3615
|
-
})
|
|
3616
|
-
})
|
|
3617
|
-
});
|
|
3618
|
-
}, mn = 4, hn = 8, gn = 280;
|
|
3619
|
-
function _n(e, t) {
|
|
3620
|
-
let { height: n } = g.get("window"), r = n - (e.y + e.height) < t && e.y > t, i = r ? e.y - t - mn : e.y + e.height + mn;
|
|
3621
|
-
return {
|
|
3622
|
-
top: Math.max(hn, Math.min(i, n - t - hn)),
|
|
3623
|
-
left: e.x,
|
|
3624
|
-
width: e.width,
|
|
3625
|
-
flipUp: r
|
|
3626
|
-
};
|
|
3627
|
-
}
|
|
3628
|
-
var vn = ({ options: e, value: t, onChange: n, placeholder: r = "Select an option", accessibilityLabel: i, disabled: a, style: o, testID: s }) => {
|
|
3629
|
-
let l = q(), u = J(), [p, h] = f(!1), [g, _] = f(null), [v, y] = f(null), [b, S] = f(null), C = d(null), E = d(new m.Value(0)).current, D = e.find((e) => e.value === t), O = () => {
|
|
3630
|
-
a || h(!0);
|
|
3631
|
-
}, A = () => h(!1), j = (e) => {
|
|
3632
|
-
e.disabled || (n?.(e.value), A());
|
|
3633
|
-
};
|
|
3634
|
-
return c(() => {
|
|
3635
|
-
if (!p) {
|
|
3636
|
-
_(null), y(null), S(null);
|
|
3637
|
-
return;
|
|
3638
|
-
}
|
|
3639
|
-
C.current?.measureInWindow((e, t, n, r) => {
|
|
3640
|
-
_({
|
|
3641
|
-
x: e,
|
|
3642
|
-
y: t,
|
|
3643
|
-
width: n,
|
|
3644
|
-
height: r
|
|
3645
|
-
});
|
|
3646
|
-
});
|
|
3647
|
-
}, [p]), c(() => {
|
|
3648
|
-
g === null || v === null || S(_n(g, v));
|
|
3649
|
-
}, [g, v]), c(() => {
|
|
3650
|
-
if (b) {
|
|
3651
|
-
if (u) {
|
|
3652
|
-
E.setValue(1);
|
|
3653
|
-
return;
|
|
3654
|
-
}
|
|
3655
|
-
E.setValue(0), m.timing(E, {
|
|
3656
|
-
toValue: 1,
|
|
3657
|
-
duration: l.durationFast,
|
|
3658
|
-
useNativeDriver: !0
|
|
3659
|
-
}).start();
|
|
3660
|
-
}
|
|
3661
|
-
}, [
|
|
3662
|
-
b,
|
|
3663
|
-
u,
|
|
3664
|
-
E,
|
|
3665
|
-
l.durationFast
|
|
3666
|
-
]), /* @__PURE__ */ N(k, {
|
|
3667
|
-
style: o,
|
|
3668
|
-
children: [/* @__PURE__ */ N(w, {
|
|
3669
|
-
ref: C,
|
|
3670
|
-
testID: s,
|
|
3671
|
-
role: "combobox",
|
|
3672
|
-
accessibilityLabel: i,
|
|
3673
|
-
accessibilityState: {
|
|
3674
|
-
expanded: p,
|
|
3675
|
-
disabled: !!a
|
|
3676
|
-
},
|
|
3677
|
-
disabled: a,
|
|
3678
|
-
onPress: () => p ? A() : O(),
|
|
3679
|
-
style: ({ pressed: e }) => ({
|
|
3680
|
-
flexDirection: "row",
|
|
3681
|
-
alignItems: "center",
|
|
3682
|
-
justifyContent: "space-between",
|
|
3683
|
-
gap: l.space1,
|
|
3684
|
-
minHeight: 36,
|
|
3685
|
-
minWidth: 160,
|
|
3686
|
-
paddingVertical: 7,
|
|
3687
|
-
paddingHorizontal: l.space2,
|
|
3688
|
-
backgroundColor: e ? l.activeOverlay : l.cardBgColor,
|
|
3689
|
-
borderWidth: 1,
|
|
3690
|
-
borderColor: p ? l.accentColor : l.cardShadeColor,
|
|
3691
|
-
borderRadius: l.radiusMd,
|
|
3692
|
-
opacity: a ? l.opacityDisabled : 1
|
|
3693
|
-
}),
|
|
3694
|
-
children: [/* @__PURE__ */ M(Y, {
|
|
3695
|
-
numberOfLines: 1,
|
|
3696
|
-
style: {
|
|
3697
|
-
flex: 1,
|
|
3698
|
-
fontSize: l.fontSizeBody,
|
|
3699
|
-
color: l.windowFgColor,
|
|
3700
|
-
opacity: D ? 1 : l.opacityDim
|
|
3701
|
-
},
|
|
3702
|
-
children: D?.label ?? r
|
|
3703
|
-
}), /* @__PURE__ */ M(X, {
|
|
3704
|
-
icon: ne,
|
|
3705
|
-
size: "md",
|
|
3706
|
-
color: "default",
|
|
3707
|
-
style: { transform: [{ rotate: p ? "180deg" : "0deg" }] }
|
|
3708
|
-
})]
|
|
3709
|
-
}), /* @__PURE__ */ M(x, {
|
|
3710
|
-
visible: p,
|
|
3711
|
-
transparent: !0,
|
|
3712
|
-
animationType: "none",
|
|
3713
|
-
statusBarTranslucent: !0,
|
|
3714
|
-
children: /* @__PURE__ */ M(w, {
|
|
3715
|
-
onPress: A,
|
|
3716
|
-
accessible: !1,
|
|
3717
|
-
style: { flex: 1 },
|
|
3718
|
-
testID: s ? `${s}-backdrop` : void 0,
|
|
3719
|
-
children: /* @__PURE__ */ M(m.View, {
|
|
3720
|
-
onLayout: (e) => {
|
|
3721
|
-
y(Math.min(e.nativeEvent.layout.height, gn));
|
|
3722
|
-
},
|
|
3723
|
-
role: "list",
|
|
3724
|
-
accessible: !0,
|
|
3725
|
-
style: [{
|
|
3726
|
-
position: "absolute",
|
|
3727
|
-
maxHeight: gn,
|
|
3728
|
-
backgroundColor: l.popoverBgColor,
|
|
3729
|
-
borderWidth: 1,
|
|
3730
|
-
borderColor: l.cardShadeColor,
|
|
3731
|
-
borderRadius: l.radiusMd,
|
|
3732
|
-
paddingVertical: 4,
|
|
3733
|
-
shadowColor: "#000",
|
|
3734
|
-
shadowOffset: {
|
|
3735
|
-
width: 0,
|
|
3736
|
-
height: 4
|
|
3737
|
-
},
|
|
3738
|
-
shadowOpacity: .15,
|
|
3739
|
-
shadowRadius: 12,
|
|
3740
|
-
elevation: 6
|
|
3741
|
-
}, b ? {
|
|
3742
|
-
top: b.top,
|
|
3743
|
-
left: b.left,
|
|
3744
|
-
width: b.width,
|
|
3745
|
-
opacity: E
|
|
3746
|
-
} : {
|
|
3747
|
-
top: -9999,
|
|
3748
|
-
left: -9999,
|
|
3749
|
-
width: 200,
|
|
3750
|
-
opacity: 0
|
|
3751
|
-
}],
|
|
3752
|
-
children: /* @__PURE__ */ M(T, {
|
|
3753
|
-
bounces: !1,
|
|
3754
|
-
children: e.map((e) => {
|
|
3755
|
-
let n = e.value === t;
|
|
3756
|
-
return /* @__PURE__ */ N(w, {
|
|
3757
|
-
role: "option",
|
|
3758
|
-
accessibilityState: {
|
|
3759
|
-
selected: n,
|
|
3760
|
-
disabled: !!e.disabled
|
|
3761
|
-
},
|
|
3762
|
-
disabled: e.disabled,
|
|
3763
|
-
onPress: () => j(e),
|
|
3764
|
-
style: ({ pressed: t }) => ({
|
|
4304
|
+
accessibilityViewIsModal: !0,
|
|
4305
|
+
style: [{
|
|
4306
|
+
flex: 1,
|
|
4307
|
+
flexDirection: "row",
|
|
4308
|
+
overflow: "hidden",
|
|
4309
|
+
borderRadius: v.radiusXl,
|
|
4310
|
+
backgroundColor: v.dialogBgColor,
|
|
4311
|
+
shadowColor: "#000",
|
|
4312
|
+
shadowOffset: {
|
|
4313
|
+
width: t === "left" ? 4 : -4,
|
|
4314
|
+
height: 0
|
|
4315
|
+
},
|
|
4316
|
+
...F,
|
|
4317
|
+
transform: [{ translateX: P }]
|
|
4318
|
+
}, f],
|
|
4319
|
+
children: [
|
|
4320
|
+
t === "right" && I,
|
|
4321
|
+
/* @__PURE__ */ N(k, {
|
|
4322
|
+
style: {
|
|
4323
|
+
flex: 1,
|
|
4324
|
+
minWidth: 0
|
|
4325
|
+
},
|
|
4326
|
+
children: [r && /* @__PURE__ */ N(k, {
|
|
4327
|
+
style: {
|
|
3765
4328
|
flexDirection: "row",
|
|
3766
4329
|
alignItems: "center",
|
|
3767
|
-
gap:
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
}),
|
|
3774
|
-
children: [/* @__PURE__ */ N(k, {
|
|
4330
|
+
gap: v.space2,
|
|
4331
|
+
padding: v.space4,
|
|
4332
|
+
paddingBottom: v.space2
|
|
4333
|
+
},
|
|
4334
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
4335
|
+
variant: "title-4",
|
|
3775
4336
|
style: {
|
|
3776
4337
|
flex: 1,
|
|
3777
|
-
|
|
4338
|
+
fontWeight: String(v.fontWeightBold)
|
|
3778
4339
|
},
|
|
3779
|
-
children:
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
fontSize: l.fontSizeCaption,
|
|
3791
|
-
color: l.windowFgColor,
|
|
3792
|
-
opacity: l.opacityDim
|
|
3793
|
-
},
|
|
3794
|
-
children: e.description
|
|
3795
|
-
})]
|
|
3796
|
-
}), n && /* @__PURE__ */ M(X, {
|
|
3797
|
-
icon: I,
|
|
3798
|
-
size: "md",
|
|
3799
|
-
color: "blue"
|
|
4340
|
+
children: r
|
|
4341
|
+
}), o && /* @__PURE__ */ M(Wt, {
|
|
4342
|
+
variant: "flat",
|
|
4343
|
+
shape: "circular",
|
|
4344
|
+
size: "sm",
|
|
4345
|
+
accessibilityLabel: "Close",
|
|
4346
|
+
onPress: o,
|
|
4347
|
+
children: /* @__PURE__ */ M(X, {
|
|
4348
|
+
icon: R,
|
|
4349
|
+
size: "sm"
|
|
4350
|
+
})
|
|
3800
4351
|
})]
|
|
3801
|
-
},
|
|
3802
|
-
|
|
3803
|
-
|
|
4352
|
+
}), C !== void 0 && /* @__PURE__ */ M(k, {
|
|
4353
|
+
style: {
|
|
4354
|
+
flex: 1,
|
|
4355
|
+
padding: v.space4,
|
|
4356
|
+
paddingTop: r ? 0 : v.space4
|
|
4357
|
+
},
|
|
4358
|
+
children: /* @__PURE__ */ M(Hn.Provider, {
|
|
4359
|
+
value: S + 1,
|
|
4360
|
+
children: typeof C == "string" ? /* @__PURE__ */ M(Y, {
|
|
4361
|
+
variant: "body",
|
|
4362
|
+
children: C
|
|
4363
|
+
}) : C
|
|
4364
|
+
})
|
|
4365
|
+
})]
|
|
4366
|
+
}),
|
|
4367
|
+
t === "left" && I
|
|
4368
|
+
]
|
|
3804
4369
|
})
|
|
3805
4370
|
})
|
|
3806
|
-
})
|
|
4371
|
+
})
|
|
4372
|
+
});
|
|
4373
|
+
}, qn = 6, Jn = i(function({ title: e, value: t, defaultValue: n = "", onValueChange: r, onChangeText: i, leading: a, trailing: o, disabled: s = !1, onFocus: l, onBlur: u, accessibilityLabel: p, testID: h, style: g, ..._ }, v) {
|
|
4374
|
+
let y = q(), b = J(), x = t !== void 0, [S, C] = f(n), T = x ? t : S, [E, D] = f(!1), [A, j] = f(56), P = d(null), F = E || T.length > 0, I = d(new m.Value(+!!F)).current;
|
|
4375
|
+
c(() => {
|
|
4376
|
+
if (b) {
|
|
4377
|
+
I.setValue(+!!F);
|
|
4378
|
+
return;
|
|
4379
|
+
}
|
|
4380
|
+
let e = m.timing(I, {
|
|
4381
|
+
toValue: +!!F,
|
|
4382
|
+
duration: y.durationFast,
|
|
4383
|
+
useNativeDriver: !1
|
|
4384
|
+
});
|
|
4385
|
+
return e.start(), () => e.stop();
|
|
4386
|
+
}, [
|
|
4387
|
+
F,
|
|
4388
|
+
b,
|
|
4389
|
+
I,
|
|
4390
|
+
y.durationFast
|
|
4391
|
+
]);
|
|
4392
|
+
let L = Math.round(y.fontSizeBody * y.lineHeightBody), R = Math.round(y.fontSizeCaption * y.lineHeightBody), z = (A - L) / 2;
|
|
4393
|
+
return /* @__PURE__ */ N(w, {
|
|
4394
|
+
accessible: !1,
|
|
4395
|
+
testID: h,
|
|
4396
|
+
disabled: s,
|
|
4397
|
+
onPress: () => P.current?.focus(),
|
|
4398
|
+
style: [{
|
|
4399
|
+
flexDirection: "row",
|
|
4400
|
+
alignItems: "center",
|
|
4401
|
+
gap: y.space2,
|
|
4402
|
+
paddingHorizontal: y.space4,
|
|
4403
|
+
minHeight: 56,
|
|
4404
|
+
width: "100%",
|
|
4405
|
+
opacity: s ? y.opacityDisabled : 1
|
|
4406
|
+
}, g],
|
|
4407
|
+
children: [
|
|
4408
|
+
a ? /* @__PURE__ */ M(k, {
|
|
4409
|
+
style: { flexShrink: 0 },
|
|
4410
|
+
children: a
|
|
4411
|
+
}) : null,
|
|
4412
|
+
/* @__PURE__ */ N(k, {
|
|
4413
|
+
onLayout: (e) => j(e.nativeEvent.layout.height),
|
|
4414
|
+
style: {
|
|
4415
|
+
flex: 1,
|
|
4416
|
+
justifyContent: "center",
|
|
4417
|
+
minHeight: 56
|
|
4418
|
+
},
|
|
4419
|
+
children: [/* @__PURE__ */ M(m.Text, {
|
|
4420
|
+
pointerEvents: "none",
|
|
4421
|
+
accessibilityElementsHidden: !0,
|
|
4422
|
+
importantForAccessibility: "no",
|
|
4423
|
+
numberOfLines: 1,
|
|
4424
|
+
style: {
|
|
4425
|
+
position: "absolute",
|
|
4426
|
+
left: 0,
|
|
4427
|
+
right: 0,
|
|
4428
|
+
top: z,
|
|
4429
|
+
fontFamily: y.fontFamily,
|
|
4430
|
+
color: y.windowFgColor,
|
|
4431
|
+
fontSize: I.interpolate({
|
|
4432
|
+
inputRange: [0, 1],
|
|
4433
|
+
outputRange: [y.fontSizeBody, y.fontSizeCaption]
|
|
4434
|
+
}),
|
|
4435
|
+
lineHeight: I.interpolate({
|
|
4436
|
+
inputRange: [0, 1],
|
|
4437
|
+
outputRange: [L, R]
|
|
4438
|
+
}),
|
|
4439
|
+
opacity: I.interpolate({
|
|
4440
|
+
inputRange: [0, 1],
|
|
4441
|
+
outputRange: [y.opacityDim, .7]
|
|
4442
|
+
}),
|
|
4443
|
+
transform: [{ translateY: I.interpolate({
|
|
4444
|
+
inputRange: [0, 1],
|
|
4445
|
+
outputRange: [0, qn - z]
|
|
4446
|
+
}) }]
|
|
4447
|
+
},
|
|
4448
|
+
children: e
|
|
4449
|
+
}), /* @__PURE__ */ M(m.View, {
|
|
4450
|
+
style: { opacity: I },
|
|
4451
|
+
children: /* @__PURE__ */ M(O, {
|
|
4452
|
+
ref: (e) => {
|
|
4453
|
+
P.current = e, typeof v == "function" ? v(e) : v && (v.current = e);
|
|
4454
|
+
},
|
|
4455
|
+
value: T,
|
|
4456
|
+
editable: !s,
|
|
4457
|
+
accessibilityLabel: p ?? e,
|
|
4458
|
+
onFocus: (e) => {
|
|
4459
|
+
D(!0), l?.(e);
|
|
4460
|
+
},
|
|
4461
|
+
onBlur: (e) => {
|
|
4462
|
+
D(!1), u?.(e);
|
|
4463
|
+
},
|
|
4464
|
+
onChangeText: (e) => {
|
|
4465
|
+
x || C(e), r?.(e), i?.(e);
|
|
4466
|
+
},
|
|
4467
|
+
style: {
|
|
4468
|
+
padding: 0,
|
|
4469
|
+
margin: 0,
|
|
4470
|
+
width: "100%",
|
|
4471
|
+
fontFamily: y.fontFamily,
|
|
4472
|
+
fontSize: y.fontSizeBody,
|
|
4473
|
+
lineHeight: L,
|
|
4474
|
+
color: y.cardFgColor,
|
|
4475
|
+
paddingTop: y.space4,
|
|
4476
|
+
paddingBottom: 4
|
|
4477
|
+
},
|
|
4478
|
+
..._
|
|
4479
|
+
})
|
|
4480
|
+
})]
|
|
4481
|
+
}),
|
|
4482
|
+
o ? /* @__PURE__ */ M(k, {
|
|
4483
|
+
style: {
|
|
4484
|
+
flexDirection: "row",
|
|
4485
|
+
alignItems: "center",
|
|
4486
|
+
gap: y.space1
|
|
4487
|
+
},
|
|
4488
|
+
children: o
|
|
4489
|
+
}) : null
|
|
4490
|
+
]
|
|
3807
4491
|
});
|
|
3808
|
-
},
|
|
4492
|
+
}), Yn = ({ label: e, children: t, expanded: n, defaultExpanded: r = !1, onExpandedChange: i, disabled: a = !1, style: o, testID: s }) => {
|
|
3809
4493
|
let l = q(), u = J(), p = n !== void 0, [h, g] = f(r), v = p ? n : h, [y, b] = f(0), x = d(!1), S = d(new m.Value(0)).current, C = d(new m.Value(+!!r)).current, T = () => {
|
|
3810
4494
|
if (a) return;
|
|
3811
4495
|
let e = !v;
|
|
@@ -3877,7 +4561,7 @@ var vn = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
3877
4561
|
transform: [{ rotate: O }]
|
|
3878
4562
|
},
|
|
3879
4563
|
children: /* @__PURE__ */ M(X, {
|
|
3880
|
-
icon:
|
|
4564
|
+
icon: oe,
|
|
3881
4565
|
size: "md"
|
|
3882
4566
|
})
|
|
3883
4567
|
}), typeof e == "string" ? /* @__PURE__ */ M(Y, {
|
|
@@ -3900,21 +4584,177 @@ var vn = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
3900
4584
|
})
|
|
3901
4585
|
})]
|
|
3902
4586
|
});
|
|
3903
|
-
},
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
4587
|
+
}, Xn = i(function({ title: t, subtitle: n, leading: r, trailing: i, children: a, expanded: o, defaultExpanded: s = !1, onExpandedChange: l, style: u, testID: p }, h) {
|
|
4588
|
+
let g = q(), v = J(), y = o !== void 0, [b, x] = f(s), S = y ? o : b, [C, T] = f(0), E = d(!1), D = d(new m.Value(0)).current, O = d(new m.Value(+!!s)).current, A = () => {
|
|
4589
|
+
let e = !S;
|
|
4590
|
+
y || x(e), l?.(e);
|
|
4591
|
+
}, j = (e) => {
|
|
4592
|
+
let t = e.nativeEvent.layout.height;
|
|
4593
|
+
if (t === C) {
|
|
4594
|
+
E.current = !0;
|
|
4595
|
+
return;
|
|
4596
|
+
}
|
|
4597
|
+
S && !E.current && D.setValue(t), E.current = !0, T(t);
|
|
4598
|
+
};
|
|
4599
|
+
c(() => {
|
|
4600
|
+
let [e, t, n, r] = g.easingDefault, i = _.bezier(e, t, n, r), a = S ? C : 0;
|
|
4601
|
+
if (v) {
|
|
4602
|
+
D.setValue(a), O.setValue(+!!S);
|
|
4603
|
+
return;
|
|
4604
|
+
}
|
|
4605
|
+
m.parallel([m.timing(D, {
|
|
4606
|
+
toValue: a,
|
|
4607
|
+
duration: g.durationNormal,
|
|
4608
|
+
easing: i,
|
|
4609
|
+
useNativeDriver: !1
|
|
4610
|
+
}), m.timing(O, {
|
|
4611
|
+
toValue: +!!S,
|
|
4612
|
+
duration: g.durationFast,
|
|
4613
|
+
easing: i,
|
|
4614
|
+
useNativeDriver: !0
|
|
4615
|
+
})]).start();
|
|
4616
|
+
}, [
|
|
4617
|
+
S,
|
|
4618
|
+
C,
|
|
4619
|
+
v,
|
|
4620
|
+
D,
|
|
4621
|
+
O,
|
|
4622
|
+
g.durationNormal,
|
|
4623
|
+
g.durationFast,
|
|
4624
|
+
g.easingDefault
|
|
4625
|
+
]);
|
|
4626
|
+
let P = S && !E.current, F = O.interpolate({
|
|
4627
|
+
inputRange: [0, 1],
|
|
4628
|
+
outputRange: ["0deg", "180deg"]
|
|
4629
|
+
}), I = e.toArray(a).filter(Boolean);
|
|
4630
|
+
return /* @__PURE__ */ N(k, {
|
|
4631
|
+
ref: h,
|
|
4632
|
+
testID: p,
|
|
4633
|
+
style: [{ width: "100%" }, u],
|
|
4634
|
+
children: [/* @__PURE__ */ N(w, {
|
|
4635
|
+
role: "button",
|
|
4636
|
+
accessibilityState: { expanded: S },
|
|
4637
|
+
onPress: A,
|
|
4638
|
+
style: ({ pressed: e }) => ({
|
|
4639
|
+
flexDirection: "row",
|
|
4640
|
+
alignItems: "center",
|
|
4641
|
+
gap: g.space2,
|
|
4642
|
+
paddingVertical: g.space2,
|
|
4643
|
+
paddingHorizontal: g.space4,
|
|
4644
|
+
minHeight: 52,
|
|
4645
|
+
width: "100%",
|
|
4646
|
+
backgroundColor: e ? g.activeOverlay : "transparent"
|
|
4647
|
+
}),
|
|
4648
|
+
children: [
|
|
4649
|
+
r && /* @__PURE__ */ M(k, {
|
|
4650
|
+
style: { flexShrink: 0 },
|
|
4651
|
+
children: r
|
|
4652
|
+
}),
|
|
4653
|
+
/* @__PURE__ */ N(k, {
|
|
4654
|
+
style: {
|
|
4655
|
+
flex: 1,
|
|
4656
|
+
gap: 2
|
|
4657
|
+
},
|
|
4658
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
4659
|
+
variant: "body",
|
|
4660
|
+
numberOfLines: 1,
|
|
4661
|
+
ellipsizeMode: "tail",
|
|
4662
|
+
style: {
|
|
4663
|
+
color: g.cardFgColor,
|
|
4664
|
+
fontWeight: String(g.fontWeightNormal)
|
|
4665
|
+
},
|
|
4666
|
+
children: t
|
|
4667
|
+
}), n && /* @__PURE__ */ M(Y, {
|
|
4668
|
+
variant: "caption",
|
|
4669
|
+
color: "dim",
|
|
4670
|
+
numberOfLines: 1,
|
|
4671
|
+
ellipsizeMode: "tail",
|
|
4672
|
+
children: n
|
|
4673
|
+
})]
|
|
4674
|
+
}),
|
|
4675
|
+
i && /* @__PURE__ */ M(k, {
|
|
4676
|
+
style: {
|
|
4677
|
+
flexShrink: 0,
|
|
4678
|
+
flexDirection: "row",
|
|
4679
|
+
alignItems: "center",
|
|
4680
|
+
gap: g.space1
|
|
4681
|
+
},
|
|
4682
|
+
children: i
|
|
4683
|
+
}),
|
|
4684
|
+
/* @__PURE__ */ M(m.View, {
|
|
4685
|
+
style: {
|
|
4686
|
+
opacity: .55,
|
|
4687
|
+
transform: [{ rotate: F }]
|
|
4688
|
+
},
|
|
4689
|
+
children: /* @__PURE__ */ M(X, {
|
|
4690
|
+
icon: ae,
|
|
4691
|
+
size: "md"
|
|
4692
|
+
})
|
|
4693
|
+
})
|
|
4694
|
+
]
|
|
4695
|
+
}), /* @__PURE__ */ M(m.View, {
|
|
4696
|
+
style: {
|
|
4697
|
+
height: P ? void 0 : D,
|
|
4698
|
+
overflow: "hidden"
|
|
4699
|
+
},
|
|
4700
|
+
accessibilityElementsHidden: !S,
|
|
4701
|
+
importantForAccessibility: S ? "yes" : "no",
|
|
4702
|
+
children: /* @__PURE__ */ M(k, {
|
|
4703
|
+
accessible: !0,
|
|
4704
|
+
role: "region",
|
|
4705
|
+
onLayout: j,
|
|
4706
|
+
children: I.map((e, t) => /* @__PURE__ */ N(k, { children: [/* @__PURE__ */ M(zt, { testID: "expander-row-separator" }), e] }, t))
|
|
4707
|
+
})
|
|
4708
|
+
})]
|
|
4709
|
+
});
|
|
4710
|
+
}), Zn = ({ label: e, helperText: t, error: n, disabled: r = !1, children: i, style: a, ...o }) => {
|
|
4711
|
+
let s = q(), c = n ?? t;
|
|
4712
|
+
return /* @__PURE__ */ N(k, {
|
|
4713
|
+
role: "group",
|
|
4714
|
+
style: [{
|
|
4715
|
+
gap: s.space1,
|
|
4716
|
+
opacity: r ? s.opacityDisabled : 1
|
|
4717
|
+
}, a],
|
|
4718
|
+
...o,
|
|
4719
|
+
children: [
|
|
4720
|
+
/* @__PURE__ */ M(Y, {
|
|
4721
|
+
variant: "body",
|
|
4722
|
+
style: {
|
|
4723
|
+
color: s.windowFgColor,
|
|
4724
|
+
fontWeight: String(s.fontWeightSemibold)
|
|
4725
|
+
},
|
|
4726
|
+
children: e
|
|
4727
|
+
}),
|
|
4728
|
+
c && /* @__PURE__ */ M(Y, {
|
|
4729
|
+
role: n ? "alert" : void 0,
|
|
4730
|
+
variant: "caption",
|
|
4731
|
+
style: {
|
|
4732
|
+
color: n ? s.errorColor : s.windowFgColor,
|
|
4733
|
+
opacity: n ? 1 : s.opacityDim
|
|
4734
|
+
},
|
|
4735
|
+
children: c
|
|
4736
|
+
}),
|
|
4737
|
+
/* @__PURE__ */ M(k, {
|
|
4738
|
+
style: { gap: s.space2 },
|
|
4739
|
+
children: i
|
|
4740
|
+
})
|
|
4741
|
+
]
|
|
4742
|
+
});
|
|
4743
|
+
}, Qn = {
|
|
4744
|
+
folder: te,
|
|
4745
|
+
image: re,
|
|
4746
|
+
audio: I,
|
|
4747
|
+
video: de,
|
|
4748
|
+
text: ue,
|
|
4749
|
+
pdf: H,
|
|
4750
|
+
archive: ie,
|
|
4751
|
+
document: me,
|
|
4752
|
+
spreadsheet: ge,
|
|
4753
|
+
presentation: he,
|
|
4754
|
+
font: ne,
|
|
4755
|
+
executable: F,
|
|
4756
|
+
unknown: ue
|
|
4757
|
+
}, $n = {
|
|
3918
4758
|
folder: "Folder",
|
|
3919
4759
|
image: "Image file",
|
|
3920
4760
|
audio: "Audio file",
|
|
@@ -3928,7 +4768,7 @@ var vn = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
3928
4768
|
font: "Font file",
|
|
3929
4769
|
executable: "Executable",
|
|
3930
4770
|
unknown: "File"
|
|
3931
|
-
},
|
|
4771
|
+
}, er = {
|
|
3932
4772
|
png: "image",
|
|
3933
4773
|
jpg: "image",
|
|
3934
4774
|
jpeg: "image",
|
|
@@ -4000,13 +4840,13 @@ var vn = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
4000
4840
|
h: "text",
|
|
4001
4841
|
java: "text",
|
|
4002
4842
|
sql: "text"
|
|
4003
|
-
},
|
|
4843
|
+
}, tr = {
|
|
4004
4844
|
image: "image",
|
|
4005
4845
|
audio: "audio",
|
|
4006
4846
|
video: "video",
|
|
4007
4847
|
text: "text",
|
|
4008
4848
|
font: "font"
|
|
4009
|
-
},
|
|
4849
|
+
}, nr = {
|
|
4010
4850
|
pdf: "pdf",
|
|
4011
4851
|
zip: "archive",
|
|
4012
4852
|
gzip: "archive",
|
|
@@ -4026,31 +4866,31 @@ var vn = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
4026
4866
|
"x-sh": "executable",
|
|
4027
4867
|
"x-executable": "executable"
|
|
4028
4868
|
};
|
|
4029
|
-
function
|
|
4869
|
+
function rr(e) {
|
|
4030
4870
|
let t = e.trim().toLowerCase();
|
|
4031
4871
|
if (t === "inode/directory") return "folder";
|
|
4032
4872
|
let [n, r] = t.split("/");
|
|
4033
|
-
return r &&
|
|
4873
|
+
return r && nr[r] ? nr[r] : tr[n] ?? null;
|
|
4034
4874
|
}
|
|
4035
|
-
function
|
|
4875
|
+
function ir(e) {
|
|
4036
4876
|
let t = e.trim().replace(/^\.+/, ""), n = t.lastIndexOf(".");
|
|
4037
|
-
return n <= 0 ? null :
|
|
4877
|
+
return n <= 0 ? null : er[t.slice(n + 1).toLowerCase()] ?? null;
|
|
4038
4878
|
}
|
|
4039
|
-
function
|
|
4040
|
-
return
|
|
4879
|
+
function ar(e) {
|
|
4880
|
+
return Qn[e];
|
|
4041
4881
|
}
|
|
4042
|
-
function
|
|
4043
|
-
return
|
|
4882
|
+
function or(e) {
|
|
4883
|
+
return $n[e];
|
|
4044
4884
|
}
|
|
4045
4885
|
//#endregion
|
|
4046
4886
|
//#region src/components/FileTypeIcon/FileTypeIcon.tsx
|
|
4047
|
-
var
|
|
4048
|
-
let c = q(), l =
|
|
4887
|
+
var sr = ({ name: e, mimeType: t, isFolder: n = !1, thumbnail: r, label: i, size: a = "md", style: o, testID: s }) => {
|
|
4888
|
+
let c = q(), l = Je[a], u = n ? "folder" : t && rr(t) || e && ir(e) || "unknown";
|
|
4049
4889
|
return /* @__PURE__ */ M(k, {
|
|
4050
4890
|
testID: s,
|
|
4051
4891
|
accessible: !0,
|
|
4052
4892
|
role: "img",
|
|
4053
|
-
accessibilityLabel: i ??
|
|
4893
|
+
accessibilityLabel: i ?? or(u),
|
|
4054
4894
|
style: [{
|
|
4055
4895
|
width: l,
|
|
4056
4896
|
height: l,
|
|
@@ -4067,11 +4907,274 @@ var kn = ({ name: e, mimeType: t, isFolder: n = !1, thumbnail: r, label: i, size
|
|
|
4067
4907
|
borderRadius: c.radiusSm
|
|
4068
4908
|
}
|
|
4069
4909
|
}) : /* @__PURE__ */ M(X, {
|
|
4070
|
-
icon:
|
|
4910
|
+
icon: ar(u),
|
|
4071
4911
|
size: a
|
|
4072
4912
|
})
|
|
4073
4913
|
});
|
|
4074
|
-
},
|
|
4914
|
+
}, cr = 4, lr = 8, ur = 320;
|
|
4915
|
+
function dr(e, t) {
|
|
4916
|
+
let { height: n } = g.get("window"), r = n - (e.y + e.height) < t && e.y > t, i = r ? e.y - t - cr : e.y + e.height + cr;
|
|
4917
|
+
return {
|
|
4918
|
+
top: Math.max(lr, Math.min(i, n - t - lr)),
|
|
4919
|
+
left: e.x,
|
|
4920
|
+
width: e.width,
|
|
4921
|
+
flipUp: r
|
|
4922
|
+
};
|
|
4923
|
+
}
|
|
4924
|
+
function fr(e, t) {
|
|
4925
|
+
return e === 1 ? t[0].label : `${e} selected`;
|
|
4926
|
+
}
|
|
4927
|
+
function pr(e, t) {
|
|
4928
|
+
let n = t.trim().toLowerCase();
|
|
4929
|
+
return n ? e.filter((e) => e.label.toLowerCase().includes(n) || e.description?.toLowerCase().includes(n)) : e;
|
|
4930
|
+
}
|
|
4931
|
+
var mr = ({ options: e, value: t, onChange: n, placeholder: r = "Select options", filterPlaceholder: i = "Filter options…", accessibilityLabel: a, disabled: o, style: s, testID: l }) => {
|
|
4932
|
+
let u = q(), p = J(), [h, g] = f(!1), [_, v] = f(""), [y, b] = f(null), [S, C] = f(null), [E, D] = f(null), A = d(null), j = d(new m.Value(0)).current, P = e.filter((e) => t.includes(e.value)), F = pr(e, _), I = () => {
|
|
4933
|
+
o || (v(""), g(!0));
|
|
4934
|
+
}, L = () => g(!1), R = (e) => {
|
|
4935
|
+
e.disabled || n(t.includes(e.value) ? t.filter((t) => t !== e.value) : [...t, e.value]);
|
|
4936
|
+
};
|
|
4937
|
+
return c(() => {
|
|
4938
|
+
if (!h) {
|
|
4939
|
+
b(null), C(null), D(null);
|
|
4940
|
+
return;
|
|
4941
|
+
}
|
|
4942
|
+
A.current?.measureInWindow((e, t, n, r) => {
|
|
4943
|
+
b({
|
|
4944
|
+
x: e,
|
|
4945
|
+
y: t,
|
|
4946
|
+
width: n,
|
|
4947
|
+
height: r
|
|
4948
|
+
});
|
|
4949
|
+
});
|
|
4950
|
+
}, [h]), c(() => {
|
|
4951
|
+
y === null || S === null || D(dr(y, S));
|
|
4952
|
+
}, [y, S]), c(() => {
|
|
4953
|
+
if (E) {
|
|
4954
|
+
if (p) {
|
|
4955
|
+
j.setValue(1);
|
|
4956
|
+
return;
|
|
4957
|
+
}
|
|
4958
|
+
j.setValue(0), m.timing(j, {
|
|
4959
|
+
toValue: 1,
|
|
4960
|
+
duration: u.durationFast,
|
|
4961
|
+
useNativeDriver: !0
|
|
4962
|
+
}).start();
|
|
4963
|
+
}
|
|
4964
|
+
}, [
|
|
4965
|
+
E,
|
|
4966
|
+
p,
|
|
4967
|
+
j,
|
|
4968
|
+
u.durationFast
|
|
4969
|
+
]), /* @__PURE__ */ N(k, {
|
|
4970
|
+
style: s,
|
|
4971
|
+
children: [/* @__PURE__ */ N(w, {
|
|
4972
|
+
ref: A,
|
|
4973
|
+
testID: l,
|
|
4974
|
+
role: "combobox",
|
|
4975
|
+
accessibilityLabel: a,
|
|
4976
|
+
accessibilityState: {
|
|
4977
|
+
expanded: h,
|
|
4978
|
+
disabled: !!o
|
|
4979
|
+
},
|
|
4980
|
+
disabled: o,
|
|
4981
|
+
onPress: () => h ? L() : I(),
|
|
4982
|
+
style: ({ pressed: e }) => ({
|
|
4983
|
+
flexDirection: "row",
|
|
4984
|
+
alignItems: "center",
|
|
4985
|
+
justifyContent: "space-between",
|
|
4986
|
+
gap: u.space1,
|
|
4987
|
+
minHeight: 36,
|
|
4988
|
+
minWidth: 160,
|
|
4989
|
+
paddingVertical: 7,
|
|
4990
|
+
paddingHorizontal: u.space2,
|
|
4991
|
+
backgroundColor: e ? u.activeOverlay : u.cardBgColor,
|
|
4992
|
+
borderWidth: 1,
|
|
4993
|
+
borderColor: h ? u.accentColor : u.cardShadeColor,
|
|
4994
|
+
borderRadius: u.radiusMd,
|
|
4995
|
+
opacity: o ? u.opacityDisabled : 1
|
|
4996
|
+
}),
|
|
4997
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
4998
|
+
numberOfLines: 1,
|
|
4999
|
+
style: {
|
|
5000
|
+
flex: 1,
|
|
5001
|
+
fontSize: u.fontSizeBody,
|
|
5002
|
+
color: u.windowFgColor,
|
|
5003
|
+
opacity: P.length === 0 ? u.opacityDim : 1
|
|
5004
|
+
},
|
|
5005
|
+
children: P.length === 0 ? r : fr(P.length, P)
|
|
5006
|
+
}), /* @__PURE__ */ M(X, {
|
|
5007
|
+
icon: ae,
|
|
5008
|
+
size: "md",
|
|
5009
|
+
color: "default",
|
|
5010
|
+
style: { transform: [{ rotate: h ? "180deg" : "0deg" }] }
|
|
5011
|
+
})]
|
|
5012
|
+
}), /* @__PURE__ */ M(x, {
|
|
5013
|
+
visible: h,
|
|
5014
|
+
transparent: !0,
|
|
5015
|
+
animationType: "none",
|
|
5016
|
+
statusBarTranslucent: !0,
|
|
5017
|
+
children: /* @__PURE__ */ M(w, {
|
|
5018
|
+
onPress: L,
|
|
5019
|
+
accessible: !1,
|
|
5020
|
+
style: { flex: 1 },
|
|
5021
|
+
testID: l ? `${l}-backdrop` : void 0,
|
|
5022
|
+
children: /* @__PURE__ */ N(m.View, {
|
|
5023
|
+
onLayout: (e) => {
|
|
5024
|
+
C(Math.min(e.nativeEvent.layout.height, ur));
|
|
5025
|
+
},
|
|
5026
|
+
style: [{
|
|
5027
|
+
position: "absolute",
|
|
5028
|
+
maxHeight: ur,
|
|
5029
|
+
backgroundColor: u.popoverBgColor,
|
|
5030
|
+
borderWidth: 1,
|
|
5031
|
+
borderColor: u.cardShadeColor,
|
|
5032
|
+
borderRadius: u.radiusMd,
|
|
5033
|
+
shadowColor: "#000",
|
|
5034
|
+
shadowOffset: {
|
|
5035
|
+
width: 0,
|
|
5036
|
+
height: 4
|
|
5037
|
+
},
|
|
5038
|
+
shadowOpacity: .15,
|
|
5039
|
+
shadowRadius: 12,
|
|
5040
|
+
elevation: 6
|
|
5041
|
+
}, E ? {
|
|
5042
|
+
top: E.top,
|
|
5043
|
+
left: E.left,
|
|
5044
|
+
width: E.width,
|
|
5045
|
+
opacity: j
|
|
5046
|
+
} : {
|
|
5047
|
+
top: -9999,
|
|
5048
|
+
left: -9999,
|
|
5049
|
+
width: 200,
|
|
5050
|
+
opacity: 0
|
|
5051
|
+
}],
|
|
5052
|
+
children: [/* @__PURE__ */ N(k, {
|
|
5053
|
+
style: {
|
|
5054
|
+
flexDirection: "row",
|
|
5055
|
+
alignItems: "center",
|
|
5056
|
+
padding: 8,
|
|
5057
|
+
borderBottomWidth: 1,
|
|
5058
|
+
borderBottomColor: u.cardShadeColor
|
|
5059
|
+
},
|
|
5060
|
+
children: [/* @__PURE__ */ M(k, {
|
|
5061
|
+
style: {
|
|
5062
|
+
position: "absolute",
|
|
5063
|
+
left: 16,
|
|
5064
|
+
zIndex: 1
|
|
5065
|
+
},
|
|
5066
|
+
children: /* @__PURE__ */ M(X, {
|
|
5067
|
+
icon: ce,
|
|
5068
|
+
size: "sm",
|
|
5069
|
+
color: "default",
|
|
5070
|
+
style: { opacity: u.opacityDim }
|
|
5071
|
+
})
|
|
5072
|
+
}), /* @__PURE__ */ M(O, {
|
|
5073
|
+
value: _,
|
|
5074
|
+
onChangeText: v,
|
|
5075
|
+
placeholder: i,
|
|
5076
|
+
placeholderTextColor: u.windowFgColor,
|
|
5077
|
+
accessibilityLabel: i,
|
|
5078
|
+
autoFocus: !0,
|
|
5079
|
+
style: {
|
|
5080
|
+
flex: 1,
|
|
5081
|
+
paddingVertical: 6,
|
|
5082
|
+
paddingHorizontal: 8,
|
|
5083
|
+
paddingLeft: 28,
|
|
5084
|
+
fontFamily: u.fontFamily,
|
|
5085
|
+
fontSize: u.fontSizeBody,
|
|
5086
|
+
color: u.viewFgColor,
|
|
5087
|
+
backgroundColor: u.viewBgColor,
|
|
5088
|
+
borderWidth: 1,
|
|
5089
|
+
borderColor: u.cardShadeColor,
|
|
5090
|
+
borderRadius: u.radiusMd
|
|
5091
|
+
}
|
|
5092
|
+
})]
|
|
5093
|
+
}), F.length === 0 ? /* @__PURE__ */ M(Y, {
|
|
5094
|
+
style: {
|
|
5095
|
+
marginVertical: 16,
|
|
5096
|
+
textAlign: "center",
|
|
5097
|
+
color: u.windowFgColor,
|
|
5098
|
+
opacity: u.opacityDim
|
|
5099
|
+
},
|
|
5100
|
+
children: "No results"
|
|
5101
|
+
}) : /* @__PURE__ */ M(T, {
|
|
5102
|
+
role: "list",
|
|
5103
|
+
accessible: !0,
|
|
5104
|
+
bounces: !1,
|
|
5105
|
+
style: { paddingVertical: 4 },
|
|
5106
|
+
children: F.map((e) => {
|
|
5107
|
+
let n = t.includes(e.value);
|
|
5108
|
+
return /* @__PURE__ */ N(w, {
|
|
5109
|
+
role: "option",
|
|
5110
|
+
accessibilityState: {
|
|
5111
|
+
selected: n,
|
|
5112
|
+
disabled: !!e.disabled
|
|
5113
|
+
},
|
|
5114
|
+
disabled: e.disabled,
|
|
5115
|
+
onPress: () => R(e),
|
|
5116
|
+
style: ({ pressed: t }) => ({
|
|
5117
|
+
flexDirection: "row",
|
|
5118
|
+
alignItems: "center",
|
|
5119
|
+
gap: u.space2,
|
|
5120
|
+
minHeight: 40,
|
|
5121
|
+
paddingVertical: 8,
|
|
5122
|
+
paddingHorizontal: u.space2,
|
|
5123
|
+
backgroundColor: t ? u.activeOverlay : "transparent",
|
|
5124
|
+
opacity: e.disabled ? u.opacityDisabled : 1
|
|
5125
|
+
}),
|
|
5126
|
+
children: [/* @__PURE__ */ M(k, {
|
|
5127
|
+
style: {
|
|
5128
|
+
width: 16,
|
|
5129
|
+
height: 16,
|
|
5130
|
+
flexShrink: 0,
|
|
5131
|
+
alignItems: "center",
|
|
5132
|
+
justifyContent: "center",
|
|
5133
|
+
borderRadius: u.radiusSm,
|
|
5134
|
+
borderWidth: 1.5,
|
|
5135
|
+
borderColor: n ? u.accentBgColor : u.cardShadeColor,
|
|
5136
|
+
backgroundColor: n ? u.accentBgColor : "transparent"
|
|
5137
|
+
},
|
|
5138
|
+
children: n && /* @__PURE__ */ M(Y, {
|
|
5139
|
+
style: {
|
|
5140
|
+
color: "#fff",
|
|
5141
|
+
fontSize: 11,
|
|
5142
|
+
fontWeight: "bold",
|
|
5143
|
+
lineHeight: 11
|
|
5144
|
+
},
|
|
5145
|
+
children: "✓"
|
|
5146
|
+
})
|
|
5147
|
+
}), /* @__PURE__ */ N(k, {
|
|
5148
|
+
style: {
|
|
5149
|
+
flex: 1,
|
|
5150
|
+
gap: 1
|
|
5151
|
+
},
|
|
5152
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
5153
|
+
numberOfLines: 1,
|
|
5154
|
+
style: {
|
|
5155
|
+
fontSize: u.fontSizeBody,
|
|
5156
|
+
color: u.windowFgColor,
|
|
5157
|
+
fontWeight: n ? String(u.fontWeightSemibold) : void 0
|
|
5158
|
+
},
|
|
5159
|
+
children: e.label
|
|
5160
|
+
}), e.description && /* @__PURE__ */ M(Y, {
|
|
5161
|
+
numberOfLines: 1,
|
|
5162
|
+
style: {
|
|
5163
|
+
fontSize: u.fontSizeCaption,
|
|
5164
|
+
color: u.windowFgColor,
|
|
5165
|
+
opacity: u.opacityDim
|
|
5166
|
+
},
|
|
5167
|
+
children: e.description
|
|
5168
|
+
})]
|
|
5169
|
+
})]
|
|
5170
|
+
}, e.value);
|
|
5171
|
+
})
|
|
5172
|
+
})]
|
|
5173
|
+
})
|
|
5174
|
+
})
|
|
5175
|
+
})]
|
|
5176
|
+
});
|
|
5177
|
+
}, hr = i(function({ title: e, start: t, end: n, flat: r = !1, style: i, ...a }, o) {
|
|
4075
5178
|
let s = q();
|
|
4076
5179
|
return /* @__PURE__ */ N(k, {
|
|
4077
5180
|
ref: o,
|
|
@@ -4131,16 +5234,16 @@ var kn = ({ name: e, mimeType: t, isFolder: n = !1, thumbnail: r, label: i, size
|
|
|
4131
5234
|
});
|
|
4132
5235
|
//#endregion
|
|
4133
5236
|
//#region src/components/Highlight/Highlight.tsx
|
|
4134
|
-
function
|
|
5237
|
+
function gr(e) {
|
|
4135
5238
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4136
5239
|
}
|
|
4137
|
-
var
|
|
4138
|
-
let i = q(), a =
|
|
5240
|
+
var _r = ({ text: e, query: t, caseSensitive: n = !1, ...r }) => {
|
|
5241
|
+
let i = q(), a = K(), o = (Array.isArray(t) ? t : [t]).map((e) => e.trim()).filter(Boolean);
|
|
4139
5242
|
if (o.length === 0) return /* @__PURE__ */ M(Y, {
|
|
4140
5243
|
...r,
|
|
4141
5244
|
children: e
|
|
4142
5245
|
});
|
|
4143
|
-
let s = RegExp(`(${o.map(
|
|
5246
|
+
let s = RegExp(`(${o.map(gr).join("|")})`, n ? "g" : "gi"), c = e.split(s), l = {
|
|
4144
5247
|
fontWeight: String(i.fontWeightSemibold),
|
|
4145
5248
|
...a === "more" ? {
|
|
4146
5249
|
backgroundColor: i.accentBgColor,
|
|
@@ -4157,7 +5260,7 @@ var Mn = ({ text: e, query: t, caseSensitive: n = !1, ...r }) => {
|
|
|
4157
5260
|
};
|
|
4158
5261
|
//#endregion
|
|
4159
5262
|
//#region src/components/InlineViewSwitcher/variants.ts
|
|
4160
|
-
function
|
|
5263
|
+
function vr(e, t, n) {
|
|
4161
5264
|
let r = n ? "rgba(255, 255, 255, 0.12)" : e.light3, i = `${e.accentBgColor}${n ? "40" : "26"}`, a = `${e.accentBgColor}${n ? "80" : "66"}`;
|
|
4162
5265
|
switch (t) {
|
|
4163
5266
|
case "flat": return {
|
|
@@ -4269,7 +5372,7 @@ function Nn(e, t, n) {
|
|
|
4269
5372
|
};
|
|
4270
5373
|
}
|
|
4271
5374
|
}
|
|
4272
|
-
function
|
|
5375
|
+
function yr(e, t, n) {
|
|
4273
5376
|
return {
|
|
4274
5377
|
fontFamily: e.fontFamily,
|
|
4275
5378
|
fontSize: e.fontSizeBody,
|
|
@@ -4279,18 +5382,18 @@ function Pn(e, t, n) {
|
|
|
4279
5382
|
}
|
|
4280
5383
|
//#endregion
|
|
4281
5384
|
//#region src/components/InlineViewSwitcher/InlineViewSwitcher.tsx
|
|
4282
|
-
var
|
|
4283
|
-
function
|
|
4284
|
-
let e = s(
|
|
5385
|
+
var br = r(null);
|
|
5386
|
+
function xr() {
|
|
5387
|
+
let e = s(br);
|
|
4285
5388
|
if (!e) throw Error("InlineViewSwitcherItem must be used inside InlineViewSwitcher");
|
|
4286
5389
|
return e;
|
|
4287
5390
|
}
|
|
4288
|
-
var
|
|
4289
|
-
let _ = q(), v =
|
|
5391
|
+
var Sr = 160, Cr = 30, wr = i(function({ value: t, onValueChange: n, variant: r = "default", overflow: i = "wrap", accessibilityLabel: s = "View switcher", children: l, style: p, ...h }, g) {
|
|
5392
|
+
let _ = q(), v = G() === "dark", y = J(), b = u(() => vr(_, r, v), [
|
|
4290
5393
|
_,
|
|
4291
5394
|
r,
|
|
4292
5395
|
v
|
|
4293
|
-
]), [x, S] = f({}), [C, E] = f(0), [O, A] = f(!1), [P, F] = f(!1),
|
|
5396
|
+
]), [x, S] = f({}), [C, E] = f(0), [O, A] = f(!1), [P, F] = f(!1), I = d(0), R = d(new m.Value(0)).current, z = d(new m.Value(0)).current, B = o((e, t) => {
|
|
4294
5397
|
S((n) => {
|
|
4295
5398
|
let r = n[e];
|
|
4296
5399
|
return r && r.x === t.x && r.width === t.width ? n : {
|
|
@@ -4314,37 +5417,37 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4314
5417
|
V || A(!1);
|
|
4315
5418
|
return;
|
|
4316
5419
|
}
|
|
4317
|
-
A((e) => e ?
|
|
5420
|
+
A((e) => e ? I.current > C + Cr : ee > C ? (I.current = ee, !0) : !1);
|
|
4318
5421
|
}, [
|
|
4319
5422
|
V,
|
|
4320
5423
|
C,
|
|
4321
5424
|
ee
|
|
4322
5425
|
]);
|
|
4323
|
-
let te = i === "compact" && O,
|
|
5426
|
+
let te = i === "compact" && O, ne = i === "menu" && O, re = H.find((e) => e.name === t) ?? H[0], ie = x[t];
|
|
4324
5427
|
c(() => {
|
|
4325
|
-
if (
|
|
5428
|
+
if (ne || !ie) return;
|
|
4326
5429
|
if (y) {
|
|
4327
|
-
R.setValue(
|
|
5430
|
+
R.setValue(ie.x), z.setValue(ie.width);
|
|
4328
5431
|
return;
|
|
4329
5432
|
}
|
|
4330
5433
|
let e = m.parallel([m.timing(R, {
|
|
4331
|
-
toValue:
|
|
4332
|
-
duration:
|
|
5434
|
+
toValue: ie.x,
|
|
5435
|
+
duration: Sr,
|
|
4333
5436
|
useNativeDriver: !1
|
|
4334
5437
|
}), m.timing(z, {
|
|
4335
|
-
toValue:
|
|
4336
|
-
duration:
|
|
5438
|
+
toValue: ie.width,
|
|
5439
|
+
duration: Sr,
|
|
4337
5440
|
useNativeDriver: !1
|
|
4338
5441
|
})]);
|
|
4339
5442
|
return e.start(), () => e.stop();
|
|
4340
5443
|
}, [
|
|
4341
|
-
|
|
4342
|
-
|
|
5444
|
+
ie,
|
|
5445
|
+
ne,
|
|
4343
5446
|
y,
|
|
4344
5447
|
R,
|
|
4345
5448
|
z
|
|
4346
5449
|
]);
|
|
4347
|
-
let
|
|
5450
|
+
let oe = u(() => ({
|
|
4348
5451
|
value: t,
|
|
4349
5452
|
onValueChange: n,
|
|
4350
5453
|
compact: te,
|
|
@@ -4356,17 +5459,17 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4356
5459
|
te,
|
|
4357
5460
|
b,
|
|
4358
5461
|
B
|
|
4359
|
-
]),
|
|
5462
|
+
]), se = o((e) => {
|
|
4360
5463
|
V && E(e.nativeEvent.layout.width);
|
|
4361
|
-
}, [V]),
|
|
5464
|
+
}, [V]), ce = u(() => i === "scroll" ? H.map((e) => x[e.name]?.x ?? 0).filter((e, t) => t === 0 || e > 0) : void 0, [
|
|
4362
5465
|
i,
|
|
4363
5466
|
H,
|
|
4364
5467
|
x
|
|
4365
|
-
]),
|
|
5468
|
+
]), le = /* @__PURE__ */ M(k, {
|
|
4366
5469
|
ref: g,
|
|
4367
|
-
accessibilityRole:
|
|
5470
|
+
accessibilityRole: ne ? void 0 : "radiogroup",
|
|
4368
5471
|
accessibilityLabel: s,
|
|
4369
|
-
onLayout:
|
|
5472
|
+
onLayout: se,
|
|
4370
5473
|
style: [
|
|
4371
5474
|
{
|
|
4372
5475
|
flexDirection: "row",
|
|
@@ -4377,9 +5480,9 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4377
5480
|
p
|
|
4378
5481
|
],
|
|
4379
5482
|
...h,
|
|
4380
|
-
children:
|
|
5483
|
+
children: ne ? /* @__PURE__ */ N(w, {
|
|
4381
5484
|
accessibilityRole: "button",
|
|
4382
|
-
accessibilityLabel: `${s}: ${
|
|
5485
|
+
accessibilityLabel: `${s}: ${re?.label ?? re?.name}`,
|
|
4383
5486
|
onPress: () => F(!0),
|
|
4384
5487
|
style: [{
|
|
4385
5488
|
flexDirection: "row",
|
|
@@ -4390,16 +5493,16 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4390
5493
|
paddingVertical: 4
|
|
4391
5494
|
}, b.item],
|
|
4392
5495
|
children: [
|
|
4393
|
-
|
|
4394
|
-
icon:
|
|
5496
|
+
re?.icon ? /* @__PURE__ */ M(X, {
|
|
5497
|
+
icon: re.icon,
|
|
4395
5498
|
size: "md"
|
|
4396
5499
|
}) : null,
|
|
4397
|
-
|
|
4398
|
-
style:
|
|
4399
|
-
children:
|
|
5500
|
+
re?.label ? /* @__PURE__ */ M(D, {
|
|
5501
|
+
style: yr(_, !0, b.idleTextColor),
|
|
5502
|
+
children: re.label
|
|
4400
5503
|
}) : null,
|
|
4401
5504
|
/* @__PURE__ */ M(X, {
|
|
4402
|
-
icon:
|
|
5505
|
+
icon: ae,
|
|
4403
5506
|
size: "sm"
|
|
4404
5507
|
})
|
|
4405
5508
|
]
|
|
@@ -4415,17 +5518,17 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4415
5518
|
}, b.indicator]
|
|
4416
5519
|
}), l] })
|
|
4417
5520
|
});
|
|
4418
|
-
return /* @__PURE__ */ N(
|
|
4419
|
-
value:
|
|
5521
|
+
return /* @__PURE__ */ N(br.Provider, {
|
|
5522
|
+
value: oe,
|
|
4420
5523
|
children: [i === "scroll" ? /* @__PURE__ */ M(T, {
|
|
4421
5524
|
horizontal: !0,
|
|
4422
5525
|
showsHorizontalScrollIndicator: !1,
|
|
4423
|
-
snapToOffsets:
|
|
5526
|
+
snapToOffsets: ce,
|
|
4424
5527
|
decelerationRate: "fast",
|
|
4425
5528
|
contentContainerStyle: { flexGrow: 0 },
|
|
4426
5529
|
style: { flexGrow: 0 },
|
|
4427
|
-
children:
|
|
4428
|
-
}) :
|
|
5530
|
+
children: le
|
|
5531
|
+
}) : le, i === "menu" ? /* @__PURE__ */ M(Pt, {
|
|
4429
5532
|
open: P,
|
|
4430
5533
|
title: s,
|
|
4431
5534
|
onClose: () => F(!1),
|
|
@@ -4456,11 +5559,11 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4456
5559
|
size: "md"
|
|
4457
5560
|
}) : null,
|
|
4458
5561
|
/* @__PURE__ */ M(D, {
|
|
4459
|
-
style: [
|
|
5562
|
+
style: [yr(_, r, r ? _.accentColor : _.windowFgColor), { flex: 1 }],
|
|
4460
5563
|
children: e.label ?? e.name
|
|
4461
5564
|
}),
|
|
4462
5565
|
r ? /* @__PURE__ */ M(X, {
|
|
4463
|
-
icon:
|
|
5566
|
+
icon: L,
|
|
4464
5567
|
size: "md"
|
|
4465
5568
|
}) : null
|
|
4466
5569
|
]
|
|
@@ -4469,8 +5572,8 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4469
5572
|
})
|
|
4470
5573
|
}) : null]
|
|
4471
5574
|
});
|
|
4472
|
-
}),
|
|
4473
|
-
let c = q(), { value: l, onValueChange: u, compact: d, styles: f, onItemLayout: p } =
|
|
5575
|
+
}), Tr = i(function({ name: e, label: t, icon: n, accessibilityLabel: r, disabled: i = !1, ...a }, s) {
|
|
5576
|
+
let c = q(), { value: l, onValueChange: u, compact: d, styles: f, onItemLayout: p } = xr(), m = l === e, h = !!t && !(d && n), g = !!n && !h;
|
|
4474
5577
|
return /* @__PURE__ */ N(w, {
|
|
4475
5578
|
ref: s,
|
|
4476
5579
|
disabled: i,
|
|
@@ -4507,18 +5610,18 @@ var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r
|
|
|
4507
5610
|
size: "md"
|
|
4508
5611
|
}) : null, h ? /* @__PURE__ */ M(D, {
|
|
4509
5612
|
numberOfLines: 1,
|
|
4510
|
-
style:
|
|
5613
|
+
style: yr(c, m, m ? f.activeTextColor : f.idleTextColor),
|
|
4511
5614
|
children: t
|
|
4512
5615
|
}) : null]
|
|
4513
5616
|
});
|
|
4514
5617
|
});
|
|
4515
|
-
|
|
5618
|
+
Tr.displayName = "InlineViewSwitcherItem";
|
|
4516
5619
|
//#endregion
|
|
4517
5620
|
//#region src/components/LevelBar/LevelBar.tsx
|
|
4518
|
-
function
|
|
5621
|
+
function Er(e, t, n, r, i, a) {
|
|
4519
5622
|
return t !== void 0 && e <= t ? n : r !== void 0 && e >= r ? i : a;
|
|
4520
5623
|
}
|
|
4521
|
-
function
|
|
5624
|
+
function Dr(e, t) {
|
|
4522
5625
|
switch (t) {
|
|
4523
5626
|
case "accent": return e.accentBgColor;
|
|
4524
5627
|
case "success": return e.successBgColor;
|
|
@@ -4526,8 +5629,8 @@ function Hn(e, t) {
|
|
|
4526
5629
|
case "error": return e.errorBgColor;
|
|
4527
5630
|
}
|
|
4528
5631
|
}
|
|
4529
|
-
var
|
|
4530
|
-
let g = q(), v =
|
|
5632
|
+
var Or = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning", high: a, highVariant: o = "error", variant: s = "accent", discrete: l = !1, numBlocks: u = 10, accessibilityLabel: f, style: p, testID: h }) => {
|
|
5633
|
+
let g = q(), v = G(), y = J(), b = n - t, x = Math.min(n, Math.max(t, e)), S = b > 0 ? (x - t) / b : 0, C = Er(x, r, i, a, o, s), w = d(new m.Value(S)).current;
|
|
4531
5634
|
c(() => {
|
|
4532
5635
|
if (l) return;
|
|
4533
5636
|
let [e, t, n, r] = g.easingDefault;
|
|
@@ -4574,7 +5677,7 @@ var Un = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
4574
5677
|
height: "100%",
|
|
4575
5678
|
minWidth: 2,
|
|
4576
5679
|
borderRadius: 1,
|
|
4577
|
-
backgroundColor: (t + 1) / u <= S ?
|
|
5680
|
+
backgroundColor: (t + 1) / u <= S ? Dr(g, C) : T
|
|
4578
5681
|
}
|
|
4579
5682
|
}, t)) : /* @__PURE__ */ M(m.View, {
|
|
4580
5683
|
testID: h ? `${h}-fill` : void 0,
|
|
@@ -4582,13 +5685,13 @@ var Un = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
4582
5685
|
width: "100%",
|
|
4583
5686
|
height: "100%",
|
|
4584
5687
|
borderRadius: g.radiusPill,
|
|
4585
|
-
backgroundColor:
|
|
5688
|
+
backgroundColor: Dr(g, C),
|
|
4586
5689
|
transformOrigin: "left",
|
|
4587
5690
|
transform: [{ scaleX: w }]
|
|
4588
5691
|
}
|
|
4589
5692
|
})
|
|
4590
5693
|
});
|
|
4591
|
-
},
|
|
5694
|
+
}, kr = i(function({ href: e, external: t = !1, children: n, style: r, textStyle: i, onPress: a, ...o }, s) {
|
|
4592
5695
|
let c = q();
|
|
4593
5696
|
return /* @__PURE__ */ M(w, {
|
|
4594
5697
|
ref: s,
|
|
@@ -4611,7 +5714,217 @@ var Un = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
4611
5714
|
})]
|
|
4612
5715
|
})
|
|
4613
5716
|
});
|
|
4614
|
-
}),
|
|
5717
|
+
}), Ar = 4, jr = 8, Mr = 280;
|
|
5718
|
+
function Nr(e, t) {
|
|
5719
|
+
let { height: n } = g.get("window"), r = n - (e.y + e.height) < t && e.y > t, i = r ? e.y - t - Ar : e.y + e.height + Ar;
|
|
5720
|
+
return {
|
|
5721
|
+
top: Math.max(jr, Math.min(i, n - t - jr)),
|
|
5722
|
+
left: e.x,
|
|
5723
|
+
width: e.width,
|
|
5724
|
+
flipUp: r
|
|
5725
|
+
};
|
|
5726
|
+
}
|
|
5727
|
+
function Pr(e, t) {
|
|
5728
|
+
return e === 1 ? t[0].label : `${e} selected`;
|
|
5729
|
+
}
|
|
5730
|
+
var Fr = ({ options: e, value: t, onChange: n, placeholder: r = "Select options", accessibilityLabel: i, disabled: a, style: o, testID: s }) => {
|
|
5731
|
+
let l = q(), u = J(), [p, h] = f(!1), [g, _] = f(null), [v, y] = f(null), [b, S] = f(null), C = d(null), E = d(new m.Value(0)).current, D = e.filter((e) => t.includes(e.value)), O = () => {
|
|
5732
|
+
a || h(!0);
|
|
5733
|
+
}, A = () => h(!1), j = (e) => {
|
|
5734
|
+
e.disabled || n(t.includes(e.value) ? t.filter((t) => t !== e.value) : [...t, e.value]);
|
|
5735
|
+
};
|
|
5736
|
+
return c(() => {
|
|
5737
|
+
if (!p) {
|
|
5738
|
+
_(null), y(null), S(null);
|
|
5739
|
+
return;
|
|
5740
|
+
}
|
|
5741
|
+
C.current?.measureInWindow((e, t, n, r) => {
|
|
5742
|
+
_({
|
|
5743
|
+
x: e,
|
|
5744
|
+
y: t,
|
|
5745
|
+
width: n,
|
|
5746
|
+
height: r
|
|
5747
|
+
});
|
|
5748
|
+
});
|
|
5749
|
+
}, [p]), c(() => {
|
|
5750
|
+
g === null || v === null || S(Nr(g, v));
|
|
5751
|
+
}, [g, v]), c(() => {
|
|
5752
|
+
if (b) {
|
|
5753
|
+
if (u) {
|
|
5754
|
+
E.setValue(1);
|
|
5755
|
+
return;
|
|
5756
|
+
}
|
|
5757
|
+
E.setValue(0), m.timing(E, {
|
|
5758
|
+
toValue: 1,
|
|
5759
|
+
duration: l.durationFast,
|
|
5760
|
+
useNativeDriver: !0
|
|
5761
|
+
}).start();
|
|
5762
|
+
}
|
|
5763
|
+
}, [
|
|
5764
|
+
b,
|
|
5765
|
+
u,
|
|
5766
|
+
E,
|
|
5767
|
+
l.durationFast
|
|
5768
|
+
]), /* @__PURE__ */ N(k, {
|
|
5769
|
+
style: o,
|
|
5770
|
+
children: [/* @__PURE__ */ N(w, {
|
|
5771
|
+
ref: C,
|
|
5772
|
+
testID: s,
|
|
5773
|
+
role: "combobox",
|
|
5774
|
+
accessibilityLabel: i,
|
|
5775
|
+
accessibilityState: {
|
|
5776
|
+
expanded: p,
|
|
5777
|
+
disabled: !!a
|
|
5778
|
+
},
|
|
5779
|
+
disabled: a,
|
|
5780
|
+
onPress: () => p ? A() : O(),
|
|
5781
|
+
style: ({ pressed: e }) => ({
|
|
5782
|
+
flexDirection: "row",
|
|
5783
|
+
alignItems: "center",
|
|
5784
|
+
justifyContent: "space-between",
|
|
5785
|
+
gap: l.space1,
|
|
5786
|
+
minHeight: 36,
|
|
5787
|
+
minWidth: 160,
|
|
5788
|
+
paddingVertical: 7,
|
|
5789
|
+
paddingHorizontal: l.space2,
|
|
5790
|
+
backgroundColor: e ? l.activeOverlay : l.cardBgColor,
|
|
5791
|
+
borderWidth: 1,
|
|
5792
|
+
borderColor: p ? l.accentColor : l.cardShadeColor,
|
|
5793
|
+
borderRadius: l.radiusMd,
|
|
5794
|
+
opacity: a ? l.opacityDisabled : 1
|
|
5795
|
+
}),
|
|
5796
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
5797
|
+
numberOfLines: 1,
|
|
5798
|
+
style: {
|
|
5799
|
+
flex: 1,
|
|
5800
|
+
fontSize: l.fontSizeBody,
|
|
5801
|
+
color: l.windowFgColor,
|
|
5802
|
+
opacity: D.length === 0 ? l.opacityDim : 1
|
|
5803
|
+
},
|
|
5804
|
+
children: D.length === 0 ? r : Pr(D.length, D)
|
|
5805
|
+
}), /* @__PURE__ */ M(X, {
|
|
5806
|
+
icon: ae,
|
|
5807
|
+
size: "md",
|
|
5808
|
+
color: "default",
|
|
5809
|
+
style: { transform: [{ rotate: p ? "180deg" : "0deg" }] }
|
|
5810
|
+
})]
|
|
5811
|
+
}), /* @__PURE__ */ M(x, {
|
|
5812
|
+
visible: p,
|
|
5813
|
+
transparent: !0,
|
|
5814
|
+
animationType: "none",
|
|
5815
|
+
statusBarTranslucent: !0,
|
|
5816
|
+
children: /* @__PURE__ */ M(w, {
|
|
5817
|
+
onPress: A,
|
|
5818
|
+
accessible: !1,
|
|
5819
|
+
style: { flex: 1 },
|
|
5820
|
+
testID: s ? `${s}-backdrop` : void 0,
|
|
5821
|
+
children: /* @__PURE__ */ M(m.View, {
|
|
5822
|
+
onLayout: (e) => {
|
|
5823
|
+
y(Math.min(e.nativeEvent.layout.height, Mr));
|
|
5824
|
+
},
|
|
5825
|
+
role: "list",
|
|
5826
|
+
accessible: !0,
|
|
5827
|
+
style: [{
|
|
5828
|
+
position: "absolute",
|
|
5829
|
+
maxHeight: Mr,
|
|
5830
|
+
backgroundColor: l.popoverBgColor,
|
|
5831
|
+
borderWidth: 1,
|
|
5832
|
+
borderColor: l.cardShadeColor,
|
|
5833
|
+
borderRadius: l.radiusMd,
|
|
5834
|
+
paddingVertical: 4,
|
|
5835
|
+
shadowColor: "#000",
|
|
5836
|
+
shadowOffset: {
|
|
5837
|
+
width: 0,
|
|
5838
|
+
height: 4
|
|
5839
|
+
},
|
|
5840
|
+
shadowOpacity: .15,
|
|
5841
|
+
shadowRadius: 12,
|
|
5842
|
+
elevation: 6
|
|
5843
|
+
}, b ? {
|
|
5844
|
+
top: b.top,
|
|
5845
|
+
left: b.left,
|
|
5846
|
+
width: b.width,
|
|
5847
|
+
opacity: E
|
|
5848
|
+
} : {
|
|
5849
|
+
top: -9999,
|
|
5850
|
+
left: -9999,
|
|
5851
|
+
width: 200,
|
|
5852
|
+
opacity: 0
|
|
5853
|
+
}],
|
|
5854
|
+
children: /* @__PURE__ */ M(T, {
|
|
5855
|
+
bounces: !1,
|
|
5856
|
+
children: e.map((e) => {
|
|
5857
|
+
let n = t.includes(e.value);
|
|
5858
|
+
return /* @__PURE__ */ N(w, {
|
|
5859
|
+
role: "option",
|
|
5860
|
+
accessibilityState: {
|
|
5861
|
+
selected: n,
|
|
5862
|
+
disabled: !!e.disabled
|
|
5863
|
+
},
|
|
5864
|
+
disabled: e.disabled,
|
|
5865
|
+
onPress: () => j(e),
|
|
5866
|
+
style: ({ pressed: t }) => ({
|
|
5867
|
+
flexDirection: "row",
|
|
5868
|
+
alignItems: "center",
|
|
5869
|
+
gap: l.space2,
|
|
5870
|
+
minHeight: 40,
|
|
5871
|
+
paddingVertical: 8,
|
|
5872
|
+
paddingHorizontal: l.space2,
|
|
5873
|
+
backgroundColor: t ? l.activeOverlay : "transparent",
|
|
5874
|
+
opacity: e.disabled ? l.opacityDisabled : 1
|
|
5875
|
+
}),
|
|
5876
|
+
children: [/* @__PURE__ */ M(k, {
|
|
5877
|
+
style: {
|
|
5878
|
+
width: 16,
|
|
5879
|
+
height: 16,
|
|
5880
|
+
flexShrink: 0,
|
|
5881
|
+
alignItems: "center",
|
|
5882
|
+
justifyContent: "center",
|
|
5883
|
+
borderRadius: l.radiusSm,
|
|
5884
|
+
borderWidth: 1.5,
|
|
5885
|
+
borderColor: n ? l.accentBgColor : l.cardShadeColor,
|
|
5886
|
+
backgroundColor: n ? l.accentBgColor : "transparent"
|
|
5887
|
+
},
|
|
5888
|
+
children: n && /* @__PURE__ */ M(Y, {
|
|
5889
|
+
style: {
|
|
5890
|
+
color: "#fff",
|
|
5891
|
+
fontSize: 11,
|
|
5892
|
+
fontWeight: "bold",
|
|
5893
|
+
lineHeight: 11
|
|
5894
|
+
},
|
|
5895
|
+
children: "✓"
|
|
5896
|
+
})
|
|
5897
|
+
}), /* @__PURE__ */ N(k, {
|
|
5898
|
+
style: {
|
|
5899
|
+
flex: 1,
|
|
5900
|
+
gap: 1
|
|
5901
|
+
},
|
|
5902
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
5903
|
+
numberOfLines: 1,
|
|
5904
|
+
style: {
|
|
5905
|
+
fontSize: l.fontSizeBody,
|
|
5906
|
+
color: l.windowFgColor,
|
|
5907
|
+
fontWeight: n ? String(l.fontWeightSemibold) : void 0
|
|
5908
|
+
},
|
|
5909
|
+
children: e.label
|
|
5910
|
+
}), e.description && /* @__PURE__ */ M(Y, {
|
|
5911
|
+
numberOfLines: 1,
|
|
5912
|
+
style: {
|
|
5913
|
+
fontSize: l.fontSizeCaption,
|
|
5914
|
+
color: l.windowFgColor,
|
|
5915
|
+
opacity: l.opacityDim
|
|
5916
|
+
},
|
|
5917
|
+
children: e.description
|
|
5918
|
+
})]
|
|
5919
|
+
})]
|
|
5920
|
+
}, e.value);
|
|
5921
|
+
})
|
|
5922
|
+
})
|
|
5923
|
+
})
|
|
5924
|
+
})
|
|
5925
|
+
})]
|
|
5926
|
+
});
|
|
5927
|
+
}, Ir = m.createAnimatedComponent(w), Lr = ({ open: e, onDismiss: t, children: n, style: r, testID: i }) => {
|
|
4615
5928
|
let a = q(), o = J(), [s, l] = f(e), u = d(new m.Value(+!!e)).current;
|
|
4616
5929
|
return c(() => {
|
|
4617
5930
|
e && l(!0);
|
|
@@ -4650,7 +5963,7 @@ var Un = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
4650
5963
|
transparent: !0,
|
|
4651
5964
|
animationType: "none",
|
|
4652
5965
|
statusBarTranslucent: !0,
|
|
4653
|
-
children: /* @__PURE__ */ M(
|
|
5966
|
+
children: /* @__PURE__ */ M(Ir, {
|
|
4654
5967
|
testID: i,
|
|
4655
5968
|
onPress: t,
|
|
4656
5969
|
accessible: !1,
|
|
@@ -4668,7 +5981,111 @@ var Un = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
4668
5981
|
})
|
|
4669
5982
|
})
|
|
4670
5983
|
}) : null;
|
|
4671
|
-
},
|
|
5984
|
+
}, Rr = i(function({ trailing: e, disabled: t = !1, autoComplete: n = "current-password", ...r }, i) {
|
|
5985
|
+
let [a, o] = f(!1);
|
|
5986
|
+
return /* @__PURE__ */ M(Jn, {
|
|
5987
|
+
ref: i,
|
|
5988
|
+
...r,
|
|
5989
|
+
autoComplete: n,
|
|
5990
|
+
secureTextEntry: !a,
|
|
5991
|
+
disabled: t,
|
|
5992
|
+
trailing: /* @__PURE__ */ N(j, { children: [e, /* @__PURE__ */ M(Bn, {
|
|
5993
|
+
icon: a ? fe : pe,
|
|
5994
|
+
label: a ? "Conceal password" : "Reveal password",
|
|
5995
|
+
variant: "flat",
|
|
5996
|
+
disabled: t,
|
|
5997
|
+
accessibilityState: {
|
|
5998
|
+
selected: a,
|
|
5999
|
+
disabled: t
|
|
6000
|
+
},
|
|
6001
|
+
onPress: () => o((e) => !e)
|
|
6002
|
+
})] })
|
|
6003
|
+
});
|
|
6004
|
+
});
|
|
6005
|
+
//#endregion
|
|
6006
|
+
//#region src/components/PasswordField/PasswordField.tsx
|
|
6007
|
+
function zr(e, t) {
|
|
6008
|
+
let n = e.match(/^rgba?\(([^,]+),([^,]+),([^,]+),?([^)]+)?\)$/);
|
|
6009
|
+
if (!n) return e;
|
|
6010
|
+
let [, r, i, a, o] = n, s = (o ? Number.parseFloat(o) : 1) * t;
|
|
6011
|
+
return `rgba(${r.trim()}, ${i.trim()}, ${a.trim()}, ${s})`;
|
|
6012
|
+
}
|
|
6013
|
+
var Br = 28, Vr = i(function({ label: e, helperText: t, error: n, revealable: r = !0, revealLabel: i = "Show password", concealLabel: a = "Hide password", style: o, inputStyle: s, editable: c = !0, onFocus: l, onBlur: u, accessibilityLabel: d, accessibilityHint: p, ...m }, h) {
|
|
6014
|
+
let g = q(), _ = K(), [v, y] = f(!1), [b, x] = f(!1), S = !c, C = n ?? t, w = r, T = n ? g.errorColor : v ? g.accentColor : g.borderSubtle;
|
|
6015
|
+
return /* @__PURE__ */ N(k, {
|
|
6016
|
+
style: [{
|
|
6017
|
+
gap: g.space1,
|
|
6018
|
+
opacity: S ? g.opacityDisabled : 1
|
|
6019
|
+
}, o],
|
|
6020
|
+
children: [
|
|
6021
|
+
e && /* @__PURE__ */ M(Y, {
|
|
6022
|
+
variant: "body",
|
|
6023
|
+
style: { fontWeight: String(g.fontWeightSemibold) },
|
|
6024
|
+
children: e
|
|
6025
|
+
}),
|
|
6026
|
+
/* @__PURE__ */ N(k, {
|
|
6027
|
+
style: {
|
|
6028
|
+
position: "relative",
|
|
6029
|
+
justifyContent: "center"
|
|
6030
|
+
},
|
|
6031
|
+
children: [/* @__PURE__ */ M(O, {
|
|
6032
|
+
ref: h,
|
|
6033
|
+
editable: c,
|
|
6034
|
+
secureTextEntry: !b,
|
|
6035
|
+
accessibilityLabel: d ?? e,
|
|
6036
|
+
accessibilityHint: p ?? C,
|
|
6037
|
+
placeholderTextColor: zr(g.windowFgColor, g.opacityDim),
|
|
6038
|
+
onFocus: (e) => {
|
|
6039
|
+
y(!0), l?.(e);
|
|
6040
|
+
},
|
|
6041
|
+
onBlur: (e) => {
|
|
6042
|
+
y(!1), u?.(e);
|
|
6043
|
+
},
|
|
6044
|
+
style: [{
|
|
6045
|
+
width: "100%",
|
|
6046
|
+
paddingVertical: 8,
|
|
6047
|
+
paddingHorizontal: g.space2,
|
|
6048
|
+
paddingEnd: w ? Br + g.space2 + 6 : g.space2,
|
|
6049
|
+
fontFamily: g.fontFamily,
|
|
6050
|
+
fontSize: g.fontSizeBody,
|
|
6051
|
+
lineHeight: Math.round(g.fontSizeBody * g.lineHeightBody),
|
|
6052
|
+
color: g.viewFgColor,
|
|
6053
|
+
backgroundColor: g.viewBgColor,
|
|
6054
|
+
borderRadius: g.radiusMd,
|
|
6055
|
+
borderWidth: _ === "more" ? 2 : 1,
|
|
6056
|
+
borderColor: T
|
|
6057
|
+
}, s],
|
|
6058
|
+
...m
|
|
6059
|
+
}), w && /* @__PURE__ */ M(k, {
|
|
6060
|
+
style: {
|
|
6061
|
+
position: "absolute",
|
|
6062
|
+
end: 6
|
|
6063
|
+
},
|
|
6064
|
+
children: /* @__PURE__ */ M(Bn, {
|
|
6065
|
+
icon: b ? fe : pe,
|
|
6066
|
+
label: b ? a : i,
|
|
6067
|
+
variant: "flat",
|
|
6068
|
+
size: "sm",
|
|
6069
|
+
disabled: S,
|
|
6070
|
+
accessibilityState: {
|
|
6071
|
+
selected: b,
|
|
6072
|
+
disabled: S
|
|
6073
|
+
},
|
|
6074
|
+
onPress: () => x((e) => !e)
|
|
6075
|
+
})
|
|
6076
|
+
})]
|
|
6077
|
+
}),
|
|
6078
|
+
C && /* @__PURE__ */ M(Y, {
|
|
6079
|
+
variant: "caption",
|
|
6080
|
+
style: {
|
|
6081
|
+
color: n ? g.errorColor : g.windowFgColor,
|
|
6082
|
+
opacity: n ? 1 : g.opacityDim
|
|
6083
|
+
},
|
|
6084
|
+
children: C
|
|
6085
|
+
})
|
|
6086
|
+
]
|
|
6087
|
+
});
|
|
6088
|
+
}), Hr = ({ segments: e, onNavigate: n, style: r, ...i }) => {
|
|
4672
6089
|
let a = q();
|
|
4673
6090
|
return /* @__PURE__ */ M(k, {
|
|
4674
6091
|
style: [{
|
|
@@ -4742,8 +6159,8 @@ var Un = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
4742
6159
|
})] }, r.path);
|
|
4743
6160
|
})
|
|
4744
6161
|
});
|
|
4745
|
-
},
|
|
4746
|
-
function
|
|
6162
|
+
}, Ur = 8, $ = 10, Wr = 6;
|
|
6163
|
+
function Gr(e, t) {
|
|
4747
6164
|
if (e) {
|
|
4748
6165
|
if (typeof e == "function") {
|
|
4749
6166
|
e(t);
|
|
@@ -4752,27 +6169,27 @@ function Xn(e, t) {
|
|
|
4752
6169
|
e.current = t;
|
|
4753
6170
|
}
|
|
4754
6171
|
}
|
|
4755
|
-
function
|
|
6172
|
+
function Kr(e, t, n) {
|
|
4756
6173
|
switch (n) {
|
|
4757
6174
|
case "top": return {
|
|
4758
|
-
top: e.y - t.height -
|
|
6175
|
+
top: e.y - t.height - Ur,
|
|
4759
6176
|
left: e.x + e.width / 2 - t.width / 2
|
|
4760
6177
|
};
|
|
4761
6178
|
case "bottom": return {
|
|
4762
|
-
top: e.y + e.height +
|
|
6179
|
+
top: e.y + e.height + Ur,
|
|
4763
6180
|
left: e.x + e.width / 2 - t.width / 2
|
|
4764
6181
|
};
|
|
4765
6182
|
case "left": return {
|
|
4766
6183
|
top: e.y + e.height / 2 - t.height / 2,
|
|
4767
|
-
left: e.x - t.width -
|
|
6184
|
+
left: e.x - t.width - Ur
|
|
4768
6185
|
};
|
|
4769
6186
|
case "right": return {
|
|
4770
6187
|
top: e.y + e.height / 2 - t.height / 2,
|
|
4771
|
-
left: e.x + e.width +
|
|
6188
|
+
left: e.x + e.width + Ur
|
|
4772
6189
|
};
|
|
4773
6190
|
}
|
|
4774
6191
|
}
|
|
4775
|
-
function
|
|
6192
|
+
function qr(e, t, n) {
|
|
4776
6193
|
let { width: r, height: i } = g.get("window"), a = [
|
|
4777
6194
|
n,
|
|
4778
6195
|
n === "top" ? "bottom" : n === "bottom" ? "top" : n === "left" ? "right" : "left",
|
|
@@ -4782,21 +6199,21 @@ function Qn(e, t, n) {
|
|
|
4782
6199
|
"right"
|
|
4783
6200
|
];
|
|
4784
6201
|
for (let n of a) {
|
|
4785
|
-
let { top: a, left: o } =
|
|
6202
|
+
let { top: a, left: o } = Kr(e, t, n), s = o >= $ && o + t.width <= r - $, c = a >= $ && a + t.height <= i - $;
|
|
4786
6203
|
if (s && c) return {
|
|
4787
6204
|
top: Math.max($, Math.min(a, i - t.height - $)),
|
|
4788
6205
|
left: Math.max($, Math.min(o, r - t.width - $)),
|
|
4789
6206
|
placement: n
|
|
4790
6207
|
};
|
|
4791
6208
|
}
|
|
4792
|
-
let { top: o, left: s } =
|
|
6209
|
+
let { top: o, left: s } = Kr(e, t, n);
|
|
4793
6210
|
return {
|
|
4794
6211
|
top: Math.max($, Math.min(o, i - t.height - $)),
|
|
4795
6212
|
left: Math.max($, Math.min(s, r - t.width - $)),
|
|
4796
6213
|
placement: n
|
|
4797
6214
|
};
|
|
4798
6215
|
}
|
|
4799
|
-
var
|
|
6216
|
+
var Jr = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panelStyle: a, children: s }) => {
|
|
4800
6217
|
let l = q(), u = J(), p = r !== void 0, [g, _] = f(!1), v = p ? r : g, [y, b] = f(null), [S, C] = f(null), [T, E] = f(null), D = d(null), O = d(new m.Value(0)).current, A = o((e) => {
|
|
4801
6218
|
p || _(e), i?.(e);
|
|
4802
6219
|
}, [p, i]), P = o(() => A(!1), [A]), F = o(() => A(!v), [v, A]);
|
|
@@ -4814,7 +6231,7 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
4814
6231
|
});
|
|
4815
6232
|
});
|
|
4816
6233
|
}, [v]), c(() => {
|
|
4817
|
-
!y || !S || E(
|
|
6234
|
+
!y || !S || E(qr(y, S, t));
|
|
4818
6235
|
}, [
|
|
4819
6236
|
y,
|
|
4820
6237
|
S,
|
|
@@ -4851,7 +6268,7 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
4851
6268
|
position: "absolute",
|
|
4852
6269
|
width: 0,
|
|
4853
6270
|
height: 0,
|
|
4854
|
-
borderWidth:
|
|
6271
|
+
borderWidth: Wr,
|
|
4855
6272
|
borderColor: "transparent"
|
|
4856
6273
|
}, R = (() => {
|
|
4857
6274
|
switch (T?.placement) {
|
|
@@ -4888,7 +6305,7 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
4888
6305
|
})(), z = s.props.ref;
|
|
4889
6306
|
return /* @__PURE__ */ N(j, { children: [n(s, {
|
|
4890
6307
|
ref: (e) => {
|
|
4891
|
-
D.current = e,
|
|
6308
|
+
D.current = e, Gr(z, e);
|
|
4892
6309
|
},
|
|
4893
6310
|
accessibilityState: {
|
|
4894
6311
|
expanded: v,
|
|
@@ -4946,7 +6363,7 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
4946
6363
|
})
|
|
4947
6364
|
})
|
|
4948
6365
|
})] });
|
|
4949
|
-
},
|
|
6366
|
+
}, Yr = i(function({ title: e, description: t, headerSuffix: n, children: r, style: i, ...a }, o) {
|
|
4950
6367
|
let s = q(), c = !!(e || t || n);
|
|
4951
6368
|
return /* @__PURE__ */ N(k, {
|
|
4952
6369
|
ref: o,
|
|
@@ -4979,8 +6396,8 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
4979
6396
|
}) : null]
|
|
4980
6397
|
}) : null, /* @__PURE__ */ M(k, { children: r })]
|
|
4981
6398
|
});
|
|
4982
|
-
}),
|
|
4983
|
-
let o = q(), s =
|
|
6399
|
+
}), Xr = ({ value: e, variant: t = "accent", accessibilityLabel: n, style: r, onLayout: i, ...a }) => {
|
|
6400
|
+
let o = q(), s = G(), l = J(), u = e == null, p = u ? void 0 : Math.min(1, Math.max(0, e)), h = p === void 0 ? void 0 : p * 100, g = d(new m.Value(p ?? 0)).current, v = d(new m.Value(0)).current, [y, b] = f(0), x = (e) => {
|
|
4984
6401
|
b(e.nativeEvent.layout.width), i?.(e);
|
|
4985
6402
|
};
|
|
4986
6403
|
c(() => {
|
|
@@ -5062,8 +6479,8 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
5062
6479
|
backgroundColor: C[t]
|
|
5063
6480
|
}, w] })
|
|
5064
6481
|
});
|
|
5065
|
-
},
|
|
5066
|
-
let o = q(), s =
|
|
6482
|
+
}, Zr = 18, Qr = 6, $r = i(function({ value: e, onSelect: t, disabled: n, style: r, ...i }, a) {
|
|
6483
|
+
let o = q(), s = G(), l = K(), u = d(new m.Value(+!!e)).current, f = d(!0);
|
|
5067
6484
|
c(() => {
|
|
5068
6485
|
if (f.current) {
|
|
5069
6486
|
f.current = !1;
|
|
@@ -5104,8 +6521,8 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
5104
6521
|
...i,
|
|
5105
6522
|
children: /* @__PURE__ */ M(m.View, {
|
|
5106
6523
|
style: {
|
|
5107
|
-
width:
|
|
5108
|
-
height:
|
|
6524
|
+
width: Zr,
|
|
6525
|
+
height: Zr,
|
|
5109
6526
|
alignItems: "center",
|
|
5110
6527
|
justifyContent: "center",
|
|
5111
6528
|
borderRadius: o.radiusPill,
|
|
@@ -5114,24 +6531,256 @@ var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
5114
6531
|
backgroundColor: g
|
|
5115
6532
|
},
|
|
5116
6533
|
children: /* @__PURE__ */ M(m.View, { style: {
|
|
5117
|
-
width:
|
|
5118
|
-
height:
|
|
6534
|
+
width: Qr,
|
|
6535
|
+
height: Qr,
|
|
5119
6536
|
borderRadius: o.radiusPill,
|
|
5120
6537
|
backgroundColor: "#fff",
|
|
5121
6538
|
opacity: u
|
|
5122
6539
|
} })
|
|
5123
6540
|
})
|
|
5124
6541
|
});
|
|
5125
|
-
});
|
|
6542
|
+
}), ei = 6, ti = 22, ni = 4;
|
|
6543
|
+
function ri(e, t, n) {
|
|
6544
|
+
return Math.min(n, Math.max(t, e));
|
|
6545
|
+
}
|
|
6546
|
+
function ii(e, t, n, r) {
|
|
6547
|
+
return parseFloat((Math.round((e - t) / n) * n + t).toFixed(r));
|
|
6548
|
+
}
|
|
6549
|
+
function ai(e) {
|
|
6550
|
+
let t = e.toString(), n = t.indexOf(".");
|
|
6551
|
+
return n === -1 ? 0 : t.length - n - 1;
|
|
6552
|
+
}
|
|
6553
|
+
var oi = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, minDistance: a = 0, disabled: s = !1, marks: c, minLabel: l = "Minimum value", maxLabel: p = "Maximum value", style: m, onLayout: h, testID: g, ..._ }) => {
|
|
6554
|
+
let v = q(), [y, b] = f(0), [x, C] = f({}), w = d(null), T = ai(i), [E, O] = e, A = ri(E, n, r), j = ri(O, n, r), P = (A - n) / (r - n) * 100, F = (j - n) / (r - n) * 100, I = o((e) => {
|
|
6555
|
+
b(e.nativeEvent.layout.width), h?.(e);
|
|
6556
|
+
}, [h]), L = o((e, o) => {
|
|
6557
|
+
let s = ii(o, n, i, T);
|
|
6558
|
+
t(e === 0 ? [ri(s, n, O - a), O] : [E, ri(s, E + a, r)]);
|
|
6559
|
+
}, [
|
|
6560
|
+
n,
|
|
6561
|
+
r,
|
|
6562
|
+
i,
|
|
6563
|
+
T,
|
|
6564
|
+
a,
|
|
6565
|
+
E,
|
|
6566
|
+
O,
|
|
6567
|
+
t
|
|
6568
|
+
]), R = o((e) => e / y * (r - n) + n, [
|
|
6569
|
+
y,
|
|
6570
|
+
n,
|
|
6571
|
+
r
|
|
6572
|
+
]), z = o((e) => {
|
|
6573
|
+
let t = R(e);
|
|
6574
|
+
return Math.abs(t - E) <= Math.abs(t - O) ? 0 : 1;
|
|
6575
|
+
}, [
|
|
6576
|
+
R,
|
|
6577
|
+
E,
|
|
6578
|
+
O
|
|
6579
|
+
]), B = u(() => S.create({
|
|
6580
|
+
onStartShouldSetPanResponder: () => !s,
|
|
6581
|
+
onMoveShouldSetPanResponder: () => !s,
|
|
6582
|
+
onPanResponderGrant: (e) => {
|
|
6583
|
+
if (y <= 0) return;
|
|
6584
|
+
let { locationX: t } = e.nativeEvent, n = z(t);
|
|
6585
|
+
w.current = n, L(n, R(t));
|
|
6586
|
+
},
|
|
6587
|
+
onPanResponderMove: (e) => {
|
|
6588
|
+
w.current === null || y <= 0 || L(w.current, R(e.nativeEvent.locationX));
|
|
6589
|
+
},
|
|
6590
|
+
onPanResponderRelease: () => {
|
|
6591
|
+
w.current = null;
|
|
6592
|
+
},
|
|
6593
|
+
onPanResponderTerminate: () => {
|
|
6594
|
+
w.current = null;
|
|
6595
|
+
}
|
|
6596
|
+
}), [
|
|
6597
|
+
s,
|
|
6598
|
+
y,
|
|
6599
|
+
z,
|
|
6600
|
+
L,
|
|
6601
|
+
R
|
|
6602
|
+
]), V = o((e) => (t) => {
|
|
6603
|
+
if (s) return;
|
|
6604
|
+
let n = e === 0 ? E : O;
|
|
6605
|
+
switch (t.nativeEvent.actionName) {
|
|
6606
|
+
case "increment":
|
|
6607
|
+
L(e, n + i);
|
|
6608
|
+
break;
|
|
6609
|
+
case "decrement":
|
|
6610
|
+
L(e, n - i);
|
|
6611
|
+
break;
|
|
6612
|
+
}
|
|
6613
|
+
}, [
|
|
6614
|
+
s,
|
|
6615
|
+
E,
|
|
6616
|
+
O,
|
|
6617
|
+
i,
|
|
6618
|
+
L
|
|
6619
|
+
]), H = c && c.length > 0, ee = H && c.some((e) => e.label), te = P / 100 * y - ti / 2, ne = F / 100 * y - ti / 2;
|
|
6620
|
+
return /* @__PURE__ */ N(k, {
|
|
6621
|
+
testID: g,
|
|
6622
|
+
style: [{
|
|
6623
|
+
width: "100%",
|
|
6624
|
+
paddingTop: 10,
|
|
6625
|
+
paddingBottom: ee ? 0 : 10
|
|
6626
|
+
}, m],
|
|
6627
|
+
..._,
|
|
6628
|
+
children: [/* @__PURE__ */ N(k, {
|
|
6629
|
+
testID: g ? `${g}-track` : void 0,
|
|
6630
|
+
onLayout: I,
|
|
6631
|
+
style: {
|
|
6632
|
+
justifyContent: "center",
|
|
6633
|
+
height: ti,
|
|
6634
|
+
opacity: s ? v.opacityDisabled : 1
|
|
6635
|
+
},
|
|
6636
|
+
...B.panHandlers,
|
|
6637
|
+
children: [
|
|
6638
|
+
/* @__PURE__ */ M(k, {
|
|
6639
|
+
pointerEvents: "none",
|
|
6640
|
+
style: {
|
|
6641
|
+
width: "100%",
|
|
6642
|
+
height: ei,
|
|
6643
|
+
borderRadius: v.radiusPill,
|
|
6644
|
+
backgroundColor: v.cardShadeColor,
|
|
6645
|
+
overflow: "hidden"
|
|
6646
|
+
},
|
|
6647
|
+
children: /* @__PURE__ */ M(k, { style: {
|
|
6648
|
+
position: "absolute",
|
|
6649
|
+
height: "100%",
|
|
6650
|
+
left: `${P}%`,
|
|
6651
|
+
width: `${F - P}%`,
|
|
6652
|
+
borderRadius: v.radiusPill,
|
|
6653
|
+
backgroundColor: v.accentBgColor
|
|
6654
|
+
} })
|
|
6655
|
+
}),
|
|
6656
|
+
/* @__PURE__ */ M(k, {
|
|
6657
|
+
pointerEvents: "none",
|
|
6658
|
+
accessible: !0,
|
|
6659
|
+
accessibilityRole: "adjustable",
|
|
6660
|
+
accessibilityLabel: l,
|
|
6661
|
+
accessibilityValue: {
|
|
6662
|
+
min: n,
|
|
6663
|
+
max: O,
|
|
6664
|
+
now: A
|
|
6665
|
+
},
|
|
6666
|
+
accessibilityState: { disabled: s },
|
|
6667
|
+
accessibilityActions: [{
|
|
6668
|
+
name: "increment",
|
|
6669
|
+
label: "increment"
|
|
6670
|
+
}, {
|
|
6671
|
+
name: "decrement",
|
|
6672
|
+
label: "decrement"
|
|
6673
|
+
}],
|
|
6674
|
+
onAccessibilityAction: V(0),
|
|
6675
|
+
style: {
|
|
6676
|
+
position: "absolute",
|
|
6677
|
+
left: te,
|
|
6678
|
+
width: ti,
|
|
6679
|
+
height: ti,
|
|
6680
|
+
borderRadius: v.radiusPill,
|
|
6681
|
+
backgroundColor: v.accentBgColor,
|
|
6682
|
+
borderWidth: 2,
|
|
6683
|
+
borderColor: v.windowBgColor,
|
|
6684
|
+
shadowColor: "#000",
|
|
6685
|
+
shadowOffset: {
|
|
6686
|
+
width: 0,
|
|
6687
|
+
height: 1
|
|
6688
|
+
},
|
|
6689
|
+
shadowOpacity: .25,
|
|
6690
|
+
shadowRadius: 3,
|
|
6691
|
+
elevation: 3
|
|
6692
|
+
}
|
|
6693
|
+
}),
|
|
6694
|
+
/* @__PURE__ */ M(k, {
|
|
6695
|
+
pointerEvents: "none",
|
|
6696
|
+
accessible: !0,
|
|
6697
|
+
accessibilityRole: "adjustable",
|
|
6698
|
+
accessibilityLabel: p,
|
|
6699
|
+
accessibilityValue: {
|
|
6700
|
+
min: E,
|
|
6701
|
+
max: r,
|
|
6702
|
+
now: j
|
|
6703
|
+
},
|
|
6704
|
+
accessibilityState: { disabled: s },
|
|
6705
|
+
accessibilityActions: [{
|
|
6706
|
+
name: "increment",
|
|
6707
|
+
label: "increment"
|
|
6708
|
+
}, {
|
|
6709
|
+
name: "decrement",
|
|
6710
|
+
label: "decrement"
|
|
6711
|
+
}],
|
|
6712
|
+
onAccessibilityAction: V(1),
|
|
6713
|
+
style: {
|
|
6714
|
+
position: "absolute",
|
|
6715
|
+
left: ne,
|
|
6716
|
+
width: ti,
|
|
6717
|
+
height: ti,
|
|
6718
|
+
borderRadius: v.radiusPill,
|
|
6719
|
+
backgroundColor: v.accentBgColor,
|
|
6720
|
+
borderWidth: 2,
|
|
6721
|
+
borderColor: v.windowBgColor,
|
|
6722
|
+
shadowColor: "#000",
|
|
6723
|
+
shadowOffset: {
|
|
6724
|
+
width: 0,
|
|
6725
|
+
height: 1
|
|
6726
|
+
},
|
|
6727
|
+
shadowOpacity: .25,
|
|
6728
|
+
shadowRadius: 3,
|
|
6729
|
+
elevation: 3
|
|
6730
|
+
}
|
|
6731
|
+
}),
|
|
6732
|
+
H && c.map((e) => /* @__PURE__ */ M(k, {
|
|
6733
|
+
pointerEvents: "none",
|
|
6734
|
+
importantForAccessibility: "no",
|
|
6735
|
+
style: {
|
|
6736
|
+
position: "absolute",
|
|
6737
|
+
left: (ri(e.value, n, r) - n) / (r - n) * 100 / 100 * y - ni / 2,
|
|
6738
|
+
width: ni,
|
|
6739
|
+
height: ni,
|
|
6740
|
+
borderRadius: ni / 2,
|
|
6741
|
+
backgroundColor: v.windowBgColor
|
|
6742
|
+
}
|
|
6743
|
+
}, e.value))
|
|
6744
|
+
]
|
|
6745
|
+
}), ee && /* @__PURE__ */ M(k, {
|
|
6746
|
+
importantForAccessibility: "no",
|
|
6747
|
+
style: {
|
|
6748
|
+
position: "relative",
|
|
6749
|
+
width: "100%",
|
|
6750
|
+
height: 20,
|
|
6751
|
+
marginTop: 6
|
|
6752
|
+
},
|
|
6753
|
+
children: c.map((e) => /* @__PURE__ */ M(D, {
|
|
6754
|
+
numberOfLines: 1,
|
|
6755
|
+
onLayout: (t) => {
|
|
6756
|
+
let { layout: { width: n } } = t.nativeEvent;
|
|
6757
|
+
C((t) => t[e.value] === n ? t : {
|
|
6758
|
+
...t,
|
|
6759
|
+
[e.value]: n
|
|
6760
|
+
});
|
|
6761
|
+
},
|
|
6762
|
+
style: {
|
|
6763
|
+
position: "absolute",
|
|
6764
|
+
left: (ri(e.value, n, r) - n) / (r - n) * 100 / 100 * y - (x[e.value] ?? 0) / 2,
|
|
6765
|
+
fontFamily: v.fontFamily,
|
|
6766
|
+
fontSize: v.fontSizeCaption,
|
|
6767
|
+
color: v.windowFgColor,
|
|
6768
|
+
opacity: v.opacityDim
|
|
6769
|
+
},
|
|
6770
|
+
children: e.label
|
|
6771
|
+
}, e.value))
|
|
6772
|
+
})]
|
|
6773
|
+
});
|
|
6774
|
+
};
|
|
5126
6775
|
//#endregion
|
|
5127
6776
|
//#region src/components/SearchBar/SearchBar.tsx
|
|
5128
|
-
function
|
|
6777
|
+
function si(e, t) {
|
|
5129
6778
|
let n = e.match(/^rgba?\(([^,]+),([^,]+),([^,]+),?([^)]+)?\)$/);
|
|
5130
6779
|
if (!n) return e;
|
|
5131
6780
|
let [, r, i, a, o] = n, s = (o ? Number.parseFloat(o) : 1) * t;
|
|
5132
6781
|
return `rgba(${r.trim()}, ${i.trim()}, ${a.trim()}, ${s})`;
|
|
5133
6782
|
}
|
|
5134
|
-
var
|
|
6783
|
+
var ci = i(function({ open: e, onClose: t, onClear: n, children: r, value: i, placeholder: a = "Search…", editable: o = !0, inline: s = !1, closeLabel: u = "Cancel", style: f, inputStyle: p, ...m }, h) {
|
|
5135
6784
|
let g = q(), _ = d(null);
|
|
5136
6785
|
if (l(h, () => _.current, []), c(() => {
|
|
5137
6786
|
if (!e) return;
|
|
@@ -5175,7 +6824,7 @@ var or = i(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
5175
6824
|
editable: o,
|
|
5176
6825
|
value: i,
|
|
5177
6826
|
placeholder: a,
|
|
5178
|
-
placeholderTextColor:
|
|
6827
|
+
placeholderTextColor: si(g.windowFgColor, g.opacityDim),
|
|
5179
6828
|
style: [{
|
|
5180
6829
|
flex: 1,
|
|
5181
6830
|
padding: 0,
|
|
@@ -5240,9 +6889,9 @@ var or = i(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
5240
6889
|
children: r
|
|
5241
6890
|
})]
|
|
5242
6891
|
});
|
|
5243
|
-
}),
|
|
5244
|
-
function
|
|
5245
|
-
switch (t %
|
|
6892
|
+
}), li = 8;
|
|
6893
|
+
function ui(e, t) {
|
|
6894
|
+
switch (t % li) {
|
|
5246
6895
|
case 0: return e.blue3;
|
|
5247
6896
|
case 1: return e.green3;
|
|
5248
6897
|
case 2: return e.purple3;
|
|
@@ -5253,8 +6902,8 @@ function cr(e, t) {
|
|
|
5253
6902
|
default: return e.green5;
|
|
5254
6903
|
}
|
|
5255
6904
|
}
|
|
5256
|
-
var
|
|
5257
|
-
let i = q(), a =
|
|
6905
|
+
var di = ({ values: e, accessibilityLabel: t, style: n, testID: r }) => {
|
|
6906
|
+
let i = q(), a = G(), [o, s] = f(null), c = e.reduce((e, t) => e + t.value, 0) || 100, l = e.map((e) => `${e.label} ${e.value}%`).join(", "), u = a === "dark" ? i.dark2 : i.light3;
|
|
5258
6907
|
return /* @__PURE__ */ M(k, {
|
|
5259
6908
|
testID: r,
|
|
5260
6909
|
accessible: !0,
|
|
@@ -5271,7 +6920,7 @@ var lr = ({ values: e, accessibilityLabel: t, style: n, testID: r }) => {
|
|
|
5271
6920
|
}, n],
|
|
5272
6921
|
children: e.map((e, t) => {
|
|
5273
6922
|
let n = `${e.value / c * 100}%`, r = e.value % 1 == 0 ? e.value : e.value.toFixed(1);
|
|
5274
|
-
return /* @__PURE__ */ M(
|
|
6923
|
+
return /* @__PURE__ */ M(Rn, {
|
|
5275
6924
|
label: `${e.label}: ${r}%`,
|
|
5276
6925
|
placement: "top",
|
|
5277
6926
|
delay: 200,
|
|
@@ -5282,7 +6931,7 @@ var lr = ({ values: e, accessibilityLabel: t, style: n, testID: r }) => {
|
|
|
5282
6931
|
style: {
|
|
5283
6932
|
width: n,
|
|
5284
6933
|
height: "100%",
|
|
5285
|
-
backgroundColor: e.color ??
|
|
6934
|
+
backgroundColor: e.color ?? ui(i, t),
|
|
5286
6935
|
opacity: o !== null && o !== t ? .35 : 1
|
|
5287
6936
|
}
|
|
5288
6937
|
})
|
|
@@ -5292,30 +6941,30 @@ var lr = ({ values: e, accessibilityLabel: t, style: n, testID: r }) => {
|
|
|
5292
6941
|
};
|
|
5293
6942
|
//#endregion
|
|
5294
6943
|
//#region src/components/Sidebar/filterUtils.ts
|
|
5295
|
-
function
|
|
6944
|
+
function fi(t, n) {
|
|
5296
6945
|
let r = 0;
|
|
5297
6946
|
return e.forEach(t, (e) => {
|
|
5298
6947
|
if (!a(e)) return;
|
|
5299
6948
|
let t = e.props;
|
|
5300
|
-
typeof t.label == "string" ? t.label.toLowerCase().includes(n.toLowerCase()) && r++ : t.children && (r +=
|
|
6949
|
+
typeof t.label == "string" ? t.label.toLowerCase().includes(n.toLowerCase()) && r++ : t.children && (r += fi(t.children, n));
|
|
5301
6950
|
}), r;
|
|
5302
6951
|
}
|
|
5303
|
-
function
|
|
6952
|
+
function pi(e, t) {
|
|
5304
6953
|
if (!t || !a(e)) return !0;
|
|
5305
6954
|
let n = e.props;
|
|
5306
|
-
return typeof n.label == "string" ? n.label.toLowerCase().includes(t.toLowerCase()) : n.children ?
|
|
6955
|
+
return typeof n.label == "string" ? n.label.toLowerCase().includes(t.toLowerCase()) : n.children ? fi(n.children, t) > 0 : !0;
|
|
5307
6956
|
}
|
|
5308
6957
|
//#endregion
|
|
5309
6958
|
//#region src/components/Sidebar/Sidebar.tsx
|
|
5310
|
-
var
|
|
5311
|
-
function
|
|
5312
|
-
return s(
|
|
6959
|
+
var mi = r(!1);
|
|
6960
|
+
function hi() {
|
|
6961
|
+
return s(mi);
|
|
5313
6962
|
}
|
|
5314
|
-
var
|
|
5315
|
-
let c = q(), l = i.length > 0, u = e.toArray(n).filter(Boolean).filter((e) =>
|
|
5316
|
-
return /* @__PURE__ */ M(
|
|
6963
|
+
var gi = r(""), _i = i(function({ children: n, collapsed: r = !1, filter: i = "", style: a, ...o }, s) {
|
|
6964
|
+
let c = q(), l = i.length > 0, u = e.toArray(n).filter(Boolean).filter((e) => pi(e, i)), d = !l || u.length > 0;
|
|
6965
|
+
return /* @__PURE__ */ M(mi.Provider, {
|
|
5317
6966
|
value: r,
|
|
5318
|
-
children: /* @__PURE__ */ M(
|
|
6967
|
+
children: /* @__PURE__ */ M(gi.Provider, {
|
|
5319
6968
|
value: i,
|
|
5320
6969
|
children: /* @__PURE__ */ M(k, {
|
|
5321
6970
|
ref: s,
|
|
@@ -5337,7 +6986,7 @@ var mr = r(""), hr = i(function({ children: n, collapsed: r = !1, filter: i = ""
|
|
|
5337
6986
|
padding: c.space4
|
|
5338
6987
|
},
|
|
5339
6988
|
children: "No items match your search."
|
|
5340
|
-
}) : u.map((e, n) => /* @__PURE__ */ N(t, { children: [n > 0 && /* @__PURE__ */ M(
|
|
6989
|
+
}) : u.map((e, n) => /* @__PURE__ */ N(t, { children: [n > 0 && /* @__PURE__ */ M(zt, {
|
|
5341
6990
|
testID: "sidebar-separator",
|
|
5342
6991
|
style: { marginVertical: c.space1 }
|
|
5343
6992
|
}), e] }, n))
|
|
@@ -5345,8 +6994,8 @@ var mr = r(""), hr = i(function({ children: n, collapsed: r = !1, filter: i = ""
|
|
|
5345
6994
|
})
|
|
5346
6995
|
})
|
|
5347
6996
|
});
|
|
5348
|
-
}),
|
|
5349
|
-
let l = q(), u =
|
|
6997
|
+
}), vi = i(function({ label: e, icon: t, active: n = !1, suffix: r, disabled: i, style: a, ...o }, c) {
|
|
6998
|
+
let l = q(), u = hi(), d = s(gi);
|
|
5350
6999
|
return d.length > 0 && !e.toLowerCase().includes(d.toLowerCase()) ? null : /* @__PURE__ */ N(w, {
|
|
5351
7000
|
ref: c,
|
|
5352
7001
|
disabled: i,
|
|
@@ -5399,15 +7048,15 @@ var mr = r(""), hr = i(function({ children: n, collapsed: r = !1, filter: i = ""
|
|
|
5399
7048
|
})
|
|
5400
7049
|
]
|
|
5401
7050
|
});
|
|
5402
|
-
}),
|
|
5403
|
-
let p = q(), [m, h] = f(r), g = i !== void 0, _ = g ? i : m, v =
|
|
7051
|
+
}), yi = i(function({ title: e, icon: t, collapsible: n = !1, defaultOpen: r = !0, open: i, onOpenChange: a, children: o, style: c, ...u }, d) {
|
|
7052
|
+
let p = q(), [m, h] = f(r), g = i !== void 0, _ = g ? i : m, v = hi(), y = s(gi), b = (e) => {
|
|
5404
7053
|
g || h(e), a?.(e);
|
|
5405
7054
|
};
|
|
5406
7055
|
if (l(d, () => ({
|
|
5407
7056
|
expand: () => b(!0),
|
|
5408
7057
|
collapse: () => b(!1),
|
|
5409
7058
|
toggle: () => b(!_)
|
|
5410
|
-
})), !(y.length === 0 ||
|
|
7059
|
+
})), !(y.length === 0 || fi(o, y) > 0)) return null;
|
|
5411
7060
|
let x = v ? !0 : _, S = !v && !!(e || t), C = (e || t) && /* @__PURE__ */ N(k, {
|
|
5412
7061
|
style: {
|
|
5413
7062
|
flexDirection: "row",
|
|
@@ -5460,7 +7109,7 @@ var mr = r(""), hr = i(function({ children: n, collapsed: r = !1, filter: i = ""
|
|
|
5460
7109
|
children: o
|
|
5461
7110
|
})]
|
|
5462
7111
|
});
|
|
5463
|
-
}),
|
|
7112
|
+
}), bi = ({ variant: e = "rect", width: t = "100%", height: n = 16, size: r = 40, lines: i = 3, animated: a = !0, style: o, ...s }) => {
|
|
5464
7113
|
let l = q(), u = J(), f = d(new m.Value(1)).current, p = a && !u;
|
|
5465
7114
|
if (c(() => {
|
|
5466
7115
|
if (!p) {
|
|
@@ -5519,22 +7168,22 @@ var mr = r(""), hr = i(function({ children: n, collapsed: r = !1, filter: i = ""
|
|
|
5519
7168
|
],
|
|
5520
7169
|
...s
|
|
5521
7170
|
});
|
|
5522
|
-
},
|
|
5523
|
-
function
|
|
7171
|
+
}, xi = 6, Si = 22, Ci = 4;
|
|
7172
|
+
function wi(e, t, n) {
|
|
5524
7173
|
return Math.min(n, Math.max(t, e));
|
|
5525
7174
|
}
|
|
5526
|
-
function
|
|
7175
|
+
function Ti(e, t, n, r) {
|
|
5527
7176
|
return parseFloat((Math.round((e - t) / n) * n + t).toFixed(r));
|
|
5528
7177
|
}
|
|
5529
|
-
function
|
|
7178
|
+
function Ei(e) {
|
|
5530
7179
|
let t = e.toString(), n = t.indexOf(".");
|
|
5531
7180
|
return n === -1 ? 0 : t.length - n - 1;
|
|
5532
7181
|
}
|
|
5533
|
-
var
|
|
5534
|
-
let m = q(), [h, g] = f(0), [_, v] = f({}), y =
|
|
7182
|
+
var Di = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabled: a = !1, marks: s, accessibilityLabel: c, style: l, onLayout: d, ...p }) => {
|
|
7183
|
+
let m = q(), [h, g] = f(0), [_, v] = f({}), y = Ei(i), b = wi(e, n, r), x = (b - n) / (r - n) * 100, C = o((e) => {
|
|
5535
7184
|
g(e.nativeEvent.layout.width), d?.(e);
|
|
5536
7185
|
}, [d]), w = o((e) => {
|
|
5537
|
-
a || h <= 0 || t(
|
|
7186
|
+
a || h <= 0 || t(wi(Ti(e / h * (r - n) + n, n, i, y), n, r));
|
|
5538
7187
|
}, [
|
|
5539
7188
|
a,
|
|
5540
7189
|
h,
|
|
@@ -5551,10 +7200,10 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5551
7200
|
}), [a, w]), E = o((o) => {
|
|
5552
7201
|
if (!a) switch (o.nativeEvent.actionName) {
|
|
5553
7202
|
case "increment":
|
|
5554
|
-
t(
|
|
7203
|
+
t(wi(Ti(e + i, n, i, y), n, r));
|
|
5555
7204
|
break;
|
|
5556
7205
|
case "decrement":
|
|
5557
|
-
t(
|
|
7206
|
+
t(wi(Ti(e - i, n, i, y), n, r));
|
|
5558
7207
|
break;
|
|
5559
7208
|
}
|
|
5560
7209
|
}, [
|
|
@@ -5565,7 +7214,7 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5565
7214
|
r,
|
|
5566
7215
|
y,
|
|
5567
7216
|
t
|
|
5568
|
-
]), O = s && s.length > 0, A = O && s.some((e) => e.label), j = x / 100 * h -
|
|
7217
|
+
]), O = s && s.length > 0, A = O && s.some((e) => e.label), j = x / 100 * h - Si / 2;
|
|
5569
7218
|
return /* @__PURE__ */ N(k, {
|
|
5570
7219
|
style: [{
|
|
5571
7220
|
width: "100%",
|
|
@@ -5594,7 +7243,7 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5594
7243
|
onAccessibilityAction: E,
|
|
5595
7244
|
style: {
|
|
5596
7245
|
justifyContent: "center",
|
|
5597
|
-
height:
|
|
7246
|
+
height: Si,
|
|
5598
7247
|
opacity: a ? m.opacityDisabled : 1
|
|
5599
7248
|
},
|
|
5600
7249
|
...T.panHandlers,
|
|
@@ -5603,7 +7252,7 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5603
7252
|
pointerEvents: "none",
|
|
5604
7253
|
style: {
|
|
5605
7254
|
width: "100%",
|
|
5606
|
-
height:
|
|
7255
|
+
height: xi,
|
|
5607
7256
|
borderRadius: m.radiusPill,
|
|
5608
7257
|
backgroundColor: m.cardShadeColor,
|
|
5609
7258
|
overflow: "hidden"
|
|
@@ -5620,8 +7269,8 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5620
7269
|
style: {
|
|
5621
7270
|
position: "absolute",
|
|
5622
7271
|
left: j,
|
|
5623
|
-
width:
|
|
5624
|
-
height:
|
|
7272
|
+
width: Si,
|
|
7273
|
+
height: Si,
|
|
5625
7274
|
borderRadius: m.radiusPill,
|
|
5626
7275
|
backgroundColor: m.accentBgColor,
|
|
5627
7276
|
borderWidth: 2,
|
|
@@ -5641,10 +7290,10 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5641
7290
|
importantForAccessibility: "no",
|
|
5642
7291
|
style: {
|
|
5643
7292
|
position: "absolute",
|
|
5644
|
-
left: (
|
|
5645
|
-
width:
|
|
5646
|
-
height:
|
|
5647
|
-
borderRadius:
|
|
7293
|
+
left: (wi(e.value, n, r) - n) / (r - n) * 100 / 100 * h - Ci / 2,
|
|
7294
|
+
width: Ci,
|
|
7295
|
+
height: Ci,
|
|
7296
|
+
borderRadius: Ci / 2,
|
|
5648
7297
|
backgroundColor: m.windowBgColor
|
|
5649
7298
|
}
|
|
5650
7299
|
}, e.value))
|
|
@@ -5668,7 +7317,7 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5668
7317
|
},
|
|
5669
7318
|
style: {
|
|
5670
7319
|
position: "absolute",
|
|
5671
|
-
left: (
|
|
7320
|
+
left: (wi(e.value, n, r) - n) / (r - n) * 100 / 100 * h - (_[e.value] ?? 0) / 2,
|
|
5672
7321
|
fontFamily: m.fontFamily,
|
|
5673
7322
|
fontSize: m.fontSizeCaption,
|
|
5674
7323
|
color: m.windowFgColor,
|
|
@@ -5678,21 +7327,21 @@ var Tr = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
5678
7327
|
}, e.value))
|
|
5679
7328
|
})]
|
|
5680
7329
|
});
|
|
5681
|
-
},
|
|
5682
|
-
function
|
|
7330
|
+
}, Oi = 36;
|
|
7331
|
+
function ki(e) {
|
|
5683
7332
|
let t = e.toString(), n = t.indexOf(".");
|
|
5684
7333
|
return n === -1 ? 0 : t.length - n - 1;
|
|
5685
7334
|
}
|
|
5686
|
-
function
|
|
7335
|
+
function Ai(e, t, n) {
|
|
5687
7336
|
return Math.min(n, Math.max(t, e));
|
|
5688
7337
|
}
|
|
5689
|
-
function
|
|
7338
|
+
function ji(e, t, n, r) {
|
|
5690
7339
|
let i = n - t + r;
|
|
5691
7340
|
return ((e - t) % i + i) % i + t;
|
|
5692
7341
|
}
|
|
5693
|
-
var
|
|
5694
|
-
let f = q(), p = a ??
|
|
5695
|
-
let a = s ?
|
|
7342
|
+
var Mi = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decimals: a, wrap: s = !1, format: c, disabled: l = !1, accessibilityLabel: u, style: d }) => {
|
|
7343
|
+
let f = q(), p = a ?? ki(i), m = o((e) => {
|
|
7344
|
+
let a = s ? ji(e, n, r, i) : Ai(e, n, r);
|
|
5696
7345
|
t(parseFloat(a.toFixed(p)));
|
|
5697
7346
|
}, [
|
|
5698
7347
|
t,
|
|
@@ -5753,8 +7402,8 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5753
7402
|
disabled: _,
|
|
5754
7403
|
onPress: () => m(e - i),
|
|
5755
7404
|
style: ({ pressed: e }) => ({
|
|
5756
|
-
width:
|
|
5757
|
-
height:
|
|
7405
|
+
width: Oi,
|
|
7406
|
+
height: Oi,
|
|
5758
7407
|
alignItems: "center",
|
|
5759
7408
|
justifyContent: "center",
|
|
5760
7409
|
borderRightWidth: 1,
|
|
@@ -5791,8 +7440,8 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5791
7440
|
disabled: v,
|
|
5792
7441
|
onPress: () => m(e + i),
|
|
5793
7442
|
style: ({ pressed: e }) => ({
|
|
5794
|
-
width:
|
|
5795
|
-
height:
|
|
7443
|
+
width: Oi,
|
|
7444
|
+
height: Oi,
|
|
5796
7445
|
alignItems: "center",
|
|
5797
7446
|
justifyContent: "center",
|
|
5798
7447
|
borderLeftWidth: 1,
|
|
@@ -5811,7 +7460,7 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5811
7460
|
})
|
|
5812
7461
|
]
|
|
5813
7462
|
});
|
|
5814
|
-
},
|
|
7463
|
+
}, Ni = {
|
|
5815
7464
|
sm: {
|
|
5816
7465
|
dimension: 16,
|
|
5817
7466
|
borderWidth: 2
|
|
@@ -5824,8 +7473,8 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5824
7473
|
dimension: 36,
|
|
5825
7474
|
borderWidth: 3
|
|
5826
7475
|
}
|
|
5827
|
-
},
|
|
5828
|
-
let i = q(), a =
|
|
7476
|
+
}, Pi = ({ size: e = "md", label: t = "Loading…", style: n, ...r }) => {
|
|
7477
|
+
let i = q(), a = G(), o = J(), s = d(new m.Value(0)).current;
|
|
5829
7478
|
c(() => {
|
|
5830
7479
|
s.setValue(0);
|
|
5831
7480
|
let e = m.loop(m.timing(s, {
|
|
@@ -5839,7 +7488,7 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5839
7488
|
let l = s.interpolate({
|
|
5840
7489
|
inputRange: [0, 1],
|
|
5841
7490
|
outputRange: ["0deg", "360deg"]
|
|
5842
|
-
}), { dimension: u, borderWidth: f } =
|
|
7491
|
+
}), { dimension: u, borderWidth: f } = Ni[e], p = a === "dark" ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.15)";
|
|
5843
7492
|
return /* @__PURE__ */ M(m.View, {
|
|
5844
7493
|
accessible: !0,
|
|
5845
7494
|
accessibilityRole: "progressbar",
|
|
@@ -5857,35 +7506,62 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5857
7506
|
}, n],
|
|
5858
7507
|
...r
|
|
5859
7508
|
});
|
|
5860
|
-
}
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
}
|
|
7509
|
+
};
|
|
7510
|
+
//#endregion
|
|
7511
|
+
//#region src/components/StatusBadge/StatusBadge.tsx
|
|
7512
|
+
function Fi(e, t) {
|
|
7513
|
+
switch (t) {
|
|
7514
|
+
case "success": return {
|
|
7515
|
+
backgroundColor: e.successBgColor,
|
|
7516
|
+
color: e.successFgColor
|
|
7517
|
+
};
|
|
7518
|
+
case "warning": return {
|
|
7519
|
+
backgroundColor: e.warningBgColor,
|
|
7520
|
+
color: e.warningFgColor
|
|
7521
|
+
};
|
|
7522
|
+
case "error": return {
|
|
7523
|
+
backgroundColor: e.errorBgColor,
|
|
7524
|
+
color: e.errorFgColor
|
|
7525
|
+
};
|
|
7526
|
+
case "new": return {
|
|
7527
|
+
backgroundColor: e.newBgColor,
|
|
7528
|
+
color: e.newFgColor
|
|
7529
|
+
};
|
|
7530
|
+
case "accent": return {
|
|
7531
|
+
backgroundColor: e.accentBgColor,
|
|
7532
|
+
color: e.accentFgColor
|
|
7533
|
+
};
|
|
7534
|
+
case "neutral": return {
|
|
7535
|
+
backgroundColor: e.hoverOverlay,
|
|
7536
|
+
color: e.windowFgColor
|
|
7537
|
+
};
|
|
7538
|
+
}
|
|
7539
|
+
}
|
|
7540
|
+
var Ii = ({ variant: e = "neutral", children: t, style: n, ...r }) => {
|
|
7541
|
+
let i = q(), { backgroundColor: a, color: o } = Fi(i, e);
|
|
5873
7542
|
return /* @__PURE__ */ M(k, {
|
|
5874
|
-
ref: c,
|
|
5875
7543
|
style: [{
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
7544
|
+
alignSelf: "flex-start",
|
|
7545
|
+
paddingVertical: 2,
|
|
7546
|
+
paddingHorizontal: 8,
|
|
7547
|
+
borderRadius: i.radiusPill,
|
|
7548
|
+
backgroundColor: a
|
|
7549
|
+
}, n],
|
|
7550
|
+
...r,
|
|
7551
|
+
children: typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ M(D, {
|
|
7552
|
+
style: {
|
|
7553
|
+
fontFamily: i.fontFamily,
|
|
7554
|
+
fontWeight: String(i.fontWeightSemibold),
|
|
7555
|
+
fontSize: 11,
|
|
7556
|
+
lineHeight: 15,
|
|
7557
|
+
letterSpacing: .22,
|
|
7558
|
+
color: o
|
|
7559
|
+
},
|
|
7560
|
+
children: t
|
|
7561
|
+
}) : t
|
|
5886
7562
|
});
|
|
5887
|
-
}
|
|
5888
|
-
let l = q(), u =
|
|
7563
|
+
}, Li = (e) => Math.round(36 * .5 * e), Ri = i(function({ icon: e, iconNode: t, title: n, description: r, children: i, compact: a = !1, style: o, ...s }, c) {
|
|
7564
|
+
let l = q(), u = G(), d = a ? 64 : 128, f = e ? /* @__PURE__ */ M(X, {
|
|
5889
7565
|
icon: e,
|
|
5890
7566
|
width: d,
|
|
5891
7567
|
height: d
|
|
@@ -5922,12 +7598,12 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5922
7598
|
color: "dim",
|
|
5923
7599
|
style: {
|
|
5924
7600
|
textAlign: "center",
|
|
5925
|
-
maxWidth:
|
|
7601
|
+
maxWidth: Li(p),
|
|
5926
7602
|
marginTop: a ? l.space1 : l.space2
|
|
5927
7603
|
},
|
|
5928
7604
|
children: r
|
|
5929
7605
|
}) : null,
|
|
5930
|
-
i ? /* @__PURE__ */ M(
|
|
7606
|
+
i ? /* @__PURE__ */ M(vn, {
|
|
5931
7607
|
justify: "center",
|
|
5932
7608
|
childSpacing: a ? l.space1 : l.space2,
|
|
5933
7609
|
style: { marginTop: a ? l.space2 : l.space4 },
|
|
@@ -5935,8 +7611,8 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5935
7611
|
}) : null
|
|
5936
7612
|
]
|
|
5937
7613
|
});
|
|
5938
|
-
}),
|
|
5939
|
-
let o = q(), s =
|
|
7614
|
+
}), zi = 56, Bi = 28, Vi = 20, Hi = 3, Ui = 28, Wi = i(function({ value: e, onValueChange: t, disabled: n, style: r, ...i }, a) {
|
|
7615
|
+
let o = q(), s = G(), l = K(), u = d(new m.Value(+!!e)).current, f = d(!0);
|
|
5940
7616
|
c(() => {
|
|
5941
7617
|
if (f.current) {
|
|
5942
7618
|
f.current = !1;
|
|
@@ -5975,8 +7651,8 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5975
7651
|
...i,
|
|
5976
7652
|
children: /* @__PURE__ */ M(m.View, {
|
|
5977
7653
|
style: {
|
|
5978
|
-
width:
|
|
5979
|
-
height:
|
|
7654
|
+
width: zi,
|
|
7655
|
+
height: Bi,
|
|
5980
7656
|
borderRadius: o.radiusPill,
|
|
5981
7657
|
borderWidth: l === "more" ? 2 : 1,
|
|
5982
7658
|
borderColor: v,
|
|
@@ -5984,15 +7660,15 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
5984
7660
|
},
|
|
5985
7661
|
children: /* @__PURE__ */ M(m.View, { style: [{
|
|
5986
7662
|
position: "absolute",
|
|
5987
|
-
top:
|
|
5988
|
-
left:
|
|
5989
|
-
width:
|
|
5990
|
-
height:
|
|
7663
|
+
top: Hi,
|
|
7664
|
+
left: Hi,
|
|
7665
|
+
width: Vi,
|
|
7666
|
+
height: Vi,
|
|
5991
7667
|
borderRadius: o.radiusPill,
|
|
5992
7668
|
backgroundColor: e ? "#fff" : h,
|
|
5993
7669
|
transform: [{ translateX: u.interpolate({
|
|
5994
7670
|
inputRange: [0, 1],
|
|
5995
|
-
outputRange: [0,
|
|
7671
|
+
outputRange: [0, Ui]
|
|
5996
7672
|
}) }]
|
|
5997
7673
|
}, l !== "more" && {
|
|
5998
7674
|
shadowColor: "#000",
|
|
@@ -6006,7 +7682,7 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
6006
7682
|
}] })
|
|
6007
7683
|
})
|
|
6008
7684
|
});
|
|
6009
|
-
}),
|
|
7685
|
+
}), Gi = i(function({ children: e, inline: t = !1, accessibilityLabel: n = "Tabs", style: r, ...i }, a) {
|
|
6010
7686
|
let o = q();
|
|
6011
7687
|
return /* @__PURE__ */ M(T, {
|
|
6012
7688
|
ref: a,
|
|
@@ -6032,7 +7708,7 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
6032
7708
|
...i,
|
|
6033
7709
|
children: e
|
|
6034
7710
|
});
|
|
6035
|
-
}),
|
|
7711
|
+
}), Ki = i(function({ label: e, icon: t, active: n = !1, onClose: r, closeLabel: i = "Close tab", count: a, disabled: o, ...s }, c) {
|
|
6036
7712
|
let l = q();
|
|
6037
7713
|
return /* @__PURE__ */ N(w, {
|
|
6038
7714
|
ref: c,
|
|
@@ -6132,7 +7808,7 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
6132
7808
|
})
|
|
6133
7809
|
]
|
|
6134
7810
|
});
|
|
6135
|
-
}),
|
|
7811
|
+
}), qi = i(function({ active: e = !1, style: t, children: n, ...r }, i) {
|
|
6136
7812
|
return /* @__PURE__ */ M(k, {
|
|
6137
7813
|
ref: i,
|
|
6138
7814
|
style: [{ display: e ? "flex" : "none" }, t],
|
|
@@ -6142,14 +7818,14 @@ var Ar = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
6142
7818
|
});
|
|
6143
7819
|
//#endregion
|
|
6144
7820
|
//#region src/components/TextField/TextField.tsx
|
|
6145
|
-
function
|
|
7821
|
+
function Ji(e, t) {
|
|
6146
7822
|
let n = e.match(/^rgba?\(([^,]+),([^,]+),([^,]+),?([^)]+)?\)$/);
|
|
6147
7823
|
if (!n) return e;
|
|
6148
7824
|
let [, r, i, a, o] = n, s = (o ? Number.parseFloat(o) : 1) * t;
|
|
6149
7825
|
return `rgba(${r.trim()}, ${i.trim()}, ${a.trim()}, ${s})`;
|
|
6150
7826
|
}
|
|
6151
|
-
var
|
|
6152
|
-
let p = q(), m =
|
|
7827
|
+
var Yi = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i, editable: a = !0, onFocus: o, onBlur: s, accessibilityLabel: c, accessibilityHint: l, ...u }, d) {
|
|
7828
|
+
let p = q(), m = K(), [h, g] = f(!1), _ = !a, v = n ?? t, y = n ? p.errorColor : h ? p.accentColor : p.borderSubtle;
|
|
6153
7829
|
return /* @__PURE__ */ N(k, {
|
|
6154
7830
|
style: [{
|
|
6155
7831
|
gap: p.space1,
|
|
@@ -6166,7 +7842,7 @@ var Jr = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
6166
7842
|
editable: a,
|
|
6167
7843
|
accessibilityLabel: c ?? e,
|
|
6168
7844
|
accessibilityHint: l ?? v,
|
|
6169
|
-
placeholderTextColor:
|
|
7845
|
+
placeholderTextColor: Ji(p.windowFgColor, p.opacityDim),
|
|
6170
7846
|
onFocus: (e) => {
|
|
6171
7847
|
g(!0), o?.(e);
|
|
6172
7848
|
},
|
|
@@ -6198,8 +7874,8 @@ var Jr = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
6198
7874
|
})
|
|
6199
7875
|
]
|
|
6200
7876
|
});
|
|
6201
|
-
}),
|
|
6202
|
-
let u = q(), f =
|
|
7877
|
+
}), Xi = m.createAnimatedComponent(w), Zi = ({ title: e, duration: t = 3e3, onDismiss: n, actionLabel: r, onAction: i, dismissible: a = !1, style: s, ...l }) => {
|
|
7878
|
+
let u = q(), f = G(), p = J(), h = d(null), g = d(t), v = d(0), y = d(new m.Value(+!!p)).current, b = o(() => {
|
|
6203
7879
|
h.current &&= (clearTimeout(h.current), null);
|
|
6204
7880
|
}, []), x = o((e) => {
|
|
6205
7881
|
e <= 0 || !n || (b(), v.current = Date.now(), h.current = setTimeout(() => n(), e));
|
|
@@ -6244,7 +7920,7 @@ var Jr = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
6244
7920
|
shadowRadius: 8,
|
|
6245
7921
|
elevation: 4
|
|
6246
7922
|
};
|
|
6247
|
-
return /* @__PURE__ */ N(
|
|
7923
|
+
return /* @__PURE__ */ N(Xi, {
|
|
6248
7924
|
accessible: !0,
|
|
6249
7925
|
accessibilityRole: "alert",
|
|
6250
7926
|
accessibilityLiveRegion: "polite",
|
|
@@ -6330,7 +8006,7 @@ var Jr = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
6330
8006
|
})
|
|
6331
8007
|
})] })]
|
|
6332
8008
|
});
|
|
6333
|
-
},
|
|
8009
|
+
}, Qi = ({ position: e = "bottom", children: t, style: n, ...r }) => {
|
|
6334
8010
|
let i = q();
|
|
6335
8011
|
return /* @__PURE__ */ M(k, {
|
|
6336
8012
|
pointerEvents: "box-none",
|
|
@@ -6350,18 +8026,18 @@ var Jr = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
6350
8026
|
...r,
|
|
6351
8027
|
children: t
|
|
6352
8028
|
});
|
|
6353
|
-
},
|
|
6354
|
-
function
|
|
6355
|
-
let e = s(
|
|
8029
|
+
}, $i = r(null);
|
|
8030
|
+
function ea() {
|
|
8031
|
+
let e = s($i);
|
|
6356
8032
|
if (!e) throw Error("ToggleGroupItem must be used inside ToggleGroup");
|
|
6357
8033
|
return e;
|
|
6358
8034
|
}
|
|
6359
|
-
var
|
|
6360
|
-
let s = q(), c =
|
|
8035
|
+
var ta = i(function({ value: e, onValueChange: t, accessibilityLabel: n = "Options", children: r, style: i, ...a }, o) {
|
|
8036
|
+
let s = q(), c = G(), l = u(() => ({
|
|
6361
8037
|
value: e,
|
|
6362
8038
|
onValueChange: t
|
|
6363
8039
|
}), [e, t]);
|
|
6364
|
-
return /* @__PURE__ */ M(
|
|
8040
|
+
return /* @__PURE__ */ M($i.Provider, {
|
|
6365
8041
|
value: l,
|
|
6366
8042
|
children: /* @__PURE__ */ M(k, {
|
|
6367
8043
|
ref: o,
|
|
@@ -6382,8 +8058,8 @@ var ei = i(function({ value: e, onValueChange: t, accessibilityLabel: n = "Optio
|
|
|
6382
8058
|
children: r
|
|
6383
8059
|
})
|
|
6384
8060
|
});
|
|
6385
|
-
}),
|
|
6386
|
-
let s = q(), c =
|
|
8061
|
+
}), na = i(function({ name: e, label: t, icon: n, accessibilityLabel: r, disabled: i = !1, ...a }, o) {
|
|
8062
|
+
let s = q(), c = G(), { value: l, onValueChange: u } = ea(), d = l === e, f = !!n && !t, p = c === "dark";
|
|
6387
8063
|
return /* @__PURE__ */ N(w, {
|
|
6388
8064
|
ref: o,
|
|
6389
8065
|
disabled: i,
|
|
@@ -6427,8 +8103,8 @@ var ei = i(function({ value: e, onValueChange: t, accessibilityLabel: n = "Optio
|
|
|
6427
8103
|
children: t
|
|
6428
8104
|
}) : null]
|
|
6429
8105
|
});
|
|
6430
|
-
}),
|
|
6431
|
-
let a = q(), o =
|
|
8106
|
+
}), ra = i(function({ children: e, accessibilityLabel: t = "View switcher", style: n, ...r }, i) {
|
|
8107
|
+
let a = q(), o = G();
|
|
6432
8108
|
return /* @__PURE__ */ N(k, {
|
|
6433
8109
|
ref: i,
|
|
6434
8110
|
accessible: !0,
|
|
@@ -6454,7 +8130,7 @@ var ei = i(function({ value: e, onValueChange: t, accessibilityLabel: n = "Optio
|
|
|
6454
8130
|
children: e
|
|
6455
8131
|
})]
|
|
6456
8132
|
});
|
|
6457
|
-
}),
|
|
8133
|
+
}), ia = i(function({ label: e, icon: t, active: n = !1, disabled: r, ...i }, a) {
|
|
6458
8134
|
let o = q();
|
|
6459
8135
|
return /* @__PURE__ */ N(w, {
|
|
6460
8136
|
ref: a,
|
|
@@ -6492,6 +8168,6 @@ var ei = i(function({ value: e, onValueChange: t, accessibilityLabel: n = "Optio
|
|
|
6492
8168
|
});
|
|
6493
8169
|
});
|
|
6494
8170
|
//#endregion
|
|
6495
|
-
export {
|
|
8171
|
+
export { qe as ActionRow, ut as AnimatedIcon, _t as Avatar, xt as AvatarGroup, Tt as AvatarRotator, Dt as Badge, Ot as Banner, kt as Bin, jt as Blockquote, Pt as BottomSheet, Ft as BottomTabBar, Rt as Box, Bt as BoxedList, Wt as Button, Kt as ButtonRow, Xt as Callout, Qt as Card, nn as CheckRow, en as Checkbox, rn as Chip, on as Clamp, pn as CoachMark, hn as CoachMarkTour, Sn as ColorPicker, bn as ColorSwatch, kn as ComboRow, jn as Dialog, Mn as Divider, Kn as Drawer, Dn as Dropdown, Jn as EntryRow, Yn as Expander, Xn as ExpanderRow, Zn as FieldGroup, sr as FileTypeIcon, mr as FilterableMultiSelectDropdown, xn as GNOME_PALETTE, W as GnomeContext, Ue as GnomeProvider, hr as HeaderBar, _r as Highlight, X as Icon, Bn as IconButton, wr as InlineViewSwitcher, Tr as InlineViewSwitcherItem, Or as LevelBar, kr as Link, Fr as MultiSelectDropdown, Re as NAMED_ACCENT_COLORS, Lr as Overlay, Rr as PasswordEntryRow, Vr as PasswordField, Hr as PathBar, Jr as Popover, Yr as PreferencesGroup, Xr as ProgressBar, $r as RadioButton, oi as RangeSlider, ci as SearchBar, di as SegmentedBar, zt as Separator, _i as Sidebar, mi as SidebarCollapsedContext, gi as SidebarFilterContext, vi as SidebarItem, yi as SidebarSection, bi as Skeleton, Di as Slider, Mi as SpinButton, Pi as Spinner, Ii as StatusBadge, Ri as StatusPage, Wi as Switch, Gi as TabBar, Ki as TabItem, qi as TabPanel, Y as Text, Yi as TextField, Zi as Toast, Qi as Toaster, ta as ToggleGroup, na as ToggleGroupItem, Rn as Tooltip, ra as ViewSwitcher, ia as ViewSwitcherItem, vn as WrapBox, Ve as applyAccentColor, De as darkRawTokens, Ce as darkTheme, ke as highContrastDarkRawTokens, Te as highContrastDarkTheme, Oe as highContrastRawTokens, we as highContrastTheme, Ee as lightRawTokens, Se as lightTheme, ze as resolveColorScheme, Be as resolveContrast, Le as resolveGnomeTheme, Ie as useAccentColor, Pe as useColorScheme, Fe as useContrast, Ne as useDateTimeFormatter, je as useDir, q as useGnomeTheme, Ae as useLocale, Me as useNumberFormatter, J as useReducedMotion, G as useResolvedColorScheme, K as useResolvedContrast, hi as useSidebarCollapsed };
|
|
6496
8172
|
|
|
6497
8173
|
//# sourceMappingURL=index.js.map
|