PHP 8.2.31
Preview: font_family.js Size: 1.53 KB
/var/softaculous/sitepad/editor/site-data/plugins/pagelayer/js/react/src/components/font_family.js

import { LabelControl } from './label';
import { pagelayer_link_font_family } from './typography';
const { pagelayer_fonts } = pagelayer_config;

export const FontFamilyControl = (props) =>{
	const { prop, value, setAttributes } = props;
	const { name } = prop['c'];
	
	var values = pagelayerParseTypo(value, false);

	// Convert the jQuery function to a React method
	const handleInputChange = (e) => {
		pagelayer_link_font_family(jQuery(e.target));
		setAttributes({ [name]: e.target.value });
	};

	const options = [];
	const createFontOption = (val, lang, type, setVal) => {
		const selected = val !== setVal ? '' : 'selected="selected"';
		const displayLang = lang || 'Default';
		return (
			<option
				className="pagelayer-elp-select-option"
				value={val}
				type={type}
				selected={selected}
			>
				{displayLang}
			</option>
		);
	};

	for(const y in pagelayer_fonts){
		if(y != 'default'){
			options.push(<optgroup label={pagelayerUcwords(y)} />);
		}

		for (const x in pagelayer_fonts[y]) {
			options.push(
				createFontOption(
					jQuery.isNumeric(x) ? pagelayer_fonts[y][x] : x,
					pagelayer_fonts[y][x],
					y,
					values[0]
				)
			);
		}
	}

	return (
		<div className="components-base-control pagelayer-base-control">
			<LabelControl {...props}/>
			<div class="pagelayer-elp-select-div pagelayer-elp-pos-rel">
				<select className="pagelayer-elp-select pagelayer-select" onChange={handleInputChange} name={prop.c['name']}>{options}</select>
			</div>
		</div>
	);
}

 

Directory Contents

Dirs: 0 × Files: 29

Name Size Perms Modified Actions
1.26 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
5.70 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
653 B lrw-r--r-- 2026-04-22 07:17:42
Edit Download
4.90 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1000 B lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.82 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
2.29 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.53 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
4.01 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
237 B lrw-r--r-- 2026-04-22 07:17:42
Edit Download
5.16 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
2.26 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.32 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
7.39 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.91 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.81 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
2.96 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
2.11 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
2.13 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
771 B lrw-r--r-- 2026-04-22 07:17:42
Edit Download
4.20 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.08 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
2.18 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.95 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.47 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
846 B lrw-r--r-- 2026-04-22 07:17:42
Edit Download
7.21 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
693 B lrw-r--r-- 2026-04-22 07:17:42
Edit Download
17.44 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).