Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@department-of-veterans-affairs/formation-react

Package Overview
Dependencies
Maintainers
24
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@department-of-veterans-affairs/formation-react - npm Package Compare versions

Comparing version 5.9.0 to 5.10.0

stories/address-block.stories.mdx

15

.storybook/main.js
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
stories: ['../@(src|stories)/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-essentials',
'@storybook/addon-links',
'@whitespace/storybook-addon-html/register',
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials"
]
}
};
import '@department-of-veterans-affairs/formation/dist/formation.min.css';
import '@department-of-veterans-affairs/formation/dist/formation';
import { withHTML } from '@whitespace/storybook-addon-html/react';
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
options: {
storySort: {
method: 'alphabetical',
order: ['About', ['Introduction']],
},
},
};
export const decorators = [withHTML];

@@ -46,60 +46,2 @@ "use strict";

*
## Intent
Breadcrumbs are intended to provide users an understanding of where they are
located in a rich information structure. They work well in situations where
users may have clicked several layers deep, and would want to move back toward
the top in linear steps.
## Using the Breadcrumbs Component
The `<Breadrumbs />` component accepts a number of different `children` props
and will render them correctly:
* An array of comma-separated `<a>` tags
* An array of comma-separated `<Link />` components (React router)
* Hard-coded HTML `<a>` tags
* A combination of HTML and React router components
You do not need to wrap your code in `<li>` or `<ul>` elements. The proper
markup is included in the `<Breadcrumbs />` component and will be output when
the `render()` method is executed.
## Mobile Width Adaptation
The breadcrumb component switches to a single previous step link when the screen
is collapsed or zoomed smaller than 481 device pixels or a custom
`props.mobileWidth` declaration. This adaptation is designed to minizime the
breadcrumb's footprint on smaller screens and is beneficial for sites with many
layers.
## Accessibility
The `<Breadcrumbs />` component has been tested for accessibility. It is fully
keyboard accessible, and announces the current page correctly in the following
screen reader combinations:
* MacOS + Safari + VoiceOver
* MacOS + Chrome + VoiceOver
* iOS + Safari + VoiceOver
* Windows 7/10 + Firefox + NVDA
* Windows 10 + Chrome + NVDA
* Windows 7/10 + IE11 + JAWS
* Windows 10 + Chrome + JAWS
### aria-label (ATTRIBUTE)
The `<Breadcrumbs />` component automatically adds an `aria-label="Breadcrumb"`
attribute to the containing `<nav>` element. This will be read out as
"Breadcrumb" to assistive devices like JAWS, NVDA, and VoiceOver. The label can
be changed to fit your needs by passing a custom string to the `ariaLabel` prop.
### aria-current (ATTRIBUTE)
The `<Breadcrumbs />` component automatically adds an `aria-current="page"`
attribute to the last link rendered by the full breadcrumb list. This attribute
triggers an `a[aria-current="page"]` CSS selector, makes the link bold, removes
the underline, and changes it to a black text color. Current [WAI-ARIA authoring
practices](https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/breadcrumb/index.html)
recommend this `aria-current="page"` attribute for screen reader context.
*/

