elementor-ui/styles/index.js000064400000001435152377522360012160 0ustar00import themeColorsMap from './_maps/colors/theme-colors'; import tintsMap from './_maps/colors/tints'; import darkTintsMap from './_maps/colors/dark-tints'; import spacingMap from './_maps/spacing/spacing'; import headingMap from './_maps/typography/heading'; import textMap from './_maps/typography/text'; import lineHeightMap from './_maps/typography/line-height'; import sizeMap from './_maps/typography/size'; import fontWeightMap from './_maps/font/font-weight'; export const themeColors = themeColorsMap; export const tints = tintsMap; export const darkTints = darkTintsMap; export const spacing = spacingMap; export const heading = headingMap; export const text = textMap; export const lineHeight = lineHeightMap; export const size = sizeMap; export const fontWeight = fontWeightMap; elementor-ui/styles/_data/spacing/spacing.json000064400000000301152377522360015515 0ustar00{ "base": "0.5rem", "0": "0", "5": "0.625rem", "8": "1rem", "10": "1.25rem", "12": "1.5rem", "16": "2rem", "20": "2.5rem", "24": "3rem", "30": "3.75rem", "44": "5.5rem" } elementor-ui/styles/_data/font/font-weight.json000064400000000103152377522360015646 0ustar00{ "normal": 400, "medium": 500, "bold": 700, "base": 400 } elementor-ui/styles/_data/typography/typography.json000064400000002070152377522360017066 0ustar00{ "font-size-base": "1rem", "font-size-10": "0.625rem", "font-size-11": "0.6875rem", "font-size-12": "0.75rem", "font-size-13": "0.8125rem", "font-size-14": "0.875rem", "font-size-15": "0.9375rem", "font-size-18": "1.125rem", "font-size-20": "1.25rem", "font-size-26": "1.625rem", "font-size-30": "1.85rem", "line-height-2": 2, "line-height-flat": 1, "line-height-base": 1.5, "line-height-sm": 1.2, "line-height-lg": 1.8, "display-font-size": "1.85rem", "h-1-font-size": "1.625rem", "h-2-font-size": "1.25rem", "h-3-font-size": "1rem", "h-4-font-size": "0.9375rem", "h-5-font-size": "0.875rem", "h-6-font-size": "0.875rem", "text-xl-font-size": "1rem", "text-lg-font-size": "0.9375rem", "text-md-font-size": "0.875rem", "text-sm-font-size": "0.8125rem", "text-xs-font-size": "0.75rem", "text-xxs-font-size": "0.6875rem", "font-size-micro": "0.625rem", "body-font-size": "0.875rem", "font-size-caption": "0.75rem", "small-font-size": "80%", "paragraph-margin-bottom": "", "headings-margin-bottom": "" } elementor-ui/styles/_data/colors/palette.json000064400000001362152377522360015414 0ustar00{ "white": "#fff", "black": "#000", "cyan-ionized-air-glow": "#58d0f5", "red-rose-garnet": "#93003F", "red-carnelian": "#b01b1b", "red-tomato-frog": "#F84343", "yellow-hot-sun": "#fcb92c", "green-spandex": "#39b54a", "gray-anthracite": "#26292C", "gray-metalise": "#34383c", "gray-napoleon": "#404349", "gray-lamp-post": "#495157", "gray-abbey": "#4c4f56", "gray-blue-planet": "#556068", "gray-stone-hearth": "#64666a", "gray-sheffield": "#6d7882", "gray-silver-filigree": "#7d7e82", "gray-special-delivery": "#a4afb7", "gray-brainstem": "#b4b5b7", "gray-stone-golem": "#c2cbd2", "gray-hidden-creek": "#d5dadf", "gray-yin-bai-silver": "#e0e1e3", "gray-anti-flash": "#f1f3f5", "gray-emptiness": "#fcfcfc" } elementor-ui/styles/text.js000064400000001507152377522360012035 0ustar00import { tints, darkTints, text, lineHeight, fontWeight } from 'e-styles'; export default { base: { shared: ` color: var(--e-styles-text-color); font-size: var(--e-styles-text-font-size, ${ text.base }); font-weight: ${ fontWeight.normal }; line-height: var(--e-styles-text-line-height, ${ lineHeight.base }); `, variant: { xxs: ` --e-styles-text-font-size: ${ text.xxs }; --e-styles-text-line-height: ${ lineHeight.sm }; `, xs: `--e-styles-text-font-size: ${ text.xs };`, sm: `--e-styles-text-font-size: ${ text.sm };`, md: `--e-styles-text-font-size: ${ text.md };`, lg: `--e-styles-text-font-size: ${ text.lg };`, xl: `--e-styles-text-font-size: ${ text.xl };`, }, }, light: `--e-styles-text-color: ${ tints[ '800' ] };`, dark: `--e-styles-text-color: ${ darkTints[ '200' ] };`, }; elementor-ui/styles/_maps/spacing/spacing.js000064400000000121152377522360015207 0ustar00import spacing from '../../_data/spacing/spacing.json'; export default spacing; elementor-ui/styles/_maps/font/font-weight.js000064400000000130152377522360015340 0ustar00import fontWeight from '../../_data/font/font-weight.json'; export default fontWeight; elementor-ui/styles/_maps/typography/size.js000064400000000735152377522360015332 0ustar00import type from '../../_data/typography/typography.json'; export default { base: type[ 'font-size-base' ], 10: type[ 'font-size-10' ], 11: type[ 'font-size-11' ], 12: type[ 'font-size-12' ], 13: type[ 'font-size-13' ], 14: type[ 'font-size-14' ], 15: type[ 'font-size-15' ], 18: type[ 'font-size-18' ], 20: type[ 'font-size-20' ], 26: type[ 'font-size-26' ], 30: type[ 'font-size-30' ], caption: type[ 'font-size-caption' ], micro: type[ 'font-size-micro' ], }; elementor-ui/styles/_maps/typography/line-height.js000064400000000361152377522360016550 0ustar00import type from '../../_data/typography/typography.json'; export default { 2: type[ 'line-height-2' ], flat: type[ 'line-height-flat' ], base: type[ 'line-height-base' ], sm: type[ 'line-height-sm' ], lg: type[ 'line-height-lg' ], }; elementor-ui/styles/_maps/typography/text.js000064400000000440152377522360015335 0ustar00import type from '../../_data/typography/typography.json'; export default { base: type[ 'font-size-14' ], xxs: type[ 'font-size-11' ], xs: type[ 'font-size-12' ], sm: type[ 'font-size-13' ], md: type[ 'font-size-14' ], lg: type[ 'font-size-15' ], xl: type[ 'font-size-base' ], }; elementor-ui/styles/_maps/typography/heading.js000064400000000640152377522360015752 0ustar00import type from '../../_data/typography/typography.json'; export default { display1: type[ 'display-font-size' ], display2: type[ 'display-font-size' ], display3: type[ 'display-font-size' ], display4: type[ 'display-font-size' ], h1: type[ 'font-size-26' ], h2: type[ 'font-size-20' ], h3: type[ 'font-size-base' ], h4: type[ 'font-size-15' ], h5: type[ 'font-size-14' ], h6: type[ 'font-size-14' ], }; elementor-ui/styles/_maps/colors/tints.js000064400000000563152377522360014613 0ustar00import palette from '../../_data/colors/palette.json'; export default { 800: palette[ 'gray-lamp-post' ], 700: palette[ 'gray-blue-planet' ], 600: palette[ 'gray-sheffield' ], 500: palette[ 'gray-special-delivery' ], 400: palette[ 'gray-stone-golem' ], 300: palette[ 'gray-hidden-creek' ], 200: palette[ 'gray-anti-flash' ], 100: palette[ 'gray-emptiness' ], }; elementor-ui/styles/_maps/colors/theme-colors.js000064400000000666152377522360016057 0ustar00import palette from '../../_data/colors/palette.json'; export default { textMuted: palette[ 'gray-hidden-creek' ], disabled: palette[ 'gray-stone-golem' ], light: palette.white, dark: palette.black, info: palette[ 'cyan-ionized-air-glow' ], cta: palette[ 'red-rose-garnet' ], danger: palette[ 'red-carnelian' ], success: palette[ 'green-spandex' ], primary: palette[ 'green-spandex' ], warning: palette[ 'yellow-hot-sun' ], }; elementor-ui/styles/_maps/colors/dark-tints.js000064400000000555152377522360015533 0ustar00import palette from '../../_data/colors/palette.json'; export default { 800: palette[ 'gray-anthracite' ], 700: palette[ 'gray-metalise' ], 600: palette[ 'gray-napoleon' ], 500: palette[ 'gray-abbey' ], 400: palette[ 'gray-stone-hearth' ], 300: palette[ 'gray-silver-filigree' ], 200: palette[ 'gray-brainstem' ], 100: palette[ 'gray-yin-bai-silver' ], }; elementor-ui/styles/heading.js000064400000004601152377522360012446 0ustar00import { tints, darkTints, heading, lineHeight, fontWeight, spacing } from 'e-styles'; export default { base: { shared: ` color: var(--e-styles-heading-color, ${ tints[ '800' ] }); font-size: var(--e-styles-heading-font-size); margin-bottom: var(--e-styles-heading-margin-bottom); `, variant: { h1: ` --e-styles-heading-font-size: ${ heading.h1 }; --e-styles-heading-margin-bottom: 2.5 * ${ spacing.base }; font-weight: ${ fontWeight.medium }; line-height: ${ lineHeight.flat }; `, h2: ` --e-styles-heading-font-size: ${ heading.h2 }; --e-styles-heading-margin-bottom: 2.5 * ${ spacing.base }; font-weight: ${ fontWeight.medium }; line-height: ${ lineHeight.sm }; margin-top: 0; `, h3: ` --e-styles-heading-font-size: ${ heading.h3 }; --e-styles-heading-margin-bottom: ${ spacing.base }; font-weight: ${ fontWeight.medium }; line-height: ${ lineHeight.sm }; margin-top: 0; `, h4: ` --e-styles-heading-font-size: ${ heading.h4 }; --e-styles-heading-margin-bottom: ${ spacing.base }; margin-top: 0; `, h5: ` --e-styles-heading-font-size: ${ heading.h5 }; --e-styles-heading-margin-bottom: ${ spacing.base }; margin-top: 0; `, h6: ` --e-styles-heading-font-size: ${ heading.h6 }; --e-styles-heading-margin-bottom: ${ spacing.base }; font-weight: ${ fontWeight.bold }; margin-top: 0; `, 'display-1': ` --e-styles-heading-font-size: ${ heading.display1 }; --e-styles-heading-margin-bottom: ${ spacing.base }; margin-top: ${ spacing.base }; `, 'display-2': ` --e-styles-heading-font-size: ${ heading.display2 }; --e-styles-heading-margin-bottom: ${ spacing.base }; margin-top: ${ spacing.base }; `, 'display-3': ` --e-styles-heading-font-size: ${ heading.display3 }; --e-styles-heading-margin-bottom: 2.5 * ${ spacing.base }; margin-top: 0; `, 'display-4': ` --e-styles-heading-font-size: ${ heading.display4 }; --e-styles-heading-margin-bottom: ${ spacing.base }; margin-top: ${ spacing.base }; `, }, size: `--size-value: default;`, }, light: { variant: { h1: `--e-styles-heading-color: ${ tints[ '600' ] };`, h2: `--e-styles-heading-color: ${ tints[ '600' ] };`, 'display-3': `--e-styles-heading-color: ${ tints[ '600' ] };`, }, }, dark: `--e-styles-heading-color: ${ darkTints[ '100' ] };`, }; elementor-ui/components/index.js000064400000000140152377522360013012 0ustar00export { default as Heading } from './ui/heading'; export { default as Text } from './ui/text'; elementor-ui/components/utils.js000064400000004306152377522360013053 0ustar00/** * @param {Object|string} styles { base: { shared: '', variant: { shared: '', h1: '', h2: '' } }, dark: { shared: '', variant: { shared: '', h1: '', h2: '' } } } * @param {Object} props { variant: 'h1', size: 'xl' } * @param {string} type shared/unique (in case that only the shared/unique styles are needed) * @return {string} - style */ export const getStyle = ( styles, props, type ) => { if ( ! styles ) { return ''; } if ( 'string' === typeof styles ) { return styles; } const config = props?.theme?.config || { variants: {} }, style = { shared: '', unique: '', }; // Creating an array that holds only the active theme variants values. const themeVariants = Object.keys( config.variants ).filter( ( key ) => config.variants[ key ] ), addStyle = ( data, keys = [] ) => { if ( 'string' === typeof data && 'unique' !== type ) { style.shared += data; return; } Object.values( keys ).forEach( ( key ) => { const styleObjKey = 'shared' !== key ? 'unique' : 'shared'; if ( ! type || styleObjKey === type ) { style[ styleObjKey ] += data[ key ] || ''; } } ); }; // Adding the 'base' key, to be included as the first variant. themeVariants.unshift( 'base' ); themeVariants.forEach( ( key ) => { const themeVariant = styles[ key ]; // If key exist in the styles obj (dark, light etc.) if ( themeVariant ) { addStyle( themeVariant, [ 'shared' ] ); const styledProps = getStyledProps( props ); // Getting the styled props css from the styles object. Object.entries( styledProps ).forEach( ( [ propName, propValue ] ) => { const styleData = themeVariant[ propName ]; if ( styleData && propValue ) { addStyle( styleData, [ 'shared', propValue ] ); } } ); } } ); // Both properties are returned but their values are depended on the third argument of this function, if empty: both will be calculated. return style.shared + style.unique; }; const getStyledProps = ( props ) => { const styledProps = { ...props }; // Removing props names that are not related to the styles objects. [ 'className', 'children', 'tag', 'as', 'theme' ].forEach( ( prop ) => delete styledProps[ prop ] ); return styledProps; }; elementor-ui/components/ui/text.js000064400000001104152377522360013305 0ustar00import styled from 'styled-components'; import { getStyle } from 'e-utils'; import styles from 'e-styles/text'; const SharedText = styled.p.attrs( ( props ) => ( { as: props.tag } ) )`${ ( props ) => getStyle( styles, props, 'shared' ) }`; const Text = styled( SharedText )`${ ( props ) => getStyle( styles, props, 'unique' ) }`; Text.propTypes = { className: PropTypes.string, children: PropTypes.any, variant: PropTypes.oneOf( [ 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' ] ), tag: PropTypes.string, }; Text.defaultProps = { className: '', tag: 'p', }; export default Text; elementor-ui/components/ui/heading.js000064400000001302152377522360013720 0ustar00import styled from 'styled-components'; import { getStyle } from 'e-utils'; import styles from 'e-styles/heading'; const SharedHeading = styled.h1.attrs( ( props ) => ( { as: props.tag } ) )`${ ( props ) => getStyle( styles, props, 'shared' ) }`; const Heading = styled( SharedHeading )`${ ( props ) => getStyle( styles, props, 'unique' ) }`; Heading.propTypes = { className: PropTypes.string, children: PropTypes.any, tag: PropTypes.oneOf( [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ] ), variant: PropTypes.oneOf( [ 'display-1', 'display-2', 'display-3', 'display-4', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ] ).isRequired, }; Heading.defaultProps = { className: '', tag: 'h1', }; export default Heading;