@department-of-veterans-affairs/component-library 51.1.0 → 51.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/0.app.bundle.js +1 -1
- package/dist/12.app.bundle.js +1 -1
- package/dist/1966.app.bundle.js +1 -1
- package/dist/2205.app.bundle.js +1 -1
- package/dist/2236.app.bundle.js +1 -1
- package/dist/272.app.bundle.js +1 -1
- package/dist/2923.app.bundle.js +2 -0
- package/dist/3305.app.bundle.js +1 -1
- package/dist/3589.app.bundle.js +1 -1
- package/dist/3600.app.bundle.js +1 -1
- package/dist/4400.app.bundle.js +1 -1
- package/dist/4432.app.bundle.js +1 -1
- package/dist/4475.app.bundle.js +1 -1
- package/dist/4780.app.bundle.js +1 -1
- package/dist/4996.app.bundle.js +2 -0
- package/dist/4996.app.bundle.js.LICENSE.txt +5 -0
- package/dist/5119.app.bundle.js +1 -1
- package/dist/5341.app.bundle.js +2 -0
- package/dist/5341.app.bundle.js.LICENSE.txt +5 -0
- package/dist/5663.app.bundle.js +1 -1
- package/dist/5689.app.bundle.js +1 -1
- package/dist/5845.app.bundle.js +1 -1
- package/dist/5938.app.bundle.js +2 -0
- package/dist/5938.app.bundle.js.LICENSE.txt +5 -0
- package/dist/5990.app.bundle.js +1 -1
- package/dist/606.app.bundle.js +1 -0
- package/dist/6095.app.bundle.js +1 -1
- package/dist/6308.app.bundle.js +1 -1
- package/dist/6555.app.bundle.js +1 -1
- package/dist/6650.app.bundle.js +1 -1
- package/dist/6718.app.bundle.js +1 -1
- package/dist/6849.app.bundle.js +1 -1
- package/dist/6850.app.bundle.js +1 -0
- package/dist/7166.app.bundle.js +1 -1
- package/dist/7307.app.bundle.js +1 -1
- package/dist/7372.app.bundle.js +1 -1
- package/dist/7481.app.bundle.js +1 -1
- package/dist/7734.app.bundle.js +1 -1
- package/dist/8255.app.bundle.js +1 -1
- package/dist/8463.app.bundle.js +1 -1
- package/dist/8913.app.bundle.js +1 -1
- package/dist/9186.app.bundle.js +1 -1
- package/dist/9376.app.bundle.js +1 -1
- package/dist/9496.app.bundle.js +1 -1
- package/dist/960.app.bundle.js +1 -1
- package/dist/9851.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/parsePhoneNumber_.js +1 -0
- package/dist/components/types/components.d.ts +219 -2
- package/dist/components/va-accordion-item2.js +1 -1
- package/dist/components/va-accordion2.js +1 -1
- package/dist/components/va-additional-info.js +1 -1
- package/dist/components/va-alert-expandable.js +1 -1
- package/dist/components/va-alert2.js +1 -1
- package/dist/components/va-back-to-top.js +1 -1
- package/dist/components/va-breadcrumbs.js +1 -1
- package/dist/components/va-button-icon2.js +1 -1
- package/dist/components/va-button-segmented.js +1 -1
- package/dist/components/va-button2.js +1 -1
- package/dist/components/va-checkbox-group2.js +1 -1
- package/dist/components/va-checkbox2.js +1 -1
- package/dist/components/va-combo-box2.js +1 -1
- package/dist/components/va-crisis-line-modal2.js +1 -1
- package/dist/components/va-file-input-multiple.js +1 -1
- package/dist/components/va-file-input2.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-link2.js +1 -1
- package/dist/components/va-maintenance-banner.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-on-this-page.js +1 -1
- package/dist/components/va-pagination.js +1 -1
- package/dist/components/va-privacy-agreement.js +1 -1
- package/dist/components/va-promo-banner.js +1 -1
- package/dist/components/va-radio.js +1 -1
- package/dist/components/va-search-input.js +1 -1
- package/dist/components/va-segmented-progress-bar.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-sidenav-item.d.ts +11 -0
- package/dist/components/va-sidenav-item.js +1 -0
- package/dist/components/va-sidenav-submenu.d.ts +11 -0
- package/dist/components/va-sidenav-submenu.js +1 -0
- package/dist/components/va-sidenav.d.ts +11 -0
- package/dist/components/va-sidenav.js +1 -0
- 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-telephone-input.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/img/sprite.svg +4 -2
- package/dist/react-bindings/index.d.ts +3 -0
- package/dist/react-bindings/index.js +1 -1
- package/dist/react-bindings/index.js.map +1 -1
- package/dist/react-bindings/index.ts +3 -0
- package/package.json +2 -2
- package/dist/9474.app.bundle.js +0 -2
- /package/dist/{9474.app.bundle.js.LICENSE.txt → 2923.app.bundle.js.LICENSE.txt} +0 -0
|
@@ -673,7 +673,7 @@ export namespace Components {
|
|
|
673
673
|
*/
|
|
674
674
|
"enableAnalytics"?: boolean;
|
|
675
675
|
/**
|
|
676
|
-
* When true
|
|
676
|
+
* When true, displays a password field. Note: This component does not check if a file is encrypted. For encryption checks, see: [Checking if an uploaded PDF is encrypted](https://depo-platform-documentation.scrollhelp.site/developer-docs/checking-if-an-uploaded-pdf-is-encrypted)
|
|
677
677
|
*/
|
|
678
678
|
"encrypted"?: boolean;
|
|
679
679
|
/**
|
|
@@ -700,10 +700,18 @@ export namespace Components {
|
|
|
700
700
|
* Maximum allowed file size in bytes.
|
|
701
701
|
*/
|
|
702
702
|
"maxFileSize"?: number;
|
|
703
|
+
/**
|
|
704
|
+
* Minimum allowed file size in bytes.
|
|
705
|
+
*/
|
|
706
|
+
"minFileSize"?: number;
|
|
703
707
|
/**
|
|
704
708
|
* The name for the input element.
|
|
705
709
|
*/
|
|
706
710
|
"name"?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Error message for the encrypted password input
|
|
713
|
+
*/
|
|
714
|
+
"passwordError"?: string;
|
|
707
715
|
/**
|
|
708
716
|
* Percent upload completed. For use with va-progress-bar component
|
|
709
717
|
*/
|
|
@@ -716,6 +724,10 @@ export namespace Components {
|
|
|
716
724
|
* Sets the input to required and renders the (*Required) text.
|
|
717
725
|
*/
|
|
718
726
|
"required"?: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* Reset to initial visual state. Useful in conjunction with errors
|
|
729
|
+
*/
|
|
730
|
+
"resetVisualState"?: boolean;
|
|
719
731
|
/**
|
|
720
732
|
* Optional file status, ex: "Uploading...", "Uploaded".
|
|
721
733
|
*/
|
|
@@ -1137,6 +1149,10 @@ export namespace Components {
|
|
|
1137
1149
|
* Selector to explicitly specify which element should receive focus when the modal is open, if the initially focused element is not the first focusable element in the document
|
|
1138
1150
|
*/
|
|
1139
1151
|
"initialFocusSelector"?: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* Label for the modal, to be set as aria-label. Will take precedence over modalTitle in settings of aria-label.
|
|
1154
|
+
*/
|
|
1155
|
+
"label"?: string;
|
|
1140
1156
|
/**
|
|
1141
1157
|
* If `true`, modal will be wider.
|
|
1142
1158
|
*/
|
|
@@ -1703,6 +1719,61 @@ export namespace Components {
|
|
|
1703
1719
|
*/
|
|
1704
1720
|
"serviceStatus": string;
|
|
1705
1721
|
}
|
|
1722
|
+
/**
|
|
1723
|
+
* @componentName Side Navigation
|
|
1724
|
+
* @maturityCategory caution
|
|
1725
|
+
* @maturityLevel candidate
|
|
1726
|
+
*/
|
|
1727
|
+
interface VaSidenav {
|
|
1728
|
+
/**
|
|
1729
|
+
* Header text to display at the top of the side navigation.
|
|
1730
|
+
*/
|
|
1731
|
+
"header"?: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* Adds a circle around the icon with the provided background [VADS color token](https://design.va.gov/foundation/color-palette).
|
|
1734
|
+
*/
|
|
1735
|
+
"iconBackgroundColor"?: string;
|
|
1736
|
+
/**
|
|
1737
|
+
* The [icon name](https://design.va.gov/components/icon) for the icon that will display to the left of the header text. The `icon-background-color` prop must be set too.
|
|
1738
|
+
*/
|
|
1739
|
+
"iconName"?: string;
|
|
1740
|
+
}
|
|
1741
|
+
interface VaSidenavItem {
|
|
1742
|
+
/**
|
|
1743
|
+
* Identifies when the item is the current page. The current page link will have `#content` on the `href`.
|
|
1744
|
+
*/
|
|
1745
|
+
"currentPage"?: boolean;
|
|
1746
|
+
/**
|
|
1747
|
+
* The href for the sidenav item. If it is also the `current-page`, this will be set to `#content`.
|
|
1748
|
+
*/
|
|
1749
|
+
"href": string;
|
|
1750
|
+
/**
|
|
1751
|
+
* The label for the sidenav item
|
|
1752
|
+
*/
|
|
1753
|
+
"label": string;
|
|
1754
|
+
/**
|
|
1755
|
+
* When set, native link routing behavior will be disabled with `preventDefault` and the `vaRouteChange` event will fire.
|
|
1756
|
+
*/
|
|
1757
|
+
"routerLink"?: boolean;
|
|
1758
|
+
}
|
|
1759
|
+
interface VaSidenavSubmenu {
|
|
1760
|
+
/**
|
|
1761
|
+
* Identifies when the item is the current page. The current page link will have `#content` on the `href`.
|
|
1762
|
+
*/
|
|
1763
|
+
"currentPage"?: boolean;
|
|
1764
|
+
/**
|
|
1765
|
+
* When present, the category name will be a link. If it is also the `current-page`, this will be set to `#content`.
|
|
1766
|
+
*/
|
|
1767
|
+
"href"?: string;
|
|
1768
|
+
/**
|
|
1769
|
+
* The label for the submenu
|
|
1770
|
+
*/
|
|
1771
|
+
"label": string;
|
|
1772
|
+
/**
|
|
1773
|
+
* When set, native link routing behavior will be disabled with `preventDefault` and the `vaRouteChange` event will fire.
|
|
1774
|
+
*/
|
|
1775
|
+
"routerLink"?: boolean;
|
|
1776
|
+
}
|
|
1706
1777
|
/**
|
|
1707
1778
|
* @componentName Statement of truth
|
|
1708
1779
|
* @maturityCategory use
|
|
@@ -2294,6 +2365,14 @@ export interface VaSelectCustomEvent<T> extends CustomEvent<T> {
|
|
|
2294
2365
|
detail: T;
|
|
2295
2366
|
target: HTMLVaSelectElement;
|
|
2296
2367
|
}
|
|
2368
|
+
export interface VaSidenavItemCustomEvent<T> extends CustomEvent<T> {
|
|
2369
|
+
detail: T;
|
|
2370
|
+
target: HTMLVaSidenavItemElement;
|
|
2371
|
+
}
|
|
2372
|
+
export interface VaSidenavSubmenuCustomEvent<T> extends CustomEvent<T> {
|
|
2373
|
+
detail: T;
|
|
2374
|
+
target: HTMLVaSidenavSubmenuElement;
|
|
2375
|
+
}
|
|
2297
2376
|
export interface VaStatementOfTruthCustomEvent<T> extends CustomEvent<T> {
|
|
2298
2377
|
detail: T;
|
|
2299
2378
|
target: HTMLVaStatementOfTruthElement;
|
|
@@ -3342,6 +3421,51 @@ declare global {
|
|
|
3342
3421
|
prototype: HTMLVaServiceListItemElement;
|
|
3343
3422
|
new (): HTMLVaServiceListItemElement;
|
|
3344
3423
|
};
|
|
3424
|
+
/**
|
|
3425
|
+
* @componentName Side Navigation
|
|
3426
|
+
* @maturityCategory caution
|
|
3427
|
+
* @maturityLevel candidate
|
|
3428
|
+
*/
|
|
3429
|
+
interface HTMLVaSidenavElement extends Components.VaSidenav, HTMLStencilElement {
|
|
3430
|
+
}
|
|
3431
|
+
var HTMLVaSidenavElement: {
|
|
3432
|
+
prototype: HTMLVaSidenavElement;
|
|
3433
|
+
new (): HTMLVaSidenavElement;
|
|
3434
|
+
};
|
|
3435
|
+
interface HTMLVaSidenavItemElementEventMap {
|
|
3436
|
+
"vaRouteChange": { href: string };
|
|
3437
|
+
}
|
|
3438
|
+
interface HTMLVaSidenavItemElement extends Components.VaSidenavItem, HTMLStencilElement {
|
|
3439
|
+
addEventListener<K extends keyof HTMLVaSidenavItemElementEventMap>(type: K, listener: (this: HTMLVaSidenavItemElement, ev: VaSidenavItemCustomEvent<HTMLVaSidenavItemElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3440
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3441
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3442
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3443
|
+
removeEventListener<K extends keyof HTMLVaSidenavItemElementEventMap>(type: K, listener: (this: HTMLVaSidenavItemElement, ev: VaSidenavItemCustomEvent<HTMLVaSidenavItemElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
3444
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3445
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3446
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
3447
|
+
}
|
|
3448
|
+
var HTMLVaSidenavItemElement: {
|
|
3449
|
+
prototype: HTMLVaSidenavItemElement;
|
|
3450
|
+
new (): HTMLVaSidenavItemElement;
|
|
3451
|
+
};
|
|
3452
|
+
interface HTMLVaSidenavSubmenuElementEventMap {
|
|
3453
|
+
"vaRouteChange": { href: string };
|
|
3454
|
+
}
|
|
3455
|
+
interface HTMLVaSidenavSubmenuElement extends Components.VaSidenavSubmenu, HTMLStencilElement {
|
|
3456
|
+
addEventListener<K extends keyof HTMLVaSidenavSubmenuElementEventMap>(type: K, listener: (this: HTMLVaSidenavSubmenuElement, ev: VaSidenavSubmenuCustomEvent<HTMLVaSidenavSubmenuElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3457
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3458
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3459
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3460
|
+
removeEventListener<K extends keyof HTMLVaSidenavSubmenuElementEventMap>(type: K, listener: (this: HTMLVaSidenavSubmenuElement, ev: VaSidenavSubmenuCustomEvent<HTMLVaSidenavSubmenuElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
3461
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3462
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3463
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
3464
|
+
}
|
|
3465
|
+
var HTMLVaSidenavSubmenuElement: {
|
|
3466
|
+
prototype: HTMLVaSidenavSubmenuElement;
|
|
3467
|
+
new (): HTMLVaSidenavSubmenuElement;
|
|
3468
|
+
};
|
|
3345
3469
|
interface HTMLVaStatementOfTruthElementEventMap {
|
|
3346
3470
|
"vaInputChange": any;
|
|
3347
3471
|
"vaInputBlur": any;
|
|
@@ -3568,6 +3692,9 @@ declare global {
|
|
|
3568
3692
|
"va-segmented-progress-bar": HTMLVaSegmentedProgressBarElement;
|
|
3569
3693
|
"va-select": HTMLVaSelectElement;
|
|
3570
3694
|
"va-service-list-item": HTMLVaServiceListItemElement;
|
|
3695
|
+
"va-sidenav": HTMLVaSidenavElement;
|
|
3696
|
+
"va-sidenav-item": HTMLVaSidenavItemElement;
|
|
3697
|
+
"va-sidenav-submenu": HTMLVaSidenavSubmenuElement;
|
|
3571
3698
|
"va-statement-of-truth": HTMLVaStatementOfTruthElement;
|
|
3572
3699
|
"va-summary-box": HTMLVaSummaryBoxElement;
|
|
3573
3700
|
"va-table": HTMLVaTableElement;
|
|
@@ -4335,7 +4462,7 @@ declare namespace LocalJSX {
|
|
|
4335
4462
|
*/
|
|
4336
4463
|
"enableAnalytics"?: boolean;
|
|
4337
4464
|
/**
|
|
4338
|
-
* When true
|
|
4465
|
+
* When true, displays a password field. Note: This component does not check if a file is encrypted. For encryption checks, see: [Checking if an uploaded PDF is encrypted](https://depo-platform-documentation.scrollhelp.site/developer-docs/checking-if-an-uploaded-pdf-is-encrypted)
|
|
4339
4466
|
*/
|
|
4340
4467
|
"encrypted"?: boolean;
|
|
4341
4468
|
/**
|
|
@@ -4362,6 +4489,10 @@ declare namespace LocalJSX {
|
|
|
4362
4489
|
* Maximum allowed file size in bytes.
|
|
4363
4490
|
*/
|
|
4364
4491
|
"maxFileSize"?: number;
|
|
4492
|
+
/**
|
|
4493
|
+
* Minimum allowed file size in bytes.
|
|
4494
|
+
*/
|
|
4495
|
+
"minFileSize"?: number;
|
|
4365
4496
|
/**
|
|
4366
4497
|
* The name for the input element.
|
|
4367
4498
|
*/
|
|
@@ -4378,6 +4509,10 @@ declare namespace LocalJSX {
|
|
|
4378
4509
|
* The event emitted when the file input password value changes.
|
|
4379
4510
|
*/
|
|
4380
4511
|
"onVaPasswordChange"?: (event: VaFileInputCustomEvent<any>) => void;
|
|
4512
|
+
/**
|
|
4513
|
+
* Error message for the encrypted password input
|
|
4514
|
+
*/
|
|
4515
|
+
"passwordError"?: string;
|
|
4381
4516
|
/**
|
|
4382
4517
|
* Percent upload completed. For use with va-progress-bar component
|
|
4383
4518
|
*/
|
|
@@ -4390,6 +4525,10 @@ declare namespace LocalJSX {
|
|
|
4390
4525
|
* Sets the input to required and renders the (*Required) text.
|
|
4391
4526
|
*/
|
|
4392
4527
|
"required"?: boolean;
|
|
4528
|
+
/**
|
|
4529
|
+
* Reset to initial visual state. Useful in conjunction with errors
|
|
4530
|
+
*/
|
|
4531
|
+
"resetVisualState"?: boolean;
|
|
4393
4532
|
/**
|
|
4394
4533
|
* Optional file status, ex: "Uploading...", "Uploaded".
|
|
4395
4534
|
*/
|
|
@@ -4855,6 +4994,10 @@ declare namespace LocalJSX {
|
|
|
4855
4994
|
* Selector to explicitly specify which element should receive focus when the modal is open, if the initially focused element is not the first focusable element in the document
|
|
4856
4995
|
*/
|
|
4857
4996
|
"initialFocusSelector"?: string;
|
|
4997
|
+
/**
|
|
4998
|
+
* Label for the modal, to be set as aria-label. Will take precedence over modalTitle in settings of aria-label.
|
|
4999
|
+
*/
|
|
5000
|
+
"label"?: string;
|
|
4858
5001
|
/**
|
|
4859
5002
|
* If `true`, modal will be wider.
|
|
4860
5003
|
*/
|
|
@@ -5529,6 +5672,69 @@ declare namespace LocalJSX {
|
|
|
5529
5672
|
*/
|
|
5530
5673
|
"serviceStatus"?: string;
|
|
5531
5674
|
}
|
|
5675
|
+
/**
|
|
5676
|
+
* @componentName Side Navigation
|
|
5677
|
+
* @maturityCategory caution
|
|
5678
|
+
* @maturityLevel candidate
|
|
5679
|
+
*/
|
|
5680
|
+
interface VaSidenav {
|
|
5681
|
+
/**
|
|
5682
|
+
* Header text to display at the top of the side navigation.
|
|
5683
|
+
*/
|
|
5684
|
+
"header"?: string;
|
|
5685
|
+
/**
|
|
5686
|
+
* Adds a circle around the icon with the provided background [VADS color token](https://design.va.gov/foundation/color-palette).
|
|
5687
|
+
*/
|
|
5688
|
+
"iconBackgroundColor"?: string;
|
|
5689
|
+
/**
|
|
5690
|
+
* The [icon name](https://design.va.gov/components/icon) for the icon that will display to the left of the header text. The `icon-background-color` prop must be set too.
|
|
5691
|
+
*/
|
|
5692
|
+
"iconName"?: string;
|
|
5693
|
+
}
|
|
5694
|
+
interface VaSidenavItem {
|
|
5695
|
+
/**
|
|
5696
|
+
* Identifies when the item is the current page. The current page link will have `#content` on the `href`.
|
|
5697
|
+
*/
|
|
5698
|
+
"currentPage"?: boolean;
|
|
5699
|
+
/**
|
|
5700
|
+
* The href for the sidenav item. If it is also the `current-page`, this will be set to `#content`.
|
|
5701
|
+
*/
|
|
5702
|
+
"href": string;
|
|
5703
|
+
/**
|
|
5704
|
+
* The label for the sidenav item
|
|
5705
|
+
*/
|
|
5706
|
+
"label": string;
|
|
5707
|
+
/**
|
|
5708
|
+
* Fires when a sidenav anchor link is clicked. This can be leveraged when using a SPA routing library like React Router. The `href` and `router-link` props must be set.
|
|
5709
|
+
*/
|
|
5710
|
+
"onVaRouteChange"?: (event: VaSidenavItemCustomEvent<{ href: string }>) => void;
|
|
5711
|
+
/**
|
|
5712
|
+
* When set, native link routing behavior will be disabled with `preventDefault` and the `vaRouteChange` event will fire.
|
|
5713
|
+
*/
|
|
5714
|
+
"routerLink"?: boolean;
|
|
5715
|
+
}
|
|
5716
|
+
interface VaSidenavSubmenu {
|
|
5717
|
+
/**
|
|
5718
|
+
* Identifies when the item is the current page. The current page link will have `#content` on the `href`.
|
|
5719
|
+
*/
|
|
5720
|
+
"currentPage"?: boolean;
|
|
5721
|
+
/**
|
|
5722
|
+
* When present, the category name will be a link. If it is also the `current-page`, this will be set to `#content`.
|
|
5723
|
+
*/
|
|
5724
|
+
"href"?: string;
|
|
5725
|
+
/**
|
|
5726
|
+
* The label for the submenu
|
|
5727
|
+
*/
|
|
5728
|
+
"label": string;
|
|
5729
|
+
/**
|
|
5730
|
+
* Fires when a sidenav anchor link is clicked. This can be leveraged when using a SPA routing library like React Router. The `href` and `router-link` props must be set.
|
|
5731
|
+
*/
|
|
5732
|
+
"onVaRouteChange"?: (event: VaSidenavSubmenuCustomEvent<{ href: string }>) => void;
|
|
5733
|
+
/**
|
|
5734
|
+
* When set, native link routing behavior will be disabled with `preventDefault` and the `vaRouteChange` event will fire.
|
|
5735
|
+
*/
|
|
5736
|
+
"routerLink"?: boolean;
|
|
5737
|
+
}
|
|
5532
5738
|
/**
|
|
5533
5739
|
* @componentName Statement of truth
|
|
5534
5740
|
* @maturityCategory use
|
|
@@ -6054,6 +6260,9 @@ declare namespace LocalJSX {
|
|
|
6054
6260
|
"va-segmented-progress-bar": VaSegmentedProgressBar;
|
|
6055
6261
|
"va-select": VaSelect;
|
|
6056
6262
|
"va-service-list-item": VaServiceListItem;
|
|
6263
|
+
"va-sidenav": VaSidenav;
|
|
6264
|
+
"va-sidenav-item": VaSidenavItem;
|
|
6265
|
+
"va-sidenav-submenu": VaSidenavSubmenu;
|
|
6057
6266
|
"va-statement-of-truth": VaStatementOfTruth;
|
|
6058
6267
|
"va-summary-box": VaSummaryBox;
|
|
6059
6268
|
"va-table": VaTable;
|
|
@@ -6406,6 +6615,14 @@ declare module "@stencil/core" {
|
|
|
6406
6615
|
* @maturityLevel candidate
|
|
6407
6616
|
*/
|
|
6408
6617
|
"va-service-list-item": LocalJSX.VaServiceListItem & JSXBase.HTMLAttributes<HTMLVaServiceListItemElement>;
|
|
6618
|
+
/**
|
|
6619
|
+
* @componentName Side Navigation
|
|
6620
|
+
* @maturityCategory caution
|
|
6621
|
+
* @maturityLevel candidate
|
|
6622
|
+
*/
|
|
6623
|
+
"va-sidenav": LocalJSX.VaSidenav & JSXBase.HTMLAttributes<HTMLVaSidenavElement>;
|
|
6624
|
+
"va-sidenav-item": LocalJSX.VaSidenavItem & JSXBase.HTMLAttributes<HTMLVaSidenavItemElement>;
|
|
6625
|
+
"va-sidenav-submenu": LocalJSX.VaSidenavSubmenu & JSXBase.HTMLAttributes<HTMLVaSidenavSubmenuElement>;
|
|
6409
6626
|
/**
|
|
6410
6627
|
* @componentName Statement of truth
|
|
6411
6628
|
* @maturityCategory use
|
|
@@ -1 +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-sr-only{position:absolute;left:-999em;right:auto}.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.headerSrOnly=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,headerSrOnly:n}=this,i=classnames({"usa-accordion--bordered":t});return h(Host,null,h("div",{class:i},h((()=>{const t=this.el.querySelector('[slot="headline"]'),i=null==t?void 0:t.innerHTML,s=t&&t.tagName.includes("H")?t.tagName.toLowerCase():`h${a}`;return h(s,{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||i,n&&h("span",{class:"usa-sr-only"}," ",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],headerSrOnly:[1,"header-sr-only"],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
|
+
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,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}.usa-sr-only{position:absolute;left:-999em;right:auto}.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.headerSrOnly=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:a,level:o,open:r,headerSrOnly:n}=this,i=classnames({"usa-accordion--bordered":t});return h(Host,null,h("div",{class:i},h((()=>{const t=this.el.querySelector('[slot="headline"]'),i=null==t?void 0:t.innerHTML,s=t&&t.tagName.includes("H")?t.tagName.toLowerCase():`h${o}`;return h(s,{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||i,n&&h("span",{class:"usa-sr-only"}," ",n)),this.subheader&&h("span",{class:"va-accordion__subheader"},h("slot",{name:"subheader-icon"}),a)))}),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],headerSrOnly:[1,"header-sr-only"],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{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
|
+
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,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}.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 - 4px);border-left:4px 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};
|
|
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,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}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 - 4px);border-left:4px 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};
|
|
@@ -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 vaAlertExpandableCss="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}.sr-only{border:0;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute !important;width:1px;word-wrap:normal !important}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([status='warning']){background-color:var(--vads-alert-color-background-warning-on-light)}:host([status='info']){background-color:var(--vads-alert-color-background-info-on-light)}:host([status='error']){background-color:var(--vads-alert-color-background-error-on-light)}:host([status='success']){background-color:var(--vads-alert-color-background-success-on-light)}:host([status='continue']){background-color:var(--vads-color-base-lightest)}.alert-expandable-trigger{-ms-flex-align:start;align-items:flex-start;cursor:pointer;display:-ms-flexbox;display:flex;padding:0.75rem}div.warning .alert-expandable-trigger:hover{background-color:var(--vads-color-gold-lighter)}div.info .alert-expandable-trigger:hover{background-color:var(--vads-color-primary-alt-light)}div.error .alert-expandable-trigger:hover{background-color:var(--vads-color-secondary-light)}div.success .alert-expandable-trigger:hover{background-color:var(--vads-color-green-lighter)}div.continue .alert-expandable-trigger:hover{background-color:var(--vads-color-base-lighter)}.alert-expandable-title{border-bottom-right-radius:1px;border-bottom:2px dotted var(--vads-color-primary-alt-dark);color:var(--vads-color-base-darker);cursor:pointer;font-weight:600}.alert-expandable:not(.hide-icon) .alert-expandable-body{padding-left:32px;}.alert-expandable-body{overflow:hidden}.alert-expandable-body.closed{opacity:0;max-height:0;visibility:hidden;overflow:hidden}.alert-expandable-body.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)}#slot-wrap{margin:0.75rem}.alert-expandable-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'] .alert-expandable-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}.alert-expandable__status-icon{color:var(--vads-color-base-darker);margin-right:8px}::slotted(*){margin-bottom:0 !important;margin-top:0 !important}",VaAlertExpandableStyle0=vaAlertExpandableCss,VaAlertExpandable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.open=void 0,this.status=void 0,this.trigger=void 0,this.disableAnalytics=!1,this.iconless=!1}handleResize(){this.updateAlertBodyMaxHeight()}toggleOpen(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-alert-expandable",action:this.open?"collapse":"expand",details:{triggerText:this.trigger}}),this.open=!this.open}handleKeydown(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.toggleOpen())}updateAlertBodyMaxHeight(){const e=this.el.shadowRoot.getElementById("alert-body")
|
|
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 vaAlertExpandableCss="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}.sr-only{border:0;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute !important;width:1px;word-wrap:normal !important}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,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}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([status='warning']){background-color:var(--vads-alert-color-background-warning-on-light)}:host([status='info']){background-color:var(--vads-alert-color-background-info-on-light)}:host([status='error']){background-color:var(--vads-alert-color-background-error-on-light)}:host([status='success']){background-color:var(--vads-alert-color-background-success-on-light)}:host([status='continue']){background-color:var(--vads-color-base-lightest)}.alert-expandable-trigger{-ms-flex-align:start;align-items:flex-start;cursor:pointer;display:-ms-flexbox;display:flex;padding:0.75rem}div.warning .alert-expandable-trigger:hover{background-color:var(--vads-color-gold-lighter)}div.info .alert-expandable-trigger:hover{background-color:var(--vads-color-primary-alt-light)}div.error .alert-expandable-trigger:hover{background-color:var(--vads-color-secondary-light)}div.success .alert-expandable-trigger:hover{background-color:var(--vads-color-green-lighter)}div.continue .alert-expandable-trigger:hover{background-color:var(--vads-color-base-lighter)}.alert-expandable-title{border-bottom-right-radius:1px;border-bottom:2px dotted var(--vads-color-primary-alt-dark);color:var(--vads-color-base-darker);cursor:pointer;font-weight:600}.alert-expandable:not(.hide-icon) .alert-expandable-body{padding-left:32px;}.alert-expandable-body{overflow:hidden}.alert-expandable-body.closed{opacity:0;max-height:0;visibility:hidden;overflow:hidden}.alert-expandable-body.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)}#slot-wrap{margin:0.75rem}.alert-expandable-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'] .alert-expandable-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}.alert-expandable__status-icon{color:var(--vads-color-base-darker);margin-right:8px}::slotted(*){margin-bottom:0 !important;margin-top:0 !important}",VaAlertExpandableStyle0=vaAlertExpandableCss,VaAlertExpandable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.open=void 0,this.status=void 0,this.trigger=void 0,this.disableAnalytics=!1,this.iconless=!1}handleResize(){this.updateAlertBodyMaxHeight()}toggleOpen(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-alert-expandable",action:this.open?"collapse":"expand",details:{triggerText:this.trigger}}),this.open=!this.open}handleKeydown(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.toggleOpen())}updateAlertBodyMaxHeight(){var e;const a=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.getElementById("alert-body");if(!a)return;const t=a.scrollHeight+"px";a.style.setProperty("--calc-max-height","calc("+t+" + 2rem)")}componentDidLoad(){requestAnimationFrame((()=>this.updateAlertBodyMaxHeight()))}render(){const{status:e,open:a,iconless:t}=this,o=classnames("alert-expandable",e,{"hide-icon":t}),r=classnames("alert-expandable-body",{open:a,closed:!a});return h(Host,{key:"3a22efdf82c6e55c6c8a14e8c4c9d0bea0c46408"},h("div",{key:"4977d7542b21073a0b83e3f98346bb02947caada",role:"error"===e?"alert":null,"aria-live":"error"===e?"assertive":null,class:o},h("a",{key:"72b8135a28146f75c1d5ba99dd1917105d1718ce",role:"button","aria-controls":"alert-body","aria-expanded":this.open?"true":"false",tabIndex:0,onClick:this.toggleOpen.bind(this),onKeyDown:this.handleKeydown.bind(this),class:"alert-expandable-trigger"},!t&&h("va-icon",{key:"cacefeaf99457e263c5e8a7a10540511d9379e88",class:"alert-expandable__status-icon",icon:{continue:"lock",error:"info",warning:"warning",info:"info",success:"check_circle"}[e]||"info",size:3}),h("div",{key:"63d41ea165b00c24940e8a167361287e4e84dd7b"},h("span",{key:"ca9c2cba09cb5910beb15573d587b5ddaabfd0cd",class:"alert-expandable-title"},h("span",{key:"91b633322061063ab214f2c9409eb156da210bc2",class:"sr-only"},"Alert: "),this.trigger),h("va-icon",{key:"c31925bafca4dac9bfcec3533d56cfa7f534f3a8",class:"alert-expandable-icon",icon:"chevron_right",size:3}))),h("div",{key:"ad8f69361c4b067502af001a1cb205bee400bac2",id:"alert-body",class:r},h("div",{key:"6b65b57b6db25c4abf5e8bb975adcdf6911d1f7b",id:"slot-wrap"},h("slot",{key:"41b7bf5ee96cef6407efe3eecfe6d35c73f5d371"})))))}get el(){return this}static get style(){return VaAlertExpandableStyle0}},[1,"va-alert-expandable",{status:[1],trigger:[1],disableAnalytics:[4,"disable-analytics"],iconless:[4],open:[32]},[[9,"resize","handleResize"]]]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-alert-expandable","va-icon"].forEach((e=>{switch(e){case"va-alert-expandable":customElements.get(e)||customElements.define(e,VaAlertExpandable$1);break;case"va-icon":customElements.get(e)||defineCustomElement$2()}}))}const VaAlertExpandable=VaAlertExpandable$1,defineCustomElement=defineCustomElement$1;export{VaAlertExpandable,defineCustomElement};
|