Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,433 @@
|
||||
/* Metro module 1308; source: design/void/Button/native/Button.tsx; dependencies: [31, 27, 661, 1309, 33, 4501, 697, 4000, 6235, 477, 11977, 8002, 4002, 6748, 4578, 2] */
|
||||
function _fun14423(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#14423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:6, offset: 0x00e05963, size: 2372 bytes, params: 8, frame: 34
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = getButtonStyles;
|
||||
const closure2 = ButtonText;
|
||||
const closure3 = getRedesignVariant;
|
||||
const closure4 = getRedesignSize;
|
||||
const closure5 = Button_14432;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.ActivityIndicator;
|
||||
const env0_5 = value.Pressable;
|
||||
const env0_6 = value.View;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
const env0_7 = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
|
||||
object2 = {button: {'flexDirection': 'row', 'flexGrow': 1, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'alignSelf': 'stretch', 'borderRadius': 3}, buttonShrink: {'flexGrow': 0, 'alignSelf': 'flex-start',
|
||||
'paddingHorizontal': 10}};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object2.buttonBrandDefault = {backgroundColor: BACKGROUND_BRAND};
|
||||
let BRAND_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_600;
|
||||
object2.buttonBrandDarkDefault = {backgroundColor: BRAND_600};
|
||||
let RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
object2.buttonRedDefault = {backgroundColor: RED_400};
|
||||
let RED_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_500;
|
||||
object2.buttonRedDarkDefault = {backgroundColor: RED_500};
|
||||
const CONTROL_CONNECTED_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CONNECTED_BACKGROUND_DEFAULT;
|
||||
object2.buttonGreenDefault = {backgroundColor: CONTROL_CONNECTED_BACKGROUND_DEFAULT};
|
||||
let GREEN_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_500;
|
||||
object2.buttonGreenDarkDefault = {backgroundColor: GREEN_500};
|
||||
let PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object2.buttonGreyDarkDefault = {backgroundColor: PRIMARY_500};
|
||||
PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object2.buttonLightgreyDefault = {backgroundColor: PRIMARY_500};
|
||||
PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object2.buttonLightgreyDarkDefault = {backgroundColor: PRIMARY_500};
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
|
||||
object2.buttonBrandDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, colorUtilsModule, [BRAND_500, 0.5])};
|
||||
const value3 = colorUtilsModule;
|
||||
hexWithOpacity = value3.hexWithOpacity;
|
||||
BRAND_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_600;
|
||||
object2.buttonBrandDarkDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value3, [BRAND_600, 0.5])};
|
||||
const value4 = colorUtilsModule;
|
||||
hexWithOpacity = value4.hexWithOpacity;
|
||||
RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
object2.buttonRedDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value4, [RED_400, 0.5])};
|
||||
const value5 = colorUtilsModule;
|
||||
hexWithOpacity = value5.hexWithOpacity;
|
||||
RED_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_500;
|
||||
object2.buttonRedDarkDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value5, [RED_500, 0.5])};
|
||||
const value6 = colorUtilsModule;
|
||||
hexWithOpacity = value6.hexWithOpacity;
|
||||
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
|
||||
object2.buttonGreenDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value6, [GREEN_360, 0.5])};
|
||||
const value7 = colorUtilsModule;
|
||||
hexWithOpacity = value7.hexWithOpacity;
|
||||
GREEN_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_500;
|
||||
object2.buttonGreenDarkDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value7, [GREEN_500, 0.5])};
|
||||
const value8 = colorUtilsModule;
|
||||
hexWithOpacity = value8.hexWithOpacity;
|
||||
PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object2.buttonGreyDarkDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value8, [PRIMARY_500, 0.5])};
|
||||
const value9 = colorUtilsModule;
|
||||
hexWithOpacity = value9.hexWithOpacity;
|
||||
PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object2.buttonLightgreyDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value9, [PRIMARY_500, 0.5])};
|
||||
const value10 = colorUtilsModule;
|
||||
hexWithOpacity = value10.hexWithOpacity;
|
||||
PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object2.buttonLightgreyDarkDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value10, [PRIMARY_500, 0.5])};
|
||||
object2.buttonTransparentDefault = {backgroundColor: 'transparent'};
|
||||
object2.buttonTransparentDarkDefault = {backgroundColor: 'transparent'};
|
||||
object2.buttonTransparentDisabled = {backgroundColor: 'transparent'};
|
||||
object2.buttonTransparentDarkDisabled = {backgroundColor: 'transparent'};
|
||||
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.buttonWhiteDefault = {backgroundColor: WHITE};
|
||||
const value11 = colorUtilsModule;
|
||||
hexWithOpacity = value11.hexWithOpacity;
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
object2.buttonWhiteDisabled = {backgroundColor: Reflect.apply(hexWithOpacity, value11, [WHITE, 0.5])};
|
||||
object2.buttonFilled = {};
|
||||
object2.buttonLink = {};
|
||||
object2.buttonLinkDefault = {};
|
||||
const BUTTON_OUTLINED_BORDER = (require(6235) /* metro dependency 6235: LegacyTokens */).BUTTON_OUTLINED_BORDER;
|
||||
object2.buttonOutlined = {'backgroundColor': 'transparent', 'borderWidth': 1, 'borderStyle': 'solid',
|
||||
borderColor: BUTTON_OUTLINED_BORDER};
|
||||
object2.buttonXsmall = {minHeight: 24};
|
||||
object2.buttonSmall = {minHeight: 32};
|
||||
object2.buttonMedium = {minHeight: 40};
|
||||
object2.buttonLarge = {minHeight: 46};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
||||
object2.text = {color: WHITE, fontFamily: PRIMARY_SEMIBOLD, flexShrink: 1};
|
||||
object2.textXsmall = {fontSize: 12};
|
||||
object2.textSmall = {fontSize: 14};
|
||||
object2.textMedium = {fontSize: 14};
|
||||
object2.textLarge = {fontSize: 20};
|
||||
object2.textDisabled = {opacity: 0.6};
|
||||
object2.textDefault = {opacity: 1};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.textBrand = {color: WHITE};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.textRed = {color: WHITE};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.textGreen = {color: WHITE};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.textGrey = {color: WHITE};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.textLightgrey = {color: WHITE};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.textWhite = {color: WHITE};
|
||||
object2.textFilled = {};
|
||||
const DARK_PRIMARY_100_LIGHT_PRIMARY_500 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_100_LIGHT_PRIMARY_500;
|
||||
object2.textOutlined = {color: DARK_PRIMARY_100_LIGHT_PRIMARY_500};
|
||||
object2.faded = {opacity: 0.5};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.buttonWhiteDarkDefault = {backgroundColor: WHITE};
|
||||
const TEXT_LINK = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK;
|
||||
object2.textLink = {color: TEXT_LINK};
|
||||
object2.buttonPrimaryDefault = {backgroundColor: DARK_PRIMARY_100_LIGHT_PRIMARY_500};
|
||||
object2.buttonPrimaryDarkDefault = {backgroundColor: DARK_PRIMARY_100_LIGHT_PRIMARY_500};
|
||||
const DARK_PRIMARY_500_LIGHT_PRIMARY_430 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_500_LIGHT_PRIMARY_430;
|
||||
object2.buttonGreyDefault = {backgroundColor: DARK_PRIMARY_500_LIGHT_PRIMARY_430};
|
||||
const DARK_PRIMARY_500_LIGHT_PRIMARY_100 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_500_LIGHT_PRIMARY_100;
|
||||
object2.textPrimary = {color: DARK_PRIMARY_500_LIGHT_PRIMARY_100};
|
||||
object2.textTransparent = {color: DARK_PRIMARY_100_LIGHT_PRIMARY_500};
|
||||
const BUTTON_PRIMARY_DISABLED_BACKGROUND = (require(6235) /* metro dependency 6235: LegacyTokens */).BUTTON_PRIMARY_DISABLED_BACKGROUND;
|
||||
object2.buttonPrimaryDisabled = {backgroundColor: BUTTON_PRIMARY_DISABLED_BACKGROUND};
|
||||
object2.buttonPrimaryDarkDisabled = {backgroundColor: BUTTON_PRIMARY_DISABLED_BACKGROUND};
|
||||
const BUTTON_GREY_DISABLED_BACKGROUND = (require(6235) /* metro dependency 6235: LegacyTokens */).BUTTON_GREY_DISABLED_BACKGROUND;
|
||||
object2.buttonGreyDisabled = {backgroundColor: BUTTON_GREY_DISABLED_BACKGROUND};
|
||||
value = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {FILLED: 'filled', LINK: 'link', OUTLINED: 'outlined'};
|
||||
const object3 = {BRAND: 'brand', RED: 'red', GREEN: 'green', PRIMARY: 'primary', TRANSPARENT: 'transparent',
|
||||
GREY: 'grey', LIGHTGREY: 'lightgrey', WHITE: 'white', LINK: 'link'};
|
||||
const env0_14 = {DEFAULT: 'Default', DISABLED: 'Disabled'};
|
||||
const object4 = {XSMALL: 'xsmall', SMALL: 'small', MEDIUM: 'medium', LARGE: 'large'};
|
||||
closure5.Looks = object2;
|
||||
closure5.Colors = object3;
|
||||
closure5.Sizes = object4;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/void/Button/native/Button.tsx');
|
||||
exports.default = closure5;
|
||||
exports.BUTTON_CORNER_RADIUS = 3;
|
||||
exports.useButtonStyles = value;
|
||||
exports.ButtonLooks = object2;
|
||||
exports.ButtonColors = object3;
|
||||
exports.ButtonSizes = object4;
|
||||
exports.getButtonStyles = closure;
|
||||
exports.ButtonText = closure2;
|
||||
exports.getRedesignVariant = closure3;
|
||||
exports.getRedesignSize = closure4;
|
||||
}
|
||||
|
||||
function getButtonColorsToTextStyles({textBrand, textRed, textGreen, textPrimary, textTransparent, textGrey, textLightgrey, textWhite, textLink}) { // fn#14424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:4472, offset: 0x00e062a7, size: 199 bytes, params: 2, frame: 5
|
||||
const BRAND = env0_13.BRAND;
|
||||
const RED = env0_13.RED;
|
||||
const GREEN = env0_13.GREEN;
|
||||
const PRIMARY = env0_13.PRIMARY;
|
||||
const TRANSPARENT = env0_13.TRANSPARENT;
|
||||
const GREY = env0_13.GREY;
|
||||
const LIGHTGREY = env0_13.LIGHTGREY;
|
||||
const WHITE = env0_13.WHITE;
|
||||
const LINK = env0_13.LINK;
|
||||
return {[BRAND]: textBrand, [RED]: textRed, [GREEN]: textGreen, [PRIMARY]: textPrimary,
|
||||
[TRANSPARENT]: textTransparent, [GREY]: textGrey, [LIGHTGREY]: textLightgrey, [WHITE]: textWhite,
|
||||
[LINK]: textLink};
|
||||
}
|
||||
|
||||
function getButtonSizesToTextStyles({textXsmall, textSmall, textMedium, textLarge}) { // fn#14425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:4734, offset: 0x00e0636e, size: 94 bytes, params: 2, frame: 5
|
||||
const XSMALL = env0_15.XSMALL;
|
||||
const SMALL = env0_15.SMALL;
|
||||
const MEDIUM = env0_15.MEDIUM;
|
||||
const LARGE = env0_15.LARGE;
|
||||
return {[XSMALL]: textXsmall, [SMALL]: textSmall, [MEDIUM]: textMedium, [LARGE]: textLarge};
|
||||
}
|
||||
|
||||
function getButtonLooksToTextStyles({textFilled, textLink, textOutlined}) { // fn#14426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:4873, offset: 0x00e063cc, size: 73 bytes, params: 2, frame: 5
|
||||
const FILLED = env0_12.FILLED;
|
||||
const LINK = env0_12.LINK;
|
||||
const OUTLINED = env0_12.OUTLINED;
|
||||
return {[FILLED]: textFilled, [LINK]: textLink, [OUTLINED]: textOutlined};
|
||||
}
|
||||
|
||||
function getTextStyles({color, look, size, disabled}, a1) { // fn#14427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:4992, offset: 0x00e06415, size: 125 bytes, params: 3, frame: 17
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
const items2 = [a1.text];
|
||||
items2[1] = getButtonColorsToTextStyles(a1)[color];
|
||||
items2[2] = getButtonLooksToTextStyles(a1)[look];
|
||||
items2[3] = disabled ? a1.textDisabled : a1.textDefault;
|
||||
items2[4] = getButtonSizesToTextStyles(a1)[size];
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getButtonStyles({color, size, look, disabled, shrink, pressed, darkenOnPress, style}, a1) { // fn#14428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:5202, offset: 0x00e06492, size: 366 bytes, params: 3, frame: 28
|
||||
var r15;
|
||||
var faded;
|
||||
var moduleValue;
|
||||
var moduleValue5;
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
shrink = !(shrink === undefined) && shrink;
|
||||
pressed = !(pressed === undefined) && pressed;
|
||||
darkenOnPress = !(darkenOnPress === undefined) && darkenOnPress;
|
||||
const binding = env0_14;
|
||||
const r16 = disabled ? binding.DISABLED : binding.DEFAULT;
|
||||
if (pressed) {
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
r15 = moduleValue.isAndroid() ? color : '' + color + 'Dark';
|
||||
} else {
|
||||
r15 = color;
|
||||
}
|
||||
const items2 = [a1.button];
|
||||
items2[1] = shrink ? a1.buttonShrink : null;
|
||||
const stylesheetUtilsModule = require(11977) /* metro dependency 11977: StylesheetUtils */;
|
||||
let getClass = stylesheetUtilsModule.getClass;
|
||||
items2[2] = Reflect.apply(getClass, stylesheetUtilsModule, [a1, 'button', r15, r16]);
|
||||
const moduleValue3 = stylesheetUtilsModule;
|
||||
getClass = moduleValue3.getClass;
|
||||
items2[3] = Reflect.apply(getClass, moduleValue3, [a1, 'button', size]);
|
||||
const moduleValue4 = stylesheetUtilsModule;
|
||||
getClass = moduleValue4.getClass;
|
||||
items2[4] = Reflect.apply(getClass, moduleValue4, [a1, 'button', look]);
|
||||
if (darkenOnPress) {
|
||||
faded = undefined;
|
||||
} else {
|
||||
moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
faded = moduleValue5.isAndroid() ? undefined : pressed ? a1.faded : undefined;
|
||||
}
|
||||
items2[5] = faded;
|
||||
items2[6] = style;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function ButtonText({children, color, look, size, disabled, style}) { // fn#14429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:5569, offset: 0x00e06600, size: 227 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var jsxRuntimeEnv0_9Binding;
|
||||
var LegacyText;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
if (typeof children !== 'function') {
|
||||
LegacyText = importDefault(8002) /* metro dependency 8002: LegacyText */;
|
||||
value = getTextStyles({color: color, look: look, size: size, disabled: disabled}, styles);
|
||||
value = <LegacyText maxFontSizeMultiplier={2} numberOfLines={1} style={[value, style]}>{children}</LegacyText>;
|
||||
r0 = value;
|
||||
} else {
|
||||
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
value = getTextStyles({color: color, look: look, size: size, disabled: disabled}, styles);
|
||||
value = <>{children({style: [value, style]})}</>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getRedesignVariant(a0) { // fn#14430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:5891, offset: 0x00e066e3, size: 124 bytes, params: 2, frame: 3
|
||||
const GREEN = env0_13.GREEN;
|
||||
if (GREEN === a0) {
|
||||
return 'active';
|
||||
}
|
||||
const RED = env0_13.RED;
|
||||
if (RED === a0) {
|
||||
return 'destructive';
|
||||
}
|
||||
const GREY = env0_13.GREY;
|
||||
if (GREY === a0) {
|
||||
return 'secondary';
|
||||
}
|
||||
const LIGHTGREY = env0_13.LIGHTGREY;
|
||||
if (LIGHTGREY === a0) {
|
||||
return 'secondary';
|
||||
}
|
||||
const TRANSPARENT = env0_13.TRANSPARENT;
|
||||
if (TRANSPARENT === a0) {
|
||||
return 'secondary';
|
||||
}
|
||||
const WHITE = env0_13.WHITE;
|
||||
if (WHITE === a0) {
|
||||
return 'primary-overlay';
|
||||
}
|
||||
return 'primary';
|
||||
}
|
||||
|
||||
function getRedesignSize(a0) { // fn#14431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:6119, offset: 0x00e0675f, size: 84 bytes, params: 2, frame: 3
|
||||
const LARGE = env0_15.LARGE;
|
||||
if (LARGE === a0) {
|
||||
return 'lg';
|
||||
}
|
||||
const MEDIUM = env0_15.MEDIUM;
|
||||
if (MEDIUM === a0) {
|
||||
return 'md';
|
||||
}
|
||||
const SMALL = env0_15.SMALL;
|
||||
if (SMALL === a0) {
|
||||
return 'sm';
|
||||
}
|
||||
const XSMALL = env0_15.XSMALL;
|
||||
if (XSMALL === a0) {
|
||||
return 'sm';
|
||||
}
|
||||
}
|
||||
|
||||
function Button_14432({look = env0_12.FILLED, color = env0_13.BRAND, size = env0_15.MEDIUM, text, shrink, disabled, loading, loadingColorDark = importDefault(dependencyMap[6]).unsafe_rawColors.WHITE, loadingColorLight = importDefault(dependencyMap[6]).unsafe_rawColors.PRIMARY_500, textStyle, style, accessibilityRole, accessibilityLabel, accessibilityHint, accessibilityState, accessibilityActions, onAccessibilityAction, accessibilityValue, darkenOnPress, renderIcon, renderRightIcon, renderShine, renderLinearGradient, testID, onPress, onPressIn, onPressOut, onTouchStart, onTouchEnd, onLongPress, foregroundRipple, cornerRadius}) { // fn#14432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:6245, offset: 0x00e067b3, size: 1182 bytes, params: 2, frame: 52
|
||||
var r3;
|
||||
var r26;
|
||||
var r27;
|
||||
var r7;
|
||||
var r13;
|
||||
var r0;
|
||||
var value16;
|
||||
var items2;
|
||||
var Button;
|
||||
var value21;
|
||||
let value = undefined;
|
||||
const env0_3 = text;
|
||||
shrink = !(shrink === value) && shrink;
|
||||
disabled = !(disabled === value) && disabled;
|
||||
loading = !(loading === value) && loading;
|
||||
accessibilityRole = accessibilityRole === value ? 'button' : accessibilityRole;
|
||||
const styles = useStyles();
|
||||
const sharedModule = require(4002) /* metro dependency 4002: shared */;
|
||||
const useThemeContext = sharedModule.useThemeContext;
|
||||
const theme = Reflect.apply(useThemeContext, sharedModule, []).theme;
|
||||
let binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
let object = [color, disabled, loading, look, size, text, textStyle, loadingColorDark, loadingColorLight, theme];
|
||||
const value12 = Reflect.apply(useMemo, binding, [_fun14433, object]);
|
||||
const value13 = env0_3.useMemo(function() {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, accessibilityState, r2);
|
||||
object['disabled'] = disabled;
|
||||
return object;
|
||||
}, [disabled, accessibilityState]);
|
||||
const value14 = env0_3.useCallback(_fun14435, [color, darkenOnPress, size, look, disabled, shrink, style, styles]);
|
||||
const value15 = env0_3.useMemo(function() {
|
||||
return getThemedRippleConfig({foreground: foregroundRipple, cornerRadius: cornerRadius ?? 3});
|
||||
}, [foregroundRipple, cornerRadius]);
|
||||
binding = env0_3;
|
||||
const useContext = binding.useContext;
|
||||
const RedesignCompatContext = (require(6748) /* metro dependency 6748: RedesignCompatNative */).RedesignCompatContext;
|
||||
if (Reflect.apply(useContext, binding, [RedesignCompatContext])) {
|
||||
if (look !== env0_12.LINK) {
|
||||
object = {style: style};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var buttonProps = {text: text, variant: getRedesignVariant(color), size: getRedesignSize(size),
|
||||
accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint,
|
||||
accessibilityActions: accessibilityActions, onAccessibilityAction: onAccessibilityAction,
|
||||
onPress: onPress,
|
||||
onPressIn: onPressIn, onPressOut: onPressOut, onTouchStart: onTouchStart,
|
||||
disabled: disabled || loading};
|
||||
value21 = null;
|
||||
r13 = value21 == renderIcon ? value : renderIcon();
|
||||
r13 = value21 == r13 ? value21 == renderRightIcon ? value : renderRightIcon() : r13;
|
||||
buttonProps.icon = value21 != r13 ? r13 : value21;
|
||||
buttonProps.iconPosition = value21 != renderIcon ? 'start' : value21 != renderRightIcon ? 'end' : value;
|
||||
buttonProps.grow = !shrink;
|
||||
value = <View {...object}><Button {...buttonProps} /></View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
var pressableBindingProps = {accessibilityRole: accessibilityRole, accessibilityState: value13,
|
||||
accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint,
|
||||
accessibilityActions: accessibilityActions, onAccessibilityAction: onAccessibilityAction,
|
||||
accessibilityValue: accessibilityValue, onPress: onPress, onPressIn: onPressIn, onPressOut: onPressOut,
|
||||
onTouchStart: onTouchStart, onTouchEnd: onTouchEnd, onLongPress: onLongPress,
|
||||
disabled: disabled || loading,
|
||||
android_ripple: value15, testID: testID, style: value14};
|
||||
value16 = null;
|
||||
r3 = value16 == renderLinearGradient ? value : renderLinearGradient();
|
||||
r26 = value16 != r3 ? r3 : value16;
|
||||
items2 = [r26];
|
||||
r27 = value16 == renderIcon ? value : renderIcon();
|
||||
r26 = value16 != r27 ? r27 : value16;
|
||||
items2[1] = r26;
|
||||
items2[2] = value12;
|
||||
r26 = value16 == renderRightIcon ? value : renderRightIcon();
|
||||
r7 = value16 != r26 ? r26 : value16;
|
||||
items2[3] = r7;
|
||||
r7 = value16 == renderShine ? value : renderShine();
|
||||
items2[4] = value16 != r7 ? r7 : value16;
|
||||
value = <Pressable {...pressableBindingProps}>{items2}</Pressable>;
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
var pressableBindingProps = {accessibilityRole: accessibilityRole, accessibilityState: value13,
|
||||
accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint,
|
||||
accessibilityActions: accessibilityActions, onAccessibilityAction: onAccessibilityAction,
|
||||
accessibilityValue: accessibilityValue, onPress: onPress, onPressIn: onPressIn, onPressOut: onPressOut,
|
||||
onTouchStart: onTouchStart, onTouchEnd: onTouchEnd, onLongPress: onLongPress, disabled: disabled || loading,
|
||||
android_ripple: value15, testID: testID, style: value14};
|
||||
value16 = null;
|
||||
r3 = value16 == renderLinearGradient ? value : renderLinearGradient();
|
||||
r26 = value16 != r3 ? r3 : value16;
|
||||
items2 = [r26];
|
||||
r27 = value16 == renderIcon ? value : renderIcon();
|
||||
r26 = value16 != r27 ? r27 : value16;
|
||||
items2[1] = r26;
|
||||
items2[2] = value12;
|
||||
r26 = value16 == renderRightIcon ? value : renderRightIcon();
|
||||
r7 = value16 != r26 ? r26 : value16;
|
||||
items2[3] = r7;
|
||||
r7 = value16 == renderShine ? value : renderShine();
|
||||
items2[4] = value16 != r7 ? r7 : value16;
|
||||
value = <Pressable {...pressableBindingProps}>{items2}</Pressable>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun14433() { // fn#14433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:6923, offset: 0x00e06c51, size: 150 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var moduleValue;
|
||||
if (loading) {
|
||||
moduleValue = require(4002) /* metro dependency 4002: shared */;
|
||||
r0 = <ActivityIndicator color={moduleValue.isThemeDark(theme) ? env0_7 : env0_8} />;
|
||||
} else {
|
||||
r0 = <ButtonText color={env0_1} look={env0_0} size={env0_2} disabled={disabled} style={textStyle}>{text}</ButtonText>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun14435({pressed}) { // fn#14435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1435:7128, offset: 0x00e06d06, size: 99 bytes, params: 2, frame: 14
|
||||
return getButtonStyles({color: env0_1, size: env0_2, disabled: disabled, look: env0_0, shrink: shrink,
|
||||
pressed: pressed, darkenOnPress: darkenOnPress, style: style}, styles);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user