@xhsreds/reds-rn-next 0.1.3 → 0.1.4
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/coverage/.tmp/coverage-0.json +1 -1
- package/coverage/.tmp/coverage-1.json +1 -1
- package/coverage/.tmp/coverage-10.json +1 -1
- package/coverage/.tmp/coverage-11.json +1 -1
- package/coverage/.tmp/coverage-12.json +1 -1
- package/coverage/.tmp/coverage-13.json +1 -1
- package/coverage/.tmp/coverage-14.json +1 -1
- package/coverage/.tmp/coverage-15.json +1 -1
- package/coverage/.tmp/coverage-16.json +1 -1
- package/coverage/.tmp/coverage-17.json +1 -1
- package/coverage/.tmp/coverage-19.json +1 -1
- package/coverage/.tmp/coverage-2.json +1 -1
- package/coverage/.tmp/coverage-20.json +1 -1
- package/coverage/.tmp/coverage-21.json +1 -1
- package/coverage/.tmp/coverage-22.json +1 -1
- package/coverage/.tmp/coverage-23.json +1 -1
- package/coverage/.tmp/coverage-25.json +1 -1
- package/coverage/.tmp/coverage-26.json +1 -1
- package/coverage/.tmp/coverage-27.json +1 -1
- package/coverage/.tmp/coverage-28.json +1 -1
- package/coverage/.tmp/coverage-29.json +1 -1
- package/coverage/.tmp/coverage-3.json +1 -1
- package/coverage/.tmp/coverage-31.json +1 -1
- package/coverage/.tmp/coverage-32.json +1 -0
- package/coverage/.tmp/coverage-4.json +1 -1
- package/coverage/.tmp/coverage-5.json +1 -1
- package/coverage/.tmp/coverage-6.json +1 -1
- package/coverage/.tmp/coverage-7.json +1 -1
- package/coverage/.tmp/coverage-8.json +1 -1
- package/coverage/.tmp/coverage-9.json +1 -1
- package/lib/cjs/_chunks/GhFTd1qc.js +22 -0
- package/lib/cjs/_chunks/GhFTd1qc.js.map +1 -0
- package/lib/cjs/components/Alert/Alert.js +143 -0
- package/lib/cjs/components/Alert/Alert.js.map +1 -0
- package/lib/cjs/components/Alert/index.js +145 -0
- package/lib/cjs/components/Alert/index.js.map +1 -0
- package/lib/cjs/components/Alert/interface/index.js +8 -0
- package/lib/cjs/components/Alert/interface/index.js.map +1 -0
- package/lib/cjs/components/Alert/styles.js +124 -0
- package/lib/cjs/components/Alert/styles.js.map +1 -0
- package/lib/cjs/components/Avatar/Avatar.js +1 -1
- package/lib/cjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/cjs/components/AvatarGroup/AvatarGroup.js +92 -99
- package/lib/cjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib/cjs/components/AvatarGroup/index.js +45 -11
- package/lib/cjs/components/AvatarGroup/index.js.map +1 -1
- package/lib/cjs/components/Button/Button.js +1 -1
- package/lib/cjs/components/Button/Button.js.map +1 -1
- package/lib/cjs/components/FAB/FAB.js +1 -1
- package/lib/cjs/components/FAB/FAB.js.map +1 -1
- package/lib/cjs/components/Image/hook/index.js +2 -2
- package/lib/cjs/components/Image/hook/index.js.map +1 -1
- package/lib/cjs/components/ImagePreview/ImagePreview.js +88 -66
- package/lib/cjs/components/ImagePreview/ImagePreview.js.map +1 -1
- package/lib/cjs/components/ImagePreview/ImageViewer3.js +3 -3
- package/lib/cjs/components/ImagePreview/ImageViewer3.js.map +1 -1
- package/lib/cjs/components/ImagePreview/index.js +48 -9
- package/lib/cjs/components/ImagePreview/index.js.map +1 -1
- package/lib/cjs/components/List/ListItem/ListItem.js +86 -111
- package/lib/cjs/components/List/ListItem/ListItem.js.map +1 -1
- package/lib/cjs/components/List/index.js +44 -9
- package/lib/cjs/components/List/index.js.map +1 -1
- package/lib/cjs/components/Tag/Tag.js +1 -1
- package/lib/cjs/components/Tag/Tag.js.map +1 -1
- package/lib/cjs/components/Text/hooks/loadFontFromFile.js +1 -1
- package/lib/cjs/components/Text/hooks/loadFontFromFile.js.map +1 -1
- package/lib/cjs/index.js +244 -30
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/_chunks/BKEXyO9m.js +19 -0
- package/lib/esm/_chunks/BKEXyO9m.js.map +1 -0
- package/lib/esm/_chunks/{D-HreRcG.js → CwHnr-H1.js} +2 -2
- package/lib/esm/_chunks/{D-HreRcG.js.map → CwHnr-H1.js.map} +1 -1
- package/lib/esm/components/ActionSheets/ActionSheets.js +1 -1
- package/lib/esm/components/ActionSheets/index.js +1 -1
- package/lib/esm/components/Alert/Alert.js +135 -0
- package/lib/esm/components/Alert/Alert.js.map +1 -0
- package/lib/esm/components/Alert/index.js +139 -0
- package/lib/esm/components/Alert/index.js.map +1 -0
- package/lib/esm/components/Alert/interface/index.js +2 -0
- package/lib/esm/components/Alert/interface/index.js.map +1 -0
- package/lib/esm/components/Alert/styles.js +122 -0
- package/lib/esm/components/Alert/styles.js.map +1 -0
- package/lib/esm/components/Avatar/Avatar.js +2 -2
- package/lib/esm/components/Avatar/Avatar.js.map +1 -1
- package/lib/esm/components/Avatar/index.js +1 -1
- package/lib/esm/components/Avatar/styles.js +1 -1
- package/lib/esm/components/AvatarGroup/AvatarGroup.js +90 -101
- package/lib/esm/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib/esm/components/AvatarGroup/index.js +43 -9
- package/lib/esm/components/AvatarGroup/index.js.map +1 -1
- package/lib/esm/components/Badge/Badge.js +1 -1
- package/lib/esm/components/Badge/index.js +1 -1
- package/lib/esm/components/BottomBar/BottomBar.js +1 -1
- package/lib/esm/components/BottomBar/index.js +1 -1
- package/lib/esm/components/Button/Button.js +2 -2
- package/lib/esm/components/Button/Button.js.map +1 -1
- package/lib/esm/components/Button/index.js +1 -1
- package/lib/esm/components/Button/styleMap.js +1 -1
- package/lib/esm/components/Collapse/Collapse.js +1 -1
- package/lib/esm/components/Collapse/Item/Item.js +1 -1
- package/lib/esm/components/Collapse/Item/styles.js +1 -1
- package/lib/esm/components/Collapse/index.js +1 -1
- package/lib/esm/components/ConfigProvider/ConfigProvider.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/ConfigCache.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/ConfigCache/index.js +1 -1
- package/lib/esm/components/ConfigProvider/hooks/themeToken/useThemeToken.js +1 -1
- package/lib/esm/components/ConfigProvider/index.js +1 -1
- package/lib/esm/components/Divider/Divider.js +1 -1
- package/lib/esm/components/Divider/index.js +1 -1
- package/lib/esm/components/Divider/styles.js +1 -1
- package/lib/esm/components/DropDown/DropDown.js +1 -1
- package/lib/esm/components/DropDown/DropDownItem.js +1 -1
- package/lib/esm/components/DropDown/index.js +1 -1
- package/lib/esm/components/DropDown/styles.js +1 -1
- package/lib/esm/components/Empty/Empty.js +1 -1
- package/lib/esm/components/Empty/index.js +1 -1
- package/lib/esm/components/Empty/styles.js +1 -1
- package/lib/esm/components/FAB/FAB.js +2 -2
- package/lib/esm/components/FAB/FAB.js.map +1 -1
- package/lib/esm/components/FAB/index.js +1 -1
- package/lib/esm/components/Image/Image.js +1 -1
- package/lib/esm/components/Image/hook/index.js +3 -3
- package/lib/esm/components/Image/hook/index.js.map +1 -1
- package/lib/esm/components/Image/index.js +1 -1
- package/lib/esm/components/ImagePreview/Gesture/useGesture.js +1 -1
- package/lib/esm/components/ImagePreview/ImagePreview.js +87 -69
- package/lib/esm/components/ImagePreview/ImagePreview.js.map +1 -1
- package/lib/esm/components/ImagePreview/ImageViewer.js +1 -1
- package/lib/esm/components/ImagePreview/ImageViewer3.js +4 -4
- package/lib/esm/components/ImagePreview/ImageViewer3.js.map +1 -1
- package/lib/esm/components/ImagePreview/index.js +47 -8
- package/lib/esm/components/ImagePreview/index.js.map +1 -1
- package/lib/esm/components/List/ListItem/ListItem.js +84 -113
- package/lib/esm/components/List/ListItem/ListItem.js.map +1 -1
- package/lib/esm/components/List/index.js +43 -8
- package/lib/esm/components/List/index.js.map +1 -1
- package/lib/esm/components/Picker/Picker.js +1 -1
- package/lib/esm/components/Picker/index.js +1 -1
- package/lib/esm/components/PickerView/PickerView.js +1 -1
- package/lib/esm/components/PickerView/Wheel.js +1 -1
- package/lib/esm/components/PickerView/index.js +1 -1
- package/lib/esm/components/Popover/Popover.js +1 -1
- package/lib/esm/components/Popover/component.js +1 -1
- package/lib/esm/components/Popover/hook.js +1 -1
- package/lib/esm/components/Popover/index.js +1 -1
- package/lib/esm/components/Portal/core/PortalProvider.js +1 -1
- package/lib/esm/components/Portal/index.js +1 -1
- package/lib/esm/components/Progress/Progress.js +1 -1
- package/lib/esm/components/Progress/index.js +1 -1
- package/lib/esm/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/lib/esm/components/ProgressIndicator/index.js +1 -1
- package/lib/esm/components/ProgressIndicator/styles.js +1 -1
- package/lib/esm/components/PullRefresh/PullRefresh.js +1 -1
- package/lib/esm/components/PullRefresh/component.js +1 -1
- package/lib/esm/components/PullRefresh/index.js +1 -1
- package/lib/esm/components/Result/Result.js +1 -1
- package/lib/esm/components/Result/index.js +1 -1
- package/lib/esm/components/Result/styles.js +1 -1
- package/lib/esm/components/Sheets/Sheets.js +1 -1
- package/lib/esm/components/Sheets/index.js +1 -1
- package/lib/esm/components/Silder/Silder.js +1 -1
- package/lib/esm/components/Silder/index.js +1 -1
- package/lib/esm/components/Skeleton/Item/SkeletonItem.js +1 -1
- package/lib/esm/components/Skeleton/Skeleton.js +1 -1
- package/lib/esm/components/Skeleton/index.js +1 -1
- package/lib/esm/components/Switch/Switch.js +1 -1
- package/lib/esm/components/Switch/index.js +1 -1
- package/lib/esm/components/Tab/Tab.js +1 -1
- package/lib/esm/components/Tab/index.js +1 -1
- package/lib/esm/components/Tab/styles.js +1 -1
- package/lib/esm/components/TabBar/TabBar.js +1 -1
- package/lib/esm/components/TabBar/index.js +1 -1
- package/lib/esm/components/Tag/Tag.js +2 -2
- package/lib/esm/components/Tag/Tag.js.map +1 -1
- package/lib/esm/components/Tag/index.js +1 -1
- package/lib/esm/components/Text/Text.js +1 -1
- package/lib/esm/components/Text/hooks/cloneContainer.js +1 -1
- package/lib/esm/components/Text/hooks/index.js +1 -1
- package/lib/esm/components/Text/hooks/loadFontFromFile.js +2 -2
- package/lib/esm/components/Text/hooks/loadFontFromFile.js.map +1 -1
- package/lib/esm/components/Text/index.js +1 -1
- package/lib/esm/components/Text/styles.js +1 -1
- package/lib/esm/components/Toast/Toast.js +1 -1
- package/lib/esm/components/Toast/api.js +1 -1
- package/lib/esm/components/Toast/index.js +1 -1
- package/lib/esm/components/Toast/styles.js +1 -1
- package/lib/esm/index.js +247 -28
- package/lib/esm/index.js.map +1 -1
- package/lib/types/components/Alert/Alert.d.ts +4 -0
- package/lib/types/components/Alert/demo/index.d.ts +2 -0
- package/lib/types/components/Alert/index.d.ts +4 -0
- package/lib/types/components/Alert/interface/index.d.ts +35 -0
- package/lib/types/components/Alert/styles.d.ts +108 -0
- package/lib/types/components/Alert/test/index.bench.d.ts +1 -0
- package/lib/types/components/Alert/test/index.test.d.ts +1 -0
- package/lib/types/components/Alert/test/paper.bench.d.ts +1 -0
- package/lib/types/index.d.ts +4 -0
- package/package.json +2 -2
- package/src/components/Alert/Alert.tsx +170 -0
- package/src/components/Alert/demo/index.tsx +234 -0
- package/src/components/Alert/doc/index.mdx +37 -0
- package/src/components/Alert/index.ts +5 -0
- package/src/components/Alert/interface/index.ts +35 -0
- package/src/components/Alert/styles.ts +116 -0
- package/src/components/Alert/test/__snapshots__/index.test.tsx.snap +519 -0
- package/src/components/Alert/test/index.bench.tsx +13 -0
- package/src/components/Alert/test/index.test.tsx +62 -0
- package/src/components/Alert/test/paper.bench.tsx +26 -0
- package/src/index.ts +15 -0
|
@@ -2,167 +2,142 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
require('
|
|
11
|
-
require('
|
|
12
|
-
require('
|
|
13
|
-
require('../../Sheets/Sheets.js');
|
|
14
|
-
require('../../ConfigProvider/hooks/ConfigCache/ConfigCache.js');
|
|
5
|
+
require('../../../_chunks/ShnnCuH9.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('react-native');
|
|
8
|
+
require('./ListContext.js');
|
|
9
|
+
require('../styles.js');
|
|
10
|
+
var components_Alert_Alert = require('../../../index.js');
|
|
11
|
+
require('@xhs/reder-icon-svg');
|
|
12
|
+
require('../../Icon/Icon.js');
|
|
15
13
|
require('@xhsreds/reds-token-next');
|
|
16
|
-
require('../../
|
|
17
|
-
require('../../PickerView/styles.js');
|
|
18
|
-
require('../../Picker/Picker.js');
|
|
19
|
-
require('../../FAB/styles.js');
|
|
20
|
-
require('../../Button/styleMap.js');
|
|
21
|
-
require('../../Portal/core/Portal.js');
|
|
22
|
-
require('../../Portal/core/PortalHost.js');
|
|
23
|
-
require('../../Portal/core/PortalProvider.js');
|
|
24
|
-
var rederIconSvg = require('@xhs/reder-icon-svg');
|
|
25
|
-
var components_Icon_Icon = require('../../Icon/Icon.js');
|
|
26
|
-
require('../../Toast/styles.js');
|
|
27
|
-
require('../../DropDown/DropDown.js');
|
|
28
|
-
require('../../DropDown/DropDownItem.js');
|
|
29
|
-
require('../../Progress/styles.js');
|
|
30
|
-
require('../../TabBar/TabBar.js');
|
|
31
|
-
require('../../NavigationBar/NavigationBar.js');
|
|
32
|
-
require('../../BottomBar/styles.js');
|
|
33
|
-
require('../../Skeleton/Skeleton.js');
|
|
34
|
-
require('../../Skeleton/Item/SkeletonItem.js');
|
|
35
|
-
require('../../ImagePreview/ImagePreview.js');
|
|
36
|
-
require('../../../_chunks/CZJKGXTT.js');
|
|
37
|
-
require('../../Tag/Tag.js');
|
|
38
|
-
require('../../Image/Image.js');
|
|
39
|
-
require('@floating-ui/react-native');
|
|
40
|
-
require('../../Switch/Switch.js');
|
|
41
|
-
require('../../../_chunks/CyggXkdu.js');
|
|
42
|
-
require('../../Collapse/Collapse.js');
|
|
43
|
-
require('../../Collapse/Item/Item.js');
|
|
44
|
-
require('../../Empty/Empty.js');
|
|
45
|
-
require('../../PullRefresh/PullRefresh.js');
|
|
46
|
-
require('../../Badge/styles.js');
|
|
47
|
-
require('../../Tab/Tab.js');
|
|
14
|
+
require('../../ActionSheets/ActionSheets.js');
|
|
48
15
|
require('../../../_chunks/CkkZzOy_.js');
|
|
49
16
|
require('../../ActionSheets/styles.js');
|
|
17
|
+
require('../../ConfigProvider/hooks/ConfigCache/ConfigCache.js');
|
|
50
18
|
require('../../ConfigProvider/hooks/themeToken/useThemeToken.js');
|
|
51
19
|
require('../../ConfigProvider/hooks/ConfigContext/ConfigContext.js');
|
|
20
|
+
require('../../Sheets/Sheets.js');
|
|
52
21
|
require('../../../_chunks/bwo-gq0b.js');
|
|
22
|
+
require('../../Portal/core/Portal.js');
|
|
53
23
|
require('../../Portal/core/hooks/usePortal.js');
|
|
54
24
|
require('../../../_chunks/D__AUDOo.js');
|
|
55
25
|
require('../../Portal/core/PortalContext.js');
|
|
26
|
+
require('../../Portal/core/PortalHost.js');
|
|
56
27
|
require('../../Portal/core/hooks/usePortalState.js');
|
|
28
|
+
require('../../Portal/core/PortalProvider.js');
|
|
57
29
|
require('../../Sheets/styles.js');
|
|
58
30
|
require('../../Button/Button.js');
|
|
59
31
|
require('../../../_chunks/DLNitpMY.js');
|
|
32
|
+
require('../../Button/styleMap.js');
|
|
60
33
|
require('react-native-svg');
|
|
34
|
+
require('../../Silder/Silder.js');
|
|
35
|
+
require('../../../_chunks/RPaDcSae.js');
|
|
61
36
|
require('../../Silder/styles.js');
|
|
37
|
+
require('../../PickerView/PickerView.js');
|
|
38
|
+
require('../../ProgressIndicator/ProgressIndicator.js');
|
|
62
39
|
require('../../../_chunks/CURac1no.js');
|
|
63
40
|
require('../../ProgressIndicator/styles.js');
|
|
64
|
-
require('
|
|
65
|
-
require('../../PickerView/PickerView.js');
|
|
41
|
+
require('../../PickerView/styles.js');
|
|
66
42
|
require('../../PickerView/Wheel.js');
|
|
43
|
+
require('../../../_chunks/eSCREUjn.js');
|
|
44
|
+
require('../../Picker/Picker.js');
|
|
45
|
+
require('../../../_chunks/Yg_qflwI.js');
|
|
46
|
+
require('../../../_chunks/GhFTd1qc.js');
|
|
47
|
+
require('../../FAB/FAB.js');
|
|
48
|
+
require('../../../_chunks/n-0l_8Vg.js');
|
|
49
|
+
require('../../FAB/styles.js');
|
|
67
50
|
require('../../../_chunks/CNyn5hA6.js');
|
|
51
|
+
require('../../Toast/api.js');
|
|
52
|
+
require('../../Toast/Toast.js');
|
|
53
|
+
require('../../Toast/styles.js');
|
|
54
|
+
require('../../DropDown/DropDown.js');
|
|
68
55
|
require('../../../_chunks/CZyDh3_V.js');
|
|
69
56
|
require('../../DropDown/styles.js');
|
|
57
|
+
require('../../Tab/Tab.js');
|
|
70
58
|
require('../../../_chunks/pBR5EzSI.js');
|
|
71
59
|
require('../../Tab/styles.js');
|
|
72
60
|
require('../../Badge/Badge.js');
|
|
73
61
|
require('../../../_chunks/BaUjyNJe.js');
|
|
62
|
+
require('../../Badge/styles.js');
|
|
63
|
+
require('../../DropDown/DropDownItem.js');
|
|
64
|
+
require('../../Progress/Progress.js');
|
|
65
|
+
require('../../../_chunks/Bd5MIuUO.js');
|
|
66
|
+
require('../../Progress/styles.js');
|
|
67
|
+
require('../../TabBar/TabBar.js');
|
|
74
68
|
require('../../../_chunks/K-GkcnsQ.js');
|
|
75
69
|
require('../../TabBar/styles.js');
|
|
70
|
+
require('../../NavigationBar/NavigationBar.js');
|
|
76
71
|
require('../../../_chunks/Be1JHoiq.js');
|
|
77
72
|
require('../../NavigationBar/styles.js');
|
|
73
|
+
require('../../BottomBar/BottomBar.js');
|
|
74
|
+
require('../../../_chunks/MGxIl7pN.js');
|
|
75
|
+
require('../../BottomBar/styles.js');
|
|
76
|
+
require('../List.js');
|
|
77
|
+
require('../../../_chunks/CtmwdFx9.js');
|
|
78
|
+
require('../../Skeleton/Skeleton.js');
|
|
78
79
|
require('../../../_chunks/DC7LGH1r.js');
|
|
79
|
-
require('../../Skeleton/
|
|
80
|
+
require('../../Skeleton/Item/SkeletonItem.js');
|
|
80
81
|
require('../../../_chunks/B3WekeU5.js');
|
|
81
82
|
require('../../Skeleton/Item/styles.js');
|
|
83
|
+
require('../../Skeleton/styles.js');
|
|
84
|
+
require('../../../_chunks/CZJKGXTT.js');
|
|
82
85
|
require('../../ImagePreview/ImageViewer.js');
|
|
83
86
|
require('../../ImagePreview/Gesture/useGesture.js');
|
|
84
87
|
require('../../ImagePreview/Gesture/Pinch.js');
|
|
85
88
|
require('../../ImagePreview/Gesture/Pan.js');
|
|
86
89
|
require('../../ImagePreview/Gesture/Tap.js');
|
|
87
|
-
require('
|
|
90
|
+
require('../../Image/Image.js');
|
|
88
91
|
require('../../../_chunks/zrKJYx9X.js');
|
|
89
92
|
require('../../Image/styles.js');
|
|
90
93
|
require('../../Image/hook/index.js');
|
|
91
94
|
require('../../Image/CircularProgress.js');
|
|
95
|
+
require('../../Divider/Divider.js');
|
|
96
|
+
require('../../../_chunks/CY-sysEj.js');
|
|
97
|
+
require('../../Divider/styles.js');
|
|
98
|
+
require('../../Tag/Tag.js');
|
|
99
|
+
require('../../../_chunks/CH-nghLh.js');
|
|
100
|
+
require('../../Popover/Popover.js');
|
|
101
|
+
require('../../Popover/component.js');
|
|
102
|
+
require('../../Popover/hook.js');
|
|
103
|
+
require('@floating-ui/react-native');
|
|
104
|
+
require('../../../_chunks/C6L8nidD.js');
|
|
105
|
+
require('../../Switch/Switch.js');
|
|
106
|
+
require('../../../_chunks/CyggXkdu.js');
|
|
92
107
|
require('../../Switch/styles.js');
|
|
108
|
+
require('../../ConfigProvider/ConfigProvider.js');
|
|
109
|
+
require('../../../_chunks/C61-qTj5.js');
|
|
110
|
+
require('../../Text/Text.js');
|
|
111
|
+
require('../../Text/hooks/cloneContainer.js');
|
|
112
|
+
require('../../Text/hooks/getRenderText.js');
|
|
113
|
+
require('../../Text/hooks/nativeEmojiMap/android.js');
|
|
114
|
+
require('../../Text/hooks/nativeEmojiMap/ios.js');
|
|
115
|
+
require('../../Text/styles.js');
|
|
116
|
+
require('../../../_chunks/y2LtPP5n.js');
|
|
117
|
+
require('../../Collapse/Collapse.js');
|
|
93
118
|
require('../../Collapse/interface/index.js');
|
|
94
119
|
require('../../Collapse/hooks/useCollapseContext.js');
|
|
120
|
+
require('../../Collapse/Item/Item.js');
|
|
95
121
|
require('../../Collapse/Item/interface/index.js');
|
|
96
122
|
require('../../Collapse/Item/styles.js');
|
|
123
|
+
require('../../Empty/Empty.js');
|
|
97
124
|
require('../../../_chunks/8GiEQzJI.js');
|
|
98
125
|
require('../../Empty/styles.js');
|
|
126
|
+
require('../../Result/Result.js');
|
|
127
|
+
require('../../../_chunks/DOAnQxcP.js');
|
|
128
|
+
require('../../Result/styles.js');
|
|
129
|
+
require('../../Result/hooks/useDefaultIcon.js');
|
|
130
|
+
require('../../PullRefresh/PullRefresh.js');
|
|
99
131
|
require('../../../_chunks/DHiiOK0R.js');
|
|
100
132
|
require('../../PullRefresh/component.js');
|
|
133
|
+
require('../../../_chunks/DqjhMaAy.js');
|
|
134
|
+
require('../../Avatar/Avatar.js');
|
|
135
|
+
require('../../../_chunks/Cf7jn6zq.js');
|
|
136
|
+
require('../../Avatar/styles.js');
|
|
137
|
+
require('../../../_chunks/AzJLzRe4.js');
|
|
138
|
+
require('../../Alert/styles.js');
|
|
139
|
+
|
|
101
140
|
|
|
102
|
-
var ListItem = function ListItem(_ref) {
|
|
103
|
-
var title = _ref.title,
|
|
104
|
-
subtitle = _ref.subtitle,
|
|
105
|
-
actionText = _ref.actionText,
|
|
106
|
-
_ref$size = _ref.size,
|
|
107
|
-
size = _ref$size === void 0 ? "regular" : _ref$size,
|
|
108
|
-
_ref$arrow = _ref.arrow,
|
|
109
|
-
arrow = _ref$arrow === void 0 ? false : _ref$arrow,
|
|
110
|
-
prefix = _ref.prefix,
|
|
111
|
-
action = _ref.action;
|
|
112
|
-
var _useListContext = components_List_ListItem_ListContext.useListContext(),
|
|
113
|
-
registerChild = _useListContext.registerChild,
|
|
114
|
-
unregisterChild = _useListContext.unregisterChild;
|
|
115
|
-
var _useState = React.useState(false),
|
|
116
|
-
_useState2 = _rollupPluginBabelHelpers._slicedToArray(_useState, 2),
|
|
117
|
-
lineItem = _useState2[0],
|
|
118
|
-
setLineItem = _useState2[1];
|
|
119
|
-
var childInfo = {
|
|
120
|
-
setLine: function setLine(value) {
|
|
121
|
-
return setLineItem(value);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
React.useEffect(function () {
|
|
125
|
-
registerChild(childInfo);
|
|
126
|
-
return function () {
|
|
127
|
-
return unregisterChild(childInfo);
|
|
128
|
-
};
|
|
129
|
-
}, []);
|
|
130
|
-
var listItemSizeToHeight = {
|
|
131
|
-
regular: 48,
|
|
132
|
-
expand: 60
|
|
133
|
-
};
|
|
134
|
-
return /* @__PURE__ */React.createElement(reactNative.View, {
|
|
135
|
-
style: [components_List_styles.default.listItem, {
|
|
136
|
-
height: listItemSizeToHeight[size]
|
|
137
|
-
}, size === "expand" && components_List_styles.default.expand]
|
|
138
|
-
}, prefix && /* @__PURE__ */React.createElement(reactNative.View, {
|
|
139
|
-
style: components_List_styles.default.prefix
|
|
140
|
-
}, prefix), /* @__PURE__ */React.createElement(reactNative.View, {
|
|
141
|
-
style: components_List_styles.default.contentBox
|
|
142
|
-
}, /* @__PURE__ */React.createElement(reactNative.View, {
|
|
143
|
-
style: components_List_styles.default.contentContainer
|
|
144
|
-
}, /* @__PURE__ */React.createElement(reactNative.View, {
|
|
145
|
-
style: components_List_styles.default.textContainer
|
|
146
|
-
}, /* @__PURE__ */React.createElement(reactNative.Text, {
|
|
147
|
-
style: components_List_styles.default.title
|
|
148
|
-
}, title), size === "expand" && subtitle && /* @__PURE__ */React.createElement(reactNative.Text, {
|
|
149
|
-
style: components_List_styles.default.subtitle
|
|
150
|
-
}, subtitle)), /* @__PURE__ */React.createElement(reactNative.View, {
|
|
151
|
-
style: components_List_styles.default.tailContainer
|
|
152
|
-
}, action ? /* @__PURE__ */React.createElement(reactNative.View, {
|
|
153
|
-
style: components_List_styles.default.tail
|
|
154
|
-
}, action) : /* @__PURE__ */React.createElement(reactNative.View, {
|
|
155
|
-
style: components_List_styles.default.tail
|
|
156
|
-
}, /* @__PURE__ */React.createElement(reactNative.Text, {
|
|
157
|
-
style: components_List_styles.default.tailText
|
|
158
|
-
}, actionText), arrow && /* @__PURE__ */React.createElement(components_Icon_Icon.default, {
|
|
159
|
-
size: 18,
|
|
160
|
-
fill: "rgba(0, 0, 0, 0.27)",
|
|
161
|
-
icon: rederIconSvg.ArrowRight
|
|
162
|
-
})))), lineItem && /* @__PURE__ */React.createElement(reactNative.View, {
|
|
163
|
-
style: components_List_styles.default.hr
|
|
164
|
-
})));
|
|
165
|
-
};
|
|
166
141
|
|
|
167
|
-
exports.default = ListItem;
|
|
142
|
+
exports.default = components_Alert_Alert.ListItem;
|
|
168
143
|
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sources":[
|
|
1
|
+
{"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,17 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var components_List_List = require('./List.js');
|
|
6
6
|
var components_List_interface_index = require('../../_chunks/CtmwdFx9.js');
|
|
7
|
-
var
|
|
7
|
+
var components_Alert_Alert = require('../../index.js');
|
|
8
8
|
require('react');
|
|
9
9
|
require('react-native');
|
|
10
10
|
require('./ListItem/ListContext.js');
|
|
11
11
|
require('./styles.js');
|
|
12
12
|
require('@xhsreds/reds-token-next');
|
|
13
|
-
require('../../_chunks/ShnnCuH9.js');
|
|
14
13
|
require('../ActionSheets/ActionSheets.js');
|
|
15
14
|
require('../../_chunks/CkkZzOy_.js');
|
|
16
15
|
require('../ActionSheets/styles.js');
|
|
17
16
|
require('../ConfigProvider/hooks/ConfigCache/ConfigCache.js');
|
|
17
|
+
require('../../_chunks/ShnnCuH9.js');
|
|
18
18
|
require('../ConfigProvider/hooks/themeToken/useThemeToken.js');
|
|
19
19
|
require('../ConfigProvider/hooks/ConfigContext/ConfigContext.js');
|
|
20
20
|
require('../Sheets/Sheets.js');
|
|
@@ -36,17 +36,23 @@ require('@xhs/reder-icon-svg');
|
|
|
36
36
|
require('../Silder/Silder.js');
|
|
37
37
|
require('../../_chunks/RPaDcSae.js');
|
|
38
38
|
require('../Silder/styles.js');
|
|
39
|
+
require('../PickerView/PickerView.js');
|
|
39
40
|
require('../ProgressIndicator/ProgressIndicator.js');
|
|
40
41
|
require('../../_chunks/CURac1no.js');
|
|
41
42
|
require('../ProgressIndicator/styles.js');
|
|
42
43
|
require('../PickerView/styles.js');
|
|
44
|
+
require('../PickerView/Wheel.js');
|
|
45
|
+
require('../../_chunks/eSCREUjn.js');
|
|
43
46
|
require('../Picker/Picker.js');
|
|
44
47
|
require('../../_chunks/Yg_qflwI.js');
|
|
45
|
-
require('
|
|
46
|
-
require('../
|
|
48
|
+
require('../../_chunks/GhFTd1qc.js');
|
|
49
|
+
require('../FAB/FAB.js');
|
|
50
|
+
require('../../_chunks/n-0l_8Vg.js');
|
|
47
51
|
require('../FAB/styles.js');
|
|
48
|
-
require('../Toast/styles.js');
|
|
49
52
|
require('../../_chunks/CNyn5hA6.js');
|
|
53
|
+
require('../Toast/api.js');
|
|
54
|
+
require('../Toast/Toast.js');
|
|
55
|
+
require('../Toast/styles.js');
|
|
50
56
|
require('../DropDown/DropDown.js');
|
|
51
57
|
require('../../_chunks/CZyDh3_V.js');
|
|
52
58
|
require('../DropDown/styles.js');
|
|
@@ -57,6 +63,8 @@ require('../Badge/Badge.js');
|
|
|
57
63
|
require('../../_chunks/BaUjyNJe.js');
|
|
58
64
|
require('../Badge/styles.js');
|
|
59
65
|
require('../DropDown/DropDownItem.js');
|
|
66
|
+
require('../Progress/Progress.js');
|
|
67
|
+
require('../../_chunks/Bd5MIuUO.js');
|
|
60
68
|
require('../Progress/styles.js');
|
|
61
69
|
require('../TabBar/TabBar.js');
|
|
62
70
|
require('../../_chunks/K-GkcnsQ.js');
|
|
@@ -64,6 +72,8 @@ require('../TabBar/styles.js');
|
|
|
64
72
|
require('../NavigationBar/NavigationBar.js');
|
|
65
73
|
require('../../_chunks/Be1JHoiq.js');
|
|
66
74
|
require('../NavigationBar/styles.js');
|
|
75
|
+
require('../BottomBar/BottomBar.js');
|
|
76
|
+
require('../../_chunks/MGxIl7pN.js');
|
|
67
77
|
require('../BottomBar/styles.js');
|
|
68
78
|
require('../Skeleton/Skeleton.js');
|
|
69
79
|
require('../../_chunks/DC7LGH1r.js');
|
|
@@ -71,24 +81,39 @@ require('../Skeleton/Item/SkeletonItem.js');
|
|
|
71
81
|
require('../../_chunks/B3WekeU5.js');
|
|
72
82
|
require('../Skeleton/Item/styles.js');
|
|
73
83
|
require('../Skeleton/styles.js');
|
|
74
|
-
require('../ImagePreview/ImagePreview.js');
|
|
75
84
|
require('../../_chunks/CZJKGXTT.js');
|
|
76
85
|
require('../ImagePreview/ImageViewer.js');
|
|
77
86
|
require('../ImagePreview/Gesture/useGesture.js');
|
|
78
87
|
require('../ImagePreview/Gesture/Pinch.js');
|
|
79
88
|
require('../ImagePreview/Gesture/Pan.js');
|
|
80
89
|
require('../ImagePreview/Gesture/Tap.js');
|
|
81
|
-
require('../Tag/Tag.js');
|
|
82
|
-
require('../../_chunks/CH-nghLh.js');
|
|
83
90
|
require('../Image/Image.js');
|
|
84
91
|
require('../../_chunks/zrKJYx9X.js');
|
|
85
92
|
require('../Image/styles.js');
|
|
86
93
|
require('../Image/hook/index.js');
|
|
87
94
|
require('../Image/CircularProgress.js');
|
|
95
|
+
require('../Divider/Divider.js');
|
|
96
|
+
require('../../_chunks/CY-sysEj.js');
|
|
97
|
+
require('../Divider/styles.js');
|
|
98
|
+
require('../Tag/Tag.js');
|
|
99
|
+
require('../../_chunks/CH-nghLh.js');
|
|
100
|
+
require('../Popover/Popover.js');
|
|
101
|
+
require('../Popover/component.js');
|
|
102
|
+
require('../Popover/hook.js');
|
|
88
103
|
require('@floating-ui/react-native');
|
|
104
|
+
require('../../_chunks/C6L8nidD.js');
|
|
89
105
|
require('../Switch/Switch.js');
|
|
90
106
|
require('../../_chunks/CyggXkdu.js');
|
|
91
107
|
require('../Switch/styles.js');
|
|
108
|
+
require('../ConfigProvider/ConfigProvider.js');
|
|
109
|
+
require('../../_chunks/C61-qTj5.js');
|
|
110
|
+
require('../Text/Text.js');
|
|
111
|
+
require('../Text/hooks/cloneContainer.js');
|
|
112
|
+
require('../Text/hooks/getRenderText.js');
|
|
113
|
+
require('../Text/hooks/nativeEmojiMap/android.js');
|
|
114
|
+
require('../Text/hooks/nativeEmojiMap/ios.js');
|
|
115
|
+
require('../Text/styles.js');
|
|
116
|
+
require('../../_chunks/y2LtPP5n.js');
|
|
92
117
|
require('../Collapse/Collapse.js');
|
|
93
118
|
require('../Collapse/interface/index.js');
|
|
94
119
|
require('../Collapse/hooks/useCollapseContext.js');
|
|
@@ -98,14 +123,24 @@ require('../Collapse/Item/styles.js');
|
|
|
98
123
|
require('../Empty/Empty.js');
|
|
99
124
|
require('../../_chunks/8GiEQzJI.js');
|
|
100
125
|
require('../Empty/styles.js');
|
|
126
|
+
require('../Result/Result.js');
|
|
127
|
+
require('../../_chunks/DOAnQxcP.js');
|
|
128
|
+
require('../Result/styles.js');
|
|
129
|
+
require('../Result/hooks/useDefaultIcon.js');
|
|
101
130
|
require('../PullRefresh/PullRefresh.js');
|
|
102
131
|
require('../../_chunks/DHiiOK0R.js');
|
|
103
132
|
require('../PullRefresh/component.js');
|
|
133
|
+
require('../../_chunks/DqjhMaAy.js');
|
|
134
|
+
require('../Avatar/Avatar.js');
|
|
135
|
+
require('../../_chunks/Cf7jn6zq.js');
|
|
136
|
+
require('../Avatar/styles.js');
|
|
137
|
+
require('../../_chunks/AzJLzRe4.js');
|
|
138
|
+
require('../Alert/styles.js');
|
|
104
139
|
|
|
105
140
|
|
|
106
141
|
|
|
107
142
|
exports.List = components_List_List.default;
|
|
108
143
|
exports.default = components_List_List.default;
|
|
109
144
|
exports.ListType = components_List_interface_index.index;
|
|
110
|
-
exports.ListItem =
|
|
145
|
+
exports.ListItem = components_Alert_Alert.ListItem;
|
|
111
146
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -85,7 +85,7 @@ var shapeStyles = {
|
|
|
85
85
|
borderBottomLeftRadius: 0
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
var Tag = /*#__PURE__*/React.memo(
|
|
88
|
+
var Tag = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
89
89
|
var content = props.content,
|
|
90
90
|
_props$type = props.type,
|
|
91
91
|
type = _props$type === void 0 ? components_Tag_interface_index.TagDefaultProps.type : _props$type,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React, { useState, useMemo, useImperativeHandle, forwardRef, memo, FunctionComponent } from \"react\";\nimport { View, Text, StyleSheet, GestureResponderEvent, TouchableNativeFeedback } from \"react-native\";\nimport { RedsTag, TagDefaultProps } from \"./interface\";\nimport { lightColor, typography, alwaysColor } from \"@xhsreds/reds-token-next\";\n\nconst typeStyles = {\n primary: {\n backgroundColor: lightColor.Primary2,\n color: lightColor.Primary,\n borderColor: lightColor.Primary,\n },\n default: {\n backgroundColor: lightColor.Fill1,\n color: lightColor.Paragraph,\n borderColor: lightColor.Separator2,\n },\n warning: {\n backgroundColor: lightColor.Warning2,\n color: lightColor.Warning,\n borderColor: lightColor.Warning,\n },\n success: {\n backgroundColor: lightColor.Success2,\n color: lightColor.Success,\n borderColor: lightColor.Success,\n },\n info: {\n backgroundColor: lightColor.Info2,\n color: lightColor.Info,\n borderColor: lightColor.Info,\n },\n ghost: {\n backgroundColor: alwaysColor.Black,\n color: alwaysColor.White,\n borderColor: alwaysColor.LightTitle,\n },\n};\n\nconst sizeStyles: { [key: string]: any } = {\n mini: {\n fontSize: typography.C3FontSize,\n lineHeight: 16,\n height: 16,\n paddingHorizontal: 4,\n paddingVertical: 0,\n borderRadius: 4,\n },\n small: {\n fontSize: typography.C3FontSize,\n lineHeight: 20,\n height: 20,\n paddingHorizontal: 6,\n paddingVertical: 0,\n borderRadius: 4,\n },\n medium: {\n fontSize: typography.C2FontSize,\n lineHeight: 28,\n height: 28,\n paddingHorizontal: 10,\n paddingVertical: 0,\n borderRadius: 6,\n },\n large: {\n fontSize: typography.B2FontSize,\n lineHeight: 36,\n height: 36,\n paddingHorizontal: 16,\n paddingVertical: 0,\n borderRadius: 6,\n },\n};\n\nconst shapeStyles: { [key: string]: any } = {\n square: {},\n round: { borderRadius: 999 },\n mark: { borderRadius: 999, borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },\n};\n\nconst Tag: FunctionComponent<RedsTag> = memo(\n forwardRef((props: RedsTag, ref) => {\n const {\n content,\n type = TagDefaultProps.type,\n size = TagDefaultProps.size,\n plain = TagDefaultProps.plain,\n borderRadius,\n disabled = TagDefaultProps.disabled,\n shape = TagDefaultProps.shape,\n closeabled = TagDefaultProps.closeabled,\n icon,\n afterIcon,\n closeIcon,\n onClose,\n children,\n } = props;\n\n const [visible, setVisible] = useState<boolean>(true);\n\n useImperativeHandle(ref, () => ({\n setVisible,\n }));\n\n const tagStyle = useMemo(() => {\n const style: any = {\n fontWeight: typography.C3FontWeight,\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n userSelect: \"none\",\n opacity: disabled ? 0.5 : 1,\n alignSelf: \"flex-start\",\n flexShrink: 0,\n flexDirection: \"row\",\n paddingVertical: 0,\n includeFontPadding: false,\n };\n if (type) {\n const currentType = type as keyof typeof typeStyles;\n Object.assign(\n style,\n plain\n ? {\n backgroundColor: \"transparent\",\n borderColor: typeStyles[currentType].borderColor,\n color: typeStyles[currentType].color,\n }\n : {\n backgroundColor: typeStyles[currentType].backgroundColor,\n borderColor: \"transparent\",\n color: typeStyles[currentType].color,\n },\n );\n }\n\n if (size) {\n Object.assign(style, sizeStyles[size]);\n }\n\n if (borderRadius) {\n style.borderRadius = borderRadius;\n } else if (shape) {\n Object.assign(style, shapeStyles[shape]);\n }\n\n return style;\n }, [type, size, plain, borderRadius, shape, disabled]);\n\n const textStyle = useMemo(() => {\n return {\n color: type ? typeStyles[type as keyof typeof typeStyles].color : undefined,\n includeFontPadding: false,\n lineHeight: sizeStyles[size].lineHeight,\n height: sizeStyles[size].height,\n textAlignVertical: \"center\" as \"center\",\n paddingVertical: 0,\n };\n }, [type, size]);\n\n const handleClose = (event: GestureResponderEvent) => {\n if (!disabled) {\n setVisible(false);\n onClose && onClose(event);\n }\n };\n\n if (!visible) return null;\n\n return (\n <View style={[styles.tag, tagStyle]}>\n <TouchableNativeFeedback disabled={disabled}>\n <View style={{ flexDirection: \"row\", alignItems: \"center\" }}>\n {icon && <View style={{ marginRight: 3 }}>{icon}</View>}\n {!content ? (\n <Text style={textStyle}>{children}</Text>\n ) : (\n <Text style={textStyle}>{typeof content === \"function\" ? content({}) : content}</Text>\n )}\n {afterIcon && <View style={{ marginLeft: 3 }}>{afterIcon}</View>}\n </View>\n </TouchableNativeFeedback>\n {closeabled && (\n <TouchableNativeFeedback onPress={handleClose} style={{ marginLeft: 3 }}>\n {closeIcon}\n </TouchableNativeFeedback>\n )}\n </View>\n );\n }),\n);\n\nconst styles = StyleSheet.create({\n tag: {\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n paddingHorizontal: 10,\n flexDirection: \"row\",\n },\n});\n\nexport default Tag;\n"],"names":["typeStyles","primary","backgroundColor","lightColor","Primary2","color","Primary","borderColor","Fill1","Paragraph","Separator2","warning","Warning2","Warning","success","Success2","Success","info","Info2","Info","ghost","alwaysColor","Black","White","LightTitle","sizeStyles","mini","fontSize","typography","C3FontSize","lineHeight","height","paddingHorizontal","paddingVertical","borderRadius","small","medium","C2FontSize","large","B2FontSize","shapeStyles","square","round","mark","borderTopLeftRadius","borderBottomLeftRadius","Tag","memo","forwardRef","props","ref","content","_props$type","type","TagDefaultProps","_props$size","size","_props$plain","plain","_props$disabled","disabled","_props$shape","shape","_props$closeabled","closeabled","icon","afterIcon","closeIcon","onClose","children","_useState","useState","_useState2","_slicedToArray","visible","setVisible","useImperativeHandle","tagStyle","useMemo","style","fontWeight","C3FontWeight","alignItems","justifyContent","borderWidth","cursor","userSelect","opacity","alignSelf","flexShrink","flexDirection","includeFontPadding","currentType","Object","assign","textStyle","textAlignVertical","handleClose","event","React","createElement","View","styles","tag","TouchableNativeFeedback","marginRight","Text","marginLeft","onPress","StyleSheet","create"],"mappings":";;;;;;;;;;AAKA,IAAMA,UAAa,GAAA;AACjBC,EAAAA,OAAS,EAAA;IACPC,iBAAiBC,wBAAW,CAAAC,QAAA;IAC5BC,OAAOF,wBAAW,CAAAG,OAAA;IAClBC,aAAaJ,wBAAW,CAAAG,OAAAA;GAC1B;EACA,SAAS,EAAA;IACPJ,iBAAiBC,wBAAW,CAAAK,KAAA;IAC5BH,OAAOF,wBAAW,CAAAM,SAAA;IAClBF,aAAaJ,wBAAW,CAAAO,UAAAA;GAC1B;AACAC,EAAAA,OAAS,EAAA;IACPT,iBAAiBC,wBAAW,CAAAS,QAAA;IA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AIA,OAAQ,CAAA,EAEhFe,SAAa,mBAAAiC,KAAA,CAAAC,aAAA,CAACC;AAAKtB,IAAAA,KAAO,EAAA;AAAE4B,MAAAA,UAAY,EAAA,CAAA;AAAE,KAAA;KAAIzC,SAAU,CAC3D,CACF,CAAA,EACCF,6BACEmC,KAAA,CAAAC,aAAA,CAAAI,mCAAA,EAAA;AAAwBI,IAAAA,OAAS,EAAAX,WAAA;AAAalB,IAAAA,OAAO;AAAE4B,MAAAA,UAAA,EAAY,CAAA;AAAE,KAAA;GAAA,EACnExC,SACH,CAEJ,CAAA,CAAA;AAEJ,CAAC,CACH,EAAA;AAEA,IAAMmC,MAAA,GAASO,uBAAWC,MAAO,CAAA;AAC/BP,EAAAA,GAAK,EAAA;AACHrB,IAAAA,UAAY,EAAA,QAAA;AACZC,IAAAA,cAAgB,EAAA,QAAA;AAChBC,IAAAA,WAAa,EAAA,GAAA;AACb7E,IAAAA,WAAa,EAAA,aAAA;AACbyB,IAAAA,iBAAmB,EAAA,EAAA;AACnB0D,IAAAA,aAAe,EAAA,KAAA;AACjB,GAAA;AACF,CAAC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React, { useState, useMemo, useImperativeHandle, forwardRef, memo, FunctionComponent } from \"react\";\nimport { View, Text, StyleSheet, GestureResponderEvent, TouchableNativeFeedback } from \"react-native\";\nimport { RedsTag, TagDefaultProps } from \"./interface\";\nimport { lightColor, typography, alwaysColor } from \"@xhsreds/reds-token-next\";\n\nconst typeStyles = {\n primary: {\n backgroundColor: lightColor.Primary2,\n color: lightColor.Primary,\n borderColor: lightColor.Primary,\n },\n default: {\n backgroundColor: lightColor.Fill1,\n color: lightColor.Paragraph,\n borderColor: lightColor.Separator2,\n },\n warning: {\n backgroundColor: lightColor.Warning2,\n color: lightColor.Warning,\n borderColor: lightColor.Warning,\n },\n success: {\n backgroundColor: lightColor.Success2,\n color: lightColor.Success,\n borderColor: lightColor.Success,\n },\n info: {\n backgroundColor: lightColor.Info2,\n color: lightColor.Info,\n borderColor: lightColor.Info,\n },\n ghost: {\n backgroundColor: alwaysColor.Black,\n color: alwaysColor.White,\n borderColor: alwaysColor.LightTitle,\n },\n};\n\nconst sizeStyles: { [key: string]: any } = {\n mini: {\n fontSize: typography.C3FontSize,\n lineHeight: 16,\n height: 16,\n paddingHorizontal: 4,\n paddingVertical: 0,\n borderRadius: 4,\n },\n small: {\n fontSize: typography.C3FontSize,\n lineHeight: 20,\n height: 20,\n paddingHorizontal: 6,\n paddingVertical: 0,\n borderRadius: 4,\n },\n medium: {\n fontSize: typography.C2FontSize,\n lineHeight: 28,\n height: 28,\n paddingHorizontal: 10,\n paddingVertical: 0,\n borderRadius: 6,\n },\n large: {\n fontSize: typography.B2FontSize,\n lineHeight: 36,\n height: 36,\n paddingHorizontal: 16,\n paddingVertical: 0,\n borderRadius: 6,\n },\n};\n\nconst shapeStyles: { [key: string]: any } = {\n square: {},\n round: { borderRadius: 999 },\n mark: { borderRadius: 999, borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },\n};\n\nconst Tag: FunctionComponent<RedsTag> = memo(\n forwardRef((props: RedsTag, ref) => {\n const {\n content,\n type = TagDefaultProps.type,\n size = TagDefaultProps.size,\n plain = TagDefaultProps.plain,\n borderRadius,\n disabled = TagDefaultProps.disabled,\n shape = TagDefaultProps.shape,\n closeabled = TagDefaultProps.closeabled,\n icon,\n afterIcon,\n closeIcon,\n onClose,\n children,\n } = props;\n\n const [visible, setVisible] = useState<boolean>(true);\n\n useImperativeHandle(ref, () => ({\n setVisible,\n }));\n\n const tagStyle = useMemo(() => {\n const style: any = {\n fontWeight: typography.C3FontWeight,\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n userSelect: \"none\",\n opacity: disabled ? 0.5 : 1,\n alignSelf: \"flex-start\",\n flexShrink: 0,\n flexDirection: \"row\",\n paddingVertical: 0,\n includeFontPadding: false,\n };\n if (type) {\n const currentType = type as keyof typeof typeStyles;\n Object.assign(\n style,\n plain\n ? {\n backgroundColor: \"transparent\",\n borderColor: typeStyles[currentType].borderColor,\n color: typeStyles[currentType].color,\n }\n : {\n backgroundColor: typeStyles[currentType].backgroundColor,\n borderColor: \"transparent\",\n color: typeStyles[currentType].color,\n },\n );\n }\n\n if (size) {\n Object.assign(style, sizeStyles[size]);\n }\n\n if (borderRadius) {\n style.borderRadius = borderRadius;\n } else if (shape) {\n Object.assign(style, shapeStyles[shape]);\n }\n\n return style;\n }, [type, size, plain, borderRadius, shape, disabled]);\n\n const textStyle = useMemo(() => {\n return {\n color: type ? typeStyles[type as keyof typeof typeStyles].color : undefined,\n includeFontPadding: false,\n lineHeight: sizeStyles[size].lineHeight,\n height: sizeStyles[size].height,\n textAlignVertical: \"center\" as \"center\",\n paddingVertical: 0,\n };\n }, [type, size]);\n\n const handleClose = (event: GestureResponderEvent) => {\n if (!disabled) {\n setVisible(false);\n onClose && onClose(event);\n }\n };\n\n if (!visible) return null;\n\n return (\n <View style={[styles.tag, tagStyle]}>\n <TouchableNativeFeedback disabled={disabled}>\n <View style={{ flexDirection: \"row\", alignItems: \"center\" }}>\n {icon && <View style={{ marginRight: 3 }}>{icon}</View>}\n {!content ? (\n <Text style={textStyle}>{children}</Text>\n ) : (\n <Text style={textStyle}>{typeof content === \"function\" ? content({}) : content}</Text>\n )}\n {afterIcon && <View style={{ marginLeft: 3 }}>{afterIcon}</View>}\n </View>\n </TouchableNativeFeedback>\n {closeabled && (\n <TouchableNativeFeedback onPress={handleClose} style={{ marginLeft: 3 }}>\n {closeIcon}\n </TouchableNativeFeedback>\n )}\n </View>\n );\n }),\n);\n\nconst styles = StyleSheet.create({\n tag: {\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 0.5,\n borderColor: \"transparent\",\n paddingHorizontal: 10,\n flexDirection: \"row\",\n },\n});\n\nexport default Tag;\n"],"names":["typeStyles","primary","backgroundColor","lightColor","Primary2","color","Primary","borderColor","Fill1","Paragraph","Separator2","warning","Warning2","Warning","success","Success2","Success","info","Info2","Info","ghost","alwaysColor","Black","White","LightTitle","sizeStyles","mini","fontSize","typography","C3FontSize","lineHeight","height","paddingHorizontal","paddingVertical","borderRadius","small","medium","C2FontSize","large","B2FontSize","shapeStyles","square","round","mark","borderTopLeftRadius","borderBottomLeftRadius","Tag","memo","forwardRef","props","ref","content","_props$type","type","TagDefaultProps","_props$size","size","_props$plain","plain","_props$disabled","disabled","_props$shape","shape","_props$closeabled","closeabled","icon","afterIcon","closeIcon","onClose","children","_useState","useState","_useState2","_slicedToArray","visible","setVisible","useImperativeHandle","tagStyle","useMemo","style","fontWeight","C3FontWeight","alignItems","justifyContent","borderWidth","cursor","userSelect","opacity","alignSelf","flexShrink","flexDirection","includeFontPadding","currentType","Object","assign","textStyle","textAlignVertical","handleClose","event","React","createElement","View","styles","tag","TouchableNativeFeedback","marginRight","Text","marginLeft","onPress","StyleSheet","create"],"mappings":";;;;;;;;;;AAKA,IAAMA,UAAa,GAAA;AACjBC,EAAAA,OAAS,EAAA;IACPC,iBAAiBC,wBAAW,CAAAC,QAAA;IAC5BC,OAAOF,wBAAW,CAAAG,OAAA;IAClBC,aAAaJ,wBAAW,CAAAG,OAAAA;GAC1B;EACA,SAAS,EAAA;IACPJ,iBAAiBC,wBAAW,CAAAK,KAAA;IAC5BH,OAAOF,wBAAW,CAAAM,SAAA;IAClBF,aAAaJ,wBAAW,CAAAO,UAAAA;GAC1B;AACAC,EAAAA,OAAS,EAAA;IACPT,iBAAiBC,wBAAW,CAAAS,QAAA;IAC5BP,OAAOF,wBAAW,CAAAU,OAAA;IAClBN,aAAaJ,wBAAW,CAAAU,OAAAA;GAC1B;AACAC,EAAAA,OAAS,EAAA;IACPZ,iBAAiBC,wBAAW,CAAAY,QAAA;IAC5BV,OAAOF,wBAAW,CAAAa,OAAA;IAClBT,aAAaJ,wBAAW,CAAA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A,CAAAI,mCAAA,EAAA;AAAwBI,IAAAA,OAAS,EAAAX,WAAA;AAAalB,IAAAA,OAAO;AAAE4B,MAAAA,UAAA,EAAY,CAAA;AAAE,KAAA;GAAA,EACnExC,SACH,CAEJ,CAAA,CAAA;AAEJ,CAAC,CACH,EAAA;AAEA,IAAMmC,MAAA,GAASO,uBAAWC,MAAO,CAAA;AAC/BP,EAAAA,GAAK,EAAA;AACHrB,IAAAA,UAAY,EAAA,QAAA;AACZC,IAAAA,cAAgB,EAAA,QAAA;AAChBC,IAAAA,WAAa,EAAA,GAAA;AACb7E,IAAAA,WAAa,EAAA,aAAA;AACbyB,IAAAA,iBAAmB,EAAA,EAAA;AACnB0D,IAAAA,aAAe,EAAA,KAAA;AACjB,GAAA;AACF,CAAC,CAAA;;;;"}
|
|
@@ -4,7 +4,7 @@ var _rollupPluginBabelHelpers = require('../../../_chunks/ShnnCuH9.js');
|
|
|
4
4
|
var reactNative = require('react-native');
|
|
5
5
|
|
|
6
6
|
var loadFontFromFile = /*#__PURE__*/function () {
|
|
7
|
-
var _ref = _rollupPluginBabelHelpers._asyncToGenerator(
|
|
7
|
+
var _ref = _rollupPluginBabelHelpers._asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(fontFile, fontName) {
|
|
8
8
|
var testEnv,
|
|
9
9
|
_NativeModules$ReactJ,
|
|
10
10
|
_args = arguments;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadFontFromFile.js","sources":["../../../../../src/components/Text/hooks/loadFontFromFile.ts"],"sourcesContent":["import React from \"react\";\nimport { NativeModules } from \"react-native\";\n\nexport const loadFontFromFile = async (fontFile: any, fontName: string, testEnv: boolean = false): Promise<boolean> => {\n try {\n await NativeModules.ReactJSBridge[\"loadFontFromFile\"](...[fontFile, fontName]);\n } catch {\n if (!testEnv) {\n return false;\n }\n }\n return true;\n};\n"],"names":["loadFontFromFile","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fontFile","fontName","testEnv","_NativeModules$ReactJ","_args","arguments","wrap","_callee$","_context","prev","next","NativeModules","ReactJSBridge","apply","t0","abrupt","stop","_x","_x2"],"mappings":";;;;;IAGaA,gBAAmB,gBAAA,YAAA;AAAA,EAAA,IAAAC,IAAA,GAAAC,2CAAA,
|
|
1
|
+
{"version":3,"file":"loadFontFromFile.js","sources":["../../../../../src/components/Text/hooks/loadFontFromFile.ts"],"sourcesContent":["import React from \"react\";\nimport { NativeModules } from \"react-native\";\n\nexport const loadFontFromFile = async (fontFile: any, fontName: string, testEnv: boolean = false): Promise<boolean> => {\n try {\n await NativeModules.ReactJSBridge[\"loadFontFromFile\"](...[fontFile, fontName]);\n } catch {\n if (!testEnv) {\n return false;\n }\n }\n return true;\n};\n"],"names":["loadFontFromFile","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","fontFile","fontName","testEnv","_NativeModules$ReactJ","_args","arguments","wrap","_callee$","_context","prev","next","NativeModules","ReactJSBridge","apply","t0","abrupt","stop","_x","_x2"],"mappings":";;;;;IAGaA,gBAAmB,gBAAA,YAAA;AAAA,EAAA,IAAAC,IAAA,GAAAC,2CAAA,cAAAC,6CAAA,EAAA,CAAAC,IAAA,CAAA,SAAAC,OAAAA,CAAOC,QAAe,EAAAC,QAAA,EAAA;AAAA,IAAA,IAAAC,OAAA;MAAAC,qBAAA;AAAAC,MAAAA,KAAA,GAAAC,SAAA,CAAA;AAAA,IAAA,OAAAR,6CAAA,EAAA,CAAAS,IAAA,CAAA,SAAAC,SAAAC,QAAA,EAAA;AAAA,MAAA,OAAA,CAAA,EAAA,QAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;AAAA,QAAA,KAAA,CAAA;UAAkBR,kEAAmB,KAA4B,CAAA;AAAAM,UAAAA,QAAA,CAAAC,IAAA,GAAA,CAAA,CAAA;AAAAD,UAAAA,QAAA,CAAAE,IAAA,GAAA,CAAA,CAAA;AAAA,UAAA,OAE7G,CA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