decord/source/design/components/Sheet/native/ActionSheetHeaderBar.native.tsx

89 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7162
// Function ID: 7163
2026-07-20 16:05:17 +00:00
// Name: ActionSheetHeaderBar
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 4668, 712, 1236, 1494, 4100, 4727, 2]
2026-07-20 16:05:17 +00:00
// Exports: ActionSheetHeaderBar
2026-08-24 06:08:38 +00:00
// Module 7162 (ActionSheetHeaderBar)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import useWindowDimensionsDefault from "useWindowDimensions" /* 1494 */;
import map from "map" /* 4100 */;
import SCREEN_READER_ENABLED_GETTER from "SCREEN_READER_ENABLED_GETTER" /* 4727 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ Pressable: c3, StyleSheet: c4, TouchableWithoutFeedback: c5, View: closure_6 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ jsx: error, Fragment: closure_8, jsxs: c9 } = jsxProd);
2026-07-29 08:29:29 +00:00
let closure_10 = createCacheKey.createStyles((arg0, height, marginBottom) => {
let obj = { marginBottom };
2026-07-20 16:05:17 +00:00
if ("floating" === arg0) {
2026-07-23 10:11:24 +00:00
obj = { left: 0, right: 0, position: "absolute" };
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { header: null, indicator: null, accessibleDismiss: null };
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj);
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-07-20 16:05:17 +00:00
if ("default" === arg0) {
2026-07-29 08:29:29 +00:00
const obj2 = { backgroundColor: null };
obj2[0] = tmp2(712).colors.BACKGROUND_MOD_STRONG;
let tmp4 = obj2;
2026-07-20 16:05:17 +00:00
} else if ("floating" === arg0) {
2026-07-29 08:29:29 +00:00
const obj3 = { backgroundColor: null };
obj3[0] = tmp2(712).colors.BACKGROUND_MOD_MUTED;
tmp4 = obj3;
2026-07-20 16:05:17 +00:00
} else if ("overlay" === arg0) {
2026-07-29 08:29:29 +00:00
const obj4 = { backgroundColor: null };
obj4[0] = tmp2(712).unsafe_rawColors.WHITE;
const merged1 = Object.assign(tmp2(712).shadows.SHADOW_LOW);
tmp4 = obj4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const merged2 = Object.assign(tmp4);
2026-08-24 06:08:38 +00:00
obj[1] = { alignSelf: "center", width: ThemesDefault.modules.mobile.SHEET_HANDLE_WIDTH, height: ThemesDefault.modules.mobile.SHEET_HANDLE_HEIGHT, borderRadius: ThemesDefault.radii.sm, top: ThemesDefault.modules.mobile.SHEET_HANDLE_MARGIN_TOP };
2026-07-20 16:05:17 +00:00
const obj5 = {};
const merged3 = Object.assign(absoluteFillObject.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj5.height = height;
obj5.marginTop = -height + marginBottom;
obj[2] = obj5;
2026-07-20 16:05:17 +00:00
return obj;
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/components/Sheet/native/ActionSheetHeaderBar.native.tsx");
2026-07-20 16:05:17 +00:00
export const ActionSheetHeaderBar = function ActionSheetHeaderBar(accessibilityLabel) {
accessibilityLabel = accessibilityLabel.accessibilityLabel;
if (accessibilityLabel === undefined) {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
accessibilityLabel = intl.string(getSystemLocale.t.WAI6xu);
2026-07-20 16:05:17 +00:00
}
({ onPress, variant, style, tabStyle } = accessibilityLabel);
if (variant === undefined) {
variant = "default";
}
2026-08-24 06:08:38 +00:00
let obj = map;
const tmp3 = callback3(variant, useWindowDimensionsDefault().height, obj.useToken(ThemesDefault.modules.mobile.SHEET_HANDLE_MARGIN_BOTTOM));
obj1 = SCREEN_READER_ENABLED_GETTER;
2026-07-29 08:29:29 +00:00
obj = { onPress, onAccessibilityEscape: onPress, "aria-hidden": true, children: null };
obj = { style: items, children: null };
2026-07-23 10:11:24 +00:00
items = [tmp3.header, style];
2026-07-20 16:05:17 +00:00
const items1 = [tmp3.indicator, tabStyle];
const isScreenReaderEnabled = obj1.useIsScreenReaderEnabled();
2026-07-29 08:29:29 +00:00
obj[1] = callback(closure_6, { style: items1 });
obj[3] = callback(closure_6, obj);
const tmp6 = callback(closure_5, obj);
let tmp7 = tmp6;
2026-07-20 16:05:17 +00:00
if (isScreenReaderEnabled) {
2026-07-29 08:29:29 +00:00
obj1 = { children: null };
const obj2 = { style: null, accessible: true, accessibilityLabel: null, accessibilityRole: "button", onPress: null };
obj2[0] = tmp3.accessibleDismiss;
obj2[2] = accessibilityLabel;
obj2[4] = onPress;
const items2 = [callback(closure_3, obj2), tmp6];
obj1[0] = items2;
tmp7 = callback2(closure_8, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp7;
2026-07-20 16:05:17 +00:00
};