@unif/react-native-design 0.33.1 → 0.35.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/jest-preset.js +1 -1
- package/jest-setup.js +16 -1
- package/lib/module/components/business/GlassStats/GlassStats.js +6 -7
- package/lib/module/components/business/GlassStats/GlassStats.js.map +1 -1
- package/lib/module/components/business/GlassStats/styles.js +5 -1
- package/lib/module/components/business/GlassStats/styles.js.map +1 -1
- package/lib/module/components/ui/ActionMenuContent/ActionMenuContent.js +97 -0
- package/lib/module/components/ui/ActionMenuContent/ActionMenuContent.js.map +1 -0
- package/lib/module/components/ui/ActionMenuContent/index.js +4 -0
- package/lib/module/components/ui/ActionMenuContent/index.js.map +1 -0
- package/lib/module/components/ui/ActionMenuContent/styles.js +54 -0
- package/lib/module/components/ui/ActionMenuContent/styles.js.map +1 -0
- package/lib/module/components/ui/ActionMenuContent/types.js.map +1 -0
- package/lib/module/components/ui/Button/ButtonBase.js +10 -2
- package/lib/module/components/ui/Button/ButtonBase.js.map +1 -1
- package/lib/module/components/ui/GlassLayer/GlassLayer.js +39 -0
- package/lib/module/components/ui/GlassLayer/GlassLayer.js.map +1 -0
- package/lib/module/components/ui/GlassLayer/GlassLayer.web.js +36 -0
- package/lib/module/components/ui/GlassLayer/GlassLayer.web.js.map +1 -0
- package/lib/module/components/ui/GlassLayer/constants.js +8 -0
- package/lib/module/components/ui/GlassLayer/constants.js.map +1 -0
- package/lib/module/components/ui/GlassLayer/index.js +4 -0
- package/lib/module/components/ui/GlassLayer/index.js.map +1 -0
- package/lib/module/components/ui/{BorderBeam → GlassLayer}/types.js.map +1 -1
- package/lib/module/components/ui/IconButton/IconButton.js +5 -1
- package/lib/module/components/ui/IconButton/IconButton.js.map +1 -1
- package/lib/module/components/ui/ImagePreview/ImagePreview.js +200 -0
- package/lib/module/components/ui/ImagePreview/ImagePreview.js.map +1 -0
- package/lib/module/components/ui/ImagePreview/constants.js +5 -0
- package/lib/module/components/ui/ImagePreview/constants.js.map +1 -0
- package/lib/module/components/ui/ImagePreview/index.js +4 -0
- package/lib/module/components/ui/ImagePreview/index.js.map +1 -0
- package/lib/module/components/ui/ImagePreview/styles.js +55 -0
- package/lib/module/components/ui/ImagePreview/styles.js.map +1 -0
- package/lib/module/components/ui/ImagePreview/types.js +4 -0
- package/lib/module/components/ui/ImagePreview/types.js.map +1 -0
- package/lib/module/components/ui/Sheet/Sheet.js +40 -0
- package/lib/module/components/ui/Sheet/Sheet.js.map +1 -0
- package/lib/module/components/ui/Sheet/index.js +4 -0
- package/lib/module/components/ui/Sheet/index.js.map +1 -0
- package/lib/module/components/ui/Sheet/styles.js +41 -0
- package/lib/module/components/ui/Sheet/styles.js.map +1 -0
- package/lib/module/components/ui/Sheet/types.js +4 -0
- package/lib/module/components/ui/Sheet/types.js.map +1 -0
- package/lib/module/components/ui/SmsField/SmsField.js +40 -0
- package/lib/module/components/ui/SmsField/SmsField.js.map +1 -0
- package/lib/module/components/ui/SmsField/index.js +4 -0
- package/lib/module/components/ui/SmsField/index.js.map +1 -0
- package/lib/module/components/ui/SmsField/types.js +4 -0
- package/lib/module/components/ui/SmsField/types.js.map +1 -0
- package/lib/module/components/ui/TextEntryContent/TextEntryContent.js +60 -0
- package/lib/module/components/ui/TextEntryContent/TextEntryContent.js.map +1 -0
- package/lib/module/components/ui/TextEntryContent/index.js +4 -0
- package/lib/module/components/ui/TextEntryContent/index.js.map +1 -0
- package/lib/module/components/ui/TextEntryContent/styles.js +29 -0
- package/lib/module/components/ui/TextEntryContent/styles.js.map +1 -0
- package/lib/module/components/ui/TextEntryContent/types.js +4 -0
- package/lib/module/components/ui/TextEntryContent/types.js.map +1 -0
- package/lib/module/components/ui/index.js +6 -2
- package/lib/module/components/ui/index.js.map +1 -1
- package/lib/module/icons/data.js +87 -1
- package/lib/module/icons/data.js.map +1 -1
- package/lib/module/theme/colors.js +4 -7
- package/lib/module/theme/colors.js.map +1 -1
- package/lib/module/theme/index.js +0 -1
- package/lib/module/theme/index.js.map +1 -1
- package/lib/typescript/src/components/business/GlassStats/GlassStats.d.ts +2 -4
- package/lib/typescript/src/components/business/GlassStats/GlassStats.d.ts.map +1 -1
- package/lib/typescript/src/components/business/GlassStats/styles.d.ts +4 -1
- package/lib/typescript/src/components/business/GlassStats/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/ActionMenuContent/ActionMenuContent.d.ts +4 -0
- package/lib/typescript/src/components/ui/ActionMenuContent/ActionMenuContent.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ActionMenuContent/index.d.ts +3 -0
- package/lib/typescript/src/components/ui/ActionMenuContent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ActionMenuContent/styles.d.ts +51 -0
- package/lib/typescript/src/components/ui/ActionMenuContent/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ActionMenuContent/types.d.ts +25 -0
- package/lib/typescript/src/components/ui/ActionMenuContent/types.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Button/ButtonBase.d.ts +3 -1
- package/lib/typescript/src/components/ui/Button/ButtonBase.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/GlassLayer/GlassLayer.d.ts +5 -0
- package/lib/typescript/src/components/ui/GlassLayer/GlassLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/GlassLayer/GlassLayer.web.d.ts +5 -0
- package/lib/typescript/src/components/ui/GlassLayer/GlassLayer.web.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/GlassLayer/constants.d.ts +6 -0
- package/lib/typescript/src/components/ui/GlassLayer/constants.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/GlassLayer/index.d.ts +3 -0
- package/lib/typescript/src/components/ui/{BorderBeam → GlassLayer}/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/GlassLayer/types.d.ts +13 -0
- package/lib/typescript/src/components/ui/GlassLayer/types.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/IconButton/IconButton.d.ts +1 -1
- package/lib/typescript/src/components/ui/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/IconButton/types.d.ts +4 -0
- package/lib/typescript/src/components/ui/IconButton/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/ImagePreview/ImagePreview.d.ts +3 -0
- package/lib/typescript/src/components/ui/ImagePreview/ImagePreview.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ImagePreview/constants.d.ts +3 -0
- package/lib/typescript/src/components/ui/ImagePreview/constants.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ImagePreview/index.d.ts +3 -0
- package/lib/typescript/src/components/ui/ImagePreview/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ImagePreview/styles.d.ts +56 -0
- package/lib/typescript/src/components/ui/ImagePreview/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ImagePreview/types.d.ts +33 -0
- package/lib/typescript/src/components/ui/ImagePreview/types.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Sheet/Sheet.d.ts +4 -0
- package/lib/typescript/src/components/ui/Sheet/Sheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Sheet/index.d.ts +3 -0
- package/lib/typescript/src/components/ui/Sheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Sheet/styles.d.ts +38 -0
- package/lib/typescript/src/components/ui/Sheet/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Sheet/types.d.ts +13 -0
- package/lib/typescript/src/components/ui/Sheet/types.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/SmsField/SmsField.d.ts +4 -0
- package/lib/typescript/src/components/ui/SmsField/SmsField.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/SmsField/index.d.ts +3 -0
- package/lib/typescript/src/components/ui/SmsField/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/SmsField/types.d.ts +12 -0
- package/lib/typescript/src/components/ui/SmsField/types.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextEntryContent/TextEntryContent.d.ts +4 -0
- package/lib/typescript/src/components/ui/TextEntryContent/TextEntryContent.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextEntryContent/index.d.ts +3 -0
- package/lib/typescript/src/components/ui/TextEntryContent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextEntryContent/styles.d.ts +26 -0
- package/lib/typescript/src/components/ui/TextEntryContent/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextEntryContent/types.d.ts +18 -0
- package/lib/typescript/src/components/ui/TextEntryContent/types.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/index.d.ts +12 -4
- package/lib/typescript/src/components/ui/index.d.ts.map +1 -1
- package/lib/typescript/src/icons/data.d.ts +1 -1
- package/lib/typescript/src/icons/data.d.ts.map +1 -1
- package/lib/typescript/src/theme/colors.d.ts +2 -5
- package/lib/typescript/src/theme/colors.d.ts.map +1 -1
- package/lib/typescript/src/theme/index.d.ts +0 -2
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/type-tests/content-api.d.ts +2 -0
- package/lib/typescript/type-tests/content-api.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/business/GlassStats/GlassStats.tsx +4 -6
- package/src/components/business/GlassStats/styles.ts +3 -1
- package/src/components/ui/ActionMenuContent/ActionMenuContent.tsx +118 -0
- package/src/components/ui/ActionMenuContent/index.ts +6 -0
- package/src/components/ui/ActionMenuContent/styles.ts +47 -0
- package/src/components/ui/ActionMenuContent/types.ts +27 -0
- package/src/components/ui/Button/ButtonBase.tsx +11 -2
- package/src/components/ui/GlassLayer/GlassLayer.tsx +42 -0
- package/src/components/ui/GlassLayer/GlassLayer.web.tsx +37 -0
- package/src/components/ui/GlassLayer/constants.ts +2 -0
- package/src/components/ui/GlassLayer/index.ts +2 -0
- package/src/components/ui/GlassLayer/types.ts +14 -0
- package/src/components/ui/IconButton/IconButton.tsx +9 -1
- package/src/components/ui/IconButton/types.ts +4 -0
- package/src/components/ui/ImagePreview/ImagePreview.tsx +243 -0
- package/src/components/ui/ImagePreview/constants.ts +2 -0
- package/src/components/ui/ImagePreview/index.ts +6 -0
- package/src/components/ui/ImagePreview/styles.ts +48 -0
- package/src/components/ui/ImagePreview/types.ts +37 -0
- package/src/components/ui/Sheet/Sheet.tsx +43 -0
- package/src/components/ui/Sheet/index.ts +2 -0
- package/src/components/ui/Sheet/styles.ts +40 -0
- package/src/components/ui/Sheet/types.ts +14 -0
- package/src/components/ui/SmsField/SmsField.tsx +40 -0
- package/src/components/ui/SmsField/index.ts +2 -0
- package/src/components/ui/SmsField/types.ts +15 -0
- package/src/components/ui/TextEntryContent/TextEntryContent.tsx +56 -0
- package/src/components/ui/TextEntryContent/index.ts +2 -0
- package/src/components/ui/TextEntryContent/styles.ts +17 -0
- package/src/components/ui/TextEntryContent/types.ts +18 -0
- package/src/components/ui/index.ts +20 -4
- package/src/icons/data.ts +134 -0
- package/src/theme/colors.ts +4 -7
- package/src/theme/index.ts +0 -3
- package/lib/module/components/ui/BlurLayer/BlurLayer.js +0 -45
- package/lib/module/components/ui/BlurLayer/BlurLayer.js.map +0 -1
- package/lib/module/components/ui/BlurLayer/BlurLayer.web.js +0 -46
- package/lib/module/components/ui/BlurLayer/BlurLayer.web.js.map +0 -1
- package/lib/module/components/ui/BlurLayer/index.js +0 -4
- package/lib/module/components/ui/BlurLayer/index.js.map +0 -1
- package/lib/module/components/ui/BlurLayer/types.js.map +0 -1
- package/lib/module/components/ui/BorderBeam/BorderBeam.js +0 -102
- package/lib/module/components/ui/BorderBeam/BorderBeam.js.map +0 -1
- package/lib/module/components/ui/BorderBeam/BorderBeam.web.js +0 -108
- package/lib/module/components/ui/BorderBeam/BorderBeam.web.js.map +0 -1
- package/lib/module/components/ui/BorderBeam/index.js +0 -4
- package/lib/module/components/ui/BorderBeam/index.js.map +0 -1
- package/lib/module/components/ui/BorderBeam/normalizeBorderBeam.js +0 -23
- package/lib/module/components/ui/BorderBeam/normalizeBorderBeam.js.map +0 -1
- package/lib/module/components/ui/BorderBeam/shared.js +0 -54
- package/lib/module/components/ui/BorderBeam/shared.js.map +0 -1
- package/lib/module/components/ui/BorderBeam/styles.js +0 -18
- package/lib/module/components/ui/BorderBeam/styles.js.map +0 -1
- package/lib/module/theme/blur.js +0 -12
- package/lib/module/theme/blur.js.map +0 -1
- package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.d.ts +0 -10
- package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.web.d.ts +0 -12
- package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.web.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BlurLayer/index.d.ts +0 -3
- package/lib/typescript/src/components/ui/BlurLayer/index.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BlurLayer/types.d.ts +0 -15
- package/lib/typescript/src/components/ui/BlurLayer/types.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BorderBeam/BorderBeam.d.ts +0 -10
- package/lib/typescript/src/components/ui/BorderBeam/BorderBeam.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BorderBeam/BorderBeam.web.d.ts +0 -5
- package/lib/typescript/src/components/ui/BorderBeam/BorderBeam.web.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BorderBeam/index.d.ts +0 -3
- package/lib/typescript/src/components/ui/BorderBeam/normalizeBorderBeam.d.ts +0 -16
- package/lib/typescript/src/components/ui/BorderBeam/normalizeBorderBeam.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BorderBeam/shared.d.ts +0 -28
- package/lib/typescript/src/components/ui/BorderBeam/shared.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BorderBeam/styles.d.ts +0 -15
- package/lib/typescript/src/components/ui/BorderBeam/styles.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/BorderBeam/types.d.ts +0 -23
- package/lib/typescript/src/components/ui/BorderBeam/types.d.ts.map +0 -1
- package/lib/typescript/src/theme/blur.d.ts +0 -11
- package/lib/typescript/src/theme/blur.d.ts.map +0 -1
- package/src/components/ui/BlurLayer/BlurLayer.tsx +0 -47
- package/src/components/ui/BlurLayer/BlurLayer.web.tsx +0 -46
- package/src/components/ui/BlurLayer/index.ts +0 -2
- package/src/components/ui/BlurLayer/types.ts +0 -15
- package/src/components/ui/BorderBeam/BorderBeam.tsx +0 -130
- package/src/components/ui/BorderBeam/BorderBeam.web.tsx +0 -127
- package/src/components/ui/BorderBeam/index.ts +0 -2
- package/src/components/ui/BorderBeam/normalizeBorderBeam.ts +0 -58
- package/src/components/ui/BorderBeam/shared.ts +0 -47
- package/src/components/ui/BorderBeam/styles.ts +0 -16
- package/src/components/ui/BorderBeam/types.ts +0 -23
- package/src/theme/blur.ts +0 -11
- /package/lib/module/components/ui/{BlurLayer → ActionMenuContent}/types.js +0 -0
- /package/lib/module/components/ui/{BorderBeam → GlassLayer}/types.js +0 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
|
+
import { radius, useThemedStyles } from "../../../theme/index.js";
|
|
6
|
+
import { IconButton } from "../IconButton/index.js";
|
|
7
|
+
import { Thumbnail } from "../Thumbnail/index.js";
|
|
8
|
+
import { Carousel } from 'react-native-reanimated-carousel';
|
|
9
|
+
import { DELETE_LABEL, IMAGE_UNAVAILABLE } from "./constants.js";
|
|
10
|
+
import { makeStyles } from "./styles.js";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
export const ImagePreview = /*#__PURE__*/forwardRef(function ImagePreviewInner({
|
|
13
|
+
items,
|
|
14
|
+
width,
|
|
15
|
+
height,
|
|
16
|
+
initialId,
|
|
17
|
+
onCurrentChange,
|
|
18
|
+
onRequestDelete,
|
|
19
|
+
style,
|
|
20
|
+
testID
|
|
21
|
+
}, ref) {
|
|
22
|
+
const styles = useThemedStyles(makeStyles);
|
|
23
|
+
const carouselRef = useRef(null);
|
|
24
|
+
const mounted = useRef(false);
|
|
25
|
+
const moving = useRef(false);
|
|
26
|
+
const pendingScroll = useRef(undefined);
|
|
27
|
+
const [selection, setSelection] = useState(() => ({
|
|
28
|
+
items,
|
|
29
|
+
index: Math.max(0, items.findIndex(item => item.id === initialId)),
|
|
30
|
+
initialized: items.length > 0,
|
|
31
|
+
carouselRevision: 0
|
|
32
|
+
}));
|
|
33
|
+
if (selection.items !== items) {
|
|
34
|
+
const retainedIndex = items.findIndex(item => item.id === selection.items[selection.index]?.id);
|
|
35
|
+
const identityChanged = items.length !== selection.items.length || items.some((item, index) => item.id !== selection.items[index]?.id);
|
|
36
|
+
setSelection({
|
|
37
|
+
items,
|
|
38
|
+
// SDK 的非动画定位不能撤回已排队的旧完成;只重建在途且身份集合变化的轮播。
|
|
39
|
+
carouselRevision: selection.carouselRevision + (moving.current && identityChanged ? 1 : 0),
|
|
40
|
+
initialized: selection.initialized || items.length > 0,
|
|
41
|
+
index: !selection.initialized ? Math.max(0, items.findIndex(item => item.id === initialId)) : retainedIndex >= 0 ? retainedIndex : Math.max(0, Math.min(selection.index, items.length - 1))
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const current = items[selection.index];
|
|
45
|
+
const committed = useRef(selection);
|
|
46
|
+
const currentChange = useRef(onCurrentChange);
|
|
47
|
+
useLayoutEffect(() => {
|
|
48
|
+
mounted.current = true;
|
|
49
|
+
committed.current = selection;
|
|
50
|
+
currentChange.current = onCurrentChange;
|
|
51
|
+
return () => {
|
|
52
|
+
mounted.current = false;
|
|
53
|
+
};
|
|
54
|
+
}, [selection, onCurrentChange]);
|
|
55
|
+
useLayoutEffect(() => {
|
|
56
|
+
moving.current = false;
|
|
57
|
+
}, [selection.carouselRevision]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const request = pendingScroll.current;
|
|
60
|
+
pendingScroll.current = undefined;
|
|
61
|
+
if (!request) return;
|
|
62
|
+
const index = committed.current.items.findIndex(item => item.id === request.id);
|
|
63
|
+
if (index >= 0) carouselRef.current?.scrollTo({
|
|
64
|
+
index,
|
|
65
|
+
animated: request.animated
|
|
66
|
+
});
|
|
67
|
+
}, [selection.carouselRevision]);
|
|
68
|
+
const notifiedId = useRef(undefined);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
// 待交接命令可能已同步完成,通知与句柄读取同一份已提交事实。
|
|
71
|
+
const displayed = committed.current.items[committed.current.index];
|
|
72
|
+
if (displayed?.id === notifiedId.current) return;
|
|
73
|
+
notifiedId.current = displayed?.id;
|
|
74
|
+
if (displayed) currentChange.current?.(displayed);
|
|
75
|
+
}, [current, onCurrentChange]);
|
|
76
|
+
useImperativeHandle(ref, () => ({
|
|
77
|
+
getCurrent: () => mounted.current ? committed.current.items[committed.current.index] : undefined,
|
|
78
|
+
scrollTo: (id, animated = true) => {
|
|
79
|
+
if (!mounted.current) return;
|
|
80
|
+
const index = committed.current.items.findIndex(item => item.id === id);
|
|
81
|
+
if (index < 0) return;
|
|
82
|
+
if (moving.current || pendingScroll.current) {
|
|
83
|
+
// 新命令隔离旧完成投递;新 ref 就绪后原样交接 animated。
|
|
84
|
+
pendingScroll.current = {
|
|
85
|
+
id,
|
|
86
|
+
animated
|
|
87
|
+
};
|
|
88
|
+
const next = {
|
|
89
|
+
...committed.current,
|
|
90
|
+
carouselRevision: committed.current.carouselRevision + 1
|
|
91
|
+
};
|
|
92
|
+
committed.current = next;
|
|
93
|
+
setSelection(next);
|
|
94
|
+
} else {
|
|
95
|
+
carouselRef.current?.scrollTo({
|
|
96
|
+
index,
|
|
97
|
+
animated
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}), []);
|
|
102
|
+
|
|
103
|
+
// SDK 只协调身份变化;source、label、busy 更新不应打断当前动画。
|
|
104
|
+
const data = useMemo(() => items.map(item => item.id), [items]);
|
|
105
|
+
if (!current) return null;
|
|
106
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
107
|
+
style: [styles.container, style],
|
|
108
|
+
testID: testID,
|
|
109
|
+
children: [/*#__PURE__*/_jsx(Carousel, {
|
|
110
|
+
ref: carouselRef,
|
|
111
|
+
data: data,
|
|
112
|
+
defaultIndex: selection.index,
|
|
113
|
+
loop: false,
|
|
114
|
+
itemSize: width,
|
|
115
|
+
style: {
|
|
116
|
+
width,
|
|
117
|
+
height
|
|
118
|
+
},
|
|
119
|
+
keyExtractor: id => id,
|
|
120
|
+
testID: testID ? `${testID}-carousel` : undefined,
|
|
121
|
+
onScrollStart: () => {
|
|
122
|
+
if (mounted.current && selection.carouselRevision === committed.current.carouselRevision) {
|
|
123
|
+
moving.current = true;
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
onSnapToItem: index => {
|
|
127
|
+
const latest = committed.current;
|
|
128
|
+
if (!mounted.current || selection.carouselRevision !== latest.carouselRevision || items.length !== latest.items.length || items.some((item, itemIndex) => item.id !== latest.items[itemIndex]?.id)) return;
|
|
129
|
+
moving.current = false;
|
|
130
|
+
const id = items[index]?.id;
|
|
131
|
+
const nextIndex = latest.items.findIndex(item => item.id === id);
|
|
132
|
+
if (nextIndex >= 0 && nextIndex !== latest.index) {
|
|
133
|
+
const next = {
|
|
134
|
+
...latest,
|
|
135
|
+
index: nextIndex
|
|
136
|
+
};
|
|
137
|
+
// SDK 已完成落位;句柄同步可读,不等待 React 下一次提交。
|
|
138
|
+
committed.current = next;
|
|
139
|
+
setSelection(next);
|
|
140
|
+
notifiedId.current = id;
|
|
141
|
+
currentChange.current?.(next.items[nextIndex]);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
renderItem: ({
|
|
145
|
+
item: id,
|
|
146
|
+
index
|
|
147
|
+
}) => {
|
|
148
|
+
const item = items.find(candidate => candidate.id === id);
|
|
149
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
150
|
+
style: [styles.media, {
|
|
151
|
+
width,
|
|
152
|
+
height
|
|
153
|
+
}],
|
|
154
|
+
children: [item.source === undefined ? /*#__PURE__*/_jsx(View, {
|
|
155
|
+
style: styles.placeholder,
|
|
156
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
157
|
+
style: styles.placeholderText,
|
|
158
|
+
children: IMAGE_UNAVAILABLE
|
|
159
|
+
})
|
|
160
|
+
}) : /*#__PURE__*/_jsx(Thumbnail, {
|
|
161
|
+
source: item.source,
|
|
162
|
+
size: {
|
|
163
|
+
width,
|
|
164
|
+
height,
|
|
165
|
+
borderRadius: radius.xl
|
|
166
|
+
},
|
|
167
|
+
resizeMode: "contain",
|
|
168
|
+
imageStyle: styles.image,
|
|
169
|
+
accessibilityLabel: item.label ?? `图片第 ${index + 1} 张`,
|
|
170
|
+
fallback: /*#__PURE__*/_jsx(View, {
|
|
171
|
+
style: styles.placeholder,
|
|
172
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
173
|
+
style: styles.placeholderText,
|
|
174
|
+
children: IMAGE_UNAVAILABLE
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
178
|
+
pointerEvents: "none",
|
|
179
|
+
style: styles.border
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}, selection.carouselRevision), /*#__PURE__*/_jsx(View, {
|
|
184
|
+
style: styles.counter,
|
|
185
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
186
|
+
style: styles.counterText,
|
|
187
|
+
children: ["\u7B2C", selection.index + 1, "/", items.length, "\u5F20"]
|
|
188
|
+
})
|
|
189
|
+
}), current.canDelete && onRequestDelete ? /*#__PURE__*/_jsx(IconButton, {
|
|
190
|
+
icon: "trash",
|
|
191
|
+
size: "sm",
|
|
192
|
+
variant: "neutral",
|
|
193
|
+
disabled: current.deleting,
|
|
194
|
+
accessibilityLabel: DELETE_LABEL,
|
|
195
|
+
style: styles.deleteButton,
|
|
196
|
+
onPress: () => onRequestDelete(current)
|
|
197
|
+
}) : null]
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
//# sourceMappingURL=ImagePreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useEffect","useImperativeHandle","useLayoutEffect","useMemo","useRef","useState","Text","View","radius","useThemedStyles","IconButton","Thumbnail","Carousel","DELETE_LABEL","IMAGE_UNAVAILABLE","makeStyles","jsx","_jsx","jsxs","_jsxs","ImagePreview","ImagePreviewInner","items","width","height","initialId","onCurrentChange","onRequestDelete","style","testID","ref","styles","carouselRef","mounted","moving","pendingScroll","undefined","selection","setSelection","index","Math","max","findIndex","item","id","initialized","length","carouselRevision","retainedIndex","identityChanged","some","current","min","committed","currentChange","request","scrollTo","animated","notifiedId","displayed","getCurrent","next","data","map","container","children","defaultIndex","loop","itemSize","keyExtractor","onScrollStart","onSnapToItem","latest","itemIndex","nextIndex","renderItem","find","candidate","media","source","placeholder","placeholderText","size","borderRadius","xl","resizeMode","imageStyle","image","accessibilityLabel","label","fallback","pointerEvents","border","counter","counterText","canDelete","icon","variant","disabled","deleting","deleteButton","onPress"],"sourceRoot":"../../../../../src","sources":["components/ui/ImagePreview/ImagePreview.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,MAAM,EAAEC,eAAe,QAAQ,yBAAgB;AACxD,SAASC,UAAU,QAAQ,wBAAe;AAC1C,SAASC,SAAS,QAAQ,uBAAc;AACxC,SAASC,QAAQ,QAA0B,kCAAkC;AAC7E,SAASC,YAAY,EAAEC,iBAAiB,QAAQ,gBAAa;AAC7D,SAASC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQtC,O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BAsEhB,CAAC,eACF9B,IAAA,CAACV,IAAI;MAACqB,KAAK,EAAEG,MAAM,CAAC8D,OAAQ;MAAA5B,QAAA,eAC1B9C,KAAA,CAACb,IAAI;QAACsB,KAAK,EAAEG,MAAM,CAAC+D,WAAY;QAAA7B,QAAA,GAAC,QAC9B,EAAC5B,SAAS,CAACE,KAAK,GAAG,CAAC,EAAC,GAAC,EAACjB,KAAK,CAACwB,MAAM,EAAC,QACvC;MAAA,CAAM;IAAC,CACH,CAAC,EACNK,OAAO,CAAC4C,SAAS,IAAIpE,eAAe,gBACnCV,IAAA,CAACP,UAAU;MACTsF,IAAI,EAAC,OAAO;MACZd,IAAI,EAAC,IAAI;MACTe,OAAO,EAAC,SAAS;MACjBC,QAAQ,EAAE/C,OAAO,CAACgD,QAAS;MAC3BX,kBAAkB,EAAE3E,YAAa;MACjCe,KAAK,EAAEG,MAAM,CAACqE,YAAa;MAC3BC,OAAO,EAAEA,CAAA,KAAM1E,eAAe,CAACwB,OAAO;IAAE,CACzC,CAAC,GACA,IAAI;EAAA,CACJ,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IMAGE_UNAVAILABLE","DELETE_LABEL"],"sourceRoot":"../../../../../src","sources":["components/ui/ImagePreview/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,iBAAiB,GAAG,SAAS;AAC1C,OAAO,MAAMC,YAAY,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ImagePreview"],"sourceRoot":"../../../../../src","sources":["components/ui/ImagePreview/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,mBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { fontMono, radius, space, type as typography } from "../../../theme/index.js";
|
|
5
|
+
export const makeStyles = colors => StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
gap: space[2]
|
|
9
|
+
},
|
|
10
|
+
media: {
|
|
11
|
+
backgroundColor: 'black',
|
|
12
|
+
borderRadius: radius.xl,
|
|
13
|
+
overflow: 'hidden'
|
|
14
|
+
},
|
|
15
|
+
border: {
|
|
16
|
+
...StyleSheet.absoluteFill,
|
|
17
|
+
borderColor: colors.outline,
|
|
18
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
19
|
+
borderRadius: radius.xl
|
|
20
|
+
},
|
|
21
|
+
image: {
|
|
22
|
+
backgroundColor: 'black'
|
|
23
|
+
},
|
|
24
|
+
placeholder: {
|
|
25
|
+
width: '100%',
|
|
26
|
+
height: '100%',
|
|
27
|
+
backgroundColor: 'black',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
paddingHorizontal: space[3]
|
|
31
|
+
},
|
|
32
|
+
placeholderText: {
|
|
33
|
+
color: 'white',
|
|
34
|
+
fontSize: typography.sm,
|
|
35
|
+
textAlign: 'center'
|
|
36
|
+
},
|
|
37
|
+
counter: {
|
|
38
|
+
alignSelf: 'center',
|
|
39
|
+
paddingVertical: space[1],
|
|
40
|
+
paddingHorizontal: space[3],
|
|
41
|
+
borderRadius: radius.pill,
|
|
42
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
43
|
+
borderColor: colors.glassPillBorder,
|
|
44
|
+
backgroundColor: colors.glassHighlight
|
|
45
|
+
},
|
|
46
|
+
counterText: {
|
|
47
|
+
color: colors.foreground,
|
|
48
|
+
fontSize: typography.sm,
|
|
49
|
+
fontFamily: fontMono
|
|
50
|
+
},
|
|
51
|
+
deleteButton: {
|
|
52
|
+
borderRadius: radius.pill
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","fontMono","radius","space","type","typography","makeStyles","colors","create","container","alignItems","gap","media","backgroundColor","borderRadius","xl","overflow","border","absoluteFill","borderColor","outline","borderWidth","hairlineWidth","image","placeholder","width","height","justifyContent","paddingHorizontal","placeholderText","color","fontSize","sm","textAlign","counter","alignSelf","paddingVertical","pill","glassPillBorder","glassHighlight","counterText","foreground","fontFamily","deleteButton"],"sourceRoot":"../../../../../src","sources":["components/ui/ImagePreview/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,IAAIC,UAAU,QAAQ,yBAAgB;AAG5E,OAAO,MAAMC,UAAU,GAAIC,MAAmB,IAC5CP,UAAU,CAACQ,MAAM,CAAC;EAChBC,SAAS,EAAE;IAAEC,UAAU,EAAE,QAAQ;IAAEC,GAAG,EAAER,KAAK,CAAC,CAAC;EAAE,CAAC;EAClDS,KAAK,EAAE;IACLC,eAAe,EAAE,OAAO;IACxBC,YAAY,EAAEZ,MAAM,CAACa,EAAE;IACvBC,QAAQ,EAAE;EACZ,CAAC;EACDC,MAAM,EAAE;IACN,GAAGjB,UAAU,CAACkB,YAAY;IAC1BC,WAAW,EAAEZ,MAAM,CAACa,OAAO;IAC3BC,WAAW,EAAErB,UAAU,CAACsB,aAAa;IACrCR,YAAY,EAAEZ,MAAM,CAACa;EACvB,CAAC;EACDQ,KAAK,EAAE;IAAEV,eAAe,EAAE;EAAQ,CAAC;EACnCW,WAAW,EAAE;IACXC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdb,eAAe,EAAE,OAAO;IACxBc,cAAc,EAAE,QAAQ;IACxBjB,UAAU,EAAE,QAAQ;IACpBkB,iBAAiB,EAAEzB,KAAK,CAAC,CAAC;EAC5B,CAAC;EACD0B,eAAe,EAAE;IACfC,KAAK,EAAE,OAAO;IACdC,QAAQ,EAAE1B,UAAU,CAAC2B,EAAE;IACvBC,SAAS,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACPC,SAAS,EAAE,QAAQ;IACnBC,eAAe,EAAEjC,KAAK,CAAC,CAAC,CAAC;IACzByB,iBAAiB,EAAEzB,KAAK,CAAC,CAAC,CAAC;IAC3BW,YAAY,EAAEZ,MAAM,CAACmC,IAAI;IACzBhB,WAAW,EAAErB,UAAU,CAACsB,aAAa;IACrCH,WAAW,EAAEZ,MAAM,CAAC+B,eAAe;IACnCzB,eAAe,EAAEN,MAAM,CAACgC;EAC1B,CAAC;EACDC,WAAW,EAAE;IACXV,KAAK,EAAEvB,MAAM,CAACkC,UAAU;IACxBV,QAAQ,EAAE1B,UAAU,CAAC2B,EAAE;IACvBU,UAAU,EAAEzC;EACd,CAAC;EACD0C,YAAY,EAAE;IAAE7B,YAAY,EAAEZ,MAAM,CAACmC;EAAK;AAC5C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/ui/ImagePreview/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ScrollView, View } from 'react-native';
|
|
5
|
+
import { useThemedStyles } from "../../../theme/index.js";
|
|
6
|
+
import { makeStyles } from "./styles.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export function Sheet({
|
|
9
|
+
children,
|
|
10
|
+
header,
|
|
11
|
+
footer,
|
|
12
|
+
contentMode = 'fixed',
|
|
13
|
+
contentContainerStyle,
|
|
14
|
+
style,
|
|
15
|
+
testID
|
|
16
|
+
}) {
|
|
17
|
+
const styles = useThemedStyles(makeStyles);
|
|
18
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
19
|
+
style: [styles.root, style],
|
|
20
|
+
testID: testID,
|
|
21
|
+
children: [header ?? /*#__PURE__*/_jsx(View, {
|
|
22
|
+
style: styles.grabberContainer,
|
|
23
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
24
|
+
style: styles.grabber
|
|
25
|
+
})
|
|
26
|
+
}), contentMode === 'scroll' ? /*#__PURE__*/_jsx(ScrollView, {
|
|
27
|
+
style: styles.contentRegion,
|
|
28
|
+
contentContainerStyle: [styles.content, contentContainerStyle],
|
|
29
|
+
keyboardShouldPersistTaps: "handled",
|
|
30
|
+
children: children
|
|
31
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
32
|
+
style: [styles.contentRegion, styles.content, contentContainerStyle],
|
|
33
|
+
children: children
|
|
34
|
+
}), footer ? /*#__PURE__*/_jsx(View, {
|
|
35
|
+
style: styles.footer,
|
|
36
|
+
children: footer
|
|
37
|
+
}) : null]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=Sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ScrollView","View","useThemedStyles","makeStyles","jsx","_jsx","jsxs","_jsxs","Sheet","children","header","footer","contentMode","contentContainerStyle","style","testID","styles","root","grabberContainer","grabber","contentRegion","content","keyboardShouldPersistTaps"],"sourceRoot":"../../../../../src","sources":["components/ui/Sheet/Sheet.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,eAAe,QAAQ,yBAAgB;AAChD,SAASC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGtC,OAAO,SAASC,KAAKA,CAAC;EACpBC,QAAQ;EACRC,MAAM;EACNC,MAAM;EACNC,WAAW,GAAG,OAAO;EACrBC,qBAAqB;EACrBC,KAAK;EACLC;AACU,CAAC,EAAqB;EAChC,MAAMC,MAAM,GAAGd,eAAe,CAACC,UAAU,CAAC;EAE1C,oBACEI,KAAA,CAACN,IAAI;IAACa,KAAK,EAAE,CAACE,MAAM,CAACC,IAAI,EAAEH,KAAK,CAAE;IAACC,MAAM,EAAEA,MAAO;IAAAN,QAAA,GAC/CC,MAAM,iBACLL,IAAA,CAACJ,IAAI;MAACa,KAAK,EAAEE,MAAM,CAACE,gBAAiB;MAAAT,QAAA,eACnCJ,IAAA,CAACJ,IAAI;QAACa,KAAK,EAAEE,MAAM,CAACG;MAAQ,CAAE;IAAC,CAC3B,CACP,EACAP,WAAW,KAAK,QAAQ,gBACvBP,IAAA,CAACL,UAAU;MACTc,KAAK,EAAEE,MAAM,CAACI,aAAc;MAC5BP,qBAAqB,EAAE,CAACG,MAAM,CAACK,OAAO,EAAER,qBAAqB,CAAE;MAC/DS,yBAAyB,EAAC,SAAS;MAAAb,QAAA,EAElCA;IAAQ,CACC,CAAC,gBAEbJ,IAAA,CAACJ,IAAI;MACHa,KAAK,EAAE,CAACE,MAAM,CAACI,aAAa,EAAEJ,MAAM,CAACK,OAAO,EAAER,qBAAqB,CAAE;MAAAJ,QAAA,EAEpEA;IAAQ,CACL,CACP,EACAE,MAAM,gBAAGN,IAAA,CAACJ,IAAI;MAACa,KAAK,EAAEE,MAAM,CAACL,MAAO;MAAAF,QAAA,EAAEE;IAAM,CAAO,CAAC,GAAG,IAAI;EAAA,CACxD,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Sheet"],"sourceRoot":"../../../../../src","sources":["components/ui/Sheet/index.ts"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { space } from "../../../theme/index.js";
|
|
5
|
+
export const makeStyles = colors => StyleSheet.create({
|
|
6
|
+
root: {
|
|
7
|
+
flex: 1,
|
|
8
|
+
minHeight: 0,
|
|
9
|
+
backgroundColor: colors.surface
|
|
10
|
+
},
|
|
11
|
+
grabberContainer: {
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
paddingTop: space['3'],
|
|
14
|
+
paddingBottom: space['2']
|
|
15
|
+
},
|
|
16
|
+
grabber: {
|
|
17
|
+
width: 36,
|
|
18
|
+
height: 5,
|
|
19
|
+
borderRadius: 3,
|
|
20
|
+
backgroundColor: colors.foregroundMuted
|
|
21
|
+
},
|
|
22
|
+
contentRegion: {
|
|
23
|
+
flex: 1,
|
|
24
|
+
minHeight: 0
|
|
25
|
+
},
|
|
26
|
+
content: {
|
|
27
|
+
paddingHorizontal: space['9'],
|
|
28
|
+
paddingTop: space['4'],
|
|
29
|
+
paddingBottom: space['9'],
|
|
30
|
+
gap: space['5']
|
|
31
|
+
},
|
|
32
|
+
footer: {
|
|
33
|
+
backgroundColor: colors.surface,
|
|
34
|
+
paddingHorizontal: space['9'],
|
|
35
|
+
paddingTop: space['5'],
|
|
36
|
+
paddingBottom: space['6'],
|
|
37
|
+
borderTopWidth: StyleSheet.hairlineWidth,
|
|
38
|
+
borderTopColor: colors.outline
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","space","makeStyles","colors","create","root","flex","minHeight","backgroundColor","surface","grabberContainer","alignItems","paddingTop","paddingBottom","grabber","width","height","borderRadius","foregroundMuted","contentRegion","content","paddingHorizontal","gap","footer","borderTopWidth","hairlineWidth","borderTopColor","outline"],"sourceRoot":"../../../../../src","sources":["components/ui/Sheet/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,KAAK,QAA0B,yBAAgB;AAExD,OAAO,MAAMC,UAAU,GAAIC,MAAmB,IAC5CH,UAAU,CAACI,MAAM,CAAC;EAChBC,IAAI,EAAE;IACJC,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,CAAC;IACZC,eAAe,EAAEL,MAAM,CAACM;EAC1B,CAAC;EACDC,gBAAgB,EAAE;IAChBC,UAAU,EAAE,QAAQ;IACpBC,UAAU,EAAEX,KAAK,CAAC,GAAG,CAAC;IACtBY,aAAa,EAAEZ,KAAK,CAAC,GAAG;EAC1B,CAAC;EACDa,OAAO,EAAE;IACPC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfT,eAAe,EAAEL,MAAM,CAACe;EAC1B,CAAC;EACDC,aAAa,EAAE;IACbb,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE;EACb,CAAC;EACDa,OAAO,EAAE;IACPC,iBAAiB,EAAEpB,KAAK,CAAC,GAAG,CAAC;IAC7BW,UAAU,EAAEX,KAAK,CAAC,GAAG,CAAC;IACtBY,aAAa,EAAEZ,KAAK,CAAC,GAAG,CAAC;IACzBqB,GAAG,EAAErB,KAAK,CAAC,GAAG;EAChB,CAAC;EACDsB,MAAM,EAAE;IACNf,eAAe,EAAEL,MAAM,CAACM,OAAO;IAC/BY,iBAAiB,EAAEpB,KAAK,CAAC,GAAG,CAAC;IAC7BW,UAAU,EAAEX,KAAK,CAAC,GAAG,CAAC;IACtBY,aAAa,EAAEZ,KAAK,CAAC,GAAG,CAAC;IACzBuB,cAAc,EAAExB,UAAU,CAACyB,aAAa;IACxCC,cAAc,EAAEvB,MAAM,CAACwB;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/ui/Sheet/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useColors } from "../../../theme/index.js";
|
|
5
|
+
import { Input } from "../Input/index.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function SmsField({
|
|
8
|
+
value,
|
|
9
|
+
onChangeText,
|
|
10
|
+
remainingSeconds,
|
|
11
|
+
sendDisabled,
|
|
12
|
+
onSend,
|
|
13
|
+
sendLabel,
|
|
14
|
+
sendAccessibilityLabel,
|
|
15
|
+
...inputProps
|
|
16
|
+
}) {
|
|
17
|
+
const colors = useColors();
|
|
18
|
+
return /*#__PURE__*/_jsx(Input, {
|
|
19
|
+
...inputProps,
|
|
20
|
+
value: value,
|
|
21
|
+
onChangeText: onChangeText,
|
|
22
|
+
keyboardType: "number-pad",
|
|
23
|
+
autoComplete: "sms-otp",
|
|
24
|
+
textContentType: "oneTimeCode",
|
|
25
|
+
leading: {
|
|
26
|
+
kind: 'icon',
|
|
27
|
+
icon: 'mail',
|
|
28
|
+
size: 18,
|
|
29
|
+
color: colors.iconFaint40
|
|
30
|
+
},
|
|
31
|
+
trailing: {
|
|
32
|
+
kind: 'action',
|
|
33
|
+
label: sendLabel,
|
|
34
|
+
accessibilityLabel: sendAccessibilityLabel ?? sendLabel,
|
|
35
|
+
disabled: sendDisabled || remainingSeconds > 0,
|
|
36
|
+
onPress: onSend
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=SmsField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useColors","Input","jsx","_jsx","SmsField","value","onChangeText","remainingSeconds","sendDisabled","onSend","sendLabel","sendAccessibilityLabel","inputProps","colors","keyboardType","autoComplete","textContentType","leading","kind","icon","size","color","iconFaint40","trailing","label","accessibilityLabel","disabled","onPress"],"sourceRoot":"../../../../../src","sources":["components/ui/SmsField/SmsField.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,yBAAgB;AAC1C,SAASC,KAAK,QAAQ,mBAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGjC,OAAO,SAASC,QAAQA,CAAC;EACvBC,KAAK;EACLC,YAAY;EACZC,gBAAgB;EAChBC,YAAY;EACZC,MAAM;EACNC,SAAS;EACTC,sBAAsB;EACtB,GAAGC;AACU,CAAC,EAAqB;EACnC,MAAMC,MAAM,GAAGb,SAAS,CAAC,CAAC;EAC1B,oBACEG,IAAA,CAACF,KAAK;IAAA,GACAW,UAAU;IACdP,KAAK,EAAEA,KAAM;IACbC,YAAY,EAAEA,YAAa;IAC3BQ,YAAY,EAAC,YAAY;IACzBC,YAAY,EAAC,SAAS;IACtBC,eAAe,EAAC,aAAa;IAC7BC,OAAO,EAAE;MACPC,IAAI,EAAE,MAAM;MACZC,IAAI,EAAE,MAAM;MACZC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAER,MAAM,CAACS;IAChB,CAAE;IACFC,QAAQ,EAAE;MACRL,IAAI,EAAE,QAAQ;MACdM,KAAK,EAAEd,SAAS;MAChBe,kBAAkB,EAAEd,sBAAsB,IAAID,SAAS;MACvDgB,QAAQ,EAAElB,YAAY,IAAID,gBAAgB,GAAG,CAAC;MAC9CoB,OAAO,EAAElB;IACX;EAAE,CACH,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SmsField"],"sourceRoot":"../../../../../src","sources":["components/ui/SmsField/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,eAAY","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/ui/SmsField/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
|
+
import { useThemedStyles } from "../../../theme/index.js";
|
|
6
|
+
import { Button } from "../Button/index.js";
|
|
7
|
+
import { Textarea } from "../Textarea/index.js";
|
|
8
|
+
import { makeStyles } from "./styles.js";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
export function TextEntryContent({
|
|
11
|
+
title,
|
|
12
|
+
value,
|
|
13
|
+
onChangeText,
|
|
14
|
+
onSubmit,
|
|
15
|
+
onCancel,
|
|
16
|
+
message,
|
|
17
|
+
busy = false,
|
|
18
|
+
maxLength,
|
|
19
|
+
confirmLabel = '确认',
|
|
20
|
+
cancelLabel = '取消',
|
|
21
|
+
autoFocus = true,
|
|
22
|
+
style,
|
|
23
|
+
testID
|
|
24
|
+
}) {
|
|
25
|
+
const styles = useThemedStyles(makeStyles);
|
|
26
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
27
|
+
style: [styles.root, style],
|
|
28
|
+
testID: testID,
|
|
29
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
30
|
+
style: styles.title,
|
|
31
|
+
accessibilityRole: "header",
|
|
32
|
+
children: title
|
|
33
|
+
}), message ? /*#__PURE__*/_jsx(Text, {
|
|
34
|
+
style: styles.message,
|
|
35
|
+
children: message
|
|
36
|
+
}) : null, /*#__PURE__*/_jsx(Textarea, {
|
|
37
|
+
value: value,
|
|
38
|
+
onChangeText: onChangeText,
|
|
39
|
+
maxLength: maxLength,
|
|
40
|
+
editable: !busy,
|
|
41
|
+
autoFocus: autoFocus,
|
|
42
|
+
accessibilityLabel: title
|
|
43
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
44
|
+
style: styles.actions,
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
46
|
+
label: confirmLabel,
|
|
47
|
+
size: "sm",
|
|
48
|
+
loading: busy,
|
|
49
|
+
onPress: () => onSubmit(value)
|
|
50
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
51
|
+
label: cancelLabel,
|
|
52
|
+
size: "sm",
|
|
53
|
+
variant: "outline",
|
|
54
|
+
disabled: busy,
|
|
55
|
+
onPress: onCancel
|
|
56
|
+
})]
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=TextEntryContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","View","useThemedStyles","Button","Textarea","makeStyles","jsx","_jsx","jsxs","_jsxs","TextEntryContent","title","value","onChangeText","onSubmit","onCancel","message","busy","maxLength","confirmLabel","cancelLabel","autoFocus","style","testID","styles","root","children","accessibilityRole","editable","accessibilityLabel","actions","label","size","loading","onPress","variant","disabled"],"sourceRoot":"../../../../../src","sources":["components/ui/TextEntryContent/TextEntryContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,eAAe,QAAQ,yBAAgB;AAChD,SAASC,MAAM,QAAQ,oBAAW;AAClC,SAASC,QAAQ,QAAQ,sBAAa;AACtC,SAASC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGtC,OAAO,SAASC,gBAAgBA,CAAC;EAC/BC,KAAK;EACLC,KAAK;EACLC,YAAY;EACZC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,IAAI,GAAG,KAAK;EACZC,SAAS;EACTC,YAAY,GAAG,IAAI;EACnBC,WAAW,GAAG,IAAI;EAClBC,SAAS,GAAG,IAAI;EAChBC,KAAK;EACLC;AACqB,CAAC,EAAqB;EAC3C,MAAMC,MAAM,GAAGtB,eAAe,CAACG,UAAU,CAAC;EAC1C,oBACEI,KAAA,CAACR,IAAI;IAACqB,KAAK,EAAE,CAACE,MAAM,CAACC,IAAI,EAAEH,KAAK,CAAE;IAACC,MAAM,EAAEA,MAAO;IAAAG,QAAA,gBAChDnB,IAAA,CAACP,IAAI;MAACsB,KAAK,EAAEE,MAAM,CAACb,KAAM;MAACgB,iBAAiB,EAAC,QAAQ;MAAAD,QAAA,EAClDf;IAAK,CACF,CAAC,EACNK,OAAO,gBAAGT,IAAA,CAACP,IAAI;MAACsB,KAAK,EAAEE,MAAM,CAACR,OAAQ;MAAAU,QAAA,EAAEV;IAAO,CAAO,CAAC,GAAG,IAAI,eAC/DT,IAAA,CAACH,QAAQ;MACPQ,KAAK,EAAEA,KAAM;MACbC,YAAY,EAAEA,YAAa;MAC3BK,SAAS,EAAEA,SAAU;MACrBU,QAAQ,EAAE,CAACX,IAAK;MAChBI,SAAS,EAAEA,SAAU;MACrBQ,kBAAkB,EAAElB;IAAM,CAC3B,CAAC,eACFF,KAAA,CAACR,IAAI;MAACqB,KAAK,EAAEE,MAAM,CAACM,OAAQ;MAAAJ,QAAA,gBAC1BnB,IAAA,CAACJ,MAAM;QACL4B,KAAK,EAAEZ,YAAa;QACpBa,IAAI,EAAC,IAAI;QACTC,OAAO,EAAEhB,IAAK;QACdiB,OAAO,EAAEA,CAAA,KAAMpB,QAAQ,CAACF,KAAK;MAAE,CAChC,CAAC,eACFL,IAAA,CAACJ,MAAM;QACL4B,KAAK,EAAEX,WAAY;QACnBY,IAAI,EAAC,IAAI;QACTG,OAAO,EAAC,SAAS;QACjBC,QAAQ,EAAEnB,IAAK;QACfiB,OAAO,EAAEnB;MAAS,CACnB,CAAC;IAAA,CACE,CAAC;EAAA,CACH,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TextEntryContent"],"sourceRoot":"../../../../../src","sources":["components/ui/TextEntryContent/index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { fw, radius, space, type } from "../../../theme/index.js";
|
|
5
|
+
export const makeStyles = colors => StyleSheet.create({
|
|
6
|
+
root: {
|
|
7
|
+
gap: space[4],
|
|
8
|
+
padding: space[5],
|
|
9
|
+
borderWidth: 1,
|
|
10
|
+
borderColor: colors.outline,
|
|
11
|
+
borderRadius: radius.xl,
|
|
12
|
+
backgroundColor: colors.surface
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
color: colors.foreground,
|
|
16
|
+
fontSize: type.h3,
|
|
17
|
+
fontWeight: fw.semi
|
|
18
|
+
},
|
|
19
|
+
message: {
|
|
20
|
+
color: colors.foregroundMuted,
|
|
21
|
+
fontSize: type.sm
|
|
22
|
+
},
|
|
23
|
+
actions: {
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
flexWrap: 'wrap',
|
|
26
|
+
gap: space[3]
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","fw","radius","space","type","makeStyles","colors","create","root","gap","padding","borderWidth","borderColor","outline","borderRadius","xl","backgroundColor","surface","title","color","foreground","fontSize","h3","fontWeight","semi","message","foregroundMuted","sm","actions","flexDirection","flexWrap"],"sourceRoot":"../../../../../src","sources":["components/ui/TextEntryContent/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,EAAE,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,QAA0B,yBAAgB;AAE1E,OAAO,MAAMC,UAAU,GAAIC,MAAmB,IAC5CN,UAAU,CAACO,MAAM,CAAC;EAChBC,IAAI,EAAE;IACJC,GAAG,EAAEN,KAAK,CAAC,CAAC,CAAC;IACbO,OAAO,EAAEP,KAAK,CAAC,CAAC,CAAC;IACjBQ,WAAW,EAAE,CAAC;IACdC,WAAW,EAAEN,MAAM,CAACO,OAAO;IAC3BC,YAAY,EAAEZ,MAAM,CAACa,EAAE;IACvBC,eAAe,EAAEV,MAAM,CAACW;EAC1B,CAAC;EACDC,KAAK,EAAE;IAAEC,KAAK,EAAEb,MAAM,CAACc,UAAU;IAAEC,QAAQ,EAAEjB,IAAI,CAACkB,EAAE;IAAEC,UAAU,EAAEtB,EAAE,CAACuB;EAAK,CAAC;EAC3EC,OAAO,EAAE;IAAEN,KAAK,EAAEb,MAAM,CAACoB,eAAe;IAAEL,QAAQ,EAAEjB,IAAI,CAACuB;EAAG,CAAC;EAC7DC,OAAO,EAAE;IAAEC,aAAa,EAAE,KAAK;IAAEC,QAAQ,EAAE,MAAM;IAAErB,GAAG,EAAEN,KAAK,CAAC,CAAC;EAAE;AACnE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/ui/TextEntryContent/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
export { Avatar } from "./Avatar/index.js";
|
|
4
4
|
export { AvatarGroup } from "./AvatarGroup/index.js";
|
|
5
|
-
export {
|
|
6
|
-
export { BorderBeam } from "./BorderBeam/index.js";
|
|
5
|
+
export { GlassLayer } from "./GlassLayer/index.js";
|
|
7
6
|
export { Button } from "./Button/index.js";
|
|
8
7
|
export { Card } from "./Card/index.js";
|
|
9
8
|
export { Carousel } from "./Carousel/index.js";
|
|
@@ -40,4 +39,9 @@ export { Tag } from "./Tag/index.js";
|
|
|
40
39
|
export { Textarea } from "./Textarea/index.js";
|
|
41
40
|
export { Thumbnail } from "./Thumbnail/index.js";
|
|
42
41
|
export { toast, ToastHost } from "./Toast/index.js";
|
|
42
|
+
export { ActionMenuContent } from "./ActionMenuContent/index.js";
|
|
43
|
+
export { ImagePreview } from "./ImagePreview/index.js";
|
|
44
|
+
export { Sheet } from "./Sheet/index.js";
|
|
45
|
+
export { SmsField } from "./SmsField/index.js";
|
|
46
|
+
export { TextEntryContent } from "./TextEntryContent/index.js";
|
|
43
47
|
//# sourceMappingURL=index.js.map
|