@department-of-veterans-affairs/component-library
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -130,4 +130,6 @@ "use strict"; | ||
var errorSpan = ''; | ||
var fieldsetClass; | ||
if (!isValid) { | ||
fieldsetClass = 'input-error-date usa-input-error'; | ||
errorSpanId = "".concat(this.inputId, "-error-message"); | ||
@@ -144,3 +146,3 @@ errorSpan = /*#__PURE__*/_react["default"].createElement("span", { | ||
return /*#__PURE__*/_react["default"].createElement("fieldset", { | ||
className: !isValid ? 'input-error-date' : undefined | ||
className: fieldsetClass | ||
}, /*#__PURE__*/_react["default"].createElement("legend", { | ||
@@ -147,0 +149,0 @@ className: "vads-u-font-size--base vads-u-font-weight--normal" |
{ | ||
"name": "@department-of-veterans-affairs/component-library", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "VA.gov component library in React", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -25,8 +25,2 @@ "use strict"; | ||
OUTSIDE_US: '+1-###-###-####' | ||
}; // Custom aria labels (only used internally) | ||
exports.PATTERNS = PATTERNS; | ||
var LABELS = { | ||
711: 'TTY: 7 1 1.', | ||
911: '1. 9 1 1.' | ||
}; | ||
@@ -40,2 +34,4 @@ /** | ||
exports.PATTERNS = PATTERNS; | ||
var parseNumber = function parseNumber(number) { | ||
@@ -160,6 +156,7 @@ return number.replace(/^1/, '') // strip leading "1" from telephone number | ||
var formattedAriaLabel = ariaLabel || LABELS[parsedNumber] || // custom 911 aria-label | ||
"".concat(formatTelLabel(formattedNumber)).concat(extension ? ". extension ".concat(formatTelLabelBlock(extension), ".") : '.'); // Add a "+1" to the tel for all included patterns | ||
var formattedAriaLabel = ariaLabel || "".concat(formatTelLabel(formattedNumber)).concat(extension ? ". extension ".concat(formatTelLabelBlock(extension), ".") : '.'); // Add a "+1" to the tel for all included patterns, except 3-digit | ||
var isIncludedPattern = Object.values(PATTERNS).includes(contactPattern); | ||
var isIncludedPattern = Object.values(PATTERNS).filter(function (pattern) { | ||
return pattern !== PATTERNS['3_DIGIT']; | ||
}).includes(contactPattern); | ||
var href = "tel:".concat(isIncludedPattern ? "+1".concat(phoneNumber) : phoneNumber).concat( // extension format ";ext=" from RFC3966 https://tools.ietf.org/html/rfc3966#page-5 | ||
@@ -166,0 +163,0 @@ // but it seems that using a comma to pause for 2 seconds might be a better |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
270879
4457