updated font awesome

This commit is contained in:
2021-04-08 10:18:59 +01:00
parent fc5600d75c
commit ed87bc7714
1678 changed files with 6882 additions and 5142 deletions

View File

@@ -1,5 +1,5 @@
/*!
* Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
* Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
(function () {
@@ -187,6 +187,7 @@
'fal': 'light',
'fad': 'duotone',
'fab': 'brands',
'fak': 'kit',
'fa': 'solid'
};
var STYLE_TO_PREFIX = {
@@ -194,10 +195,12 @@
'regular': 'far',
'light': 'fal',
'duotone': 'fad',
'brands': 'fab'
'brands': 'fab',
'kit': 'fak'
};
var LAYERS_TEXT_CLASSNAME = 'fa-layers-text';
var FONT_FAMILY_PATTERN = /Font Awesome 5 (Solid|Regular|Light|Duotone|Brands|Free|Pro)/;
var FONT_FAMILY_PATTERN = /Font Awesome ([5 ]*)(Solid|Regular|Light|Duotone|Brands|Free|Pro|Kit).*/; // TODO: do we need to handle font-weight for kit SVG pseudo-elements?
var FONT_WEIGHT_TO_PREFIX = {
'900': 'fas',
'400': 'far',
@@ -948,9 +951,12 @@
width = _ref.width,
height = _ref.height;
var widthClass = "fa-w-".concat(Math.ceil(width / height * 16));
var isUploadedIcon = prefix === 'fak';
var widthClass = isUploadedIcon ? '' : "fa-w-".concat(Math.ceil(width / height * 16));
var attrClass = [config.replacementClass, iconName ? "".concat(config.familyPrefix, "-").concat(iconName) : '', widthClass].filter(function (c) {
return extra.classes.indexOf(c) === -1;
}).filter(function (c) {
return c !== '' || !!c;
}).concat(extra.classes).join(' ');
var content = {
children: [],
@@ -963,6 +969,9 @@
'viewBox': "0 0 ".concat(width, " ").concat(height)
})
};
var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {
width: "".concat(width / height * 16 * 0.0625, "em")
} : {};
if (watchable) {
content.attributes[DATA_FA_I2SVG] = '';
@@ -984,7 +993,7 @@
maskId: maskId,
transform: transform,
symbol: symbol,
styles: extra.styles
styles: _objectSpread({}, uploadedIconWidthStyle, extra.styles)
});
var _ref2 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args),
@@ -1100,7 +1109,7 @@
mark: noop$1,
measure: noop$1
};
var preamble = "FA \"5.13.0\"";
var preamble = "FA \"5.15.3\"";
var begin = function begin(name) {
p.mark("".concat(preamble, " ").concat(name, " begins"));
@@ -1286,7 +1295,7 @@
if (styles$1[cls]) {
acc.prefix = cls;
} else if (config.autoFetchSvg && ['fas', 'far', 'fal', 'fad', 'fab', 'fa'].indexOf(cls) > -1) {
} else if (config.autoFetchSvg && Object.keys(PREFIX_TO_STYLE).indexOf(cls) > -1) {
acc.prefix = cls;
} else if (iconName) {
var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
@@ -1348,7 +1357,7 @@
}).join('\n');
if (node.parentNode && node.outerHTML) {
node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? "<!-- ".concat(node.outerHTML, " -->") : '');
node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? "<!-- ".concat(node.outerHTML, " Font Awesome fontawesome.com -->") : '');
} else if (node.parentNode) {
var newNode = document.createElement('span');
node.parentNode.replaceChild(newNode, node);
@@ -1818,12 +1827,6 @@
return resolve(asFoundIcon(icon));
}
var headers = {};
if (_typeof(WINDOW.FontAwesomeKitConfig) === 'object' && typeof window.FontAwesomeKitConfig.token === 'string') {
headers['fa-kit-token'] = WINDOW.FontAwesomeKitConfig.token;
}
if (iconName && prefix && !config.showMissingIcons) {
reject(new MissingIcon("Icon is missing for prefix ".concat(prefix, " with icon name ").concat(iconName)));
} else {
@@ -2012,8 +2015,10 @@
node.removeChild(alreadyProcessedPseudoElement);
return resolve();
} else if (fontFamily && content !== 'none' && content !== '') {
var prefix = ~['Solid', 'Regular', 'Light', 'Duotone', 'Brands'].indexOf(fontFamily[1]) ? STYLE_TO_PREFIX[fontFamily[1].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];
var hexValue = toHex(content.length === 3 ? content.substr(1, 1) : content);
var _content = styles.getPropertyValue('content');
var prefix = ~['Solid', 'Regular', 'Light', 'Duotone', 'Brands', 'Kit'].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];
var hexValue = toHex(_content.length === 3 ? _content.substr(1, 1) : _content);
var iconName = byUnicode(prefix, hexValue);
var iconIdentifier = iconName; // Only convert the pseudo element in this :before/:after position into an icon if we haven't
// already done so with the same prefix and iconName