@department-of-veterans-affairs/component-library 50.2.1 → 50.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1214.app.bundle.js +1 -1
- package/dist/1450.app.bundle.js +1 -1
- package/dist/2319.app.bundle.js +2 -0
- package/dist/2387.app.bundle.js +1 -1
- package/dist/2654.app.bundle.js +1 -1
- package/dist/2801.app.bundle.js +1 -1
- package/dist/2980.app.bundle.js +1 -0
- package/dist/3071.app.bundle.js +1 -1
- package/dist/4064.app.bundle.js +1 -1
- package/dist/4117.app.bundle.js +1 -1
- package/dist/4140.app.bundle.js +1 -1
- package/dist/4715.app.bundle.js +1 -1
- package/dist/5155.app.bundle.js +1 -1
- package/dist/5306.app.bundle.js +1 -1
- package/dist/5610.app.bundle.js +1 -1
- package/dist/5699.app.bundle.js +1 -1
- package/dist/5830.app.bundle.js +1 -1
- package/dist/6034.app.bundle.js +1 -1
- package/dist/6246.app.bundle.js +1 -1
- package/dist/6247.app.bundle.js +1 -1
- package/dist/6349.app.bundle.js +1 -1
- package/dist/641.app.bundle.js +1 -1
- package/dist/6527.app.bundle.js +1 -1
- package/dist/6655.app.bundle.js +1 -1
- package/dist/712.app.bundle.js +1 -1
- package/dist/7367.app.bundle.js +1 -1
- package/dist/746.app.bundle.js +2 -0
- package/dist/7531.app.bundle.js +1 -1
- package/dist/7663.app.bundle.js +1 -1
- package/dist/8175.app.bundle.js +1 -1
- package/dist/8206.app.bundle.js +1 -0
- package/dist/8495.app.bundle.js +1 -1
- package/dist/8762.app.bundle.js +1 -1
- package/dist/9288.app.bundle.js +1 -1
- package/dist/9670.app.bundle.js +1 -1
- package/dist/9724.app.bundle.js +1 -1
- package/dist/9800.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +1 -1
- package/dist/components/types/components.d.ts +215 -4
- package/dist/components/utils.js +1 -1
- package/dist/components/va-accordion-item.js +1 -1
- package/dist/components/va-accordion-item2.js +1 -0
- package/dist/components/va-accordion.js +1 -1
- package/dist/components/va-accordion2.js +1 -0
- package/dist/components/va-additional-info.js +1 -1
- package/dist/components/va-alert-sign-in.js +1 -1
- package/dist/components/va-checkbox-group.js +1 -1
- package/dist/components/va-checkbox-group2.js +1 -0
- package/dist/components/va-checkbox2.js +1 -1
- package/dist/components/va-combo-box.js +1 -18
- package/dist/components/va-combo-box2.js +20 -0
- package/dist/components/va-file-input2.js +1 -1
- package/dist/components/va-input-telephone.d.ts +11 -0
- package/dist/components/va-input-telephone.js +1 -0
- package/dist/components/va-language-toggle.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-loading-indicator.js +1 -1
- package/dist/components/va-memorable-date.js +1 -1
- package/dist/components/va-minimal-footer.js +1 -1
- package/dist/components/va-modal2.js +1 -1
- package/dist/components/va-need-help.js +1 -1
- package/dist/components/va-official-gov-banner2.js +1 -1
- package/dist/components/va-omb-info.js +1 -1
- package/dist/components/va-privacy-agreement.js +1 -1
- package/dist/components/va-process-list-item.js +1 -1
- package/dist/components/va-process-list.js +1 -1
- package/dist/components/va-progress-bar2.js +1 -1
- package/dist/components/va-radio-option.js +1 -1
- package/dist/components/va-radio.js +1 -1
- package/dist/components/va-search-filter.d.ts +11 -0
- package/dist/components/va-search-filter.js +1 -0
- package/dist/components/va-search-input.js +1 -1
- package/dist/components/va-select2.js +1 -1
- package/dist/components/va-service-list-item.js +1 -1
- package/dist/components/va-statement-of-truth.js +1 -1
- package/dist/components/va-summary-box.js +1 -1
- package/dist/components/va-table-inner2.js +1 -1
- package/dist/components/va-table-row.js +1 -1
- package/dist/components/va-table.js +1 -1
- package/dist/components/va-telephone2.js +1 -1
- package/dist/components/va-text-input2.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/dist/react-bindings/index.d.ts +2 -0
- package/dist/react-bindings/index.js +1 -1
- package/dist/react-bindings/index.js.map +1 -1
- package/dist/react-bindings/index.ts +2 -0
- package/package.json +2 -2
- package/dist/2664.app.bundle.js +0 -2
- package/dist/4033.app.bundle.js +0 -1
- package/dist/4493.app.bundle.js +0 -2
- package/dist/9157.app.bundle.js +0 -2
- package/dist/9157.app.bundle.js.LICENSE.txt +0 -5
- /package/dist/{2664.app.bundle.js.LICENSE.txt → 2319.app.bundle.js.LICENSE.txt} +0 -0
- /package/dist/{4493.app.bundle.js.LICENSE.txt → 746.app.bundle.js.LICENSE.txt} +0 -0
- /package/dist/components/{va-combo-box.js.LICENSE.txt → va-combo-box2.js.LICENSE.txt} +0 -0
|
@@ -45,6 +45,8 @@ export { VaHeaderMinimal as VaHeaderMinimal } from '../types/components/va-heade
|
|
|
45
45
|
export { defineCustomElement as defineCustomElementVaHeaderMinimal } from './va-header-minimal';
|
|
46
46
|
export { VaIcon as VaIcon } from '../types/components/va-icon/va-icon';
|
|
47
47
|
export { defineCustomElement as defineCustomElementVaIcon } from './va-icon';
|
|
48
|
+
export { VaInternationalTelephone as VaInputTelephone } from '../types/components/va-input-telephone/va-input-telephone';
|
|
49
|
+
export { defineCustomElement as defineCustomElementVaInputTelephone } from './va-input-telephone';
|
|
48
50
|
export { VaLanguageToggle as VaLanguageToggle } from '../types/components/va-language-toggle/va-language-toggle';
|
|
49
51
|
export { defineCustomElement as defineCustomElementVaLanguageToggle } from './va-language-toggle';
|
|
50
52
|
export { VaLink as VaLink } from '../types/components/va-link/va-link';
|
|
@@ -87,6 +89,8 @@ export { VaRadio as VaRadio } from '../types/components/va-radio/va-radio';
|
|
|
87
89
|
export { defineCustomElement as defineCustomElementVaRadio } from './va-radio';
|
|
88
90
|
export { VaRadioOption as VaRadioOption } from '../types/components/va-radio-option/va-radio-option';
|
|
89
91
|
export { defineCustomElement as defineCustomElementVaRadioOption } from './va-radio-option';
|
|
92
|
+
export { VaSearchFilter as VaSearchFilter } from '../types/components/va-search-filter/va-search-filter';
|
|
93
|
+
export { defineCustomElement as defineCustomElementVaSearchFilter } from './va-search-filter';
|
|
90
94
|
export { VaSearchInput as VaSearchInput } from '../types/components/va-search-input/va-search-input';
|
|
91
95
|
export { defineCustomElement as defineCustomElementVaSearchInput } from './va-search-input';
|
|
92
96
|
export { VaSegmentedProgressBar as VaSegmentedProgressBar } from '../types/components/va-segmented-progress-bar/va-segmented-progress-bar';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getAssetPath,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";import"./i18n-setup.js";export{C as CONTACTS,c as contactsMap}from"./contacts.js";export{VaAccordion,defineCustomElement as defineCustomElementVaAccordion}from"./va-accordion.js";export{VaAccordionItem,defineCustomElement as defineCustomElementVaAccordionItem}from"./va-accordion-item.js";export{VaAdditionalInfo,defineCustomElement as defineCustomElementVaAdditionalInfo}from"./va-additional-info.js";export{VaAlert,defineCustomElement as defineCustomElementVaAlert}from"./va-alert.js";export{VaAlertExpandable,defineCustomElement as defineCustomElementVaAlertExpandable}from"./va-alert-expandable.js";export{VaAlertSignIn,defineCustomElement as defineCustomElementVaAlertSignIn}from"./va-alert-sign-in.js";export{VaBackToTop,defineCustomElement as defineCustomElementVaBackToTop}from"./va-back-to-top.js";export{VaBanner,defineCustomElement as defineCustomElementVaBanner}from"./va-banner.js";export{VaBreadcrumbs,defineCustomElement as defineCustomElementVaBreadcrumbs}from"./va-breadcrumbs.js";export{VaButton,defineCustomElement as defineCustomElementVaButton}from"./va-button.js";export{VaButtonIcon,defineCustomElement as defineCustomElementVaButtonIcon}from"./va-button-icon.js";export{VaButtonPair,defineCustomElement as defineCustomElementVaButtonPair}from"./va-button-pair.js";export{VaCard,defineCustomElement as defineCustomElementVaCard}from"./va-card.js";export{VaCheckbox,defineCustomElement as defineCustomElementVaCheckbox}from"./va-checkbox.js";export{VaCheckboxGroup,defineCustomElement as defineCustomElementVaCheckboxGroup}from"./va-checkbox-group.js";export{VaComboBox,defineCustomElement as defineCustomElementVaComboBox}from"./va-combo-box.js";export{VaCrisisLineModal,defineCustomElement as defineCustomElementVaCrisisLineModal}from"./va-crisis-line-modal.js";export{VaCriticalAction,defineCustomElement as defineCustomElementVaCriticalAction}from"./va-critical-action.js";export{VaDate,defineCustomElement as defineCustomElementVaDate}from"./va-date.js";export{VaFileInput,defineCustomElement as defineCustomElementVaFileInput}from"./va-file-input.js";export{VaFileInputMultiple,defineCustomElement as defineCustomElementVaFileInputMultiple}from"./va-file-input-multiple.js";export{VaHeaderMinimal,defineCustomElement as defineCustomElementVaHeaderMinimal}from"./va-header-minimal.js";export{VaIcon,defineCustomElement as defineCustomElementVaIcon}from"./va-icon.js";export{VaLanguageToggle,defineCustomElement as defineCustomElementVaLanguageToggle}from"./va-language-toggle.js";export{VaLink,defineCustomElement as defineCustomElementVaLink}from"./va-link.js";export{VaLinkAction,defineCustomElement as defineCustomElementVaLinkAction}from"./va-link-action.js";export{VaLoadingIndicator,defineCustomElement as defineCustomElementVaLoadingIndicator}from"./va-loading-indicator.js";export{VaMaintenanceBanner,defineCustomElement as defineCustomElementVaMaintenanceBanner}from"./va-maintenance-banner.js";export{VaMemorableDate,defineCustomElement as defineCustomElementVaMemorableDate}from"./va-memorable-date.js";export{VaMinimalFooter,defineCustomElement as defineCustomElementVaMinimalFooter}from"./va-minimal-footer.js";export{VaModal,defineCustomElement as defineCustomElementVaModal}from"./va-modal.js";export{VaNeedHelp,defineCustomElement as defineCustomElementVaNeedHelp}from"./va-need-help.js";export{VaNotification,defineCustomElement as defineCustomElementVaNotification}from"./va-notification.js";export{VaOfficialGovBanner,defineCustomElement as defineCustomElementVaOfficialGovBanner}from"./va-official-gov-banner.js";export{VaOmbInfo,defineCustomElement as defineCustomElementVaOmbInfo}from"./va-omb-info.js";export{VaOnThisPage,defineCustomElement as defineCustomElementVaOnThisPage}from"./va-on-this-page.js";export{VaPagination,defineCustomElement as defineCustomElementVaPagination}from"./va-pagination.js";export{VaPrivacyAgreement,defineCustomElement as defineCustomElementVaPrivacyAgreement}from"./va-privacy-agreement.js";export{VaProcessList,defineCustomElement as defineCustomElementVaProcessList}from"./va-process-list.js";export{VaProcessListItem,defineCustomElement as defineCustomElementVaProcessListItem}from"./va-process-list-item.js";export{VaProgressBar,defineCustomElement as defineCustomElementVaProgressBar}from"./va-progress-bar.js";export{VaPromoBanner,defineCustomElement as defineCustomElementVaPromoBanner}from"./va-promo-banner.js";export{VaRadio,defineCustomElement as defineCustomElementVaRadio}from"./va-radio.js";export{VaRadioOption,defineCustomElement as defineCustomElementVaRadioOption}from"./va-radio-option.js";export{VaSearchInput,defineCustomElement as defineCustomElementVaSearchInput}from"./va-search-input.js";export{VaSegmentedProgressBar,defineCustomElement as defineCustomElementVaSegmentedProgressBar}from"./va-segmented-progress-bar.js";export{VaSelect,defineCustomElement as defineCustomElementVaSelect}from"./va-select.js";export{VaServiceListItem,defineCustomElement as defineCustomElementVaServiceListItem}from"./va-service-list-item.js";export{VaStatementOfTruth,defineCustomElement as defineCustomElementVaStatementOfTruth}from"./va-statement-of-truth.js";export{VaSummaryBox,defineCustomElement as defineCustomElementVaSummaryBox}from"./va-summary-box.js";export{VaTable,defineCustomElement as defineCustomElementVaTable}from"./va-table.js";export{VaTableInner,defineCustomElement as defineCustomElementVaTableInner}from"./va-table-inner.js";export{VaTableRow,defineCustomElement as defineCustomElementVaTableRow}from"./va-table-row.js";export{VaTelephone,defineCustomElement as defineCustomElementVaTelephone}from"./va-telephone.js";export{VaTextInput,defineCustomElement as defineCustomElementVaTextInput}from"./va-text-input.js";export{VaTextarea,defineCustomElement as defineCustomElementVaTextarea}from"./va-textarea.js";export{i as i18next}from"./i18next.js";
|
|
1
|
+
export{getAssetPath,setAssetPath,setNonce,setPlatformOptions}from"@stencil/core/internal/client";import"./i18n-setup.js";export{C as CONTACTS,c as contactsMap}from"./contacts.js";export{VaAccordion,defineCustomElement as defineCustomElementVaAccordion}from"./va-accordion.js";export{VaAccordionItem,defineCustomElement as defineCustomElementVaAccordionItem}from"./va-accordion-item.js";export{VaAdditionalInfo,defineCustomElement as defineCustomElementVaAdditionalInfo}from"./va-additional-info.js";export{VaAlert,defineCustomElement as defineCustomElementVaAlert}from"./va-alert.js";export{VaAlertExpandable,defineCustomElement as defineCustomElementVaAlertExpandable}from"./va-alert-expandable.js";export{VaAlertSignIn,defineCustomElement as defineCustomElementVaAlertSignIn}from"./va-alert-sign-in.js";export{VaBackToTop,defineCustomElement as defineCustomElementVaBackToTop}from"./va-back-to-top.js";export{VaBanner,defineCustomElement as defineCustomElementVaBanner}from"./va-banner.js";export{VaBreadcrumbs,defineCustomElement as defineCustomElementVaBreadcrumbs}from"./va-breadcrumbs.js";export{VaButton,defineCustomElement as defineCustomElementVaButton}from"./va-button.js";export{VaButtonIcon,defineCustomElement as defineCustomElementVaButtonIcon}from"./va-button-icon.js";export{VaButtonPair,defineCustomElement as defineCustomElementVaButtonPair}from"./va-button-pair.js";export{VaCard,defineCustomElement as defineCustomElementVaCard}from"./va-card.js";export{VaCheckbox,defineCustomElement as defineCustomElementVaCheckbox}from"./va-checkbox.js";export{VaCheckboxGroup,defineCustomElement as defineCustomElementVaCheckboxGroup}from"./va-checkbox-group.js";export{VaComboBox,defineCustomElement as defineCustomElementVaComboBox}from"./va-combo-box.js";export{VaCrisisLineModal,defineCustomElement as defineCustomElementVaCrisisLineModal}from"./va-crisis-line-modal.js";export{VaCriticalAction,defineCustomElement as defineCustomElementVaCriticalAction}from"./va-critical-action.js";export{VaDate,defineCustomElement as defineCustomElementVaDate}from"./va-date.js";export{VaFileInput,defineCustomElement as defineCustomElementVaFileInput}from"./va-file-input.js";export{VaFileInputMultiple,defineCustomElement as defineCustomElementVaFileInputMultiple}from"./va-file-input-multiple.js";export{VaHeaderMinimal,defineCustomElement as defineCustomElementVaHeaderMinimal}from"./va-header-minimal.js";export{VaIcon,defineCustomElement as defineCustomElementVaIcon}from"./va-icon.js";export{VaInputTelephone,defineCustomElement as defineCustomElementVaInputTelephone}from"./va-input-telephone.js";export{VaLanguageToggle,defineCustomElement as defineCustomElementVaLanguageToggle}from"./va-language-toggle.js";export{VaLink,defineCustomElement as defineCustomElementVaLink}from"./va-link.js";export{VaLinkAction,defineCustomElement as defineCustomElementVaLinkAction}from"./va-link-action.js";export{VaLoadingIndicator,defineCustomElement as defineCustomElementVaLoadingIndicator}from"./va-loading-indicator.js";export{VaMaintenanceBanner,defineCustomElement as defineCustomElementVaMaintenanceBanner}from"./va-maintenance-banner.js";export{VaMemorableDate,defineCustomElement as defineCustomElementVaMemorableDate}from"./va-memorable-date.js";export{VaMinimalFooter,defineCustomElement as defineCustomElementVaMinimalFooter}from"./va-minimal-footer.js";export{VaModal,defineCustomElement as defineCustomElementVaModal}from"./va-modal.js";export{VaNeedHelp,defineCustomElement as defineCustomElementVaNeedHelp}from"./va-need-help.js";export{VaNotification,defineCustomElement as defineCustomElementVaNotification}from"./va-notification.js";export{VaOfficialGovBanner,defineCustomElement as defineCustomElementVaOfficialGovBanner}from"./va-official-gov-banner.js";export{VaOmbInfo,defineCustomElement as defineCustomElementVaOmbInfo}from"./va-omb-info.js";export{VaOnThisPage,defineCustomElement as defineCustomElementVaOnThisPage}from"./va-on-this-page.js";export{VaPagination,defineCustomElement as defineCustomElementVaPagination}from"./va-pagination.js";export{VaPrivacyAgreement,defineCustomElement as defineCustomElementVaPrivacyAgreement}from"./va-privacy-agreement.js";export{VaProcessList,defineCustomElement as defineCustomElementVaProcessList}from"./va-process-list.js";export{VaProcessListItem,defineCustomElement as defineCustomElementVaProcessListItem}from"./va-process-list-item.js";export{VaProgressBar,defineCustomElement as defineCustomElementVaProgressBar}from"./va-progress-bar.js";export{VaPromoBanner,defineCustomElement as defineCustomElementVaPromoBanner}from"./va-promo-banner.js";export{VaRadio,defineCustomElement as defineCustomElementVaRadio}from"./va-radio.js";export{VaRadioOption,defineCustomElement as defineCustomElementVaRadioOption}from"./va-radio-option.js";export{VaSearchFilter,defineCustomElement as defineCustomElementVaSearchFilter}from"./va-search-filter.js";export{VaSearchInput,defineCustomElement as defineCustomElementVaSearchInput}from"./va-search-input.js";export{VaSegmentedProgressBar,defineCustomElement as defineCustomElementVaSegmentedProgressBar}from"./va-segmented-progress-bar.js";export{VaSelect,defineCustomElement as defineCustomElementVaSelect}from"./va-select.js";export{VaServiceListItem,defineCustomElement as defineCustomElementVaServiceListItem}from"./va-service-list-item.js";export{VaStatementOfTruth,defineCustomElement as defineCustomElementVaStatementOfTruth}from"./va-statement-of-truth.js";export{VaSummaryBox,defineCustomElement as defineCustomElementVaSummaryBox}from"./va-summary-box.js";export{VaTable,defineCustomElement as defineCustomElementVaTable}from"./va-table.js";export{VaTableInner,defineCustomElement as defineCustomElementVaTableInner}from"./va-table-inner.js";export{VaTableRow,defineCustomElement as defineCustomElementVaTableRow}from"./va-table-row.js";export{VaTelephone,defineCustomElement as defineCustomElementVaTelephone}from"./va-telephone.js";export{VaTextInput,defineCustomElement as defineCustomElementVaTextInput}from"./va-text-input.js";export{VaTextarea,defineCustomElement as defineCustomElementVaTextarea}from"./va-textarea.js";export{i as i18next}from"./i18next.js";
|
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { Breadcrumb } from "./components/va-breadcrumbs/va-breadcrumbs";
|
|
9
9
|
import { UploadedFile } from "./components/va-file-input/uploadedFile";
|
|
10
|
+
import { CountryCode } from "libphonenumber-js/min";
|
|
11
|
+
import { Filter } from "./components/va-search-filter/va-search-filter";
|
|
10
12
|
import { OptionalLink, ServiceAction, ServiceDetails } from "./components/va-service-list-item/va-service-list-item";
|
|
11
13
|
export { Breadcrumb } from "./components/va-breadcrumbs/va-breadcrumbs";
|
|
12
14
|
export { UploadedFile } from "./components/va-file-input/uploadedFile";
|
|
15
|
+
export { CountryCode } from "libphonenumber-js/min";
|
|
16
|
+
export { Filter } from "./components/va-search-filter/va-search-filter";
|
|
13
17
|
export { OptionalLink, ServiceAction, ServiceDetails } from "./components/va-service-list-item/va-service-list-item";
|
|
14
18
|
export namespace Components {
|
|
15
19
|
/**
|
|
@@ -533,6 +537,10 @@ export namespace Components {
|
|
|
533
537
|
* Whether or not this is a required field.
|
|
534
538
|
*/
|
|
535
539
|
"required"?: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* Whether to show error message text
|
|
542
|
+
*/
|
|
543
|
+
"showInputError"?: boolean;
|
|
536
544
|
/**
|
|
537
545
|
* Selected value (will get updated on select).
|
|
538
546
|
*/
|
|
@@ -778,6 +786,39 @@ export namespace Components {
|
|
|
778
786
|
*/
|
|
779
787
|
"srtext"?: string;
|
|
780
788
|
}
|
|
789
|
+
/**
|
|
790
|
+
* @componentName Input Telephone
|
|
791
|
+
* @maturityCategory caution
|
|
792
|
+
* @maturityLevel proposal
|
|
793
|
+
* @guidanceHref form/input-telephone
|
|
794
|
+
* @translations English
|
|
795
|
+
*/
|
|
796
|
+
interface VaInputTelephone {
|
|
797
|
+
/**
|
|
798
|
+
* The telephone contact information
|
|
799
|
+
*/
|
|
800
|
+
"contact"?: string;
|
|
801
|
+
/**
|
|
802
|
+
* The 2 letter ISO country code for a country
|
|
803
|
+
*/
|
|
804
|
+
"country"?: CountryCode;
|
|
805
|
+
/**
|
|
806
|
+
* The error for the component
|
|
807
|
+
*/
|
|
808
|
+
"error"?: string;
|
|
809
|
+
/**
|
|
810
|
+
* Header text for the component
|
|
811
|
+
*/
|
|
812
|
+
"header"?: string;
|
|
813
|
+
/**
|
|
814
|
+
* Hint string text
|
|
815
|
+
*/
|
|
816
|
+
"hint"?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Whether the country select should be included. Set to true to exclude it.
|
|
819
|
+
*/
|
|
820
|
+
"noCountry"?: boolean;
|
|
821
|
+
}
|
|
781
822
|
/**
|
|
782
823
|
* @componentName Language Toggle
|
|
783
824
|
* @maturityCategory caution
|
|
@@ -1437,6 +1478,21 @@ export namespace Components {
|
|
|
1437
1478
|
*/
|
|
1438
1479
|
"value": string;
|
|
1439
1480
|
}
|
|
1481
|
+
/**
|
|
1482
|
+
* @componentName Search Filter
|
|
1483
|
+
* @maturityCategory caution
|
|
1484
|
+
* @maturityLevel candidate
|
|
1485
|
+
*/
|
|
1486
|
+
interface VaSearchFilter {
|
|
1487
|
+
/**
|
|
1488
|
+
* Represents a list of filter facets and their categories. Use a JSON array of objects with label and id properties.
|
|
1489
|
+
*/
|
|
1490
|
+
"filterOptions": Filter[];
|
|
1491
|
+
/**
|
|
1492
|
+
* The filter header text.
|
|
1493
|
+
*/
|
|
1494
|
+
"header": string;
|
|
1495
|
+
}
|
|
1440
1496
|
/**
|
|
1441
1497
|
* @componentName Search input
|
|
1442
1498
|
* @maturityCategory use
|
|
@@ -1703,7 +1759,7 @@ export namespace Components {
|
|
|
1703
1759
|
*/
|
|
1704
1760
|
"scrollable"?: boolean;
|
|
1705
1761
|
/**
|
|
1706
|
-
*
|
|
1762
|
+
* If true, the table is sortable. To use a raw sort value for a cell, add a data-sort-value attribute to the span element.
|
|
1707
1763
|
*/
|
|
1708
1764
|
"sortable"?: boolean;
|
|
1709
1765
|
/**
|
|
@@ -1747,7 +1803,7 @@ export namespace Components {
|
|
|
1747
1803
|
*/
|
|
1748
1804
|
"scrollable"?: boolean;
|
|
1749
1805
|
/**
|
|
1750
|
-
*
|
|
1806
|
+
* If true, the table is sortable. To use a raw sort value for a cell, add a data-sort-value attribute to the span element.
|
|
1751
1807
|
*/
|
|
1752
1808
|
"sortable"?: boolean;
|
|
1753
1809
|
/**
|
|
@@ -1844,6 +1900,10 @@ export namespace Components {
|
|
|
1844
1900
|
* The error message to render.
|
|
1845
1901
|
*/
|
|
1846
1902
|
"error"?: string;
|
|
1903
|
+
/**
|
|
1904
|
+
* Adds a Datadog privacy class to the error message for cases when sensitive information is included, such as in va-statement-of-truth.
|
|
1905
|
+
*/
|
|
1906
|
+
"errorHasPii"?: boolean;
|
|
1847
1907
|
/**
|
|
1848
1908
|
* The content of the heading if `useFormsPattern` is true.
|
|
1849
1909
|
*/
|
|
@@ -2092,6 +2152,10 @@ export interface VaFileInputMultipleCustomEvent<T> extends CustomEvent<T> {
|
|
|
2092
2152
|
detail: T;
|
|
2093
2153
|
target: HTMLVaFileInputMultipleElement;
|
|
2094
2154
|
}
|
|
2155
|
+
export interface VaInputTelephoneCustomEvent<T> extends CustomEvent<T> {
|
|
2156
|
+
detail: T;
|
|
2157
|
+
target: HTMLVaInputTelephoneElement;
|
|
2158
|
+
}
|
|
2095
2159
|
export interface VaLanguageToggleCustomEvent<T> extends CustomEvent<T> {
|
|
2096
2160
|
detail: T;
|
|
2097
2161
|
target: HTMLVaLanguageToggleElement;
|
|
@@ -2156,6 +2220,10 @@ export interface VaRadioOptionCustomEvent<T> extends CustomEvent<T> {
|
|
|
2156
2220
|
detail: T;
|
|
2157
2221
|
target: HTMLVaRadioOptionElement;
|
|
2158
2222
|
}
|
|
2223
|
+
export interface VaSearchFilterCustomEvent<T> extends CustomEvent<T> {
|
|
2224
|
+
detail: T;
|
|
2225
|
+
target: HTMLVaSearchFilterElement;
|
|
2226
|
+
}
|
|
2159
2227
|
export interface VaSearchInputCustomEvent<T> extends CustomEvent<T> {
|
|
2160
2228
|
detail: T;
|
|
2161
2229
|
target: HTMLVaSearchInputElement;
|
|
@@ -2652,6 +2720,31 @@ declare global {
|
|
|
2652
2720
|
prototype: HTMLVaIconElement;
|
|
2653
2721
|
new (): HTMLVaIconElement;
|
|
2654
2722
|
};
|
|
2723
|
+
interface HTMLVaInputTelephoneElementEventMap {
|
|
2724
|
+
"vaContact": any;
|
|
2725
|
+
"vaCountryCode": any;
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* @componentName Input Telephone
|
|
2729
|
+
* @maturityCategory caution
|
|
2730
|
+
* @maturityLevel proposal
|
|
2731
|
+
* @guidanceHref form/input-telephone
|
|
2732
|
+
* @translations English
|
|
2733
|
+
*/
|
|
2734
|
+
interface HTMLVaInputTelephoneElement extends Components.VaInputTelephone, HTMLStencilElement {
|
|
2735
|
+
addEventListener<K extends keyof HTMLVaInputTelephoneElementEventMap>(type: K, listener: (this: HTMLVaInputTelephoneElement, ev: VaInputTelephoneCustomEvent<HTMLVaInputTelephoneElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2736
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2737
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2738
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2739
|
+
removeEventListener<K extends keyof HTMLVaInputTelephoneElementEventMap>(type: K, listener: (this: HTMLVaInputTelephoneElement, ev: VaInputTelephoneCustomEvent<HTMLVaInputTelephoneElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2740
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2741
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2742
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2743
|
+
}
|
|
2744
|
+
var HTMLVaInputTelephoneElement: {
|
|
2745
|
+
prototype: HTMLVaInputTelephoneElement;
|
|
2746
|
+
new (): HTMLVaInputTelephoneElement;
|
|
2747
|
+
};
|
|
2655
2748
|
interface HTMLVaLanguageToggleElementEventMap {
|
|
2656
2749
|
"vaLanguageToggle": any;
|
|
2657
2750
|
"component-library-analytics": any;
|
|
@@ -3079,6 +3172,30 @@ declare global {
|
|
|
3079
3172
|
prototype: HTMLVaRadioOptionElement;
|
|
3080
3173
|
new (): HTMLVaRadioOptionElement;
|
|
3081
3174
|
};
|
|
3175
|
+
interface HTMLVaSearchFilterElementEventMap {
|
|
3176
|
+
"vaFilterChange": Filter[];
|
|
3177
|
+
"vaFilterApply": Filter[];
|
|
3178
|
+
"vaFilterClearAll": void;
|
|
3179
|
+
}
|
|
3180
|
+
/**
|
|
3181
|
+
* @componentName Search Filter
|
|
3182
|
+
* @maturityCategory caution
|
|
3183
|
+
* @maturityLevel candidate
|
|
3184
|
+
*/
|
|
3185
|
+
interface HTMLVaSearchFilterElement extends Components.VaSearchFilter, HTMLStencilElement {
|
|
3186
|
+
addEventListener<K extends keyof HTMLVaSearchFilterElementEventMap>(type: K, listener: (this: HTMLVaSearchFilterElement, ev: VaSearchFilterCustomEvent<HTMLVaSearchFilterElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3187
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3188
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3189
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3190
|
+
removeEventListener<K extends keyof HTMLVaSearchFilterElementEventMap>(type: K, listener: (this: HTMLVaSearchFilterElement, ev: VaSearchFilterCustomEvent<HTMLVaSearchFilterElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
3191
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3192
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3193
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
3194
|
+
}
|
|
3195
|
+
var HTMLVaSearchFilterElement: {
|
|
3196
|
+
prototype: HTMLVaSearchFilterElement;
|
|
3197
|
+
new (): HTMLVaSearchFilterElement;
|
|
3198
|
+
};
|
|
3082
3199
|
interface HTMLVaSearchInputElementEventMap {
|
|
3083
3200
|
"component-library-analytics": any;
|
|
3084
3201
|
}
|
|
@@ -3339,6 +3456,7 @@ declare global {
|
|
|
3339
3456
|
"va-file-input-multiple": HTMLVaFileInputMultipleElement;
|
|
3340
3457
|
"va-header-minimal": HTMLVaHeaderMinimalElement;
|
|
3341
3458
|
"va-icon": HTMLVaIconElement;
|
|
3459
|
+
"va-input-telephone": HTMLVaInputTelephoneElement;
|
|
3342
3460
|
"va-language-toggle": HTMLVaLanguageToggleElement;
|
|
3343
3461
|
"va-link": HTMLVaLinkElement;
|
|
3344
3462
|
"va-link-action": HTMLVaLinkActionElement;
|
|
@@ -3360,6 +3478,7 @@ declare global {
|
|
|
3360
3478
|
"va-promo-banner": HTMLVaPromoBannerElement;
|
|
3361
3479
|
"va-radio": HTMLVaRadioElement;
|
|
3362
3480
|
"va-radio-option": HTMLVaRadioOptionElement;
|
|
3481
|
+
"va-search-filter": HTMLVaSearchFilterElement;
|
|
3363
3482
|
"va-search-input": HTMLVaSearchInputElement;
|
|
3364
3483
|
"va-segmented-progress-bar": HTMLVaSegmentedProgressBarElement;
|
|
3365
3484
|
"va-select": HTMLVaSelectElement;
|
|
@@ -3976,6 +4095,10 @@ declare namespace LocalJSX {
|
|
|
3976
4095
|
* Whether or not this is a required field.
|
|
3977
4096
|
*/
|
|
3978
4097
|
"required"?: boolean;
|
|
4098
|
+
/**
|
|
4099
|
+
* Whether to show error message text
|
|
4100
|
+
*/
|
|
4101
|
+
"showInputError"?: boolean;
|
|
3979
4102
|
/**
|
|
3980
4103
|
* Selected value (will get updated on select).
|
|
3981
4104
|
*/
|
|
@@ -4249,6 +4372,47 @@ declare namespace LocalJSX {
|
|
|
4249
4372
|
*/
|
|
4250
4373
|
"srtext"?: string;
|
|
4251
4374
|
}
|
|
4375
|
+
/**
|
|
4376
|
+
* @componentName Input Telephone
|
|
4377
|
+
* @maturityCategory caution
|
|
4378
|
+
* @maturityLevel proposal
|
|
4379
|
+
* @guidanceHref form/input-telephone
|
|
4380
|
+
* @translations English
|
|
4381
|
+
*/
|
|
4382
|
+
interface VaInputTelephone {
|
|
4383
|
+
/**
|
|
4384
|
+
* The telephone contact information
|
|
4385
|
+
*/
|
|
4386
|
+
"contact"?: string;
|
|
4387
|
+
/**
|
|
4388
|
+
* The 2 letter ISO country code for a country
|
|
4389
|
+
*/
|
|
4390
|
+
"country"?: CountryCode;
|
|
4391
|
+
/**
|
|
4392
|
+
* The error for the component
|
|
4393
|
+
*/
|
|
4394
|
+
"error"?: string;
|
|
4395
|
+
/**
|
|
4396
|
+
* Header text for the component
|
|
4397
|
+
*/
|
|
4398
|
+
"header"?: string;
|
|
4399
|
+
/**
|
|
4400
|
+
* Hint string text
|
|
4401
|
+
*/
|
|
4402
|
+
"hint"?: string;
|
|
4403
|
+
/**
|
|
4404
|
+
* Whether the country select should be included. Set to true to exclude it.
|
|
4405
|
+
*/
|
|
4406
|
+
"noCountry"?: boolean;
|
|
4407
|
+
/**
|
|
4408
|
+
* The event emitted when the contact changes
|
|
4409
|
+
*/
|
|
4410
|
+
"onVaContact"?: (event: VaInputTelephoneCustomEvent<any>) => void;
|
|
4411
|
+
/**
|
|
4412
|
+
* The event emitted when the country code changes
|
|
4413
|
+
*/
|
|
4414
|
+
"onVaCountryCode"?: (event: VaInputTelephoneCustomEvent<any>) => void;
|
|
4415
|
+
}
|
|
4252
4416
|
/**
|
|
4253
4417
|
* @componentName Language Toggle
|
|
4254
4418
|
* @maturityCategory caution
|
|
@@ -5020,6 +5184,33 @@ declare namespace LocalJSX {
|
|
|
5020
5184
|
*/
|
|
5021
5185
|
"value": string;
|
|
5022
5186
|
}
|
|
5187
|
+
/**
|
|
5188
|
+
* @componentName Search Filter
|
|
5189
|
+
* @maturityCategory caution
|
|
5190
|
+
* @maturityLevel candidate
|
|
5191
|
+
*/
|
|
5192
|
+
interface VaSearchFilter {
|
|
5193
|
+
/**
|
|
5194
|
+
* Represents a list of filter facets and their categories. Use a JSON array of objects with label and id properties.
|
|
5195
|
+
*/
|
|
5196
|
+
"filterOptions"?: Filter[];
|
|
5197
|
+
/**
|
|
5198
|
+
* The filter header text.
|
|
5199
|
+
*/
|
|
5200
|
+
"header"?: string;
|
|
5201
|
+
/**
|
|
5202
|
+
* A custom event emitted when the apply filters button is clicked.
|
|
5203
|
+
*/
|
|
5204
|
+
"onVaFilterApply"?: (event: VaSearchFilterCustomEvent<Filter[]>) => void;
|
|
5205
|
+
/**
|
|
5206
|
+
* A custom event emitted when the filter changes. The payload will provide all active categories.
|
|
5207
|
+
*/
|
|
5208
|
+
"onVaFilterChange"?: (event: VaSearchFilterCustomEvent<Filter[]>) => void;
|
|
5209
|
+
/**
|
|
5210
|
+
* A custom event emitted when the clear all filters button is clicked.
|
|
5211
|
+
*/
|
|
5212
|
+
"onVaFilterClearAll"?: (event: VaSearchFilterCustomEvent<void>) => void;
|
|
5213
|
+
}
|
|
5023
5214
|
/**
|
|
5024
5215
|
* @componentName Search input
|
|
5025
5216
|
* @maturityCategory use
|
|
@@ -5322,7 +5513,7 @@ declare namespace LocalJSX {
|
|
|
5322
5513
|
*/
|
|
5323
5514
|
"scrollable"?: boolean;
|
|
5324
5515
|
/**
|
|
5325
|
-
*
|
|
5516
|
+
* If true, the table is sortable. To use a raw sort value for a cell, add a data-sort-value attribute to the span element.
|
|
5326
5517
|
*/
|
|
5327
5518
|
"sortable"?: boolean;
|
|
5328
5519
|
/**
|
|
@@ -5370,7 +5561,7 @@ declare namespace LocalJSX {
|
|
|
5370
5561
|
*/
|
|
5371
5562
|
"scrollable"?: boolean;
|
|
5372
5563
|
/**
|
|
5373
|
-
*
|
|
5564
|
+
* If true, the table is sortable. To use a raw sort value for a cell, add a data-sort-value attribute to the span element.
|
|
5374
5565
|
*/
|
|
5375
5566
|
"sortable"?: boolean;
|
|
5376
5567
|
/**
|
|
@@ -5471,6 +5662,10 @@ declare namespace LocalJSX {
|
|
|
5471
5662
|
* The error message to render.
|
|
5472
5663
|
*/
|
|
5473
5664
|
"error"?: string;
|
|
5665
|
+
/**
|
|
5666
|
+
* Adds a Datadog privacy class to the error message for cases when sensitive information is included, such as in va-statement-of-truth.
|
|
5667
|
+
*/
|
|
5668
|
+
"errorHasPii"?: boolean;
|
|
5474
5669
|
/**
|
|
5475
5670
|
* The content of the heading if `useFormsPattern` is true.
|
|
5476
5671
|
*/
|
|
@@ -5686,6 +5881,7 @@ declare namespace LocalJSX {
|
|
|
5686
5881
|
"va-file-input-multiple": VaFileInputMultiple;
|
|
5687
5882
|
"va-header-minimal": VaHeaderMinimal;
|
|
5688
5883
|
"va-icon": VaIcon;
|
|
5884
|
+
"va-input-telephone": VaInputTelephone;
|
|
5689
5885
|
"va-language-toggle": VaLanguageToggle;
|
|
5690
5886
|
"va-link": VaLink;
|
|
5691
5887
|
"va-link-action": VaLinkAction;
|
|
@@ -5707,6 +5903,7 @@ declare namespace LocalJSX {
|
|
|
5707
5903
|
"va-promo-banner": VaPromoBanner;
|
|
5708
5904
|
"va-radio": VaRadio;
|
|
5709
5905
|
"va-radio-option": VaRadioOption;
|
|
5906
|
+
"va-search-filter": VaSearchFilter;
|
|
5710
5907
|
"va-search-input": VaSearchInput;
|
|
5711
5908
|
"va-segmented-progress-bar": VaSegmentedProgressBar;
|
|
5712
5909
|
"va-select": VaSelect;
|
|
@@ -5886,6 +6083,14 @@ declare module "@stencil/core" {
|
|
|
5886
6083
|
* @maturityLevel available
|
|
5887
6084
|
*/
|
|
5888
6085
|
"va-icon": LocalJSX.VaIcon & JSXBase.HTMLAttributes<HTMLVaIconElement>;
|
|
6086
|
+
/**
|
|
6087
|
+
* @componentName Input Telephone
|
|
6088
|
+
* @maturityCategory caution
|
|
6089
|
+
* @maturityLevel proposal
|
|
6090
|
+
* @guidanceHref form/input-telephone
|
|
6091
|
+
* @translations English
|
|
6092
|
+
*/
|
|
6093
|
+
"va-input-telephone": LocalJSX.VaInputTelephone & JSXBase.HTMLAttributes<HTMLVaInputTelephoneElement>;
|
|
5889
6094
|
/**
|
|
5890
6095
|
* @componentName Language Toggle
|
|
5891
6096
|
* @maturityCategory caution
|
|
@@ -6020,6 +6225,12 @@ declare module "@stencil/core" {
|
|
|
6020
6225
|
*/
|
|
6021
6226
|
"va-radio": LocalJSX.VaRadio & JSXBase.HTMLAttributes<HTMLVaRadioElement>;
|
|
6022
6227
|
"va-radio-option": LocalJSX.VaRadioOption & JSXBase.HTMLAttributes<HTMLVaRadioOptionElement>;
|
|
6228
|
+
/**
|
|
6229
|
+
* @componentName Search Filter
|
|
6230
|
+
* @maturityCategory caution
|
|
6231
|
+
* @maturityLevel candidate
|
|
6232
|
+
*/
|
|
6233
|
+
"va-search-filter": LocalJSX.VaSearchFilter & JSXBase.HTMLAttributes<HTMLVaSearchFilterElement>;
|
|
6023
6234
|
/**
|
|
6024
6235
|
* @componentName Search input
|
|
6025
6236
|
* @maturityCategory use
|
package/dist/components/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Build}from"@stencil/core/internal/client";function isNumeric(e){return!Number.isNaN(parseFloat(e))}function getSlottedNodes(e,t,r="slot"){const n=e.shadowRoot.querySelector(r).assignedNodes();return null!==t?Array.from(n).filter((e=>e.nodeName.toLowerCase()===t)):Array.from(n)}function consoleDevError(e){Build.isDev&&!Build.isTesting&&console.error(e)}function plurality(e){return 1===e?"":"s"}function getCharacterMessage(e,t){if(void 0===e||""===e)return`${t} character${plurality(t)} allowed`;let r;if(e.length<=t){const n=t-e.length;r=`${n} character${plurality(n)} left`}else{const n=e.length-t;r=`${n} character${plurality(n)} over limit`}return r}function makeArray(e,t){return Array.from({length:t-e+1},((t,r)=>e+r))}const isElement=e=>e&&"object"==typeof e&&1===e.nodeType;function select(e,t){if("string"!=typeof e)return[];if(!t||!isElement(t))return[];const r=t.shadowRoot.querySelectorAll(e);return Array.from(r)}function selectOrMatches(e,t){const r=select(e,t);return"string"!=typeof e||isElement(t)&&t.matches(e)&&r.push(t),r}const Sanitizer={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return Sanitizer._entities[e]},escapeHTML:function(e){for(var t="",r=0;r<e.length;r++)t+=e[r],r+1<arguments.length&&(t+=String(arguments[r+1]||"").replace(Sanitizer._entity,Sanitizer.getEntity));return t}};function getHeaderLevel(e){let t=null;return t="string"==typeof e?parseInt(e,10):Math.floor(e),t>=1&&t<=6?`h${t}`:null}function isInteractiveLinkOrButton(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function isMessageSet(e){return e&&"false"!==e||!1}export{Sanitizer as S,
|
|
1
|
+
import{Build}from"@stencil/core/internal/client";function isNumeric(e){return!Number.isNaN(parseFloat(e))}function getSlottedNodes(e,t,r="slot"){const n=e.shadowRoot.querySelector(r).assignedNodes();return null!==t?Array.from(n).filter((e=>e.nodeName.toLowerCase()===t)):Array.from(n)}function consoleDevError(e){Build.isDev&&!Build.isTesting&&console.error(e)}function plurality(e){return 1===e?"":"s"}function getCharacterMessage(e,t){if(void 0===e||""===e)return`${t} character${plurality(t)} allowed`;let r;if(e.length<=t){const n=t-e.length;r=`${n} character${plurality(n)} left`}else{const n=e.length-t;r=`${n} character${plurality(n)} over limit`}return r}function makeArray(e,t){return Array.from({length:t-e+1},((t,r)=>e+r))}const isElement=e=>e&&"object"==typeof e&&1===e.nodeType;function select(e,t){if("string"!=typeof e)return[];if(!t||!isElement(t))return[];const r=t.shadowRoot.querySelectorAll(e);return Array.from(r)}function selectOrMatches(e,t){const r=select(e,t);return"string"!=typeof e||isElement(t)&&t.matches(e)&&r.push(t),r}const Sanitizer={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return Sanitizer._entities[e]},escapeHTML:function(e){for(var t="",r=0;r<e.length;r++)t+=e[r],r+1<arguments.length&&(t+=String(arguments[r+1]||"").replace(Sanitizer._entity,Sanitizer.getEntity));return t}};function getHeaderLevel(e){let t=null;return t="string"==typeof e?parseInt(e,10):Math.floor(e),t>=1&&t<=6?`h${t}`:null}function isInteractiveLinkOrButton(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function isMessageSet(e){return e&&"false"!==e||!1}function isArguments(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function deepEquals(e,t){const r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(isArguments(e)||isArguments(t)){if(!isArguments(e)||!isArguments(t))return!1;const i=Array.prototype.slice;return deepEquals(i.call(e),i.call(t),r,n)}{if(e.constructor!==t.constructor)return!1;const i=Object.keys(e),o=Object.keys(t);if(0===i.length&&0===o.length)return!0;if(i.length!==o.length)return!1;let s,u=r.length;for(;u--;)if(r[u]===e)return n[u]===t;r.push(e),n.push(t),i.sort(),o.sort();for(let e=i.length-1;e>=0;e--)if(i[e]!==o[e])return!1;for(let o=i.length-1;o>=0;o--)if(s=i[o],!deepEquals(e[s],t[s],r,n))return!1;return r.pop(),n.pop(),!0}}function truncate(e,t,r){if(!e)return e;const n=document.createElement("canvas").getContext("2d");if(!n)return e;if(n.font=r,n.measureText(e).width<=t)return e;const i=n.measureText("...").width;let o=0,s=e.length,u=0;for(;o<=s;){const r=Math.floor((o+s)/2),a=e.substring(0,r);n.measureText(a).width+i<=t?(u=r,o=r+1):s=r-1}return e.substring(0,u).trim()+"..."}export{Sanitizer as S,getSlottedNodes as a,isNumeric as b,consoleDevError as c,deepEquals as d,getCharacterMessage as e,isInteractiveLinkOrButton as f,getHeaderLevel as g,isMessageSet as i,makeArray as m,selectOrMatches as s,truncate as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{g as getSlottedNodes}from"./utils.js";import{c as classnames}from"./index2.js";const vaAccordionItemCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}.usa-accordion{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;color:#1b1b1b;margin:0;padding:0;width:100%;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}.usa-accordion>li{margin-bottom:0;max-width:unset}.usa-accordion>ul li ul{list-style:disc}.usa-accordion>ul li ul>li>ul{list-style:circle}.usa-accordion>ul li ul>li>ul>li>ul{list-style:square}.usa-accordion+.usa-accordion,.usa-accordion+.usa-accordion--bordered{margin-top:0.5rem}.usa-accordion--bordered .usa-accordion__content{border-bottom:0.25rem solid #f0f0f0;border-left:0.25rem solid #f0f0f0;border-right:0.25rem solid #f0f0f0;padding-bottom:1rem}.usa-accordion--bordered .usa-accordion__heading{margin-bottom:0}.usa-accordion__heading,.usa-prose .usa-accordion__heading{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:0.9;margin:0}.usa-accordion__heading:not(:first-child),.usa-prose .usa-accordion__heading:not(:first-child){margin-top:0.5rem}.usa-accordion__content{color:#1b1b1b;background-color:white;margin-top:0;overflow:auto;padding:1rem 1.25rem calc(1rem - 0.25rem) 1.25rem}.usa-accordion__content>*:first-child{margin-top:0}.usa-accordion__content>*:last-child{margin-bottom:0}.usa-accordion__button{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;color:#1b1b1b;background-color:#f0f0f0;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-position:right 1.25rem center;background-size:1.5rem;cursor:pointer;display:inline-block;font-weight:700;margin:0;padding:1rem 3.5rem 1rem 1.25rem;text-decoration:none;width:100%}.usa-accordion__button:visited{color:#54278f}.usa-accordion__button:hover{color:#1a4480}.usa-accordion__button:active{color:#162e51}.usa-accordion__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-accordion__button:hover,.usa-accordion__button.usa-button--hover,.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button:disabled.usa-button--hover,.usa-accordion__button[aria-disabled=true].usa-button--hover,.usa-accordion__button:active,.usa-accordion__button.usa-button--active,.usa-accordion__button:disabled:active,.usa-accordion__button[aria-disabled=true]:active,.usa-accordion__button:disabled.usa-button--active,.usa-accordion__button[aria-disabled=true].usa-button--active,.usa-accordion__button:disabled:focus,.usa-accordion__button[aria-disabled=true]:focus,.usa-accordion__button:disabled.usa-focus,.usa-accordion__button[aria-disabled=true].usa-focus,.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-accordion__button.usa-button--hover{color:#1a4480}.usa-accordion__button.usa-button--active{color:#162e51}.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:GrayText}}.usa-accordion__button:hover{color:#1b1b1b;background-color:#dfe1e2;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;text-decoration:none}@media (forced-colors: active){.usa-accordion__button{border:2px solid transparent;position:relative}.usa-accordion__button::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0;content:""}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.usa-accordion__button[aria-expanded=false]{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:1.5rem}.usa-accordion__button[aria-expanded=false]:hover{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat}@media (forced-colors: active){.usa-accordion__button[aria-expanded=false]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button[aria-expanded=false]::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}:host{display:block}:host(:not(:last-child)){margin-bottom:0.5rem}:host(:last-child){margin-bottom:0.3125rem}button{font:inherit;line-height:1.15}::slotted([slot=headline]){display:none}::slotted([slot=icon]),::slotted([slot=subheader-icon]){width:0.625rem;margin-right:0.938rem}::slotted([slot=subheader-icon]){margin-top:0.2rem}.va-accordion__header,.va-accordion__subheader{display:block}.va-accordion__header ::slotted([slot=icon]),.va-accordion__subheader ::slotted([slot=subheader-icon]){margin-right:15px;width:inherit;vertical-align:text-top}.va-accordion__subheader{font-weight:400;font-size:16px;line-height:26px;margin-top:2px}.usa-prose>::slotted(p){line-height:1.5;max-width:64ex}:host(:not([open])) #content,:host([open=false]) #content{display:none}@media print{:host(:not([open])) #content,:host([open=false]) #content{display:block}}',VaAccordionItemStyle0=vaAccordionItemCss,VaAccordionItem$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.accordionItemToggled=createEvent(this,"accordionItemToggled",7),this.expandButton=null,this.header=void 0,this.subheader=null,this.open=!1,this.level=2,this.bordered=!1,this.slotHeader=null,this.slotTag=null}toggleOpen(t){this.accordionItemToggled.emit(t)}populateStateValues(){getSlottedNodes(this.el,null).forEach((t=>{this.slotHeader=t.innerHTML,this.slotTag=t.tagName.toLowerCase()}))}componentDidLoad(){this.el.id&&this.el.id===window.location.hash.slice(1)&&this.expandButton&&(this.open=!0,this.el.setAttribute("open","true"),this.el.scrollIntoView())}render(){const{bordered:t,header:e,subheader:o,level:a,open:r}=this,n=classnames({"usa-accordion--bordered":t});return h(Host,null,h("div",{class:n},h((()=>{const t=this.el.querySelector('[slot="headline"]'),n=null==t?void 0:t.innerHTML,i=t&&t.tagName.includes("H")?t.tagName.toLowerCase():`h${a}`;return h(i,{class:"usa-accordion__heading"},h("button",{type:"button",class:"usa-accordion__button","aria-expanded":r?"true":"false","aria-controls":"content",onClick:this.toggleOpen.bind(this),ref:t=>{this.expandButton=t},part:"accordion-header"},h("span",{class:"va-accordion__header"},h("slot",{name:"icon"}),this.slotHeader||e||n),this.subheader&&h("span",{class:"va-accordion__subheader"},h("slot",{name:"subheader-icon"}),o)))}),null),h("slot",{name:"headline",onSlotchange:()=>this.populateStateValues()}),h("div",{id:"content",class:"usa-accordion__content usa-prose",hidden:!r,part:"accordion-content"},h("slot",null))))}get el(){return this}static get style(){return VaAccordionItemStyle0}},[1,"va-accordion-item",{header:[1],subheader:[1],open:[4],level:[2],bordered:[4],slotHeader:[32],slotTag:[32]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-accordion-item"].forEach((t=>{"va-accordion-item"===t&&(customElements.get(t)||customElements.define(t,VaAccordionItem$1))}))}const VaAccordionItem=VaAccordionItem$1,defineCustomElement=defineCustomElement$1;export{VaAccordionItem,defineCustomElement};
|
|
1
|
+
import{V as VaAccordionItem$1,d as defineCustomElement$1}from"./va-accordion-item2.js";const VaAccordionItem=VaAccordionItem$1,defineCustomElement=defineCustomElement$1;export{VaAccordionItem,defineCustomElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{a as getSlottedNodes}from"./utils.js";import{c as classnames}from"./index2.js";const vaAccordionItemCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}.usa-accordion{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;color:#1b1b1b;margin:0;padding:0;width:100%;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}.usa-accordion>li{margin-bottom:0;max-width:unset}.usa-accordion>ul li ul{list-style:disc}.usa-accordion>ul li ul>li>ul{list-style:circle}.usa-accordion>ul li ul>li>ul>li>ul{list-style:square}.usa-accordion+.usa-accordion,.usa-accordion+.usa-accordion--bordered{margin-top:0.5rem}.usa-accordion--bordered .usa-accordion__content{border-bottom:0.25rem solid #f0f0f0;border-left:0.25rem solid #f0f0f0;border-right:0.25rem solid #f0f0f0;padding-bottom:1rem}.usa-accordion--bordered .usa-accordion__heading{margin-bottom:0}.usa-accordion__heading,.usa-prose .usa-accordion__heading{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:0.9;margin:0}.usa-accordion__heading:not(:first-child),.usa-prose .usa-accordion__heading:not(:first-child){margin-top:0.5rem}.usa-accordion__content{color:#1b1b1b;background-color:white;margin-top:0;overflow:auto;padding:1rem 1.25rem calc(1rem - 0.25rem) 1.25rem}.usa-accordion__content>*:first-child{margin-top:0}.usa-accordion__content>*:last-child{margin-bottom:0}.usa-accordion__button{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;color:#1b1b1b;background-color:#f0f0f0;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-position:right 1.25rem center;background-size:1.5rem;cursor:pointer;display:inline-block;font-weight:700;margin:0;padding:1rem 3.5rem 1rem 1.25rem;text-decoration:none;width:100%}.usa-accordion__button:visited{color:#54278f}.usa-accordion__button:hover{color:#1a4480}.usa-accordion__button:active{color:#162e51}.usa-accordion__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-accordion__button:hover,.usa-accordion__button.usa-button--hover,.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button:disabled.usa-button--hover,.usa-accordion__button[aria-disabled=true].usa-button--hover,.usa-accordion__button:active,.usa-accordion__button.usa-button--active,.usa-accordion__button:disabled:active,.usa-accordion__button[aria-disabled=true]:active,.usa-accordion__button:disabled.usa-button--active,.usa-accordion__button[aria-disabled=true].usa-button--active,.usa-accordion__button:disabled:focus,.usa-accordion__button[aria-disabled=true]:focus,.usa-accordion__button:disabled.usa-focus,.usa-accordion__button[aria-disabled=true].usa-focus,.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-accordion__button.usa-button--hover{color:#1a4480}.usa-accordion__button.usa-button--active{color:#162e51}.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:GrayText}}.usa-accordion__button:hover{color:#1b1b1b;background-color:#dfe1e2;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;text-decoration:none}@media (forced-colors: active){.usa-accordion__button{border:2px solid transparent;position:relative}.usa-accordion__button::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0;content:""}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.usa-accordion__button[aria-expanded=false]{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:1.5rem}.usa-accordion__button[aria-expanded=false]:hover{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat}@media (forced-colors: active){.usa-accordion__button[aria-expanded=false]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button[aria-expanded=false]::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}:host{display:block}:host(:not(:last-child)){margin-bottom:0.5rem}:host(:last-child){margin-bottom:0.3125rem}button{font:inherit;line-height:1.15}::slotted([slot=headline]){display:none}::slotted([slot=icon]),::slotted([slot=subheader-icon]){width:0.625rem;margin-right:0.938rem}::slotted([slot=subheader-icon]){margin-top:0.2rem}.va-accordion__header,.va-accordion__subheader{display:block}.va-accordion__header ::slotted([slot=icon]),.va-accordion__subheader ::slotted([slot=subheader-icon]){margin-right:15px;width:inherit;vertical-align:text-top}.va-accordion__subheader{font-weight:400;font-size:16px;line-height:26px;margin-top:2px}.usa-prose>::slotted(p){line-height:1.5;max-width:64ex}:host(:not([open])) #content,:host([open=false]) #content{display:none}@media print{:host(:not([open])) #content,:host([open=false]) #content{display:block}}',VaAccordionItemStyle0=vaAccordionItemCss,VaAccordionItem=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.accordionItemToggled=createEvent(this,"accordionItemToggled",7),this.expandButton=null,this.header=void 0,this.subheader=null,this.open=!1,this.level=2,this.bordered=!1,this.slotHeader=null,this.slotTag=null}toggleOpen(t){this.accordionItemToggled.emit(t)}populateStateValues(){getSlottedNodes(this.el,null).forEach((t=>{this.slotHeader=t.innerHTML,this.slotTag=t.tagName.toLowerCase()}))}componentDidLoad(){this.el.id&&this.el.id===window.location.hash.slice(1)&&this.expandButton&&(this.open=!0,this.el.setAttribute("open","true"),this.el.scrollIntoView())}render(){const{bordered:t,header:e,subheader:o,level:a,open:r}=this,n=classnames({"usa-accordion--bordered":t});return h(Host,null,h("div",{class:n},h((()=>{const t=this.el.querySelector('[slot="headline"]'),n=null==t?void 0:t.innerHTML,i=t&&t.tagName.includes("H")?t.tagName.toLowerCase():`h${a}`;return h(i,{class:"usa-accordion__heading"},h("button",{type:"button",class:"usa-accordion__button","aria-expanded":r?"true":"false","aria-controls":"content",onClick:this.toggleOpen.bind(this),ref:t=>{this.expandButton=t},part:"accordion-header"},h("span",{class:"va-accordion__header"},h("slot",{name:"icon"}),this.slotHeader||e||n),this.subheader&&h("span",{class:"va-accordion__subheader"},h("slot",{name:"subheader-icon"}),o)))}),null),h("slot",{name:"headline",onSlotchange:()=>this.populateStateValues()}),h("div",{id:"content",class:"usa-accordion__content usa-prose",hidden:!r,part:"accordion-content"},h("slot",null))))}get el(){return this}static get style(){return VaAccordionItemStyle0}},[1,"va-accordion-item",{header:[1],subheader:[1],open:[516],level:[2],bordered:[4],slotHeader:[32],slotTag:[32]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-accordion-item"].forEach((t=>{"va-accordion-item"===t&&(customElements.get(t)||customElements.define(t,VaAccordionItem))}))}export{VaAccordionItem as V,defineCustomElement as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Build,proxyCustomElement,HTMLElement,createEvent,forceUpdate,h,Host}from"@stencil/core/internal/client";import{g as getSlottedNodes}from"./utils.js";import"./i18n-setup.js";import"./contacts.js";import{c as classnames}from"./index2.js";import{i as instance}from"./i18next.js";const vaAccordionCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}.usa-accordion{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;color:#1b1b1b;margin:0;padding:0;width:100%;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}.usa-accordion>li{margin-bottom:0;max-width:unset}.usa-accordion>ul li ul{list-style:disc}.usa-accordion>ul li ul>li>ul{list-style:circle}.usa-accordion>ul li ul>li>ul>li>ul{list-style:square}.usa-accordion+.usa-accordion,.usa-accordion+.usa-accordion--bordered{margin-top:0.5rem}.usa-accordion--bordered .usa-accordion__content{border-bottom:0.25rem solid #f0f0f0;border-left:0.25rem solid #f0f0f0;border-right:0.25rem solid #f0f0f0;padding-bottom:1rem}.usa-accordion--bordered .usa-accordion__heading{margin-bottom:0}.usa-accordion__heading,.usa-prose .usa-accordion__heading{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:0.9;margin:0}.usa-accordion__heading:not(:first-child),.usa-prose .usa-accordion__heading:not(:first-child){margin-top:0.5rem}.usa-accordion__content{color:#1b1b1b;background-color:white;margin-top:0;overflow:auto;padding:1rem 1.25rem calc(1rem - 0.25rem) 1.25rem}.usa-accordion__content>*:first-child{margin-top:0}.usa-accordion__content>*:last-child{margin-bottom:0}.usa-accordion__button{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;color:#1b1b1b;background-color:#f0f0f0;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-position:right 1.25rem center;background-size:1.5rem;cursor:pointer;display:inline-block;font-weight:700;margin:0;padding:1rem 3.5rem 1rem 1.25rem;text-decoration:none;width:100%}.usa-accordion__button:visited{color:#54278f}.usa-accordion__button:hover{color:#1a4480}.usa-accordion__button:active{color:#162e51}.usa-accordion__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-accordion__button:hover,.usa-accordion__button.usa-button--hover,.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button:disabled.usa-button--hover,.usa-accordion__button[aria-disabled=true].usa-button--hover,.usa-accordion__button:active,.usa-accordion__button.usa-button--active,.usa-accordion__button:disabled:active,.usa-accordion__button[aria-disabled=true]:active,.usa-accordion__button:disabled.usa-button--active,.usa-accordion__button[aria-disabled=true].usa-button--active,.usa-accordion__button:disabled:focus,.usa-accordion__button[aria-disabled=true]:focus,.usa-accordion__button:disabled.usa-focus,.usa-accordion__button[aria-disabled=true].usa-focus,.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-accordion__button.usa-button--hover{color:#1a4480}.usa-accordion__button.usa-button--active{color:#162e51}.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:GrayText}}.usa-accordion__button:hover{color:#1b1b1b;background-color:#dfe1e2;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;text-decoration:none}@media (forced-colors: active){.usa-accordion__button{border:2px solid transparent;position:relative}.usa-accordion__button::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0;content:""}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.usa-accordion__button[aria-expanded=false]{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:1.5rem}.usa-accordion__button[aria-expanded=false]:hover{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat}@media (forced-colors: active){.usa-accordion__button[aria-expanded=false]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button[aria-expanded=false]::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}button.va-accordion__button{border:none;color:var(--vads-color-link);background:transparent;padding:0.625rem;cursor:pointer;font-family:inherit;font-weight:bold;float:right}@media print{button.va-accordion__button{display:none}}',VaAccordionStyle0=vaAccordionCss;Build.isTesting&&instance.init({lng:"cimode"});const VaAccordion$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.accordionExpandCollapseAll=createEvent(this,"accordionExpandCollapseAll",7),this.expandCollapseAll=t=>{this.expanded=t;const e=t?"allOpen":"allClosed";this.accordionExpandCollapseAll.emit({status:e}),getSlottedNodes(this.el,"va-accordion-item").forEach((e=>{e.setAttribute("open",`${t}`)}))},this.expanded=!1,this.openSingle=!1,this.disableAnalytics=!1,this.sectionHeading=null}itemToggledHandler(t){var e;const a=t.target.closest("va-accordion-item");if(this.el!==a.parentElement)return;const o=a.querySelector('[slot="headline"]');let n,i;o?(n=null==o?void 0:o.innerHTML,i=parseInt(null===(e=null==o?void 0:o.tagName)||void 0===e?void 0:e.toLowerCase().split("")[1])):(n=a.header,i=a.level),this.openSingle&&getSlottedNodes(this.el,"va-accordion-item").filter((t=>t!==a)).forEach((t=>t.setAttribute("open","false")));const r="true"===a.getAttribute("open");if(!this.disableAnalytics){const t={componentName:"va-accordion",action:r?"collapse":"expand",details:{header:n||a.header,subheader:a.subheader,level:i||a.level,sectionHeading:this.sectionHeading}};this.componentLibraryAnalytics.emit(t)}a.setAttribute("open",r?"false":"true"),this.isScrolledIntoView(a)||a.scrollIntoView(),this.accordionsOpened()}accordionsOpened(t="every"){const e=[...this.el.children].filter((t=>"va-accordion-item"===t.tagName.toLowerCase())).map((t=>t.open));return e[t]((t=>!0===t))?this.expanded=!0:e[t]((t=>!1===t))?this.expanded=!1:void 0}isScrolledIntoView(t){const e=null==t?void 0:t.getBoundingClientRect().top;return!(!e&&0!==e)&&e>=0&&e<=window.innerHeight}connectedCallback(){instance.on("languageChanged",(()=>{forceUpdate(this.el)}))}disconnectedCallback(){instance.off("languageChanged")}componentWillLoad(){this.accordionsOpened("some")}render(){const{openSingle:t}=this,e=classnames({"usa-accordion":!0});return h(Host,{key:"168bf595ee602ec6fdf4db359a99a2617f4497ca"},h("div",{key:"19c933dd57628b13dd2525511455e9b19685d937",class:e,ref:t=>this.accordionContainer=t},t?null:h("button",{"aria-expanded":`${this.expanded}`,class:"va-accordion__button","data-testid":"expand-all-accordions",ref:t=>this.expandCollapseBtn=t,onClick:()=>this.expandCollapseAll(!this.expanded),"aria-label":this.expanded?instance.t("collapse-all-aria-label"):instance.t("expand-all-aria-label")},this.expanded?`${instance.t("collapse-all")} -`:`${instance.t("expand-all")} +`),h("slot",{key:"9dff1090fe7d9d8bd734e98e52815534094b51b4"})))}get el(){return this}static get style(){return VaAccordionStyle0}},[1,"va-accordion",{openSingle:[4,"open-single"],disableAnalytics:[4,"disable-analytics"],sectionHeading:[1,"section-heading"],expanded:[32]},[[0,"accordionItemToggled","itemToggledHandler"]]]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-accordion"].forEach((t=>{"va-accordion"===t&&(customElements.get(t)||customElements.define(t,VaAccordion$1))}))}const VaAccordion=VaAccordion$1,defineCustomElement=defineCustomElement$1;export{VaAccordion,defineCustomElement};
|
|
1
|
+
import{V as VaAccordion$1,d as defineCustomElement$1}from"./va-accordion2.js";const VaAccordion=VaAccordion$1,defineCustomElement=defineCustomElement$1;export{VaAccordion,defineCustomElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Build,proxyCustomElement,HTMLElement,createEvent,forceUpdate,h,Host}from"@stencil/core/internal/client";import{a as getSlottedNodes}from"./utils.js";import"./i18n-setup.js";import"./contacts.js";import{c as classnames}from"./index2.js";import{i as instance}from"./i18next.js";const vaAccordionCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}.usa-accordion{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;color:#1b1b1b;margin:0;padding:0;width:100%;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}.usa-accordion>li{margin-bottom:0;max-width:unset}.usa-accordion>ul li ul{list-style:disc}.usa-accordion>ul li ul>li>ul{list-style:circle}.usa-accordion>ul li ul>li>ul>li>ul{list-style:square}.usa-accordion+.usa-accordion,.usa-accordion+.usa-accordion--bordered{margin-top:0.5rem}.usa-accordion--bordered .usa-accordion__content{border-bottom:0.25rem solid #f0f0f0;border-left:0.25rem solid #f0f0f0;border-right:0.25rem solid #f0f0f0;padding-bottom:1rem}.usa-accordion--bordered .usa-accordion__heading{margin-bottom:0}.usa-accordion__heading,.usa-prose .usa-accordion__heading{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:0.9;margin:0}.usa-accordion__heading:not(:first-child),.usa-prose .usa-accordion__heading:not(:first-child){margin-top:0.5rem}.usa-accordion__content{color:#1b1b1b;background-color:white;margin-top:0;overflow:auto;padding:1rem 1.25rem calc(1rem - 0.25rem) 1.25rem}.usa-accordion__content>*:first-child{margin-top:0}.usa-accordion__content>*:last-child{margin-bottom:0}.usa-accordion__button{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;color:#1b1b1b;background-color:#f0f0f0;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-position:right 1.25rem center;background-size:1.5rem;cursor:pointer;display:inline-block;font-weight:700;margin:0;padding:1rem 3.5rem 1rem 1.25rem;text-decoration:none;width:100%}.usa-accordion__button:visited{color:#54278f}.usa-accordion__button:hover{color:#1a4480}.usa-accordion__button:active{color:#162e51}.usa-accordion__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-accordion__button:hover,.usa-accordion__button.usa-button--hover,.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button:disabled.usa-button--hover,.usa-accordion__button[aria-disabled=true].usa-button--hover,.usa-accordion__button:active,.usa-accordion__button.usa-button--active,.usa-accordion__button:disabled:active,.usa-accordion__button[aria-disabled=true]:active,.usa-accordion__button:disabled.usa-button--active,.usa-accordion__button[aria-disabled=true].usa-button--active,.usa-accordion__button:disabled:focus,.usa-accordion__button[aria-disabled=true]:focus,.usa-accordion__button:disabled.usa-focus,.usa-accordion__button[aria-disabled=true].usa-focus,.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-accordion__button.usa-button--hover{color:#1a4480}.usa-accordion__button.usa-button--active{color:#162e51}.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-accordion__button:disabled,.usa-accordion__button[aria-disabled=true],.usa-accordion__button:disabled:hover,.usa-accordion__button[aria-disabled=true]:hover,.usa-accordion__button[aria-disabled=true]:focus{color:GrayText}}.usa-accordion__button:hover{color:#1b1b1b;background-color:#dfe1e2;background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;text-decoration:none}@media (forced-colors: active){.usa-accordion__button{border:2px solid transparent;position:relative}.usa-accordion__button::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0;content:""}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13H5v-2h14v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}.usa-accordion__button[aria-expanded=false]{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:1.5rem}.usa-accordion__button[aria-expanded=false]:hover{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat}@media (forced-colors: active){.usa-accordion__button[aria-expanded=false]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1.5rem 1.5rem;display:inline-block;height:1.5rem;width:1.5rem;height:100%;position:absolute;right:1.25rem;top:0}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-accordion__button[aria-expanded=false]::before{background:none;background-color:ButtonText;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1.5rem 1.5rem;mask-size:1.5rem 1.5rem}}}button.va-accordion__button{border:none;color:var(--vads-color-link);background:transparent;padding:0.625rem;cursor:pointer;font-family:inherit;font-weight:bold;float:right}@media print{button.va-accordion__button{display:none}}',VaAccordionStyle0=vaAccordionCss;Build.isTesting&&instance.init({lng:"cimode"});const VaAccordion=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.accordionExpandCollapseAll=createEvent(this,"accordionExpandCollapseAll",7),this.expandCollapseAll=t=>{this.expanded=t;const e=t?"allOpen":"allClosed";this.accordionExpandCollapseAll.emit({status:e}),getSlottedNodes(this.el,"va-accordion-item").forEach((e=>{e.setAttribute("open",`${t}`)}))},this.expanded=!1,this.openSingle=!1,this.disableAnalytics=!1,this.sectionHeading=null}itemToggledHandler(t){var e;const a=t.target.closest("va-accordion-item");if(this.el!==a.parentElement)return;const o=a.querySelector('[slot="headline"]');let n,i;o?(n=null==o?void 0:o.innerHTML,i=parseInt(null===(e=null==o?void 0:o.tagName)||void 0===e?void 0:e.toLowerCase().split("")[1])):(n=a.header,i=a.level),this.openSingle&&getSlottedNodes(this.el,"va-accordion-item").filter((t=>t!==a)).forEach((t=>t.setAttribute("open","false")));const r="false"!==a.getAttribute("open")&&a.hasAttribute("open");if(!this.disableAnalytics){const t={componentName:"va-accordion",action:r?"collapse":"expand",details:{header:n||a.header,subheader:a.subheader,level:i||a.level,sectionHeading:this.sectionHeading}};this.componentLibraryAnalytics.emit(t)}a.setAttribute("open",r?"false":"true"),this.isScrolledIntoView(a)||a.scrollIntoView(),this.accordionsOpened()}accordionsOpened(t="every"){const e=[...this.el.children].filter((t=>"va-accordion-item"===t.tagName.toLowerCase())).map((t=>t.open));return e[t]((t=>!0===t))?this.expanded=!0:e[t]((t=>!1===t))?this.expanded=!1:void 0}isScrolledIntoView(t){const e=null==t?void 0:t.getBoundingClientRect().top;return!(!e&&0!==e)&&e>=0&&e<=window.innerHeight}connectedCallback(){instance.on("languageChanged",(()=>{forceUpdate(this.el)}))}disconnectedCallback(){instance.off("languageChanged")}componentWillLoad(){this.accordionsOpened("some")}render(){const{openSingle:t}=this,e=this.el.classList.contains("va-search-filter__accordion"),a=classnames({"usa-accordion":!0});return h(Host,{key:"47c72860448fedd40a07b75261ea1df1c47dd705"},h("div",{key:"349cf9e3590c784e06e108bf307a72e7acbc1df4",class:a,ref:t=>this.accordionContainer=t},t||e?null:h("button",{"aria-expanded":`${this.expanded}`,class:"va-accordion__button","data-testid":"expand-all-accordions",ref:t=>this.expandCollapseBtn=t,onClick:()=>this.expandCollapseAll(!this.expanded),"aria-label":this.expanded?instance.t("collapse-all-aria-label"):instance.t("expand-all-aria-label")},this.expanded?`${instance.t("collapse-all")} -`:`${instance.t("expand-all")} +`),h("slot",{key:"5da19cc7907e92204649762713ad6a18e80da710"})))}get el(){return this}static get style(){return VaAccordionStyle0}},[1,"va-accordion",{openSingle:[4,"open-single"],disableAnalytics:[4,"disable-analytics"],sectionHeading:[1,"section-heading"],expanded:[32]},[[0,"accordionItemToggled","itemToggledHandler"]]]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-accordion"].forEach((t=>{"va-accordion"===t&&(customElements.get(t)||customElements.define(t,VaAccordion))}))}export{VaAccordion as V,defineCustomElement as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import{d as defineCustomElement$2}from"./va-icon2.js";const vaAdditionalInfoCss="p,a,ol,ul,li,dl,dt,dd,form,label,button{font-family:Source Sans Pro Web, \"Source Sans Pro\", \"Helvetica Neue\", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role='option']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}a{text-decoration:none;color:var(--vads-color-link);-webkit-transition-duration:0.3s;transition-duration:0.3s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-property:color, background-color, border-color;transition-property:color, background-color, border-color}a:hover{background-color:rgba(0, 0, 0, 0.05);color:inherit}a:visited{color:var(--vads-color-link-visited)}:host{display:block}:host(:not([disable-border])) a[aria-expanded='true']~#info,:host([disable-border='false']) a[aria-expanded='true']~#info{padding-left:calc(20px - 7px);border-left:7px solid transparent;border-left-color:var(--vads-color-primary-alt-darkest)}#info{overflow:hidden}#info.closed{visibility:hidden}a{-ms-flex-align:start;align-items:flex-start;cursor:pointer;display:-ms-flexbox;display:flex}.additional-info-title{border-bottom-right-radius:1px;border-bottom:2px dotted var(--vads-color-primary-alt-darkest);color:var(--vads-color-base-darker);cursor:pointer}.closed{opacity:0;max-height:0}.open{height:auto;opacity:1;-webkit-transition:max-height 700ms 0ms, opacity 500ms 200ms, visibility 500ms 200ms;transition:max-height 700ms 0ms, opacity 500ms 200ms, visibility 500ms 200ms;max-height:var(--calc-max-height);margin-bottom:16px;margin-top:16px}.additional-info-icon{display:inline-block;color:var(--vads-color-primary-alt-darkest);font-size:16px;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transition:-webkit-transform 0.15s linear;transition:-webkit-transform 0.15s linear;transition:transform 0.15s linear;transition:transform 0.15s linear, -webkit-transform 0.15s linear;line-height:1;vertical-align:bottom}a[aria-expanded='true'] .additional-info-icon{-webkit-transform:rotate(270deg);transform:rotate(270deg);-webkit-transition:-webkit-transform 0.15s linear;transition:-webkit-transform 0.15s linear;transition:transform 0.15s linear;transition:transform 0.15s linear, -webkit-transform 0.15s linear}::slotted(*){margin-bottom:0 !important;margin-top:0 !important}",VaAdditionalInfoStyle0=vaAdditionalInfoCss,VaAdditionalInfo$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.open=void 0,this.trigger=void 0,this.disableAnalytics=!1,this.disableBorder=!1}handleResize(){this.updateInfoMaxHeight()}toggleOpen(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-additional-info",action:this.open?"collapse":"expand",details:{triggerText:this.trigger}}),this.open=!this.open}handleKeydown(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.toggleOpen())}updateInfoMaxHeight(){const t=this.el.shadowRoot.getElementById("info")
|
|
1
|
+
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import{d as defineCustomElement$2}from"./va-icon2.js";const vaAdditionalInfoCss="p,a,ol,ul,li,dl,dt,dd,form,label,button{font-family:Source Sans Pro Web, \"Source Sans Pro\", \"Helvetica Neue\", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role='option']:focus,*[tabindex]:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}a{text-decoration:none;color:var(--vads-color-link);-webkit-transition-duration:0.3s;transition-duration:0.3s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-property:color, background-color, border-color;transition-property:color, background-color, border-color}a:hover{background-color:rgba(0, 0, 0, 0.05);color:inherit}a:visited{color:var(--vads-color-link-visited)}:host{display:block}:host(:not([disable-border])) a[aria-expanded='true']~#info,:host([disable-border='false']) a[aria-expanded='true']~#info{padding-left:calc(20px - 7px);border-left:7px solid transparent;border-left-color:var(--vads-color-primary-alt-darkest)}#info{overflow:hidden}#info.closed{visibility:hidden}a{-ms-flex-align:start;align-items:flex-start;cursor:pointer;display:-ms-flexbox;display:flex}.additional-info-title{border-bottom-right-radius:1px;border-bottom:2px dotted var(--vads-color-primary-alt-darkest);color:var(--vads-color-base-darker);cursor:pointer}.closed{opacity:0;max-height:0}.open{height:auto;opacity:1;-webkit-transition:max-height 700ms 0ms, opacity 500ms 200ms, visibility 500ms 200ms;transition:max-height 700ms 0ms, opacity 500ms 200ms, visibility 500ms 200ms;max-height:var(--calc-max-height);margin-bottom:16px;margin-top:16px}.additional-info-icon{display:inline-block;color:var(--vads-color-primary-alt-darkest);font-size:16px;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transition:-webkit-transform 0.15s linear;transition:-webkit-transform 0.15s linear;transition:transform 0.15s linear;transition:transform 0.15s linear, -webkit-transform 0.15s linear;line-height:1;vertical-align:bottom}a[aria-expanded='true'] .additional-info-icon{-webkit-transform:rotate(270deg);transform:rotate(270deg);-webkit-transition:-webkit-transform 0.15s linear;transition:-webkit-transform 0.15s linear;transition:transform 0.15s linear;transition:transform 0.15s linear, -webkit-transform 0.15s linear}::slotted(*){margin-bottom:0 !important;margin-top:0 !important}",VaAdditionalInfoStyle0=vaAdditionalInfoCss,VaAdditionalInfo$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.open=void 0,this.trigger=void 0,this.disableAnalytics=!1,this.disableBorder=!1}handleResize(){this.updateInfoMaxHeight()}toggleOpen(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-additional-info",action:this.open?"collapse":"expand",details:{triggerText:this.trigger}}),this.open=!this.open}handleKeydown(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.toggleOpen())}updateInfoMaxHeight(){var t;const e=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById("info");if(!e)return;const i=e.scrollHeight+"px";e.style.setProperty("--calc-max-height","calc("+i+" + 1.125rem)")}componentDidRender(){requestAnimationFrame((()=>this.updateInfoMaxHeight()))}render(){const t=classnames({open:this.open,closed:!this.open});return h(Host,{key:"55d487f1c1ae022603a9dbd61dbfd1f83a8d8afa"},h("a",{key:"bfa55efc97aab5fb0809dd89c4b891840e6b3d71",role:"button","aria-controls":"info","aria-expanded":this.open?"true":"false",tabIndex:0,onClick:this.toggleOpen.bind(this),onKeyDown:this.handleKeydown.bind(this)},h("div",{key:"e773fc4b5720c6cdd81c1eb53316602c298b8cbf"},h("span",{key:"c364063df56e845ea966b522e6a52c2ebc0960f6",class:"additional-info-title"},this.trigger),h("va-icon",{key:"ecad44dd464da88a67844af4eda51b47750224ed",class:"additional-info-icon",icon:"chevron_right",size:3}))),h("div",{key:"53c8dbd2478d6972e983268f94f93db41006eabd",id:"info",class:t},h("slot",{key:"b83dee0c9486de58f4281dc3b8987ab6ae708db7"})))}get el(){return this}static get style(){return VaAdditionalInfoStyle0}},[1,"va-additional-info",{trigger:[1],disableAnalytics:[4,"disable-analytics"],disableBorder:[4,"disable-border"],open:[32]},[[9,"resize","handleResize"]]]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-additional-info","va-icon"].forEach((t=>{switch(t){case"va-additional-info":customElements.get(t)||customElements.define(t,VaAdditionalInfo$1);break;case"va-icon":customElements.get(t)||defineCustomElement$2()}}))}const VaAdditionalInfo=VaAdditionalInfo$1,defineCustomElement=defineCustomElement$1;export{VaAdditionalInfo,defineCustomElement};
|