@kietpt2003/react-native-core-ui
Version:
React Native Core UI components by KietPT
73 lines (68 loc) • 2.91 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/themes/fontSize.ts
var fontSize_exports = {};
__export(fontSize_exports, {
default: () => fontSize_default
});
module.exports = __toCommonJS(fontSize_exports);
// src/utils/resolutions.ts
var import_react_native = require("react-native");
var import_react_native_iphone_x_helper = require("react-native-iphone-x-helper");
var import_react_native_device_info = __toESM(require("react-native-device-info"));
var isTablet = import_react_native_device_info.default.isTablet();
var statusBarHeight = import_react_native.Platform.OS == "android" && import_react_native.StatusBar.currentHeight ? import_react_native.StatusBar.currentHeight : 0;
// src/utils/scale.ts
var import_react_native2 = require("react-native");
var { width, height } = import_react_native2.Dimensions.get("window");
var IPHONE_12_WIDTH = 375;
var IPHONE_12_HEIGTH = 812;
var scaleWidth = width / IPHONE_12_WIDTH;
var scaleHeight = height / IPHONE_12_HEIGTH;
var scaleAvg = (scaleWidth + scaleHeight) / 2;
var scaleFont = (size) => Math.round(import_react_native2.PixelRatio.roundToNearestPixel(size * scaleAvg));
// src/themes/fontSize.ts
var fontSize_default = {
_8: scaleFont(8),
_10: scaleFont(10),
_11: scaleFont(11),
_12: scaleFont(12),
_13: scaleFont(13),
_14: scaleFont(14),
_16: scaleFont(16),
_18: scaleFont(18),
_20: scaleFont(20),
_22: scaleFont(22),
_24: scaleFont(24),
_28: scaleFont(28),
_30: scaleFont(30),
_36: scaleFont(36),
_48: scaleFont(48)
};
//# sourceMappingURL=fontSize.js.map