UNPKG

@rarcifa/cronos-design-system

Version:

A typescript react component library following the Cronos branding standards

123 lines (122 loc) 5.57 kB
import { NavigationProps } from './interface'; export declare const helper: { /** * Determines the CSS position property based on whether the component is a submenu. * * @param {NavigationProps} props - The props containing the isSubmenu flag. * @returns {string} The CSS position value. */ getPosition: (props: NavigationProps) => string; /** * Updates the left margin for positioning based on the menu status. * * @param {NavigationProps} props - The props containing the isSubmenu flag. * @returns {string|undefined} The left margin CSS property value or undefined if not a menu. */ updateMainMenuPosition: (props: NavigationProps) => string | undefined; /** * Calculates the left property for positioning based on the submenu status. * * @param {NavigationProps} props - The props containing the isSubmenu flag. * @returns {string|undefined} The left CSS property value or undefined if not a submenu. */ getLeft: (props: NavigationProps) => string | undefined; /** * Provides the appropriate background color depending on whether the component is part of a submenu. * * @param {NavigationProps} props - The props containing the isSubmenu flag. * @returns {string} The CSS color value. */ getBackgroundColor: (props: NavigationProps) => string; /** * Determines the background style for a menu on hover, based on menu or tab status. * * @param {NavigationProps} props - The props with status flags. * @returns {string|undefined} The CSS background property value. */ getOnHoverMenuBackground: (props: NavigationProps) => string | undefined; /** * Calculates the bottom property for CSS based on submenu status. * * @param {NavigationProps} props - The props containing the isSubmenu flag. * @returns {number|undefined} The CSS bottom property value or undefined if not applicable. */ getBottom: (props: NavigationProps) => number | undefined; /** * Generates a border image gradient for tabs. * * @param {NavigationProps} props - The props containing the isTab flag and theme data. * @returns {string|undefined} The CSS border image property value or undefined if not a tab. */ getBorderImage: (props: NavigationProps) => string | undefined; /** * Determines the slice of the border image to apply, used for tabs. * * @param {NavigationProps} props - The props containing the isTab flag. * @returns {number|undefined} The border-image-slice value or undefined if not a tab. */ getBorderImageSlice: (props: NavigationProps) => number | undefined; /** * Provides the appropriate border radius depending on widget and submenu status. * * @param {NavigationProps} props - The props with various layout flags. * @returns {string} The CSS border-radius value. */ getBorderRadius: (props: NavigationProps) => string; /** * Provides the border, used for the menu cards. * * @param {NavigationProps} props - The props containing the isMenu flag. * @returns {number|undefined} The border value or undefined if not a menu. */ getBorder: (props: NavigationProps) => string | undefined; /** * Provides the border, used for the menu cards. * * @param {NavigationProps} props - The props containing the isMenu flag. * @returns {number|undefined} The border value or undefined if not a menu. */ getMobileBorder: (props: NavigationProps) => string | undefined; /** * Provides the border margin, used for the menu cards. * * @param {NavigationProps} props - The props containing the isMenu flag. * @returns {number|undefined} The border margin value or undefined if not a menu. */ getMargin: (props: NavigationProps) => string | undefined; /** * Provides the border padding, used for the menu cards. * * @param {NavigationProps} props - The props containing the isWidget flag. * @returns {number|undefined} The border padding value or undefined if not a menu. */ getPadding: (props: NavigationProps) => string | undefined; /** * Determines the border radius on hover based on menu and submenu flags. * * @param {NavigationProps} props - The props containing the isMenu and hasSubmenu flags. * @returns {string} The CSS border-radius value on hover. */ getBorderRadiusOnHover: (props: NavigationProps) => string; /** * Determines the width on the tab menu flag. * * @param {NavigationProps} props - The props containing the isMenu flag. * @returns {string|undefined} The CSS width value or undefined if not a tab. */ getTabMenuWidth: (props: NavigationProps) => string | undefined; /** * Provides the appropriate menu background depending on menu and submenu status. * * @param {NavigationProps} props - The props with various layout flags. * @returns {string} The CSS background value. */ getMobileMenuBackground: (props: NavigationProps) => string | undefined; /** * Checks if the given URL is an external link. * * @param {string} url - The URL to be tested. * @returns {boolean} - Returns `true` if the URL is external, otherwise returns `false`. */ isExternalUrl: (url: string) => boolean; };