@btndprojects/loam-ui-native 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.js +5 -3
- package/dist/adaptive/index.js +6 -2
- package/dist/alert/index.js +5 -2
- package/dist/analyzer/index.js +9 -6
- package/dist/announcement/index.js +8 -5
- package/dist/audio-player/index.js +5 -3
- package/dist/avatar/index.js +5 -2
- package/dist/avatar-group/index.js +7 -3
- package/dist/badge/index.js +7 -4
- package/dist/banner/index.js +5 -2
- package/dist/board/index.js +11 -6
- package/dist/button/index.js +6 -3
- package/dist/camera-permission/index.js +15 -12
- package/dist/capture-result/index.js +19 -16
- package/dist/card/index.js +6 -3
- package/dist/card-form/index.js +12 -8
- package/dist/carousel/index.js +4 -2
- package/dist/chart/index.js +8 -5
- package/dist/charts/index.js +8 -6
- package/dist/chat/index.js +16 -0
- package/dist/checkbox/index.js +6 -4
- package/dist/checklist/index.js +11 -8
- package/dist/checkout/index.js +16 -11
- package/dist/chip/index.js +7 -4
- package/dist/{chunk-XNUVB5OL.js → chunk-2OLKPG4E.js} +92 -28
- package/dist/{chunk-RUZHTGKB.js → chunk-2PKYGLQ6.js} +71 -40
- package/dist/{chunk-UC2WGUP3.js → chunk-2SWKL3AJ.js} +91 -252
- package/dist/{chunk-AI4DWZCD.js → chunk-2SY63FCH.js} +63 -16
- package/dist/{chunk-F5XNPWS7.js → chunk-2TXERVVA.js} +92 -35
- package/dist/chunk-36EC2T6P.js +581 -0
- package/dist/chunk-3DUWIYV5.js +437 -0
- package/dist/{chunk-JNY4ZHAR.js → chunk-3QMEOFW5.js} +275 -71
- package/dist/chunk-3WEZCGHX.js +265 -0
- package/dist/chunk-46MMSDGL.js +194 -0
- package/dist/{chunk-7O2FMUPT.js → chunk-4IZXHVFJ.js} +297 -92
- package/dist/{chunk-LAECSR4H.js → chunk-5LAAAXFP.js} +14 -8
- package/dist/{chunk-2A5NIQAK.js → chunk-5RENVKBQ.js} +134 -46
- package/dist/{chunk-2ZZ7TDJ4.js → chunk-5UTRIXQ6.js} +37 -31
- package/dist/{chunk-LOE5YNN3.js → chunk-5VFZRGVD.js} +37 -10
- package/dist/{chunk-52X2VYTD.js → chunk-67IZZ2MJ.js} +115 -60
- package/dist/{chunk-UYG5L34B.js → chunk-6YAQBXB3.js} +10 -4
- package/dist/{chunk-BTTFCMKG.js → chunk-74FLKD24.js} +94 -23
- package/dist/{chunk-ITTYJZWX.js → chunk-7BUIKDD6.js} +73 -18
- package/dist/{chunk-423B7SPN.js → chunk-7OVVSVEZ.js} +273 -109
- package/dist/chunk-AEB7KCHQ.js +287 -0
- package/dist/chunk-APCWFOZW.js +28 -0
- package/dist/chunk-AWKQIE5I.js +139 -0
- package/dist/{chunk-VCDBXW5H.js → chunk-B7N4ASYE.js} +86 -42
- package/dist/{chunk-IVNRBPGC.js → chunk-C4GTDLRC.js} +104 -20
- package/dist/{chunk-4ZAHCY44.js → chunk-C6APNDVA.js} +12 -5
- package/dist/{chunk-4SZYY6AN.js → chunk-CMTVNF3D.js} +18 -13
- package/dist/{chunk-HZ6CNMAF.js → chunk-CPTOADB2.js} +151 -96
- package/dist/chunk-D5N5QWI7.js +1325 -0
- package/dist/{chunk-IIQTAY3J.js → chunk-DN7MNQIP.js} +113 -29
- package/dist/{chunk-47FWHGUN.js → chunk-DVGBZ3TX.js} +84 -23
- package/dist/chunk-DW3L54DQ.js +305 -0
- package/dist/{chunk-3ARE4TES.js → chunk-E2E3I5W2.js} +69 -18
- package/dist/{chunk-DHWADYZX.js → chunk-EDCBJV7J.js} +41 -28
- package/dist/{chunk-WSW6ZFAQ.js → chunk-ENP3BMZU.js} +4 -4
- package/dist/{chunk-OOPPQH27.js → chunk-EVOIGUBI.js} +43 -19
- package/dist/{chunk-VEAYTRPX.js → chunk-EY4DD67D.js} +165 -97
- package/dist/{chunk-223Q2T2Q.js → chunk-F3H33DQX.js} +132 -61
- package/dist/{chunk-CYRBHQQZ.js → chunk-F5B3UINI.js} +68 -35
- package/dist/{chunk-6X6PQ443.js → chunk-FAJI7BSC.js} +20 -9
- package/dist/{chunk-MOUJOP55.js → chunk-FUMHAAF3.js} +96 -29
- package/dist/{chunk-6HT2LP62.js → chunk-FV6HMP7W.js} +192 -73
- package/dist/{chunk-S7F6XLTK.js → chunk-FYWNRX4F.js} +76 -47
- package/dist/{chunk-YG3ZJHGU.js → chunk-FZGAAOKS.js} +30 -8
- package/dist/{chunk-YDGVJETP.js → chunk-G3AFC24V.js} +1 -1
- package/dist/{chunk-EJBDRVIH.js → chunk-G6UESEVN.js} +15 -8
- package/dist/chunk-GDKVKNR2.js +339 -0
- package/dist/chunk-GEIGMWNF.js +10 -0
- package/dist/{chunk-JUAMLEHX.js → chunk-H7DWSL4O.js} +24 -12
- package/dist/chunk-HJFFOOJ4.js +1 -0
- package/dist/{chunk-RW6ZL2FQ.js → chunk-HJLPZA4X.js} +106 -21
- package/dist/chunk-HYEOQWT7.js +647 -0
- package/dist/chunk-I2KLQ2HA.js +19 -0
- package/dist/{chunk-CJ5EOYZE.js → chunk-I4FHVKEC.js} +11 -5
- package/dist/{chunk-JNH2TYIN.js → chunk-IDM7JJMO.js} +19 -5
- package/dist/{chunk-O4AEHWII.js → chunk-IPUNJMAQ.js} +141 -49
- package/dist/{chunk-J7Q7VCVC.js → chunk-IT6FUXXG.js} +13 -6
- package/dist/{chunk-QJJ6MADV.js → chunk-IVKMZ7BB.js} +80 -28
- package/dist/{chunk-Z7H7VSFZ.js → chunk-IXKWIFWZ.js} +17 -6
- package/dist/chunk-J64KGCGX.js +55 -0
- package/dist/chunk-JBMLWFSJ.js +270 -0
- package/dist/{chunk-4BXMXBJO.js → chunk-JJLPBRVZ.js} +22 -11
- package/dist/chunk-JLC6PM5S.js +406 -0
- package/dist/chunk-JUYWSSKW.js +335 -0
- package/dist/{chunk-7CFF4HXS.js → chunk-JV5YOTOB.js} +49 -11
- package/dist/{chunk-LZLHELAG.js → chunk-KFJGFLMW.js} +29 -8
- package/dist/{chunk-O7AE6DAF.js → chunk-KQZ3GLHR.js} +18 -8
- package/dist/{chunk-N32RGOA5.js → chunk-LKFC4CS7.js} +80 -24
- package/dist/{chunk-YC6WORFL.js → chunk-LMPHCVJJ.js} +82 -50
- package/dist/{chunk-3WPW4KUN.js → chunk-LQP4KEXZ.js} +45 -13
- package/dist/{chunk-TKQYWZ5V.js → chunk-LUMVGO2K.js} +47 -31
- package/dist/{chunk-AWJOCGFZ.js → chunk-M656FYNH.js} +25 -13
- package/dist/{chunk-35OFI3JG.js → chunk-MKSNFG7H.js} +73 -20
- package/dist/{chunk-4GBOGOTV.js → chunk-NBEF4EPJ.js} +16 -6
- package/dist/chunk-NNCOFLNE.js +24 -0
- package/dist/{chunk-4YQOR7JM.js → chunk-NTQ2F3AU.js} +73 -20
- package/dist/{chunk-QCDXZBC5.js → chunk-O5V4TG3V.js} +126 -44
- package/dist/{chunk-U7TFM2JA.js → chunk-OJQUBQWA.js} +3 -3
- package/dist/{chunk-VQHPQEUH.js → chunk-OWAMM2DK.js} +13 -6
- package/dist/chunk-PID3NJB7.js +405 -0
- package/dist/{chunk-HET4LLMX.js → chunk-PMMTGBBS.js} +27 -17
- package/dist/{chunk-RIBDXGUG.js → chunk-PNF3NKB5.js} +49 -16
- package/dist/{chunk-JXJB2X6M.js → chunk-Q6NKEPRE.js} +81 -32
- package/dist/chunk-QDZGFXQD.js +176 -0
- package/dist/{chunk-SYNOJOQO.js → chunk-QEYFDRHR.js} +60 -26
- package/dist/{chunk-VBOXAEPI.js → chunk-QHAITQIF.js} +97 -22
- package/dist/{chunk-VXDZFJGP.js → chunk-QHTVYA65.js} +230 -76
- package/dist/{chunk-TUTI5HOZ.js → chunk-QIKT7LIB.js} +14 -8
- package/dist/{chunk-3ENTMPQY.js → chunk-QP3KMOVF.js} +82 -42
- package/dist/{chunk-GNNJ4GCC.js → chunk-QPWDDJJ4.js} +62 -148
- package/dist/{chunk-QWCMU5B2.js → chunk-QRUMA22E.js} +205 -80
- package/dist/{chunk-ZVFE5QGU.js → chunk-QYPE5JX3.js} +50 -10
- package/dist/{chunk-PUPM2YGF.js → chunk-ROCUG24E.js} +76 -36
- package/dist/{chunk-NQYBUO3K.js → chunk-RU3ZPNL6.js} +333 -142
- package/dist/{chunk-TOXAGRDQ.js → chunk-RXSCIO6W.js} +14 -5
- package/dist/{chunk-FMYDDECK.js → chunk-SATMR6SG.js} +631 -203
- package/dist/{chunk-4YIP3CWS.js → chunk-SHHY5OMK.js} +7 -5
- package/dist/chunk-SKWO3SZF.js +2284 -0
- package/dist/{chunk-YF4NSSMT.js → chunk-SWS5JQIF.js} +41 -13
- package/dist/{chunk-CUMUNPXY.js → chunk-T5LTPKX6.js} +15 -7
- package/dist/{chunk-H6NIOQHK.js → chunk-TDMG26JI.js} +26 -6
- package/dist/{chunk-UWFLYMAR.js → chunk-TLCIR6RG.js} +267 -126
- package/dist/{chunk-SBMNWWBV.js → chunk-TN2ZNJUI.js} +47 -9
- package/dist/{chunk-5YNTNN5A.js → chunk-TQVAIKFD.js} +106 -41
- package/dist/chunk-TRGFFU6A.js +1456 -0
- package/dist/{chunk-2GK6PHGE.js → chunk-TY4MTKQJ.js} +100 -22
- package/dist/{chunk-AZRX6SAC.js → chunk-U23FYWME.js} +15 -7
- package/dist/{chunk-PZXZJBMP.js → chunk-U5NLHYV6.js} +26 -12
- package/dist/chunk-UQEN55EY.js +1 -0
- package/dist/chunk-UQGBTPXH.js +218 -0
- package/dist/chunk-UXGIW7OK.js +116 -0
- package/dist/{chunk-PJXUJYS6.js → chunk-UYGDJWMN.js} +55 -30
- package/dist/{chunk-QDYDBCFP.js → chunk-V2OEB75Z.js} +50 -51
- package/dist/{chunk-LSS54GLJ.js → chunk-VAOAKWUK.js} +34 -13
- package/dist/{chunk-DM5QUKKO.js → chunk-VDPK5CY4.js} +18 -6
- package/dist/chunk-W23G6JLF.js +37 -0
- package/dist/{chunk-CDRZHT42.js → chunk-W63AJTM7.js} +276 -12
- package/dist/{chunk-XXXEFXY5.js → chunk-W74TXYFB.js} +13 -5
- package/dist/{chunk-LRJNDEIA.js → chunk-WRDSPUE7.js} +144 -29
- package/dist/{chunk-C2NTXVWM.js → chunk-XBZGDDMR.js} +11 -4
- package/dist/{chunk-BV3B2HYZ.js → chunk-XIDTBCBA.js} +189 -131
- package/dist/{chunk-YTFKPRUK.js → chunk-XN4KG3P4.js} +348 -153
- package/dist/chunk-XQXMLMH3.js +211 -0
- package/dist/{chunk-HPPW424V.js → chunk-XTORZWRF.js} +19 -8
- package/dist/{chunk-P23EQNRQ.js → chunk-YAAHPATV.js} +181 -30
- package/dist/{chunk-KMI5ML5I.js → chunk-YXOAPXMU.js} +57 -18
- package/dist/{chunk-RJQOOHT2.js → chunk-ZECZOOSB.js} +59 -28
- package/dist/{chunk-QKXCPTFS.js → chunk-ZLTO5VQI.js} +121 -31
- package/dist/{chunk-BEDBFJND.js → chunk-ZVATDZOM.js} +16 -18
- package/dist/coachmark/index.js +6 -3
- package/dist/code-block/index.js +5 -3
- package/dist/color-field/index.js +6 -4
- package/dist/commerce/index.js +19 -16
- package/dist/connectivity/index.js +5 -2
- package/dist/context-menu/index.js +5 -3
- package/dist/copy-button/index.js +4 -2
- package/dist/data-grid/index.js +21 -16
- package/dist/date-range-picker/index.js +11 -8
- package/dist/description-list/index.js +3 -1
- package/dist/dialog/index.js +4 -2
- package/dist/empty-state/index.js +4 -2
- package/dist/error-summary/index.js +4 -2
- package/dist/fab/index.js +5 -2
- package/dist/file-manager/index.js +28 -0
- package/dist/file-upload/index.js +10 -7
- package/dist/filter-bar/index.js +9 -6
- package/dist/flow-run/index.js +15 -12
- package/dist/form/index.js +5 -3
- package/dist/gallery/index.js +5 -2
- package/dist/hold-to-confirm/index.js +4 -2
- package/dist/index.d.ts +9557 -2985
- package/dist/index.js +355 -122
- package/dist/infinite-list/index.js +4 -2
- package/dist/inline-edit/index.js +6 -4
- package/dist/input/index.js +5 -3
- package/dist/interactions/index.js +2 -1
- package/dist/invoice/index.js +13 -9
- package/dist/kbd/index.js +5 -1
- package/dist/keyboard/index.js +4 -2
- package/dist/list-row/index.js +6 -4
- package/dist/log-viewer/index.js +4 -2
- package/dist/map-view/index.js +5 -3
- package/dist/markdown/index.js +9 -6
- package/dist/metric/index.js +7 -4
- package/dist/money/index.js +9 -3
- package/dist/nav-drawer/index.js +4 -2
- package/dist/nav-header/index.js +9 -0
- package/dist/navigation/index.js +5 -2
- package/dist/notification-center/index.js +12 -10
- package/dist/number-roll/index.js +5 -2
- package/dist/one-handed/index.js +5 -3
- package/dist/os-surfaces/index.js +6 -3
- package/dist/otp/index.js +7 -4
- package/dist/page-header/index.js +1 -0
- package/dist/pagination/index.js +6 -0
- package/dist/payment-method/index.js +14 -10
- package/dist/payment-status/index.js +17 -14
- package/dist/permission/index.js +5 -2
- package/dist/picker/index.js +11 -6
- package/dist/progress/index.js +6 -3
- package/dist/pull-to-refresh/index.js +4 -2
- package/dist/radio-group/index.js +6 -4
- package/dist/rating/index.js +5 -2
- package/dist/receivables/index.js +21 -16
- package/dist/refund/index.js +18 -14
- package/dist/save-status/index.js +5 -3
- package/dist/scroll-area/index.js +3 -1
- package/dist/search-field/index.js +8 -0
- package/dist/segmented-control/index.js +4 -3
- package/dist/sheet/index.js +5 -3
- package/dist/skeleton/index.js +3 -1
- package/dist/slider/index.js +4 -2
- package/dist/sortable/index.js +7 -0
- package/dist/spinner/index.js +3 -1
- package/dist/split-button/index.js +9 -6
- package/dist/spotlight/index.js +3 -1
- package/dist/stage-timeline/index.js +5 -3
- package/dist/status-dot/index.js +4 -2
- package/dist/stepper/index.js +7 -4
- package/dist/streaming-text/index.js +3 -2
- package/dist/survey/index.js +18 -15
- package/dist/switch/index.js +5 -3
- package/dist/system-state/index.js +7 -4
- package/dist/tab-bar/index.js +5 -2
- package/dist/tabs/index.js +4 -2
- package/dist/tags-input/index.js +10 -0
- package/dist/textarea/index.js +6 -4
- package/dist/thinking/index.js +3 -1
- package/dist/time-field/index.js +12 -0
- package/dist/time-range-control/index.js +22 -0
- package/dist/timeline/index.js +4 -2
- package/dist/toast/index.js +4 -2
- package/dist/toolbar/index.js +4 -2
- package/dist/tour/index.js +12 -9
- package/dist/truncation-notice/index.js +5 -2
- package/dist/update-notice/index.js +12 -9
- package/dist/video-player/index.js +5 -2
- package/dist/viewfinder/index.js +6 -4
- package/dist/widget/index.js +7 -4
- package/dist/wizard/index.js +7 -4
- package/package.json +13 -12
- package/dist/chunk-6N33LFQA.js +0 -35
- package/dist/chunk-GDKZTW34.js +0 -395
- package/dist/chunk-GL7B2DOW.js +0 -134
- package/dist/chunk-NKB7BZYK.js +0 -167
- package/dist/chunk-OETCUXQP.js +0 -134
- package/dist/chunk-OPXFZ4Y5.js +0 -204
- package/dist/chunk-Q72LJOVE.js +0 -169
- package/dist/chunk-RNGLIHFA.js +0 -191
- package/dist/chunk-RQ3HASCC.js +0 -6
- package/dist/chunk-RSOJT5YW.js +0 -124
- package/dist/chunk-TKVFVF5D.js +0 -95
- package/dist/chunk-XOSCY2CW.js +0 -242
- package/dist/header/index.js +0 -5
- package/dist/search-bar/index.js +0 -5
- /package/dist/{chunk-3ECPOSKO.js → chunk-3UG6JUCV.js} +0 -0
- /package/dist/{chunk-JRLTGLN4.js → chunk-5WWRTEPS.js} +0 -0
- /package/dist/{chunk-RTIKSY6A.js → chunk-5Z5ZYMOJ.js} +0 -0
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import { PhaseAnnouncement, NoteBlock } from './chunk-
|
|
2
|
-
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from './chunk-
|
|
3
|
-
import { decorativeProps, camInk } from './chunk-
|
|
4
|
-
import { Button } from './chunk-
|
|
5
|
-
import {
|
|
1
|
+
import { PhaseAnnouncement, NoteBlock } from './chunk-LKFC4CS7.js';
|
|
2
|
+
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from './chunk-YXOAPXMU.js';
|
|
3
|
+
import { useAnalyzerCopy, decorativeProps, camInk } from './chunk-HJLPZA4X.js';
|
|
4
|
+
import { Button } from './chunk-E2E3I5W2.js';
|
|
5
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
6
|
+
import { Icon } from './chunk-UXGIW7OK.js';
|
|
7
|
+
import { useResolvedMotion, motionTiming, springConfig } from './chunk-J64KGCGX.js';
|
|
6
8
|
import * as React from 'react';
|
|
7
|
-
import { View, Text, Platform, findNodeHandle, AccessibilityInfo } from 'react-native';
|
|
9
|
+
import { Animated, View, Text, Platform, findNodeHandle, AccessibilityInfo } from 'react-native';
|
|
8
10
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
9
|
-
import {
|
|
11
|
+
import { permissionScreen } from '@btndprojects/loam-analyzer';
|
|
10
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
13
|
|
|
14
|
+
// src/camera-permission/camera-permission-labels.ts
|
|
15
|
+
var DEFAULT_CAMERA_PERMISSION_LABELS = {
|
|
16
|
+
takeAnother: "Take another"
|
|
17
|
+
};
|
|
18
|
+
function useCameraPermissionLabels(own) {
|
|
19
|
+
return useLabels("cameraPermission", DEFAULT_CAMERA_PERMISSION_LABELS, own);
|
|
20
|
+
}
|
|
12
21
|
var STATE_ICON = {
|
|
13
22
|
undetermined: "camera",
|
|
14
23
|
prompting: "camera",
|
|
@@ -24,13 +33,29 @@ function ScreenShell({
|
|
|
24
33
|
inert = false,
|
|
25
34
|
announce = true,
|
|
26
35
|
autoFocus = false,
|
|
27
|
-
body
|
|
36
|
+
body,
|
|
37
|
+
copy: copyProp
|
|
28
38
|
}) {
|
|
29
|
-
const
|
|
39
|
+
const words = useAnalyzerCopy(copyProp);
|
|
40
|
+
const theme = useLoamTheme("camera-permission");
|
|
30
41
|
const { styles } = useStyles(permissionSheet, { inert });
|
|
31
|
-
const screen = permissionScreen(state);
|
|
42
|
+
const screen = permissionScreen(state, words);
|
|
32
43
|
const copy = body ?? screen.body;
|
|
33
44
|
const heading = React.useRef(null);
|
|
45
|
+
const level = useResolvedMotion(void 0, "camera-permission");
|
|
46
|
+
const rise = React.useRef(new Animated.Value(level === "none" ? 1 : 0)).current;
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
if (level === "none") return;
|
|
49
|
+
if (level === "reduced") {
|
|
50
|
+
Animated.timing(rise, { ...motionTiming(level), toValue: 1, useNativeDriver: true }).start();
|
|
51
|
+
} else {
|
|
52
|
+
Animated.spring(rise, {
|
|
53
|
+
...springConfig(theme, "ds"),
|
|
54
|
+
toValue: 1,
|
|
55
|
+
useNativeDriver: true
|
|
56
|
+
}).start();
|
|
57
|
+
}
|
|
58
|
+
}, []);
|
|
34
59
|
React.useLayoutEffect(() => {
|
|
35
60
|
if (!autoFocus) return;
|
|
36
61
|
const node = heading.current;
|
|
@@ -39,10 +64,16 @@ function ScreenShell({
|
|
|
39
64
|
if (tag !== null) AccessibilityInfo.setAccessibilityFocus(tag);
|
|
40
65
|
}, [autoFocus]);
|
|
41
66
|
return /* @__PURE__ */ jsx(
|
|
42
|
-
View,
|
|
67
|
+
Animated.View,
|
|
43
68
|
{
|
|
44
69
|
testID: `loam-permission-${state}`,
|
|
45
|
-
style:
|
|
70
|
+
style: [
|
|
71
|
+
styles.shell,
|
|
72
|
+
{
|
|
73
|
+
opacity: rise,
|
|
74
|
+
transform: level === "full" ? [{ translateY: rise.interpolate({ inputRange: [0, 1], outputRange: [12, 0] }) }] : []
|
|
75
|
+
}
|
|
76
|
+
],
|
|
46
77
|
children: /* @__PURE__ */ jsxs(Card, { variant: "elevated", style: styles.card, children: [
|
|
47
78
|
/* @__PURE__ */ jsx(PhaseAnnouncement, { message: announce ? `${screen.heading}. ${copy}` : null }),
|
|
48
79
|
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
@@ -57,22 +88,33 @@ function ScreenShell({
|
|
|
57
88
|
/* @__PURE__ */ jsx(CardTitle, { children: /* @__PURE__ */ jsx(Text, { ref: heading, accessibilityRole: "header", style: styles.heading, children: screen.heading }) }),
|
|
58
89
|
/* @__PURE__ */ jsx(Text, { style: styles.body, children: copy })
|
|
59
90
|
] }),
|
|
60
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(NoteBlock, { title:
|
|
91
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(NoteBlock, { title: words.permission[state].label, description: screen.note }) }),
|
|
61
92
|
/* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsxs(View, { style: styles.actions, children: [
|
|
62
|
-
screen.secondary ? /* @__PURE__ */ jsx(View, { style: styles.actionSlot, children: /* @__PURE__ */ jsx(
|
|
93
|
+
screen.secondary ? /* @__PURE__ */ jsx(View, { style: styles.actionSlot, children: /* @__PURE__ */ jsx(
|
|
94
|
+
Button,
|
|
95
|
+
{
|
|
96
|
+
variant: "outline",
|
|
97
|
+
size: "lg",
|
|
98
|
+
fullWidth: true,
|
|
99
|
+
disabled: inert,
|
|
100
|
+
onPress: onSecondary,
|
|
101
|
+
children: screen.secondary
|
|
102
|
+
}
|
|
103
|
+
) }) : null,
|
|
63
104
|
/* @__PURE__ */ jsx(View, { style: styles.actionSlot, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, disabled: inert, onPress: onPrimary, children: screen.primary }) })
|
|
64
105
|
] }) })
|
|
65
106
|
] })
|
|
66
107
|
}
|
|
67
108
|
);
|
|
68
109
|
}
|
|
69
|
-
function
|
|
110
|
+
function CameraPermissionPrimer({
|
|
70
111
|
privacyStatement,
|
|
71
112
|
prompting = false,
|
|
72
113
|
onContinue,
|
|
73
114
|
onUpload,
|
|
74
115
|
autoFocus,
|
|
75
|
-
announce
|
|
116
|
+
announce,
|
|
117
|
+
copy
|
|
76
118
|
}) {
|
|
77
119
|
return /* @__PURE__ */ jsx(
|
|
78
120
|
ScreenShell,
|
|
@@ -83,7 +125,8 @@ function PermissionPrimer({
|
|
|
83
125
|
onPrimary: onContinue,
|
|
84
126
|
onSecondary: onUpload,
|
|
85
127
|
autoFocus,
|
|
86
|
-
announce
|
|
128
|
+
announce,
|
|
129
|
+
copy
|
|
87
130
|
}
|
|
88
131
|
);
|
|
89
132
|
}
|
|
@@ -91,7 +134,8 @@ function CameraDenied({
|
|
|
91
134
|
onOpenSettings,
|
|
92
135
|
onUpload,
|
|
93
136
|
autoFocus,
|
|
94
|
-
announce
|
|
137
|
+
announce,
|
|
138
|
+
copy
|
|
95
139
|
}) {
|
|
96
140
|
return /* @__PURE__ */ jsx(
|
|
97
141
|
ScreenShell,
|
|
@@ -100,14 +144,16 @@ function CameraDenied({
|
|
|
100
144
|
onPrimary: onOpenSettings,
|
|
101
145
|
onSecondary: onUpload,
|
|
102
146
|
autoFocus,
|
|
103
|
-
announce
|
|
147
|
+
announce,
|
|
148
|
+
copy
|
|
104
149
|
}
|
|
105
150
|
);
|
|
106
151
|
}
|
|
107
152
|
function CameraUnavailable({
|
|
108
153
|
onUpload,
|
|
109
154
|
autoFocus,
|
|
110
|
-
announce
|
|
155
|
+
announce,
|
|
156
|
+
copy
|
|
111
157
|
}) {
|
|
112
158
|
return /* @__PURE__ */ jsx(
|
|
113
159
|
ScreenShell,
|
|
@@ -115,7 +161,8 @@ function CameraUnavailable({
|
|
|
115
161
|
state: "unavailable",
|
|
116
162
|
onPrimary: onUpload,
|
|
117
163
|
autoFocus,
|
|
118
|
-
announce
|
|
164
|
+
announce,
|
|
165
|
+
copy
|
|
119
166
|
}
|
|
120
167
|
);
|
|
121
168
|
}
|
|
@@ -126,48 +173,89 @@ function CameraPermissionScreen({
|
|
|
126
173
|
onUpload,
|
|
127
174
|
privacyStatement,
|
|
128
175
|
autoFocus,
|
|
129
|
-
announce
|
|
176
|
+
announce,
|
|
177
|
+
copy
|
|
130
178
|
}) {
|
|
131
|
-
|
|
132
|
-
|
|
179
|
+
const theme = useLoamTheme("camera-permission");
|
|
180
|
+
const level = useResolvedMotion(void 0, "camera-permission");
|
|
181
|
+
const last = React.useRef(state);
|
|
182
|
+
const fade = React.useRef(new Animated.Value(1)).current;
|
|
183
|
+
const [leaving, setLeaving] = React.useState(false);
|
|
184
|
+
const granted = state === "granted";
|
|
185
|
+
if (!granted) last.current = state;
|
|
186
|
+
React.useEffect(() => {
|
|
187
|
+
if (!granted) {
|
|
188
|
+
fade.setValue(1);
|
|
189
|
+
setLeaving(false);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (level === "none") return;
|
|
193
|
+
setLeaving(true);
|
|
194
|
+
Animated.timing(fade, {
|
|
195
|
+
duration: level === "reduced" ? theme.duration.fast : theme.duration.slow,
|
|
196
|
+
toValue: 0,
|
|
197
|
+
useNativeDriver: true
|
|
198
|
+
}).start(() => setLeaving(false));
|
|
199
|
+
}, [granted, level, fade]);
|
|
200
|
+
if (granted && !leaving) return null;
|
|
201
|
+
const shown = granted ? last.current : state;
|
|
202
|
+
return /* @__PURE__ */ jsx(Animated.View, { style: { opacity: fade }, pointerEvents: granted ? "none" : "auto", children: renderScreen(shown) });
|
|
203
|
+
function renderScreen(state2) {
|
|
204
|
+
if (state2 === "denied") {
|
|
205
|
+
return /* @__PURE__ */ jsx(
|
|
206
|
+
CameraDenied,
|
|
207
|
+
{
|
|
208
|
+
onOpenSettings,
|
|
209
|
+
onUpload,
|
|
210
|
+
autoFocus,
|
|
211
|
+
announce,
|
|
212
|
+
copy
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
if (state2 === "unavailable") {
|
|
217
|
+
return /* @__PURE__ */ jsx(
|
|
218
|
+
CameraUnavailable,
|
|
219
|
+
{
|
|
220
|
+
onUpload,
|
|
221
|
+
autoFocus,
|
|
222
|
+
announce,
|
|
223
|
+
copy
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
}
|
|
133
227
|
return /* @__PURE__ */ jsx(
|
|
134
|
-
|
|
228
|
+
CameraPermissionPrimer,
|
|
135
229
|
{
|
|
136
|
-
|
|
230
|
+
prompting: state2 === "prompting",
|
|
231
|
+
privacyStatement,
|
|
232
|
+
onContinue: onRequestPermission,
|
|
137
233
|
onUpload,
|
|
138
234
|
autoFocus,
|
|
139
|
-
announce
|
|
235
|
+
announce,
|
|
236
|
+
copy
|
|
140
237
|
}
|
|
141
238
|
);
|
|
142
239
|
}
|
|
143
|
-
if (state === "unavailable") {
|
|
144
|
-
return /* @__PURE__ */ jsx(CameraUnavailable, { onUpload, autoFocus, announce });
|
|
145
|
-
}
|
|
146
|
-
return /* @__PURE__ */ jsx(
|
|
147
|
-
PermissionPrimer,
|
|
148
|
-
{
|
|
149
|
-
prompting: state === "prompting",
|
|
150
|
-
privacyStatement,
|
|
151
|
-
onContinue: onRequestPermission,
|
|
152
|
-
onUpload,
|
|
153
|
-
autoFocus,
|
|
154
|
-
announce
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
240
|
}
|
|
158
241
|
function CaptureDone({
|
|
159
|
-
label
|
|
160
|
-
actionLabel
|
|
242
|
+
label: labelProp,
|
|
243
|
+
actionLabel,
|
|
244
|
+
labels,
|
|
245
|
+
copy,
|
|
161
246
|
onTakeAnother,
|
|
162
247
|
announce = true
|
|
163
248
|
}) {
|
|
164
|
-
const
|
|
249
|
+
const t = useCameraPermissionLabels(labels);
|
|
250
|
+
const words = useAnalyzerCopy(copy);
|
|
251
|
+
const label = labelProp ?? words.done;
|
|
252
|
+
const theme = useLoamTheme("camera-permission");
|
|
165
253
|
const { styles } = useStyles(permissionSheet);
|
|
166
254
|
return /* @__PURE__ */ jsxs(View, { testID: "loam-capture-done", style: styles.done, children: [
|
|
167
255
|
/* @__PURE__ */ jsx(PhaseAnnouncement, { message: announce ? label : null }),
|
|
168
256
|
/* @__PURE__ */ jsx(View, { accessible: false, style: styles.doneMark, ...decorativeProps(), children: /* @__PURE__ */ jsx(Icon, { name: "check", size: theme.icon.lg, color: theme.color.goodInk }) }),
|
|
169
257
|
/* @__PURE__ */ jsx(Text, { style: [styles.doneLabel, { color: camInk(theme) }], children: label }),
|
|
170
|
-
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, onPress: onTakeAnother, children: actionLabel })
|
|
258
|
+
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, onPress: onTakeAnother, children: actionLabel ?? t.takeAnother })
|
|
171
259
|
] });
|
|
172
260
|
}
|
|
173
261
|
var permissionSheet = createStyleSheet((theme) => ({
|
|
@@ -251,4 +339,4 @@ var permissionSheet = createStyleSheet((theme) => ({
|
|
|
251
339
|
}
|
|
252
340
|
}));
|
|
253
341
|
|
|
254
|
-
export { CameraDenied, CameraPermissionScreen, CameraUnavailable, CaptureDone
|
|
342
|
+
export { CameraDenied, CameraPermissionPrimer, CameraPermissionScreen, CameraUnavailable, CaptureDone };
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { resolveStepState } from './chunk-YLLCXTMC.js';
|
|
2
|
-
import { NumberRoll } from './chunk-
|
|
2
|
+
import { NumberRoll } from './chunk-T5LTPKX6.js';
|
|
3
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { Animated, Easing, View, Text } from 'react-native';
|
|
5
6
|
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
6
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
|
-
var DEFAULT_LATE_LABEL = "Still working\u2026";
|
|
9
9
|
var INDETERMINATE_SPAN = 0.4;
|
|
10
10
|
var INDETERMINATE_CYCLES = 2;
|
|
11
11
|
var INDETERMINATE_REST = 0.5;
|
|
12
|
+
var DEFAULT_LABELS = {
|
|
13
|
+
lateLabel: "Still working\u2026",
|
|
14
|
+
percent: (percent) => `${percent}%`
|
|
15
|
+
};
|
|
12
16
|
function clamp(n, lo, hi) {
|
|
13
17
|
return Math.max(lo, Math.min(hi, n));
|
|
14
18
|
}
|
|
15
19
|
function useFillColor(tone) {
|
|
16
|
-
const theme = useLoamTheme();
|
|
20
|
+
const theme = useLoamTheme("progress");
|
|
17
21
|
switch (tone) {
|
|
18
22
|
case "good":
|
|
19
23
|
return theme.color.good;
|
|
@@ -33,12 +37,14 @@ function Progress({
|
|
|
33
37
|
showValue = false,
|
|
34
38
|
label,
|
|
35
39
|
late = false,
|
|
36
|
-
lateLabel
|
|
40
|
+
lateLabel,
|
|
37
41
|
motion = "full",
|
|
38
42
|
animateValue = false,
|
|
39
|
-
accessibilityLabel
|
|
43
|
+
accessibilityLabel,
|
|
44
|
+
labels: labelsProp
|
|
40
45
|
}) {
|
|
41
|
-
const theme = useLoamTheme();
|
|
46
|
+
const theme = useLoamTheme("progress");
|
|
47
|
+
const labels = useLabels("progress", DEFAULT_LABELS, labelsProp);
|
|
42
48
|
const { styles } = useStyles(sheet, { size });
|
|
43
49
|
const fillColor = useFillColor(tone);
|
|
44
50
|
const indeterminate = value === void 0;
|
|
@@ -83,22 +89,19 @@ function Progress({
|
|
|
83
89
|
outputRange: ["-40%", "100%"]
|
|
84
90
|
});
|
|
85
91
|
return /* @__PURE__ */ jsxs(View, { style: styles.outer, children: [
|
|
86
|
-
showHeader ? /* @__PURE__ */ jsx(View, { style: styles.header, children: late ? (
|
|
87
|
-
// `role="status"` (aria-live: polite on rn-web) announces the copy
|
|
88
|
-
// swap when work goes late, rather than silently sweeping on.
|
|
89
|
-
/* @__PURE__ */ jsx(View, { accessibilityRole: "text", role: "status", style: styles.latePill, children: /* @__PURE__ */ jsx(Text, { style: styles.lateText, children: lateLabel }) })
|
|
90
|
-
) : label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: styles.label, children: label }) : null }) : null,
|
|
92
|
+
showHeader ? /* @__PURE__ */ jsx(View, { style: styles.header, children: /* @__PURE__ */ jsx(View, { accessibilityRole: "text", role: "status", children: late ? /* @__PURE__ */ jsx(View, { style: styles.latePill, children: /* @__PURE__ */ jsx(Text, { style: styles.lateText, children: lateLabel ?? labels.lateLabel }) }) : label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: styles.label, children: label }) : null }) }) : null,
|
|
91
93
|
/* @__PURE__ */ jsxs(View, { style: styles.wrap, children: [
|
|
92
94
|
/* @__PURE__ */ jsx(
|
|
93
95
|
View,
|
|
94
96
|
{
|
|
95
97
|
accessibilityRole: "progressbar",
|
|
96
|
-
accessibilityLabel,
|
|
97
|
-
accessibilityValue: indeterminate ? void 0 : { min: 0, max, now },
|
|
98
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
99
|
+
accessibilityValue: indeterminate ? void 0 : { min: 0, max: 100, now },
|
|
98
100
|
accessibilityState: indeterminate ? { busy: true } : void 0,
|
|
99
101
|
"aria-valuemin": 0,
|
|
100
|
-
"aria-valuemax":
|
|
102
|
+
"aria-valuemax": 100,
|
|
101
103
|
"aria-valuenow": indeterminate ? void 0 : now,
|
|
104
|
+
"aria-valuetext": indeterminate ? void 0 : labels.percent(now),
|
|
102
105
|
style: styles.track,
|
|
103
106
|
children: indeterminate ? /* @__PURE__ */ jsx(
|
|
104
107
|
Animated.View,
|
|
@@ -115,7 +118,7 @@ function Progress({
|
|
|
115
118
|
NumberRoll,
|
|
116
119
|
{
|
|
117
120
|
value: now,
|
|
118
|
-
formatValue:
|
|
121
|
+
formatValue: labels.percent,
|
|
119
122
|
textStyle: {
|
|
120
123
|
fontFamily: theme.font.mono,
|
|
121
124
|
fontSize: theme.fontSize[14],
|
|
@@ -124,10 +127,7 @@ function Progress({
|
|
|
124
127
|
motion,
|
|
125
128
|
style: styles.valueRoll
|
|
126
129
|
}
|
|
127
|
-
) : /* @__PURE__ */
|
|
128
|
-
now,
|
|
129
|
-
"%"
|
|
130
|
-
] }) : null
|
|
130
|
+
) : /* @__PURE__ */ jsx(Text, { style: styles.value, children: labels.percent(now) }) : null
|
|
131
131
|
] })
|
|
132
132
|
] });
|
|
133
133
|
}
|
|
@@ -202,14 +202,6 @@ var sheet = createStyleSheet((theme) => ({
|
|
|
202
202
|
// Same reserved width as the static read-out, right-aligned, for the roll.
|
|
203
203
|
valueRoll: { minWidth: theme.space[40], justifyContent: "flex-end" }
|
|
204
204
|
}));
|
|
205
|
-
var STEP_WORD = {
|
|
206
|
-
working: "in progress",
|
|
207
|
-
waiting: "waiting",
|
|
208
|
-
done: "done",
|
|
209
|
-
crashed: "failed",
|
|
210
|
-
conflict: "conflict",
|
|
211
|
-
pending: "pending"
|
|
212
|
-
};
|
|
213
205
|
function stepFill(theme, state) {
|
|
214
206
|
switch (state) {
|
|
215
207
|
case "working":
|
|
@@ -226,6 +218,18 @@ function stepFill(theme, state) {
|
|
|
226
218
|
return theme.color.surface3;
|
|
227
219
|
}
|
|
228
220
|
}
|
|
221
|
+
var STEP_DEFAULT_LABELS = {
|
|
222
|
+
stepOf: (current, total) => `Step ${current} of ${total}`,
|
|
223
|
+
stepWithState: (stepOf, state) => `${stepOf}, ${state}`,
|
|
224
|
+
states: {
|
|
225
|
+
working: "in progress",
|
|
226
|
+
waiting: "waiting",
|
|
227
|
+
done: "done",
|
|
228
|
+
crashed: "failed",
|
|
229
|
+
conflict: "conflict",
|
|
230
|
+
pending: "pending"
|
|
231
|
+
}
|
|
232
|
+
};
|
|
229
233
|
function StepProgress({
|
|
230
234
|
total,
|
|
231
235
|
current,
|
|
@@ -233,22 +237,24 @@ function StepProgress({
|
|
|
233
237
|
size = "md",
|
|
234
238
|
label,
|
|
235
239
|
accessibilityLabel,
|
|
240
|
+
labels: labelsProp,
|
|
236
241
|
style,
|
|
237
242
|
testID
|
|
238
243
|
}) {
|
|
239
|
-
const theme = useLoamTheme();
|
|
244
|
+
const theme = useLoamTheme("progress");
|
|
245
|
+
const labels = useLabels("stepProgress", STEP_DEFAULT_LABELS, labelsProp);
|
|
240
246
|
const { styles } = useStyles(stepSheet, { size });
|
|
241
247
|
const count = Math.max(1, Math.trunc(total));
|
|
242
248
|
const cur = Math.min(Math.max(Math.trunc(current), 1), count);
|
|
243
249
|
const curIndex = cur - 1;
|
|
244
250
|
const curState = resolveStepState(curIndex, curIndex, states);
|
|
245
|
-
const readout =
|
|
246
|
-
const valueText = curState === "working" ? readout :
|
|
251
|
+
const readout = labels.stepOf(cur, count);
|
|
252
|
+
const valueText = curState === "working" ? readout : labels.stepWithState(readout, labels.states[curState]);
|
|
247
253
|
return /* @__PURE__ */ jsxs(
|
|
248
254
|
View,
|
|
249
255
|
{
|
|
250
256
|
accessibilityRole: "progressbar",
|
|
251
|
-
accessibilityLabel,
|
|
257
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
252
258
|
accessibilityValue: { min: 1, max: count, now: cur, text: valueText },
|
|
253
259
|
"aria-valuemin": 1,
|
|
254
260
|
"aria-valuemax": count,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { overscrollIntent, bandIndicator, overscrollOffset, GESTURE_SLOP_PX, SCROLL_TOP_SLOP_PX, isReachExitArmed, REACH_ARM_PX } from './chunk-HU2EQNRZ.js';
|
|
2
|
-
import { expandedProps } from './chunk-
|
|
2
|
+
import { expandedProps } from './chunk-W23G6JLF.js';
|
|
3
3
|
import { haptics } from './chunk-NY2U3PBI.js';
|
|
4
|
-
import {
|
|
4
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
5
|
+
import { Icon } from './chunk-UXGIW7OK.js';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import { useWindowDimensions, Animated, Easing, AccessibilityInfo, PanResponder, View, Pressable, ScrollView } from 'react-native';
|
|
7
8
|
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
@@ -38,23 +39,39 @@ function reachShift(windowHeight, reachZone = 0.62) {
|
|
|
38
39
|
if (!Number.isFinite(windowHeight) || windowHeight <= 0) return REFERENCE_SHIFT;
|
|
39
40
|
return Math.round(windowHeight * (1 - reachZone));
|
|
40
41
|
}
|
|
42
|
+
var DEFAULT_LABELS = {
|
|
43
|
+
exit: "Exit one-handed reach",
|
|
44
|
+
exitHint: "Drag up or tap to move the content back",
|
|
45
|
+
indicator: "Pull down to refresh, keep pulling for one-handed reach",
|
|
46
|
+
refreshing: "Refreshing",
|
|
47
|
+
enterAnnouncement: "One-handed reach on. Content moved down.",
|
|
48
|
+
exitAnnouncement: "One-handed reach off."
|
|
49
|
+
};
|
|
41
50
|
function OneHanded({
|
|
42
51
|
active,
|
|
43
52
|
onActiveChange,
|
|
44
53
|
onRefresh,
|
|
45
54
|
refreshing,
|
|
46
55
|
shift,
|
|
47
|
-
exitLabel
|
|
48
|
-
exitHint
|
|
49
|
-
indicatorLabel
|
|
50
|
-
refreshingLabel
|
|
51
|
-
enterAnnouncement
|
|
52
|
-
exitAnnouncement
|
|
56
|
+
exitLabel: exitLabelProp,
|
|
57
|
+
exitHint: exitHintProp,
|
|
58
|
+
indicatorLabel: indicatorLabelProp,
|
|
59
|
+
refreshingLabel: refreshingLabelProp,
|
|
60
|
+
enterAnnouncement: enterAnnouncementProp,
|
|
61
|
+
exitAnnouncement: exitAnnouncementProp,
|
|
62
|
+
labels: labelsProp,
|
|
53
63
|
children,
|
|
54
64
|
...rest
|
|
55
65
|
}) {
|
|
56
66
|
const { styles } = useStyles(sheet);
|
|
57
|
-
const theme = useLoamTheme();
|
|
67
|
+
const theme = useLoamTheme("one-handed");
|
|
68
|
+
const labels = useLabels("oneHanded", DEFAULT_LABELS, labelsProp);
|
|
69
|
+
const exitLabel = exitLabelProp ?? labels.exit;
|
|
70
|
+
const exitHint = exitHintProp ?? labels.exitHint;
|
|
71
|
+
const indicatorLabel = indicatorLabelProp ?? labels.indicator;
|
|
72
|
+
const refreshingLabel = refreshingLabelProp ?? labels.refreshing;
|
|
73
|
+
const enterAnnouncement = enterAnnouncementProp ?? labels.enterAnnouncement;
|
|
74
|
+
const exitAnnouncement = exitAnnouncementProp ?? labels.exitAnnouncement;
|
|
58
75
|
const { height: windowHeight } = useWindowDimensions();
|
|
59
76
|
const dropDistance = shift ?? reachShift(windowHeight, theme.layout.reachZone);
|
|
60
77
|
const bandHeight = Math.max(dropDistance, EXIT_BAR_MIN_HEIGHT);
|
|
@@ -120,7 +137,15 @@ function OneHanded({
|
|
|
120
137
|
springTo(dropScaleX, 1),
|
|
121
138
|
springTo(dropScaleY, 1)
|
|
122
139
|
]).start();
|
|
123
|
-
}, [
|
|
140
|
+
}, [
|
|
141
|
+
dropOpacity,
|
|
142
|
+
dropY,
|
|
143
|
+
dropScaleX,
|
|
144
|
+
dropScaleY,
|
|
145
|
+
springTo,
|
|
146
|
+
exitEasing,
|
|
147
|
+
theme.motion.exit.duration
|
|
148
|
+
]);
|
|
124
149
|
const onRefreshRef = React.useRef(onRefresh);
|
|
125
150
|
onRefreshRef.current = onRefresh;
|
|
126
151
|
const controlledRefreshing = refreshing != null;
|
|
@@ -138,6 +163,7 @@ function OneHanded({
|
|
|
138
163
|
const changed = wasRefreshing.current !== isRefreshing;
|
|
139
164
|
wasRefreshing.current = isRefreshing;
|
|
140
165
|
if (isRefreshing) {
|
|
166
|
+
if (changed) AccessibilityInfo.announceForAccessibility(refreshingLabel);
|
|
141
167
|
spinnerOpacity.setValue(1);
|
|
142
168
|
Animated.parallel([
|
|
143
169
|
Animated.timing(dropOpacity, {
|
|
@@ -383,6 +409,7 @@ function OneHanded({
|
|
|
383
409
|
{
|
|
384
410
|
accessibilityRole: "progressbar",
|
|
385
411
|
accessibilityLabel: isRefreshing ? refreshingLabel : indicatorLabel,
|
|
412
|
+
accessibilityState: { busy: isRefreshing },
|
|
386
413
|
style: [
|
|
387
414
|
styles.droplet,
|
|
388
415
|
{
|