decord/source/design/void/IconButton/native/IconButton.tsx

126 lines
4 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 12431
// Function ID: 96440
2026-07-20 16:05:17 +00:00
// Name: SquareIconButton
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 33, 4131, 689, 4974, 4661, 1273, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 12431 (SquareIconButton)
2026-07-23 10:11:24 +00:00
import result from "result";
import { jsx } from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
const require = arg1;
2026-07-20 16:05:17 +00:00
class SquareIconButton {
constructor(arg0) {
size = global.size;
({ disableColor, accessibilityHidden } = global);
({ onPress, source, style, iconStyle, accessibilityLabel, disabled } = global);
2026-07-23 10:11:24 +00:00
tmp = LARGE_40();
closure_1 = tmp;
2026-07-20 16:05:17 +00:00
items = [, ];
items[0] = size;
items[1] = tmp;
2026-07-23 10:11:24 +00:00
memo = result.useMemo(() => {
if (outer1_4.MEDIUM_32 === size) {
2026-07-20 16:05:17 +00:00
return tmp.medium;
2026-07-23 10:11:24 +00:00
} else if (outer1_4.LARGE_40 === tmp) {
2026-07-20 16:05:17 +00:00
return tmp.large;
} else {
2026-07-23 10:11:24 +00:00
const SMALL_24 = outer1_4.SMALL_24;
2026-07-20 16:05:17 +00:00
return tmp.small;
}
}, items);
tmp3 = jsx;
obj = { accessibilityRole: "button" };
tmp4 = undefined;
if (!accessibilityHidden) {
tmp4 = accessibilityLabel;
}
obj.accessibilityLabel = tmp4;
obj.accessibilityElementsHidden = accessibilityHidden;
obj.onPress = onPress;
obj.disabled = disabled;
items1 = [, , ];
items1[0] = tmp.container;
items1[1] = style;
items1[2] = memo;
obj.style = items1;
tmp5 = jsx;
obj = {};
if (size === jsx.LARGE_40) {
2026-07-23 10:11:24 +00:00
tmp8 = size;
tmp9 = closure_1;
REFRESH_SMALL_16 = require("Button").Icon.Sizes.MEDIUM;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
tmp6 = size;
tmp7 = closure_1;
REFRESH_SMALL_16 = require("Button").Icon.Sizes.REFRESH_SMALL_16;
2026-07-20 16:05:17 +00:00
}
obj.size = REFRESH_SMALL_16;
icon = null;
if (!disableColor) {
icon = tmp.icon;
}
items2 = [, ];
items2[0] = icon;
items2[1] = iconStyle;
obj.style = items2;
obj.disableColor = disableColor;
obj.source = source;
2026-07-23 10:11:24 +00:00
obj.children = tmp5(require("Button").Icon, obj);
return tmp3(require("PressableBase").PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
}
}
class CircularIconButton {
constructor(arg0) {
size = global.size;
2026-07-23 10:11:24 +00:00
obj = { style: 0, size: 0, disableColor: 0 };
2026-07-20 16:05:17 +00:00
({ style, disableColor } = global);
setPrototypeOfResult = Object.setPrototypeOf(null);
merged = Object.assign(global, obj);
2026-07-23 10:11:24 +00:00
tmp3 = LARGE_40();
2026-07-20 16:05:17 +00:00
obj = {};
tmp4 = jsx;
tmp5 = SquareIconButton;
if (jsx.SMALL_24 === size) {
largeCircular = tmp3.smallCircular;
} else {
tmp6 = jsx;
if (jsx.MEDIUM_32 === size) {
largeCircular = tmp3.mediumCircular;
} else {
tmp7 = jsx;
if (jsx.LARGE_40 === size) {
largeCircular = tmp3.largeCircular;
}
}
}
items = [, ];
items[0] = largeCircular;
items[1] = style;
obj.style = items;
obj.size = size;
merged1 = Object.assign(merged);
obj["disableColor"] = disableColor;
return tmp4(tmp5, obj);
}
}
let obj = { SMALL_24: 24, [24]: "SMALL_24", MEDIUM_32: 32, [32]: "MEDIUM_32", LARGE_40: 40, [40]: "LARGE_40" };
obj = {};
2026-07-23 10:11:24 +00:00
obj = { borderRadius: require("_createForOfIteratorHelperLoose").radii.xs, alignItems: "center", justifyContent: "center", backgroundColor: require("result").DARK_PRIMARY_700_LIGHT_PRIMARY_230 };
2026-07-20 16:05:17 +00:00
obj.container = obj;
obj.small = { height: obj.SMALL_24, width: obj.SMALL_24 };
obj.medium = { height: obj.MEDIUM_32, width: obj.MEDIUM_32 };
obj.large = { height: obj.LARGE_40, width: obj.LARGE_40 };
obj.smallCircular = { borderRadius: obj.SMALL_24 / 2 };
obj.mediumCircular = { borderRadius: obj.MEDIUM_32 / 2 };
obj.largeCircular = { borderRadius: obj.LARGE_40 / 2 };
2026-07-23 10:11:24 +00:00
_createForOfIteratorHelperLoose = { tintColor: require("result").DARK_PRIMARY_300_LIGHT_PRIMARY_500 };
obj.icon = _createForOfIteratorHelperLoose;
let closure_5 = _createForOfIteratorHelperLoose.createStyles(obj);
2026-07-20 16:05:17 +00:00
SquareIconButton.Sizes = obj;
CircularIconButton.Sizes = obj;
2026-07-23 10:11:24 +00:00
const result = require("_createForOfIteratorHelperLoose").fileFinishedImporting("design/void/IconButton/native/IconButton.tsx");
2026-07-20 16:05:17 +00:00
export { SquareIconButton };
export { CircularIconButton };