@@ -106,0 +48,0 @@ var Breadcrumbs = /*#__PURE__*/function (_Component) {

@@ -134,3 +134,3 @@ "use strict";

}, _react["default"].createElement("div", {
className: "usa-date-of-birth row"
className: "usa-date-of-birth"
}, _react["default"].createElement("div", {

@@ -137,0 +137,0 @@ className: "form-datefield-month"

@@ -44,2 +44,6 @@ "use strict";

/**
* Display a maintenance banner for a given time window.
*/
exports.MAINTENANCE_BANNER = MAINTENANCE_BANNER;

@@ -46,0 +50,0 @@

@@ -34,8 +34,2 @@ "use strict";

var modalContents = function modalContents(minutes) {
return _react["default"].createElement("div", null, _react["default"].createElement("h3", null, "Privacy Act Statement"), _react["default"].createElement("p", null, _react["default"].createElement("strong", null, "Respondent Burden:"), " We need this information to determine your eligibility for education benefits (38 U.S.C. 3471). Title 38, United States Code, allows us to ask for this information. We estimate that you will need an average of ", minutes, " minutes to review the instructions, find the information, and complete this form. The VA cannot conduct or sponsor a collection of information unless a valid OMB (Office of Management and Budget) control number is displayed. You are not required to respond to a collection of information if this number is not displayed. Valid OMB control numbers can be located on the OMB Internet Page at www.reginfo.gov/public/do/PRAMain. If desired, you can call", ' ', _react["default"].createElement("a", {
href: "+18008271000"
}, "1-800-827-1000"), " to get information on where to send comments or suggestions about this form."), _react["default"].createElement("p", null, _react["default"].createElement("strong", null, "Privacy Act Notice:"), " The VA will not disclose information collected on this form to any source other than what has been authorized under the Privacy Act of 1974 or title 38, Code of Federal Regulations, section 1.576 for routine uses (e.g., the VA sends educational forms or letters with a veteran\u2019s identifying information to the Veteran\u2019s school or training establishment to (1) assist the veteran in the completion of claims forms or (2) for the VA to obtain further information as may be necessary from the school for VA to properly process the Veteran\u2019s education claim or to monitor his or her progress during training) as identified in the VA system of records, 58VA21/22/28, Compensation, Pension, Education, and Vocational Rehabilitation and Employment Records - VA, and published in the Federal Register. Your obligation to respond is required to obtain or retain education benefits. Giving us your SSN account information is voluntary. Refusal to provide your SSN by itself will not result in the denial of benefits. The VA will not deny an individual benefits for refusing to provide his or her SSN unless the disclosure of the SSN is required by a Federal Statute of law enacted before January 1, 1975, and still in effect. The requested information is considered relevant and necessary to determine the maximum benefits under the law. While you do not have to respond, VA cannot process your claim for education assistance unless the information is furnished as required by existing law (38 U.S.C. 3471). The responses you submit are considered confidential (38 U.S.C. 5701). Any information provided by applicants, recipients, and others may be subject to verification through computer matching programs with other agencies."));
};
var OMBInfo = /*#__PURE__*/function (_React$Component) {

@@ -63,2 +57,8 @@ _inherits(OMBInfo, _React$Component);

_defineProperty(_assertThisInitialized(_this), "modalContents", function (minutes) {
return _react["default"].createElement("div", null, _react["default"].createElement("h3", null, "Privacy Act Statement"), minutes && _react["default"].createElement("p", null, _react["default"].createElement("strong", null, "Respondent Burden:"), " We need this information to determine your eligibility for education benefits (38 U.S.C. 3471). Title 38, United States Code, allows us to ask for this information. We estimate that you will need an average of ", minutes, " minutes to review the instructions, find the information, and complete this form. The VA cannot conduct or sponsor a collection of information unless a valid OMB (Office of Management and Budget) control number is displayed. You are not required to respond to a collection of information if this number is not displayed. Valid OMB control numbers can be located on the OMB Internet Page at www.reginfo.gov/public/do/PRAMain. If desired, you can call", ' ', _react["default"].createElement("a", {
href: "+18008271000"
}, "1-800-827-1000"), " to get information on where to send comments or suggestions about this form."), _react["default"].createElement("p", null, _react["default"].createElement("strong", null, "Privacy Act Notice:"), " The VA will not disclose information collected on this form to any source other than what has been authorized under the Privacy Act of 1974 or title 38, Code of Federal Regulations, section 1.576 for routine uses (e.g., the VA sends educational forms or letters with a veteran\u2019s identifying information to the Veteran\u2019s school or training establishment to (1) assist the veteran in the completion of claims forms or (2) for the VA to obtain further information as may be necessary from the school for VA to properly process the Veteran\u2019s education claim or to monitor his or her progress during training) as identified in the VA system of records, 58VA21/22/28, Compensation, Pension, Education, and Vocational Rehabilitation and Employment Records - VA, and published in the Federal Register. Your obligation to respond is required to obtain or retain education benefits. Giving us your SSN account information is voluntary. Refusal to provide your SSN by itself will not result in the denial of benefits. The VA will not deny an individual benefits for refusing to provide his or her SSN unless the disclosure of the SSN is required by a Federal Statute of law enacted before January 1, 1975, and still in effect. The requested information is considered relevant and necessary to determine the maximum benefits under the law. While you do not have to respond, VA cannot process your claim for education assistance unless the information is furnished as required by existing law (38 U.S.C. 3471). The responses you submit are considered confidential (38 U.S.C. 5701). Any information provided by applicants, recipients, and others may be subject to verification through computer matching programs with other agencies."));
});
_this.state = {

@@ -79,3 +79,3 @@ modalOpen: false

className: "omb-info"
}, resBurden && _react["default"].createElement("div", null, "Respondent burden: ", _react["default"].createElement("strong", null, resBurden, " minutes")), _react["default"].createElement("div", null, "OMB Control #: ", _react["default"].createElement("strong", null, ombNumber)), _react["default"].createElement("div", null, "Expiration date: ", _react["default"].createElement("strong", null, expDate)), _react["default"].createElement("div", null, _react["default"].createElement("button", {
}, resBurden && _react["default"].createElement("div", null, "Respondent burden: ", _react["default"].createElement("strong", null, resBurden, " minutes")), ombNumber && _react["default"].createElement("div", null, "OMB Control #: ", _react["default"].createElement("strong", null, ombNumber)), _react["default"].createElement("div", null, "Expiration date: ", _react["default"].createElement("strong", null, expDate)), _react["default"].createElement("div", null, _react["default"].createElement("button", {
className: "va-button-link",

@@ -85,3 +85,3 @@ onClick: this.openModal

cssClass: "va-modal-large",
contents: this.props.children ? this.props.children : modalContents(resBurden),
contents: this.props.children ? this.props.children : this.modalContents(resBurden),
id: "omb-modal",

@@ -88,0 +88,0 @@ visible: this.state.modalOpen,

{
"name": "@department-of-veterans-affairs/formation-react",
"version": "5.9.0",
"version": "5.10.0",
"description": "React implementation of patterns in Formation",

@@ -20,2 +20,3 @@ "keywords": [

"build": "node ./scripts/build.js",
"prepublishOnly": "node ../../scripts/prepublish.js",
"release": "PACKAGE=formation-react VERSION=$npm_package_version node ../../scripts/release.js",

@@ -46,9 +47,13 @@ "test-watch": "karma start testing/karma.conf.js --auto-watch",

"@department-of-veterans-affairs/formation": "^6.9.0",
"@storybook/addon-actions": "^6.0.26",
"@storybook/addon-essentials": "^6.0.26",
"@storybook/addon-links": "^6.0.26",
"@storybook/react": "^6.0.26",
"@storybook/addon-a11y": "^6.1.1",
"@storybook/addon-actions": "^6.1.1",
"@storybook/addon-essentials": "^6.1.1",
"@storybook/addon-links": "^6.1.1",
"@storybook/react": "^6.1.1",
"@whitespace/storybook-addon-html": "^2.0.1",
"babel-loader": "^8.1.0",
"react-html-parser": "^2.0.2",
"react-is": "^17.0.1"
}
}

@@ -40,3 +40,2 @@ This module contains reusable react components from [vets-website](https://github.com/department-of-veterans-affairs/vets-website) housed in its design system [repo](https://github.com/department-of-veterans-affairs/design-system).

- SegmentedProgressBar.js
- SortableTable.js
- SystemDownView.js

@@ -43,0 +42,0 @@ - Table.js

@@ -6,61 +6,17 @@ "use strict";

});
exports["default"] = exports.PATTERNS = exports.CONTACTS = void 0;
Object.defineProperty(exports, "CONTACTS", {
enumerable: true,
get: function get() {
return _contacts.CONTACTS;
}
});
exports["default"] = exports.PATTERNS = void 0;
var _react = _interopRequireDefault(require("react"));
var _contacts = require("./contacts");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var CONTACTS = Object.freeze({
'222_VETS': '8772228387',
// VA Help Line
'4AID_VET': '8774243838',
// National Call Center for Homeless Veterans
711: '711',
// Telecommunications Relay Service
911: '911',
CAREGIVER: '8552603274',
// VA National Caregiver Support Line
CRISIS_LINE: '8002738255',
// Veterans Crisis hotline
CRISIS_TTY: '8007994889',
// Veterans Crisis hotline TTY
DMC: '8008270648',
// Debt Management Center
DMC_OVERSEAS: '6127136415',
// Debt Management Center (Overseas)
DS_LOGON: '8005389552',
// Defense Manpower Data Center
DS_LOGON_TTY: '8663632883',
// Defense Manpower Data Center TTY
GI_BILL: '8884424551',
// Education Call Center (1-888-GI-BILL-1)
GO_DIRECT: '8003331795',
// Go Direct/Direct Express (Treasury)
HELP_DESK: '8006982411',
// VA Help desk
HEALTHCARE_ELIGIBILITY_CENTER: '8554888440',
// VA Healthcare Eligibility Center (Eligibility Division)
HELP_TTY: '8008778339',
// VA Help Desk TTY
MY_HEALTHEVET: '8773270022',
// My HealtheVet help desk
NCA: '8005351117',
// National Cemetery Scheduling Office
TESC: '8882242950',
// U.S. Treasury Electronic Payment Solution Center
TREASURY_DMS: '8888263127',
// U.S. Department of the Treasury (Debt Management Services)
FEDERAL_RELAY_SERVICE: '8008778339',
// Federal Relay Service
SUICIDE_PREVENTION_LIFELINE: '8007994889',
// Suicide Prevention Line
DMDC_DEERS: '8663632883',
// Defense Manpower Data Center (DMDC) | Defense Enrollment Eligibility Reporting System (DEERS) Support Office
VA_311: '8006982411',
// VA Help desk (VA311)
VA_BENEFITS: '8008271000' // Veterans Benefits Assistance
}); // Patterns used in formatting visible text
exports.CONTACTS = CONTACTS;
// Patterns used in formatting visible text
var PATTERNS = {

@@ -193,3 +149,3 @@ '3_DIGIT': '###',

var parsedNumber = parseNumber(contact.toString());
var phoneNumber = CONTACTS[parsedNumber] || parsedNumber; // Capture 3 digit patterns here
var phoneNumber = _contacts.CONTACTS[parsedNumber] || parsedNumber; // Capture 3 digit patterns here

@@ -196,0 +152,0 @@ var contactPattern = deriveContactPattern(pattern, parsedNumber);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc