UNPKG

@crossed/ui

Version:

A universal & performant styling library for React Native, Next.js & React

149 lines (148 loc) 4.54 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; 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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var styles_exports = {}; __export(styles_exports, { focusStyles: () => focusStyles, heightStyles: () => heightStyles, indicatorDynamicStyles: () => indicatorDynamicStyles, indicatorRoundedStyles: () => indicatorRoundedStyles, indicatorUnderlineStyles: () => indicatorUnderlineStyles, linearGradientRounded: () => linearGradientRounded, linearGradientUnderline: () => linearGradientUnderline, tabTitleStyles: () => tabTitleStyles, triggerStyles: () => triggerStyles }); module.exports = __toCommonJS(styles_exports); var import_styled = require("@crossed/styled"); const indicatorUnderlineStyles = (0, import_styled.createStyles)(({ colors }) => ({ active: { base: { borderBottomColor: colors.border.brand } }, default: { base: { borderBottomWidth: 4, height: 4, borderBottomColor: "transparent", borderRadius: 4, position: "absolute", bottom: 0 } } })); const linearGradientRounded = (0, import_styled.createStyles)(({ colors }) => ({ prev: { base: { left: 0, background: `linear-gradient(to right, ${colors.background.primary} 70%, transparent)` } }, next: { base: { right: 0, background: `linear-gradient(to left, ${colors.background.primary} 70%, transparent)` } } })); const linearGradientUnderline = (0, import_styled.createStyles)(({ colors }) => ({ prev: { base: { left: 0, background: `linear-gradient(to right, ${colors.background.secondary} 70%, transparent)` } }, next: { base: { right: 0, background: `linear-gradient(to left, ${colors.background.secondary} 70%, transparent)` } } })); const indicatorRoundedStyles = (0, import_styled.createStyles)(({ colors }) => ({ active: { base: { backgroundColor: colors.background.secondary } }, default: { base: { backgroundColor: "transparent", borderRadius: 24, position: "absolute" }, web: { base: { boxShadow: "0px 1px 4px 0px #1018280A" } } } })); const indicatorDynamicStyles = (0, import_styled.createStyles)(() => ({ dyn: (left, width) => ({ width, transform: [{ translateX: left }] }) })); const tabTitleStyles = (0, import_styled.createStyles)(({ colors }) => ({ default: { base: { color: colors.text.secondary } }, hover: { base: { color: colors.text.primary } }, active: { base: { color: colors.text.brand } } })); const triggerStyles = (0, import_styled.createStyles)(({ space }) => ({ disabled: { base: { opacity: 0.5, pointerEvents: "none" }, web: { base: { cursor: "not-allowed" } } }, trigger: { base: { display: "flex", flexDirection: "row", alignItems: "center" }, ":hover": { backgroundColor: "transparent" } }, sm: { base: { paddingHorizontal: space.xs } }, md: { base: { paddingHorizontal: space.md } }, lg: { base: { paddingHorizontal: space.lg } } })); const heightStyles = (0, import_styled.createStyles)(() => ({ sm: { base: { height: 28 } }, md: { base: { height: 36 } }, lg: { base: { height: 44 } } })); const focusStyles = (0, import_styled.createStyles)(({ colors }) => ({ rounded: { web: { ":focus-visible": { outlineColor: colors.border.brand, outlineOffset: "4px" } } }, underline: { web: { ":focus-visible": { outlineColor: colors.border.brand, outlineOffset: "4px" } } } })); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { focusStyles, heightStyles, indicatorDynamicStyles, indicatorRoundedStyles, indicatorUnderlineStyles, linearGradientRounded, linearGradientUnderline, tabTitleStyles, triggerStyles }); //# sourceMappingURL=styles.js.map