@gnome-ui/react-native 1.4.0 → 1.6.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 +579 -2
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +47 -0
- package/dist/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/AvatarRotator/AvatarRotator.d.ts +65 -0
- package/dist/components/AvatarRotator/index.d.ts +2 -0
- package/dist/components/Box/Box.d.ts +87 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Chip/Chip.d.ts +63 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Clamp/Clamp.d.ts +61 -0
- package/dist/components/Clamp/index.d.ts +2 -0
- package/dist/components/CoachMark/CoachMark.d.ts +92 -0
- package/dist/components/CoachMark/CoachMarkTour.d.ts +54 -0
- package/dist/components/CoachMark/coachMarkUtils.d.ts +42 -0
- package/dist/components/CoachMark/index.d.ts +5 -0
- package/dist/components/Drawer/Drawer.d.ts +117 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/FileTypeIcon/FileTypeIcon.d.ts +45 -0
- package/dist/components/FileTypeIcon/fileType.d.ts +8 -0
- package/dist/components/FileTypeIcon/index.d.ts +3 -0
- package/dist/components/IconButton/IconButton.d.ts +34 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +93 -0
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +25 -0
- package/dist/components/InlineViewSwitcher/index.d.ts +4 -0
- package/dist/components/InlineViewSwitcher/variants.d.ts +30 -0
- package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +52 -0
- package/dist/components/PreferencesGroup/index.d.ts +2 -0
- package/dist/components/SegmentedBar/SegmentedBar.d.ts +64 -0
- package/dist/components/SegmentedBar/index.d.ts +2 -0
- package/dist/components/StatusPage/StatusPage.d.ts +79 -0
- package/dist/components/StatusPage/index.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +70 -0
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +49 -0
- package/dist/components/ToggleGroup/index.d.ts +4 -0
- package/dist/components/WrapBox/WrapBox.d.ts +67 -0
- package/dist/components/WrapBox/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2147 -577
- 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 { ApplicationXExecutable as P, AudioXGeneric as F, Check as I, Close as L, Connecting as R, Document as z, Downloading as B, Folder as V, FontXGeneric as H, ImageXGeneric as ee, PackageXGeneric as te, PanDown as ne, PanEnd as re, Recording as U, Syncing as W, TextXGeneric as ie, VideoXGeneric as ae, XOfficeDocument as oe, XOfficePresentation as se, XOfficeSpreadsheet as ce } from "@gnome-ui/icons";
|
|
5
|
+
import { Circle as le, G as ue, Path as de, Svg as fe, SvgXml as pe } from "react-native-svg";
|
|
6
6
|
//#region src/theme/tokens.generated.ts
|
|
7
|
-
var
|
|
7
|
+
var me = {
|
|
8
8
|
accentBgColor: "#3584e4",
|
|
9
9
|
accentColor: "#3584e4",
|
|
10
10
|
accentFgColor: "#fff",
|
|
@@ -145,7 +145,7 @@ var oe = {
|
|
|
145
145
|
yellow3: "#f6d32d",
|
|
146
146
|
yellow4: "#f5c211",
|
|
147
147
|
yellow5: "#e5a50a"
|
|
148
|
-
},
|
|
148
|
+
}, he = {
|
|
149
149
|
accentBgColor: "#3584e4",
|
|
150
150
|
accentColor: "#62a0ea",
|
|
151
151
|
accentFgColor: "#fff",
|
|
@@ -286,7 +286,7 @@ var oe = {
|
|
|
286
286
|
yellow3: "#f6d32d",
|
|
287
287
|
yellow4: "#f5c211",
|
|
288
288
|
yellow5: "#e5a50a"
|
|
289
|
-
},
|
|
289
|
+
}, ge = {
|
|
290
290
|
accentBgColor: "#1a5fb4",
|
|
291
291
|
accentColor: "#1a5fb4",
|
|
292
292
|
accentFgColor: "#fff",
|
|
@@ -427,7 +427,7 @@ var oe = {
|
|
|
427
427
|
yellow3: "#f6d32d",
|
|
428
428
|
yellow4: "#f5c211",
|
|
429
429
|
yellow5: "#e5a50a"
|
|
430
|
-
},
|
|
430
|
+
}, _e = {
|
|
431
431
|
accentBgColor: "#62a0ea",
|
|
432
432
|
accentColor: "#99c1f1",
|
|
433
433
|
accentFgColor: "#fff",
|
|
@@ -568,7 +568,7 @@ var oe = {
|
|
|
568
568
|
yellow3: "#f6d32d",
|
|
569
569
|
yellow4: "#f5c211",
|
|
570
570
|
yellow5: "#e5a50a"
|
|
571
|
-
},
|
|
571
|
+
}, ve = {
|
|
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 oe = {
|
|
|
709
709
|
"--gnome-yellow-3": "#f6d32d",
|
|
710
710
|
"--gnome-yellow-4": "#f5c211",
|
|
711
711
|
"--gnome-yellow-5": "#e5a50a"
|
|
712
|
-
},
|
|
712
|
+
}, ye = {
|
|
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 oe = {
|
|
|
850
850
|
"--gnome-yellow-3": "#f6d32d",
|
|
851
851
|
"--gnome-yellow-4": "#f5c211",
|
|
852
852
|
"--gnome-yellow-5": "#e5a50a"
|
|
853
|
-
},
|
|
853
|
+
}, be = {
|
|
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 oe = {
|
|
|
991
991
|
"--gnome-yellow-3": "#f6d32d",
|
|
992
992
|
"--gnome-yellow-4": "#f5c211",
|
|
993
993
|
"--gnome-yellow-5": "#e5a50a"
|
|
994
|
-
},
|
|
994
|
+
}, xe = {
|
|
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 oe = {
|
|
|
1132
1132
|
"--gnome-yellow-3": "#f6d32d",
|
|
1133
1133
|
"--gnome-yellow-4": "#f5c211",
|
|
1134
1134
|
"--gnome-yellow-5": "#e5a50a"
|
|
1135
|
-
},
|
|
1135
|
+
}, G = r({
|
|
1136
1136
|
locale: void 0,
|
|
1137
1137
|
dir: "ltr",
|
|
1138
1138
|
numberFormat: void 0,
|
|
@@ -1142,16 +1142,16 @@ var oe = {
|
|
|
1142
1142
|
contrast: "system",
|
|
1143
1143
|
resolvedContrast: "normal",
|
|
1144
1144
|
accentColor: "blue",
|
|
1145
|
-
theme:
|
|
1145
|
+
theme: me
|
|
1146
1146
|
});
|
|
1147
|
-
function
|
|
1148
|
-
return s(
|
|
1147
|
+
function Se() {
|
|
1148
|
+
return s(G).locale;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return s(
|
|
1150
|
+
function Ce() {
|
|
1151
|
+
return s(G).dir;
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
let { locale: t, numberFormat: n } = s(
|
|
1153
|
+
function we(e) {
|
|
1154
|
+
let { locale: t, numberFormat: n } = s(G);
|
|
1155
1155
|
return u(() => new Intl.NumberFormat(t, {
|
|
1156
1156
|
...n,
|
|
1157
1157
|
...e
|
|
@@ -1161,8 +1161,8 @@ function ge(e) {
|
|
|
1161
1161
|
e
|
|
1162
1162
|
]);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
let { locale: t, dateTimeFormat: n } = s(
|
|
1164
|
+
function Te(e) {
|
|
1165
|
+
let { locale: t, dateTimeFormat: n } = s(G);
|
|
1166
1166
|
return u(() => new Intl.DateTimeFormat(t, {
|
|
1167
1167
|
...n,
|
|
1168
1168
|
...e
|
|
@@ -1172,32 +1172,32 @@ function _e(e) {
|
|
|
1172
1172
|
e
|
|
1173
1173
|
]);
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return s(
|
|
1175
|
+
function Ee() {
|
|
1176
|
+
return s(G).colorScheme;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return s(
|
|
1178
|
+
function K() {
|
|
1179
|
+
return s(G).resolvedColorScheme;
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1182
|
-
return s(
|
|
1181
|
+
function De() {
|
|
1182
|
+
return s(G).contrast;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return s(
|
|
1184
|
+
function Oe() {
|
|
1185
|
+
return s(G).resolvedContrast;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return s(
|
|
1187
|
+
function ke() {
|
|
1188
|
+
return s(G).accentColor;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1191
|
-
return s(
|
|
1190
|
+
function q() {
|
|
1191
|
+
return s(G).theme;
|
|
1192
1192
|
}
|
|
1193
1193
|
//#endregion
|
|
1194
1194
|
//#region src/theme/resolveTheme.ts
|
|
1195
|
-
function
|
|
1196
|
-
return t === "more" ? e === "dark" ?
|
|
1195
|
+
function Ae({ colorScheme: e, contrast: t = "normal" }) {
|
|
1196
|
+
return t === "more" ? e === "dark" ? _e : ge : e === "dark" ? he : me;
|
|
1197
1197
|
}
|
|
1198
1198
|
//#endregion
|
|
1199
1199
|
//#region src/GnomeProvider/resolveContext.ts
|
|
1200
|
-
var
|
|
1200
|
+
var je = new Set([
|
|
1201
1201
|
"blue",
|
|
1202
1202
|
"green",
|
|
1203
1203
|
"yellow",
|
|
@@ -1206,15 +1206,15 @@ var Se = new Set([
|
|
|
1206
1206
|
"purple",
|
|
1207
1207
|
"brown"
|
|
1208
1208
|
]);
|
|
1209
|
-
function
|
|
1209
|
+
function Me(e, t) {
|
|
1210
1210
|
return e === "system" ? t === "dark" ? "dark" : "light" : e;
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Ne(e, t) {
|
|
1213
1213
|
return e === "system" ? t ? "more" : "normal" : e;
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function Pe(e, t, n, r) {
|
|
1216
1216
|
if (t === "blue") return e;
|
|
1217
|
-
let i =
|
|
1217
|
+
let i = je.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 Te(e, t, n, r) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
//#endregion
|
|
1226
1226
|
//#region src/GnomeProvider/GnomeProvider.tsx
|
|
1227
|
-
function
|
|
1227
|
+
function Fe() {
|
|
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;
|
|
@@ -1240,7 +1240,7 @@ function Ee() {
|
|
|
1240
1240
|
};
|
|
1241
1241
|
}, []), e;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function J() {
|
|
1244
1244
|
let [e, t] = f(!1);
|
|
1245
1245
|
return c(() => {
|
|
1246
1246
|
let e = !0;
|
|
@@ -1254,8 +1254,8 @@ function W() {
|
|
|
1254
1254
|
};
|
|
1255
1255
|
}, []), e;
|
|
1256
1256
|
}
|
|
1257
|
-
var
|
|
1258
|
-
let c = A(), l =
|
|
1257
|
+
var Ie = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme: i = "system", contrast: a = "system", accentColor: o = "blue", children: s }) => {
|
|
1258
|
+
let c = A(), l = Fe(), d = Me(i, c), f = Ne(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 De = ({ 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: Pe(Ae({
|
|
1269
1269
|
colorScheme: d,
|
|
1270
1270
|
contrast: f
|
|
1271
1271
|
}), o, d, f)
|
|
@@ -1280,11 +1280,11 @@ var De = ({ 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(G.Provider, {
|
|
1284
1284
|
value: m,
|
|
1285
1285
|
children: s
|
|
1286
1286
|
});
|
|
1287
|
-
},
|
|
1287
|
+
}, Le = new Set([
|
|
1288
1288
|
"large-title",
|
|
1289
1289
|
"title-1",
|
|
1290
1290
|
"title-2",
|
|
@@ -1292,7 +1292,7 @@ var De = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme:
|
|
|
1292
1292
|
"title-4",
|
|
1293
1293
|
"heading"
|
|
1294
1294
|
]);
|
|
1295
|
-
function
|
|
1295
|
+
function Re(e, t) {
|
|
1296
1296
|
let n = (e) => String(e);
|
|
1297
1297
|
switch (t) {
|
|
1298
1298
|
case "large-title": return {
|
|
@@ -1361,7 +1361,7 @@ function ke(e, t) {
|
|
|
1361
1361
|
};
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function ze(e, t) {
|
|
1365
1365
|
switch (t) {
|
|
1366
1366
|
case "dim": return {
|
|
1367
1367
|
color: e.windowFgColor,
|
|
@@ -1375,22 +1375,22 @@ function Ae(e, t) {
|
|
|
1375
1375
|
default: return { color: e.windowFgColor };
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
|
-
var
|
|
1379
|
-
let s =
|
|
1378
|
+
var Y = i(function({ variant: e = "body", color: t = "default", style: n, children: r, accessibilityRole: i, ...a }, o) {
|
|
1379
|
+
let s = q();
|
|
1380
1380
|
return /* @__PURE__ */ M(D, {
|
|
1381
1381
|
ref: o,
|
|
1382
|
-
accessibilityRole: i ?? (
|
|
1382
|
+
accessibilityRole: i ?? (Le.has(e) ? "header" : void 0),
|
|
1383
1383
|
style: [
|
|
1384
1384
|
{ fontFamily: s.fontFamily },
|
|
1385
|
-
|
|
1386
|
-
|
|
1385
|
+
Re(s, e),
|
|
1386
|
+
ze(s, t),
|
|
1387
1387
|
n
|
|
1388
1388
|
],
|
|
1389
1389
|
...a,
|
|
1390
1390
|
children: r
|
|
1391
1391
|
});
|
|
1392
|
-
}),
|
|
1393
|
-
let u =
|
|
1392
|
+
}), Be = i(function({ title: e, subtitle: t, leading: n, trailing: r, interactive: i = !1, variant: a = "default", style: o, disabled: s, ...c }, l) {
|
|
1393
|
+
let u = q(), d = a === "property", f = {
|
|
1394
1394
|
flexDirection: "row",
|
|
1395
1395
|
alignItems: "center",
|
|
1396
1396
|
gap: u.space2,
|
|
@@ -1408,13 +1408,13 @@ var G = i(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1408
1408
|
flex: 1,
|
|
1409
1409
|
gap: 2
|
|
1410
1410
|
},
|
|
1411
|
-
children: [/* @__PURE__ */ M(
|
|
1411
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
1412
1412
|
variant: d ? "caption" : "body",
|
|
1413
1413
|
color: d ? "dim" : "default",
|
|
1414
1414
|
numberOfLines: 1,
|
|
1415
1415
|
ellipsizeMode: "tail",
|
|
1416
1416
|
children: e
|
|
1417
|
-
}), t && /* @__PURE__ */ M(
|
|
1417
|
+
}), t && /* @__PURE__ */ M(Y, {
|
|
1418
1418
|
variant: d ? "body" : "caption",
|
|
1419
1419
|
color: d ? "default" : "dim",
|
|
1420
1420
|
numberOfLines: 1,
|
|
@@ -1456,12 +1456,12 @@ var G = i(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1456
1456
|
...c,
|
|
1457
1457
|
children: p
|
|
1458
1458
|
});
|
|
1459
|
-
}),
|
|
1459
|
+
}), Ve = {
|
|
1460
1460
|
sm: 12,
|
|
1461
1461
|
md: 16,
|
|
1462
1462
|
lg: 20
|
|
1463
1463
|
};
|
|
1464
|
-
function
|
|
1464
|
+
function He(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 Ne(e, t) {
|
|
|
1473
1473
|
default: return e.windowFgColor;
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1476
|
+
function Ue(e) {
|
|
1477
1477
|
return e ? {
|
|
1478
1478
|
accessible: !0,
|
|
1479
1479
|
accessibilityLabel: e,
|
|
@@ -1485,27 +1485,27 @@ function Pe(e) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
//#endregion
|
|
1487
1487
|
//#region src/components/Icon/Icon.tsx
|
|
1488
|
-
function
|
|
1488
|
+
function We(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 Ge(e) {
|
|
1492
1492
|
return e === "nonzero" || e === "evenodd" ? e : void 0;
|
|
1493
1493
|
}
|
|
1494
|
-
var
|
|
1495
|
-
let s =
|
|
1494
|
+
var X = ({ icon: e, size: t = "md", width: n, height: r, label: i, color: a, style: o }) => {
|
|
1495
|
+
let s = q(), c = Ve[t], l = He(s, a), u = We(e) ? e.viewBox : e.viewBox ?? "0 0 24 24", d = We(e) ? e.svg : void 0, f = We(e) ? e.svg ? void 0 : e.paths?.map((e, t) => /* @__PURE__ */ M(de, {
|
|
1496
1496
|
d: e.d,
|
|
1497
|
-
fillRule:
|
|
1498
|
-
clipRule:
|
|
1497
|
+
fillRule: Ge(e.fillRule),
|
|
1498
|
+
clipRule: Ge(e.clipRule),
|
|
1499
1499
|
transform: e.transform
|
|
1500
|
-
}, t)) : [/* @__PURE__ */ M(
|
|
1501
|
-
return d ? /* @__PURE__ */ M(
|
|
1500
|
+
}, t)) : [/* @__PURE__ */ M(de, { d: e.path }, 0)], p = Ue(i);
|
|
1501
|
+
return d ? /* @__PURE__ */ M(pe, {
|
|
1502
1502
|
xml: `<svg viewBox="${u}">${d}</svg>`,
|
|
1503
1503
|
width: n ?? c,
|
|
1504
1504
|
height: r ?? c,
|
|
1505
1505
|
fill: l,
|
|
1506
1506
|
style: o,
|
|
1507
1507
|
...p
|
|
1508
|
-
}) : /* @__PURE__ */ M(
|
|
1508
|
+
}) : /* @__PURE__ */ M(fe, {
|
|
1509
1509
|
viewBox: u,
|
|
1510
1510
|
width: n ?? c,
|
|
1511
1511
|
height: r ?? c,
|
|
@@ -1514,8 +1514,8 @@ var K = ({ icon: e, size: t = "md", width: n, height: r, label: i, color: a, sty
|
|
|
1514
1514
|
...p,
|
|
1515
1515
|
children: f
|
|
1516
1516
|
});
|
|
1517
|
-
},
|
|
1518
|
-
function
|
|
1517
|
+
}, Ke = m.createAnimatedComponent(ue), qe = m.createAnimatedComponent(de), Je = m.createAnimatedComponent(le);
|
|
1518
|
+
function Ye(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 Be(e) {
|
|
|
1527
1527
|
return n.start(), () => n.stop();
|
|
1528
1528
|
}, [t, e]), t;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function Xe(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 Ve(e, t) {
|
|
|
1543
1543
|
t
|
|
1544
1544
|
]), n;
|
|
1545
1545
|
}
|
|
1546
|
-
var
|
|
1547
|
-
transform:
|
|
1546
|
+
var Ze = ({ fill: e }) => /* @__PURE__ */ M(Ke, {
|
|
1547
|
+
transform: Ye(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(de, {
|
|
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
|
+
}), Qe = ({ 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 He = ({ fill: e }) => /* @__PURE__ */ M(Le, {
|
|
|
1568
1568
|
useNativeDriver: !1
|
|
1569
1569
|
})]));
|
|
1570
1570
|
return n.start(), () => n.stop();
|
|
1571
|
-
}, [t]), /* @__PURE__ */ M(
|
|
1571
|
+
}, [t]), /* @__PURE__ */ M(qe, {
|
|
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
|
+
}, $e = ({ fill: e }) => {
|
|
1577
|
+
let t = Ye(1400), n = [
|
|
1578
1578
|
0,
|
|
1579
1579
|
.2,
|
|
1580
1580
|
.5,
|
|
@@ -1602,30 +1602,30 @@ var He = ({ fill: e }) => /* @__PURE__ */ M(Le, {
|
|
|
1602
1602
|
1
|
|
1603
1603
|
]
|
|
1604
1604
|
});
|
|
1605
|
-
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(
|
|
1605
|
+
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(de, {
|
|
1606
1606
|
fill: e,
|
|
1607
1607
|
d: "M2 13h12v2H2z"
|
|
1608
|
-
}), /* @__PURE__ */ M(
|
|
1608
|
+
}), /* @__PURE__ */ M(Ke, {
|
|
1609
1609
|
transform: r,
|
|
1610
1610
|
opacity: i,
|
|
1611
|
-
children: /* @__PURE__ */ M(
|
|
1611
|
+
children: /* @__PURE__ */ M(de, {
|
|
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 et(e, t, n) {
|
|
1619
1619
|
return `translate(${e}, ${t}) scale(${n}) translate(${-e}, ${-t})`;
|
|
1620
1620
|
}
|
|
1621
|
-
var
|
|
1622
|
-
let i =
|
|
1621
|
+
var tt = ({ cx: e, cy: t, fill: n, delay: r }) => {
|
|
1622
|
+
let i = Xe(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(Je, {
|
|
1629
1629
|
cx: e,
|
|
1630
1630
|
cy: t,
|
|
1631
1631
|
r: 2,
|
|
@@ -1642,44 +1642,44 @@ var Ge = ({ 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
|
+
et(e, t, 1),
|
|
1646
|
+
et(e, t, .7),
|
|
1647
|
+
et(e, t, 1),
|
|
1648
|
+
et(e, t, 1)
|
|
1649
1649
|
]
|
|
1650
1650
|
})
|
|
1651
1651
|
});
|
|
1652
|
-
},
|
|
1653
|
-
[
|
|
1654
|
-
[
|
|
1655
|
-
[
|
|
1656
|
-
[
|
|
1657
|
-
/* @__PURE__ */ M(
|
|
1652
|
+
}, nt = new Map([
|
|
1653
|
+
[W, Ze],
|
|
1654
|
+
[U, Qe],
|
|
1655
|
+
[B, $e],
|
|
1656
|
+
[R, ({ fill: e }) => /* @__PURE__ */ N(j, { children: [
|
|
1657
|
+
/* @__PURE__ */ M(de, {
|
|
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(tt, {
|
|
1662
1662
|
cx: 3,
|
|
1663
1663
|
cy: 8,
|
|
1664
1664
|
fill: e,
|
|
1665
1665
|
delay: 0
|
|
1666
1666
|
}),
|
|
1667
|
-
/* @__PURE__ */ M(
|
|
1667
|
+
/* @__PURE__ */ M(tt, {
|
|
1668
1668
|
cx: 8,
|
|
1669
1669
|
cy: 8,
|
|
1670
1670
|
fill: e,
|
|
1671
1671
|
delay: 150
|
|
1672
1672
|
}),
|
|
1673
|
-
/* @__PURE__ */ M(
|
|
1673
|
+
/* @__PURE__ */ M(tt, {
|
|
1674
1674
|
cx: 13,
|
|
1675
1675
|
cy: 8,
|
|
1676
1676
|
fill: e,
|
|
1677
1677
|
delay: 300
|
|
1678
1678
|
})
|
|
1679
1679
|
] })]
|
|
1680
|
-
]),
|
|
1681
|
-
let s =
|
|
1682
|
-
if (!l) return /* @__PURE__ */ M(
|
|
1680
|
+
]), rt = ({ 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 ? nt.get(e) : void 0;
|
|
1682
|
+
if (!l) return /* @__PURE__ */ M(X, {
|
|
1683
1683
|
icon: e,
|
|
1684
1684
|
size: n,
|
|
1685
1685
|
width: r,
|
|
@@ -1687,15 +1687,15 @@ var Ge = ({ 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 = Ve[n], d = He(s, o), f = Ue(a);
|
|
1691
|
+
return /* @__PURE__ */ M(fe, {
|
|
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
|
+
}, it = [
|
|
1699
1699
|
"blue",
|
|
1700
1700
|
"green",
|
|
1701
1701
|
"yellow",
|
|
@@ -1705,27 +1705,27 @@ var Ge = ({ cx: e, cy: t, fill: n, delay: r }) => {
|
|
|
1705
1705
|
"brown",
|
|
1706
1706
|
"teal",
|
|
1707
1707
|
"slate"
|
|
1708
|
-
],
|
|
1708
|
+
], at = {
|
|
1709
1709
|
sm: 24,
|
|
1710
1710
|
md: 32,
|
|
1711
1711
|
lg: 48,
|
|
1712
1712
|
xl: 64
|
|
1713
|
-
},
|
|
1713
|
+
}, ot = {
|
|
1714
1714
|
sm: .5,
|
|
1715
1715
|
md: .6,
|
|
1716
1716
|
lg: 1,
|
|
1717
1717
|
xl: 1.4
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function st(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 it[t % it.length];
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function ct(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 lt(e, t) {
|
|
1729
1729
|
switch (t) {
|
|
1730
1730
|
case "blue": return {
|
|
1731
1731
|
backgroundColor: e.blue3,
|
|
@@ -1765,8 +1765,8 @@ function $e(e, t) {
|
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
|
-
var
|
|
1769
|
-
let o =
|
|
1768
|
+
var ut = ({ name: e = "", src: t, alt: n, size: r = "md", color: i, style: a }) => {
|
|
1769
|
+
let o = q(), s = K(), c = i ?? (e ? st(e) : "blue"), l = ct(e), u = at[r], { backgroundColor: d, initialsColor: f } = lt(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,17 +1798,164 @@ var et = ({ 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 * ot[r],
|
|
1802
|
+
lineHeight: o.fontSizeBody * ot[r],
|
|
1803
1803
|
color: f
|
|
1804
1804
|
},
|
|
1805
1805
|
children: l
|
|
1806
1806
|
})
|
|
1807
1807
|
});
|
|
1808
|
+
}, dt = {
|
|
1809
|
+
sm: 6,
|
|
1810
|
+
md: 8,
|
|
1811
|
+
lg: 12,
|
|
1812
|
+
xl: 16
|
|
1813
|
+
}, ft = {
|
|
1814
|
+
sm: 24,
|
|
1815
|
+
md: 32,
|
|
1816
|
+
lg: 48,
|
|
1817
|
+
xl: 64
|
|
1818
|
+
}, pt = {
|
|
1819
|
+
sm: 8,
|
|
1820
|
+
md: 9.6,
|
|
1821
|
+
lg: 14,
|
|
1822
|
+
xl: 17.6
|
|
1823
|
+
}, mt = ({ 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 = dt[n];
|
|
1825
|
+
return /* @__PURE__ */ N(k, {
|
|
1826
|
+
testID: a,
|
|
1827
|
+
accessible: !0,
|
|
1828
|
+
role: "group",
|
|
1829
|
+
accessibilityLabel: u,
|
|
1830
|
+
style: [{
|
|
1831
|
+
flexDirection: "row",
|
|
1832
|
+
alignItems: "center"
|
|
1833
|
+
}, i],
|
|
1834
|
+
children: [s.map((e, t) => /* @__PURE__ */ M(ut, {
|
|
1835
|
+
name: e.name,
|
|
1836
|
+
src: e.src,
|
|
1837
|
+
alt: e.alt ?? e.name,
|
|
1838
|
+
color: e.color,
|
|
1839
|
+
size: n,
|
|
1840
|
+
style: {
|
|
1841
|
+
marginStart: t === 0 ? 0 : -d,
|
|
1842
|
+
borderWidth: 2,
|
|
1843
|
+
borderColor: o.windowBgColor
|
|
1844
|
+
}
|
|
1845
|
+
}, `${e.name ?? ""}-${e.src ?? ""}-${t}`)), c > 0 && /* @__PURE__ */ M(k, {
|
|
1846
|
+
accessible: !0,
|
|
1847
|
+
accessibilityLabel: `+${c} more`,
|
|
1848
|
+
style: {
|
|
1849
|
+
width: ft[n],
|
|
1850
|
+
height: ft[n],
|
|
1851
|
+
marginStart: -d,
|
|
1852
|
+
borderRadius: o.radiusPill,
|
|
1853
|
+
borderWidth: 2,
|
|
1854
|
+
borderColor: o.windowBgColor,
|
|
1855
|
+
backgroundColor: o.dark2,
|
|
1856
|
+
alignItems: "center",
|
|
1857
|
+
justifyContent: "center"
|
|
1858
|
+
},
|
|
1859
|
+
children: /* @__PURE__ */ M(D, {
|
|
1860
|
+
accessibilityElementsHidden: !0,
|
|
1861
|
+
importantForAccessibility: "no",
|
|
1862
|
+
style: {
|
|
1863
|
+
fontFamily: o.fontFamily,
|
|
1864
|
+
fontWeight: String(o.fontWeightSemibold),
|
|
1865
|
+
fontSize: pt[n],
|
|
1866
|
+
color: "#fff"
|
|
1867
|
+
},
|
|
1868
|
+
children: `+${c}`
|
|
1869
|
+
})
|
|
1870
|
+
})]
|
|
1871
|
+
});
|
|
1872
|
+
};
|
|
1873
|
+
//#endregion
|
|
1874
|
+
//#region src/components/AvatarRotator/AvatarRotator.tsx
|
|
1875
|
+
function ht(e, t) {
|
|
1876
|
+
return t <= 0 ? 0 : (e % t + t) % t;
|
|
1877
|
+
}
|
|
1878
|
+
var gt = {
|
|
1879
|
+
sm: 24,
|
|
1880
|
+
md: 32,
|
|
1881
|
+
lg: 48,
|
|
1882
|
+
xl: 64
|
|
1883
|
+
}, _t = ({ active: e, duration: t, reducedMotion: n, children: r }) => {
|
|
1884
|
+
let i = d(new m.Value(+!!e)).current;
|
|
1885
|
+
return c(() => {
|
|
1886
|
+
if (n) {
|
|
1887
|
+
i.setValue(+!!e);
|
|
1888
|
+
return;
|
|
1889
|
+
}
|
|
1890
|
+
m.timing(i, {
|
|
1891
|
+
toValue: +!!e,
|
|
1892
|
+
duration: t,
|
|
1893
|
+
useNativeDriver: !0
|
|
1894
|
+
}).start();
|
|
1895
|
+
}, [
|
|
1896
|
+
e,
|
|
1897
|
+
t,
|
|
1898
|
+
n,
|
|
1899
|
+
i
|
|
1900
|
+
]), /* @__PURE__ */ M(m.View, {
|
|
1901
|
+
accessibilityElementsHidden: !0,
|
|
1902
|
+
importantForAccessibility: "no",
|
|
1903
|
+
style: [E.absoluteFill, { opacity: i }],
|
|
1904
|
+
children: r
|
|
1905
|
+
});
|
|
1906
|
+
}, vt = ({ 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 = ht(_ ? l : v, g.length);
|
|
1908
|
+
if (c(() => {
|
|
1909
|
+
if (g.length <= 1 || a <= 0 || b || h) return;
|
|
1910
|
+
let e = setInterval(() => {
|
|
1911
|
+
let e = ht(S + 1, g.length);
|
|
1912
|
+
_ || y(e), d?.(e);
|
|
1913
|
+
}, a);
|
|
1914
|
+
return () => clearInterval(e);
|
|
1915
|
+
}, [
|
|
1916
|
+
S,
|
|
1917
|
+
a,
|
|
1918
|
+
_,
|
|
1919
|
+
b,
|
|
1920
|
+
d,
|
|
1921
|
+
h,
|
|
1922
|
+
g.length
|
|
1923
|
+
]), g.length === 0) return /* @__PURE__ */ M(ut, {
|
|
1924
|
+
name: e,
|
|
1925
|
+
alt: n,
|
|
1926
|
+
size: r,
|
|
1927
|
+
color: i,
|
|
1928
|
+
style: p
|
|
1929
|
+
});
|
|
1930
|
+
let C = n ?? (e || void 0) ?? "Avatar", T = gt[r];
|
|
1931
|
+
return /* @__PURE__ */ M(w, {
|
|
1932
|
+
testID: m,
|
|
1933
|
+
accessible: !0,
|
|
1934
|
+
role: "img",
|
|
1935
|
+
accessibilityLabel: C,
|
|
1936
|
+
onPressIn: () => s && x(!0),
|
|
1937
|
+
onPressOut: () => s && x(!1),
|
|
1938
|
+
style: [{
|
|
1939
|
+
width: T,
|
|
1940
|
+
height: T,
|
|
1941
|
+
borderRadius: T / 2,
|
|
1942
|
+
overflow: "hidden"
|
|
1943
|
+
}, p],
|
|
1944
|
+
children: g.map((t, n) => /* @__PURE__ */ M(_t, {
|
|
1945
|
+
active: n === S,
|
|
1946
|
+
duration: Math.max(0, o),
|
|
1947
|
+
reducedMotion: h,
|
|
1948
|
+
children: /* @__PURE__ */ M(ut, {
|
|
1949
|
+
name: e,
|
|
1950
|
+
src: t,
|
|
1951
|
+
size: r
|
|
1952
|
+
})
|
|
1953
|
+
}, `${t}-${n}`))
|
|
1954
|
+
});
|
|
1808
1955
|
};
|
|
1809
1956
|
//#endregion
|
|
1810
1957
|
//#region src/components/Badge/Badge.tsx
|
|
1811
|
-
function
|
|
1958
|
+
function yt(e, t, n) {
|
|
1812
1959
|
switch (n) {
|
|
1813
1960
|
case "accent": return {
|
|
1814
1961
|
backgroundColor: e.accentBgColor,
|
|
@@ -1832,8 +1979,8 @@ function tt(e, t, n) {
|
|
|
1832
1979
|
};
|
|
1833
1980
|
}
|
|
1834
1981
|
}
|
|
1835
|
-
var
|
|
1836
|
-
let a =
|
|
1982
|
+
var bt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i }) => {
|
|
1983
|
+
let a = q(), { backgroundColor: o, color: s } = yt(a, K(), e), c = /* @__PURE__ */ M(k, {
|
|
1837
1984
|
testID: "badge-ring",
|
|
1838
1985
|
style: [{
|
|
1839
1986
|
padding: 2,
|
|
@@ -1872,8 +2019,8 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
1872
2019
|
style: { alignSelf: "flex-start" },
|
|
1873
2020
|
children: [r, c]
|
|
1874
2021
|
}) : c;
|
|
1875
|
-
},
|
|
1876
|
-
let c =
|
|
2022
|
+
}, xt = ({ variant: e = "info", children: t, actionLabel: n, onAction: r, dismissible: i = !1, onDismiss: a, style: o, ...s }) => {
|
|
2023
|
+
let c = q(), l = {
|
|
1877
2024
|
info: {
|
|
1878
2025
|
bg: c.accentBgColor,
|
|
1879
2026
|
fg: c.accentFgColor
|
|
@@ -1906,7 +2053,7 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
1906
2053
|
backgroundColor: l.bg
|
|
1907
2054
|
}, o],
|
|
1908
2055
|
...s,
|
|
1909
|
-
children: [/* @__PURE__ */ M(
|
|
2056
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
1910
2057
|
variant: "body",
|
|
1911
2058
|
style: {
|
|
1912
2059
|
flex: 1,
|
|
@@ -1964,8 +2111,8 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
1964
2111
|
})]
|
|
1965
2112
|
})]
|
|
1966
2113
|
});
|
|
1967
|
-
},
|
|
1968
|
-
let s =
|
|
2114
|
+
}, St = m.createAnimatedComponent(w), Ct = 150, wt = ({ open: e, title: t, children: n, onClose: r, closeOnBackdrop: i = !0, style: a, testID: o }) => {
|
|
2115
|
+
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);
|
|
1969
2116
|
c(() => {
|
|
1970
2117
|
e && _(!0);
|
|
1971
2118
|
}, [e]), c(() => {
|
|
@@ -2022,7 +2169,7 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2022
2169
|
b.setValue(Math.max(0, t.dy));
|
|
2023
2170
|
},
|
|
2024
2171
|
onPanResponderRelease: (e, t) => {
|
|
2025
|
-
T.current = !1, Math.max(0, t.dy) >=
|
|
2172
|
+
T.current = !1, Math.max(0, t.dy) >= Ct ? r?.() : m.timing(b, {
|
|
2026
2173
|
toValue: 0,
|
|
2027
2174
|
duration: s.durationNormal,
|
|
2028
2175
|
useNativeDriver: !0
|
|
@@ -2039,7 +2186,7 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2039
2186
|
animationType: "none",
|
|
2040
2187
|
statusBarTranslucent: !0,
|
|
2041
2188
|
onRequestClose: r,
|
|
2042
|
-
children: /* @__PURE__ */ M(
|
|
2189
|
+
children: /* @__PURE__ */ M(St, {
|
|
2043
2190
|
testID: o,
|
|
2044
2191
|
onPress: i ? r : void 0,
|
|
2045
2192
|
accessible: !1,
|
|
@@ -2095,7 +2242,7 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2095
2242
|
opacity: .2
|
|
2096
2243
|
} })
|
|
2097
2244
|
}),
|
|
2098
|
-
t && /* @__PURE__ */ M(
|
|
2245
|
+
t && /* @__PURE__ */ M(Y, {
|
|
2099
2246
|
variant: "title-4",
|
|
2100
2247
|
style: {
|
|
2101
2248
|
paddingHorizontal: s.space4,
|
|
@@ -2110,7 +2257,7 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2110
2257
|
paddingHorizontal: s.space4,
|
|
2111
2258
|
paddingBottom: s.space4
|
|
2112
2259
|
},
|
|
2113
|
-
children: typeof n == "string" ? /* @__PURE__ */ M(
|
|
2260
|
+
children: typeof n == "string" ? /* @__PURE__ */ M(Y, {
|
|
2114
2261
|
variant: "body",
|
|
2115
2262
|
children: n
|
|
2116
2263
|
}) : n
|
|
@@ -2120,13 +2267,42 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2120
2267
|
})
|
|
2121
2268
|
})
|
|
2122
2269
|
}) : null;
|
|
2123
|
-
},
|
|
2270
|
+
}, Tt = {
|
|
2271
|
+
start: "flex-start",
|
|
2272
|
+
center: "center",
|
|
2273
|
+
end: "flex-end",
|
|
2274
|
+
stretch: "stretch",
|
|
2275
|
+
baseline: "baseline"
|
|
2276
|
+
}, Et = {
|
|
2277
|
+
start: "flex-start",
|
|
2278
|
+
center: "center",
|
|
2279
|
+
end: "flex-end",
|
|
2280
|
+
"space-between": "space-between",
|
|
2281
|
+
"space-around": "space-around",
|
|
2282
|
+
"space-evenly": "space-evenly"
|
|
2283
|
+
}, Dt = i(function({ orientation: e = "vertical", spacing: t = 6, align: n, justify: r = "start", padding: i, children: a, style: o, ...s }, c) {
|
|
2284
|
+
return /* @__PURE__ */ M(k, {
|
|
2285
|
+
ref: c,
|
|
2286
|
+
style: [
|
|
2287
|
+
{
|
|
2288
|
+
flexDirection: e === "horizontal" ? "row" : "column",
|
|
2289
|
+
gap: t,
|
|
2290
|
+
alignItems: Tt[n ?? (e === "horizontal" ? "center" : "stretch")],
|
|
2291
|
+
justifyContent: Et[r]
|
|
2292
|
+
},
|
|
2293
|
+
i !== void 0 && { padding: i },
|
|
2294
|
+
o
|
|
2295
|
+
],
|
|
2296
|
+
...s,
|
|
2297
|
+
children: a
|
|
2298
|
+
});
|
|
2299
|
+
}), Ot = i(function({ orientation: e = "horizontal", style: t, ...n }, r) {
|
|
2124
2300
|
return /* @__PURE__ */ M(k, {
|
|
2125
2301
|
ref: r,
|
|
2126
2302
|
accessible: !1,
|
|
2127
2303
|
style: [
|
|
2128
2304
|
{
|
|
2129
|
-
backgroundColor:
|
|
2305
|
+
backgroundColor: q().cardShadeColor,
|
|
2130
2306
|
flexShrink: 0
|
|
2131
2307
|
},
|
|
2132
2308
|
e === "vertical" ? {
|
|
@@ -2141,8 +2317,8 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2141
2317
|
],
|
|
2142
2318
|
...n
|
|
2143
2319
|
});
|
|
2144
|
-
}),
|
|
2145
|
-
let o =
|
|
2320
|
+
}), kt = i(function({ children: t, variant: n = "default", style: r, ...i }, a) {
|
|
2321
|
+
let o = q(), s = e.toArray(t).filter(Boolean);
|
|
2146
2322
|
return n === "separate" ? /* @__PURE__ */ M(k, {
|
|
2147
2323
|
ref: a,
|
|
2148
2324
|
accessible: !0,
|
|
@@ -2171,12 +2347,12 @@ var nt = ({ variant: e = "accent", dot: t = !1, children: n, anchor: r, style: i
|
|
|
2171
2347
|
overflow: "hidden"
|
|
2172
2348
|
}, r],
|
|
2173
2349
|
...i,
|
|
2174
|
-
children: s.map((e, t) => /* @__PURE__ */ N(k, { children: [t > 0 && /* @__PURE__ */ M(
|
|
2350
|
+
children: s.map((e, t) => /* @__PURE__ */ N(k, { children: [t > 0 && /* @__PURE__ */ M(Ot, { testID: "boxed-list-separator" }), e] }, t))
|
|
2175
2351
|
});
|
|
2176
2352
|
});
|
|
2177
2353
|
//#endregion
|
|
2178
2354
|
//#region src/components/Button/Button.tsx
|
|
2179
|
-
function
|
|
2355
|
+
function At(e, t) {
|
|
2180
2356
|
switch (t) {
|
|
2181
2357
|
case "sm": return {
|
|
2182
2358
|
minHeight: 28,
|
|
@@ -2201,14 +2377,14 @@ function lt(e, t) {
|
|
|
2201
2377
|
};
|
|
2202
2378
|
}
|
|
2203
2379
|
}
|
|
2204
|
-
function
|
|
2380
|
+
function jt(e) {
|
|
2205
2381
|
switch (e) {
|
|
2206
2382
|
case "sm": return 28;
|
|
2207
2383
|
case "lg": return 42;
|
|
2208
2384
|
default: return 34;
|
|
2209
2385
|
}
|
|
2210
2386
|
}
|
|
2211
|
-
function
|
|
2387
|
+
function Mt(e, t, n, r) {
|
|
2212
2388
|
if (r) return {
|
|
2213
2389
|
backgroundColor: n ? "rgba(0, 0, 0, 0.85)" : "rgba(0, 0, 0, 0.65)",
|
|
2214
2390
|
borderColor: "rgba(255, 255, 255, 0.12)",
|
|
@@ -2237,15 +2413,15 @@ function dt(e, t, n, r) {
|
|
|
2237
2413
|
};
|
|
2238
2414
|
}
|
|
2239
2415
|
}
|
|
2240
|
-
var
|
|
2241
|
-
let f =
|
|
2416
|
+
var Nt = 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) {
|
|
2417
|
+
let f = q(), p = Oe();
|
|
2242
2418
|
return /* @__PURE__ */ M(w, {
|
|
2243
2419
|
ref: d,
|
|
2244
2420
|
disabled: l,
|
|
2245
2421
|
accessibilityRole: "button",
|
|
2246
2422
|
accessibilityState: { disabled: !!l },
|
|
2247
2423
|
style: ({ pressed: i }) => {
|
|
2248
|
-
let { backgroundColor: a, borderColor: o } =
|
|
2424
|
+
let { backgroundColor: a, borderColor: o } = Mt(f, e, i, r), c = !r && (e === "suggested" || e === "destructive"), u = n === "circular" ? jt(t) : void 0, { minHeight: d, minWidth: m, paddingVertical: h, paddingHorizontal: g } = At(f, t);
|
|
2249
2425
|
return [{
|
|
2250
2426
|
flexDirection: "row",
|
|
2251
2427
|
alignItems: "center",
|
|
@@ -2266,7 +2442,7 @@ var ft = i(function({ variant: e = "default", size: t = "md", shape: n = "defaul
|
|
|
2266
2442
|
},
|
|
2267
2443
|
...u,
|
|
2268
2444
|
children: ({ pressed: n }) => {
|
|
2269
|
-
let { fontSize: s } =
|
|
2445
|
+
let { fontSize: s } = At(f, t), { color: l } = Mt(f, e, n, r);
|
|
2270
2446
|
return /* @__PURE__ */ N(j, { children: [
|
|
2271
2447
|
i,
|
|
2272
2448
|
typeof o == "string" ? /* @__PURE__ */ M(D, {
|
|
@@ -2285,7 +2461,7 @@ var ft = i(function({ variant: e = "default", size: t = "md", shape: n = "defaul
|
|
|
2285
2461
|
});
|
|
2286
2462
|
//#endregion
|
|
2287
2463
|
//#region src/components/Card/Card.tsx
|
|
2288
|
-
function
|
|
2464
|
+
function Pt(e, t) {
|
|
2289
2465
|
switch (t) {
|
|
2290
2466
|
case "none": return 0;
|
|
2291
2467
|
case "sm": return e.space2;
|
|
@@ -2293,14 +2469,14 @@ function pt(e, t) {
|
|
|
2293
2469
|
default: return e.space4;
|
|
2294
2470
|
}
|
|
2295
2471
|
}
|
|
2296
|
-
var
|
|
2297
|
-
let s =
|
|
2472
|
+
var Ft = i(function({ interactive: e = !1, padding: t = "md", style: n, children: r, disabled: i, ...a }, o) {
|
|
2473
|
+
let s = q(), c = {
|
|
2298
2474
|
backgroundColor: s.cardBgColor,
|
|
2299
2475
|
borderWidth: 1,
|
|
2300
2476
|
borderColor: s.cardShadeColor,
|
|
2301
2477
|
borderRadius: s.radiusLg,
|
|
2302
2478
|
overflow: "hidden",
|
|
2303
|
-
padding:
|
|
2479
|
+
padding: Pt(s, t)
|
|
2304
2480
|
};
|
|
2305
2481
|
return e ? /* @__PURE__ */ M(w, {
|
|
2306
2482
|
ref: o,
|
|
@@ -2329,8 +2505,8 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2329
2505
|
...a,
|
|
2330
2506
|
children: r
|
|
2331
2507
|
});
|
|
2332
|
-
}),
|
|
2333
|
-
let s =
|
|
2508
|
+
}), It = 18, Lt = i(function({ value: e, indeterminate: t = !1, onValueChange: n, disabled: r, style: i, ...a }, o) {
|
|
2509
|
+
let s = q(), l = K(), u = Oe(), f = e || t, p = d(new m.Value(+!!f)).current, h = d(!0);
|
|
2334
2510
|
c(() => {
|
|
2335
2511
|
if (h.current) {
|
|
2336
2512
|
h.current = !1;
|
|
@@ -2369,8 +2545,8 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2369
2545
|
...a,
|
|
2370
2546
|
children: /* @__PURE__ */ M(m.View, {
|
|
2371
2547
|
style: {
|
|
2372
|
-
width:
|
|
2373
|
-
height:
|
|
2548
|
+
width: It,
|
|
2549
|
+
height: It,
|
|
2374
2550
|
alignItems: "center",
|
|
2375
2551
|
justifyContent: "center",
|
|
2376
2552
|
borderRadius: s.radiusSm,
|
|
@@ -2396,8 +2572,452 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2396
2572
|
})
|
|
2397
2573
|
})
|
|
2398
2574
|
});
|
|
2399
|
-
}),
|
|
2400
|
-
let
|
|
2575
|
+
}), Rt = ({ label: e, icon: t, onRemove: n, selectable: r = !1, selected: i = !1, onToggle: a, disabled: o = !1, style: s, testID: c }) => {
|
|
2576
|
+
let l = q(), u = r && !n, d = {
|
|
2577
|
+
flexDirection: "row",
|
|
2578
|
+
alignItems: "center",
|
|
2579
|
+
gap: l.space1,
|
|
2580
|
+
paddingVertical: 3,
|
|
2581
|
+
paddingHorizontal: l.space2,
|
|
2582
|
+
borderRadius: l.radiusPill,
|
|
2583
|
+
borderWidth: 1,
|
|
2584
|
+
borderColor: i ? `${l.accentBgColor}80` : l.light3,
|
|
2585
|
+
backgroundColor: i ? `${l.accentBgColor}26` : l.cardBgColor,
|
|
2586
|
+
overflow: "hidden"
|
|
2587
|
+
}, f = {
|
|
2588
|
+
color: i ? l.accentColor : l.windowFgColor,
|
|
2589
|
+
fontWeight: String(i ? l.fontWeightSemibold : l.fontWeightNormal)
|
|
2590
|
+
}, p = /* @__PURE__ */ N(j, { children: [
|
|
2591
|
+
t && /* @__PURE__ */ M(k, {
|
|
2592
|
+
style: { marginStart: -2 },
|
|
2593
|
+
children: /* @__PURE__ */ M(X, {
|
|
2594
|
+
icon: t,
|
|
2595
|
+
size: "sm"
|
|
2596
|
+
})
|
|
2597
|
+
}),
|
|
2598
|
+
/* @__PURE__ */ M(Y, {
|
|
2599
|
+
variant: "caption",
|
|
2600
|
+
style: f,
|
|
2601
|
+
children: e
|
|
2602
|
+
}),
|
|
2603
|
+
n && /* @__PURE__ */ M(w, {
|
|
2604
|
+
accessibilityRole: "button",
|
|
2605
|
+
accessibilityLabel: `Remove ${e}`,
|
|
2606
|
+
disabled: o,
|
|
2607
|
+
onPress: n,
|
|
2608
|
+
hitSlop: 8,
|
|
2609
|
+
style: {
|
|
2610
|
+
marginEnd: -4,
|
|
2611
|
+
opacity: o ? l.opacityDisabled : 1
|
|
2612
|
+
},
|
|
2613
|
+
children: /* @__PURE__ */ M(X, {
|
|
2614
|
+
icon: L,
|
|
2615
|
+
size: "sm"
|
|
2616
|
+
})
|
|
2617
|
+
})
|
|
2618
|
+
] });
|
|
2619
|
+
return u ? /* @__PURE__ */ M(w, {
|
|
2620
|
+
testID: c,
|
|
2621
|
+
disabled: o,
|
|
2622
|
+
accessibilityRole: "checkbox",
|
|
2623
|
+
accessibilityState: {
|
|
2624
|
+
checked: i,
|
|
2625
|
+
disabled: o
|
|
2626
|
+
},
|
|
2627
|
+
accessibilityLabel: e,
|
|
2628
|
+
onPress: a,
|
|
2629
|
+
style: [
|
|
2630
|
+
d,
|
|
2631
|
+
{ opacity: o ? l.opacityDisabled : 1 },
|
|
2632
|
+
s
|
|
2633
|
+
],
|
|
2634
|
+
children: ({ pressed: e }) => /* @__PURE__ */ N(j, { children: [p, e && !o && /* @__PURE__ */ M(k, {
|
|
2635
|
+
pointerEvents: "none",
|
|
2636
|
+
style: [E.absoluteFill, { backgroundColor: l.activeOverlay }]
|
|
2637
|
+
})] })
|
|
2638
|
+
}) : /* @__PURE__ */ M(k, {
|
|
2639
|
+
testID: c,
|
|
2640
|
+
style: [
|
|
2641
|
+
d,
|
|
2642
|
+
{ opacity: o ? l.opacityDisabled : 1 },
|
|
2643
|
+
s
|
|
2644
|
+
],
|
|
2645
|
+
children: p
|
|
2646
|
+
});
|
|
2647
|
+
}, zt = (e) => Math.min(Math.max(e, 0), 1), Bt = i(function({ maximumSize: e = 600, tighteningThreshold: t = 1, children: n, style: r, ...i }, a) {
|
|
2648
|
+
return /* @__PURE__ */ M(k, {
|
|
2649
|
+
ref: a,
|
|
2650
|
+
style: [{
|
|
2651
|
+
width: `${zt(t) * 100}%`,
|
|
2652
|
+
maxWidth: e,
|
|
2653
|
+
alignSelf: "center"
|
|
2654
|
+
}, r],
|
|
2655
|
+
...i,
|
|
2656
|
+
children: n
|
|
2657
|
+
});
|
|
2658
|
+
}), Vt = 12, Z = 12, Ht = 7, Ut = (e, t) => ({
|
|
2659
|
+
top: e.top - t,
|
|
2660
|
+
left: e.left - t,
|
|
2661
|
+
width: e.width + t * 2,
|
|
2662
|
+
height: e.height + t * 2
|
|
2663
|
+
}), Wt = (e, t, n, r) => {
|
|
2664
|
+
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
|
+
r,
|
|
2666
|
+
{
|
|
2667
|
+
top: "bottom",
|
|
2668
|
+
bottom: "top",
|
|
2669
|
+
left: "right",
|
|
2670
|
+
right: "left"
|
|
2671
|
+
}[r],
|
|
2672
|
+
"bottom",
|
|
2673
|
+
"top",
|
|
2674
|
+
"right",
|
|
2675
|
+
"left"
|
|
2676
|
+
])], l = (n) => {
|
|
2677
|
+
switch (n) {
|
|
2678
|
+
case "bottom": return {
|
|
2679
|
+
top: a + Vt,
|
|
2680
|
+
left: o - t.width / 2
|
|
2681
|
+
};
|
|
2682
|
+
case "top": return {
|
|
2683
|
+
top: e.top - t.height - Vt,
|
|
2684
|
+
left: o - t.width / 2
|
|
2685
|
+
};
|
|
2686
|
+
case "left": return {
|
|
2687
|
+
top: s - t.height / 2,
|
|
2688
|
+
left: e.left - t.width - Vt
|
|
2689
|
+
};
|
|
2690
|
+
default: return {
|
|
2691
|
+
top: s - t.height / 2,
|
|
2692
|
+
left: i + Vt
|
|
2693
|
+
};
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
for (let e of c) {
|
|
2697
|
+
let { top: r, left: i } = l(e), a = i >= Z && i + t.width <= n.width - Z, c = r >= Z && r + t.height <= n.height - Z;
|
|
2698
|
+
if (a && c) return {
|
|
2699
|
+
top: r,
|
|
2700
|
+
left: i,
|
|
2701
|
+
placement: e,
|
|
2702
|
+
arrowOffset: e === "top" || e === "bottom" ? o - i : s - r
|
|
2703
|
+
};
|
|
2704
|
+
}
|
|
2705
|
+
for (let e of c) {
|
|
2706
|
+
let { top: r, left: i } = l(e);
|
|
2707
|
+
if (e === "top" || e === "bottom") {
|
|
2708
|
+
if (!(r >= Z && r + t.height <= n.height - Z)) continue;
|
|
2709
|
+
let a = Math.max(Z, Math.min(i, n.width - t.width - Z)), s = o - a;
|
|
2710
|
+
return {
|
|
2711
|
+
top: r,
|
|
2712
|
+
left: a,
|
|
2713
|
+
placement: e,
|
|
2714
|
+
arrowOffset: Math.max(11, Math.min(s, t.width - Ht - 4))
|
|
2715
|
+
};
|
|
2716
|
+
}
|
|
2717
|
+
if (!(i >= Z && i + t.width <= n.width - Z)) continue;
|
|
2718
|
+
let a = Math.max(Z, Math.min(r, n.height - t.height - Z)), c = s - a;
|
|
2719
|
+
return {
|
|
2720
|
+
top: a,
|
|
2721
|
+
left: i,
|
|
2722
|
+
placement: e,
|
|
2723
|
+
arrowOffset: Math.max(11, Math.min(c, t.height - Ht - 4))
|
|
2724
|
+
};
|
|
2725
|
+
}
|
|
2726
|
+
let u = a + Vt, 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
|
+
return {
|
|
2728
|
+
top: f,
|
|
2729
|
+
left: p,
|
|
2730
|
+
placement: "bottom",
|
|
2731
|
+
arrowOffset: Math.max(11, Math.min(m, t.width - Ht - 4))
|
|
2732
|
+
};
|
|
2733
|
+
}, Gt = 7, Kt = "rgba(0, 0, 0, 0.55)", qt = ({ 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
|
+
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
|
+
c(() => {
|
|
2736
|
+
if (!e) {
|
|
2737
|
+
D(null), A(null), F(null), I.setValue(0);
|
|
2738
|
+
return;
|
|
2739
|
+
}
|
|
2740
|
+
let n = setTimeout(() => {
|
|
2741
|
+
t.current?.measureInWindow((e, t, n, r) => {
|
|
2742
|
+
D({
|
|
2743
|
+
top: t,
|
|
2744
|
+
left: e,
|
|
2745
|
+
width: n,
|
|
2746
|
+
height: r
|
|
2747
|
+
});
|
|
2748
|
+
});
|
|
2749
|
+
}, 50);
|
|
2750
|
+
return () => clearTimeout(n);
|
|
2751
|
+
}, [
|
|
2752
|
+
e,
|
|
2753
|
+
t,
|
|
2754
|
+
I
|
|
2755
|
+
]), c(() => {
|
|
2756
|
+
if (!T || !O) return;
|
|
2757
|
+
let { width: e, height: t } = g.get("window");
|
|
2758
|
+
F(Wt(T, O, {
|
|
2759
|
+
width: e,
|
|
2760
|
+
height: t
|
|
2761
|
+
}, i));
|
|
2762
|
+
}, [
|
|
2763
|
+
T,
|
|
2764
|
+
O,
|
|
2765
|
+
i
|
|
2766
|
+
]), c(() => {
|
|
2767
|
+
if (P) {
|
|
2768
|
+
if (C) {
|
|
2769
|
+
I.setValue(1);
|
|
2770
|
+
return;
|
|
2771
|
+
}
|
|
2772
|
+
m.timing(I, {
|
|
2773
|
+
toValue: 1,
|
|
2774
|
+
duration: S.durationFast,
|
|
2775
|
+
useNativeDriver: !0
|
|
2776
|
+
}).start();
|
|
2777
|
+
}
|
|
2778
|
+
}, [
|
|
2779
|
+
P,
|
|
2780
|
+
C,
|
|
2781
|
+
I,
|
|
2782
|
+
S.durationFast
|
|
2783
|
+
]), c(() => {
|
|
2784
|
+
if (!e) return;
|
|
2785
|
+
let t = h.addEventListener("hardwareBackPress", () => (v?.(), !0));
|
|
2786
|
+
return () => t.remove();
|
|
2787
|
+
}, [e, v]);
|
|
2788
|
+
let L = (e) => {
|
|
2789
|
+
let { width: t, height: n } = e.nativeEvent.layout;
|
|
2790
|
+
A({
|
|
2791
|
+
width: t,
|
|
2792
|
+
height: n
|
|
2793
|
+
});
|
|
2794
|
+
};
|
|
2795
|
+
if (!e) return null;
|
|
2796
|
+
let R = T ? Ut(T, o) : null, { width: z } = g.get("window"), B = {
|
|
2797
|
+
position: "absolute",
|
|
2798
|
+
width: 0,
|
|
2799
|
+
height: 0,
|
|
2800
|
+
borderWidth: Gt,
|
|
2801
|
+
borderColor: "transparent"
|
|
2802
|
+
}, V = (() => {
|
|
2803
|
+
if (!P) return null;
|
|
2804
|
+
switch (P.placement) {
|
|
2805
|
+
case "top": return {
|
|
2806
|
+
...B,
|
|
2807
|
+
bottom: -14,
|
|
2808
|
+
left: P.arrowOffset - Gt,
|
|
2809
|
+
borderTopColor: S.cardBgColor
|
|
2810
|
+
};
|
|
2811
|
+
case "bottom": return {
|
|
2812
|
+
...B,
|
|
2813
|
+
top: -14,
|
|
2814
|
+
left: P.arrowOffset - Gt,
|
|
2815
|
+
borderBottomColor: S.cardBgColor
|
|
2816
|
+
};
|
|
2817
|
+
case "left": return {
|
|
2818
|
+
...B,
|
|
2819
|
+
right: -14,
|
|
2820
|
+
top: P.arrowOffset - Gt,
|
|
2821
|
+
borderLeftColor: S.cardBgColor
|
|
2822
|
+
};
|
|
2823
|
+
default: return {
|
|
2824
|
+
...B,
|
|
2825
|
+
left: -14,
|
|
2826
|
+
top: P.arrowOffset - Gt,
|
|
2827
|
+
borderRightColor: S.cardBgColor
|
|
2828
|
+
};
|
|
2829
|
+
}
|
|
2830
|
+
})();
|
|
2831
|
+
return /* @__PURE__ */ M(x, {
|
|
2832
|
+
visible: e,
|
|
2833
|
+
transparent: !0,
|
|
2834
|
+
animationType: "none",
|
|
2835
|
+
statusBarTranslucent: !0,
|
|
2836
|
+
onRequestClose: v,
|
|
2837
|
+
children: /* @__PURE__ */ N(m.View, {
|
|
2838
|
+
pointerEvents: "box-none",
|
|
2839
|
+
style: E.absoluteFill,
|
|
2840
|
+
children: [a && /* @__PURE__ */ M(w, {
|
|
2841
|
+
testID: b,
|
|
2842
|
+
onPress: s ? v : void 0,
|
|
2843
|
+
accessible: !1,
|
|
2844
|
+
style: E.absoluteFill,
|
|
2845
|
+
children: /* @__PURE__ */ M(m.View, {
|
|
2846
|
+
pointerEvents: "none",
|
|
2847
|
+
style: [E.absoluteFill, { opacity: I }],
|
|
2848
|
+
children: R && /* @__PURE__ */ N(j, { children: [
|
|
2849
|
+
/* @__PURE__ */ M(k, { style: {
|
|
2850
|
+
position: "absolute",
|
|
2851
|
+
top: 0,
|
|
2852
|
+
left: 0,
|
|
2853
|
+
right: 0,
|
|
2854
|
+
height: Math.max(0, R.top),
|
|
2855
|
+
backgroundColor: Kt
|
|
2856
|
+
} }),
|
|
2857
|
+
/* @__PURE__ */ M(k, { style: {
|
|
2858
|
+
position: "absolute",
|
|
2859
|
+
top: Math.max(0, R.top + R.height),
|
|
2860
|
+
left: 0,
|
|
2861
|
+
right: 0,
|
|
2862
|
+
bottom: 0,
|
|
2863
|
+
backgroundColor: Kt
|
|
2864
|
+
} }),
|
|
2865
|
+
/* @__PURE__ */ M(k, { style: {
|
|
2866
|
+
position: "absolute",
|
|
2867
|
+
top: Math.max(0, R.top),
|
|
2868
|
+
left: 0,
|
|
2869
|
+
width: Math.max(0, R.left),
|
|
2870
|
+
height: R.height,
|
|
2871
|
+
backgroundColor: Kt
|
|
2872
|
+
} }),
|
|
2873
|
+
/* @__PURE__ */ M(k, { style: {
|
|
2874
|
+
position: "absolute",
|
|
2875
|
+
top: Math.max(0, R.top),
|
|
2876
|
+
left: Math.max(0, R.left + R.width),
|
|
2877
|
+
right: 0,
|
|
2878
|
+
height: R.height,
|
|
2879
|
+
backgroundColor: Kt
|
|
2880
|
+
} }),
|
|
2881
|
+
/* @__PURE__ */ M(k, {
|
|
2882
|
+
pointerEvents: "none",
|
|
2883
|
+
style: {
|
|
2884
|
+
position: "absolute",
|
|
2885
|
+
top: R.top,
|
|
2886
|
+
left: R.left,
|
|
2887
|
+
width: R.width,
|
|
2888
|
+
height: R.height,
|
|
2889
|
+
borderRadius: S.radiusMd,
|
|
2890
|
+
borderWidth: 2,
|
|
2891
|
+
borderColor: S.accentColor
|
|
2892
|
+
}
|
|
2893
|
+
})
|
|
2894
|
+
] })
|
|
2895
|
+
})
|
|
2896
|
+
}), /* @__PURE__ */ N(m.View, {
|
|
2897
|
+
onLayout: L,
|
|
2898
|
+
accessible: !0,
|
|
2899
|
+
role: "dialog",
|
|
2900
|
+
accessibilityViewIsModal: !0,
|
|
2901
|
+
style: [
|
|
2902
|
+
{
|
|
2903
|
+
position: "absolute",
|
|
2904
|
+
maxWidth: Math.min(320, z - 24),
|
|
2905
|
+
padding: S.space3,
|
|
2906
|
+
backgroundColor: S.cardBgColor,
|
|
2907
|
+
borderRadius: S.radiusLg,
|
|
2908
|
+
shadowColor: "#000",
|
|
2909
|
+
shadowOffset: {
|
|
2910
|
+
width: 0,
|
|
2911
|
+
height: 4
|
|
2912
|
+
},
|
|
2913
|
+
shadowOpacity: .2,
|
|
2914
|
+
shadowRadius: 16,
|
|
2915
|
+
elevation: 8
|
|
2916
|
+
},
|
|
2917
|
+
P ? {
|
|
2918
|
+
top: P.top,
|
|
2919
|
+
left: P.left,
|
|
2920
|
+
opacity: I,
|
|
2921
|
+
transform: [{ scale: I.interpolate({
|
|
2922
|
+
inputRange: [0, 1],
|
|
2923
|
+
outputRange: [.96, 1]
|
|
2924
|
+
}) }]
|
|
2925
|
+
} : {
|
|
2926
|
+
top: -9999,
|
|
2927
|
+
left: -9999,
|
|
2928
|
+
opacity: 0
|
|
2929
|
+
},
|
|
2930
|
+
y
|
|
2931
|
+
],
|
|
2932
|
+
children: [
|
|
2933
|
+
V && /* @__PURE__ */ M(k, { style: V }),
|
|
2934
|
+
l !== void 0 && u !== void 0 && /* @__PURE__ */ M(Y, {
|
|
2935
|
+
variant: "caption",
|
|
2936
|
+
style: {
|
|
2937
|
+
marginBottom: S.space1,
|
|
2938
|
+
color: S.accentColor,
|
|
2939
|
+
fontWeight: String(S.fontWeightBold)
|
|
2940
|
+
},
|
|
2941
|
+
children: `${l} of ${u}`
|
|
2942
|
+
}),
|
|
2943
|
+
n && /* @__PURE__ */ M(Y, {
|
|
2944
|
+
variant: "title-4",
|
|
2945
|
+
style: {
|
|
2946
|
+
marginBottom: S.space1,
|
|
2947
|
+
fontWeight: String(S.fontWeightBold)
|
|
2948
|
+
},
|
|
2949
|
+
children: n
|
|
2950
|
+
}),
|
|
2951
|
+
r && /* @__PURE__ */ M(Y, {
|
|
2952
|
+
variant: "body",
|
|
2953
|
+
color: "dim",
|
|
2954
|
+
children: r
|
|
2955
|
+
}),
|
|
2956
|
+
(p || _) && /* @__PURE__ */ N(k, {
|
|
2957
|
+
style: {
|
|
2958
|
+
flexDirection: "row",
|
|
2959
|
+
justifyContent: "flex-end",
|
|
2960
|
+
gap: S.space2,
|
|
2961
|
+
marginTop: S.space3
|
|
2962
|
+
},
|
|
2963
|
+
children: [_ && /* @__PURE__ */ M(Nt, {
|
|
2964
|
+
variant: "flat",
|
|
2965
|
+
size: "sm",
|
|
2966
|
+
onPress: _.onPress,
|
|
2967
|
+
children: _.label
|
|
2968
|
+
}), p && /* @__PURE__ */ M(Nt, {
|
|
2969
|
+
variant: "suggested",
|
|
2970
|
+
size: "sm",
|
|
2971
|
+
onPress: p.onPress,
|
|
2972
|
+
children: p.label
|
|
2973
|
+
})]
|
|
2974
|
+
})
|
|
2975
|
+
]
|
|
2976
|
+
})]
|
|
2977
|
+
})
|
|
2978
|
+
});
|
|
2979
|
+
}, Jt = {
|
|
2980
|
+
next: "Next",
|
|
2981
|
+
back: "Back",
|
|
2982
|
+
skip: "Skip",
|
|
2983
|
+
finish: "Done"
|
|
2984
|
+
}, Yt = ({ 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
|
+
let [p, m] = f(n);
|
|
2986
|
+
if (c(() => {
|
|
2987
|
+
t && m(n);
|
|
2988
|
+
}, [t, n]), !t || e.length === 0) return null;
|
|
2989
|
+
let h = Math.min(p, e.length - 1), g = e[h], _ = h === 0, v = h === e.length - 1, y = {
|
|
2990
|
+
...Jt,
|
|
2991
|
+
...u
|
|
2992
|
+
}, b = (e) => {
|
|
2993
|
+
m(e), a?.(e);
|
|
2994
|
+
}, x = {
|
|
2995
|
+
label: v ? y.finish : y.next,
|
|
2996
|
+
onPress: () => v ? r?.() : b(h + 1)
|
|
2997
|
+
}, S = _ ? {
|
|
2998
|
+
label: y.skip,
|
|
2999
|
+
onPress: () => i?.()
|
|
3000
|
+
} : {
|
|
3001
|
+
label: y.back,
|
|
3002
|
+
onPress: () => b(h - 1)
|
|
3003
|
+
};
|
|
3004
|
+
return /* @__PURE__ */ M(qt, {
|
|
3005
|
+
open: t,
|
|
3006
|
+
targetRef: g.targetRef,
|
|
3007
|
+
title: g.title,
|
|
3008
|
+
description: g.description,
|
|
3009
|
+
placement: g.placement ?? o,
|
|
3010
|
+
spotlight: s,
|
|
3011
|
+
dismissOnBackdrop: l,
|
|
3012
|
+
step: h + 1,
|
|
3013
|
+
stepCount: e.length,
|
|
3014
|
+
primaryAction: x,
|
|
3015
|
+
secondaryAction: S,
|
|
3016
|
+
onDismiss: () => i?.(),
|
|
3017
|
+
testID: d
|
|
3018
|
+
});
|
|
3019
|
+
}, Xt = m.createAnimatedComponent(w), Zt = ({ open: e, title: t, children: n, buttons: r = [], onClose: i, closeOnBackdrop: a = !0, role: o = "dialog", responses: s, onResponse: l, style: u, testID: f }) => {
|
|
3020
|
+
let p = q(), g = K(), v = J(), y = d(new m.Value(+!!v)).current, b = !!s, S = () => {
|
|
2401
3021
|
let e = s?.find((e) => e.variant !== "destructive" && !e.disabled);
|
|
2402
3022
|
e && l?.(e.id);
|
|
2403
3023
|
}, C = () => {
|
|
@@ -2456,7 +3076,7 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2456
3076
|
backgroundColor: r ? p.activeOverlay : "transparent",
|
|
2457
3077
|
opacity: t.disabled ? p.opacityDisabled : 1
|
|
2458
3078
|
}),
|
|
2459
|
-
children: /* @__PURE__ */ M(
|
|
3079
|
+
children: /* @__PURE__ */ M(Y, {
|
|
2460
3080
|
variant: "body",
|
|
2461
3081
|
style: {
|
|
2462
3082
|
textAlign: "center",
|
|
@@ -2483,7 +3103,7 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2483
3103
|
animationType: "none",
|
|
2484
3104
|
statusBarTranslucent: !0,
|
|
2485
3105
|
onRequestClose: C,
|
|
2486
|
-
children: /* @__PURE__ */ M(
|
|
3106
|
+
children: /* @__PURE__ */ M(Xt, {
|
|
2487
3107
|
testID: f,
|
|
2488
3108
|
onPress: T,
|
|
2489
3109
|
style: {
|
|
@@ -2525,7 +3145,7 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2525
3145
|
}) }]
|
|
2526
3146
|
}, u],
|
|
2527
3147
|
children: [
|
|
2528
|
-
t && /* @__PURE__ */ M(
|
|
3148
|
+
t && /* @__PURE__ */ M(Y, {
|
|
2529
3149
|
variant: "title-4",
|
|
2530
3150
|
style: {
|
|
2531
3151
|
padding: p.space4,
|
|
@@ -2540,7 +3160,7 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2540
3160
|
paddingVertical: p.space2,
|
|
2541
3161
|
paddingHorizontal: p.space4
|
|
2542
3162
|
},
|
|
2543
|
-
children: typeof n == "string" ? /* @__PURE__ */ M(
|
|
3163
|
+
children: typeof n == "string" ? /* @__PURE__ */ M(Y, {
|
|
2544
3164
|
variant: "body",
|
|
2545
3165
|
style: {
|
|
2546
3166
|
textAlign: "center",
|
|
@@ -2555,8 +3175,8 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2555
3175
|
})
|
|
2556
3176
|
})
|
|
2557
3177
|
});
|
|
2558
|
-
},
|
|
2559
|
-
let i =
|
|
3178
|
+
}, Qt = ({ children: e, accessibilityLabel: t, style: n, testID: r }) => {
|
|
3179
|
+
let i = q(), a = !!e;
|
|
2560
3180
|
return /* @__PURE__ */ N(k, {
|
|
2561
3181
|
testID: r,
|
|
2562
3182
|
accessible: !0,
|
|
@@ -2572,7 +3192,7 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2572
3192
|
flex: 1,
|
|
2573
3193
|
height: 1,
|
|
2574
3194
|
backgroundColor: i.cardShadeColor
|
|
2575
|
-
} }), a && /* @__PURE__ */ N(j, { children: [typeof e == "string" ? /* @__PURE__ */ M(
|
|
3195
|
+
} }), a && /* @__PURE__ */ N(j, { children: [typeof e == "string" ? /* @__PURE__ */ M(Y, {
|
|
2576
3196
|
variant: "caption",
|
|
2577
3197
|
color: "dim",
|
|
2578
3198
|
children: e
|
|
@@ -2582,37 +3202,450 @@ var mt = i(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2582
3202
|
backgroundColor: i.cardShadeColor
|
|
2583
3203
|
} })] })]
|
|
2584
3204
|
});
|
|
2585
|
-
},
|
|
2586
|
-
function
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
left: e.x,
|
|
2591
|
-
width: e.width,
|
|
2592
|
-
flipUp: r
|
|
2593
|
-
};
|
|
2594
|
-
}
|
|
2595
|
-
var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an option", accessibilityLabel: i, disabled: a, style: o, testID: s }) => {
|
|
2596
|
-
let l = U(), u = W(), [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 = () => {
|
|
2597
|
-
a || h(!0);
|
|
2598
|
-
}, A = () => h(!1), j = (e) => {
|
|
2599
|
-
e.disabled || (n?.(e.value), A());
|
|
2600
|
-
};
|
|
2601
|
-
return c(() => {
|
|
2602
|
-
if (!p) {
|
|
2603
|
-
_(null), y(null), S(null);
|
|
3205
|
+
}, $t = 6, Q = 8, en = 5;
|
|
3206
|
+
function tn(e, t) {
|
|
3207
|
+
if (e) {
|
|
3208
|
+
if (typeof e == "function") {
|
|
3209
|
+
e(t);
|
|
2604
3210
|
return;
|
|
2605
3211
|
}
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
3212
|
+
e.current = t;
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
function nn(e, t, n) {
|
|
3216
|
+
switch (n) {
|
|
3217
|
+
case "top": return {
|
|
3218
|
+
top: e.y - t.height - $t,
|
|
3219
|
+
left: e.x + e.width / 2 - t.width / 2
|
|
3220
|
+
};
|
|
3221
|
+
case "bottom": return {
|
|
3222
|
+
top: e.y + e.height + $t,
|
|
3223
|
+
left: e.x + e.width / 2 - t.width / 2
|
|
3224
|
+
};
|
|
3225
|
+
case "left": return {
|
|
3226
|
+
top: e.y + e.height / 2 - t.height / 2,
|
|
3227
|
+
left: e.x - t.width - $t
|
|
3228
|
+
};
|
|
3229
|
+
case "right": return {
|
|
3230
|
+
top: e.y + e.height / 2 - t.height / 2,
|
|
3231
|
+
left: e.x + e.width + $t
|
|
3232
|
+
};
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
function rn(e, t, n) {
|
|
3236
|
+
let { width: r, height: i } = g.get("window"), a = [
|
|
3237
|
+
n,
|
|
3238
|
+
n === "top" ? "bottom" : n === "bottom" ? "top" : n === "left" ? "right" : "left",
|
|
3239
|
+
"top",
|
|
3240
|
+
"bottom",
|
|
3241
|
+
"left",
|
|
3242
|
+
"right"
|
|
3243
|
+
];
|
|
3244
|
+
for (let n of a) {
|
|
3245
|
+
let { top: a, left: o } = nn(e, t, n), s = o >= Q && o + t.width <= r - Q, c = a >= Q && a + t.height <= i - Q;
|
|
3246
|
+
if (s && c) return {
|
|
3247
|
+
top: Math.max(Q, Math.min(a, i - t.height - Q)),
|
|
3248
|
+
left: Math.max(Q, Math.min(o, r - t.width - Q)),
|
|
3249
|
+
placement: n
|
|
3250
|
+
};
|
|
3251
|
+
}
|
|
3252
|
+
let { top: o, left: s } = nn(e, t, n);
|
|
3253
|
+
return {
|
|
3254
|
+
top: Math.max(Q, Math.min(o, i - t.height - Q)),
|
|
3255
|
+
left: Math.max(Q, Math.min(s, r - t.width - Q)),
|
|
3256
|
+
placement: n
|
|
3257
|
+
};
|
|
3258
|
+
}
|
|
3259
|
+
var an = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
3260
|
+
let a = q(), s = K(), 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
|
+
C.current &&= (clearTimeout(C.current), null);
|
|
3262
|
+
}, []), D = o(() => {
|
|
3263
|
+
T(), p(!0);
|
|
3264
|
+
}, [T]), O = o(() => {
|
|
3265
|
+
T(), C.current = setTimeout(D, r);
|
|
3266
|
+
}, [
|
|
3267
|
+
T,
|
|
3268
|
+
D,
|
|
3269
|
+
r
|
|
3270
|
+
]), A = o(() => {
|
|
3271
|
+
T(), p(!1);
|
|
3272
|
+
}, [T]);
|
|
3273
|
+
c(() => {
|
|
3274
|
+
if (!u) {
|
|
3275
|
+
g(null), v(null), b(null);
|
|
3276
|
+
return;
|
|
3277
|
+
}
|
|
3278
|
+
S.current?.measureInWindow((e, t, n, r) => {
|
|
3279
|
+
g({
|
|
3280
|
+
x: e,
|
|
3281
|
+
y: t,
|
|
3282
|
+
width: n,
|
|
3283
|
+
height: r
|
|
3284
|
+
});
|
|
3285
|
+
});
|
|
3286
|
+
}, [u]), c(() => {
|
|
3287
|
+
!h || !_ || b(rn(h, _, t));
|
|
3288
|
+
}, [
|
|
3289
|
+
h,
|
|
3290
|
+
_,
|
|
3291
|
+
t
|
|
3292
|
+
]), c(() => {
|
|
3293
|
+
if (y) {
|
|
3294
|
+
if (l) {
|
|
3295
|
+
w.setValue(1);
|
|
3296
|
+
return;
|
|
3297
|
+
}
|
|
3298
|
+
w.setValue(0), m.timing(w, {
|
|
3299
|
+
toValue: 1,
|
|
3300
|
+
duration: a.durationFast,
|
|
3301
|
+
useNativeDriver: !0
|
|
3302
|
+
}).start();
|
|
3303
|
+
}
|
|
3304
|
+
}, [
|
|
3305
|
+
y,
|
|
3306
|
+
l,
|
|
3307
|
+
w,
|
|
3308
|
+
a.durationFast
|
|
3309
|
+
]), c(() => T, [T]);
|
|
3310
|
+
let P = (e) => {
|
|
3311
|
+
let { width: t, height: n } = e.nativeEvent.layout;
|
|
3312
|
+
v({
|
|
3313
|
+
width: t,
|
|
3314
|
+
height: n
|
|
3315
|
+
});
|
|
3316
|
+
}, F = s === "dark" ? "#c0bfbc" : "#3d3d3d", I = s === "dark" ? "rgba(0, 0, 0, 0.8)" : "#fff", L = s === "dark" ? {
|
|
3317
|
+
shadowOpacity: .4,
|
|
3318
|
+
shadowRadius: 8,
|
|
3319
|
+
elevation: 6
|
|
3320
|
+
} : {
|
|
3321
|
+
shadowOpacity: .2,
|
|
3322
|
+
shadowRadius: 8,
|
|
3323
|
+
elevation: 4
|
|
3324
|
+
}, R = {
|
|
3325
|
+
position: "absolute",
|
|
3326
|
+
width: 0,
|
|
3327
|
+
height: 0,
|
|
3328
|
+
borderWidth: en,
|
|
3329
|
+
borderColor: "transparent"
|
|
3330
|
+
}, z = (() => {
|
|
3331
|
+
switch (y?.placement) {
|
|
3332
|
+
case "top": return {
|
|
3333
|
+
...R,
|
|
3334
|
+
top: "100%",
|
|
3335
|
+
left: "50%",
|
|
3336
|
+
marginLeft: -5,
|
|
3337
|
+
borderTopColor: F
|
|
3338
|
+
};
|
|
3339
|
+
case "bottom": return {
|
|
3340
|
+
...R,
|
|
3341
|
+
bottom: "100%",
|
|
3342
|
+
left: "50%",
|
|
3343
|
+
marginLeft: -5,
|
|
3344
|
+
borderBottomColor: F
|
|
3345
|
+
};
|
|
3346
|
+
case "left": return {
|
|
3347
|
+
...R,
|
|
3348
|
+
left: "100%",
|
|
3349
|
+
top: "50%",
|
|
3350
|
+
marginTop: -5,
|
|
3351
|
+
borderLeftColor: F
|
|
3352
|
+
};
|
|
3353
|
+
case "right": return {
|
|
3354
|
+
...R,
|
|
3355
|
+
right: "100%",
|
|
3356
|
+
top: "50%",
|
|
3357
|
+
marginTop: -5,
|
|
3358
|
+
borderRightColor: F
|
|
3359
|
+
};
|
|
3360
|
+
default: return null;
|
|
3361
|
+
}
|
|
3362
|
+
})(), B = i.props.ref;
|
|
3363
|
+
return /* @__PURE__ */ N(j, { children: [n(i, {
|
|
3364
|
+
ref: (e) => {
|
|
3365
|
+
S.current = e, tn(B, e);
|
|
3366
|
+
},
|
|
3367
|
+
delayLongPress: r,
|
|
3368
|
+
accessibilityHint: i.props.accessibilityHint ?? e,
|
|
3369
|
+
onLongPress: (e) => {
|
|
3370
|
+
D(), i.props.onLongPress?.(e);
|
|
3371
|
+
},
|
|
3372
|
+
onPressOut: (e) => {
|
|
3373
|
+
A(), i.props.onPressOut?.(e);
|
|
3374
|
+
},
|
|
3375
|
+
onHoverIn: (e) => {
|
|
3376
|
+
O(), i.props.onHoverIn?.(e);
|
|
3377
|
+
},
|
|
3378
|
+
onHoverOut: (e) => {
|
|
3379
|
+
A(), i.props.onHoverOut?.(e);
|
|
3380
|
+
},
|
|
3381
|
+
onFocus: (e) => {
|
|
3382
|
+
O(), i.props.onFocus?.(e);
|
|
3383
|
+
},
|
|
3384
|
+
onBlur: (e) => {
|
|
3385
|
+
A(), i.props.onBlur?.(e);
|
|
3386
|
+
}
|
|
3387
|
+
}), /* @__PURE__ */ M(x, {
|
|
3388
|
+
visible: u,
|
|
3389
|
+
transparent: !0,
|
|
3390
|
+
animationType: "none",
|
|
3391
|
+
statusBarTranslucent: !0,
|
|
3392
|
+
children: /* @__PURE__ */ M(k, {
|
|
3393
|
+
pointerEvents: "box-none",
|
|
3394
|
+
style: E.absoluteFill,
|
|
3395
|
+
children: /* @__PURE__ */ N(m.View, {
|
|
3396
|
+
onLayout: P,
|
|
3397
|
+
accessible: !0,
|
|
3398
|
+
role: "tooltip",
|
|
3399
|
+
style: [{
|
|
3400
|
+
position: "absolute",
|
|
3401
|
+
maxWidth: 240,
|
|
3402
|
+
paddingVertical: 4,
|
|
3403
|
+
paddingHorizontal: a.space2,
|
|
3404
|
+
backgroundColor: F,
|
|
3405
|
+
borderRadius: a.radiusSm,
|
|
3406
|
+
shadowColor: "#000",
|
|
3407
|
+
shadowOffset: {
|
|
3408
|
+
width: 0,
|
|
3409
|
+
height: 2
|
|
3410
|
+
},
|
|
3411
|
+
...L
|
|
3412
|
+
}, y ? {
|
|
3413
|
+
top: y.top,
|
|
3414
|
+
left: y.left,
|
|
3415
|
+
opacity: w
|
|
3416
|
+
} : {
|
|
3417
|
+
top: -9999,
|
|
3418
|
+
left: -9999,
|
|
3419
|
+
opacity: 0
|
|
3420
|
+
}],
|
|
3421
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
3422
|
+
style: {
|
|
3423
|
+
color: I,
|
|
3424
|
+
fontSize: a.fontSizeCaption,
|
|
3425
|
+
fontWeight: String(a.fontWeightNormal),
|
|
3426
|
+
lineHeight: a.fontSizeCaption * a.lineHeightBody,
|
|
3427
|
+
textAlign: "center"
|
|
3428
|
+
},
|
|
3429
|
+
children: e
|
|
3430
|
+
}), z && /* @__PURE__ */ M(k, { style: z })]
|
|
3431
|
+
})
|
|
3432
|
+
})
|
|
3433
|
+
})] });
|
|
3434
|
+
}, on = {
|
|
3435
|
+
sm: "sm",
|
|
3436
|
+
md: "md",
|
|
3437
|
+
lg: "lg"
|
|
3438
|
+
}, sn = i(function({ icon: e, label: t, variant: n = "default", size: r = "md", iconSize: i, tooltip: a, tooltipPlacement: o, tooltipDelay: s, ...c }, l) {
|
|
3439
|
+
let u = /* @__PURE__ */ M(Nt, {
|
|
3440
|
+
ref: l,
|
|
3441
|
+
accessibilityLabel: t,
|
|
3442
|
+
shape: "circular",
|
|
3443
|
+
size: r,
|
|
3444
|
+
variant: n === "osd" ? "flat" : n,
|
|
3445
|
+
osd: n === "osd",
|
|
3446
|
+
...c,
|
|
3447
|
+
children: /* @__PURE__ */ M(X, {
|
|
3448
|
+
icon: e,
|
|
3449
|
+
size: i ?? on[r]
|
|
3450
|
+
})
|
|
3451
|
+
});
|
|
3452
|
+
return a ? /* @__PURE__ */ M(an, {
|
|
3453
|
+
label: a,
|
|
3454
|
+
placement: o,
|
|
3455
|
+
delay: s,
|
|
3456
|
+
children: u
|
|
3457
|
+
}) : u;
|
|
3458
|
+
}), cn = m.createAnimatedComponent(w), ln = r(0), un = {
|
|
3459
|
+
classic: 420,
|
|
3460
|
+
wide: 640
|
|
3461
|
+
}, dn = .85, fn = 240, pn = ({ 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 }) => {
|
|
3462
|
+
let v = q(), y = K(), b = J(), S = s(ln), C = i === void 0 ? a : i, T = un[n], E = S > 0 ? Math.max(fn, Math.round(T * dn ** S)) : T, D = g.get("window").width - v.space3 * 2, O = Math.min(E, D), A = d(new m.Value(+!!b)).current;
|
|
3463
|
+
c(() => {
|
|
3464
|
+
if (!e) return;
|
|
3465
|
+
if (b) {
|
|
3466
|
+
A.setValue(1);
|
|
3467
|
+
return;
|
|
3468
|
+
}
|
|
3469
|
+
A.setValue(0);
|
|
3470
|
+
let [t, n, r, i] = v.easingDefault;
|
|
3471
|
+
m.timing(A, {
|
|
3472
|
+
toValue: 1,
|
|
3473
|
+
duration: v.durationNormal,
|
|
3474
|
+
easing: _.bezier(t, n, r, i),
|
|
3475
|
+
useNativeDriver: !0
|
|
3476
|
+
}).start();
|
|
3477
|
+
}, [
|
|
3478
|
+
e,
|
|
3479
|
+
b,
|
|
3480
|
+
A,
|
|
3481
|
+
v.durationNormal,
|
|
3482
|
+
v.easingDefault
|
|
3483
|
+
]), c(() => {
|
|
3484
|
+
if (!e) return;
|
|
3485
|
+
let t = h.addEventListener("hardwareBackPress", () => (o?.(), !0));
|
|
3486
|
+
return () => t.remove();
|
|
3487
|
+
}, [e, o]);
|
|
3488
|
+
let j = t === "left" ? -O : O, P = A.interpolate({
|
|
3489
|
+
inputRange: [0, 1],
|
|
3490
|
+
outputRange: [j, 0]
|
|
3491
|
+
}), F = y === "dark" ? {
|
|
3492
|
+
shadowOpacity: .45,
|
|
3493
|
+
shadowRadius: 24,
|
|
3494
|
+
elevation: 12
|
|
3495
|
+
} : {
|
|
3496
|
+
shadowOpacity: .18,
|
|
3497
|
+
shadowRadius: 24,
|
|
3498
|
+
elevation: 8
|
|
3499
|
+
}, I = u && u.length > 0 ? /* @__PURE__ */ M(k, {
|
|
3500
|
+
style: {
|
|
3501
|
+
width: 56,
|
|
3502
|
+
flexShrink: 0,
|
|
3503
|
+
alignItems: "center",
|
|
3504
|
+
gap: v.space2,
|
|
3505
|
+
paddingVertical: v.space3,
|
|
3506
|
+
[t === "right" ? "borderRightWidth" : "borderLeftWidth"]: 1,
|
|
3507
|
+
borderColor: v.cardShadeColor
|
|
3508
|
+
},
|
|
3509
|
+
children: u.map((e) => /* @__PURE__ */ M(sn, {
|
|
3510
|
+
icon: e.icon,
|
|
3511
|
+
label: e.label,
|
|
3512
|
+
tooltip: e.label,
|
|
3513
|
+
tooltipPlacement: t === "right" ? "left" : "right",
|
|
3514
|
+
variant: "flat",
|
|
3515
|
+
size: "sm",
|
|
3516
|
+
disabled: e.disabled,
|
|
3517
|
+
accessibilityState: {
|
|
3518
|
+
selected: !!e.active,
|
|
3519
|
+
disabled: !!e.disabled
|
|
3520
|
+
},
|
|
3521
|
+
onPress: e.onPress
|
|
3522
|
+
}, e.id))
|
|
3523
|
+
}) : null;
|
|
3524
|
+
return /* @__PURE__ */ M(x, {
|
|
3525
|
+
visible: e,
|
|
3526
|
+
transparent: !0,
|
|
3527
|
+
animationType: "none",
|
|
3528
|
+
statusBarTranslucent: !0,
|
|
3529
|
+
onRequestClose: o,
|
|
3530
|
+
children: /* @__PURE__ */ M(cn, {
|
|
3531
|
+
testID: p,
|
|
3532
|
+
onPress: l ? o : void 0,
|
|
3533
|
+
accessible: !1,
|
|
3534
|
+
style: {
|
|
3535
|
+
flex: 1,
|
|
3536
|
+
flexDirection: "row",
|
|
3537
|
+
justifyContent: t === "left" ? "flex-start" : "flex-end",
|
|
3538
|
+
padding: v.space3,
|
|
3539
|
+
backgroundColor: v.dialogBackdropColor,
|
|
3540
|
+
opacity: A
|
|
3541
|
+
},
|
|
3542
|
+
children: /* @__PURE__ */ M(w, {
|
|
3543
|
+
onPress: () => {},
|
|
3544
|
+
accessible: !1,
|
|
3545
|
+
style: { width: O },
|
|
3546
|
+
children: /* @__PURE__ */ N(m.View, {
|
|
3547
|
+
accessible: !0,
|
|
3548
|
+
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));
|
|
2616
3649
|
}, [g, v]), c(() => {
|
|
2617
3650
|
if (b) {
|
|
2618
3651
|
if (u) {
|
|
@@ -2658,7 +3691,7 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2658
3691
|
borderRadius: l.radiusMd,
|
|
2659
3692
|
opacity: a ? l.opacityDisabled : 1
|
|
2660
3693
|
}),
|
|
2661
|
-
children: [/* @__PURE__ */ M(
|
|
3694
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
2662
3695
|
numberOfLines: 1,
|
|
2663
3696
|
style: {
|
|
2664
3697
|
flex: 1,
|
|
@@ -2667,8 +3700,8 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2667
3700
|
opacity: D ? 1 : l.opacityDim
|
|
2668
3701
|
},
|
|
2669
3702
|
children: D?.label ?? r
|
|
2670
|
-
}), /* @__PURE__ */ M(
|
|
2671
|
-
icon:
|
|
3703
|
+
}), /* @__PURE__ */ M(X, {
|
|
3704
|
+
icon: ne,
|
|
2672
3705
|
size: "md",
|
|
2673
3706
|
color: "default",
|
|
2674
3707
|
style: { transform: [{ rotate: p ? "180deg" : "0deg" }] }
|
|
@@ -2685,13 +3718,13 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2685
3718
|
testID: s ? `${s}-backdrop` : void 0,
|
|
2686
3719
|
children: /* @__PURE__ */ M(m.View, {
|
|
2687
3720
|
onLayout: (e) => {
|
|
2688
|
-
y(Math.min(e.nativeEvent.layout.height,
|
|
3721
|
+
y(Math.min(e.nativeEvent.layout.height, gn));
|
|
2689
3722
|
},
|
|
2690
3723
|
role: "list",
|
|
2691
3724
|
accessible: !0,
|
|
2692
3725
|
style: [{
|
|
2693
3726
|
position: "absolute",
|
|
2694
|
-
maxHeight:
|
|
3727
|
+
maxHeight: gn,
|
|
2695
3728
|
backgroundColor: l.popoverBgColor,
|
|
2696
3729
|
borderWidth: 1,
|
|
2697
3730
|
borderColor: l.cardShadeColor,
|
|
@@ -2743,7 +3776,7 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2743
3776
|
flex: 1,
|
|
2744
3777
|
gap: 1
|
|
2745
3778
|
},
|
|
2746
|
-
children: [/* @__PURE__ */ M(
|
|
3779
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
2747
3780
|
numberOfLines: 1,
|
|
2748
3781
|
style: {
|
|
2749
3782
|
fontSize: l.fontSizeBody,
|
|
@@ -2751,7 +3784,7 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2751
3784
|
fontWeight: n ? String(l.fontWeightSemibold) : void 0
|
|
2752
3785
|
},
|
|
2753
3786
|
children: e.label
|
|
2754
|
-
}), e.description && /* @__PURE__ */ M(
|
|
3787
|
+
}), e.description && /* @__PURE__ */ M(Y, {
|
|
2755
3788
|
numberOfLines: 1,
|
|
2756
3789
|
style: {
|
|
2757
3790
|
fontSize: l.fontSizeCaption,
|
|
@@ -2760,8 +3793,8 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2760
3793
|
},
|
|
2761
3794
|
children: e.description
|
|
2762
3795
|
})]
|
|
2763
|
-
}), n && /* @__PURE__ */ M(
|
|
2764
|
-
icon:
|
|
3796
|
+
}), n && /* @__PURE__ */ M(X, {
|
|
3797
|
+
icon: I,
|
|
2765
3798
|
size: "md",
|
|
2766
3799
|
color: "blue"
|
|
2767
3800
|
})]
|
|
@@ -2772,8 +3805,8 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2772
3805
|
})
|
|
2773
3806
|
})]
|
|
2774
3807
|
});
|
|
2775
|
-
},
|
|
2776
|
-
let l =
|
|
3808
|
+
}, yn = ({ label: e, children: t, expanded: n, defaultExpanded: r = !1, onExpandedChange: i, disabled: a = !1, style: o, testID: s }) => {
|
|
3809
|
+
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 = () => {
|
|
2777
3810
|
if (a) return;
|
|
2778
3811
|
let e = !v;
|
|
2779
3812
|
p || g(e), i?.(e);
|
|
@@ -2843,11 +3876,11 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2843
3876
|
opacity: .55,
|
|
2844
3877
|
transform: [{ rotate: O }]
|
|
2845
3878
|
},
|
|
2846
|
-
children: /* @__PURE__ */ M(
|
|
2847
|
-
icon:
|
|
3879
|
+
children: /* @__PURE__ */ M(X, {
|
|
3880
|
+
icon: re,
|
|
2848
3881
|
size: "md"
|
|
2849
3882
|
})
|
|
2850
|
-
}), typeof e == "string" ? /* @__PURE__ */ M(
|
|
3883
|
+
}), typeof e == "string" ? /* @__PURE__ */ M(Y, {
|
|
2851
3884
|
style: { color: l.windowFgColor },
|
|
2852
3885
|
children: e
|
|
2853
3886
|
}) : e]
|
|
@@ -2867,8 +3900,179 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2867
3900
|
})
|
|
2868
3901
|
})]
|
|
2869
3902
|
});
|
|
2870
|
-
},
|
|
2871
|
-
|
|
3903
|
+
}, bn = {
|
|
3904
|
+
folder: V,
|
|
3905
|
+
image: ee,
|
|
3906
|
+
audio: F,
|
|
3907
|
+
video: ae,
|
|
3908
|
+
text: ie,
|
|
3909
|
+
pdf: z,
|
|
3910
|
+
archive: te,
|
|
3911
|
+
document: oe,
|
|
3912
|
+
spreadsheet: ce,
|
|
3913
|
+
presentation: se,
|
|
3914
|
+
font: H,
|
|
3915
|
+
executable: P,
|
|
3916
|
+
unknown: ie
|
|
3917
|
+
}, xn = {
|
|
3918
|
+
folder: "Folder",
|
|
3919
|
+
image: "Image file",
|
|
3920
|
+
audio: "Audio file",
|
|
3921
|
+
video: "Video file",
|
|
3922
|
+
text: "Text file",
|
|
3923
|
+
pdf: "PDF document",
|
|
3924
|
+
archive: "Archive",
|
|
3925
|
+
document: "Document",
|
|
3926
|
+
spreadsheet: "Spreadsheet",
|
|
3927
|
+
presentation: "Presentation",
|
|
3928
|
+
font: "Font file",
|
|
3929
|
+
executable: "Executable",
|
|
3930
|
+
unknown: "File"
|
|
3931
|
+
}, Sn = {
|
|
3932
|
+
png: "image",
|
|
3933
|
+
jpg: "image",
|
|
3934
|
+
jpeg: "image",
|
|
3935
|
+
gif: "image",
|
|
3936
|
+
webp: "image",
|
|
3937
|
+
svg: "image",
|
|
3938
|
+
bmp: "image",
|
|
3939
|
+
ico: "image",
|
|
3940
|
+
tiff: "image",
|
|
3941
|
+
heic: "image",
|
|
3942
|
+
mp3: "audio",
|
|
3943
|
+
wav: "audio",
|
|
3944
|
+
ogg: "audio",
|
|
3945
|
+
flac: "audio",
|
|
3946
|
+
m4a: "audio",
|
|
3947
|
+
aac: "audio",
|
|
3948
|
+
mp4: "video",
|
|
3949
|
+
mov: "video",
|
|
3950
|
+
avi: "video",
|
|
3951
|
+
mkv: "video",
|
|
3952
|
+
webm: "video",
|
|
3953
|
+
m4v: "video",
|
|
3954
|
+
pdf: "pdf",
|
|
3955
|
+
zip: "archive",
|
|
3956
|
+
tar: "archive",
|
|
3957
|
+
gz: "archive",
|
|
3958
|
+
rar: "archive",
|
|
3959
|
+
"7z": "archive",
|
|
3960
|
+
xz: "archive",
|
|
3961
|
+
doc: "document",
|
|
3962
|
+
docx: "document",
|
|
3963
|
+
odt: "document",
|
|
3964
|
+
rtf: "document",
|
|
3965
|
+
xls: "spreadsheet",
|
|
3966
|
+
xlsx: "spreadsheet",
|
|
3967
|
+
ods: "spreadsheet",
|
|
3968
|
+
csv: "spreadsheet",
|
|
3969
|
+
ppt: "presentation",
|
|
3970
|
+
pptx: "presentation",
|
|
3971
|
+
odp: "presentation",
|
|
3972
|
+
ttf: "font",
|
|
3973
|
+
otf: "font",
|
|
3974
|
+
woff: "font",
|
|
3975
|
+
woff2: "font",
|
|
3976
|
+
exe: "executable",
|
|
3977
|
+
app: "executable",
|
|
3978
|
+
sh: "executable",
|
|
3979
|
+
bin: "executable",
|
|
3980
|
+
txt: "text",
|
|
3981
|
+
md: "text",
|
|
3982
|
+
log: "text",
|
|
3983
|
+
json: "text",
|
|
3984
|
+
yaml: "text",
|
|
3985
|
+
yml: "text",
|
|
3986
|
+
toml: "text",
|
|
3987
|
+
xml: "text",
|
|
3988
|
+
html: "text",
|
|
3989
|
+
css: "text",
|
|
3990
|
+
js: "text",
|
|
3991
|
+
jsx: "text",
|
|
3992
|
+
ts: "text",
|
|
3993
|
+
tsx: "text",
|
|
3994
|
+
py: "text",
|
|
3995
|
+
rb: "text",
|
|
3996
|
+
go: "text",
|
|
3997
|
+
rs: "text",
|
|
3998
|
+
c: "text",
|
|
3999
|
+
cpp: "text",
|
|
4000
|
+
h: "text",
|
|
4001
|
+
java: "text",
|
|
4002
|
+
sql: "text"
|
|
4003
|
+
}, Cn = {
|
|
4004
|
+
image: "image",
|
|
4005
|
+
audio: "audio",
|
|
4006
|
+
video: "video",
|
|
4007
|
+
text: "text",
|
|
4008
|
+
font: "font"
|
|
4009
|
+
}, wn = {
|
|
4010
|
+
pdf: "pdf",
|
|
4011
|
+
zip: "archive",
|
|
4012
|
+
gzip: "archive",
|
|
4013
|
+
"x-tar": "archive",
|
|
4014
|
+
"x-7z-compressed": "archive",
|
|
4015
|
+
"x-rar-compressed": "archive",
|
|
4016
|
+
"vnd.rar": "archive",
|
|
4017
|
+
msword: "document",
|
|
4018
|
+
"vnd.openxmlformats-officedocument.wordprocessingml.document": "document",
|
|
4019
|
+
"vnd.oasis.opendocument.text": "document",
|
|
4020
|
+
"vnd.ms-excel": "spreadsheet",
|
|
4021
|
+
"vnd.openxmlformats-officedocument.spreadsheetml.sheet": "spreadsheet",
|
|
4022
|
+
"vnd.oasis.opendocument.spreadsheet": "spreadsheet",
|
|
4023
|
+
"vnd.ms-powerpoint": "presentation",
|
|
4024
|
+
"vnd.openxmlformats-officedocument.presentationml.presentation": "presentation",
|
|
4025
|
+
"vnd.oasis.opendocument.presentation": "presentation",
|
|
4026
|
+
"x-sh": "executable",
|
|
4027
|
+
"x-executable": "executable"
|
|
4028
|
+
};
|
|
4029
|
+
function Tn(e) {
|
|
4030
|
+
let t = e.trim().toLowerCase();
|
|
4031
|
+
if (t === "inode/directory") return "folder";
|
|
4032
|
+
let [n, r] = t.split("/");
|
|
4033
|
+
return r && wn[r] ? wn[r] : Cn[n] ?? null;
|
|
4034
|
+
}
|
|
4035
|
+
function En(e) {
|
|
4036
|
+
let t = e.trim().replace(/^\.+/, ""), n = t.lastIndexOf(".");
|
|
4037
|
+
return n <= 0 ? null : Sn[t.slice(n + 1).toLowerCase()] ?? null;
|
|
4038
|
+
}
|
|
4039
|
+
function Dn(e) {
|
|
4040
|
+
return bn[e];
|
|
4041
|
+
}
|
|
4042
|
+
function On(e) {
|
|
4043
|
+
return xn[e];
|
|
4044
|
+
}
|
|
4045
|
+
//#endregion
|
|
4046
|
+
//#region src/components/FileTypeIcon/FileTypeIcon.tsx
|
|
4047
|
+
var kn = ({ name: e, mimeType: t, isFolder: n = !1, thumbnail: r, label: i, size: a = "md", style: o, testID: s }) => {
|
|
4048
|
+
let c = q(), l = Ve[a], u = n ? "folder" : t && Tn(t) || e && En(e) || "unknown";
|
|
4049
|
+
return /* @__PURE__ */ M(k, {
|
|
4050
|
+
testID: s,
|
|
4051
|
+
accessible: !0,
|
|
4052
|
+
role: "img",
|
|
4053
|
+
accessibilityLabel: i ?? On(u),
|
|
4054
|
+
style: [{
|
|
4055
|
+
width: l,
|
|
4056
|
+
height: l,
|
|
4057
|
+
alignItems: "center",
|
|
4058
|
+
justifyContent: "center"
|
|
4059
|
+
}, o],
|
|
4060
|
+
children: r ? /* @__PURE__ */ M(y, {
|
|
4061
|
+
testID: s ? `${s}-thumbnail` : void 0,
|
|
4062
|
+
source: { uri: r },
|
|
4063
|
+
resizeMode: "cover",
|
|
4064
|
+
style: {
|
|
4065
|
+
width: l,
|
|
4066
|
+
height: l,
|
|
4067
|
+
borderRadius: c.radiusSm
|
|
4068
|
+
}
|
|
4069
|
+
}) : /* @__PURE__ */ M(X, {
|
|
4070
|
+
icon: Dn(u),
|
|
4071
|
+
size: a
|
|
4072
|
+
})
|
|
4073
|
+
});
|
|
4074
|
+
}, An = i(function({ title: e, start: t, end: n, flat: r = !1, style: i, ...a }, o) {
|
|
4075
|
+
let s = q();
|
|
2872
4076
|
return /* @__PURE__ */ N(k, {
|
|
2873
4077
|
ref: o,
|
|
2874
4078
|
style: [{
|
|
@@ -2927,23 +4131,23 @@ var wt = ({ options: e, value: t, onChange: n, placeholder: r = "Select an optio
|
|
|
2927
4131
|
});
|
|
2928
4132
|
//#endregion
|
|
2929
4133
|
//#region src/components/Highlight/Highlight.tsx
|
|
2930
|
-
function
|
|
4134
|
+
function jn(e) {
|
|
2931
4135
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2932
4136
|
}
|
|
2933
|
-
var
|
|
2934
|
-
let i =
|
|
2935
|
-
if (o.length === 0) return /* @__PURE__ */ M(
|
|
4137
|
+
var Mn = ({ text: e, query: t, caseSensitive: n = !1, ...r }) => {
|
|
4138
|
+
let i = q(), a = Oe(), o = (Array.isArray(t) ? t : [t]).map((e) => e.trim()).filter(Boolean);
|
|
4139
|
+
if (o.length === 0) return /* @__PURE__ */ M(Y, {
|
|
2936
4140
|
...r,
|
|
2937
4141
|
children: e
|
|
2938
4142
|
});
|
|
2939
|
-
let s = RegExp(`(${o.map(
|
|
4143
|
+
let s = RegExp(`(${o.map(jn).join("|")})`, n ? "g" : "gi"), c = e.split(s), l = {
|
|
2940
4144
|
fontWeight: String(i.fontWeightSemibold),
|
|
2941
4145
|
...a === "more" ? {
|
|
2942
4146
|
backgroundColor: i.accentBgColor,
|
|
2943
4147
|
color: "#fff"
|
|
2944
4148
|
} : { backgroundColor: `${i.accentBgColor}4D` }
|
|
2945
4149
|
};
|
|
2946
|
-
return /* @__PURE__ */ M(
|
|
4150
|
+
return /* @__PURE__ */ M(Y, {
|
|
2947
4151
|
...r,
|
|
2948
4152
|
children: c.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ M(D, {
|
|
2949
4153
|
style: l,
|
|
@@ -2952,11 +4156,369 @@ var Ot = ({ text: e, query: t, caseSensitive: n = !1, ...r }) => {
|
|
|
2952
4156
|
});
|
|
2953
4157
|
};
|
|
2954
4158
|
//#endregion
|
|
4159
|
+
//#region src/components/InlineViewSwitcher/variants.ts
|
|
4160
|
+
function Nn(e, t, n) {
|
|
4161
|
+
let r = n ? "rgba(255, 255, 255, 0.12)" : e.light3, i = `${e.accentBgColor}${n ? "40" : "26"}`, a = `${e.accentBgColor}${n ? "80" : "66"}`;
|
|
4162
|
+
switch (t) {
|
|
4163
|
+
case "flat": return {
|
|
4164
|
+
container: {
|
|
4165
|
+
backgroundColor: "transparent",
|
|
4166
|
+
borderRadius: e.radiusMd,
|
|
4167
|
+
padding: 2,
|
|
4168
|
+
gap: 2
|
|
4169
|
+
},
|
|
4170
|
+
gap: 2,
|
|
4171
|
+
padding: 2,
|
|
4172
|
+
item: {
|
|
4173
|
+
borderRadius: e.radiusMd - 2,
|
|
4174
|
+
paddingHorizontal: e.space2
|
|
4175
|
+
},
|
|
4176
|
+
iconOnlyItem: {
|
|
4177
|
+
paddingHorizontal: 4,
|
|
4178
|
+
minWidth: 28
|
|
4179
|
+
},
|
|
4180
|
+
indicator: {
|
|
4181
|
+
backgroundColor: i,
|
|
4182
|
+
borderRadius: e.radiusMd - 2
|
|
4183
|
+
},
|
|
4184
|
+
indicatorInset: 2,
|
|
4185
|
+
activeTextColor: e.accentColor,
|
|
4186
|
+
idleTextColor: e.windowFgColor
|
|
4187
|
+
};
|
|
4188
|
+
case "round": return {
|
|
4189
|
+
container: {
|
|
4190
|
+
backgroundColor: e.cardBgColor,
|
|
4191
|
+
borderWidth: 1,
|
|
4192
|
+
borderColor: r,
|
|
4193
|
+
borderRadius: e.radiusPill,
|
|
4194
|
+
padding: 2,
|
|
4195
|
+
gap: 2
|
|
4196
|
+
},
|
|
4197
|
+
gap: 2,
|
|
4198
|
+
padding: 2,
|
|
4199
|
+
item: {
|
|
4200
|
+
borderRadius: e.radiusPill,
|
|
4201
|
+
paddingHorizontal: e.space2
|
|
4202
|
+
},
|
|
4203
|
+
iconOnlyItem: {
|
|
4204
|
+
paddingHorizontal: 4,
|
|
4205
|
+
minWidth: 28
|
|
4206
|
+
},
|
|
4207
|
+
indicator: {
|
|
4208
|
+
backgroundColor: e.accentBgColor,
|
|
4209
|
+
borderRadius: e.radiusPill
|
|
4210
|
+
},
|
|
4211
|
+
indicatorInset: 2,
|
|
4212
|
+
activeTextColor: e.accentFgColor,
|
|
4213
|
+
idleTextColor: e.windowFgColor
|
|
4214
|
+
};
|
|
4215
|
+
case "pill": return {
|
|
4216
|
+
container: {
|
|
4217
|
+
backgroundColor: e.hoverOverlay,
|
|
4218
|
+
borderRadius: e.radiusPill,
|
|
4219
|
+
padding: 3,
|
|
4220
|
+
gap: 2
|
|
4221
|
+
},
|
|
4222
|
+
gap: 2,
|
|
4223
|
+
padding: 3,
|
|
4224
|
+
item: {
|
|
4225
|
+
borderRadius: e.radiusPill,
|
|
4226
|
+
paddingVertical: 5,
|
|
4227
|
+
paddingHorizontal: e.space2
|
|
4228
|
+
},
|
|
4229
|
+
iconOnlyItem: {
|
|
4230
|
+
paddingHorizontal: 5,
|
|
4231
|
+
minWidth: 28
|
|
4232
|
+
},
|
|
4233
|
+
indicator: {
|
|
4234
|
+
backgroundColor: e.cardBgColor,
|
|
4235
|
+
borderRadius: e.radiusPill
|
|
4236
|
+
},
|
|
4237
|
+
indicatorInset: 3,
|
|
4238
|
+
activeTextColor: e.windowFgColor,
|
|
4239
|
+
idleTextColor: e.windowFgColor
|
|
4240
|
+
};
|
|
4241
|
+
default: return {
|
|
4242
|
+
container: {
|
|
4243
|
+
backgroundColor: e.cardBgColor,
|
|
4244
|
+
borderWidth: 1,
|
|
4245
|
+
borderColor: r,
|
|
4246
|
+
borderRadius: e.radiusMd,
|
|
4247
|
+
padding: 2,
|
|
4248
|
+
gap: 2
|
|
4249
|
+
},
|
|
4250
|
+
gap: 2,
|
|
4251
|
+
padding: 2,
|
|
4252
|
+
item: {
|
|
4253
|
+
borderRadius: e.radiusMd - 2,
|
|
4254
|
+
paddingHorizontal: e.space2
|
|
4255
|
+
},
|
|
4256
|
+
iconOnlyItem: {
|
|
4257
|
+
paddingHorizontal: 4,
|
|
4258
|
+
minWidth: 28
|
|
4259
|
+
},
|
|
4260
|
+
indicator: {
|
|
4261
|
+
backgroundColor: i,
|
|
4262
|
+
borderRadius: e.radiusMd - 2,
|
|
4263
|
+
borderWidth: 1,
|
|
4264
|
+
borderColor: a
|
|
4265
|
+
},
|
|
4266
|
+
indicatorInset: 2,
|
|
4267
|
+
activeTextColor: e.accentColor,
|
|
4268
|
+
idleTextColor: e.windowFgColor
|
|
4269
|
+
};
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
function Pn(e, t, n) {
|
|
4273
|
+
return {
|
|
4274
|
+
fontFamily: e.fontFamily,
|
|
4275
|
+
fontSize: e.fontSizeBody,
|
|
4276
|
+
fontWeight: String(t ? e.fontWeightSemibold : e.fontWeightNormal),
|
|
4277
|
+
color: n
|
|
4278
|
+
};
|
|
4279
|
+
}
|
|
4280
|
+
//#endregion
|
|
4281
|
+
//#region src/components/InlineViewSwitcher/InlineViewSwitcher.tsx
|
|
4282
|
+
var Fn = r(null);
|
|
4283
|
+
function In() {
|
|
4284
|
+
let e = s(Fn);
|
|
4285
|
+
if (!e) throw Error("InlineViewSwitcherItem must be used inside InlineViewSwitcher");
|
|
4286
|
+
return e;
|
|
4287
|
+
}
|
|
4288
|
+
var Ln = 160, Rn = 30, zn = i(function({ value: t, onValueChange: n, variant: r = "default", overflow: i = "wrap", accessibilityLabel: s = "View switcher", children: l, style: p, ...h }, g) {
|
|
4289
|
+
let _ = q(), v = K() === "dark", y = J(), b = u(() => Nn(_, r, v), [
|
|
4290
|
+
_,
|
|
4291
|
+
r,
|
|
4292
|
+
v
|
|
4293
|
+
]), [x, S] = f({}), [C, E] = f(0), [O, A] = f(!1), [P, F] = f(!1), L = d(0), R = d(new m.Value(0)).current, z = d(new m.Value(0)).current, B = o((e, t) => {
|
|
4294
|
+
S((n) => {
|
|
4295
|
+
let r = n[e];
|
|
4296
|
+
return r && r.x === t.x && r.width === t.width ? n : {
|
|
4297
|
+
...n,
|
|
4298
|
+
[e]: t
|
|
4299
|
+
};
|
|
4300
|
+
});
|
|
4301
|
+
}, []), V = i === "compact" || i === "menu", H = u(() => e.toArray(l).filter(a).filter((e) => e.type.displayName === "InlineViewSwitcherItem").map((e) => e.props), [l]), ee = u(() => {
|
|
4302
|
+
let e = H.map((e) => x[e.name]?.width ?? 0);
|
|
4303
|
+
if (e.some((e) => e === 0)) return 0;
|
|
4304
|
+
let t = Math.max(H.length - 1, 0) * b.gap;
|
|
4305
|
+
return e.reduce((e, t) => e + t, 0) + t + 2 * b.padding;
|
|
4306
|
+
}, [
|
|
4307
|
+
H,
|
|
4308
|
+
x,
|
|
4309
|
+
b.gap,
|
|
4310
|
+
b.padding
|
|
4311
|
+
]);
|
|
4312
|
+
c(() => {
|
|
4313
|
+
if (!V || C === 0 || ee === 0) {
|
|
4314
|
+
V || A(!1);
|
|
4315
|
+
return;
|
|
4316
|
+
}
|
|
4317
|
+
A((e) => e ? L.current > C + Rn : ee > C ? (L.current = ee, !0) : !1);
|
|
4318
|
+
}, [
|
|
4319
|
+
V,
|
|
4320
|
+
C,
|
|
4321
|
+
ee
|
|
4322
|
+
]);
|
|
4323
|
+
let te = i === "compact" && O, re = i === "menu" && O, U = H.find((e) => e.name === t) ?? H[0], W = x[t];
|
|
4324
|
+
c(() => {
|
|
4325
|
+
if (re || !W) return;
|
|
4326
|
+
if (y) {
|
|
4327
|
+
R.setValue(W.x), z.setValue(W.width);
|
|
4328
|
+
return;
|
|
4329
|
+
}
|
|
4330
|
+
let e = m.parallel([m.timing(R, {
|
|
4331
|
+
toValue: W.x,
|
|
4332
|
+
duration: Ln,
|
|
4333
|
+
useNativeDriver: !1
|
|
4334
|
+
}), m.timing(z, {
|
|
4335
|
+
toValue: W.width,
|
|
4336
|
+
duration: Ln,
|
|
4337
|
+
useNativeDriver: !1
|
|
4338
|
+
})]);
|
|
4339
|
+
return e.start(), () => e.stop();
|
|
4340
|
+
}, [
|
|
4341
|
+
W,
|
|
4342
|
+
re,
|
|
4343
|
+
y,
|
|
4344
|
+
R,
|
|
4345
|
+
z
|
|
4346
|
+
]);
|
|
4347
|
+
let ie = u(() => ({
|
|
4348
|
+
value: t,
|
|
4349
|
+
onValueChange: n,
|
|
4350
|
+
compact: te,
|
|
4351
|
+
styles: b,
|
|
4352
|
+
onItemLayout: B
|
|
4353
|
+
}), [
|
|
4354
|
+
t,
|
|
4355
|
+
n,
|
|
4356
|
+
te,
|
|
4357
|
+
b,
|
|
4358
|
+
B
|
|
4359
|
+
]), ae = o((e) => {
|
|
4360
|
+
V && E(e.nativeEvent.layout.width);
|
|
4361
|
+
}, [V]), oe = u(() => i === "scroll" ? H.map((e) => x[e.name]?.x ?? 0).filter((e, t) => t === 0 || e > 0) : void 0, [
|
|
4362
|
+
i,
|
|
4363
|
+
H,
|
|
4364
|
+
x
|
|
4365
|
+
]), se = /* @__PURE__ */ M(k, {
|
|
4366
|
+
ref: g,
|
|
4367
|
+
accessibilityRole: re ? void 0 : "radiogroup",
|
|
4368
|
+
accessibilityLabel: s,
|
|
4369
|
+
onLayout: ae,
|
|
4370
|
+
style: [
|
|
4371
|
+
{
|
|
4372
|
+
flexDirection: "row",
|
|
4373
|
+
alignItems: "stretch"
|
|
4374
|
+
},
|
|
4375
|
+
b.container,
|
|
4376
|
+
V ? { width: "100%" } : { alignSelf: "flex-start" },
|
|
4377
|
+
p
|
|
4378
|
+
],
|
|
4379
|
+
...h,
|
|
4380
|
+
children: re ? /* @__PURE__ */ N(w, {
|
|
4381
|
+
accessibilityRole: "button",
|
|
4382
|
+
accessibilityLabel: `${s}: ${U?.label ?? U?.name}`,
|
|
4383
|
+
onPress: () => F(!0),
|
|
4384
|
+
style: [{
|
|
4385
|
+
flexDirection: "row",
|
|
4386
|
+
alignItems: "center",
|
|
4387
|
+
justifyContent: "center",
|
|
4388
|
+
gap: _.space1,
|
|
4389
|
+
minHeight: 28,
|
|
4390
|
+
paddingVertical: 4
|
|
4391
|
+
}, b.item],
|
|
4392
|
+
children: [
|
|
4393
|
+
U?.icon ? /* @__PURE__ */ M(X, {
|
|
4394
|
+
icon: U.icon,
|
|
4395
|
+
size: "md"
|
|
4396
|
+
}) : null,
|
|
4397
|
+
U?.label ? /* @__PURE__ */ M(D, {
|
|
4398
|
+
style: Pn(_, !0, b.idleTextColor),
|
|
4399
|
+
children: U.label
|
|
4400
|
+
}) : null,
|
|
4401
|
+
/* @__PURE__ */ M(X, {
|
|
4402
|
+
icon: ne,
|
|
4403
|
+
size: "sm"
|
|
4404
|
+
})
|
|
4405
|
+
]
|
|
4406
|
+
}) : /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(m.View, {
|
|
4407
|
+
pointerEvents: "none",
|
|
4408
|
+
style: [{
|
|
4409
|
+
position: "absolute",
|
|
4410
|
+
left: 0,
|
|
4411
|
+
top: b.indicatorInset,
|
|
4412
|
+
bottom: b.indicatorInset,
|
|
4413
|
+
width: z,
|
|
4414
|
+
transform: [{ translateX: R }]
|
|
4415
|
+
}, b.indicator]
|
|
4416
|
+
}), l] })
|
|
4417
|
+
});
|
|
4418
|
+
return /* @__PURE__ */ N(Fn.Provider, {
|
|
4419
|
+
value: ie,
|
|
4420
|
+
children: [i === "scroll" ? /* @__PURE__ */ M(T, {
|
|
4421
|
+
horizontal: !0,
|
|
4422
|
+
showsHorizontalScrollIndicator: !1,
|
|
4423
|
+
snapToOffsets: oe,
|
|
4424
|
+
decelerationRate: "fast",
|
|
4425
|
+
contentContainerStyle: { flexGrow: 0 },
|
|
4426
|
+
style: { flexGrow: 0 },
|
|
4427
|
+
children: se
|
|
4428
|
+
}) : se, i === "menu" ? /* @__PURE__ */ M(wt, {
|
|
4429
|
+
open: P,
|
|
4430
|
+
title: s,
|
|
4431
|
+
onClose: () => F(!1),
|
|
4432
|
+
children: /* @__PURE__ */ M(k, {
|
|
4433
|
+
accessibilityRole: "radiogroup",
|
|
4434
|
+
accessibilityLabel: s,
|
|
4435
|
+
children: H.map((e) => {
|
|
4436
|
+
let r = e.name === t;
|
|
4437
|
+
return /* @__PURE__ */ N(w, {
|
|
4438
|
+
accessibilityRole: "radio",
|
|
4439
|
+
accessibilityState: { checked: r },
|
|
4440
|
+
accessibilityLabel: e.label ?? e.name,
|
|
4441
|
+
onPress: () => {
|
|
4442
|
+
n(e.name), F(!1);
|
|
4443
|
+
},
|
|
4444
|
+
style: ({ pressed: e }) => ({
|
|
4445
|
+
flexDirection: "row",
|
|
4446
|
+
alignItems: "center",
|
|
4447
|
+
gap: _.space2,
|
|
4448
|
+
paddingVertical: _.space2,
|
|
4449
|
+
paddingHorizontal: _.space3,
|
|
4450
|
+
borderRadius: _.radiusMd,
|
|
4451
|
+
backgroundColor: e ? _.activeOverlay : "transparent"
|
|
4452
|
+
}),
|
|
4453
|
+
children: [
|
|
4454
|
+
e.icon ? /* @__PURE__ */ M(X, {
|
|
4455
|
+
icon: e.icon,
|
|
4456
|
+
size: "md"
|
|
4457
|
+
}) : null,
|
|
4458
|
+
/* @__PURE__ */ M(D, {
|
|
4459
|
+
style: [Pn(_, r, r ? _.accentColor : _.windowFgColor), { flex: 1 }],
|
|
4460
|
+
children: e.label ?? e.name
|
|
4461
|
+
}),
|
|
4462
|
+
r ? /* @__PURE__ */ M(X, {
|
|
4463
|
+
icon: I,
|
|
4464
|
+
size: "md"
|
|
4465
|
+
}) : null
|
|
4466
|
+
]
|
|
4467
|
+
}, e.name);
|
|
4468
|
+
})
|
|
4469
|
+
})
|
|
4470
|
+
}) : null]
|
|
4471
|
+
});
|
|
4472
|
+
}), Bn = i(function({ name: e, label: t, icon: n, accessibilityLabel: r, disabled: i = !1, ...a }, s) {
|
|
4473
|
+
let c = q(), { value: l, onValueChange: u, compact: d, styles: f, onItemLayout: p } = In(), m = l === e, h = !!t && !(d && n), g = !!n && !h;
|
|
4474
|
+
return /* @__PURE__ */ N(w, {
|
|
4475
|
+
ref: s,
|
|
4476
|
+
disabled: i,
|
|
4477
|
+
onPress: () => u(e),
|
|
4478
|
+
onLayout: o((t) => {
|
|
4479
|
+
let { x: n, width: r } = t.nativeEvent.layout;
|
|
4480
|
+
p(e, {
|
|
4481
|
+
x: n,
|
|
4482
|
+
width: r
|
|
4483
|
+
});
|
|
4484
|
+
}, [e, p]),
|
|
4485
|
+
accessibilityRole: "radio",
|
|
4486
|
+
accessibilityState: {
|
|
4487
|
+
checked: m,
|
|
4488
|
+
disabled: i
|
|
4489
|
+
},
|
|
4490
|
+
accessibilityLabel: r ?? t,
|
|
4491
|
+
style: [
|
|
4492
|
+
{
|
|
4493
|
+
flexDirection: "row",
|
|
4494
|
+
alignItems: "center",
|
|
4495
|
+
justifyContent: "center",
|
|
4496
|
+
gap: c.space1,
|
|
4497
|
+
minHeight: 28,
|
|
4498
|
+
paddingVertical: 4,
|
|
4499
|
+
opacity: i ? c.opacityDisabled : 1
|
|
4500
|
+
},
|
|
4501
|
+
f.item,
|
|
4502
|
+
g ? f.iconOnlyItem : null
|
|
4503
|
+
],
|
|
4504
|
+
...a,
|
|
4505
|
+
children: [n ? /* @__PURE__ */ M(X, {
|
|
4506
|
+
icon: n,
|
|
4507
|
+
size: "md"
|
|
4508
|
+
}) : null, h ? /* @__PURE__ */ M(D, {
|
|
4509
|
+
numberOfLines: 1,
|
|
4510
|
+
style: Pn(c, m, m ? f.activeTextColor : f.idleTextColor),
|
|
4511
|
+
children: t
|
|
4512
|
+
}) : null]
|
|
4513
|
+
});
|
|
4514
|
+
});
|
|
4515
|
+
Bn.displayName = "InlineViewSwitcherItem";
|
|
4516
|
+
//#endregion
|
|
2955
4517
|
//#region src/components/LevelBar/LevelBar.tsx
|
|
2956
|
-
function
|
|
4518
|
+
function Vn(e, t, n, r, i, a) {
|
|
2957
4519
|
return t !== void 0 && e <= t ? n : r !== void 0 && e >= r ? i : a;
|
|
2958
4520
|
}
|
|
2959
|
-
function
|
|
4521
|
+
function Hn(e, t) {
|
|
2960
4522
|
switch (t) {
|
|
2961
4523
|
case "accent": return e.accentBgColor;
|
|
2962
4524
|
case "success": return e.successBgColor;
|
|
@@ -2964,8 +4526,8 @@ function At(e, t) {
|
|
|
2964
4526
|
case "error": return e.errorBgColor;
|
|
2965
4527
|
}
|
|
2966
4528
|
}
|
|
2967
|
-
var
|
|
2968
|
-
let g =
|
|
4529
|
+
var Un = ({ 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 }) => {
|
|
4530
|
+
let g = q(), v = K(), y = J(), b = n - t, x = Math.min(n, Math.max(t, e)), S = b > 0 ? (x - t) / b : 0, C = Vn(x, r, i, a, o, s), w = d(new m.Value(S)).current;
|
|
2969
4531
|
c(() => {
|
|
2970
4532
|
if (l) return;
|
|
2971
4533
|
let [e, t, n, r] = g.easingDefault;
|
|
@@ -3012,7 +4574,7 @@ var jt = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
3012
4574
|
height: "100%",
|
|
3013
4575
|
minWidth: 2,
|
|
3014
4576
|
borderRadius: 1,
|
|
3015
|
-
backgroundColor: (t + 1) / u <= S ?
|
|
4577
|
+
backgroundColor: (t + 1) / u <= S ? Hn(g, C) : T
|
|
3016
4578
|
}
|
|
3017
4579
|
}, t)) : /* @__PURE__ */ M(m.View, {
|
|
3018
4580
|
testID: h ? `${h}-fill` : void 0,
|
|
@@ -3020,14 +4582,14 @@ var jt = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
3020
4582
|
width: "100%",
|
|
3021
4583
|
height: "100%",
|
|
3022
4584
|
borderRadius: g.radiusPill,
|
|
3023
|
-
backgroundColor:
|
|
4585
|
+
backgroundColor: Hn(g, C),
|
|
3024
4586
|
transformOrigin: "left",
|
|
3025
4587
|
transform: [{ scaleX: w }]
|
|
3026
4588
|
}
|
|
3027
4589
|
})
|
|
3028
4590
|
});
|
|
3029
|
-
},
|
|
3030
|
-
let c =
|
|
4591
|
+
}, Wn = i(function({ href: e, external: t = !1, children: n, style: r, textStyle: i, onPress: a, ...o }, s) {
|
|
4592
|
+
let c = q();
|
|
3031
4593
|
return /* @__PURE__ */ M(w, {
|
|
3032
4594
|
ref: s,
|
|
3033
4595
|
accessibilityRole: "link",
|
|
@@ -3035,7 +4597,7 @@ var jt = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
3035
4597
|
onPress: a ?? (() => b.openURL(e)),
|
|
3036
4598
|
style: r,
|
|
3037
4599
|
...o,
|
|
3038
|
-
children: ({ pressed: e }) => /* @__PURE__ */ N(
|
|
4600
|
+
children: ({ pressed: e }) => /* @__PURE__ */ N(Y, {
|
|
3039
4601
|
style: [{
|
|
3040
4602
|
color: c.accentColor,
|
|
3041
4603
|
textDecorationLine: e ? "underline" : "none",
|
|
@@ -3049,8 +4611,8 @@ var jt = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
3049
4611
|
})]
|
|
3050
4612
|
})
|
|
3051
4613
|
});
|
|
3052
|
-
}),
|
|
3053
|
-
let a =
|
|
4614
|
+
}), Gn = m.createAnimatedComponent(w), Kn = ({ open: e, onDismiss: t, children: n, style: r, testID: i }) => {
|
|
4615
|
+
let a = q(), o = J(), [s, l] = f(e), u = d(new m.Value(+!!e)).current;
|
|
3054
4616
|
return c(() => {
|
|
3055
4617
|
e && l(!0);
|
|
3056
4618
|
}, [e]), c(() => {
|
|
@@ -3088,7 +4650,7 @@ var jt = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
3088
4650
|
transparent: !0,
|
|
3089
4651
|
animationType: "none",
|
|
3090
4652
|
statusBarTranslucent: !0,
|
|
3091
|
-
children: /* @__PURE__ */ M(
|
|
4653
|
+
children: /* @__PURE__ */ M(Gn, {
|
|
3092
4654
|
testID: i,
|
|
3093
4655
|
onPress: t,
|
|
3094
4656
|
accessible: !1,
|
|
@@ -3106,8 +4668,8 @@ var jt = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
3106
4668
|
})
|
|
3107
4669
|
})
|
|
3108
4670
|
}) : null;
|
|
3109
|
-
},
|
|
3110
|
-
let a =
|
|
4671
|
+
}, qn = ({ segments: e, onNavigate: n, style: r, ...i }) => {
|
|
4672
|
+
let a = q();
|
|
3111
4673
|
return /* @__PURE__ */ M(k, {
|
|
3112
4674
|
style: [{
|
|
3113
4675
|
flexDirection: "row",
|
|
@@ -3180,8 +4742,8 @@ var jt = ({ value: e, min: t = 0, max: n = 1, low: r, lowVariant: i = "warning",
|
|
|
3180
4742
|
})] }, r.path);
|
|
3181
4743
|
})
|
|
3182
4744
|
});
|
|
3183
|
-
},
|
|
3184
|
-
function
|
|
4745
|
+
}, Jn = 8, $ = 10, Yn = 6;
|
|
4746
|
+
function Xn(e, t) {
|
|
3185
4747
|
if (e) {
|
|
3186
4748
|
if (typeof e == "function") {
|
|
3187
4749
|
e(t);
|
|
@@ -3190,27 +4752,27 @@ function Lt(e, t) {
|
|
|
3190
4752
|
e.current = t;
|
|
3191
4753
|
}
|
|
3192
4754
|
}
|
|
3193
|
-
function
|
|
4755
|
+
function Zn(e, t, n) {
|
|
3194
4756
|
switch (n) {
|
|
3195
4757
|
case "top": return {
|
|
3196
|
-
top: e.y - t.height -
|
|
4758
|
+
top: e.y - t.height - Jn,
|
|
3197
4759
|
left: e.x + e.width / 2 - t.width / 2
|
|
3198
4760
|
};
|
|
3199
4761
|
case "bottom": return {
|
|
3200
|
-
top: e.y + e.height +
|
|
4762
|
+
top: e.y + e.height + Jn,
|
|
3201
4763
|
left: e.x + e.width / 2 - t.width / 2
|
|
3202
4764
|
};
|
|
3203
4765
|
case "left": return {
|
|
3204
4766
|
top: e.y + e.height / 2 - t.height / 2,
|
|
3205
|
-
left: e.x - t.width -
|
|
4767
|
+
left: e.x - t.width - Jn
|
|
3206
4768
|
};
|
|
3207
4769
|
case "right": return {
|
|
3208
4770
|
top: e.y + e.height / 2 - t.height / 2,
|
|
3209
|
-
left: e.x + e.width +
|
|
4771
|
+
left: e.x + e.width + Jn
|
|
3210
4772
|
};
|
|
3211
4773
|
}
|
|
3212
4774
|
}
|
|
3213
|
-
function
|
|
4775
|
+
function Qn(e, t, n) {
|
|
3214
4776
|
let { width: r, height: i } = g.get("window"), a = [
|
|
3215
4777
|
n,
|
|
3216
4778
|
n === "top" ? "bottom" : n === "bottom" ? "top" : n === "left" ? "right" : "left",
|
|
@@ -3220,22 +4782,22 @@ function zt(e, t, n) {
|
|
|
3220
4782
|
"right"
|
|
3221
4783
|
];
|
|
3222
4784
|
for (let n of a) {
|
|
3223
|
-
let { top: a, left: o } =
|
|
4785
|
+
let { top: a, left: o } = Zn(e, t, n), s = o >= $ && o + t.width <= r - $, c = a >= $ && a + t.height <= i - $;
|
|
3224
4786
|
if (s && c) return {
|
|
3225
|
-
top: Math.max(
|
|
3226
|
-
left: Math.max(
|
|
4787
|
+
top: Math.max($, Math.min(a, i - t.height - $)),
|
|
4788
|
+
left: Math.max($, Math.min(o, r - t.width - $)),
|
|
3227
4789
|
placement: n
|
|
3228
4790
|
};
|
|
3229
4791
|
}
|
|
3230
|
-
let { top: o, left: s } =
|
|
4792
|
+
let { top: o, left: s } = Zn(e, t, n);
|
|
3231
4793
|
return {
|
|
3232
|
-
top: Math.max(
|
|
3233
|
-
left: Math.max(
|
|
4794
|
+
top: Math.max($, Math.min(o, i - t.height - $)),
|
|
4795
|
+
left: Math.max($, Math.min(s, r - t.width - $)),
|
|
3234
4796
|
placement: n
|
|
3235
4797
|
};
|
|
3236
4798
|
}
|
|
3237
|
-
var
|
|
3238
|
-
let l =
|
|
4799
|
+
var $n = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panelStyle: a, children: s }) => {
|
|
4800
|
+
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) => {
|
|
3239
4801
|
p || _(e), i?.(e);
|
|
3240
4802
|
}, [p, i]), P = o(() => A(!1), [A]), F = o(() => A(!v), [v, A]);
|
|
3241
4803
|
c(() => {
|
|
@@ -3252,7 +4814,7 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3252
4814
|
});
|
|
3253
4815
|
});
|
|
3254
4816
|
}, [v]), c(() => {
|
|
3255
|
-
!y || !S || E(
|
|
4817
|
+
!y || !S || E(Qn(y, S, t));
|
|
3256
4818
|
}, [
|
|
3257
4819
|
y,
|
|
3258
4820
|
S,
|
|
@@ -3279,43 +4841,43 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3279
4841
|
let e = h.addEventListener("hardwareBackPress", () => (P(), !0));
|
|
3280
4842
|
return () => e.remove();
|
|
3281
4843
|
}, [v, P]);
|
|
3282
|
-
let
|
|
4844
|
+
let I = (e) => {
|
|
3283
4845
|
let { width: t, height: n } = e.nativeEvent.layout;
|
|
3284
4846
|
C({
|
|
3285
4847
|
width: t,
|
|
3286
4848
|
height: n
|
|
3287
4849
|
});
|
|
3288
|
-
},
|
|
4850
|
+
}, L = {
|
|
3289
4851
|
position: "absolute",
|
|
3290
4852
|
width: 0,
|
|
3291
4853
|
height: 0,
|
|
3292
|
-
borderWidth:
|
|
4854
|
+
borderWidth: Yn,
|
|
3293
4855
|
borderColor: "transparent"
|
|
3294
|
-
},
|
|
4856
|
+
}, R = (() => {
|
|
3295
4857
|
switch (T?.placement) {
|
|
3296
4858
|
case "top": return {
|
|
3297
|
-
...
|
|
4859
|
+
...L,
|
|
3298
4860
|
top: "100%",
|
|
3299
4861
|
left: "50%",
|
|
3300
4862
|
marginLeft: -6,
|
|
3301
4863
|
borderTopColor: l.popoverBgColor
|
|
3302
4864
|
};
|
|
3303
4865
|
case "bottom": return {
|
|
3304
|
-
...
|
|
4866
|
+
...L,
|
|
3305
4867
|
bottom: "100%",
|
|
3306
4868
|
left: "50%",
|
|
3307
4869
|
marginLeft: -6,
|
|
3308
4870
|
borderBottomColor: l.popoverBgColor
|
|
3309
4871
|
};
|
|
3310
4872
|
case "left": return {
|
|
3311
|
-
...
|
|
4873
|
+
...L,
|
|
3312
4874
|
left: "100%",
|
|
3313
4875
|
top: "50%",
|
|
3314
4876
|
marginTop: -6,
|
|
3315
4877
|
borderLeftColor: l.popoverBgColor
|
|
3316
4878
|
};
|
|
3317
4879
|
case "right": return {
|
|
3318
|
-
...
|
|
4880
|
+
...L,
|
|
3319
4881
|
right: "100%",
|
|
3320
4882
|
top: "50%",
|
|
3321
4883
|
marginTop: -6,
|
|
@@ -3323,10 +4885,10 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3323
4885
|
};
|
|
3324
4886
|
default: return null;
|
|
3325
4887
|
}
|
|
3326
|
-
})(),
|
|
4888
|
+
})(), z = s.props.ref;
|
|
3327
4889
|
return /* @__PURE__ */ N(j, { children: [n(s, {
|
|
3328
4890
|
ref: (e) => {
|
|
3329
|
-
D.current = e,
|
|
4891
|
+
D.current = e, Xn(z, e);
|
|
3330
4892
|
},
|
|
3331
4893
|
accessibilityState: {
|
|
3332
4894
|
expanded: v,
|
|
@@ -3346,7 +4908,7 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3346
4908
|
accessible: !1,
|
|
3347
4909
|
style: { flex: 1 },
|
|
3348
4910
|
children: /* @__PURE__ */ N(m.View, {
|
|
3349
|
-
onLayout:
|
|
4911
|
+
onLayout: I,
|
|
3350
4912
|
role: "dialog",
|
|
3351
4913
|
accessible: !0,
|
|
3352
4914
|
onStartShouldSetResponder: () => !0,
|
|
@@ -3380,12 +4942,45 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3380
4942
|
},
|
|
3381
4943
|
a
|
|
3382
4944
|
],
|
|
3383
|
-
children: [e,
|
|
4945
|
+
children: [e, R && /* @__PURE__ */ M(k, { style: R })]
|
|
3384
4946
|
})
|
|
3385
4947
|
})
|
|
3386
4948
|
})] });
|
|
3387
|
-
},
|
|
3388
|
-
let
|
|
4949
|
+
}, er = i(function({ title: e, description: t, headerSuffix: n, children: r, style: i, ...a }, o) {
|
|
4950
|
+
let s = q(), c = !!(e || t || n);
|
|
4951
|
+
return /* @__PURE__ */ N(k, {
|
|
4952
|
+
ref: o,
|
|
4953
|
+
style: [{ gap: s.space2 }, i],
|
|
4954
|
+
...a,
|
|
4955
|
+
children: [c ? /* @__PURE__ */ N(k, {
|
|
4956
|
+
style: {
|
|
4957
|
+
flexDirection: "row",
|
|
4958
|
+
alignItems: "baseline",
|
|
4959
|
+
gap: s.space2
|
|
4960
|
+
},
|
|
4961
|
+
children: [/* @__PURE__ */ N(k, {
|
|
4962
|
+
style: {
|
|
4963
|
+
flex: 1,
|
|
4964
|
+
gap: 2
|
|
4965
|
+
},
|
|
4966
|
+
children: [e ? /* @__PURE__ */ M(Y, {
|
|
4967
|
+
variant: "body",
|
|
4968
|
+
accessibilityRole: "header",
|
|
4969
|
+
style: { fontWeight: String(s.fontWeightSemibold) },
|
|
4970
|
+
children: e
|
|
4971
|
+
}) : null, t ? /* @__PURE__ */ M(Y, {
|
|
4972
|
+
variant: "caption",
|
|
4973
|
+
color: "dim",
|
|
4974
|
+
children: t
|
|
4975
|
+
}) : null]
|
|
4976
|
+
}), n ? /* @__PURE__ */ M(k, {
|
|
4977
|
+
style: { flexShrink: 0 },
|
|
4978
|
+
children: n
|
|
4979
|
+
}) : null]
|
|
4980
|
+
}) : null, /* @__PURE__ */ M(k, { children: r })]
|
|
4981
|
+
});
|
|
4982
|
+
}), tr = ({ value: e, variant: t = "accent", accessibilityLabel: n, style: r, onLayout: i, ...a }) => {
|
|
4983
|
+
let o = q(), s = K(), 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) => {
|
|
3389
4984
|
b(e.nativeEvent.layout.width), i?.(e);
|
|
3390
4985
|
};
|
|
3391
4986
|
c(() => {
|
|
@@ -3467,8 +5062,8 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3467
5062
|
backgroundColor: C[t]
|
|
3468
5063
|
}, w] })
|
|
3469
5064
|
});
|
|
3470
|
-
},
|
|
3471
|
-
let o =
|
|
5065
|
+
}, nr = 18, rr = 6, ir = i(function({ value: e, onSelect: t, disabled: n, style: r, ...i }, a) {
|
|
5066
|
+
let o = q(), s = K(), l = Oe(), u = d(new m.Value(+!!e)).current, f = d(!0);
|
|
3472
5067
|
c(() => {
|
|
3473
5068
|
if (f.current) {
|
|
3474
5069
|
f.current = !1;
|
|
@@ -3509,8 +5104,8 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3509
5104
|
...i,
|
|
3510
5105
|
children: /* @__PURE__ */ M(m.View, {
|
|
3511
5106
|
style: {
|
|
3512
|
-
width:
|
|
3513
|
-
height:
|
|
5107
|
+
width: nr,
|
|
5108
|
+
height: nr,
|
|
3514
5109
|
alignItems: "center",
|
|
3515
5110
|
justifyContent: "center",
|
|
3516
5111
|
borderRadius: o.radiusPill,
|
|
@@ -3519,8 +5114,8 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3519
5114
|
backgroundColor: g
|
|
3520
5115
|
},
|
|
3521
5116
|
children: /* @__PURE__ */ M(m.View, { style: {
|
|
3522
|
-
width:
|
|
3523
|
-
height:
|
|
5117
|
+
width: rr,
|
|
5118
|
+
height: rr,
|
|
3524
5119
|
borderRadius: o.radiusPill,
|
|
3525
5120
|
backgroundColor: "#fff",
|
|
3526
5121
|
opacity: u
|
|
@@ -3530,14 +5125,14 @@ var Bt = ({ content: e, placement: t = "bottom", open: r, onOpenChange: i, panel
|
|
|
3530
5125
|
});
|
|
3531
5126
|
//#endregion
|
|
3532
5127
|
//#region src/components/SearchBar/SearchBar.tsx
|
|
3533
|
-
function
|
|
5128
|
+
function ar(e, t) {
|
|
3534
5129
|
let n = e.match(/^rgba?\(([^,]+),([^,]+),([^,]+),?([^)]+)?\)$/);
|
|
3535
5130
|
if (!n) return e;
|
|
3536
5131
|
let [, r, i, a, o] = n, s = (o ? Number.parseFloat(o) : 1) * t;
|
|
3537
5132
|
return `rgba(${r.trim()}, ${i.trim()}, ${a.trim()}, ${s})`;
|
|
3538
5133
|
}
|
|
3539
|
-
var
|
|
3540
|
-
let g =
|
|
5134
|
+
var or = 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
|
+
let g = q(), _ = d(null);
|
|
3541
5136
|
if (l(h, () => _.current, []), c(() => {
|
|
3542
5137
|
if (!e) return;
|
|
3543
5138
|
let t = requestAnimationFrame(() => _.current?.focus());
|
|
@@ -3580,7 +5175,7 @@ var Kt = i(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
3580
5175
|
editable: o,
|
|
3581
5176
|
value: i,
|
|
3582
5177
|
placeholder: a,
|
|
3583
|
-
placeholderTextColor:
|
|
5178
|
+
placeholderTextColor: ar(g.windowFgColor, g.opacityDim),
|
|
3584
5179
|
style: [{
|
|
3585
5180
|
flex: 1,
|
|
3586
5181
|
padding: 0,
|
|
@@ -3645,33 +5240,82 @@ var Kt = i(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
3645
5240
|
children: r
|
|
3646
5241
|
})]
|
|
3647
5242
|
});
|
|
3648
|
-
});
|
|
5243
|
+
}), sr = 8;
|
|
5244
|
+
function cr(e, t) {
|
|
5245
|
+
switch (t % sr) {
|
|
5246
|
+
case 0: return e.blue3;
|
|
5247
|
+
case 1: return e.green3;
|
|
5248
|
+
case 2: return e.purple3;
|
|
5249
|
+
case 3: return e.orange3;
|
|
5250
|
+
case 4: return e.red3;
|
|
5251
|
+
case 5: return e.brown3;
|
|
5252
|
+
case 6: return e.blue5;
|
|
5253
|
+
default: return e.green5;
|
|
5254
|
+
}
|
|
5255
|
+
}
|
|
5256
|
+
var lr = ({ values: e, accessibilityLabel: t, style: n, testID: r }) => {
|
|
5257
|
+
let i = q(), a = K(), [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
|
+
return /* @__PURE__ */ M(k, {
|
|
5259
|
+
testID: r,
|
|
5260
|
+
accessible: !0,
|
|
5261
|
+
role: "img",
|
|
5262
|
+
accessibilityLabel: t ?? l,
|
|
5263
|
+
style: [{
|
|
5264
|
+
flexDirection: "row",
|
|
5265
|
+
width: "100%",
|
|
5266
|
+
height: 8,
|
|
5267
|
+
borderRadius: i.radiusPill,
|
|
5268
|
+
overflow: "hidden",
|
|
5269
|
+
gap: 2,
|
|
5270
|
+
backgroundColor: u
|
|
5271
|
+
}, n],
|
|
5272
|
+
children: e.map((e, t) => {
|
|
5273
|
+
let n = `${e.value / c * 100}%`, r = e.value % 1 == 0 ? e.value : e.value.toFixed(1);
|
|
5274
|
+
return /* @__PURE__ */ M(an, {
|
|
5275
|
+
label: `${e.label}: ${r}%`,
|
|
5276
|
+
placement: "top",
|
|
5277
|
+
delay: 200,
|
|
5278
|
+
children: /* @__PURE__ */ M(w, {
|
|
5279
|
+
testID: "segmented-bar-segment",
|
|
5280
|
+
onPressIn: () => s(t),
|
|
5281
|
+
onPressOut: () => s(null),
|
|
5282
|
+
style: {
|
|
5283
|
+
width: n,
|
|
5284
|
+
height: "100%",
|
|
5285
|
+
backgroundColor: e.color ?? cr(i, t),
|
|
5286
|
+
opacity: o !== null && o !== t ? .35 : 1
|
|
5287
|
+
}
|
|
5288
|
+
})
|
|
5289
|
+
}, e.label);
|
|
5290
|
+
})
|
|
5291
|
+
});
|
|
5292
|
+
};
|
|
3649
5293
|
//#endregion
|
|
3650
5294
|
//#region src/components/Sidebar/filterUtils.ts
|
|
3651
|
-
function
|
|
5295
|
+
function ur(t, n) {
|
|
3652
5296
|
let r = 0;
|
|
3653
5297
|
return e.forEach(t, (e) => {
|
|
3654
5298
|
if (!a(e)) return;
|
|
3655
5299
|
let t = e.props;
|
|
3656
|
-
typeof t.label == "string" ? t.label.toLowerCase().includes(n.toLowerCase()) && r++ : t.children && (r +=
|
|
5300
|
+
typeof t.label == "string" ? t.label.toLowerCase().includes(n.toLowerCase()) && r++ : t.children && (r += ur(t.children, n));
|
|
3657
5301
|
}), r;
|
|
3658
5302
|
}
|
|
3659
|
-
function
|
|
5303
|
+
function dr(e, t) {
|
|
3660
5304
|
if (!t || !a(e)) return !0;
|
|
3661
5305
|
let n = e.props;
|
|
3662
|
-
return typeof n.label == "string" ? n.label.toLowerCase().includes(t.toLowerCase()) : n.children ?
|
|
5306
|
+
return typeof n.label == "string" ? n.label.toLowerCase().includes(t.toLowerCase()) : n.children ? ur(n.children, t) > 0 : !0;
|
|
3663
5307
|
}
|
|
3664
5308
|
//#endregion
|
|
3665
5309
|
//#region src/components/Sidebar/Sidebar.tsx
|
|
3666
|
-
var
|
|
3667
|
-
function
|
|
3668
|
-
return s(
|
|
5310
|
+
var fr = r(!1);
|
|
5311
|
+
function pr() {
|
|
5312
|
+
return s(fr);
|
|
3669
5313
|
}
|
|
3670
|
-
var
|
|
3671
|
-
let c =
|
|
3672
|
-
return /* @__PURE__ */ M(
|
|
5314
|
+
var mr = r(""), hr = i(function({ children: n, collapsed: r = !1, filter: i = "", style: a, ...o }, s) {
|
|
5315
|
+
let c = q(), l = i.length > 0, u = e.toArray(n).filter(Boolean).filter((e) => dr(e, i)), d = !l || u.length > 0;
|
|
5316
|
+
return /* @__PURE__ */ M(fr.Provider, {
|
|
3673
5317
|
value: r,
|
|
3674
|
-
children: /* @__PURE__ */ M(
|
|
5318
|
+
children: /* @__PURE__ */ M(mr.Provider, {
|
|
3675
5319
|
value: i,
|
|
3676
5320
|
children: /* @__PURE__ */ M(k, {
|
|
3677
5321
|
ref: s,
|
|
@@ -3685,7 +5329,7 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3685
5329
|
...o,
|
|
3686
5330
|
children: /* @__PURE__ */ M(T, {
|
|
3687
5331
|
contentContainerStyle: { padding: c.space1 },
|
|
3688
|
-
children: l && !d ? /* @__PURE__ */ M(
|
|
5332
|
+
children: l && !d ? /* @__PURE__ */ M(Y, {
|
|
3689
5333
|
variant: "caption",
|
|
3690
5334
|
color: "dim",
|
|
3691
5335
|
style: {
|
|
@@ -3693,7 +5337,7 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3693
5337
|
padding: c.space4
|
|
3694
5338
|
},
|
|
3695
5339
|
children: "No items match your search."
|
|
3696
|
-
}) : u.map((e, n) => /* @__PURE__ */ N(t, { children: [n > 0 && /* @__PURE__ */ M(
|
|
5340
|
+
}) : u.map((e, n) => /* @__PURE__ */ N(t, { children: [n > 0 && /* @__PURE__ */ M(Ot, {
|
|
3697
5341
|
testID: "sidebar-separator",
|
|
3698
5342
|
style: { marginVertical: c.space1 }
|
|
3699
5343
|
}), e] }, n))
|
|
@@ -3701,8 +5345,8 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3701
5345
|
})
|
|
3702
5346
|
})
|
|
3703
5347
|
});
|
|
3704
|
-
}),
|
|
3705
|
-
let l =
|
|
5348
|
+
}), gr = i(function({ label: e, icon: t, active: n = !1, suffix: r, disabled: i, style: a, ...o }, c) {
|
|
5349
|
+
let l = q(), u = pr(), d = s(mr);
|
|
3706
5350
|
return d.length > 0 && !e.toLowerCase().includes(d.toLowerCase()) ? null : /* @__PURE__ */ N(w, {
|
|
3707
5351
|
ref: c,
|
|
3708
5352
|
disabled: i,
|
|
@@ -3738,7 +5382,7 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3738
5382
|
},
|
|
3739
5383
|
children: t
|
|
3740
5384
|
}),
|
|
3741
|
-
!u && /* @__PURE__ */ M(
|
|
5385
|
+
!u && /* @__PURE__ */ M(Y, {
|
|
3742
5386
|
numberOfLines: 1,
|
|
3743
5387
|
ellipsizeMode: "tail",
|
|
3744
5388
|
style: {
|
|
@@ -3755,15 +5399,15 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3755
5399
|
})
|
|
3756
5400
|
]
|
|
3757
5401
|
});
|
|
3758
|
-
}),
|
|
3759
|
-
let p =
|
|
5402
|
+
}), _r = i(function({ title: e, icon: t, collapsible: n = !1, defaultOpen: r = !0, open: i, onOpenChange: a, children: o, style: c, ...u }, d) {
|
|
5403
|
+
let p = q(), [m, h] = f(r), g = i !== void 0, _ = g ? i : m, v = pr(), y = s(mr), b = (e) => {
|
|
3760
5404
|
g || h(e), a?.(e);
|
|
3761
5405
|
};
|
|
3762
5406
|
if (l(d, () => ({
|
|
3763
5407
|
expand: () => b(!0),
|
|
3764
5408
|
collapse: () => b(!1),
|
|
3765
5409
|
toggle: () => b(!_)
|
|
3766
|
-
})), !(y.length === 0 ||
|
|
5410
|
+
})), !(y.length === 0 || ur(o, y) > 0)) return null;
|
|
3767
5411
|
let x = v ? !0 : _, S = !v && !!(e || t), C = (e || t) && /* @__PURE__ */ N(k, {
|
|
3768
5412
|
style: {
|
|
3769
5413
|
flexDirection: "row",
|
|
@@ -3782,14 +5426,14 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3782
5426
|
},
|
|
3783
5427
|
children: t
|
|
3784
5428
|
}),
|
|
3785
|
-
e && /* @__PURE__ */ M(
|
|
5429
|
+
e && /* @__PURE__ */ M(Y, {
|
|
3786
5430
|
variant: "caption-heading",
|
|
3787
5431
|
color: "dim",
|
|
3788
5432
|
style: { flex: 1 },
|
|
3789
5433
|
numberOfLines: 1,
|
|
3790
5434
|
children: e
|
|
3791
5435
|
}),
|
|
3792
|
-
n && /* @__PURE__ */ M(
|
|
5436
|
+
n && /* @__PURE__ */ M(Y, {
|
|
3793
5437
|
variant: "caption",
|
|
3794
5438
|
color: "dim",
|
|
3795
5439
|
style: { flexShrink: 0 },
|
|
@@ -3816,8 +5460,8 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3816
5460
|
children: o
|
|
3817
5461
|
})]
|
|
3818
5462
|
});
|
|
3819
|
-
}),
|
|
3820
|
-
let l =
|
|
5463
|
+
}), vr = ({ variant: e = "rect", width: t = "100%", height: n = 16, size: r = 40, lines: i = 3, animated: a = !0, style: o, ...s }) => {
|
|
5464
|
+
let l = q(), u = J(), f = d(new m.Value(1)).current, p = a && !u;
|
|
3821
5465
|
if (c(() => {
|
|
3822
5466
|
if (!p) {
|
|
3823
5467
|
f.setValue(1);
|
|
@@ -3875,22 +5519,22 @@ var X = r(""), Zt = i(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
3875
5519
|
],
|
|
3876
5520
|
...s
|
|
3877
5521
|
});
|
|
3878
|
-
},
|
|
3879
|
-
function
|
|
5522
|
+
}, yr = 6, br = 22, xr = 4;
|
|
5523
|
+
function Sr(e, t, n) {
|
|
3880
5524
|
return Math.min(n, Math.max(t, e));
|
|
3881
5525
|
}
|
|
3882
|
-
function
|
|
5526
|
+
function Cr(e, t, n, r) {
|
|
3883
5527
|
return parseFloat((Math.round((e - t) / n) * n + t).toFixed(r));
|
|
3884
5528
|
}
|
|
3885
|
-
function
|
|
5529
|
+
function wr(e) {
|
|
3886
5530
|
let t = e.toString(), n = t.indexOf(".");
|
|
3887
5531
|
return n === -1 ? 0 : t.length - n - 1;
|
|
3888
5532
|
}
|
|
3889
|
-
var
|
|
3890
|
-
let m =
|
|
5533
|
+
var Tr = ({ 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 }) => {
|
|
5534
|
+
let m = q(), [h, g] = f(0), [_, v] = f({}), y = wr(i), b = Sr(e, n, r), x = (b - n) / (r - n) * 100, C = o((e) => {
|
|
3891
5535
|
g(e.nativeEvent.layout.width), d?.(e);
|
|
3892
5536
|
}, [d]), w = o((e) => {
|
|
3893
|
-
a || h <= 0 || t(
|
|
5537
|
+
a || h <= 0 || t(Sr(Cr(e / h * (r - n) + n, n, i, y), n, r));
|
|
3894
5538
|
}, [
|
|
3895
5539
|
a,
|
|
3896
5540
|
h,
|
|
@@ -3907,10 +5551,10 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
3907
5551
|
}), [a, w]), E = o((o) => {
|
|
3908
5552
|
if (!a) switch (o.nativeEvent.actionName) {
|
|
3909
5553
|
case "increment":
|
|
3910
|
-
t(
|
|
5554
|
+
t(Sr(Cr(e + i, n, i, y), n, r));
|
|
3911
5555
|
break;
|
|
3912
5556
|
case "decrement":
|
|
3913
|
-
t(
|
|
5557
|
+
t(Sr(Cr(e - i, n, i, y), n, r));
|
|
3914
5558
|
break;
|
|
3915
5559
|
}
|
|
3916
5560
|
}, [
|
|
@@ -3921,7 +5565,7 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
3921
5565
|
r,
|
|
3922
5566
|
y,
|
|
3923
5567
|
t
|
|
3924
|
-
]), O = s && s.length > 0, A = O && s.some((e) => e.label), j = x / 100 * h -
|
|
5568
|
+
]), O = s && s.length > 0, A = O && s.some((e) => e.label), j = x / 100 * h - br / 2;
|
|
3925
5569
|
return /* @__PURE__ */ N(k, {
|
|
3926
5570
|
style: [{
|
|
3927
5571
|
width: "100%",
|
|
@@ -3950,7 +5594,7 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
3950
5594
|
onAccessibilityAction: E,
|
|
3951
5595
|
style: {
|
|
3952
5596
|
justifyContent: "center",
|
|
3953
|
-
height:
|
|
5597
|
+
height: br,
|
|
3954
5598
|
opacity: a ? m.opacityDisabled : 1
|
|
3955
5599
|
},
|
|
3956
5600
|
...T.panHandlers,
|
|
@@ -3959,7 +5603,7 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
3959
5603
|
pointerEvents: "none",
|
|
3960
5604
|
style: {
|
|
3961
5605
|
width: "100%",
|
|
3962
|
-
height:
|
|
5606
|
+
height: yr,
|
|
3963
5607
|
borderRadius: m.radiusPill,
|
|
3964
5608
|
backgroundColor: m.cardShadeColor,
|
|
3965
5609
|
overflow: "hidden"
|
|
@@ -3976,8 +5620,8 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
3976
5620
|
style: {
|
|
3977
5621
|
position: "absolute",
|
|
3978
5622
|
left: j,
|
|
3979
|
-
width:
|
|
3980
|
-
height:
|
|
5623
|
+
width: br,
|
|
5624
|
+
height: br,
|
|
3981
5625
|
borderRadius: m.radiusPill,
|
|
3982
5626
|
backgroundColor: m.accentBgColor,
|
|
3983
5627
|
borderWidth: 2,
|
|
@@ -3997,10 +5641,10 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
3997
5641
|
importantForAccessibility: "no",
|
|
3998
5642
|
style: {
|
|
3999
5643
|
position: "absolute",
|
|
4000
|
-
left: (
|
|
4001
|
-
width:
|
|
4002
|
-
height:
|
|
4003
|
-
borderRadius:
|
|
5644
|
+
left: (Sr(e.value, n, r) - n) / (r - n) * 100 / 100 * h - xr / 2,
|
|
5645
|
+
width: xr,
|
|
5646
|
+
height: xr,
|
|
5647
|
+
borderRadius: xr / 2,
|
|
4004
5648
|
backgroundColor: m.windowBgColor
|
|
4005
5649
|
}
|
|
4006
5650
|
}, e.value))
|
|
@@ -4024,7 +5668,7 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
4024
5668
|
},
|
|
4025
5669
|
style: {
|
|
4026
5670
|
position: "absolute",
|
|
4027
|
-
left: (
|
|
5671
|
+
left: (Sr(e.value, n, r) - n) / (r - n) * 100 / 100 * h - (_[e.value] ?? 0) / 2,
|
|
4028
5672
|
fontFamily: m.fontFamily,
|
|
4029
5673
|
fontSize: m.fontSizeCaption,
|
|
4030
5674
|
color: m.windowFgColor,
|
|
@@ -4034,21 +5678,21 @@ var on = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, disabl
|
|
|
4034
5678
|
}, e.value))
|
|
4035
5679
|
})]
|
|
4036
5680
|
});
|
|
4037
|
-
},
|
|
4038
|
-
function
|
|
5681
|
+
}, Er = 36;
|
|
5682
|
+
function Dr(e) {
|
|
4039
5683
|
let t = e.toString(), n = t.indexOf(".");
|
|
4040
5684
|
return n === -1 ? 0 : t.length - n - 1;
|
|
4041
5685
|
}
|
|
4042
|
-
function
|
|
5686
|
+
function Or(e, t, n) {
|
|
4043
5687
|
return Math.min(n, Math.max(t, e));
|
|
4044
5688
|
}
|
|
4045
|
-
function
|
|
5689
|
+
function kr(e, t, n, r) {
|
|
4046
5690
|
let i = n - t + r;
|
|
4047
5691
|
return ((e - t) % i + i) % i + t;
|
|
4048
5692
|
}
|
|
4049
|
-
var
|
|
4050
|
-
let f =
|
|
4051
|
-
let a = s ?
|
|
5693
|
+
var Ar = ({ 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 }) => {
|
|
5694
|
+
let f = q(), p = a ?? Dr(i), m = o((e) => {
|
|
5695
|
+
let a = s ? kr(e, n, r, i) : Or(e, n, r);
|
|
4052
5696
|
t(parseFloat(a.toFixed(p)));
|
|
4053
5697
|
}, [
|
|
4054
5698
|
t,
|
|
@@ -4109,8 +5753,8 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4109
5753
|
disabled: _,
|
|
4110
5754
|
onPress: () => m(e - i),
|
|
4111
5755
|
style: ({ pressed: e }) => ({
|
|
4112
|
-
width:
|
|
4113
|
-
height:
|
|
5756
|
+
width: Er,
|
|
5757
|
+
height: Er,
|
|
4114
5758
|
alignItems: "center",
|
|
4115
5759
|
justifyContent: "center",
|
|
4116
5760
|
borderRightWidth: 1,
|
|
@@ -4147,8 +5791,8 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4147
5791
|
disabled: v,
|
|
4148
5792
|
onPress: () => m(e + i),
|
|
4149
5793
|
style: ({ pressed: e }) => ({
|
|
4150
|
-
width:
|
|
4151
|
-
height:
|
|
5794
|
+
width: Er,
|
|
5795
|
+
height: Er,
|
|
4152
5796
|
alignItems: "center",
|
|
4153
5797
|
justifyContent: "center",
|
|
4154
5798
|
borderLeftWidth: 1,
|
|
@@ -4167,7 +5811,7 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4167
5811
|
})
|
|
4168
5812
|
]
|
|
4169
5813
|
});
|
|
4170
|
-
},
|
|
5814
|
+
}, jr = {
|
|
4171
5815
|
sm: {
|
|
4172
5816
|
dimension: 16,
|
|
4173
5817
|
borderWidth: 2
|
|
@@ -4180,8 +5824,8 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4180
5824
|
dimension: 36,
|
|
4181
5825
|
borderWidth: 3
|
|
4182
5826
|
}
|
|
4183
|
-
},
|
|
4184
|
-
let i =
|
|
5827
|
+
}, Mr = ({ size: e = "md", label: t = "Loading…", style: n, ...r }) => {
|
|
5828
|
+
let i = q(), a = K(), o = J(), s = d(new m.Value(0)).current;
|
|
4185
5829
|
c(() => {
|
|
4186
5830
|
s.setValue(0);
|
|
4187
5831
|
let e = m.loop(m.timing(s, {
|
|
@@ -4195,7 +5839,7 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4195
5839
|
let l = s.interpolate({
|
|
4196
5840
|
inputRange: [0, 1],
|
|
4197
5841
|
outputRange: ["0deg", "360deg"]
|
|
4198
|
-
}), { dimension: u, borderWidth: f } =
|
|
5842
|
+
}), { dimension: u, borderWidth: f } = jr[e], p = a === "dark" ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.15)";
|
|
4199
5843
|
return /* @__PURE__ */ M(m.View, {
|
|
4200
5844
|
accessible: !0,
|
|
4201
5845
|
accessibilityRole: "progressbar",
|
|
@@ -4213,8 +5857,86 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4213
5857
|
}, n],
|
|
4214
5858
|
...r
|
|
4215
5859
|
});
|
|
4216
|
-
},
|
|
4217
|
-
|
|
5860
|
+
}, Nr = {
|
|
5861
|
+
start: "flex-start",
|
|
5862
|
+
center: "center",
|
|
5863
|
+
end: "flex-end",
|
|
5864
|
+
stretch: "stretch"
|
|
5865
|
+
}, Pr = {
|
|
5866
|
+
start: "flex-start",
|
|
5867
|
+
center: "center",
|
|
5868
|
+
end: "flex-end",
|
|
5869
|
+
"space-between": "space-between",
|
|
5870
|
+
"space-around": "space-around",
|
|
5871
|
+
"space-evenly": "space-evenly"
|
|
5872
|
+
}, Fr = i(function({ childSpacing: e = 6, lineSpacing: t, justify: n = "start", align: r = "center", wrapReverse: i = !1, children: a, style: o, ...s }, c) {
|
|
5873
|
+
return /* @__PURE__ */ M(k, {
|
|
5874
|
+
ref: c,
|
|
5875
|
+
style: [{
|
|
5876
|
+
flexDirection: "row",
|
|
5877
|
+
flexWrap: i ? "wrap-reverse" : "wrap",
|
|
5878
|
+
columnGap: e,
|
|
5879
|
+
rowGap: t ?? e,
|
|
5880
|
+
justifyContent: Pr[n],
|
|
5881
|
+
alignItems: Nr[r],
|
|
5882
|
+
alignContent: "stretch"
|
|
5883
|
+
}, o],
|
|
5884
|
+
...s,
|
|
5885
|
+
children: a
|
|
5886
|
+
});
|
|
5887
|
+
}), Ir = (e) => Math.round(36 * .5 * e), Lr = i(function({ icon: e, iconNode: t, title: n, description: r, children: i, compact: a = !1, style: o, ...s }, c) {
|
|
5888
|
+
let l = q(), u = K(), d = a ? 64 : 128, f = e ? /* @__PURE__ */ M(X, {
|
|
5889
|
+
icon: e,
|
|
5890
|
+
width: d,
|
|
5891
|
+
height: d
|
|
5892
|
+
}) : t, p = a ? l.fontSizeCaption : l.fontSizeBody;
|
|
5893
|
+
return /* @__PURE__ */ N(k, {
|
|
5894
|
+
ref: c,
|
|
5895
|
+
style: [{
|
|
5896
|
+
width: "100%",
|
|
5897
|
+
alignItems: "center",
|
|
5898
|
+
justifyContent: "center",
|
|
5899
|
+
paddingVertical: a ? l.space3 : l.space6,
|
|
5900
|
+
paddingHorizontal: a ? l.space3 : l.space4
|
|
5901
|
+
}, o],
|
|
5902
|
+
...s,
|
|
5903
|
+
children: [
|
|
5904
|
+
f ? /* @__PURE__ */ M(k, {
|
|
5905
|
+
accessibilityElementsHidden: !0,
|
|
5906
|
+
importantForAccessibility: "no",
|
|
5907
|
+
style: {
|
|
5908
|
+
alignItems: "center",
|
|
5909
|
+
justifyContent: "center",
|
|
5910
|
+
marginBottom: a ? l.space2 : l.space4,
|
|
5911
|
+
opacity: u === "dark" ? .45 : .55
|
|
5912
|
+
},
|
|
5913
|
+
children: f
|
|
5914
|
+
}) : null,
|
|
5915
|
+
/* @__PURE__ */ M(Y, {
|
|
5916
|
+
variant: a ? "title-4" : "title-1",
|
|
5917
|
+
style: { textAlign: "center" },
|
|
5918
|
+
children: n
|
|
5919
|
+
}),
|
|
5920
|
+
r ? /* @__PURE__ */ M(Y, {
|
|
5921
|
+
variant: a ? "caption" : "body",
|
|
5922
|
+
color: "dim",
|
|
5923
|
+
style: {
|
|
5924
|
+
textAlign: "center",
|
|
5925
|
+
maxWidth: Ir(p),
|
|
5926
|
+
marginTop: a ? l.space1 : l.space2
|
|
5927
|
+
},
|
|
5928
|
+
children: r
|
|
5929
|
+
}) : null,
|
|
5930
|
+
i ? /* @__PURE__ */ M(Fr, {
|
|
5931
|
+
justify: "center",
|
|
5932
|
+
childSpacing: a ? l.space1 : l.space2,
|
|
5933
|
+
style: { marginTop: a ? l.space2 : l.space4 },
|
|
5934
|
+
children: i
|
|
5935
|
+
}) : null
|
|
5936
|
+
]
|
|
5937
|
+
});
|
|
5938
|
+
}), Rr = 56, zr = 28, Br = 20, Vr = 3, Hr = 28, Ur = i(function({ value: e, onValueChange: t, disabled: n, style: r, ...i }, a) {
|
|
5939
|
+
let o = q(), s = K(), l = Oe(), u = d(new m.Value(+!!e)).current, f = d(!0);
|
|
4218
5940
|
c(() => {
|
|
4219
5941
|
if (f.current) {
|
|
4220
5942
|
f.current = !1;
|
|
@@ -4253,8 +5975,8 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4253
5975
|
...i,
|
|
4254
5976
|
children: /* @__PURE__ */ M(m.View, {
|
|
4255
5977
|
style: {
|
|
4256
|
-
width:
|
|
4257
|
-
height:
|
|
5978
|
+
width: Rr,
|
|
5979
|
+
height: zr,
|
|
4258
5980
|
borderRadius: o.radiusPill,
|
|
4259
5981
|
borderWidth: l === "more" ? 2 : 1,
|
|
4260
5982
|
borderColor: v,
|
|
@@ -4262,15 +5984,15 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4262
5984
|
},
|
|
4263
5985
|
children: /* @__PURE__ */ M(m.View, { style: [{
|
|
4264
5986
|
position: "absolute",
|
|
4265
|
-
top:
|
|
4266
|
-
left:
|
|
4267
|
-
width:
|
|
4268
|
-
height:
|
|
5987
|
+
top: Vr,
|
|
5988
|
+
left: Vr,
|
|
5989
|
+
width: Br,
|
|
5990
|
+
height: Br,
|
|
4269
5991
|
borderRadius: o.radiusPill,
|
|
4270
5992
|
backgroundColor: e ? "#fff" : h,
|
|
4271
5993
|
transform: [{ translateX: u.interpolate({
|
|
4272
5994
|
inputRange: [0, 1],
|
|
4273
|
-
outputRange: [0,
|
|
5995
|
+
outputRange: [0, Hr]
|
|
4274
5996
|
}) }]
|
|
4275
5997
|
}, l !== "more" && {
|
|
4276
5998
|
shadowColor: "#000",
|
|
@@ -4284,8 +6006,8 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4284
6006
|
}] })
|
|
4285
6007
|
})
|
|
4286
6008
|
});
|
|
4287
|
-
}),
|
|
4288
|
-
let o =
|
|
6009
|
+
}), Wr = i(function({ children: e, inline: t = !1, accessibilityLabel: n = "Tabs", style: r, ...i }, a) {
|
|
6010
|
+
let o = q();
|
|
4289
6011
|
return /* @__PURE__ */ M(T, {
|
|
4290
6012
|
ref: a,
|
|
4291
6013
|
horizontal: !0,
|
|
@@ -4310,8 +6032,8 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4310
6032
|
...i,
|
|
4311
6033
|
children: e
|
|
4312
6034
|
});
|
|
4313
|
-
}),
|
|
4314
|
-
let l =
|
|
6035
|
+
}), Gr = i(function({ label: e, icon: t, active: n = !1, onClose: r, closeLabel: i = "Close tab", count: a, disabled: o, ...s }, c) {
|
|
6036
|
+
let l = q();
|
|
4315
6037
|
return /* @__PURE__ */ N(w, {
|
|
4316
6038
|
ref: c,
|
|
4317
6039
|
disabled: o,
|
|
@@ -4410,7 +6132,7 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4410
6132
|
})
|
|
4411
6133
|
]
|
|
4412
6134
|
});
|
|
4413
|
-
}),
|
|
6135
|
+
}), Kr = i(function({ active: e = !1, style: t, children: n, ...r }, i) {
|
|
4414
6136
|
return /* @__PURE__ */ M(k, {
|
|
4415
6137
|
ref: i,
|
|
4416
6138
|
style: [{ display: e ? "flex" : "none" }, t],
|
|
@@ -4420,21 +6142,21 @@ var dn = ({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, decima
|
|
|
4420
6142
|
});
|
|
4421
6143
|
//#endregion
|
|
4422
6144
|
//#region src/components/TextField/TextField.tsx
|
|
4423
|
-
function
|
|
6145
|
+
function qr(e, t) {
|
|
4424
6146
|
let n = e.match(/^rgba?\(([^,]+),([^,]+),([^,]+),?([^)]+)?\)$/);
|
|
4425
6147
|
if (!n) return e;
|
|
4426
6148
|
let [, r, i, a, o] = n, s = (o ? Number.parseFloat(o) : 1) * t;
|
|
4427
6149
|
return `rgba(${r.trim()}, ${i.trim()}, ${a.trim()}, ${s})`;
|
|
4428
6150
|
}
|
|
4429
|
-
var
|
|
4430
|
-
let p =
|
|
6151
|
+
var Jr = 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) {
|
|
6152
|
+
let p = q(), m = Oe(), [h, g] = f(!1), _ = !a, v = n ?? t, y = n ? p.errorColor : h ? p.accentColor : p.borderSubtle;
|
|
4431
6153
|
return /* @__PURE__ */ N(k, {
|
|
4432
6154
|
style: [{
|
|
4433
6155
|
gap: p.space1,
|
|
4434
6156
|
opacity: _ ? p.opacityDisabled : 1
|
|
4435
6157
|
}, r],
|
|
4436
6158
|
children: [
|
|
4437
|
-
e && /* @__PURE__ */ M(
|
|
6159
|
+
e && /* @__PURE__ */ M(Y, {
|
|
4438
6160
|
variant: "body",
|
|
4439
6161
|
style: { fontWeight: String(p.fontWeightSemibold) },
|
|
4440
6162
|
children: e
|
|
@@ -4444,7 +6166,7 @@ var wn = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
4444
6166
|
editable: a,
|
|
4445
6167
|
accessibilityLabel: c ?? e,
|
|
4446
6168
|
accessibilityHint: l ?? v,
|
|
4447
|
-
placeholderTextColor:
|
|
6169
|
+
placeholderTextColor: qr(p.windowFgColor, p.opacityDim),
|
|
4448
6170
|
onFocus: (e) => {
|
|
4449
6171
|
g(!0), o?.(e);
|
|
4450
6172
|
},
|
|
@@ -4466,7 +6188,7 @@ var wn = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
4466
6188
|
}, i],
|
|
4467
6189
|
...u
|
|
4468
6190
|
}),
|
|
4469
|
-
v && /* @__PURE__ */ M(
|
|
6191
|
+
v && /* @__PURE__ */ M(Y, {
|
|
4470
6192
|
variant: "caption",
|
|
4471
6193
|
style: {
|
|
4472
6194
|
color: n ? p.errorColor : p.windowFgColor,
|
|
@@ -4476,8 +6198,8 @@ var wn = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
4476
6198
|
})
|
|
4477
6199
|
]
|
|
4478
6200
|
});
|
|
4479
|
-
}),
|
|
4480
|
-
let u =
|
|
6201
|
+
}), Yr = m.createAnimatedComponent(w), Xr = ({ title: e, duration: t = 3e3, onDismiss: n, actionLabel: r, onAction: i, dismissible: a = !1, style: s, ...l }) => {
|
|
6202
|
+
let u = q(), f = K(), p = J(), h = d(null), g = d(t), v = d(0), y = d(new m.Value(+!!p)).current, b = o(() => {
|
|
4481
6203
|
h.current &&= (clearTimeout(h.current), null);
|
|
4482
6204
|
}, []), x = o((e) => {
|
|
4483
6205
|
e <= 0 || !n || (b(), v.current = Date.now(), h.current = setTimeout(() => n(), e));
|
|
@@ -4522,7 +6244,7 @@ var wn = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
4522
6244
|
shadowRadius: 8,
|
|
4523
6245
|
elevation: 4
|
|
4524
6246
|
};
|
|
4525
|
-
return /* @__PURE__ */ N(
|
|
6247
|
+
return /* @__PURE__ */ N(Yr, {
|
|
4526
6248
|
accessible: !0,
|
|
4527
6249
|
accessibilityRole: "alert",
|
|
4528
6250
|
accessibilityLiveRegion: "polite",
|
|
@@ -4556,7 +6278,7 @@ var wn = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
4556
6278
|
...E
|
|
4557
6279
|
}, s],
|
|
4558
6280
|
...l,
|
|
4559
|
-
children: [/* @__PURE__ */ M(
|
|
6281
|
+
children: [/* @__PURE__ */ M(Y, {
|
|
4560
6282
|
variant: "body",
|
|
4561
6283
|
style: {
|
|
4562
6284
|
flex: 1,
|
|
@@ -4608,8 +6330,8 @@ var wn = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
4608
6330
|
})
|
|
4609
6331
|
})] })]
|
|
4610
6332
|
});
|
|
4611
|
-
},
|
|
4612
|
-
let i =
|
|
6333
|
+
}, Zr = ({ position: e = "bottom", children: t, style: n, ...r }) => {
|
|
6334
|
+
let i = q();
|
|
4613
6335
|
return /* @__PURE__ */ M(k, {
|
|
4614
6336
|
pointerEvents: "box-none",
|
|
4615
6337
|
accessibilityLabel: "Notifications",
|
|
@@ -4628,237 +6350,85 @@ var wn = i(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
4628
6350
|
...r,
|
|
4629
6351
|
children: t
|
|
4630
6352
|
});
|
|
4631
|
-
},
|
|
4632
|
-
function
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
return;
|
|
4637
|
-
}
|
|
4638
|
-
e.current = t;
|
|
4639
|
-
}
|
|
4640
|
-
}
|
|
4641
|
-
function jn(e, t, n) {
|
|
4642
|
-
switch (n) {
|
|
4643
|
-
case "top": return {
|
|
4644
|
-
top: e.y - t.height - On,
|
|
4645
|
-
left: e.x + e.width / 2 - t.width / 2
|
|
4646
|
-
};
|
|
4647
|
-
case "bottom": return {
|
|
4648
|
-
top: e.y + e.height + On,
|
|
4649
|
-
left: e.x + e.width / 2 - t.width / 2
|
|
4650
|
-
};
|
|
4651
|
-
case "left": return {
|
|
4652
|
-
top: e.y + e.height / 2 - t.height / 2,
|
|
4653
|
-
left: e.x - t.width - On
|
|
4654
|
-
};
|
|
4655
|
-
case "right": return {
|
|
4656
|
-
top: e.y + e.height / 2 - t.height / 2,
|
|
4657
|
-
left: e.x + e.width + On
|
|
4658
|
-
};
|
|
4659
|
-
}
|
|
4660
|
-
}
|
|
4661
|
-
function Mn(e, t, n) {
|
|
4662
|
-
let { width: r, height: i } = g.get("window"), a = [
|
|
4663
|
-
n,
|
|
4664
|
-
n === "top" ? "bottom" : n === "bottom" ? "top" : n === "left" ? "right" : "left",
|
|
4665
|
-
"top",
|
|
4666
|
-
"bottom",
|
|
4667
|
-
"left",
|
|
4668
|
-
"right"
|
|
4669
|
-
];
|
|
4670
|
-
for (let n of a) {
|
|
4671
|
-
let { top: a, left: o } = jn(e, t, n), s = o >= $ && o + t.width <= r - $, c = a >= $ && a + t.height <= i - $;
|
|
4672
|
-
if (s && c) return {
|
|
4673
|
-
top: Math.max($, Math.min(a, i - t.height - $)),
|
|
4674
|
-
left: Math.max($, Math.min(o, r - t.width - $)),
|
|
4675
|
-
placement: n
|
|
4676
|
-
};
|
|
4677
|
-
}
|
|
4678
|
-
let { top: o, left: s } = jn(e, t, n);
|
|
4679
|
-
return {
|
|
4680
|
-
top: Math.max($, Math.min(o, i - t.height - $)),
|
|
4681
|
-
left: Math.max($, Math.min(s, r - t.width - $)),
|
|
4682
|
-
placement: n
|
|
4683
|
-
};
|
|
6353
|
+
}, Qr = r(null);
|
|
6354
|
+
function $r() {
|
|
6355
|
+
let e = s(Qr);
|
|
6356
|
+
if (!e) throw Error("ToggleGroupItem must be used inside ToggleGroup");
|
|
6357
|
+
return e;
|
|
4684
6358
|
}
|
|
4685
|
-
var
|
|
4686
|
-
let
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
}, [
|
|
4693
|
-
T,
|
|
4694
|
-
D,
|
|
4695
|
-
r
|
|
4696
|
-
]), A = o(() => {
|
|
4697
|
-
T(), p(!1);
|
|
4698
|
-
}, [T]);
|
|
4699
|
-
c(() => {
|
|
4700
|
-
if (!u) {
|
|
4701
|
-
g(null), v(null), b(null);
|
|
4702
|
-
return;
|
|
4703
|
-
}
|
|
4704
|
-
S.current?.measureInWindow((e, t, n, r) => {
|
|
4705
|
-
g({
|
|
4706
|
-
x: e,
|
|
4707
|
-
y: t,
|
|
4708
|
-
width: n,
|
|
4709
|
-
height: r
|
|
4710
|
-
});
|
|
4711
|
-
});
|
|
4712
|
-
}, [u]), c(() => {
|
|
4713
|
-
!h || !_ || b(Mn(h, _, t));
|
|
4714
|
-
}, [
|
|
4715
|
-
h,
|
|
4716
|
-
_,
|
|
4717
|
-
t
|
|
4718
|
-
]), c(() => {
|
|
4719
|
-
if (y) {
|
|
4720
|
-
if (l) {
|
|
4721
|
-
w.setValue(1);
|
|
4722
|
-
return;
|
|
4723
|
-
}
|
|
4724
|
-
w.setValue(0), m.timing(w, {
|
|
4725
|
-
toValue: 1,
|
|
4726
|
-
duration: a.durationFast,
|
|
4727
|
-
useNativeDriver: !0
|
|
4728
|
-
}).start();
|
|
4729
|
-
}
|
|
4730
|
-
}, [
|
|
4731
|
-
y,
|
|
4732
|
-
l,
|
|
4733
|
-
w,
|
|
4734
|
-
a.durationFast
|
|
4735
|
-
]), c(() => T, [T]);
|
|
4736
|
-
let P = (e) => {
|
|
4737
|
-
let { width: t, height: n } = e.nativeEvent.layout;
|
|
4738
|
-
v({
|
|
4739
|
-
width: t,
|
|
4740
|
-
height: n
|
|
4741
|
-
});
|
|
4742
|
-
}, F = s === "dark" ? "#c0bfbc" : "#3d3d3d", ee = s === "dark" ? "rgba(0, 0, 0, 0.8)" : "#fff", I = s === "dark" ? {
|
|
4743
|
-
shadowOpacity: .4,
|
|
4744
|
-
shadowRadius: 8,
|
|
4745
|
-
elevation: 6
|
|
4746
|
-
} : {
|
|
4747
|
-
shadowOpacity: .2,
|
|
4748
|
-
shadowRadius: 8,
|
|
4749
|
-
elevation: 4
|
|
4750
|
-
}, L = {
|
|
4751
|
-
position: "absolute",
|
|
4752
|
-
width: 0,
|
|
4753
|
-
height: 0,
|
|
4754
|
-
borderWidth: kn,
|
|
4755
|
-
borderColor: "transparent"
|
|
4756
|
-
}, R = (() => {
|
|
4757
|
-
switch (y?.placement) {
|
|
4758
|
-
case "top": return {
|
|
4759
|
-
...L,
|
|
4760
|
-
top: "100%",
|
|
4761
|
-
left: "50%",
|
|
4762
|
-
marginLeft: -5,
|
|
4763
|
-
borderTopColor: F
|
|
4764
|
-
};
|
|
4765
|
-
case "bottom": return {
|
|
4766
|
-
...L,
|
|
4767
|
-
bottom: "100%",
|
|
4768
|
-
left: "50%",
|
|
4769
|
-
marginLeft: -5,
|
|
4770
|
-
borderBottomColor: F
|
|
4771
|
-
};
|
|
4772
|
-
case "left": return {
|
|
4773
|
-
...L,
|
|
4774
|
-
left: "100%",
|
|
4775
|
-
top: "50%",
|
|
4776
|
-
marginTop: -5,
|
|
4777
|
-
borderLeftColor: F
|
|
4778
|
-
};
|
|
4779
|
-
case "right": return {
|
|
4780
|
-
...L,
|
|
4781
|
-
right: "100%",
|
|
4782
|
-
top: "50%",
|
|
4783
|
-
marginTop: -5,
|
|
4784
|
-
borderRightColor: F
|
|
4785
|
-
};
|
|
4786
|
-
default: return null;
|
|
4787
|
-
}
|
|
4788
|
-
})(), te = i.props.ref;
|
|
4789
|
-
return /* @__PURE__ */ N(j, { children: [n(i, {
|
|
4790
|
-
ref: (e) => {
|
|
4791
|
-
S.current = e, An(te, e);
|
|
4792
|
-
},
|
|
4793
|
-
delayLongPress: r,
|
|
4794
|
-
accessibilityHint: i.props.accessibilityHint ?? e,
|
|
4795
|
-
onLongPress: (e) => {
|
|
4796
|
-
D(), i.props.onLongPress?.(e);
|
|
4797
|
-
},
|
|
4798
|
-
onPressOut: (e) => {
|
|
4799
|
-
A(), i.props.onPressOut?.(e);
|
|
4800
|
-
},
|
|
4801
|
-
onHoverIn: (e) => {
|
|
4802
|
-
O(), i.props.onHoverIn?.(e);
|
|
4803
|
-
},
|
|
4804
|
-
onHoverOut: (e) => {
|
|
4805
|
-
A(), i.props.onHoverOut?.(e);
|
|
4806
|
-
},
|
|
4807
|
-
onFocus: (e) => {
|
|
4808
|
-
O(), i.props.onFocus?.(e);
|
|
4809
|
-
},
|
|
4810
|
-
onBlur: (e) => {
|
|
4811
|
-
A(), i.props.onBlur?.(e);
|
|
4812
|
-
}
|
|
4813
|
-
}), /* @__PURE__ */ M(x, {
|
|
4814
|
-
visible: u,
|
|
4815
|
-
transparent: !0,
|
|
4816
|
-
animationType: "none",
|
|
4817
|
-
statusBarTranslucent: !0,
|
|
6359
|
+
var ei = i(function({ value: e, onValueChange: t, accessibilityLabel: n = "Options", children: r, style: i, ...a }, o) {
|
|
6360
|
+
let s = q(), c = K(), l = u(() => ({
|
|
6361
|
+
value: e,
|
|
6362
|
+
onValueChange: t
|
|
6363
|
+
}), [e, t]);
|
|
6364
|
+
return /* @__PURE__ */ M(Qr.Provider, {
|
|
6365
|
+
value: l,
|
|
4818
6366
|
children: /* @__PURE__ */ M(k, {
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
height: 2
|
|
4836
|
-
},
|
|
4837
|
-
...I
|
|
4838
|
-
}, y ? {
|
|
4839
|
-
top: y.top,
|
|
4840
|
-
left: y.left,
|
|
4841
|
-
opacity: w
|
|
4842
|
-
} : {
|
|
4843
|
-
top: -9999,
|
|
4844
|
-
left: -9999,
|
|
4845
|
-
opacity: 0
|
|
4846
|
-
}],
|
|
4847
|
-
children: [/* @__PURE__ */ M(G, {
|
|
4848
|
-
style: {
|
|
4849
|
-
color: ee,
|
|
4850
|
-
fontSize: a.fontSizeCaption,
|
|
4851
|
-
fontWeight: String(a.fontWeightNormal),
|
|
4852
|
-
lineHeight: a.fontSizeCaption * a.lineHeightBody,
|
|
4853
|
-
textAlign: "center"
|
|
4854
|
-
},
|
|
4855
|
-
children: e
|
|
4856
|
-
}), R && /* @__PURE__ */ M(k, { style: R })]
|
|
4857
|
-
})
|
|
6367
|
+
ref: o,
|
|
6368
|
+
accessibilityRole: "radiogroup",
|
|
6369
|
+
accessibilityLabel: n,
|
|
6370
|
+
style: [{
|
|
6371
|
+
alignSelf: "flex-start",
|
|
6372
|
+
flexDirection: "row",
|
|
6373
|
+
alignItems: "stretch",
|
|
6374
|
+
gap: 2,
|
|
6375
|
+
padding: 2,
|
|
6376
|
+
borderRadius: s.radiusMd,
|
|
6377
|
+
borderWidth: 1,
|
|
6378
|
+
borderColor: c === "dark" ? "rgba(255, 255, 255, 0.12)" : s.light3,
|
|
6379
|
+
backgroundColor: s.cardBgColor
|
|
6380
|
+
}, i],
|
|
6381
|
+
...a,
|
|
6382
|
+
children: r
|
|
4858
6383
|
})
|
|
4859
|
-
})
|
|
4860
|
-
},
|
|
4861
|
-
let
|
|
6384
|
+
});
|
|
6385
|
+
}), ti = i(function({ name: e, label: t, icon: n, accessibilityLabel: r, disabled: i = !1, ...a }, o) {
|
|
6386
|
+
let s = q(), c = K(), { value: l, onValueChange: u } = $r(), d = l === e, f = !!n && !t, p = c === "dark";
|
|
6387
|
+
return /* @__PURE__ */ N(w, {
|
|
6388
|
+
ref: o,
|
|
6389
|
+
disabled: i,
|
|
6390
|
+
onPress: () => u(e),
|
|
6391
|
+
accessibilityRole: "radio",
|
|
6392
|
+
accessibilityState: {
|
|
6393
|
+
checked: d,
|
|
6394
|
+
disabled: i
|
|
6395
|
+
},
|
|
6396
|
+
accessibilityLabel: r ?? t,
|
|
6397
|
+
style: ({ pressed: e }) => ({
|
|
6398
|
+
flexDirection: "row",
|
|
6399
|
+
alignItems: "center",
|
|
6400
|
+
justifyContent: "center",
|
|
6401
|
+
gap: s.space1,
|
|
6402
|
+
minHeight: 28,
|
|
6403
|
+
minWidth: f ? 28 : void 0,
|
|
6404
|
+
paddingVertical: 4,
|
|
6405
|
+
paddingHorizontal: f ? 4 : s.space2,
|
|
6406
|
+
borderRadius: s.radiusMd - 2,
|
|
6407
|
+
borderWidth: 1,
|
|
6408
|
+
borderColor: d ? `${s.accentBgColor}${p ? "80" : "66"}` : "transparent",
|
|
6409
|
+
backgroundColor: d ? `${s.accentBgColor}${p ? "40" : "26"}` : e && !i ? s.activeOverlay : "transparent",
|
|
6410
|
+
opacity: i ? s.opacityDisabled : 1
|
|
6411
|
+
}),
|
|
6412
|
+
...a,
|
|
6413
|
+
children: [n ? /* @__PURE__ */ M(k, {
|
|
6414
|
+
style: { flexShrink: 0 },
|
|
6415
|
+
children: /* @__PURE__ */ M(X, {
|
|
6416
|
+
icon: n,
|
|
6417
|
+
size: "md"
|
|
6418
|
+
})
|
|
6419
|
+
}) : null, t ? /* @__PURE__ */ M(D, {
|
|
6420
|
+
numberOfLines: 1,
|
|
6421
|
+
style: {
|
|
6422
|
+
fontFamily: s.fontFamily,
|
|
6423
|
+
fontSize: s.fontSizeBody,
|
|
6424
|
+
fontWeight: String(d ? s.fontWeightSemibold : s.fontWeightNormal),
|
|
6425
|
+
color: d ? s.accentColor : s.windowFgColor
|
|
6426
|
+
},
|
|
6427
|
+
children: t
|
|
6428
|
+
}) : null]
|
|
6429
|
+
});
|
|
6430
|
+
}), ni = i(function({ children: e, accessibilityLabel: t = "View switcher", style: n, ...r }, i) {
|
|
6431
|
+
let a = q(), o = K();
|
|
4862
6432
|
return /* @__PURE__ */ N(k, {
|
|
4863
6433
|
ref: i,
|
|
4864
6434
|
accessible: !0,
|
|
@@ -4884,8 +6454,8 @@ var Nn = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
4884
6454
|
children: e
|
|
4885
6455
|
})]
|
|
4886
6456
|
});
|
|
4887
|
-
}),
|
|
4888
|
-
let o =
|
|
6457
|
+
}), ri = i(function({ label: e, icon: t, active: n = !1, disabled: r, ...i }, a) {
|
|
6458
|
+
let o = q();
|
|
4889
6459
|
return /* @__PURE__ */ N(w, {
|
|
4890
6460
|
ref: a,
|
|
4891
6461
|
disabled: r,
|
|
@@ -4922,6 +6492,6 @@ var Nn = ({ label: e, placement: t = "top", delay: r = 500, children: i }) => {
|
|
|
4922
6492
|
});
|
|
4923
6493
|
});
|
|
4924
6494
|
//#endregion
|
|
4925
|
-
export {
|
|
6495
|
+
export { Be as ActionRow, rt as AnimatedIcon, ut as Avatar, mt as AvatarGroup, vt as AvatarRotator, bt as Badge, xt as Banner, wt as BottomSheet, Dt as Box, kt as BoxedList, Nt as Button, Ft as Card, Lt as Checkbox, Rt as Chip, Bt as Clamp, qt as CoachMark, Yt as CoachMarkTour, Zt as Dialog, Qt as Divider, pn as Drawer, vn as Dropdown, yn as Expander, kn as FileTypeIcon, G as GnomeContext, Ie as GnomeProvider, An as HeaderBar, Mn as Highlight, X as Icon, sn as IconButton, zn as InlineViewSwitcher, Bn as InlineViewSwitcherItem, Un as LevelBar, Wn as Link, je as NAMED_ACCENT_COLORS, Kn as Overlay, qn as PathBar, $n as Popover, er as PreferencesGroup, tr as ProgressBar, ir as RadioButton, or as SearchBar, lr as SegmentedBar, Ot as Separator, hr as Sidebar, fr as SidebarCollapsedContext, mr as SidebarFilterContext, gr as SidebarItem, _r as SidebarSection, vr as Skeleton, Tr as Slider, Ar as SpinButton, Mr as Spinner, Lr as StatusPage, Ur as Switch, Wr as TabBar, Gr as TabItem, Kr as TabPanel, Y as Text, Jr as TextField, Xr as Toast, Zr as Toaster, ei as ToggleGroup, ti as ToggleGroupItem, an as Tooltip, ni as ViewSwitcher, ri as ViewSwitcherItem, Fr as WrapBox, Pe as applyAccentColor, ye as darkRawTokens, he as darkTheme, xe as highContrastDarkRawTokens, _e as highContrastDarkTheme, be as highContrastRawTokens, ge as highContrastTheme, ve as lightRawTokens, me as lightTheme, Me as resolveColorScheme, Ne as resolveContrast, Ae as resolveGnomeTheme, ke as useAccentColor, Ee as useColorScheme, De as useContrast, Te as useDateTimeFormatter, Ce as useDir, q as useGnomeTheme, Se as useLocale, we as useNumberFormatter, J as useReducedMotion, K as useResolvedColorScheme, Oe as useResolvedContrast, pr as useSidebarCollapsed };
|
|
4926
6496
|
|
|
4927
6497
|
//# sourceMappingURL=index.js.map
|