@gnome-ui/react-native 1.0.0 → 1.1.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 +112 -2
- package/dist/components/Banner/Banner.d.ts +50 -0
- package/dist/components/Banner/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +105 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +561 -310
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Children as e, Fragment as t, createContext as n, forwardRef as r, isValidElement as i, useCallback as a, useContext as o, useEffect as s, useImperativeHandle as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
2
|
-
import { AccessibilityInfo as f, Animated as p,
|
|
3
|
-
import { Fragment as
|
|
2
|
+
import { AccessibilityInfo as f, Animated as p, BackHandler as m, Easing as h, I18nManager as g, Linking as _, Modal as v, Platform as y, Pressable as b, ScrollView as x, StyleSheet as S, Text as C, TextInput as w, View as T, useColorScheme as E } from "react-native";
|
|
3
|
+
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
4
4
|
//#region src/theme/tokens.generated.ts
|
|
5
|
-
var
|
|
5
|
+
var A = {
|
|
6
6
|
accentBgColor: "#3584e4",
|
|
7
7
|
accentColor: "#3584e4",
|
|
8
8
|
accentFgColor: "#fff",
|
|
@@ -143,7 +143,7 @@ var O = {
|
|
|
143
143
|
yellow3: "#f6d32d",
|
|
144
144
|
yellow4: "#f5c211",
|
|
145
145
|
yellow5: "#e5a50a"
|
|
146
|
-
},
|
|
146
|
+
}, j = {
|
|
147
147
|
accentBgColor: "#3584e4",
|
|
148
148
|
accentColor: "#62a0ea",
|
|
149
149
|
accentFgColor: "#fff",
|
|
@@ -284,7 +284,7 @@ var O = {
|
|
|
284
284
|
yellow3: "#f6d32d",
|
|
285
285
|
yellow4: "#f5c211",
|
|
286
286
|
yellow5: "#e5a50a"
|
|
287
|
-
},
|
|
287
|
+
}, M = {
|
|
288
288
|
accentBgColor: "#1a5fb4",
|
|
289
289
|
accentColor: "#1a5fb4",
|
|
290
290
|
accentFgColor: "#fff",
|
|
@@ -425,7 +425,7 @@ var O = {
|
|
|
425
425
|
yellow3: "#f6d32d",
|
|
426
426
|
yellow4: "#f5c211",
|
|
427
427
|
yellow5: "#e5a50a"
|
|
428
|
-
},
|
|
428
|
+
}, ee = {
|
|
429
429
|
accentBgColor: "#62a0ea",
|
|
430
430
|
accentColor: "#99c1f1",
|
|
431
431
|
accentFgColor: "#fff",
|
|
@@ -566,7 +566,7 @@ var O = {
|
|
|
566
566
|
yellow3: "#f6d32d",
|
|
567
567
|
yellow4: "#f5c211",
|
|
568
568
|
yellow5: "#e5a50a"
|
|
569
|
-
},
|
|
569
|
+
}, te = {
|
|
570
570
|
"--gnome-accent-bg-color": "#3584e4",
|
|
571
571
|
"--gnome-accent-color": "#3584e4",
|
|
572
572
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -707,7 +707,7 @@ var O = {
|
|
|
707
707
|
"--gnome-yellow-3": "#f6d32d",
|
|
708
708
|
"--gnome-yellow-4": "#f5c211",
|
|
709
709
|
"--gnome-yellow-5": "#e5a50a"
|
|
710
|
-
},
|
|
710
|
+
}, ne = {
|
|
711
711
|
"--gnome-accent-bg-color": "#3584e4",
|
|
712
712
|
"--gnome-accent-color": "#62a0ea",
|
|
713
713
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -848,7 +848,7 @@ var O = {
|
|
|
848
848
|
"--gnome-yellow-3": "#f6d32d",
|
|
849
849
|
"--gnome-yellow-4": "#f5c211",
|
|
850
850
|
"--gnome-yellow-5": "#e5a50a"
|
|
851
|
-
},
|
|
851
|
+
}, re = {
|
|
852
852
|
"--gnome-accent-bg-color": "#1a5fb4",
|
|
853
853
|
"--gnome-accent-color": "#1a5fb4",
|
|
854
854
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -989,7 +989,7 @@ var O = {
|
|
|
989
989
|
"--gnome-yellow-3": "#f6d32d",
|
|
990
990
|
"--gnome-yellow-4": "#f5c211",
|
|
991
991
|
"--gnome-yellow-5": "#e5a50a"
|
|
992
|
-
},
|
|
992
|
+
}, ie = {
|
|
993
993
|
"--gnome-accent-bg-color": "#62a0ea",
|
|
994
994
|
"--gnome-accent-color": "#99c1f1",
|
|
995
995
|
"--gnome-accent-fg-color": "#fff",
|
|
@@ -1130,7 +1130,7 @@ var O = {
|
|
|
1130
1130
|
"--gnome-yellow-3": "#f6d32d",
|
|
1131
1131
|
"--gnome-yellow-4": "#f5c211",
|
|
1132
1132
|
"--gnome-yellow-5": "#e5a50a"
|
|
1133
|
-
},
|
|
1133
|
+
}, N = n({
|
|
1134
1134
|
locale: void 0,
|
|
1135
1135
|
dir: "ltr",
|
|
1136
1136
|
numberFormat: void 0,
|
|
@@ -1140,16 +1140,16 @@ var O = {
|
|
|
1140
1140
|
contrast: "system",
|
|
1141
1141
|
resolvedContrast: "normal",
|
|
1142
1142
|
accentColor: "blue",
|
|
1143
|
-
theme:
|
|
1143
|
+
theme: A
|
|
1144
1144
|
});
|
|
1145
|
-
function ie() {
|
|
1146
|
-
return o(M).locale;
|
|
1147
|
-
}
|
|
1148
1145
|
function ae() {
|
|
1149
|
-
return o(
|
|
1146
|
+
return o(N).locale;
|
|
1147
|
+
}
|
|
1148
|
+
function oe() {
|
|
1149
|
+
return o(N).dir;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
let { locale: t, numberFormat: n } = o(
|
|
1151
|
+
function se(e) {
|
|
1152
|
+
let { locale: t, numberFormat: n } = o(N);
|
|
1153
1153
|
return l(() => new Intl.NumberFormat(t, {
|
|
1154
1154
|
...n,
|
|
1155
1155
|
...e
|
|
@@ -1159,8 +1159,8 @@ function oe(e) {
|
|
|
1159
1159
|
e
|
|
1160
1160
|
]);
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1163
|
-
let { locale: t, dateTimeFormat: n } = o(
|
|
1162
|
+
function ce(e) {
|
|
1163
|
+
let { locale: t, dateTimeFormat: n } = o(N);
|
|
1164
1164
|
return l(() => new Intl.DateTimeFormat(t, {
|
|
1165
1165
|
...n,
|
|
1166
1166
|
...e
|
|
@@ -1170,32 +1170,32 @@ function se(e) {
|
|
|
1170
1170
|
e
|
|
1171
1171
|
]);
|
|
1172
1172
|
}
|
|
1173
|
-
function ce() {
|
|
1174
|
-
return o(M).colorScheme;
|
|
1175
|
-
}
|
|
1176
|
-
function N() {
|
|
1177
|
-
return o(M).resolvedColorScheme;
|
|
1178
|
-
}
|
|
1179
1173
|
function le() {
|
|
1180
|
-
return o(
|
|
1174
|
+
return o(N).colorScheme;
|
|
1181
1175
|
}
|
|
1182
1176
|
function P() {
|
|
1183
|
-
return o(
|
|
1177
|
+
return o(N).resolvedColorScheme;
|
|
1184
1178
|
}
|
|
1185
1179
|
function ue() {
|
|
1186
|
-
return o(
|
|
1180
|
+
return o(N).contrast;
|
|
1187
1181
|
}
|
|
1188
1182
|
function F() {
|
|
1189
|
-
return o(
|
|
1183
|
+
return o(N).resolvedContrast;
|
|
1184
|
+
}
|
|
1185
|
+
function de() {
|
|
1186
|
+
return o(N).accentColor;
|
|
1187
|
+
}
|
|
1188
|
+
function I() {
|
|
1189
|
+
return o(N).theme;
|
|
1190
1190
|
}
|
|
1191
1191
|
//#endregion
|
|
1192
1192
|
//#region src/theme/resolveTheme.ts
|
|
1193
|
-
function
|
|
1194
|
-
return t === "more" ? e === "dark" ?
|
|
1193
|
+
function L({ colorScheme: e, contrast: t = "normal" }) {
|
|
1194
|
+
return t === "more" ? e === "dark" ? ee : M : e === "dark" ? j : A;
|
|
1195
1195
|
}
|
|
1196
1196
|
//#endregion
|
|
1197
1197
|
//#region src/GnomeProvider/resolveContext.ts
|
|
1198
|
-
var
|
|
1198
|
+
var R = new Set([
|
|
1199
1199
|
"blue",
|
|
1200
1200
|
"green",
|
|
1201
1201
|
"yellow",
|
|
@@ -1204,15 +1204,15 @@ var L = new Set([
|
|
|
1204
1204
|
"purple",
|
|
1205
1205
|
"brown"
|
|
1206
1206
|
]);
|
|
1207
|
-
function
|
|
1207
|
+
function z(e, t) {
|
|
1208
1208
|
return e === "system" ? t === "dark" ? "dark" : "light" : e;
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1210
|
+
function B(e, t) {
|
|
1211
1211
|
return e === "system" ? t ? "more" : "normal" : e;
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function V(e, t, n, r) {
|
|
1214
1214
|
if (t === "blue") return e;
|
|
1215
|
-
let i =
|
|
1215
|
+
let i = R.has(t), a = i ? e[`${t}${n === "dark" ? 2 : 3}`] : t, o = i ? e[`${t}3`] : t;
|
|
1216
1216
|
return {
|
|
1217
1217
|
...e,
|
|
1218
1218
|
accentColor: a,
|
|
@@ -1222,23 +1222,23 @@ function B(e, t, n, r) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
//#endregion
|
|
1224
1224
|
//#region src/GnomeProvider/GnomeProvider.tsx
|
|
1225
|
-
function
|
|
1225
|
+
function fe() {
|
|
1226
1226
|
let [e, t] = d(!1);
|
|
1227
1227
|
return s(() => {
|
|
1228
|
-
let e =
|
|
1228
|
+
let e = y.OS === "android" ? f.isHighTextContrastEnabled : y.OS === "ios" ? f.isDarkerSystemColorsEnabled : void 0;
|
|
1229
1229
|
if (!e) return;
|
|
1230
1230
|
let n = !0;
|
|
1231
1231
|
(async () => {
|
|
1232
1232
|
let r = await e();
|
|
1233
1233
|
n && t(r);
|
|
1234
1234
|
})();
|
|
1235
|
-
let r =
|
|
1235
|
+
let r = y.OS === "android" ? "highTextContrastChanged" : "darkerSystemColorsChanged", i = f.addEventListener(r, t);
|
|
1236
1236
|
return () => {
|
|
1237
1237
|
n = !1, i.remove();
|
|
1238
1238
|
};
|
|
1239
1239
|
}, []), e;
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1241
|
+
function H() {
|
|
1242
1242
|
let [e, t] = d(!1);
|
|
1243
1243
|
return s(() => {
|
|
1244
1244
|
let e = !0;
|
|
@@ -1252,8 +1252,8 @@ function V() {
|
|
|
1252
1252
|
};
|
|
1253
1253
|
}, []), e;
|
|
1254
1254
|
}
|
|
1255
|
-
var
|
|
1256
|
-
let c =
|
|
1255
|
+
var pe = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme: i = "system", contrast: a = "system", accentColor: o = "blue", children: s }) => {
|
|
1256
|
+
let c = E(), u = fe(), d = z(i, c), f = B(a, u), p = t ?? (g.isRTL ? "rtl" : "ltr"), m = l(() => ({
|
|
1257
1257
|
locale: e,
|
|
1258
1258
|
dir: p,
|
|
1259
1259
|
numberFormat: n,
|
|
@@ -1263,7 +1263,7 @@ var fe = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme:
|
|
|
1263
1263
|
contrast: a,
|
|
1264
1264
|
resolvedContrast: f,
|
|
1265
1265
|
accentColor: o,
|
|
1266
|
-
theme:
|
|
1266
|
+
theme: V(L({
|
|
1267
1267
|
colorScheme: d,
|
|
1268
1268
|
contrast: f
|
|
1269
1269
|
}), o, d, f)
|
|
@@ -1278,11 +1278,11 @@ var fe = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme:
|
|
|
1278
1278
|
f,
|
|
1279
1279
|
o
|
|
1280
1280
|
]);
|
|
1281
|
-
return /* @__PURE__ */
|
|
1281
|
+
return /* @__PURE__ */ O(N.Provider, {
|
|
1282
1282
|
value: m,
|
|
1283
1283
|
children: s
|
|
1284
1284
|
});
|
|
1285
|
-
},
|
|
1285
|
+
}, me = new Set([
|
|
1286
1286
|
"large-title",
|
|
1287
1287
|
"title-1",
|
|
1288
1288
|
"title-2",
|
|
@@ -1290,7 +1290,7 @@ var fe = ({ locale: e, dir: t, numberFormat: n, dateTimeFormat: r, colorScheme:
|
|
|
1290
1290
|
"title-4",
|
|
1291
1291
|
"heading"
|
|
1292
1292
|
]);
|
|
1293
|
-
function
|
|
1293
|
+
function he(e, t) {
|
|
1294
1294
|
let n = (e) => String(e);
|
|
1295
1295
|
switch (t) {
|
|
1296
1296
|
case "large-title": return {
|
|
@@ -1359,7 +1359,7 @@ function me(e, t) {
|
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function ge(e, t) {
|
|
1363
1363
|
switch (t) {
|
|
1364
1364
|
case "dim": return {
|
|
1365
1365
|
color: e.windowFgColor,
|
|
@@ -1373,22 +1373,22 @@ function he(e, t) {
|
|
|
1373
1373
|
default: return { color: e.windowFgColor };
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
var
|
|
1377
|
-
let s =
|
|
1378
|
-
return /* @__PURE__ */
|
|
1376
|
+
var U = r(function({ variant: e = "body", color: t = "default", style: n, children: r, accessibilityRole: i, ...a }, o) {
|
|
1377
|
+
let s = I();
|
|
1378
|
+
return /* @__PURE__ */ O(C, {
|
|
1379
1379
|
ref: o,
|
|
1380
|
-
accessibilityRole: i ?? (
|
|
1380
|
+
accessibilityRole: i ?? (me.has(e) ? "header" : void 0),
|
|
1381
1381
|
style: [
|
|
1382
1382
|
{ fontFamily: s.fontFamily },
|
|
1383
|
-
|
|
1384
|
-
|
|
1383
|
+
he(s, e),
|
|
1384
|
+
ge(s, t),
|
|
1385
1385
|
n
|
|
1386
1386
|
],
|
|
1387
1387
|
...a,
|
|
1388
1388
|
children: r
|
|
1389
1389
|
});
|
|
1390
|
-
}),
|
|
1391
|
-
let u =
|
|
1390
|
+
}), _e = r(function({ title: e, subtitle: t, leading: n, trailing: r, interactive: i = !1, variant: a = "default", style: o, disabled: s, ...c }, l) {
|
|
1391
|
+
let u = I(), d = a === "property", f = {
|
|
1392
1392
|
flexDirection: "row",
|
|
1393
1393
|
alignItems: "center",
|
|
1394
1394
|
gap: u.space2,
|
|
@@ -1396,23 +1396,23 @@ var H = r(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1396
1396
|
paddingHorizontal: u.space4,
|
|
1397
1397
|
minHeight: 52,
|
|
1398
1398
|
width: "100%"
|
|
1399
|
-
}, p = /* @__PURE__ */ D
|
|
1400
|
-
n && /* @__PURE__ */
|
|
1399
|
+
}, p = /* @__PURE__ */ k(D, { children: [
|
|
1400
|
+
n && /* @__PURE__ */ O(T, {
|
|
1401
1401
|
style: { flexShrink: 0 },
|
|
1402
1402
|
children: n
|
|
1403
1403
|
}),
|
|
1404
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ k(T, {
|
|
1405
1405
|
style: {
|
|
1406
1406
|
flex: 1,
|
|
1407
1407
|
gap: 2
|
|
1408
1408
|
},
|
|
1409
|
-
children: [/* @__PURE__ */
|
|
1409
|
+
children: [/* @__PURE__ */ O(U, {
|
|
1410
1410
|
variant: d ? "caption" : "body",
|
|
1411
1411
|
color: d ? "dim" : "default",
|
|
1412
1412
|
numberOfLines: 1,
|
|
1413
1413
|
ellipsizeMode: "tail",
|
|
1414
1414
|
children: e
|
|
1415
|
-
}), t && /* @__PURE__ */
|
|
1415
|
+
}), t && /* @__PURE__ */ O(U, {
|
|
1416
1416
|
variant: d ? "body" : "caption",
|
|
1417
1417
|
color: d ? "default" : "dim",
|
|
1418
1418
|
numberOfLines: 1,
|
|
@@ -1420,7 +1420,7 @@ var H = r(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1420
1420
|
children: t
|
|
1421
1421
|
})]
|
|
1422
1422
|
}),
|
|
1423
|
-
r && /* @__PURE__ */
|
|
1423
|
+
r && /* @__PURE__ */ O(T, {
|
|
1424
1424
|
style: {
|
|
1425
1425
|
flexShrink: 0,
|
|
1426
1426
|
flexDirection: "row",
|
|
@@ -1430,7 +1430,7 @@ var H = r(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1430
1430
|
children: r
|
|
1431
1431
|
})
|
|
1432
1432
|
] });
|
|
1433
|
-
return i ? /* @__PURE__ */
|
|
1433
|
+
return i ? /* @__PURE__ */ O(b, {
|
|
1434
1434
|
ref: l,
|
|
1435
1435
|
disabled: s,
|
|
1436
1436
|
accessibilityRole: "button",
|
|
@@ -1444,23 +1444,115 @@ var H = r(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1444
1444
|
o
|
|
1445
1445
|
],
|
|
1446
1446
|
...c,
|
|
1447
|
-
children: ({ pressed: e }) => /* @__PURE__ */ D
|
|
1447
|
+
children: ({ pressed: e }) => /* @__PURE__ */ k(D, { children: [p, e && !s ? /* @__PURE__ */ O(T, {
|
|
1448
1448
|
pointerEvents: "none",
|
|
1449
|
-
style: [
|
|
1449
|
+
style: [S.absoluteFill, { backgroundColor: u.activeOverlay }]
|
|
1450
1450
|
}) : null] })
|
|
1451
|
-
}) : /* @__PURE__ */
|
|
1451
|
+
}) : /* @__PURE__ */ O(T, {
|
|
1452
1452
|
ref: l,
|
|
1453
1453
|
style: [f, o],
|
|
1454
1454
|
...c,
|
|
1455
1455
|
children: p
|
|
1456
1456
|
});
|
|
1457
|
-
}),
|
|
1458
|
-
|
|
1457
|
+
}), ve = ({ variant: e = "info", children: t, actionLabel: n, onAction: r, dismissible: i = !1, onDismiss: a, style: o, ...s }) => {
|
|
1458
|
+
let c = I(), l = {
|
|
1459
|
+
info: {
|
|
1460
|
+
bg: c.accentBgColor,
|
|
1461
|
+
fg: c.accentFgColor
|
|
1462
|
+
},
|
|
1463
|
+
warning: {
|
|
1464
|
+
bg: c.warningBgColor,
|
|
1465
|
+
fg: c.warningFgColor
|
|
1466
|
+
},
|
|
1467
|
+
error: {
|
|
1468
|
+
bg: c.errorBgColor,
|
|
1469
|
+
fg: c.errorFgColor
|
|
1470
|
+
},
|
|
1471
|
+
success: {
|
|
1472
|
+
bg: c.successBgColor,
|
|
1473
|
+
fg: c.successFgColor
|
|
1474
|
+
}
|
|
1475
|
+
}[e], u = e === "warning" ? "rgba(0, 0, 0, 0.14)" : "rgba(255, 255, 255, 0.25)";
|
|
1476
|
+
return /* @__PURE__ */ k(T, {
|
|
1477
|
+
accessible: !0,
|
|
1478
|
+
accessibilityRole: "alert",
|
|
1479
|
+
accessibilityLiveRegion: "polite",
|
|
1480
|
+
style: [{
|
|
1481
|
+
flexDirection: "row",
|
|
1482
|
+
alignItems: "center",
|
|
1483
|
+
gap: c.space2,
|
|
1484
|
+
paddingVertical: 10,
|
|
1485
|
+
paddingHorizontal: c.space4,
|
|
1486
|
+
minHeight: 44,
|
|
1487
|
+
width: "100%",
|
|
1488
|
+
backgroundColor: l.bg
|
|
1489
|
+
}, o],
|
|
1490
|
+
...s,
|
|
1491
|
+
children: [/* @__PURE__ */ O(U, {
|
|
1492
|
+
variant: "body",
|
|
1493
|
+
style: {
|
|
1494
|
+
flex: 1,
|
|
1495
|
+
minWidth: 0,
|
|
1496
|
+
color: l.fg
|
|
1497
|
+
},
|
|
1498
|
+
children: t
|
|
1499
|
+
}), (n || i) && /* @__PURE__ */ k(T, {
|
|
1500
|
+
style: {
|
|
1501
|
+
flexDirection: "row",
|
|
1502
|
+
alignItems: "center",
|
|
1503
|
+
gap: c.space1,
|
|
1504
|
+
flexShrink: 0
|
|
1505
|
+
},
|
|
1506
|
+
children: [n && /* @__PURE__ */ O(b, {
|
|
1507
|
+
accessibilityRole: "button",
|
|
1508
|
+
accessibilityLabel: n,
|
|
1509
|
+
onPress: r,
|
|
1510
|
+
style: ({ pressed: e }) => ({
|
|
1511
|
+
paddingVertical: 4,
|
|
1512
|
+
paddingHorizontal: c.space2,
|
|
1513
|
+
borderRadius: c.radiusMd,
|
|
1514
|
+
backgroundColor: e ? u : "transparent"
|
|
1515
|
+
}),
|
|
1516
|
+
children: /* @__PURE__ */ O(C, {
|
|
1517
|
+
style: {
|
|
1518
|
+
fontFamily: c.fontFamily,
|
|
1519
|
+
fontSize: c.fontSizeBody,
|
|
1520
|
+
fontWeight: String(c.fontWeightSemibold),
|
|
1521
|
+
color: l.fg
|
|
1522
|
+
},
|
|
1523
|
+
children: n
|
|
1524
|
+
})
|
|
1525
|
+
}), i && /* @__PURE__ */ O(b, {
|
|
1526
|
+
accessibilityRole: "button",
|
|
1527
|
+
accessibilityLabel: "Dismiss",
|
|
1528
|
+
hitSlop: 4,
|
|
1529
|
+
onPress: a,
|
|
1530
|
+
style: ({ pressed: e }) => ({
|
|
1531
|
+
width: 28,
|
|
1532
|
+
height: 28,
|
|
1533
|
+
alignItems: "center",
|
|
1534
|
+
justifyContent: "center",
|
|
1535
|
+
borderRadius: c.radiusMd,
|
|
1536
|
+
opacity: e ? 1 : .6,
|
|
1537
|
+
backgroundColor: e ? u : "transparent"
|
|
1538
|
+
}),
|
|
1539
|
+
children: /* @__PURE__ */ O(C, {
|
|
1540
|
+
style: {
|
|
1541
|
+
fontSize: c.fontSizeBody,
|
|
1542
|
+
color: l.fg
|
|
1543
|
+
},
|
|
1544
|
+
children: "×"
|
|
1545
|
+
})
|
|
1546
|
+
})]
|
|
1547
|
+
})]
|
|
1548
|
+
});
|
|
1549
|
+
}, W = r(function({ orientation: e = "horizontal", style: t, ...n }, r) {
|
|
1550
|
+
return /* @__PURE__ */ O(T, {
|
|
1459
1551
|
ref: r,
|
|
1460
1552
|
accessible: !1,
|
|
1461
1553
|
style: [
|
|
1462
1554
|
{
|
|
1463
|
-
backgroundColor:
|
|
1555
|
+
backgroundColor: I().cardShadeColor,
|
|
1464
1556
|
flexShrink: 0
|
|
1465
1557
|
},
|
|
1466
1558
|
e === "vertical" ? {
|
|
@@ -1475,15 +1567,15 @@ var H = r(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1475
1567
|
],
|
|
1476
1568
|
...n
|
|
1477
1569
|
});
|
|
1478
|
-
}),
|
|
1479
|
-
let o =
|
|
1480
|
-
return n === "separate" ? /* @__PURE__ */
|
|
1570
|
+
}), ye = r(function({ children: t, variant: n = "default", style: r, ...i }, a) {
|
|
1571
|
+
let o = I(), s = e.toArray(t).filter(Boolean);
|
|
1572
|
+
return n === "separate" ? /* @__PURE__ */ O(T, {
|
|
1481
1573
|
ref: a,
|
|
1482
1574
|
accessible: !0,
|
|
1483
1575
|
accessibilityRole: "list",
|
|
1484
1576
|
style: [{ gap: o.space2 }, r],
|
|
1485
1577
|
...i,
|
|
1486
|
-
children: s.map((e, t) => /* @__PURE__ */
|
|
1578
|
+
children: s.map((e, t) => /* @__PURE__ */ O(T, {
|
|
1487
1579
|
style: {
|
|
1488
1580
|
backgroundColor: o.cardBgColor,
|
|
1489
1581
|
borderWidth: 1,
|
|
@@ -1493,7 +1585,7 @@ var H = r(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1493
1585
|
},
|
|
1494
1586
|
children: e
|
|
1495
1587
|
}, t))
|
|
1496
|
-
}) : /* @__PURE__ */
|
|
1588
|
+
}) : /* @__PURE__ */ O(T, {
|
|
1497
1589
|
ref: a,
|
|
1498
1590
|
accessible: !0,
|
|
1499
1591
|
accessibilityRole: "list",
|
|
@@ -1505,12 +1597,12 @@ var H = r(function({ variant: e = "body", color: t = "default", style: n, childr
|
|
|
1505
1597
|
overflow: "hidden"
|
|
1506
1598
|
}, r],
|
|
1507
1599
|
...i,
|
|
1508
|
-
children: s.map((e, t) => /* @__PURE__ */
|
|
1600
|
+
children: s.map((e, t) => /* @__PURE__ */ k(T, { children: [t > 0 && /* @__PURE__ */ O(W, { testID: "boxed-list-separator" }), e] }, t))
|
|
1509
1601
|
});
|
|
1510
1602
|
});
|
|
1511
1603
|
//#endregion
|
|
1512
1604
|
//#region src/components/Button/Button.tsx
|
|
1513
|
-
function
|
|
1605
|
+
function G(e, t) {
|
|
1514
1606
|
switch (t) {
|
|
1515
1607
|
case "sm": return {
|
|
1516
1608
|
minHeight: 28,
|
|
@@ -1535,14 +1627,14 @@ function W(e, t) {
|
|
|
1535
1627
|
};
|
|
1536
1628
|
}
|
|
1537
1629
|
}
|
|
1538
|
-
function
|
|
1630
|
+
function be(e) {
|
|
1539
1631
|
switch (e) {
|
|
1540
1632
|
case "sm": return 28;
|
|
1541
1633
|
case "lg": return 42;
|
|
1542
1634
|
default: return 34;
|
|
1543
1635
|
}
|
|
1544
1636
|
}
|
|
1545
|
-
function
|
|
1637
|
+
function K(e, t, n, r) {
|
|
1546
1638
|
if (r) return {
|
|
1547
1639
|
backgroundColor: n ? "rgba(0, 0, 0, 0.85)" : "rgba(0, 0, 0, 0.65)",
|
|
1548
1640
|
borderColor: "rgba(255, 255, 255, 0.12)",
|
|
@@ -1571,15 +1663,15 @@ function G(e, t, n, r) {
|
|
|
1571
1663
|
};
|
|
1572
1664
|
}
|
|
1573
1665
|
}
|
|
1574
|
-
var
|
|
1575
|
-
let f =
|
|
1576
|
-
return /* @__PURE__ */
|
|
1666
|
+
var xe = r(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) {
|
|
1667
|
+
let f = I(), p = F();
|
|
1668
|
+
return /* @__PURE__ */ O(b, {
|
|
1577
1669
|
ref: d,
|
|
1578
1670
|
disabled: l,
|
|
1579
1671
|
accessibilityRole: "button",
|
|
1580
1672
|
accessibilityState: { disabled: !!l },
|
|
1581
1673
|
style: ({ pressed: i }) => {
|
|
1582
|
-
let { backgroundColor: a, borderColor: o } =
|
|
1674
|
+
let { backgroundColor: a, borderColor: o } = K(f, e, i, r), c = !r && (e === "suggested" || e === "destructive"), u = n === "circular" ? be(t) : void 0, { minHeight: d, minWidth: m, paddingVertical: h, paddingHorizontal: g } = G(f, t);
|
|
1583
1675
|
return [{
|
|
1584
1676
|
flexDirection: "row",
|
|
1585
1677
|
alignItems: "center",
|
|
@@ -1600,10 +1692,10 @@ var ye = r(function({ variant: e = "default", size: t = "md", shape: n = "defaul
|
|
|
1600
1692
|
},
|
|
1601
1693
|
...u,
|
|
1602
1694
|
children: ({ pressed: n }) => {
|
|
1603
|
-
let { fontSize: s } =
|
|
1604
|
-
return /* @__PURE__ */ D
|
|
1695
|
+
let { fontSize: s } = G(f, t), { color: l } = K(f, e, n, r);
|
|
1696
|
+
return /* @__PURE__ */ k(D, { children: [
|
|
1605
1697
|
i,
|
|
1606
|
-
typeof o == "string" ? /* @__PURE__ */
|
|
1698
|
+
typeof o == "string" ? /* @__PURE__ */ O(C, {
|
|
1607
1699
|
style: [{
|
|
1608
1700
|
fontFamily: f.fontFamily,
|
|
1609
1701
|
fontWeight: String(f.fontWeightSemibold),
|
|
@@ -1619,7 +1711,7 @@ var ye = r(function({ variant: e = "default", size: t = "md", shape: n = "defaul
|
|
|
1619
1711
|
});
|
|
1620
1712
|
//#endregion
|
|
1621
1713
|
//#region src/components/Card/Card.tsx
|
|
1622
|
-
function
|
|
1714
|
+
function Se(e, t) {
|
|
1623
1715
|
switch (t) {
|
|
1624
1716
|
case "none": return 0;
|
|
1625
1717
|
case "sm": return e.space2;
|
|
@@ -1627,16 +1719,16 @@ function be(e, t) {
|
|
|
1627
1719
|
default: return e.space4;
|
|
1628
1720
|
}
|
|
1629
1721
|
}
|
|
1630
|
-
var
|
|
1631
|
-
let s =
|
|
1722
|
+
var Ce = r(function({ interactive: e = !1, padding: t = "md", style: n, children: r, disabled: i, ...a }, o) {
|
|
1723
|
+
let s = I(), c = {
|
|
1632
1724
|
backgroundColor: s.cardBgColor,
|
|
1633
1725
|
borderWidth: 1,
|
|
1634
1726
|
borderColor: s.cardShadeColor,
|
|
1635
1727
|
borderRadius: s.radiusLg,
|
|
1636
1728
|
overflow: "hidden",
|
|
1637
|
-
padding:
|
|
1729
|
+
padding: Se(s, t)
|
|
1638
1730
|
};
|
|
1639
|
-
return e ? /* @__PURE__ */
|
|
1731
|
+
return e ? /* @__PURE__ */ O(b, {
|
|
1640
1732
|
ref: o,
|
|
1641
1733
|
disabled: i,
|
|
1642
1734
|
accessibilityRole: "button",
|
|
@@ -1650,47 +1742,47 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1650
1742
|
n
|
|
1651
1743
|
],
|
|
1652
1744
|
...a,
|
|
1653
|
-
children: ({ pressed: e }) => /* @__PURE__ */ D
|
|
1745
|
+
children: ({ pressed: e }) => /* @__PURE__ */ k(D, { children: [r, e && !i ? /* @__PURE__ */ O(T, {
|
|
1654
1746
|
pointerEvents: "none",
|
|
1655
|
-
style: [
|
|
1747
|
+
style: [S.absoluteFill, {
|
|
1656
1748
|
backgroundColor: s.activeOverlay,
|
|
1657
1749
|
borderRadius: s.radiusLg
|
|
1658
1750
|
}]
|
|
1659
1751
|
}) : null] })
|
|
1660
|
-
}) : /* @__PURE__ */
|
|
1752
|
+
}) : /* @__PURE__ */ O(T, {
|
|
1661
1753
|
ref: o,
|
|
1662
1754
|
style: [c, n],
|
|
1663
1755
|
...a,
|
|
1664
1756
|
children: r
|
|
1665
1757
|
});
|
|
1666
|
-
}),
|
|
1667
|
-
let c =
|
|
1758
|
+
}), q = 18, we = r(function({ value: e, indeterminate: t = !1, onValueChange: n, disabled: r, style: i, ...a }, o) {
|
|
1759
|
+
let c = I(), l = P(), d = F(), f = e || t, m = u(new p.Value(+!!f)).current, g = u(!0);
|
|
1668
1760
|
s(() => {
|
|
1669
1761
|
if (g.current) {
|
|
1670
1762
|
g.current = !1;
|
|
1671
1763
|
return;
|
|
1672
1764
|
}
|
|
1673
1765
|
let [e, t, n, r] = c.easingDefault;
|
|
1674
|
-
p.timing(
|
|
1766
|
+
p.timing(m, {
|
|
1675
1767
|
toValue: +!!f,
|
|
1676
1768
|
duration: c.durationFast,
|
|
1677
|
-
easing:
|
|
1769
|
+
easing: h.bezier(e, t, n, r),
|
|
1678
1770
|
useNativeDriver: !1
|
|
1679
1771
|
}).start();
|
|
1680
1772
|
}, [
|
|
1681
1773
|
f,
|
|
1682
|
-
|
|
1774
|
+
m,
|
|
1683
1775
|
c.durationFast,
|
|
1684
1776
|
c.easingDefault
|
|
1685
1777
|
]);
|
|
1686
|
-
let _ = d === "more" ? c.windowFgColor : l === "dark" ? c.dark1 : c.light4,
|
|
1778
|
+
let _ = d === "more" ? c.windowFgColor : l === "dark" ? c.dark1 : c.light4, v = m.interpolate({
|
|
1687
1779
|
inputRange: [0, 1],
|
|
1688
1780
|
outputRange: [_, c.accentBgColor]
|
|
1689
|
-
}),
|
|
1781
|
+
}), y = m.interpolate({
|
|
1690
1782
|
inputRange: [0, 1],
|
|
1691
1783
|
outputRange: [c.cardBgColor, c.accentBgColor]
|
|
1692
1784
|
});
|
|
1693
|
-
return /* @__PURE__ */
|
|
1785
|
+
return /* @__PURE__ */ O(b, {
|
|
1694
1786
|
ref: o,
|
|
1695
1787
|
disabled: r,
|
|
1696
1788
|
accessibilityRole: "checkbox",
|
|
@@ -1701,26 +1793,26 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1701
1793
|
onPress: () => n?.(!e),
|
|
1702
1794
|
style: [{ opacity: r ? c.opacityDisabled : 1 }, i],
|
|
1703
1795
|
...a,
|
|
1704
|
-
children: /* @__PURE__ */
|
|
1796
|
+
children: /* @__PURE__ */ O(p.View, {
|
|
1705
1797
|
style: {
|
|
1706
|
-
width:
|
|
1707
|
-
height:
|
|
1798
|
+
width: q,
|
|
1799
|
+
height: q,
|
|
1708
1800
|
alignItems: "center",
|
|
1709
1801
|
justifyContent: "center",
|
|
1710
1802
|
borderRadius: c.radiusSm,
|
|
1711
1803
|
borderWidth: d === "more" ? 2 : 1.5,
|
|
1712
|
-
borderColor:
|
|
1713
|
-
backgroundColor:
|
|
1804
|
+
borderColor: v,
|
|
1805
|
+
backgroundColor: y
|
|
1714
1806
|
},
|
|
1715
|
-
children: t ? /* @__PURE__ */
|
|
1807
|
+
children: t ? /* @__PURE__ */ O(p.View, { style: {
|
|
1716
1808
|
width: 10,
|
|
1717
1809
|
height: 2,
|
|
1718
1810
|
borderRadius: 1,
|
|
1719
1811
|
backgroundColor: "#fff",
|
|
1720
|
-
opacity:
|
|
1721
|
-
} }) : /* @__PURE__ */
|
|
1812
|
+
opacity: m
|
|
1813
|
+
} }) : /* @__PURE__ */ O(p.Text, {
|
|
1722
1814
|
style: {
|
|
1723
|
-
opacity:
|
|
1815
|
+
opacity: m,
|
|
1724
1816
|
color: "#fff",
|
|
1725
1817
|
fontSize: 13,
|
|
1726
1818
|
fontWeight: "bold",
|
|
@@ -1730,9 +1822,168 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1730
1822
|
})
|
|
1731
1823
|
})
|
|
1732
1824
|
});
|
|
1733
|
-
}),
|
|
1734
|
-
let
|
|
1735
|
-
|
|
1825
|
+
}), Te = p.createAnimatedComponent(b), Ee = ({ open: e, title: t, children: n, buttons: r = [], onClose: i, closeOnBackdrop: a = !0, role: o = "dialog", responses: c, onResponse: l, style: d, testID: f }) => {
|
|
1826
|
+
let g = I(), _ = P(), y = H(), x = u(new p.Value(+!!y)).current, S = !!c, C = () => {
|
|
1827
|
+
let e = c?.find((e) => e.variant !== "destructive" && !e.disabled);
|
|
1828
|
+
e && l?.(e.id);
|
|
1829
|
+
}, w = () => {
|
|
1830
|
+
S ? C() : i?.();
|
|
1831
|
+
}, E = S ? C : a ? i : void 0;
|
|
1832
|
+
s(() => {
|
|
1833
|
+
if (!e) return;
|
|
1834
|
+
if (y) {
|
|
1835
|
+
x.setValue(1);
|
|
1836
|
+
return;
|
|
1837
|
+
}
|
|
1838
|
+
x.setValue(0);
|
|
1839
|
+
let [t, n, r, i] = g.easingDefault;
|
|
1840
|
+
p.timing(x, {
|
|
1841
|
+
toValue: 1,
|
|
1842
|
+
duration: g.durationNormal,
|
|
1843
|
+
easing: h.bezier(t, n, r, i),
|
|
1844
|
+
useNativeDriver: !0
|
|
1845
|
+
}).start();
|
|
1846
|
+
}, [
|
|
1847
|
+
e,
|
|
1848
|
+
y,
|
|
1849
|
+
x,
|
|
1850
|
+
g.durationNormal,
|
|
1851
|
+
g.easingDefault
|
|
1852
|
+
]), s(() => {
|
|
1853
|
+
if (!e) return;
|
|
1854
|
+
let t = m.addEventListener("hardwareBackPress", () => (w(), !0));
|
|
1855
|
+
return () => t.remove();
|
|
1856
|
+
}, [
|
|
1857
|
+
e,
|
|
1858
|
+
S,
|
|
1859
|
+
c,
|
|
1860
|
+
l,
|
|
1861
|
+
i
|
|
1862
|
+
]);
|
|
1863
|
+
let D = () => {
|
|
1864
|
+
let e = S && c ? c : r;
|
|
1865
|
+
return e.length === 0 ? null : /* @__PURE__ */ O(T, {
|
|
1866
|
+
style: {
|
|
1867
|
+
borderTopWidth: 1,
|
|
1868
|
+
borderTopColor: g.cardShadeColor
|
|
1869
|
+
},
|
|
1870
|
+
children: e.map((t, n) => {
|
|
1871
|
+
let r = t.variant ?? "default", i = r === "destructive" ? g.destructiveColor : g.accentColor, a = S ? () => l?.(t.id) : t.onPress;
|
|
1872
|
+
return /* @__PURE__ */ O(b, {
|
|
1873
|
+
accessibilityRole: "button",
|
|
1874
|
+
accessibilityState: { disabled: t.disabled },
|
|
1875
|
+
disabled: t.disabled,
|
|
1876
|
+
onPress: a,
|
|
1877
|
+
style: ({ pressed: r }) => ({
|
|
1878
|
+
paddingVertical: 14,
|
|
1879
|
+
paddingHorizontal: g.space4,
|
|
1880
|
+
borderBottomWidth: +(n < e.length - 1),
|
|
1881
|
+
borderBottomColor: g.cardShadeColor,
|
|
1882
|
+
backgroundColor: r ? g.activeOverlay : "transparent",
|
|
1883
|
+
opacity: t.disabled ? g.opacityDisabled : 1
|
|
1884
|
+
}),
|
|
1885
|
+
children: /* @__PURE__ */ O(U, {
|
|
1886
|
+
variant: "body",
|
|
1887
|
+
style: {
|
|
1888
|
+
textAlign: "center",
|
|
1889
|
+
color: i,
|
|
1890
|
+
fontWeight: r === "suggested" ? String(g.fontWeightSemibold) : void 0
|
|
1891
|
+
},
|
|
1892
|
+
children: t.label
|
|
1893
|
+
})
|
|
1894
|
+
}, S ? t.id : t.label);
|
|
1895
|
+
})
|
|
1896
|
+
});
|
|
1897
|
+
}, A = _ === "dark" ? {
|
|
1898
|
+
shadowOpacity: .5,
|
|
1899
|
+
shadowRadius: 32,
|
|
1900
|
+
elevation: 12
|
|
1901
|
+
} : {
|
|
1902
|
+
shadowOpacity: .25,
|
|
1903
|
+
shadowRadius: 32,
|
|
1904
|
+
elevation: 8
|
|
1905
|
+
};
|
|
1906
|
+
return /* @__PURE__ */ O(v, {
|
|
1907
|
+
visible: e,
|
|
1908
|
+
transparent: !0,
|
|
1909
|
+
animationType: "none",
|
|
1910
|
+
statusBarTranslucent: !0,
|
|
1911
|
+
onRequestClose: w,
|
|
1912
|
+
children: /* @__PURE__ */ O(Te, {
|
|
1913
|
+
testID: f,
|
|
1914
|
+
onPress: E,
|
|
1915
|
+
style: {
|
|
1916
|
+
flex: 1,
|
|
1917
|
+
alignItems: "center",
|
|
1918
|
+
justifyContent: "center",
|
|
1919
|
+
paddingHorizontal: 24,
|
|
1920
|
+
backgroundColor: g.dialogBackdropColor,
|
|
1921
|
+
opacity: x
|
|
1922
|
+
},
|
|
1923
|
+
children: /* @__PURE__ */ O(b, {
|
|
1924
|
+
onPress: () => {},
|
|
1925
|
+
accessible: !1,
|
|
1926
|
+
style: {
|
|
1927
|
+
width: "100%",
|
|
1928
|
+
maxWidth: 480
|
|
1929
|
+
},
|
|
1930
|
+
children: /* @__PURE__ */ k(p.View, {
|
|
1931
|
+
accessible: !0,
|
|
1932
|
+
role: o,
|
|
1933
|
+
accessibilityViewIsModal: !0,
|
|
1934
|
+
style: [{
|
|
1935
|
+
backgroundColor: g.dialogBgColor,
|
|
1936
|
+
borderRadius: g.radiusXl,
|
|
1937
|
+
overflow: "hidden",
|
|
1938
|
+
shadowColor: "#000",
|
|
1939
|
+
shadowOffset: {
|
|
1940
|
+
width: 0,
|
|
1941
|
+
height: 8
|
|
1942
|
+
},
|
|
1943
|
+
...A,
|
|
1944
|
+
opacity: x,
|
|
1945
|
+
transform: [{ translateY: x.interpolate({
|
|
1946
|
+
inputRange: [0, 1],
|
|
1947
|
+
outputRange: [-8, 0]
|
|
1948
|
+
}) }, { scale: x.interpolate({
|
|
1949
|
+
inputRange: [0, 1],
|
|
1950
|
+
outputRange: [.92, 1]
|
|
1951
|
+
}) }]
|
|
1952
|
+
}, d],
|
|
1953
|
+
children: [
|
|
1954
|
+
t && /* @__PURE__ */ O(U, {
|
|
1955
|
+
variant: "title-4",
|
|
1956
|
+
style: {
|
|
1957
|
+
padding: g.space4,
|
|
1958
|
+
paddingBottom: n ? 0 : g.space4,
|
|
1959
|
+
textAlign: "center",
|
|
1960
|
+
fontWeight: String(g.fontWeightBold)
|
|
1961
|
+
},
|
|
1962
|
+
children: t
|
|
1963
|
+
}),
|
|
1964
|
+
n && /* @__PURE__ */ O(T, {
|
|
1965
|
+
style: {
|
|
1966
|
+
paddingVertical: g.space2,
|
|
1967
|
+
paddingHorizontal: g.space4
|
|
1968
|
+
},
|
|
1969
|
+
children: typeof n == "string" ? /* @__PURE__ */ O(U, {
|
|
1970
|
+
variant: "body",
|
|
1971
|
+
style: {
|
|
1972
|
+
textAlign: "center",
|
|
1973
|
+
opacity: g.opacityDim
|
|
1974
|
+
},
|
|
1975
|
+
children: n
|
|
1976
|
+
}) : n
|
|
1977
|
+
}),
|
|
1978
|
+
D()
|
|
1979
|
+
]
|
|
1980
|
+
})
|
|
1981
|
+
})
|
|
1982
|
+
})
|
|
1983
|
+
});
|
|
1984
|
+
}, De = r(function({ title: e, start: t, end: n, flat: r = !1, style: i, ...a }, o) {
|
|
1985
|
+
let s = I();
|
|
1986
|
+
return /* @__PURE__ */ k(T, {
|
|
1736
1987
|
ref: o,
|
|
1737
1988
|
style: [{
|
|
1738
1989
|
flexDirection: "row",
|
|
@@ -1746,7 +1997,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1746
1997
|
}, i],
|
|
1747
1998
|
...a,
|
|
1748
1999
|
children: [
|
|
1749
|
-
/* @__PURE__ */
|
|
2000
|
+
/* @__PURE__ */ O(T, {
|
|
1750
2001
|
style: {
|
|
1751
2002
|
flex: 1,
|
|
1752
2003
|
flexDirection: "row",
|
|
@@ -1755,14 +2006,14 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1755
2006
|
},
|
|
1756
2007
|
children: t
|
|
1757
2008
|
}),
|
|
1758
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ O(T, {
|
|
1759
2010
|
accessibilityLiveRegion: "polite",
|
|
1760
2011
|
style: {
|
|
1761
2012
|
alignItems: "center",
|
|
1762
2013
|
justifyContent: "center",
|
|
1763
2014
|
paddingHorizontal: s.space1
|
|
1764
2015
|
},
|
|
1765
|
-
children: typeof e == "string" ? /* @__PURE__ */
|
|
2016
|
+
children: typeof e == "string" ? /* @__PURE__ */ O(C, {
|
|
1766
2017
|
numberOfLines: 1,
|
|
1767
2018
|
ellipsizeMode: "tail",
|
|
1768
2019
|
style: {
|
|
@@ -1775,7 +2026,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1775
2026
|
children: e
|
|
1776
2027
|
}) : e
|
|
1777
2028
|
}),
|
|
1778
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ O(T, {
|
|
1779
2030
|
style: {
|
|
1780
2031
|
flex: 1,
|
|
1781
2032
|
flexDirection: "row",
|
|
@@ -1787,22 +2038,22 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1787
2038
|
})
|
|
1788
2039
|
]
|
|
1789
2040
|
});
|
|
1790
|
-
}),
|
|
1791
|
-
let c =
|
|
1792
|
-
return /* @__PURE__ */
|
|
2041
|
+
}), Oe = r(function({ href: e, external: t = !1, children: n, style: r, textStyle: i, onPress: a, ...o }, s) {
|
|
2042
|
+
let c = I();
|
|
2043
|
+
return /* @__PURE__ */ O(b, {
|
|
1793
2044
|
ref: s,
|
|
1794
2045
|
accessibilityRole: "link",
|
|
1795
2046
|
accessibilityHint: t ? "Opens in browser" : void 0,
|
|
1796
|
-
onPress: a ?? (() =>
|
|
2047
|
+
onPress: a ?? (() => _.openURL(e)),
|
|
1797
2048
|
style: r,
|
|
1798
2049
|
...o,
|
|
1799
|
-
children: ({ pressed: e }) => /* @__PURE__ */
|
|
2050
|
+
children: ({ pressed: e }) => /* @__PURE__ */ k(U, {
|
|
1800
2051
|
style: [{
|
|
1801
2052
|
color: c.accentColor,
|
|
1802
2053
|
textDecorationLine: e ? "underline" : "none",
|
|
1803
2054
|
opacity: e ? .7 : 1
|
|
1804
2055
|
}, i],
|
|
1805
|
-
children: [n, t && /* @__PURE__ */
|
|
2056
|
+
children: [n, t && /* @__PURE__ */ O(C, {
|
|
1806
2057
|
accessibilityElementsHidden: !0,
|
|
1807
2058
|
importantForAccessibility: "no",
|
|
1808
2059
|
style: { fontSize: 12 },
|
|
@@ -1810,9 +2061,9 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1810
2061
|
})]
|
|
1811
2062
|
})
|
|
1812
2063
|
});
|
|
1813
|
-
}),
|
|
1814
|
-
let a =
|
|
1815
|
-
return /* @__PURE__ */
|
|
2064
|
+
}), ke = ({ segments: e, onNavigate: n, style: r, ...i }) => {
|
|
2065
|
+
let a = I();
|
|
2066
|
+
return /* @__PURE__ */ O(T, {
|
|
1816
2067
|
style: [{
|
|
1817
2068
|
flexDirection: "row",
|
|
1818
2069
|
flexWrap: "wrap",
|
|
@@ -1821,7 +2072,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1821
2072
|
...i,
|
|
1822
2073
|
children: e.map((r, i) => {
|
|
1823
2074
|
let o = i === e.length - 1;
|
|
1824
|
-
return /* @__PURE__ */
|
|
2075
|
+
return /* @__PURE__ */ k(t, { children: [i > 0 && /* @__PURE__ */ O(C, {
|
|
1825
2076
|
accessibilityElementsHidden: !0,
|
|
1826
2077
|
importantForAccessibility: "no",
|
|
1827
2078
|
style: {
|
|
@@ -1831,7 +2082,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1831
2082
|
fontSize: a.fontSizeBody
|
|
1832
2083
|
},
|
|
1833
2084
|
children: "›"
|
|
1834
|
-
}), o ? /* @__PURE__ */
|
|
2085
|
+
}), o ? /* @__PURE__ */ k(T, {
|
|
1835
2086
|
style: {
|
|
1836
2087
|
flexDirection: "row",
|
|
1837
2088
|
alignItems: "center",
|
|
@@ -1840,10 +2091,10 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1840
2091
|
paddingHorizontal: a.space1,
|
|
1841
2092
|
maxWidth: 200
|
|
1842
2093
|
},
|
|
1843
|
-
children: [r.icon && /* @__PURE__ */
|
|
2094
|
+
children: [r.icon && /* @__PURE__ */ O(T, {
|
|
1844
2095
|
style: { flexShrink: 0 },
|
|
1845
2096
|
children: r.icon
|
|
1846
|
-
}), /* @__PURE__ */
|
|
2097
|
+
}), /* @__PURE__ */ O(C, {
|
|
1847
2098
|
numberOfLines: 1,
|
|
1848
2099
|
ellipsizeMode: "tail",
|
|
1849
2100
|
style: {
|
|
@@ -1854,7 +2105,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1854
2105
|
},
|
|
1855
2106
|
children: r.label
|
|
1856
2107
|
})]
|
|
1857
|
-
}) : /* @__PURE__ */
|
|
2108
|
+
}) : /* @__PURE__ */ k(b, {
|
|
1858
2109
|
accessibilityRole: "button",
|
|
1859
2110
|
accessibilityLabel: r.label,
|
|
1860
2111
|
onPress: () => n?.(r.path, i),
|
|
@@ -1868,10 +2119,10 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1868
2119
|
borderRadius: a.radiusSm,
|
|
1869
2120
|
backgroundColor: e ? a.activeOverlay : "transparent"
|
|
1870
2121
|
}),
|
|
1871
|
-
children: [r.icon && /* @__PURE__ */
|
|
2122
|
+
children: [r.icon && /* @__PURE__ */ O(T, {
|
|
1872
2123
|
style: { flexShrink: 0 },
|
|
1873
2124
|
children: r.icon
|
|
1874
|
-
}), /* @__PURE__ */
|
|
2125
|
+
}), /* @__PURE__ */ O(C, {
|
|
1875
2126
|
numberOfLines: 1,
|
|
1876
2127
|
ellipsizeMode: "tail",
|
|
1877
2128
|
style: {
|
|
@@ -1884,21 +2135,21 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1884
2135
|
})] }, r.path);
|
|
1885
2136
|
})
|
|
1886
2137
|
});
|
|
1887
|
-
},
|
|
1888
|
-
let o =
|
|
2138
|
+
}, Ae = ({ value: e, variant: t = "accent", accessibilityLabel: n, style: r, onLayout: i, ...a }) => {
|
|
2139
|
+
let o = I(), c = P(), l = H(), f = e == null, m = f ? void 0 : Math.min(1, Math.max(0, e)), g = m === void 0 ? void 0 : m * 100, _ = u(new p.Value(m ?? 0)).current, v = u(new p.Value(0)).current, [y, b] = d(0), x = (e) => {
|
|
1889
2140
|
b(e.nativeEvent.layout.width), i?.(e);
|
|
1890
2141
|
};
|
|
1891
2142
|
s(() => {
|
|
1892
2143
|
if (f) return;
|
|
1893
2144
|
let [e, t, n, r] = o.easingDefault;
|
|
1894
2145
|
p.timing(_, {
|
|
1895
|
-
toValue:
|
|
2146
|
+
toValue: m ?? 0,
|
|
1896
2147
|
duration: l ? 0 : o.durationNormal,
|
|
1897
|
-
easing:
|
|
2148
|
+
easing: h.bezier(e, t, n, r),
|
|
1898
2149
|
useNativeDriver: !0
|
|
1899
2150
|
}).start();
|
|
1900
2151
|
}, [
|
|
1901
|
-
|
|
2152
|
+
m,
|
|
1902
2153
|
f,
|
|
1903
2154
|
l,
|
|
1904
2155
|
_,
|
|
@@ -1910,7 +2161,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1910
2161
|
let [e, t, n, r] = o.easingDefault, i = p.loop(p.timing(v, {
|
|
1911
2162
|
toValue: 1,
|
|
1912
2163
|
duration: 1400,
|
|
1913
|
-
easing:
|
|
2164
|
+
easing: h.bezier(e, t, n, r),
|
|
1914
2165
|
useNativeDriver: !0
|
|
1915
2166
|
}));
|
|
1916
2167
|
return i.start(), () => i.stop();
|
|
@@ -1941,11 +2192,11 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1941
2192
|
transformOrigin: "left",
|
|
1942
2193
|
transform: [{ scaleX: _ }]
|
|
1943
2194
|
};
|
|
1944
|
-
return /* @__PURE__ */
|
|
2195
|
+
return /* @__PURE__ */ O(p.View, {
|
|
1945
2196
|
accessible: !0,
|
|
1946
2197
|
accessibilityRole: "progressbar",
|
|
1947
2198
|
accessibilityLabel: n,
|
|
1948
|
-
accessibilityValue:
|
|
2199
|
+
accessibilityValue: m === void 0 ? void 0 : {
|
|
1949
2200
|
min: 0,
|
|
1950
2201
|
max: 100,
|
|
1951
2202
|
now: Math.round(g)
|
|
@@ -1959,7 +2210,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1959
2210
|
overflow: "hidden"
|
|
1960
2211
|
}, r],
|
|
1961
2212
|
...a,
|
|
1962
|
-
children: /* @__PURE__ */
|
|
2213
|
+
children: /* @__PURE__ */ O(p.View, { style: [{
|
|
1963
2214
|
position: f ? "absolute" : "relative",
|
|
1964
2215
|
top: 0,
|
|
1965
2216
|
height: "100%",
|
|
@@ -1967,8 +2218,8 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1967
2218
|
backgroundColor: C[t]
|
|
1968
2219
|
}, w] })
|
|
1969
2220
|
});
|
|
1970
|
-
},
|
|
1971
|
-
let o =
|
|
2221
|
+
}, J = 18, Y = 6, je = r(function({ value: e, onSelect: t, disabled: n, style: r, ...i }, a) {
|
|
2222
|
+
let o = I(), c = P(), l = F(), d = u(new p.Value(+!!e)).current, f = u(!0);
|
|
1972
2223
|
s(() => {
|
|
1973
2224
|
if (f.current) {
|
|
1974
2225
|
f.current = !1;
|
|
@@ -1978,7 +2229,7 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1978
2229
|
p.timing(d, {
|
|
1979
2230
|
toValue: +!!e,
|
|
1980
2231
|
duration: o.durationFast,
|
|
1981
|
-
easing:
|
|
2232
|
+
easing: h.bezier(t, n, r, i),
|
|
1982
2233
|
useNativeDriver: !1
|
|
1983
2234
|
}).start();
|
|
1984
2235
|
}, [
|
|
@@ -1987,14 +2238,14 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
1987
2238
|
o.durationFast,
|
|
1988
2239
|
o.easingDefault
|
|
1989
2240
|
]);
|
|
1990
|
-
let
|
|
2241
|
+
let m = l === "more" ? o.windowFgColor : c === "dark" ? o.dark1 : o.light4, g = d.interpolate({
|
|
1991
2242
|
inputRange: [0, 1],
|
|
1992
|
-
outputRange: [
|
|
2243
|
+
outputRange: [m, o.accentBgColor]
|
|
1993
2244
|
}), _ = d.interpolate({
|
|
1994
2245
|
inputRange: [0, 1],
|
|
1995
2246
|
outputRange: [o.cardBgColor, o.accentBgColor]
|
|
1996
2247
|
});
|
|
1997
|
-
return /* @__PURE__ */
|
|
2248
|
+
return /* @__PURE__ */ O(b, {
|
|
1998
2249
|
ref: a,
|
|
1999
2250
|
disabled: n,
|
|
2000
2251
|
accessibilityRole: "radio",
|
|
@@ -2007,10 +2258,10 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2007
2258
|
},
|
|
2008
2259
|
style: [{ opacity: n ? o.opacityDisabled : 1 }, r],
|
|
2009
2260
|
...i,
|
|
2010
|
-
children: /* @__PURE__ */
|
|
2261
|
+
children: /* @__PURE__ */ O(p.View, {
|
|
2011
2262
|
style: {
|
|
2012
|
-
width:
|
|
2013
|
-
height:
|
|
2263
|
+
width: J,
|
|
2264
|
+
height: J,
|
|
2014
2265
|
alignItems: "center",
|
|
2015
2266
|
justifyContent: "center",
|
|
2016
2267
|
borderRadius: o.radiusPill,
|
|
@@ -2018,9 +2269,9 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2018
2269
|
borderColor: g,
|
|
2019
2270
|
backgroundColor: _
|
|
2020
2271
|
},
|
|
2021
|
-
children: /* @__PURE__ */
|
|
2022
|
-
width:
|
|
2023
|
-
height:
|
|
2272
|
+
children: /* @__PURE__ */ O(p.View, { style: {
|
|
2273
|
+
width: Y,
|
|
2274
|
+
height: Y,
|
|
2024
2275
|
borderRadius: o.radiusPill,
|
|
2025
2276
|
backgroundColor: "#fff",
|
|
2026
2277
|
opacity: d
|
|
@@ -2030,29 +2281,29 @@ var xe = r(function({ interactive: e = !1, padding: t = "md", style: n, children
|
|
|
2030
2281
|
});
|
|
2031
2282
|
//#endregion
|
|
2032
2283
|
//#region src/components/SearchBar/SearchBar.tsx
|
|
2033
|
-
function
|
|
2284
|
+
function Me(e, t) {
|
|
2034
2285
|
let n = e.match(/^rgba?\(([^,]+),([^,]+),([^,]+),?([^)]+)?\)$/);
|
|
2035
2286
|
if (!n) return e;
|
|
2036
2287
|
let [, r, i, a, o] = n, s = (o ? Number.parseFloat(o) : 1) * t;
|
|
2037
2288
|
return `rgba(${r.trim()}, ${i.trim()}, ${a.trim()}, ${s})`;
|
|
2038
2289
|
}
|
|
2039
|
-
var
|
|
2040
|
-
let g =
|
|
2290
|
+
var Ne = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, placeholder: a = "Search…", editable: o = !0, inline: l = !1, closeLabel: d = "Cancel", style: f, inputStyle: p, ...m }, h) {
|
|
2291
|
+
let g = I(), _ = u(null);
|
|
2041
2292
|
if (c(h, () => _.current, []), s(() => {
|
|
2042
2293
|
if (!e) return;
|
|
2043
2294
|
let t = requestAnimationFrame(() => _.current?.focus());
|
|
2044
2295
|
return () => cancelAnimationFrame(t);
|
|
2045
2296
|
}, [e]), !e) return null;
|
|
2046
|
-
let
|
|
2047
|
-
return /* @__PURE__ */
|
|
2297
|
+
let v = !o, y = typeof i == "string" && i.length > 0, x = l ? "transparent" : g.headerbarBgColor, S = l ? "transparent" : g.headerbarShadeColor;
|
|
2298
|
+
return /* @__PURE__ */ k(T, {
|
|
2048
2299
|
style: f,
|
|
2049
|
-
children: [/* @__PURE__ */
|
|
2300
|
+
children: [/* @__PURE__ */ k(T, {
|
|
2050
2301
|
style: {
|
|
2051
2302
|
flexDirection: "row",
|
|
2052
2303
|
alignItems: "center",
|
|
2053
2304
|
gap: g.space1
|
|
2054
2305
|
},
|
|
2055
|
-
children: [/* @__PURE__ */
|
|
2306
|
+
children: [/* @__PURE__ */ k(T, {
|
|
2056
2307
|
style: {
|
|
2057
2308
|
flex: 1,
|
|
2058
2309
|
flexDirection: "row",
|
|
@@ -2060,13 +2311,13 @@ var ke = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
2060
2311
|
gap: g.space1,
|
|
2061
2312
|
paddingVertical: g.space1,
|
|
2062
2313
|
paddingHorizontal: g.space2,
|
|
2063
|
-
backgroundColor:
|
|
2314
|
+
backgroundColor: x,
|
|
2064
2315
|
borderBottomWidth: 1,
|
|
2065
|
-
borderBottomColor:
|
|
2066
|
-
opacity:
|
|
2316
|
+
borderBottomColor: S,
|
|
2317
|
+
opacity: v ? g.opacityDisabled : 1
|
|
2067
2318
|
},
|
|
2068
2319
|
children: [
|
|
2069
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ O(C, {
|
|
2070
2321
|
accessibilityElementsHidden: !0,
|
|
2071
2322
|
importantForAccessibility: "no",
|
|
2072
2323
|
style: {
|
|
@@ -2075,12 +2326,12 @@ var ke = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
2075
2326
|
},
|
|
2076
2327
|
children: "🔍"
|
|
2077
2328
|
}),
|
|
2078
|
-
/* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ O(w, {
|
|
2079
2330
|
ref: _,
|
|
2080
2331
|
editable: o,
|
|
2081
2332
|
value: i,
|
|
2082
2333
|
placeholder: a,
|
|
2083
|
-
placeholderTextColor:
|
|
2334
|
+
placeholderTextColor: Me(g.windowFgColor, g.opacityDim),
|
|
2084
2335
|
style: [{
|
|
2085
2336
|
flex: 1,
|
|
2086
2337
|
padding: 0,
|
|
@@ -2091,10 +2342,10 @@ var ke = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
2091
2342
|
}, p],
|
|
2092
2343
|
...m
|
|
2093
2344
|
}),
|
|
2094
|
-
|
|
2345
|
+
y && /* @__PURE__ */ O(b, {
|
|
2095
2346
|
accessibilityRole: "button",
|
|
2096
2347
|
accessibilityLabel: "Clear search",
|
|
2097
|
-
disabled:
|
|
2348
|
+
disabled: v,
|
|
2098
2349
|
hitSlop: 8,
|
|
2099
2350
|
onPress: () => {
|
|
2100
2351
|
n?.(), _.current?.focus();
|
|
@@ -2105,10 +2356,10 @@ var ke = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
2105
2356
|
alignItems: "center",
|
|
2106
2357
|
justifyContent: "center",
|
|
2107
2358
|
borderRadius: g.radiusSm,
|
|
2108
|
-
opacity:
|
|
2359
|
+
opacity: v ? g.opacityDisabled : 1,
|
|
2109
2360
|
backgroundColor: e ? g.activeOverlay : "transparent"
|
|
2110
2361
|
}),
|
|
2111
|
-
children: /* @__PURE__ */
|
|
2362
|
+
children: /* @__PURE__ */ O(C, {
|
|
2112
2363
|
style: {
|
|
2113
2364
|
fontSize: g.fontSizeBody,
|
|
2114
2365
|
color: g.windowFgColor
|
|
@@ -2117,12 +2368,12 @@ var ke = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
2117
2368
|
})
|
|
2118
2369
|
})
|
|
2119
2370
|
]
|
|
2120
|
-
}), t && /* @__PURE__ */
|
|
2371
|
+
}), t && /* @__PURE__ */ O(b, {
|
|
2121
2372
|
accessibilityRole: "button",
|
|
2122
2373
|
accessibilityLabel: d,
|
|
2123
2374
|
onPress: t,
|
|
2124
2375
|
hitSlop: 8,
|
|
2125
|
-
children: /* @__PURE__ */
|
|
2376
|
+
children: /* @__PURE__ */ O(C, {
|
|
2126
2377
|
style: {
|
|
2127
2378
|
fontFamily: g.fontFamily,
|
|
2128
2379
|
fontSize: g.fontSizeBody,
|
|
@@ -2131,16 +2382,16 @@ var ke = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
2131
2382
|
children: d
|
|
2132
2383
|
})
|
|
2133
2384
|
})]
|
|
2134
|
-
}), r && /* @__PURE__ */
|
|
2385
|
+
}), r && /* @__PURE__ */ O(T, {
|
|
2135
2386
|
style: {
|
|
2136
2387
|
flexDirection: "row",
|
|
2137
2388
|
flexWrap: "wrap",
|
|
2138
2389
|
gap: g.space1,
|
|
2139
2390
|
padding: g.space1,
|
|
2140
2391
|
paddingHorizontal: g.space2,
|
|
2141
|
-
backgroundColor:
|
|
2392
|
+
backgroundColor: x,
|
|
2142
2393
|
borderBottomWidth: 1,
|
|
2143
|
-
borderBottomColor:
|
|
2394
|
+
borderBottomColor: S
|
|
2144
2395
|
},
|
|
2145
2396
|
children: r
|
|
2146
2397
|
})]
|
|
@@ -2148,32 +2399,32 @@ var ke = r(function({ open: e, onClose: t, onClear: n, children: r, value: i, pl
|
|
|
2148
2399
|
});
|
|
2149
2400
|
//#endregion
|
|
2150
2401
|
//#region src/components/Sidebar/filterUtils.ts
|
|
2151
|
-
function
|
|
2402
|
+
function X(t, n) {
|
|
2152
2403
|
let r = 0;
|
|
2153
2404
|
return e.forEach(t, (e) => {
|
|
2154
2405
|
if (!i(e)) return;
|
|
2155
2406
|
let t = e.props;
|
|
2156
|
-
typeof t.label == "string" ? t.label.toLowerCase().includes(n.toLowerCase()) && r++ : t.children && (r +=
|
|
2407
|
+
typeof t.label == "string" ? t.label.toLowerCase().includes(n.toLowerCase()) && r++ : t.children && (r += X(t.children, n));
|
|
2157
2408
|
}), r;
|
|
2158
2409
|
}
|
|
2159
|
-
function
|
|
2410
|
+
function Pe(e, t) {
|
|
2160
2411
|
if (!t || !i(e)) return !0;
|
|
2161
2412
|
let n = e.props;
|
|
2162
|
-
return typeof n.label == "string" ? n.label.toLowerCase().includes(t.toLowerCase()) : n.children ?
|
|
2413
|
+
return typeof n.label == "string" ? n.label.toLowerCase().includes(t.toLowerCase()) : n.children ? X(n.children, t) > 0 : !0;
|
|
2163
2414
|
}
|
|
2164
2415
|
//#endregion
|
|
2165
2416
|
//#region src/components/Sidebar/Sidebar.tsx
|
|
2166
|
-
var
|
|
2167
|
-
function
|
|
2168
|
-
return o(
|
|
2417
|
+
var Z = n(!1);
|
|
2418
|
+
function Q() {
|
|
2419
|
+
return o(Z);
|
|
2169
2420
|
}
|
|
2170
|
-
var
|
|
2171
|
-
let c =
|
|
2172
|
-
return /* @__PURE__ */
|
|
2421
|
+
var $ = n(""), Fe = r(function({ children: n, collapsed: r = !1, filter: i = "", style: a, ...o }, s) {
|
|
2422
|
+
let c = I(), l = i.length > 0, u = e.toArray(n).filter(Boolean).filter((e) => Pe(e, i)), d = !l || u.length > 0;
|
|
2423
|
+
return /* @__PURE__ */ O(Z.Provider, {
|
|
2173
2424
|
value: r,
|
|
2174
|
-
children: /* @__PURE__ */
|
|
2425
|
+
children: /* @__PURE__ */ O($.Provider, {
|
|
2175
2426
|
value: i,
|
|
2176
|
-
children: /* @__PURE__ */
|
|
2427
|
+
children: /* @__PURE__ */ O(T, {
|
|
2177
2428
|
ref: s,
|
|
2178
2429
|
style: [{
|
|
2179
2430
|
flexShrink: 0,
|
|
@@ -2183,9 +2434,9 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2183
2434
|
borderRightColor: c.headerbarBorderColor
|
|
2184
2435
|
}, a],
|
|
2185
2436
|
...o,
|
|
2186
|
-
children: /* @__PURE__ */
|
|
2437
|
+
children: /* @__PURE__ */ O(x, {
|
|
2187
2438
|
contentContainerStyle: { padding: c.space1 },
|
|
2188
|
-
children: l && !d ? /* @__PURE__ */
|
|
2439
|
+
children: l && !d ? /* @__PURE__ */ O(U, {
|
|
2189
2440
|
variant: "caption",
|
|
2190
2441
|
color: "dim",
|
|
2191
2442
|
style: {
|
|
@@ -2193,7 +2444,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2193
2444
|
padding: c.space4
|
|
2194
2445
|
},
|
|
2195
2446
|
children: "No items match your search."
|
|
2196
|
-
}) : u.map((e, n) => /* @__PURE__ */
|
|
2447
|
+
}) : u.map((e, n) => /* @__PURE__ */ k(t, { children: [n > 0 && /* @__PURE__ */ O(W, {
|
|
2197
2448
|
testID: "sidebar-separator",
|
|
2198
2449
|
style: { marginVertical: c.space1 }
|
|
2199
2450
|
}), e] }, n))
|
|
@@ -2201,9 +2452,9 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2201
2452
|
})
|
|
2202
2453
|
})
|
|
2203
2454
|
});
|
|
2204
|
-
}),
|
|
2205
|
-
let l =
|
|
2206
|
-
return d.length > 0 && !e.toLowerCase().includes(d.toLowerCase()) ? null : /* @__PURE__ */
|
|
2455
|
+
}), Ie = r(function({ label: e, icon: t, active: n = !1, suffix: r, disabled: i, style: a, ...s }, c) {
|
|
2456
|
+
let l = I(), u = Q(), d = o($);
|
|
2457
|
+
return d.length > 0 && !e.toLowerCase().includes(d.toLowerCase()) ? null : /* @__PURE__ */ k(b, {
|
|
2207
2458
|
ref: c,
|
|
2208
2459
|
disabled: i,
|
|
2209
2460
|
accessibilityRole: "button",
|
|
@@ -2231,14 +2482,14 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2231
2482
|
],
|
|
2232
2483
|
...s,
|
|
2233
2484
|
children: [
|
|
2234
|
-
t && /* @__PURE__ */
|
|
2485
|
+
t && /* @__PURE__ */ O(T, {
|
|
2235
2486
|
style: {
|
|
2236
2487
|
flexShrink: 0,
|
|
2237
2488
|
opacity: n ? 1 : .85
|
|
2238
2489
|
},
|
|
2239
2490
|
children: t
|
|
2240
2491
|
}),
|
|
2241
|
-
!u && /* @__PURE__ */
|
|
2492
|
+
!u && /* @__PURE__ */ O(U, {
|
|
2242
2493
|
numberOfLines: 1,
|
|
2243
2494
|
ellipsizeMode: "tail",
|
|
2244
2495
|
style: {
|
|
@@ -2249,22 +2500,22 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2249
2500
|
},
|
|
2250
2501
|
children: e
|
|
2251
2502
|
}),
|
|
2252
|
-
!u && r && /* @__PURE__ */
|
|
2503
|
+
!u && r && /* @__PURE__ */ O(T, {
|
|
2253
2504
|
style: { flexShrink: 0 },
|
|
2254
2505
|
children: r
|
|
2255
2506
|
})
|
|
2256
2507
|
]
|
|
2257
2508
|
});
|
|
2258
|
-
}),
|
|
2259
|
-
let p =
|
|
2509
|
+
}), Le = r(function({ title: e, icon: t, collapsible: n = !1, defaultOpen: r = !0, open: i, onOpenChange: a, children: s, style: l, ...u }, f) {
|
|
2510
|
+
let p = I(), [m, h] = d(r), g = i !== void 0, _ = g ? i : m, v = Q(), y = o($), x = (e) => {
|
|
2260
2511
|
g || h(e), a?.(e);
|
|
2261
2512
|
};
|
|
2262
2513
|
if (c(f, () => ({
|
|
2263
2514
|
expand: () => x(!0),
|
|
2264
2515
|
collapse: () => x(!1),
|
|
2265
2516
|
toggle: () => x(!_)
|
|
2266
|
-
})), !(
|
|
2267
|
-
let S =
|
|
2517
|
+
})), !(y.length === 0 || X(s, y) > 0)) return null;
|
|
2518
|
+
let S = v ? !0 : _, C = !v && !!(e || t), w = (e || t) && /* @__PURE__ */ k(T, {
|
|
2268
2519
|
style: {
|
|
2269
2520
|
flexDirection: "row",
|
|
2270
2521
|
alignItems: "center",
|
|
@@ -2275,21 +2526,21 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2275
2526
|
marginBottom: 2
|
|
2276
2527
|
},
|
|
2277
2528
|
children: [
|
|
2278
|
-
t && /* @__PURE__ */
|
|
2529
|
+
t && /* @__PURE__ */ O(T, {
|
|
2279
2530
|
style: {
|
|
2280
2531
|
flexShrink: 0,
|
|
2281
2532
|
opacity: .7
|
|
2282
2533
|
},
|
|
2283
2534
|
children: t
|
|
2284
2535
|
}),
|
|
2285
|
-
e && /* @__PURE__ */
|
|
2536
|
+
e && /* @__PURE__ */ O(U, {
|
|
2286
2537
|
variant: "caption-heading",
|
|
2287
2538
|
color: "dim",
|
|
2288
2539
|
style: { flex: 1 },
|
|
2289
2540
|
numberOfLines: 1,
|
|
2290
2541
|
children: e
|
|
2291
2542
|
}),
|
|
2292
|
-
n && /* @__PURE__ */
|
|
2543
|
+
n && /* @__PURE__ */ O(U, {
|
|
2293
2544
|
variant: "caption",
|
|
2294
2545
|
color: "dim",
|
|
2295
2546
|
style: { flexShrink: 0 },
|
|
@@ -2297,16 +2548,16 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2297
2548
|
})
|
|
2298
2549
|
]
|
|
2299
2550
|
});
|
|
2300
|
-
return /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ k(T, {
|
|
2301
2552
|
style: l,
|
|
2302
2553
|
...u,
|
|
2303
|
-
children: [
|
|
2554
|
+
children: [C && (n ? /* @__PURE__ */ O(b, {
|
|
2304
2555
|
accessibilityRole: "button",
|
|
2305
2556
|
accessibilityState: { expanded: _ },
|
|
2306
2557
|
accessibilityLabel: e,
|
|
2307
2558
|
onPress: () => x(!_),
|
|
2308
|
-
children:
|
|
2309
|
-
}) :
|
|
2559
|
+
children: w
|
|
2560
|
+
}) : w), /* @__PURE__ */ O(T, {
|
|
2310
2561
|
accessible: !0,
|
|
2311
2562
|
accessibilityRole: "list",
|
|
2312
2563
|
style: {
|
|
@@ -2316,14 +2567,14 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2316
2567
|
children: s
|
|
2317
2568
|
})]
|
|
2318
2569
|
});
|
|
2319
|
-
}),
|
|
2320
|
-
let l =
|
|
2570
|
+
}), Re = ({ variant: e = "rect", width: t = "100%", height: n = 16, size: r = 40, lines: i = 3, animated: a = !0, style: o, ...c }) => {
|
|
2571
|
+
let l = I(), d = H(), f = u(new p.Value(1)).current, m = a && !d;
|
|
2321
2572
|
if (s(() => {
|
|
2322
|
-
if (!
|
|
2573
|
+
if (!m) {
|
|
2323
2574
|
f.setValue(1);
|
|
2324
2575
|
return;
|
|
2325
2576
|
}
|
|
2326
|
-
let [e, t, n, r] = l.easingDefault, i =
|
|
2577
|
+
let [e, t, n, r] = l.easingDefault, i = h.bezier(e, t, n, r), a = p.loop(p.sequence([p.timing(f, {
|
|
2327
2578
|
toValue: .5,
|
|
2328
2579
|
duration: 700,
|
|
2329
2580
|
easing: i,
|
|
@@ -2336,16 +2587,16 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2336
2587
|
})]));
|
|
2337
2588
|
return a.start(), () => a.stop();
|
|
2338
2589
|
}, [
|
|
2339
|
-
|
|
2590
|
+
m,
|
|
2340
2591
|
f,
|
|
2341
2592
|
l.easingDefault
|
|
2342
2593
|
]), e === "text") {
|
|
2343
2594
|
let e = Math.max(1, Math.floor(i));
|
|
2344
|
-
return /* @__PURE__ */
|
|
2595
|
+
return /* @__PURE__ */ O(T, {
|
|
2345
2596
|
accessible: !1,
|
|
2346
2597
|
style: [{ gap: 8 }, o],
|
|
2347
2598
|
...c,
|
|
2348
|
-
children: Array.from({ length: e }, (t, n) => /* @__PURE__ */
|
|
2599
|
+
children: Array.from({ length: e }, (t, n) => /* @__PURE__ */ O(p.View, { style: {
|
|
2349
2600
|
width: n === e - 1 ? "60%" : "100%",
|
|
2350
2601
|
height: 12,
|
|
2351
2602
|
borderRadius: l.radiusPill,
|
|
@@ -2363,7 +2614,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2363
2614
|
height: n,
|
|
2364
2615
|
borderRadius: l.radiusMd
|
|
2365
2616
|
};
|
|
2366
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ O(p.View, {
|
|
2367
2618
|
accessible: !1,
|
|
2368
2619
|
style: [
|
|
2369
2620
|
g,
|
|
@@ -2375,7 +2626,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2375
2626
|
],
|
|
2376
2627
|
...c
|
|
2377
2628
|
});
|
|
2378
|
-
},
|
|
2629
|
+
}, ze = {
|
|
2379
2630
|
sm: {
|
|
2380
2631
|
dimension: 16,
|
|
2381
2632
|
borderWidth: 2
|
|
@@ -2388,14 +2639,14 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2388
2639
|
dimension: 36,
|
|
2389
2640
|
borderWidth: 3
|
|
2390
2641
|
}
|
|
2391
|
-
},
|
|
2392
|
-
let i =
|
|
2642
|
+
}, Be = ({ size: e = "md", label: t = "Loading…", style: n, ...r }) => {
|
|
2643
|
+
let i = I(), a = P(), o = H(), c = u(new p.Value(0)).current;
|
|
2393
2644
|
s(() => {
|
|
2394
2645
|
c.setValue(0);
|
|
2395
2646
|
let e = p.loop(p.timing(c, {
|
|
2396
2647
|
toValue: 1,
|
|
2397
2648
|
duration: o ? 2e3 : 750,
|
|
2398
|
-
easing:
|
|
2649
|
+
easing: h.linear,
|
|
2399
2650
|
useNativeDriver: !0
|
|
2400
2651
|
}));
|
|
2401
2652
|
return e.start(), () => e.stop();
|
|
@@ -2403,8 +2654,8 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2403
2654
|
let l = c.interpolate({
|
|
2404
2655
|
inputRange: [0, 1],
|
|
2405
2656
|
outputRange: ["0deg", "360deg"]
|
|
2406
|
-
}), { dimension: d, borderWidth: f } =
|
|
2407
|
-
return /* @__PURE__ */
|
|
2657
|
+
}), { dimension: d, borderWidth: f } = ze[e], m = a === "dark" ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.15)";
|
|
2658
|
+
return /* @__PURE__ */ O(p.View, {
|
|
2408
2659
|
accessible: !0,
|
|
2409
2660
|
accessibilityRole: "progressbar",
|
|
2410
2661
|
accessibilityLabel: t || void 0,
|
|
@@ -2415,14 +2666,14 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2415
2666
|
height: d,
|
|
2416
2667
|
borderRadius: d / 2,
|
|
2417
2668
|
borderWidth: f,
|
|
2418
|
-
borderColor:
|
|
2669
|
+
borderColor: m,
|
|
2419
2670
|
borderTopColor: i.accentColor,
|
|
2420
2671
|
transform: [{ rotate: l }]
|
|
2421
2672
|
}, n],
|
|
2422
2673
|
...r
|
|
2423
2674
|
});
|
|
2424
|
-
},
|
|
2425
|
-
let o =
|
|
2675
|
+
}, Ve = 56, He = 28, Ue = 20, We = 3, Ge = 28, Ke = r(function({ value: e, onValueChange: t, disabled: n, style: r, ...i }, a) {
|
|
2676
|
+
let o = I(), c = P(), l = F(), d = u(new p.Value(+!!e)).current, f = u(!0);
|
|
2426
2677
|
s(() => {
|
|
2427
2678
|
if (f.current) {
|
|
2428
2679
|
f.current = !1;
|
|
@@ -2432,7 +2683,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2432
2683
|
p.timing(d, {
|
|
2433
2684
|
toValue: +!!e,
|
|
2434
2685
|
duration: o.durationFast,
|
|
2435
|
-
easing:
|
|
2686
|
+
easing: h.bezier(t, n, r, i),
|
|
2436
2687
|
useNativeDriver: !1
|
|
2437
2688
|
}).start();
|
|
2438
2689
|
}, [
|
|
@@ -2441,14 +2692,14 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2441
2692
|
o.durationFast,
|
|
2442
2693
|
o.easingDefault
|
|
2443
2694
|
]);
|
|
2444
|
-
let
|
|
2695
|
+
let m = c === "dark" ? o.dark2 : o.light4, g = c === "dark" ? o.light3 : "#fff", _ = d.interpolate({
|
|
2445
2696
|
inputRange: [0, 1],
|
|
2446
|
-
outputRange: [
|
|
2447
|
-
}),
|
|
2697
|
+
outputRange: [m, o.accentBgColor]
|
|
2698
|
+
}), v = d.interpolate({
|
|
2448
2699
|
inputRange: [0, 1],
|
|
2449
2700
|
outputRange: [o.borderSubtle, o.accentBgColor]
|
|
2450
2701
|
});
|
|
2451
|
-
return /* @__PURE__ */
|
|
2702
|
+
return /* @__PURE__ */ O(b, {
|
|
2452
2703
|
ref: a,
|
|
2453
2704
|
disabled: n,
|
|
2454
2705
|
accessibilityRole: "switch",
|
|
@@ -2459,26 +2710,26 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2459
2710
|
onPress: () => t?.(!e),
|
|
2460
2711
|
style: [{ opacity: n ? o.opacityDisabled : 1 }, r],
|
|
2461
2712
|
...i,
|
|
2462
|
-
children: /* @__PURE__ */
|
|
2713
|
+
children: /* @__PURE__ */ O(p.View, {
|
|
2463
2714
|
style: {
|
|
2464
|
-
width:
|
|
2465
|
-
height:
|
|
2715
|
+
width: Ve,
|
|
2716
|
+
height: He,
|
|
2466
2717
|
borderRadius: o.radiusPill,
|
|
2467
2718
|
borderWidth: l === "more" ? 2 : 1,
|
|
2468
|
-
borderColor:
|
|
2719
|
+
borderColor: v,
|
|
2469
2720
|
backgroundColor: _
|
|
2470
2721
|
},
|
|
2471
|
-
children: /* @__PURE__ */
|
|
2722
|
+
children: /* @__PURE__ */ O(p.View, { style: [{
|
|
2472
2723
|
position: "absolute",
|
|
2473
|
-
top:
|
|
2474
|
-
left:
|
|
2475
|
-
width:
|
|
2476
|
-
height:
|
|
2724
|
+
top: We,
|
|
2725
|
+
left: We,
|
|
2726
|
+
width: Ue,
|
|
2727
|
+
height: Ue,
|
|
2477
2728
|
borderRadius: o.radiusPill,
|
|
2478
2729
|
backgroundColor: e ? "#fff" : g,
|
|
2479
2730
|
transform: [{ translateX: d.interpolate({
|
|
2480
2731
|
inputRange: [0, 1],
|
|
2481
|
-
outputRange: [0,
|
|
2732
|
+
outputRange: [0, Ge]
|
|
2482
2733
|
}) }]
|
|
2483
2734
|
}, l !== "more" && {
|
|
2484
2735
|
shadowColor: "#000",
|
|
@@ -2492,9 +2743,9 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2492
2743
|
}] })
|
|
2493
2744
|
})
|
|
2494
2745
|
});
|
|
2495
|
-
}),
|
|
2496
|
-
let o =
|
|
2497
|
-
return /* @__PURE__ */
|
|
2746
|
+
}), qe = r(function({ children: e, inline: t = !1, accessibilityLabel: n = "Tabs", style: r, ...i }, a) {
|
|
2747
|
+
let o = I();
|
|
2748
|
+
return /* @__PURE__ */ O(x, {
|
|
2498
2749
|
ref: a,
|
|
2499
2750
|
horizontal: !0,
|
|
2500
2751
|
showsHorizontalScrollIndicator: !1,
|
|
@@ -2518,9 +2769,9 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2518
2769
|
...i,
|
|
2519
2770
|
children: e
|
|
2520
2771
|
});
|
|
2521
|
-
}),
|
|
2522
|
-
let l =
|
|
2523
|
-
return /* @__PURE__ */
|
|
2772
|
+
}), Je = r(function({ label: e, icon: t, active: n = !1, onClose: r, closeLabel: i = "Close tab", count: a, disabled: o, ...s }, c) {
|
|
2773
|
+
let l = I();
|
|
2774
|
+
return /* @__PURE__ */ k(b, {
|
|
2524
2775
|
ref: c,
|
|
2525
2776
|
disabled: o,
|
|
2526
2777
|
accessibilityRole: "tab",
|
|
@@ -2544,11 +2795,11 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2544
2795
|
}),
|
|
2545
2796
|
...s,
|
|
2546
2797
|
children: [
|
|
2547
|
-
t && /* @__PURE__ */
|
|
2798
|
+
t && /* @__PURE__ */ O(T, {
|
|
2548
2799
|
style: { flexShrink: 0 },
|
|
2549
2800
|
children: t
|
|
2550
2801
|
}),
|
|
2551
|
-
/* @__PURE__ */
|
|
2802
|
+
/* @__PURE__ */ O(C, {
|
|
2552
2803
|
numberOfLines: 1,
|
|
2553
2804
|
ellipsizeMode: "tail",
|
|
2554
2805
|
style: {
|
|
@@ -2559,7 +2810,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2559
2810
|
},
|
|
2560
2811
|
children: e
|
|
2561
2812
|
}),
|
|
2562
|
-
a !== void 0 && /* @__PURE__ */
|
|
2813
|
+
a !== void 0 && /* @__PURE__ */ O(T, {
|
|
2563
2814
|
style: {
|
|
2564
2815
|
flexShrink: 0,
|
|
2565
2816
|
minWidth: 18,
|
|
@@ -2570,7 +2821,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2570
2821
|
justifyContent: "center",
|
|
2571
2822
|
backgroundColor: l.accentBgColor
|
|
2572
2823
|
},
|
|
2573
|
-
children: /* @__PURE__ */
|
|
2824
|
+
children: /* @__PURE__ */ O(C, {
|
|
2574
2825
|
style: {
|
|
2575
2826
|
fontFamily: l.fontFamily,
|
|
2576
2827
|
fontSize: 11,
|
|
@@ -2580,7 +2831,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2580
2831
|
children: a > 99 ? "99+" : a
|
|
2581
2832
|
})
|
|
2582
2833
|
}),
|
|
2583
|
-
r && /* @__PURE__ */
|
|
2834
|
+
r && /* @__PURE__ */ O(b, {
|
|
2584
2835
|
accessibilityRole: "button",
|
|
2585
2836
|
accessibilityLabel: i,
|
|
2586
2837
|
hitSlop: 8,
|
|
@@ -2594,7 +2845,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2594
2845
|
borderRadius: l.radiusSm,
|
|
2595
2846
|
backgroundColor: e ? l.activeOverlay : "transparent"
|
|
2596
2847
|
}),
|
|
2597
|
-
children: /* @__PURE__ */
|
|
2848
|
+
children: /* @__PURE__ */ O(C, {
|
|
2598
2849
|
style: {
|
|
2599
2850
|
fontFamily: l.fontFamily,
|
|
2600
2851
|
fontSize: 15,
|
|
@@ -2604,7 +2855,7 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2604
2855
|
children: "×"
|
|
2605
2856
|
})
|
|
2606
2857
|
}),
|
|
2607
|
-
n && /* @__PURE__ */
|
|
2858
|
+
n && /* @__PURE__ */ O(T, {
|
|
2608
2859
|
pointerEvents: "none",
|
|
2609
2860
|
style: {
|
|
2610
2861
|
position: "absolute",
|
|
@@ -2618,8 +2869,8 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2618
2869
|
})
|
|
2619
2870
|
]
|
|
2620
2871
|
});
|
|
2621
|
-
}),
|
|
2622
|
-
return /* @__PURE__ */
|
|
2872
|
+
}), Ye = r(function({ active: e = !1, style: t, children: n, ...r }, i) {
|
|
2873
|
+
return /* @__PURE__ */ O(T, {
|
|
2623
2874
|
ref: i,
|
|
2624
2875
|
style: [{ display: e ? "flex" : "none" }, t],
|
|
2625
2876
|
...r,
|
|
@@ -2628,31 +2879,31 @@ var Q = n(""), je = r(function({ children: n, collapsed: r = !1, filter: i = "",
|
|
|
2628
2879
|
});
|
|
2629
2880
|
//#endregion
|
|
2630
2881
|
//#region src/components/TextField/TextField.tsx
|
|
2631
|
-
function
|
|
2882
|
+
function Xe(e, t) {
|
|
2632
2883
|
let n = e.match(/^rgba?\(([^,]+),([^,]+),([^,]+),?([^)]+)?\)$/);
|
|
2633
2884
|
if (!n) return e;
|
|
2634
2885
|
let [, r, i, a, o] = n, s = (o ? Number.parseFloat(o) : 1) * t;
|
|
2635
2886
|
return `rgba(${r.trim()}, ${i.trim()}, ${a.trim()}, ${s})`;
|
|
2636
2887
|
}
|
|
2637
|
-
var
|
|
2638
|
-
let p =
|
|
2639
|
-
return /* @__PURE__ */
|
|
2888
|
+
var Ze = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i, editable: a = !0, onFocus: o, onBlur: s, accessibilityLabel: c, accessibilityHint: l, ...u }, f) {
|
|
2889
|
+
let p = I(), m = F(), [h, g] = d(!1), _ = !a, v = n ?? t, y = n ? p.errorColor : h ? p.accentColor : p.borderSubtle;
|
|
2890
|
+
return /* @__PURE__ */ k(T, {
|
|
2640
2891
|
style: [{
|
|
2641
2892
|
gap: p.space1,
|
|
2642
2893
|
opacity: _ ? p.opacityDisabled : 1
|
|
2643
2894
|
}, r],
|
|
2644
2895
|
children: [
|
|
2645
|
-
e && /* @__PURE__ */
|
|
2896
|
+
e && /* @__PURE__ */ O(U, {
|
|
2646
2897
|
variant: "body",
|
|
2647
2898
|
style: { fontWeight: String(p.fontWeightSemibold) },
|
|
2648
2899
|
children: e
|
|
2649
2900
|
}),
|
|
2650
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ O(w, {
|
|
2651
2902
|
ref: f,
|
|
2652
2903
|
editable: a,
|
|
2653
2904
|
accessibilityLabel: c ?? e,
|
|
2654
2905
|
accessibilityHint: l ?? v,
|
|
2655
|
-
placeholderTextColor:
|
|
2906
|
+
placeholderTextColor: Xe(p.windowFgColor, p.opacityDim),
|
|
2656
2907
|
onFocus: (e) => {
|
|
2657
2908
|
g(!0), o?.(e);
|
|
2658
2909
|
},
|
|
@@ -2674,7 +2925,7 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2674
2925
|
}, i],
|
|
2675
2926
|
...u
|
|
2676
2927
|
}),
|
|
2677
|
-
v && /* @__PURE__ */
|
|
2928
|
+
v && /* @__PURE__ */ O(U, {
|
|
2678
2929
|
variant: "caption",
|
|
2679
2930
|
style: {
|
|
2680
2931
|
color: n ? p.errorColor : p.windowFgColor,
|
|
@@ -2684,43 +2935,43 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2684
2935
|
})
|
|
2685
2936
|
]
|
|
2686
2937
|
});
|
|
2687
|
-
}),
|
|
2688
|
-
let d =
|
|
2938
|
+
}), Qe = p.createAnimatedComponent(b), $e = ({ title: e, duration: t = 3e3, onDismiss: n, actionLabel: r, onAction: i, dismissible: o = !1, style: c, ...l }) => {
|
|
2939
|
+
let d = I(), f = P(), m = H(), g = u(null), _ = u(t), v = u(0), y = u(new p.Value(+!!m)).current, x = a(() => {
|
|
2689
2940
|
g.current &&= (clearTimeout(g.current), null);
|
|
2690
|
-
}, []),
|
|
2691
|
-
e <= 0 || !n || (
|
|
2692
|
-
}, [n,
|
|
2693
|
-
s(() => (t > 0 && (_.current = t,
|
|
2941
|
+
}, []), S = a((e) => {
|
|
2942
|
+
e <= 0 || !n || (x(), v.current = Date.now(), g.current = setTimeout(() => n(), e));
|
|
2943
|
+
}, [n, x]);
|
|
2944
|
+
s(() => (t > 0 && (_.current = t, S(t)), x), [
|
|
2694
2945
|
t,
|
|
2695
|
-
|
|
2696
|
-
|
|
2946
|
+
S,
|
|
2947
|
+
x
|
|
2697
2948
|
]), s(() => {
|
|
2698
|
-
if (
|
|
2699
|
-
|
|
2949
|
+
if (m) {
|
|
2950
|
+
y.setValue(1);
|
|
2700
2951
|
return;
|
|
2701
2952
|
}
|
|
2702
2953
|
let [e, t, n, r] = d.easingDefault;
|
|
2703
|
-
p.timing(
|
|
2954
|
+
p.timing(y, {
|
|
2704
2955
|
toValue: 1,
|
|
2705
2956
|
duration: d.durationNormal,
|
|
2706
|
-
easing:
|
|
2957
|
+
easing: h.bezier(e, t, n, r),
|
|
2707
2958
|
useNativeDriver: !0
|
|
2708
2959
|
}).start();
|
|
2709
2960
|
}, [
|
|
2710
|
-
|
|
2711
|
-
|
|
2961
|
+
m,
|
|
2962
|
+
y,
|
|
2712
2963
|
d.durationNormal,
|
|
2713
2964
|
d.easingDefault
|
|
2714
2965
|
]);
|
|
2715
2966
|
let w = () => {
|
|
2716
2967
|
if (g.current) {
|
|
2717
|
-
let e = Date.now() -
|
|
2718
|
-
_.current = Math.max(0, _.current - e),
|
|
2968
|
+
let e = Date.now() - v.current;
|
|
2969
|
+
_.current = Math.max(0, _.current - e), x();
|
|
2719
2970
|
}
|
|
2720
|
-
},
|
|
2721
|
-
|
|
2722
|
-
},
|
|
2723
|
-
|
|
2971
|
+
}, T = () => {
|
|
2972
|
+
S(_.current);
|
|
2973
|
+
}, E = () => {
|
|
2974
|
+
x(), i?.(), n?.();
|
|
2724
2975
|
}, A = f === "dark" ? {
|
|
2725
2976
|
shadowOpacity: .4,
|
|
2726
2977
|
shadowRadius: 12,
|
|
@@ -2730,12 +2981,12 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2730
2981
|
shadowRadius: 8,
|
|
2731
2982
|
elevation: 4
|
|
2732
2983
|
};
|
|
2733
|
-
return /* @__PURE__ */
|
|
2984
|
+
return /* @__PURE__ */ k(Qe, {
|
|
2734
2985
|
accessible: !0,
|
|
2735
2986
|
accessibilityRole: "alert",
|
|
2736
2987
|
accessibilityLiveRegion: "polite",
|
|
2737
2988
|
onPressIn: w,
|
|
2738
|
-
onPressOut:
|
|
2989
|
+
onPressOut: T,
|
|
2739
2990
|
style: [{
|
|
2740
2991
|
flexDirection: "row",
|
|
2741
2992
|
alignItems: "center",
|
|
@@ -2753,18 +3004,18 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2753
3004
|
width: 0,
|
|
2754
3005
|
height: 2
|
|
2755
3006
|
},
|
|
2756
|
-
opacity:
|
|
2757
|
-
transform: [{ translateY:
|
|
3007
|
+
opacity: y,
|
|
3008
|
+
transform: [{ translateY: y.interpolate({
|
|
2758
3009
|
inputRange: [0, 1],
|
|
2759
3010
|
outputRange: [12, 0]
|
|
2760
|
-
}) }, { scale:
|
|
3011
|
+
}) }, { scale: y.interpolate({
|
|
2761
3012
|
inputRange: [0, 1],
|
|
2762
3013
|
outputRange: [.96, 1]
|
|
2763
3014
|
}) }],
|
|
2764
3015
|
...A
|
|
2765
3016
|
}, c],
|
|
2766
3017
|
...l,
|
|
2767
|
-
children: [/* @__PURE__ */
|
|
3018
|
+
children: [/* @__PURE__ */ O(U, {
|
|
2768
3019
|
variant: "body",
|
|
2769
3020
|
style: {
|
|
2770
3021
|
flex: 1,
|
|
@@ -2772,17 +3023,17 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2772
3023
|
},
|
|
2773
3024
|
numberOfLines: typeof e == "string" ? 2 : void 0,
|
|
2774
3025
|
children: e
|
|
2775
|
-
}), (r || o) && /* @__PURE__ */ D
|
|
3026
|
+
}), (r || o) && /* @__PURE__ */ k(D, { children: [r && /* @__PURE__ */ O(b, {
|
|
2776
3027
|
accessibilityRole: "button",
|
|
2777
3028
|
accessibilityLabel: r,
|
|
2778
|
-
onPress:
|
|
3029
|
+
onPress: E,
|
|
2779
3030
|
style: ({ pressed: e }) => ({
|
|
2780
3031
|
paddingVertical: 4,
|
|
2781
3032
|
paddingHorizontal: d.space1,
|
|
2782
3033
|
borderRadius: d.radiusSm,
|
|
2783
3034
|
backgroundColor: e ? d.activeOverlay : "transparent"
|
|
2784
3035
|
}),
|
|
2785
|
-
children: /* @__PURE__ */
|
|
3036
|
+
children: /* @__PURE__ */ O(C, {
|
|
2786
3037
|
style: {
|
|
2787
3038
|
fontFamily: d.fontFamily,
|
|
2788
3039
|
fontSize: d.fontSizeBody,
|
|
@@ -2791,12 +3042,12 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2791
3042
|
},
|
|
2792
3043
|
children: r
|
|
2793
3044
|
})
|
|
2794
|
-
}), o && /* @__PURE__ */
|
|
3045
|
+
}), o && /* @__PURE__ */ O(b, {
|
|
2795
3046
|
accessibilityRole: "button",
|
|
2796
3047
|
accessibilityLabel: "Dismiss",
|
|
2797
3048
|
hitSlop: 4,
|
|
2798
3049
|
onPress: () => {
|
|
2799
|
-
|
|
3050
|
+
x(), n?.();
|
|
2800
3051
|
},
|
|
2801
3052
|
style: ({ pressed: e }) => ({
|
|
2802
3053
|
width: 28,
|
|
@@ -2807,7 +3058,7 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2807
3058
|
opacity: e ? 1 : .55,
|
|
2808
3059
|
backgroundColor: e ? d.activeOverlay : "transparent"
|
|
2809
3060
|
}),
|
|
2810
|
-
children: /* @__PURE__ */
|
|
3061
|
+
children: /* @__PURE__ */ O(C, {
|
|
2811
3062
|
style: {
|
|
2812
3063
|
fontSize: d.fontSizeBody,
|
|
2813
3064
|
color: d.windowFgColor
|
|
@@ -2816,9 +3067,9 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2816
3067
|
})
|
|
2817
3068
|
})] })]
|
|
2818
3069
|
});
|
|
2819
|
-
},
|
|
2820
|
-
let i =
|
|
2821
|
-
return /* @__PURE__ */
|
|
3070
|
+
}, et = ({ position: e = "bottom", children: t, style: n, ...r }) => {
|
|
3071
|
+
let i = I();
|
|
3072
|
+
return /* @__PURE__ */ O(T, {
|
|
2822
3073
|
pointerEvents: "box-none",
|
|
2823
3074
|
accessibilityLabel: "Notifications",
|
|
2824
3075
|
style: [
|
|
@@ -2836,9 +3087,9 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2836
3087
|
...r,
|
|
2837
3088
|
children: t
|
|
2838
3089
|
});
|
|
2839
|
-
},
|
|
2840
|
-
let a =
|
|
2841
|
-
return /* @__PURE__ */
|
|
3090
|
+
}, tt = r(function({ children: e, accessibilityLabel: t = "View switcher", style: n, ...r }, i) {
|
|
3091
|
+
let a = I(), o = P();
|
|
3092
|
+
return /* @__PURE__ */ k(T, {
|
|
2842
3093
|
ref: i,
|
|
2843
3094
|
accessible: !0,
|
|
2844
3095
|
accessibilityRole: "radiogroup",
|
|
@@ -2850,10 +3101,10 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2850
3101
|
backgroundColor: a.headerbarBgColor
|
|
2851
3102
|
}, n],
|
|
2852
3103
|
...r,
|
|
2853
|
-
children: [/* @__PURE__ */
|
|
3104
|
+
children: [/* @__PURE__ */ O(T, {
|
|
2854
3105
|
pointerEvents: "none",
|
|
2855
|
-
style: [
|
|
2856
|
-
}), /* @__PURE__ */
|
|
3106
|
+
style: [S.absoluteFill, { backgroundColor: o === "dark" ? "rgba(0, 0, 0, 0.3)" : "rgba(0, 0, 0, 0.25)" }]
|
|
3107
|
+
}), /* @__PURE__ */ O(T, {
|
|
2857
3108
|
style: {
|
|
2858
3109
|
flexDirection: "row",
|
|
2859
3110
|
alignItems: "center",
|
|
@@ -2863,9 +3114,9 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2863
3114
|
children: e
|
|
2864
3115
|
})]
|
|
2865
3116
|
});
|
|
2866
|
-
}),
|
|
2867
|
-
let o =
|
|
2868
|
-
return /* @__PURE__ */
|
|
3117
|
+
}), nt = r(function({ label: e, icon: t, active: n = !1, disabled: r, ...i }, a) {
|
|
3118
|
+
let o = I();
|
|
3119
|
+
return /* @__PURE__ */ k(b, {
|
|
2869
3120
|
ref: a,
|
|
2870
3121
|
disabled: r,
|
|
2871
3122
|
accessibilityRole: "radio",
|
|
@@ -2886,10 +3137,10 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2886
3137
|
backgroundColor: n ? o.headerbarBgColor : e ? o.activeOverlay : "transparent"
|
|
2887
3138
|
}),
|
|
2888
3139
|
...i,
|
|
2889
|
-
children: [t && /* @__PURE__ */
|
|
3140
|
+
children: [t && /* @__PURE__ */ O(T, {
|
|
2890
3141
|
style: { flexShrink: 0 },
|
|
2891
3142
|
children: t
|
|
2892
|
-
}), /* @__PURE__ */
|
|
3143
|
+
}), /* @__PURE__ */ O(C, {
|
|
2893
3144
|
style: {
|
|
2894
3145
|
fontFamily: o.fontFamily,
|
|
2895
3146
|
fontSize: o.fontSizeBody,
|
|
@@ -2901,6 +3152,6 @@ var Ke = r(function({ label: e, helperText: t, error: n, style: r, inputStyle: i
|
|
|
2901
3152
|
});
|
|
2902
3153
|
});
|
|
2903
3154
|
//#endregion
|
|
2904
|
-
export {
|
|
3155
|
+
export { _e as ActionRow, ve as Banner, ye as BoxedList, xe as Button, Ce as Card, we as Checkbox, Ee as Dialog, N as GnomeContext, pe as GnomeProvider, De as HeaderBar, Oe as Link, R as NAMED_ACCENT_COLORS, ke as PathBar, Ae as ProgressBar, je as RadioButton, Ne as SearchBar, W as Separator, Fe as Sidebar, Z as SidebarCollapsedContext, $ as SidebarFilterContext, Ie as SidebarItem, Le as SidebarSection, Re as Skeleton, Be as Spinner, Ke as Switch, qe as TabBar, Je as TabItem, Ye as TabPanel, U as Text, Ze as TextField, $e as Toast, et as Toaster, tt as ViewSwitcher, nt as ViewSwitcherItem, V as applyAccentColor, ne as darkRawTokens, j as darkTheme, ie as highContrastDarkRawTokens, ee as highContrastDarkTheme, re as highContrastRawTokens, M as highContrastTheme, te as lightRawTokens, A as lightTheme, z as resolveColorScheme, B as resolveContrast, L as resolveGnomeTheme, de as useAccentColor, le as useColorScheme, ue as useContrast, ce as useDateTimeFormatter, oe as useDir, I as useGnomeTheme, ae as useLocale, se as useNumberFormatter, H as useReducedMotion, P as useResolvedColorScheme, F as useResolvedContrast, Q as useSidebarCollapsed };
|
|
2905
3156
|
|
|
2906
3157
|
//# sourceMappingURL=index.js.map
|