decord/source/design/components/Button/native/FloatingActionButton.native.tsx

77 lines
3.3 KiB
TypeScript
Raw Normal View History

// Module ID: 8914
// Function ID: 8915
2026-07-20 16:05:17 +00:00
// Name: styles
// Dependencies: [19, 21, 4560, 576, 4980, 4296, 4974, 8098, 2]
2026-07-20 16:05:17 +00:00
// Exports: FloatingActionButton
// Module 8914 (styles)
import ThemesDefault from "Themes" /* 576 */;
import MINIMUM_HIT_AREA from "MINIMUM_HIT_AREA" /* 4980 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
const styles = createCacheKey.createStyles(() => {
let obj = { button: null, iconButtonPill: null };
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-24 06:08:38 +00:00
const merged = Object.assign(ThemesDefault.shadows.SHADOW_HIGH);
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-08-31 15:47:37 +00:00
obj = { minWidth: MINIMUM_HIT_AREA.FAB_BUTTON_SIZE, minHeight: MINIMUM_HIT_AREA.FAB_BUTTON_SIZE, padding: 0, borderRadius: ThemesDefault.radii.lg };
2026-07-29 08:29:29 +00:00
obj[1] = obj;
2026-07-20 16:05:17 +00:00
return obj;
});
2026-07-23 10:11:24 +00:00
let closure_6 = { mass: 0.5, damping: 80, stiffness: 320 };
2026-07-20 16:05:17 +00:00
let closure_7 = { code: "function FloatingActionButtonNativeTsx1(){const{withSpring,positionBottom,DEFAULT_POSITION_OFFSET,SPRING_CONFIG,positionRight}=this.__closure;var _positionBottom,_positionRight;return{position:'absolute',bottom:withSpring((_positionBottom=positionBottom)!==null&&_positionBottom!==void 0?_positionBottom:DEFAULT_POSITION_OFFSET,SPRING_CONFIG),right:withSpring((_positionRight=positionRight)!==null&&_positionRight!==void 0?_positionRight:DEFAULT_POSITION_OFFSET,SPRING_CONFIG)};}" };
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/components/Button/native/FloatingActionButton.native.tsx");
2026-07-20 16:05:17 +00:00
export const DEFAULT_POSITION_OFFSET = 16;
export const useStyles = styles;
export const FloatingActionButton = function FloatingActionButton(positionRight) {
({ icon, positionBottom } = positionRight);
positionRight = positionRight.positionRight;
2026-07-29 08:29:29 +00:00
const merged = Object.assign(positionRight, Object.create(null));
let obj = positionBottom(4296);
2026-07-20 16:05:17 +00:00
class F {
constructor() {
2026-07-29 08:29:29 +00:00
tmp = positionBottom;
2026-08-24 06:08:38 +00:00
tmp2 = closure_1_2;
2026-08-31 15:47:37 +00:00
obj = positionBottom(closure_1_2[6]);
2026-07-29 08:29:29 +00:00
num = positionBottom;
if (positionBottom == null) {
num = 16;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj = { position: "absolute", bottom: obj.withSpring(num, closure_1_6), right: null };
tmp3 = closure_1_6;
2026-08-31 15:47:37 +00:00
tmpResult = tmp(tmp2[6]);
2026-07-29 08:29:29 +00:00
num2 = positionRight;
if (positionRight == null) {
num2 = 16;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = tmpResult.withSpring(num2, tmp3);
2026-07-20 16:05:17 +00:00
return obj;
}
}
obj = { withSpring: positionBottom(4974).withSpring, positionBottom, DEFAULT_POSITION_OFFSET: 16, SPRING_CONFIG: closure_6, positionRight };
2026-07-20 16:05:17 +00:00
F.__closure = obj;
F.__workletHash = 10762818944671;
F.__initData = closure_7;
2026-07-29 08:29:29 +00:00
const animatedStyle = obj.useAnimatedStyle(F);
obj = { style: animatedStyle, children: null };
2026-08-24 06:08:38 +00:00
obj1 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj1.accessibilityLabel = positionRight.accessibilityLabel;
obj1.size = "lg";
obj1.variant = "primary";
2026-07-20 16:05:17 +00:00
let cloneElementResult = icon;
2026-07-29 08:29:29 +00:00
if (validElement.isValidElement(icon)) {
const obj2 = { color: null };
obj2[0] = positionRight(576).colors.WHITE;
2026-07-29 08:29:29 +00:00
cloneElementResult = validElement.cloneElement(icon, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1.icon = cloneElementResult;
2026-08-31 15:47:37 +00:00
({ button: obj4.style, iconButtonPill: obj4.pillStyle } = styles());
obj[1] = jsx(positionBottom(8098).BaseIconButton, {});
return jsx(positionRight(4296).View, { style: animatedStyle, children: null });
2026-07-20 16:05:17 +00:00
};