@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
package/jest-preset.js
CHANGED
|
@@ -57,6 +57,6 @@ module.exports = {
|
|
|
57
57
|
// 本库与这些 peer 都发 ESM / TS 源码,RN preset 默认只放行
|
|
58
58
|
// react-native / @react-native / @react-native-community 三个前缀。
|
|
59
59
|
transformIgnorePatterns: [
|
|
60
|
-
'node_modules/(?!((jest-)?react-native|@react-native(-community)?|@unif/react-native-design|@
|
|
60
|
+
'node_modules/(?!((jest-)?react-native|@react-native(-community)?|@unif/react-native-design|@callstack/liquid-glass|react-native-(gesture-handler|reanimated|worklets|safe-area-context|svg|reanimated-carousel))/)',
|
|
61
61
|
],
|
|
62
62
|
};
|
package/jest-setup.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `@unif/react-native-design/jest-setup` —— 把本库 9 个 runtime peer 里在 Jest 中
|
|
7
|
-
* 需要接线的那
|
|
7
|
+
* 需要接线的那 5 个提供桩 / mock / setup。放进消费者的
|
|
8
8
|
* `setupFilesAfterEnv`。
|
|
9
9
|
*
|
|
10
10
|
* 为什么由库提供:这份接线完全由本库的 peer 集决定,peer range 一变它就得变。
|
|
@@ -18,6 +18,21 @@
|
|
|
18
18
|
// RNGH 官方 jest 桩:让 TurboModuleRegistry.getEnforcing('RNGestureHandlerModule') 不炸。
|
|
19
19
|
require('react-native-gesture-handler/jestSetup');
|
|
20
20
|
|
|
21
|
+
// Liquid Glass 依赖 iOS Fabric / TurboModule,Jest 只替换这个原生边界。
|
|
22
|
+
// 默认不支持原生材质;组件测试可覆盖支持标记,核对两种平台接线。
|
|
23
|
+
jest.mock('@callstack/liquid-glass', () => {
|
|
24
|
+
const React = require('react');
|
|
25
|
+
const { View } = require('react-native');
|
|
26
|
+
return {
|
|
27
|
+
__esModule: true,
|
|
28
|
+
LiquidGlassView: function MockLiquidGlassView(props) {
|
|
29
|
+
return React.createElement(View, props);
|
|
30
|
+
},
|
|
31
|
+
LiquidGlassContainerView: View,
|
|
32
|
+
isLiquidGlassSupported: false,
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
|
|
21
36
|
// worklets 的 native 侧在 Jest 里不存在,直接 import 会在 `loadUnpackersWithCode` 处崩。
|
|
22
37
|
jest.mock('react-native-worklets', () =>
|
|
23
38
|
require('react-native-worklets/lib/module/mock')
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Text, View } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { GlassLayer } from "../../ui/GlassLayer/index.js";
|
|
6
6
|
import { useThemedStyles } from "../../../theme/index.js";
|
|
7
7
|
import { makeGlassStatsStyles } from "./styles.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
10
|
-
* 玻璃数据条 ——
|
|
11
|
-
*
|
|
12
|
-
* BlurLayer 接管 backdrop 双层结构(BlurView soft + glassTintLight tint),
|
|
13
|
-
* blurType 跟 scheme 自动切。
|
|
10
|
+
* 玻璃数据条 —— GlassLayer 通透材质 + 内部 N 列数据。
|
|
11
|
+
* 材质、主题和平台降级由 GlassLayer 接管。
|
|
14
12
|
*/
|
|
15
13
|
export function GlassStats({
|
|
16
14
|
items,
|
|
@@ -28,8 +26,9 @@ export function GlassStats({
|
|
|
28
26
|
testID: testID,
|
|
29
27
|
children: /*#__PURE__*/_jsxs(View, {
|
|
30
28
|
style: styles.glass,
|
|
31
|
-
children: [/*#__PURE__*/_jsx(
|
|
32
|
-
|
|
29
|
+
children: [/*#__PURE__*/_jsx(GlassLayer, {
|
|
30
|
+
effect: "clear",
|
|
31
|
+
style: styles.glassLayer
|
|
33
32
|
}), /*#__PURE__*/_jsx(View, {
|
|
34
33
|
style: styles.topHighlight,
|
|
35
34
|
pointerEvents: "none"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","
|
|
1
|
+
{"version":3,"names":["React","Text","View","GlassLayer","useThemedStyles","makeGlassStatsStyles","jsx","_jsx","jsxs","_jsxs","GlassStats","items","style","testID","styles","glassShell","children","glass","effect","glassLayer","topHighlight","pointerEvents","inner","map","count","label","i","Fragment","sep","col","countText","labelText"],"sourceRoot":"../../../../../src","sources":["components/business/GlassStats/GlassStats.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,UAAU,QAAQ,8BAAqB;AAChD,SAASC,eAAe,QAAQ,yBAAgB;AAChD,SAASC,oBAAoB,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGhD;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAC;EACzBC,KAAK;EACLC,KAAK;EACLC;AACe,CAAC,EAAqB;EACrC,MAAMC,MAAM,GAAGV,eAAe,CAACC,oBAAoB,CAAC;EACpD;IAAA;IACE;IACA;IACA;IACAE,IAAA,CAACL,IAAI;MAACU,KAAK,EAAE,CAACE,MAAM,CAACC,UAAU,EAAEH,KAAK,CAAE;MAACC,MAAM,EAAEA,MAAO;MAAAG,QAAA,eACtDP,KAAA,CAACP,IAAI;QAACU,KAAK,EAAEE,MAAM,CAACG,KAAM;QAAAD,QAAA,gBACxBT,IAAA,CAACJ,UAAU;UAACe,MAAM,EAAC,OAAO;UAACN,KAAK,EAAEE,MAAM,CAACK;QAAW,CAAE,CAAC,eAEvDZ,IAAA,CAACL,IAAI;UAACU,KAAK,EAAEE,MAAM,CAACM,YAAa;UAACC,aAAa,EAAC;QAAM,CAAE,CAAC,eACzDd,IAAA,CAACL,IAAI;UAACU,KAAK,EAAEE,MAAM,CAACQ,KAAM;UAAAN,QAAA,EACvBL,KAAK,CAACY,GAAG,CAAC,CAAC,CAACC,KAAK,EAAEC,KAAK,CAAC,EAAEC,CAAC,kBAC3BjB,KAAA,CAACT,KAAK,CAAC2B,QAAQ;YAAAX,QAAA,GACZU,CAAC,GAAG,CAAC,gBAAGnB,IAAA,CAACL,IAAI;cAACU,KAAK,EAAEE,MAAM,CAACc;YAAI,CAAE,CAAC,GAAG,IAAI,eAC3CnB,KAAA,CAACP,IAAI;cAACU,KAAK,EAAEE,MAAM,CAACe,GAAI;cAAAb,QAAA,gBACtBT,IAAA,CAACN,IAAI;gBAACW,KAAK,EAAEE,MAAM,CAACgB,SAAU;gBAAAd,QAAA,EAAEQ;cAAK,CAAO,CAAC,eAC7CjB,IAAA,CAACN,IAAI;gBAACW,KAAK,EAAEE,MAAM,CAACiB,SAAU;gBAAAf,QAAA,EAAES;cAAK,CAAO,CAAC;YAAA,CACzC,CAAC;UAAA,GALY,GAAGA,KAAK,IAAIC,CAAC,EAMlB,CACjB;QAAC,CACE,CAAC;MAAA,CACH;IAAC,CACH;EAAC;AAEX","ignoreList":[]}
|
|
@@ -9,11 +9,15 @@ import { fontMono, fw, radius, rf, space, type as t } from "../../../theme/index
|
|
|
9
9
|
* iOS Core Animation `masksToBounds=true` 会裁掉 outer shadow。
|
|
10
10
|
* - `glass`:内层承担 borderRadius + overflow:hidden + border 边线。
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* 玻璃材质与平台降级由 `<GlassLayer effect="clear"/>` 接管。 */
|
|
13
13
|
export const makeGlassStatsStyles = (c, s) => {
|
|
14
14
|
/** count 数字 mono display 字号,无对应 type token,保留 rf(20) 走字号缩放(非 r)。 */
|
|
15
15
|
const countSize = rf(20);
|
|
16
16
|
return StyleSheet.create({
|
|
17
|
+
// LiquidGlassView 需要自身圆角,父容器的 overflow 裁切不足以定义材质轮廓。
|
|
18
|
+
glassLayer: {
|
|
19
|
+
borderRadius: radius['2xl']
|
|
20
|
+
},
|
|
17
21
|
glassShell: {
|
|
18
22
|
borderRadius: radius['2xl'],
|
|
19
23
|
...s.glassBar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","fontMono","fw","radius","rf","space","type","t","makeGlassStatsStyles","c","s","countSize","create","
|
|
1
|
+
{"version":3,"names":["StyleSheet","fontMono","fw","radius","rf","space","type","t","makeGlassStatsStyles","c","s","countSize","create","glassLayer","borderRadius","glassShell","glassBar","glass","overflow","borderWidth","hairlineWidth","borderColor","glassBorder","topHighlight","absoluteFill","borderTopWidth","borderTopColor","glassStatsHighlight","inner","flexDirection","paddingVertical","sep","width","backgroundColor","glassSeparator","marginVertical","col","flex","alignItems","countText","fontSize","fontWeight","bold","color","foreground","letterSpacing","fontFamily","lineHeight","labelText","micro","foregroundMuted","paddingTop"],"sourceRoot":"../../../../../src","sources":["components/business/GlassStats/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,QAAQ,EAAEC,EAAE,EAAEC,MAAM,EAAEC,EAAE,EAAEC,KAAK,EAAEC,IAAI,IAAIC,CAAC,QAAQ,yBAAgB;AAG3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGA,CAACC,CAAc,EAAEC,CAAe,KAAK;EACvE;EACA,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AAC,CAAC0C,KAAK;MACjBN,KAAK,EAAElC,CAAC,CAACyC,eAAe;MACxBC,UAAU,EAAE9C,KAAK,CAAC,GAAG;IACvB;EACF,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import { space, useThemedStyles } from "../../../theme/index.js";
|
|
7
|
+
import { Button } from "../Button/index.js";
|
|
8
|
+
import { makeStyles } from "./styles.js";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
+
export function ActionMenuContent({
|
|
11
|
+
actions,
|
|
12
|
+
onClose,
|
|
13
|
+
presentation = 'dialog',
|
|
14
|
+
title,
|
|
15
|
+
cancelLabel = '取消',
|
|
16
|
+
style,
|
|
17
|
+
testID = 'action-menu'
|
|
18
|
+
}) {
|
|
19
|
+
const styles = useThemedStyles(makeStyles);
|
|
20
|
+
const insets = useSafeAreaInsets();
|
|
21
|
+
const [confirmationId, setConfirmationId] = useState(null);
|
|
22
|
+
const isSheet = presentation === 'sheet';
|
|
23
|
+
const confirming = actions.find(action => action.id === confirmationId && action.confirmation !== undefined);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!confirming) setConfirmationId(null);
|
|
26
|
+
}, [confirming]);
|
|
27
|
+
const content = /*#__PURE__*/_jsxs(Pressable, {
|
|
28
|
+
accessible: false,
|
|
29
|
+
testID: `${testID}-card`,
|
|
30
|
+
style: [isSheet ? styles.sheetCard : styles.dialogCard, isSheet && {
|
|
31
|
+
paddingBottom: insets.bottom + space[5]
|
|
32
|
+
}],
|
|
33
|
+
onPress: event => event.stopPropagation(),
|
|
34
|
+
children: [title ? /*#__PURE__*/_jsx(Text, {
|
|
35
|
+
testID: `${testID}-title`,
|
|
36
|
+
style: styles.title,
|
|
37
|
+
numberOfLines: 1,
|
|
38
|
+
ellipsizeMode: "tail",
|
|
39
|
+
children: title
|
|
40
|
+
}) : null, confirming?.confirmation ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
41
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
42
|
+
style: styles.confirmation,
|
|
43
|
+
accessibilityLiveRegion: "polite",
|
|
44
|
+
children: confirming.confirmation.message
|
|
45
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
46
|
+
style: styles.sheetActions,
|
|
47
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
48
|
+
label: cancelLabel,
|
|
49
|
+
variant: "neutral",
|
|
50
|
+
style: styles.sheetAction,
|
|
51
|
+
onPress: () => setConfirmationId(null)
|
|
52
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
53
|
+
label: confirming.confirmation.confirmLabel,
|
|
54
|
+
variant: "danger",
|
|
55
|
+
disabled: confirming.disabled,
|
|
56
|
+
loading: confirming.loading,
|
|
57
|
+
style: styles.sheetAction,
|
|
58
|
+
onPress: () => {
|
|
59
|
+
onClose();
|
|
60
|
+
confirming.onPress();
|
|
61
|
+
}
|
|
62
|
+
})]
|
|
63
|
+
})]
|
|
64
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
65
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
66
|
+
testID: `${testID}-actions`,
|
|
67
|
+
style: isSheet ? styles.sheetActions : undefined,
|
|
68
|
+
children: actions.map(action => /*#__PURE__*/_jsx(Button, {
|
|
69
|
+
label: action.label,
|
|
70
|
+
disabled: action.disabled,
|
|
71
|
+
loading: action.loading,
|
|
72
|
+
variant: isSheet ? action.tone ?? 'neutral' : 'text',
|
|
73
|
+
style: isSheet ? styles.sheetAction : undefined,
|
|
74
|
+
onPress: () => {
|
|
75
|
+
if (action.confirmation) {
|
|
76
|
+
setConfirmationId(action.id);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
action.onPress();
|
|
80
|
+
}
|
|
81
|
+
}, action.id))
|
|
82
|
+
}), !isSheet ? /*#__PURE__*/_jsx(Button, {
|
|
83
|
+
label: cancelLabel,
|
|
84
|
+
variant: "text",
|
|
85
|
+
onPress: onClose
|
|
86
|
+
}) : null]
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
90
|
+
accessible: false,
|
|
91
|
+
testID: testID,
|
|
92
|
+
style: [isSheet ? styles.sheetRoot : styles.dialogRoot, style],
|
|
93
|
+
onPress: onClose,
|
|
94
|
+
children: content
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=ActionMenuContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","Pressable","Text","View","useSafeAreaInsets","space","useThemedStyles","Button","makeStyles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ActionMenuContent","actions","onClose","presentation","title","cancelLabel","style","testID","styles","insets","confirmationId","setConfirmationId","isSheet","confirming","find","action","id","confirmation","undefined","content","accessible","sheetCard","dialogCard","paddingBottom","bottom","onPress","event","stopPropagation","children","numberOfLines","ellipsizeMode","accessibilityLiveRegion","message","sheetActions","label","variant","sheetAction","confirmLabel","disabled","loading","map","tone","sheetRoot","dialogRoot"],"sourceRoot":"../../../../../src","sources":["components/ui/ActionMenuContent/ActionMenuContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACpD,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,KAAK,EAAEC,eAAe,QAAQ,yBAAgB;AACvD,SAASC,MAAM,QAAQ,oBAAW;AAElC,SAASC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IA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;UAEL0C,KAAK,EAAEnB,MAAM,CAACmB,KAAM;UACpBI,QAAQ,EAAEvB,MAAM,CAACuB,QAAS;UAC1BC,OAAO,EAAExB,MAAM,CAACwB,OAAQ;UACxBJ,OAAO,EAAEvB,OAAO,GAAIG,MAAM,CAAC0B,IAAI,IAAI,SAAS,GAAI,MAAO;UACvDnC,KAAK,EAAEM,OAAO,GAAGJ,MAAM,CAAC4B,WAAW,GAAGlB,SAAU;UAChDO,OAAO,EAAEA,CAAA,KAAM;YACb,IAAIV,MAAM,CAACE,YAAY,EAAE;cACvBN,iBAAiB,CAACI,MAAM,CAACC,EAAE,CAAC;cAC5B;YACF;YACAD,MAAM,CAACU,OAAO,CAAC,CAAC;UAClB;QAAE,GAZGV,MAAM,CAACC,EAab,CACF;MAAC,CACE,CAAC,EACN,CAACJ,OAAO,gBACPjB,IAAA,CAACH,MAAM;QAAC0C,KAAK,EAAE7B,WAAY;QAAC8B,OAAO,EAAC,MAAM;QAACV,OAAO,EAAEvB;MAAQ,CAAE,CAAC,GAC7D,IAAI;IAAA,CACR,CACH;EAAA,CACQ,CACZ;EAED,oBACEP,IAAA,CAACT,SAAS;IACRkC,UAAU,EAAE,KAAM;IAClBb,MAAM,EAAEA,MAAO;IACfD,KAAK,EAAE,CAACM,OAAO,GAAGJ,MAAM,CAACkC,SAAS,GAAGlC,MAAM,CAACmC,UAAU,EAAErC,KAAK,CAAE;IAC/DmB,OAAO,EAAEvB,OAAQ;IAAA0B,QAAA,EAEhBT;EAAO,CACC,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActionMenuContent"],"sourceRoot":"../../../../../src","sources":["components/ui/ActionMenuContent/index.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,wBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { fw, radius, space, type as typography } from "../../../theme/index.js";
|
|
5
|
+
export const makeStyles = c => StyleSheet.create({
|
|
6
|
+
dialogRoot: {
|
|
7
|
+
flex: 1,
|
|
8
|
+
justifyContent: 'center',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
backgroundColor: c.scrim
|
|
11
|
+
},
|
|
12
|
+
sheetRoot: {
|
|
13
|
+
flex: 1,
|
|
14
|
+
justifyContent: 'flex-end',
|
|
15
|
+
backgroundColor: c.scrim
|
|
16
|
+
},
|
|
17
|
+
dialogCard: {
|
|
18
|
+
backgroundColor: c.surface,
|
|
19
|
+
borderRadius: radius.xl,
|
|
20
|
+
padding: space[4],
|
|
21
|
+
width: '80%',
|
|
22
|
+
maxWidth: 400,
|
|
23
|
+
gap: space[2]
|
|
24
|
+
},
|
|
25
|
+
sheetCard: {
|
|
26
|
+
backgroundColor: c.surface,
|
|
27
|
+
borderTopLeftRadius: radius.xl,
|
|
28
|
+
borderTopRightRadius: radius.xl,
|
|
29
|
+
paddingHorizontal: space[5],
|
|
30
|
+
paddingTop: space[5],
|
|
31
|
+
gap: space[3]
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
color: c.foreground,
|
|
35
|
+
fontSize: typography.sm,
|
|
36
|
+
fontWeight: fw.semi,
|
|
37
|
+
textAlign: 'center',
|
|
38
|
+
paddingVertical: space[3]
|
|
39
|
+
},
|
|
40
|
+
confirmation: {
|
|
41
|
+
color: c.foregroundMuted,
|
|
42
|
+
fontSize: typography.xs,
|
|
43
|
+
textAlign: 'center'
|
|
44
|
+
},
|
|
45
|
+
sheetActions: {
|
|
46
|
+
flexDirection: 'row',
|
|
47
|
+
flexWrap: 'wrap',
|
|
48
|
+
gap: space[3]
|
|
49
|
+
},
|
|
50
|
+
sheetAction: {
|
|
51
|
+
flex: 1
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","fw","radius","space","type","typography","makeStyles","c","create","dialogRoot","flex","justifyContent","alignItems","backgroundColor","scrim","sheetRoot","dialogCard","surface","borderRadius","xl","padding","width","maxWidth","gap","sheetCard","borderTopLeftRadius","borderTopRightRadius","paddingHorizontal","paddingTop","title","color","foreground","fontSize","sm","fontWeight","semi","textAlign","paddingVertical","confirmation","foregroundMuted","xs","sheetActions","flexDirection","flexWrap","sheetAction"],"sourceRoot":"../../../../../src","sources":["components/ui/ActionMenuContent/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,EAAE,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,IAAIC,UAAU,QAAQ,yBAAgB;AAEtE,OAAO,MAAMC,UAAU,GAAIC,CAAc,IACvCP,UAAU,CAACQ,MAAM,CAAC;EAChBC,UAAU,EAAE;IACVC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAEN,CAAC,CAACO;EACrB,CAAC;EACDC,SAAS,EAAE;IACTL,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,UAAU;IAC1BE,eAAe,EAAEN,CAAC,CAACO;EACrB,CAAC;EACDE,UAAU,EAAE;IACVH,eAAe,EAAEN,CAAC,CAACU,OAAO;IAC1BC,YAAY,EAAEhB,MAAM,CAACiB,EAAE;IACvBC,OAAO,EAAEjB,KAAK,CAAC,CAAC,CAAC;IACjBkB,KAAK,EAAE,KAAK;IACZC,QAAQ,EAAE,GAAG;IACbC,GAAG,EAAEpB,KAAK,CAAC,CAAC;EACd,CAAC;EACDqB,SAAS,EAAE;IACTX,eAAe,EAAEN,CAAC,CAACU,OAAO;IAC1BQ,mBAAmB,EAAEvB,MAAM,CAACiB,EAAE;IAC9BO,oBAAoB,EAAExB,MAAM,CAACiB,EAAE;IAC/BQ,iBAAiB,EAAExB,KAAK,CAAC,CAAC,CAAC;IAC3ByB,UAAU,EAAEzB,KAAK,CAAC,CAAC,CAAC;IACpBoB,GAAG,EAAEpB,KAAK,CAAC,CAAC;EACd,CAAC;EACD0B,KAAK,EAAE;IACLC,KAAK,EAAEvB,CAAC,CAACwB,UAAU;IACnBC,QAAQ,EAAE3B,UAAU,CAAC4B,EAAE;IACvBC,UAAU,EAAEjC,EAAE,CAACkC,IAAI;IACnBC,SAAS,EAAE,QAAQ;IACnBC,eAAe,EAAElC,KAAK,CAAC,CAAC;EAC1B,CAAC;EACDmC,YAAY,EAAE;IACZR,KAAK,EAAEvB,CAAC,CAACgC,eAAe;IACxBP,QAAQ,EAAE3B,UAAU,CAACmC,EAAE;IACvBJ,SAAS,EAAE;EACb,CAAC;EACDK,YAAY,EAAE;IAAEC,aAAa,EAAE,KAAK;IAAEC,QAAQ,EAAE,MAAM;IAAEpB,GAAG,EAAEpB,KAAK,CAAC,CAAC;EAAE,CAAC;EACvEyC,WAAW,EAAE;IAAElC,IAAI,EAAE;EAAE;AACzB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/ui/ActionMenuContent/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -17,6 +17,8 @@ export function ButtonBase({
|
|
|
17
17
|
loading,
|
|
18
18
|
block,
|
|
19
19
|
square,
|
|
20
|
+
surfaceSize,
|
|
21
|
+
loadingSize,
|
|
20
22
|
accessibilityLabel,
|
|
21
23
|
accessibilityRole = 'button',
|
|
22
24
|
accessibilityHint,
|
|
@@ -27,7 +29,13 @@ export function ButtonBase({
|
|
|
27
29
|
}) {
|
|
28
30
|
const c = useColors();
|
|
29
31
|
const styles = useThemedStyles(makeStyles);
|
|
30
|
-
const sizing = useMemo(() =>
|
|
32
|
+
const sizing = useMemo(() => {
|
|
33
|
+
const base = sizingFor(size);
|
|
34
|
+
return square && surfaceSize !== undefined ? {
|
|
35
|
+
...base,
|
|
36
|
+
h: surfaceSize
|
|
37
|
+
} : base;
|
|
38
|
+
}, [size, square, surfaceSize]);
|
|
31
39
|
const palette = useMemo(() => paletteFor(variant, c), [variant, c]);
|
|
32
40
|
const isText = variant === 'text';
|
|
33
41
|
const unavailable = disabled === true || loading === true;
|
|
@@ -96,7 +104,7 @@ export function ButtonBase({
|
|
|
96
104
|
gap: sizing.gap
|
|
97
105
|
}, style],
|
|
98
106
|
children: loading ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
99
|
-
size:
|
|
107
|
+
size: loadingSize ?? 'small',
|
|
100
108
|
color: palette.fg
|
|
101
109
|
}) : children({
|
|
102
110
|
sizing,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","ActivityIndicator","Pressable","fixed","pressedOpacity","useColors","useThemedStyles","makeStyles","paletteFor","sizingFor","jsx","_jsx","ButtonBase","onPress","size","variant","disabled","loading","block","square","accessibilityLabel","accessibilityRole","accessibilityHint","accessibilityState","style","testID","children","c","styles","sizing","palette","isText","unavailable","hasAccessibleName","
|
|
1
|
+
{"version":3,"names":["React","useMemo","ActivityIndicator","Pressable","fixed","pressedOpacity","useColors","useThemedStyles","makeStyles","paletteFor","sizingFor","jsx","_jsx","ButtonBase","onPress","size","variant","disabled","loading","block","square","surfaceSize","loadingSize","accessibilityLabel","accessibilityRole","accessibilityHint","accessibilityState","style","testID","children","c","styles","sizing","base","undefined","h","palette","isText","unavailable","hasAccessibleName","hitSlop","v","Math","round","hitTarget","top","bottom","left","right","max","accessible","busy","pressed","height","width","paddingHorizontal","px","borderRadius","br","backgroundColor","bg","borderColor","border","borderWidth","opacity","alignSelf","gap","color","fg"],"sourceRoot":"../../../../../src","sources":["components/ui/Button/ButtonBase.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SACEC,iBAAiB,QAKZ,cAAc;AACrB,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SACEC,KAAK,EACLC,cAAc,EACdC,SAAS,EACTC,eAAe,Q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AEyB;IAAQ,CAAC,KAAK,CACtBrB,MAAM,CAACE,IAAI,EACX;MACE;MACAoB,MAAM,EAAEhB,MAAM,GAAGH,SAAS,GAAGF,MAAM,CAACG,CAAC;MACrC;MACAmB,KAAK,EAAElC,MAAM,GAAGY,MAAM,CAACG,CAAC,GAAGD,SAAS;MACpCqB,iBAAiB,EAAElB,MAAM,IAAIjB,MAAM,GAAG,CAAC,GAAGY,MAAM,CAACwB,EAAE;MACnDC,YAAY,EAAEzB,MAAM,CAAC0B,EAAE;MACvBC,eAAe,EAAEvB,OAAO,CAACwB,EAAE;MAC3BC,WAAW,EAAEzB,OAAO,CAAC0B,MAAM,IAAI,aAAa;MAC5CC,WAAW,EAAE3B,OAAO,CAAC0B,MAAM,GAAG,CAAC,GAAG,CAAC;MACnCE,OAAO,EAAE1B,WAAW,GAAG,GAAG,GAAGc,OAAO,GAAG/C,cAAc,GAAG,CAAC;MACzD4D,SAAS,EAAE9C,KAAK,GAAG,SAAS,GAAG,YAAY;MAC3C+C,GAAG,EAAElC,MAAM,CAACkC;IACd,CAAC,EACDvC,KAAK,CACL;IAAAE,QAAA,EAEDX,OAAO,gBACNN,IAAA,CAACV,iBAAiB;MAACa,IAAI,EAAEO,WAAW,IAAI,OAAQ;MAAC6C,KAAK,EAAE/B,OAAO,CAACgC;IAAG,CAAE,CAAC,GAEtEvC,QAAQ,CAAC;MAAEG,MAAM;MAAEI;IAAQ,CAAC;EAC7B,CACQ,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import { LiquidGlassView, isLiquidGlassSupported } from '@callstack/liquid-glass';
|
|
6
|
+
import { useColors, useTheme } from "../../../theme/index.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
/** 装饰玻璃层;不支持原生材质的平台使用主题半透明背景。 */
|
|
9
|
+
export function GlassLayer({
|
|
10
|
+
effect = 'regular',
|
|
11
|
+
tintColor,
|
|
12
|
+
style,
|
|
13
|
+
testID
|
|
14
|
+
}) {
|
|
15
|
+
const c = useColors();
|
|
16
|
+
const {
|
|
17
|
+
scheme
|
|
18
|
+
} = useTheme();
|
|
19
|
+
const resolvedTint = tintColor ?? (effect === 'clear' ? c.glassTintLight : c.sheetBackdrop);
|
|
20
|
+
return /*#__PURE__*/_jsx(LiquidGlassView
|
|
21
|
+
// 支持标记也可能因宿主设计兼容设置关闭,必须显式禁用原生材质。
|
|
22
|
+
, {
|
|
23
|
+
effect: isLiquidGlassSupported ? effect : 'none',
|
|
24
|
+
tintColor: resolvedTint,
|
|
25
|
+
colorScheme: scheme
|
|
26
|
+
// 纯装饰层无需材质切换动画,也不引入减少动态效果的额外状态。
|
|
27
|
+
,
|
|
28
|
+
animated: false,
|
|
29
|
+
style: [StyleSheet.absoluteFill, style, !isLiquidGlassSupported && {
|
|
30
|
+
backgroundColor: resolvedTint
|
|
31
|
+
}],
|
|
32
|
+
pointerEvents: "none",
|
|
33
|
+
accessible: false,
|
|
34
|
+
accessibilityElementsHidden: true,
|
|
35
|
+
importantForAccessibility: "no-hide-descendants",
|
|
36
|
+
testID: testID
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=GlassLayer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","LiquidGlassView","isLiquidGlassSupported","useColors","useTheme","jsx","_jsx","GlassLayer","effect","tintColor","style","testID","c","scheme","resolvedTint","glassTintLight","sheetBackdrop","colorScheme","animated","absoluteFill","backgroundColor","pointerEvents","accessible","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../../src","sources":["components/ui/GlassLayer/GlassLayer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SACEC,eAAe,EACfC,sBAAsB,QACjB,yBAAyB;AAChC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGrD;AACA,OAAO,SAASC,UAAUA,CAAC;EACzBC,MAAM,GAAG,SAAS;EAClBC,SAAS;EACTC,KAAK;EACLC;AACe,CAAC,EAAqB;EACrC,MAAMC,CAAC,GAAGT,SAAS,CAAC,CAAC;EACrB,MAAM;IAAEU;EAAO,CAAC,GAAGT,QAAQ,CAAC,CAAC;EAC7B,MAAMU,YAAY,GAChBL,SAAS,KAAKD,MAAM,KAAK,OAAO,GAAGI,CAAC,CAACG,cAAc,GAAGH,CAAC,CAACI,aAAa,CAAC;EAExE,oBACEV,IAAA,CAACL;EACC;EAAA;IACAO,MAAM,EAAEN,sBAAsB,GAAGM,MAAM,GAAG,MAAO;IACjDC,SAAS,EAAEK,YAAa;IACxBG,WAAW,EAAEJ;IACb;IAAA;IACAK,QAAQ,EAAE,KAAM;IAChBR,KAAK,EAAE,CACLV,UAAU,CAACmB,YAAY,EACvBT,KAAK,EACL,CAACR,sBAAsB,IAAI;MAAEkB,eAAe,EAAEN;IAAa,CAAC,CAC5D;IACFO,aAAa,EAAC,MAAM;IACpBC,UAAU,EAAE,KAAM;IAClBC,2BAA2B;IAC3BC,yBAAyB,EAAC,qBAAqB;IAC/Cb,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { useColors, useTheme } from "../../../theme/index.js";
|
|
6
|
+
import { webGlassBlur } from "./constants.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
/** Web 保留 CSS 玻璃近似效果,不加载原生 Liquid Glass 模块。 */
|
|
9
|
+
export function GlassLayer({
|
|
10
|
+
effect = 'regular',
|
|
11
|
+
tintColor,
|
|
12
|
+
style,
|
|
13
|
+
testID
|
|
14
|
+
}) {
|
|
15
|
+
const c = useColors();
|
|
16
|
+
const {
|
|
17
|
+
scheme
|
|
18
|
+
} = useTheme();
|
|
19
|
+
const resolvedTint = tintColor ?? (effect === 'clear' ? c.glassTintLight : c.sheetBackdrop);
|
|
20
|
+
// RN 类型不含 CSS backdrop-filter。保留原有饱和度和暗色透明度近似值。
|
|
21
|
+
const webGlassStyle = {
|
|
22
|
+
backdropFilter: `blur(${webGlassBlur[effect]}px) saturate(180%)`,
|
|
23
|
+
WebkitBackdropFilter: `blur(${webGlassBlur[effect]}px) saturate(180%)`,
|
|
24
|
+
backgroundColor: resolvedTint,
|
|
25
|
+
opacity: scheme === 'dark' ? 0.96 : 1
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/_jsx(View, {
|
|
28
|
+
style: [StyleSheet.absoluteFill, style, webGlassStyle],
|
|
29
|
+
pointerEvents: "none",
|
|
30
|
+
accessible: false,
|
|
31
|
+
accessibilityElementsHidden: true,
|
|
32
|
+
importantForAccessibility: "no-hide-descendants",
|
|
33
|
+
testID: testID
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=GlassLayer.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","useColors","useTheme","webGlassBlur","jsx","_jsx","GlassLayer","effect","tintColor","style","testID","c","scheme","resolvedTint","glassTintLight","sheetBackdrop","webGlassStyle","backdropFilter","WebkitBackdropFilter","backgroundColor","opacity","absoluteFill","pointerEvents","accessible","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../../src","sources":["components/ui/GlassLayer/GlassLayer.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAwB,cAAc;AAC/D,SAASC,SAAS,EAAEC,QAAQ,QAAQ,yBAAgB;AACpD,SAASC,YAAY,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG3C;AACA,OAAO,SAASC,UAAUA,CAAC;EACzBC,MAAM,GAAG,SAAS;EAClBC,SAAS;EACTC,KAAK;EACLC;AACe,CAAC,EAAqB;EACrC,MAAMC,CAAC,GAAGV,SAAS,CAAC,CAAC;EACrB,MAAM;IAAEW;EAAO,CAAC,GAAGV,QAAQ,CAAC,CAAC;EAC7B,MAAMW,YAAY,GAChBL,SAAS,KAAKD,MAAM,KAAK,OAAO,GAAGI,CAAC,CAACG,cAAc,GAAGH,CAAC,CAACI,aAAa,CAAC;EACxE;EACA,MAAMC,aACgE,GAAG;IACvEC,cAAc,EAAE,QAAQd,YAAY,CAACI,MAAM,CAAC,oBAAoB;IAChEW,oBAAoB,EAAE,QAAQf,YAAY,CAACI,MAAM,CAAC,oBAAoB;IACtEY,eAAe,EAAEN,YAAY;IAC7BO,OAAO,EAAER,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG;EACtC,CAAC;EAED,oBACEP,IAAA,CAACL,IAAI;IACHS,KAAK,EAAE,CAACV,UAAU,CAACsB,YAAY,EAAEZ,KAAK,EAAEO,aAAa,CAAE;IACvDM,aAAa,EAAC,MAAM;IACpBC,UAAU,EAAE,KAAM;IAClBC,2BAA2B;IAC3BC,yBAAyB,EAAC,qBAAqB;IAC/Cf,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["webGlassBlur","clear","regular"],"sourceRoot":"../../../../../src","sources":["components/ui/GlassLayer/constants.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,OAAO,EAAE;AAAG,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GlassLayer"],"sourceRoot":"../../../../../src","sources":["components/ui/GlassLayer/index.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/ui/
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/ui/GlassLayer/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -21,6 +21,8 @@ export function IconButton({
|
|
|
21
21
|
icon,
|
|
22
22
|
onPress,
|
|
23
23
|
size = 'md',
|
|
24
|
+
iconSize,
|
|
25
|
+
surfaceSize,
|
|
24
26
|
variant = 'ghost',
|
|
25
27
|
color,
|
|
26
28
|
disabled,
|
|
@@ -42,6 +44,8 @@ export function IconButton({
|
|
|
42
44
|
square: true,
|
|
43
45
|
onPress: onPress,
|
|
44
46
|
size: size,
|
|
47
|
+
surfaceSize: surfaceSize,
|
|
48
|
+
loadingSize: iconSize,
|
|
45
49
|
variant: variant,
|
|
46
50
|
loading: loading,
|
|
47
51
|
disabled: disabled === true || hasBlankLabel,
|
|
@@ -55,7 +59,7 @@ export function IconButton({
|
|
|
55
59
|
palette
|
|
56
60
|
}) => /*#__PURE__*/_jsx(Icon, {
|
|
57
61
|
name: icon,
|
|
58
|
-
size: sizing.fs + 4,
|
|
62
|
+
size: iconSize ?? sizing.fs + 4,
|
|
59
63
|
color: color ?? palette.fg
|
|
60
64
|
})
|
|
61
65
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","createLogger","ButtonBase","Icon","normalizeNonBlankText","jsx","_jsx","log","IconButton","icon","onPress","size","variant","color","disabled","loading","accessibilityLabel","accessibilityHint","accessibilityState","style","testID","accessibleName","hasBlankLabel","undefined","warn","square","children","sizing","palette","name","fs","fg"],"sourceRoot":"../../../../../src","sources":["components/ui/IconButton/IconButton.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,YAAY,QAAQ,gCAAuB;AACpD,SAASC,UAAU,QAAQ,yBAAsB;AACjD,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,qBAAqB,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGpE,MAAMC,GAAG,GAAGN,YAAY,CAAC,YAAY,CAAC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,UAAUA,CAAC;EACzBC,IAAI;EACJC,OAAO;EACPC,IAAI,GAAG,IAAI;EACXC,OAAO,GAAG,OAAO;EACjBC,KAAK;EACLC,QAAQ;EACRC,OAAO;EACPC,kBAAkB;EAClBC,iBAAiB;EACjBC,kBAAkB;EAClBC,KAAK;EACLC;AACe,CAAC,EAAqB;EACrC,MAAMC,cAAc,
|
|
1
|
+
{"version":3,"names":["React","useEffect","createLogger","ButtonBase","Icon","normalizeNonBlankText","jsx","_jsx","log","IconButton","icon","onPress","size","iconSize","surfaceSize","variant","color","disabled","loading","accessibilityLabel","accessibilityHint","accessibilityState","style","testID","accessibleName","hasBlankLabel","undefined","warn","square","loadingSize","children","sizing","palette","name","fs","fg"],"sourceRoot":"../../../../../src","sources":["components/ui/IconButton/IconButton.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,YAAY,QAAQ,gCAAuB;AACpD,SAASC,UAAU,QAAQ,yBAAsB;AACjD,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,qBAAqB,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGpE,MAAMC,GAAG,GAAGN,YAAY,CAAC,YAAY,CAAC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,UAAUA,CAAC;EACzBC,IAAI;EACJC,OAAO;EACPC,IAAI,GAAG,IAAI;EACXC,QAAQ;EACRC,WAAW;EACXC,OAAO,GAAG,OAAO;EACjBC,KAAK;EACLC,QAAQ;EACRC,OAAO;EACPC,kBAAkB;EAClBC,iBAAiB;E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