@oxy.so/services 11.2.0-oxy-one.4 → 11.2.0-oxy-one.5
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/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/package.json +4 -4
- package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustRulesScreen.tsx +1 -1
- package/lib/commonjs/ui/components/styles/overlay.js +0 -83
- package/lib/commonjs/ui/components/styles/overlay.js.map +0 -1
- package/lib/commonjs/ui/components/styles/shadow.js +0 -127
- package/lib/commonjs/ui/components/styles/shadow.js.map +0 -1
- package/lib/commonjs/ui/constants/spacing.js +0 -50
- package/lib/commonjs/ui/constants/spacing.js.map +0 -1
- package/lib/module/ui/components/styles/overlay.js +0 -80
- package/lib/module/ui/components/styles/overlay.js.map +0 -1
- package/lib/module/ui/components/styles/shadow.js +0 -123
- package/lib/module/ui/components/styles/shadow.js.map +0 -1
- package/lib/module/ui/constants/spacing.js +0 -45
- package/lib/module/ui/constants/spacing.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/styles/overlay.d.ts +0 -6
- package/lib/typescript/commonjs/ui/components/styles/overlay.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/styles/shadow.d.ts +0 -3
- package/lib/typescript/commonjs/ui/components/styles/shadow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/constants/spacing.d.ts +0 -33
- package/lib/typescript/commonjs/ui/constants/spacing.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/styles/overlay.d.ts +0 -6
- package/lib/typescript/module/ui/components/styles/overlay.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/styles/shadow.d.ts +0 -3
- package/lib/typescript/module/ui/components/styles/shadow.d.ts.map +0 -1
- package/lib/typescript/module/ui/constants/spacing.d.ts +0 -33
- package/lib/typescript/module/ui/constants/spacing.d.ts.map +0 -1
- package/src/ui/components/styles/overlay.tsx +0 -96
- package/src/ui/components/styles/shadow.tsx +0 -131
- package/src/ui/constants/spacing.ts +0 -44
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = shadow;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
const SHADOW_COLOR = '#000000';
|
|
9
|
-
const SHADOW_OPACITY = 0.24;
|
|
10
|
-
const MD3_SHADOW_OPACITY = 0.3;
|
|
11
|
-
const MD3_SHADOW_COLOR = '#000000';
|
|
12
|
-
function shadow(elevation = 0, isV3 = false) {
|
|
13
|
-
return isV3 ? v3Shadow(elevation) : v2Shadow(elevation);
|
|
14
|
-
}
|
|
15
|
-
function v2Shadow(elevation = 0) {
|
|
16
|
-
if (elevation instanceof _reactNative.Animated.Value) {
|
|
17
|
-
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
18
|
-
if (_reactNative.Platform.OS === 'ios') {
|
|
19
|
-
return {
|
|
20
|
-
shadowColor: SHADOW_COLOR,
|
|
21
|
-
shadowOffset: {
|
|
22
|
-
width: 0,
|
|
23
|
-
height: elevation.interpolate({
|
|
24
|
-
inputRange,
|
|
25
|
-
outputRange: [0, 0.5, 0.75, 2, 7, 23]
|
|
26
|
-
})
|
|
27
|
-
},
|
|
28
|
-
shadowOpacity: elevation.interpolate({
|
|
29
|
-
inputRange: [0, 1],
|
|
30
|
-
outputRange: [0, SHADOW_OPACITY],
|
|
31
|
-
extrapolate: 'clamp'
|
|
32
|
-
}),
|
|
33
|
-
shadowRadius: elevation.interpolate({
|
|
34
|
-
inputRange,
|
|
35
|
-
outputRange: [0, 0.75, 1.5, 3, 8, 24]
|
|
36
|
-
})
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
elevation: elevation.interpolate({
|
|
41
|
-
inputRange,
|
|
42
|
-
outputRange: [0, 1, 2, 3, 8, 24]
|
|
43
|
-
})
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
if (elevation === 0) {
|
|
47
|
-
return {};
|
|
48
|
-
}
|
|
49
|
-
let height;
|
|
50
|
-
let radius;
|
|
51
|
-
switch (elevation) {
|
|
52
|
-
case 1:
|
|
53
|
-
height = 0.5;
|
|
54
|
-
radius = 0.75;
|
|
55
|
-
break;
|
|
56
|
-
case 2:
|
|
57
|
-
height = 0.75;
|
|
58
|
-
radius = 1.5;
|
|
59
|
-
break;
|
|
60
|
-
default:
|
|
61
|
-
height = elevation - 1;
|
|
62
|
-
radius = elevation;
|
|
63
|
-
}
|
|
64
|
-
if (_reactNative.Platform.OS === 'ios') {
|
|
65
|
-
return {
|
|
66
|
-
shadowColor: SHADOW_COLOR,
|
|
67
|
-
shadowOffset: {
|
|
68
|
-
width: 0,
|
|
69
|
-
height
|
|
70
|
-
},
|
|
71
|
-
shadowOpacity: SHADOW_OPACITY,
|
|
72
|
-
shadowRadius: radius
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
elevation: elevation
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function v3Shadow(elevation = 0) {
|
|
80
|
-
const inputRange = [0, 1, 2, 3, 4, 5];
|
|
81
|
-
const shadowHeight = [0, 1, 2, 4, 6, 8];
|
|
82
|
-
const shadowRadius = [0, 3, 6, 8, 10, 12];
|
|
83
|
-
if (elevation instanceof _reactNative.Animated.Value) {
|
|
84
|
-
if (_reactNative.Platform.OS === 'ios') {
|
|
85
|
-
return {
|
|
86
|
-
shadowColor: MD3_SHADOW_COLOR,
|
|
87
|
-
shadowOffset: {
|
|
88
|
-
width: 0,
|
|
89
|
-
height: elevation.interpolate({
|
|
90
|
-
inputRange,
|
|
91
|
-
outputRange: shadowHeight
|
|
92
|
-
})
|
|
93
|
-
},
|
|
94
|
-
shadowOpacity: elevation.interpolate({
|
|
95
|
-
inputRange: [0, 1],
|
|
96
|
-
outputRange: [0, MD3_SHADOW_OPACITY],
|
|
97
|
-
extrapolate: 'clamp'
|
|
98
|
-
}),
|
|
99
|
-
shadowRadius: elevation.interpolate({
|
|
100
|
-
inputRange,
|
|
101
|
-
outputRange: shadowRadius
|
|
102
|
-
})
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
elevation: elevation.interpolate({
|
|
107
|
-
inputRange,
|
|
108
|
-
outputRange: [0, 1, 2, 3, 4, 5]
|
|
109
|
-
})
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
if (_reactNative.Platform.OS === 'ios') {
|
|
113
|
-
return {
|
|
114
|
-
shadowColor: MD3_SHADOW_COLOR,
|
|
115
|
-
shadowOpacity: elevation ? MD3_SHADOW_OPACITY : 0,
|
|
116
|
-
shadowOffset: {
|
|
117
|
-
width: 0,
|
|
118
|
-
height: shadowHeight[elevation] || 0
|
|
119
|
-
},
|
|
120
|
-
shadowRadius: shadowRadius[elevation] || 0
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
return {
|
|
124
|
-
elevation: elevation || 0
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=shadow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","SHADOW_COLOR","SHADOW_OPACITY","MD3_SHADOW_OPACITY","MD3_SHADOW_COLOR","shadow","elevation","isV3","v3Shadow","v2Shadow","Animated","Value","inputRange","Platform","OS","shadowColor","shadowOffset","width","height","interpolate","outputRange","shadowOpacity","extrapolate","shadowRadius","radius","shadowHeight"],"sourceRoot":"../../../../../src","sources":["ui/components/styles/shadow.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,YAAY,GAAG,SAAS;AAC9B,MAAMC,cAAc,GAAG,IAAI;AAC3B,MAAMC,kBAAkB,GAAG,GAAG;AAC9B,MAAMC,gBAAgB,GAAG,SAAS;AAEnB,SAASC,MAAMA,CAC5BC,SAAkC,GAAG,CAAC,EACtCC,IAAI,GAAG,KAAK,EACgB;EAC5B,OAAOA,IAAI,GAAGC,QAAQ,CAACF,SAAS,CAAC,GAAGG,QAAQ,CAACH,SAAS,CAAC;AACzD;AAEA,SAASG,QAAQA,CAACH,SAAkC,GAAG,CAAC,EAA8B;EACpF,IAAIA,SAAS,YAAYI,qBAAQ,CAACC,KAAK,EAAE;IACvC,MAAMC,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAEtC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzB,OAAO;QACLC,WAAW,EAAEd,YAAY;QACzBe,YAAY,EAAE;UACZC,KAAK,EAAE,CAAC;UACRC,MAAM,EAAEZ,SAAS,CAACa,WAAW,CAAC;YAC5BP,UAAU;YACVQ,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;UACtC,CAAC;QACH,CAAC;QACDC,aAAa,EAAEf,SAAS,CAAC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,YAAY,CAACnB,SAAS,CAAC,IAAI;MACrC,CAAC;MACDiB,YAAY,EAAEA,YAAY,CAACjB,SAAS,CAAC,IAAI;IAC3C,CAAC;EACH;EACA,OAAO;IACLA,SAAS,EAAEA,SAAS,IAAI;EAC1B,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.screenContentStyle = exports.createScreenContentStyle = exports.SECTION_GAP_LARGE = exports.SECTION_GAP = exports.SCREEN_PADDING_VERTICAL = exports.SCREEN_PADDING_TOP = exports.SCREEN_PADDING_HORIZONTAL = exports.HEADER_PADDING_TOP_SETTINGS = exports.HEADER_PADDING_TOP_OVERVIEW = exports.COMPONENT_GAP_SMALL = exports.COMPONENT_GAP = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Reusable spacing constants for screens across the codebase
|
|
9
|
-
* These values ensure consistent padding and gaps across all screens
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
// Screen padding - used for all bottom sheet screens
|
|
13
|
-
const SCREEN_PADDING_HORIZONTAL = exports.SCREEN_PADDING_HORIZONTAL = 16;
|
|
14
|
-
const SCREEN_PADDING_VERTICAL = exports.SCREEN_PADDING_VERTICAL = 16;
|
|
15
|
-
const SCREEN_PADDING_TOP = exports.SCREEN_PADDING_TOP = 24; // Top padding for screen content (accounts for handle)
|
|
16
|
-
|
|
17
|
-
// Section gaps
|
|
18
|
-
const SECTION_GAP = exports.SECTION_GAP = 24;
|
|
19
|
-
const SECTION_GAP_LARGE = exports.SECTION_GAP_LARGE = 32;
|
|
20
|
-
|
|
21
|
-
// Component gaps
|
|
22
|
-
const COMPONENT_GAP = exports.COMPONENT_GAP = 12;
|
|
23
|
-
const COMPONENT_GAP_SMALL = exports.COMPONENT_GAP_SMALL = 8;
|
|
24
|
-
|
|
25
|
-
// Header padding
|
|
26
|
-
const HEADER_PADDING_TOP_OVERVIEW = exports.HEADER_PADDING_TOP_OVERVIEW = 38;
|
|
27
|
-
const HEADER_PADDING_TOP_SETTINGS = exports.HEADER_PADDING_TOP_SETTINGS = 40;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Reusable screen content style for all bottom sheet screens
|
|
31
|
-
* Use this for ScrollView contentContainerStyle to ensure consistent padding
|
|
32
|
-
*/
|
|
33
|
-
const screenContentStyle = exports.screenContentStyle = {
|
|
34
|
-
paddingHorizontal: SCREEN_PADDING_HORIZONTAL,
|
|
35
|
-
paddingVertical: SCREEN_PADDING_VERTICAL,
|
|
36
|
-
paddingTop: SCREEN_PADDING_TOP,
|
|
37
|
-
paddingBottom: SCREEN_PADDING_VERTICAL
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Reusable screen content style for screens that need custom top padding
|
|
42
|
-
*/
|
|
43
|
-
const createScreenContentStyle = topPadding => ({
|
|
44
|
-
paddingHorizontal: SCREEN_PADDING_HORIZONTAL,
|
|
45
|
-
paddingVertical: SCREEN_PADDING_VERTICAL,
|
|
46
|
-
paddingTop: topPadding ?? SCREEN_PADDING_TOP,
|
|
47
|
-
paddingBottom: SCREEN_PADDING_VERTICAL
|
|
48
|
-
});
|
|
49
|
-
exports.createScreenContentStyle = createScreenContentStyle;
|
|
50
|
-
//# sourceMappingURL=spacing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SCREEN_PADDING_HORIZONTAL","exports","SCREEN_PADDING_VERTICAL","SCREEN_PADDING_TOP","SECTION_GAP","SECTION_GAP_LARGE","COMPONENT_GAP","COMPONENT_GAP_SMALL","HEADER_PADDING_TOP_OVERVIEW","HEADER_PADDING_TOP_SETTINGS","screenContentStyle","paddingHorizontal","paddingVertical","paddingTop","paddingBottom","createScreenContentStyle","topPadding"],"sourceRoot":"../../../../src","sources":["ui/constants/spacing.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;;AAEA;AACO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,EAAE;AACpC,MAAME,uBAAuB,GAAAD,OAAA,CAAAC,uBAAA,GAAG,EAAE;AAClC,MAAMC,kBAAkB,GAAAF,OAAA,CAAAE,kBAAA,GAAG,EAAE,CAAC,CAAC;;AAEtC;AACO,MAAMC,WAAW,GAAAH,OAAA,CAAAG,WAAA,GAAG,EAAE;AACtB,MAAMC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,GAAG,EAAE;;AAEnC;AACO,MAAMC,aAAa,GAAAL,OAAA,CAAAK,aAAA,GAAG,EAAE;AACxB,MAAMC,mBAAmB,GAAAN,OAAA,CAAAM,mBAAA,GAAG,CAAC;;AAEpC;AACO,MAAMC,2BAA2B,GAAAP,OAAA,CAAAO,2BAAA,GAAG,EAAE;AACtC,MAAMC,2BAA2B,GAAAR,OAAA,CAAAQ,2BAAA,GAAG,EAAE;;AAE7C;AACA;AACA;AACA;AACO,MAAMC,kBAAkB,GAAAT,OAAA,CAAAS,kBAAA,GAAG;EAChCC,iBAAiB,EAAEX,yBAAyB;EAC5CY,eAAe,EAAEV,uBAAuB;EACxCW,UAAU,EAAEV,kBAAkB;EAC9BW,aAAa,EAAEZ;AACjB,CAAC;;AAED;AACA;AACA;AACO,MAAMa,wBAAwB,GAAIC,UAAmB,KAAM;EAChEL,iBAAiB,EAAEX,yBAAyB;EAC5CY,eAAe,EAAEV,uBAAuB;EACxCW,UAAU,EAAEG,UAAU,IAAIb,kBAAkB;EAC5CW,aAAa,EAAEZ;AACjB,CAAC,CAAC;AAACD,OAAA,CAAAc,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Animated } from 'react-native';
|
|
4
|
-
|
|
5
|
-
// Simple hex color manipulation without color package
|
|
6
|
-
const hexToRgb = hex => {
|
|
7
|
-
const r = Number.parseInt(hex.slice(1, 3), 16);
|
|
8
|
-
const g = Number.parseInt(hex.slice(3, 5), 16);
|
|
9
|
-
const b = Number.parseInt(hex.slice(5, 7), 16);
|
|
10
|
-
return [r, g, b];
|
|
11
|
-
};
|
|
12
|
-
const rgbToHex = (r, g, b) => {
|
|
13
|
-
return `#${[r, g, b].map(x => {
|
|
14
|
-
const hex = Math.round(x).toString(16);
|
|
15
|
-
return hex.length === 1 ? `0${hex}` : hex;
|
|
16
|
-
}).join('')}`;
|
|
17
|
-
};
|
|
18
|
-
const mixColors = (color1, color2, ratio) => {
|
|
19
|
-
const [r1, g1, b1] = hexToRgb(color1);
|
|
20
|
-
const [r2, g2, b2] = hexToRgb(color2);
|
|
21
|
-
const r = r1 + (r2 - r1) * ratio;
|
|
22
|
-
const g = g1 + (g2 - g1) * ratio;
|
|
23
|
-
const b = b1 + (b2 - b1) * ratio;
|
|
24
|
-
return rgbToHex(r, g, b);
|
|
25
|
-
};
|
|
26
|
-
export const isAnimatedValue = it => it instanceof Animated.Value;
|
|
27
|
-
|
|
28
|
-
// Overloaded signatures so each call site gets the right return type
|
|
29
|
-
// without the conditional-type narrowing that TS cannot infer inside the
|
|
30
|
-
// implementation body.
|
|
31
|
-
|
|
32
|
-
function overlay(elevation, surfaceColor = '#121212') {
|
|
33
|
-
if (isAnimatedValue(elevation)) {
|
|
34
|
-
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
35
|
-
return elevation.interpolate({
|
|
36
|
-
inputRange,
|
|
37
|
-
outputRange: inputRange.map(e => calculateColor(surfaceColor, e))
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
return calculateColor(surfaceColor, elevation);
|
|
41
|
-
}
|
|
42
|
-
export default overlay;
|
|
43
|
-
function calculateColor(surfaceColor, elevation = 1) {
|
|
44
|
-
let overlayTransparency;
|
|
45
|
-
if (elevation >= 1 && elevation <= 24) {
|
|
46
|
-
overlayTransparency = elevationOverlayTransparency[elevation];
|
|
47
|
-
} else if (elevation > 24) {
|
|
48
|
-
overlayTransparency = elevationOverlayTransparency[24];
|
|
49
|
-
} else {
|
|
50
|
-
overlayTransparency = elevationOverlayTransparency[1];
|
|
51
|
-
}
|
|
52
|
-
return mixColors(surfaceColor, '#FFFFFF', overlayTransparency * 0.01);
|
|
53
|
-
}
|
|
54
|
-
const elevationOverlayTransparency = {
|
|
55
|
-
1: 5,
|
|
56
|
-
2: 7,
|
|
57
|
-
3: 8,
|
|
58
|
-
4: 9,
|
|
59
|
-
5: 10,
|
|
60
|
-
6: 11,
|
|
61
|
-
7: 11.5,
|
|
62
|
-
8: 12,
|
|
63
|
-
9: 12.5,
|
|
64
|
-
10: 13,
|
|
65
|
-
11: 13.5,
|
|
66
|
-
12: 14,
|
|
67
|
-
13: 14.25,
|
|
68
|
-
14: 14.5,
|
|
69
|
-
15: 14.75,
|
|
70
|
-
16: 15,
|
|
71
|
-
17: 15.12,
|
|
72
|
-
18: 15.24,
|
|
73
|
-
19: 15.36,
|
|
74
|
-
20: 15.48,
|
|
75
|
-
21: 15.6,
|
|
76
|
-
22: 15.72,
|
|
77
|
-
23: 15.84,
|
|
78
|
-
24: 16
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=overlay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Animated","hexToRgb","hex","r","Number","parseInt","slice","g","b","rgbToHex","map","x","Math","round","toString","length","join","mixColors","color1","color2","ratio","r1","g1","b1","r2","g2","b2","isAnimatedValue","it","Value","overlay","elevation","surfaceColor","inputRange","interpolate","outputRange","e","calculateColor","overlayTransparency","elevationOverlayTransparency"],"sourceRoot":"../../../../../src","sources":["ui/components/styles/overlay.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA,MAAMC,QAAQ,GAAIC,GAAW,IAA+B;EAC1D,MAAMC,CAAC,GAAGC,MAAM,CAACC,QAAQ,CAACH,GAAG,CAACI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC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,EAAE;EACL,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,IAAI;EACP,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,IAAI;EACP,EAAE,EAAE,EAAE;EACN,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,EAAE;EACN,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,EAAE;EACN,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,KAAK;EACT,EAAE,EAAE;AACN,CAAC","ignoreList":[]}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Animated, Platform } from 'react-native';
|
|
4
|
-
const SHADOW_COLOR = '#000000';
|
|
5
|
-
const SHADOW_OPACITY = 0.24;
|
|
6
|
-
const MD3_SHADOW_OPACITY = 0.3;
|
|
7
|
-
const MD3_SHADOW_COLOR = '#000000';
|
|
8
|
-
export default function shadow(elevation = 0, isV3 = false) {
|
|
9
|
-
return isV3 ? v3Shadow(elevation) : v2Shadow(elevation);
|
|
10
|
-
}
|
|
11
|
-
function v2Shadow(elevation = 0) {
|
|
12
|
-
if (elevation instanceof Animated.Value) {
|
|
13
|
-
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
14
|
-
if (Platform.OS === 'ios') {
|
|
15
|
-
return {
|
|
16
|
-
shadowColor: SHADOW_COLOR,
|
|
17
|
-
shadowOffset: {
|
|
18
|
-
width: 0,
|
|
19
|
-
height: elevation.interpolate({
|
|
20
|
-
inputRange,
|
|
21
|
-
outputRange: [0, 0.5, 0.75, 2, 7, 23]
|
|
22
|
-
})
|
|
23
|
-
},
|
|
24
|
-
shadowOpacity: elevation.interpolate({
|
|
25
|
-
inputRange: [0, 1],
|
|
26
|
-
outputRange: [0, SHADOW_OPACITY],
|
|
27
|
-
extrapolate: 'clamp'
|
|
28
|
-
}),
|
|
29
|
-
shadowRadius: elevation.interpolate({
|
|
30
|
-
inputRange,
|
|
31
|
-
outputRange: [0, 0.75, 1.5, 3, 8, 24]
|
|
32
|
-
})
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
elevation: elevation.interpolate({
|
|
37
|
-
inputRange,
|
|
38
|
-
outputRange: [0, 1, 2, 3, 8, 24]
|
|
39
|
-
})
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (elevation === 0) {
|
|
43
|
-
return {};
|
|
44
|
-
}
|
|
45
|
-
let height;
|
|
46
|
-
let radius;
|
|
47
|
-
switch (elevation) {
|
|
48
|
-
case 1:
|
|
49
|
-
height = 0.5;
|
|
50
|
-
radius = 0.75;
|
|
51
|
-
break;
|
|
52
|
-
case 2:
|
|
53
|
-
height = 0.75;
|
|
54
|
-
radius = 1.5;
|
|
55
|
-
break;
|
|
56
|
-
default:
|
|
57
|
-
height = elevation - 1;
|
|
58
|
-
radius = elevation;
|
|
59
|
-
}
|
|
60
|
-
if (Platform.OS === 'ios') {
|
|
61
|
-
return {
|
|
62
|
-
shadowColor: SHADOW_COLOR,
|
|
63
|
-
shadowOffset: {
|
|
64
|
-
width: 0,
|
|
65
|
-
height
|
|
66
|
-
},
|
|
67
|
-
shadowOpacity: SHADOW_OPACITY,
|
|
68
|
-
shadowRadius: radius
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
elevation: elevation
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
function v3Shadow(elevation = 0) {
|
|
76
|
-
const inputRange = [0, 1, 2, 3, 4, 5];
|
|
77
|
-
const shadowHeight = [0, 1, 2, 4, 6, 8];
|
|
78
|
-
const shadowRadius = [0, 3, 6, 8, 10, 12];
|
|
79
|
-
if (elevation instanceof Animated.Value) {
|
|
80
|
-
if (Platform.OS === 'ios') {
|
|
81
|
-
return {
|
|
82
|
-
shadowColor: MD3_SHADOW_COLOR,
|
|
83
|
-
shadowOffset: {
|
|
84
|
-
width: 0,
|
|
85
|
-
height: elevation.interpolate({
|
|
86
|
-
inputRange,
|
|
87
|
-
outputRange: shadowHeight
|
|
88
|
-
})
|
|
89
|
-
},
|
|
90
|
-
shadowOpacity: elevation.interpolate({
|
|
91
|
-
inputRange: [0, 1],
|
|
92
|
-
outputRange: [0, MD3_SHADOW_OPACITY],
|
|
93
|
-
extrapolate: 'clamp'
|
|
94
|
-
}),
|
|
95
|
-
shadowRadius: elevation.interpolate({
|
|
96
|
-
inputRange,
|
|
97
|
-
outputRange: shadowRadius
|
|
98
|
-
})
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
elevation: elevation.interpolate({
|
|
103
|
-
inputRange,
|
|
104
|
-
outputRange: [0, 1, 2, 3, 4, 5]
|
|
105
|
-
})
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
if (Platform.OS === 'ios') {
|
|
109
|
-
return {
|
|
110
|
-
shadowColor: MD3_SHADOW_COLOR,
|
|
111
|
-
shadowOpacity: elevation ? MD3_SHADOW_OPACITY : 0,
|
|
112
|
-
shadowOffset: {
|
|
113
|
-
width: 0,
|
|
114
|
-
height: shadowHeight[elevation] || 0
|
|
115
|
-
},
|
|
116
|
-
shadowRadius: shadowRadius[elevation] || 0
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
return {
|
|
120
|
-
elevation: elevation || 0
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=shadow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Animated","Platform","SHADOW_COLOR","SHADOW_OPACITY","MD3_SHADOW_OPACITY","MD3_SHADOW_COLOR","shadow","elevation","isV3","v3Shadow","v2Shadow","Value","inputRange","OS","shadowColor","shadowOffset","width","height","interpolate","outputRange","shadowOpacity","extrapolate","shadowR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screens across the codebase
|
|
5
|
-
* These values ensure consistent padding and gaps across all screens
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Screen padding - used for all bottom sheet screens
|
|
9
|
-
export const SCREEN_PADDING_HORIZONTAL = 16;
|
|
10
|
-
export const SCREEN_PADDING_VERTICAL = 16;
|
|
11
|
-
export const SCREEN_PADDING_TOP = 24; // Top padding for screen content (accounts for handle)
|
|
12
|
-
|
|
13
|
-
// Section gaps
|
|
14
|
-
export const SECTION_GAP = 24;
|
|
15
|
-
export const SECTION_GAP_LARGE = 32;
|
|
16
|
-
|
|
17
|
-
// Component gaps
|
|
18
|
-
export const COMPONENT_GAP = 12;
|
|
19
|
-
export const COMPONENT_GAP_SMALL = 8;
|
|
20
|
-
|
|
21
|
-
// Header padding
|
|
22
|
-
export const HEADER_PADDING_TOP_OVERVIEW = 38;
|
|
23
|
-
export const HEADER_PADDING_TOP_SETTINGS = 40;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Reusable screen content style for all bottom sheet screens
|
|
27
|
-
* Use this for ScrollView contentContainerStyle to ensure consistent padding
|
|
28
|
-
*/
|
|
29
|
-
export const screenContentStyle = {
|
|
30
|
-
paddingHorizontal: SCREEN_PADDING_HORIZONTAL,
|
|
31
|
-
paddingVertical: SCREEN_PADDING_VERTICAL,
|
|
32
|
-
paddingTop: SCREEN_PADDING_TOP,
|
|
33
|
-
paddingBottom: SCREEN_PADDING_VERTICAL
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Reusable screen content style for screens that need custom top padding
|
|
38
|
-
*/
|
|
39
|
-
export const createScreenContentStyle = topPadding => ({
|
|
40
|
-
paddingHorizontal: SCREEN_PADDING_HORIZONTAL,
|
|
41
|
-
paddingVertical: SCREEN_PADDING_VERTICAL,
|
|
42
|
-
paddingTop: topPadding ?? SCREEN_PADDING_TOP,
|
|
43
|
-
paddingBottom: SCREEN_PADDING_VERTICAL
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=spacing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SCREEN_PADDING_HORIZONTAL","SCREEN_PADDING_VERTICAL","SCREEN_PADDING_TOP","SECTION_GAP","SECTION_GAP_LARGE","COMPONENT_GAP","COMPONENT_GAP_SMALL","HEADER_PADDING_TOP_OVERVIEW","HEADER_PADDING_TOP_SETTINGS","screenContentStyle","paddingHorizontal","paddingVertical","paddingTop","paddingBottom","createScreenContentStyle","topPadding"],"sourceRoot":"../../../../src","sources":["ui/constants/spacing.ts"],"mappings":";;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,yBAAyB,GAAG,EAAE;AAC3C,OAAO,MAAMC,uBAAuB,GAAG,EAAE;AACzC,OAAO,MAAMC,kBAAkB,GAAG,EAAE,CAAC,CAAC;;AAEtC;AACA,OAAO,MAAMC,WAAW,GAAG,EAAE;AAC7B,OAAO,MAAMC,iBAAiB,GAAG,EAAE;;AAEnC;AACA,OAAO,MAAMC,aAAa,GAAG,EAAE;AAC/B,OAAO,MAAMC,mBAAmB,GAAG,CAAC;;AAEpC;AACA,OAAO,MAAMC,2BAA2B,GAAG,EAAE;AAC7C,OAAO,MAAMC,2BAA2B,GAAG,EAAE;;AAE7C;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,iBAAiB,EAAEV,yBAAyB;EAC5CW,eAAe,EAAEV,uBAAuB;EACxCW,UAAU,EAAEV,kBAAkB;EAC9BW,aAAa,EAAEZ;AACjB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMa,wBAAwB,GAAIC,UAAmB,KAAM;EAChEL,iBAAiB,EAAEV,yBAAyB;EAC5CW,eAAe,EAAEV,uBAAuB;EACxCW,UAAU,EAAEG,UAAU,IAAIb,kBAAkB;EAC5CW,aAAa,EAAEZ;AACjB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Animated } from 'react-native';
|
|
2
|
-
export declare const isAnimatedValue: (it: number | string | Animated.AnimatedInterpolation<number | string>) => it is Animated.Value;
|
|
3
|
-
declare function overlay(elevation: number, surfaceColor?: string): string;
|
|
4
|
-
declare function overlay(elevation: Animated.Value, surfaceColor?: string): Animated.AnimatedInterpolation<number | string>;
|
|
5
|
-
export default overlay;
|
|
6
|
-
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/styles/overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA4BxC,eAAO,MAAM,eAAe,GAC1B,IAAI,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,KACpE,EAAE,IAAI,QAAQ,CAAC,KAAqC,CAAC;AAKxD,iBAAS,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AACnE,iBAAS,OAAO,CACd,SAAS,EAAE,QAAQ,CAAC,KAAK,EACzB,YAAY,CAAC,EAAE,MAAM,GACpB,QAAQ,CAAC,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAiBnD,eAAe,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/styles/shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOvF,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,SAAS,GAAE,MAAM,GAAG,QAAQ,CAAC,KAAS,EACtC,IAAI,UAAQ,GACX,SAAS,GAAG,cAAc,CAE5B"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reusable spacing constants for screens across the codebase
|
|
3
|
-
* These values ensure consistent padding and gaps across all screens
|
|
4
|
-
*/
|
|
5
|
-
export declare const SCREEN_PADDING_HORIZONTAL = 16;
|
|
6
|
-
export declare const SCREEN_PADDING_VERTICAL = 16;
|
|
7
|
-
export declare const SCREEN_PADDING_TOP = 24;
|
|
8
|
-
export declare const SECTION_GAP = 24;
|
|
9
|
-
export declare const SECTION_GAP_LARGE = 32;
|
|
10
|
-
export declare const COMPONENT_GAP = 12;
|
|
11
|
-
export declare const COMPONENT_GAP_SMALL = 8;
|
|
12
|
-
export declare const HEADER_PADDING_TOP_OVERVIEW = 38;
|
|
13
|
-
export declare const HEADER_PADDING_TOP_SETTINGS = 40;
|
|
14
|
-
/**
|
|
15
|
-
* Reusable screen content style for all bottom sheet screens
|
|
16
|
-
* Use this for ScrollView contentContainerStyle to ensure consistent padding
|
|
17
|
-
*/
|
|
18
|
-
export declare const screenContentStyle: {
|
|
19
|
-
paddingHorizontal: number;
|
|
20
|
-
paddingVertical: number;
|
|
21
|
-
paddingTop: number;
|
|
22
|
-
paddingBottom: number;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Reusable screen content style for screens that need custom top padding
|
|
26
|
-
*/
|
|
27
|
-
export declare const createScreenContentStyle: (topPadding?: number) => {
|
|
28
|
-
paddingHorizontal: number;
|
|
29
|
-
paddingVertical: number;
|
|
30
|
-
paddingTop: number;
|
|
31
|
-
paddingBottom: number;
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=spacing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../../../../src/ui/constants/spacing.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAGH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAGrC,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAGpC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,MAAM;;;;;CAK1D,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Animated } from 'react-native';
|
|
2
|
-
export declare const isAnimatedValue: (it: number | string | Animated.AnimatedInterpolation<number | string>) => it is Animated.Value;
|
|
3
|
-
declare function overlay(elevation: number, surfaceColor?: string): string;
|
|
4
|
-
declare function overlay(elevation: Animated.Value, surfaceColor?: string): Animated.AnimatedInterpolation<number | string>;
|
|
5
|
-
export default overlay;
|
|
6
|
-
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/styles/overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA4BxC,eAAO,MAAM,eAAe,GAC1B,IAAI,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,KACpE,EAAE,IAAI,QAAQ,CAAC,KAAqC,CAAC;AAKxD,iBAAS,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AACnE,iBAAS,OAAO,CACd,SAAS,EAAE,QAAQ,CAAC,KAAK,EACzB,YAAY,CAAC,EAAE,MAAM,GACpB,QAAQ,CAAC,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAiBnD,eAAe,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/styles/shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOvF,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,SAAS,GAAE,MAAM,GAAG,QAAQ,CAAC,KAAS,EACtC,IAAI,UAAQ,GACX,SAAS,GAAG,cAAc,CAE5B"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reusable spacing constants for screens across the codebase
|
|
3
|
-
* These values ensure consistent padding and gaps across all screens
|
|
4
|
-
*/
|
|
5
|
-
export declare const SCREEN_PADDING_HORIZONTAL = 16;
|
|
6
|
-
export declare const SCREEN_PADDING_VERTICAL = 16;
|
|
7
|
-
export declare const SCREEN_PADDING_TOP = 24;
|
|
8
|
-
export declare const SECTION_GAP = 24;
|
|
9
|
-
export declare const SECTION_GAP_LARGE = 32;
|
|
10
|
-
export declare const COMPONENT_GAP = 12;
|
|
11
|
-
export declare const COMPONENT_GAP_SMALL = 8;
|
|
12
|
-
export declare const HEADER_PADDING_TOP_OVERVIEW = 38;
|
|
13
|
-
export declare const HEADER_PADDING_TOP_SETTINGS = 40;
|
|
14
|
-
/**
|
|
15
|
-
* Reusable screen content style for all bottom sheet screens
|
|
16
|
-
* Use this for ScrollView contentContainerStyle to ensure consistent padding
|
|
17
|
-
*/
|
|
18
|
-
export declare const screenContentStyle: {
|
|
19
|
-
paddingHorizontal: number;
|
|
20
|
-
paddingVertical: number;
|
|
21
|
-
paddingTop: number;
|
|
22
|
-
paddingBottom: number;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Reusable screen content style for screens that need custom top padding
|
|
26
|
-
*/
|
|
27
|
-
export declare const createScreenContentStyle: (topPadding?: number) => {
|
|
28
|
-
paddingHorizontal: number;
|
|
29
|
-
paddingVertical: number;
|
|
30
|
-
paddingTop: number;
|
|
31
|
-
paddingBottom: number;
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=spacing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../../../../src/ui/constants/spacing.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAGH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAGrC,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAGpC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,MAAM;;;;;CAK1D,CAAC"}
|