File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " nci-design-system" ,
3- "version" : " 3.6.0 " ,
3+ "version" : " 3.6.1 " ,
44 "description" : " NCI Design System" ,
55 "author" : " NCIOCPL" ,
66 "private" : true ,
Original file line number Diff line number Diff line change 1919 ]
2020 },
2121 "npmClient" : " pnpm" ,
22- "version" : " 3.6.0 " ,
22+ "version" : " 3.6.1 " ,
2323 "$schema" : " node_modules/lerna/schemas/lerna-schema.json"
2424}
Original file line number Diff line number Diff line change 11{
22 "name" : " ncids" ,
3- "version" : " 3.6.0 " ,
3+ "version" : " 3.6.1 " ,
44 "description" : " Monorepo for the NCI Design System" ,
55 "main" : " index.js" ,
66 "repository" : " https://github.com/NCIOCPL/ncids.git" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @nciocpl/ncids-css" ,
3- "version" : " 3.6.0 " ,
3+ "version" : " 3.6.1 " ,
44 "description" : " CSS library for the National Cancer Institute Design System (NCIDS)" ,
55 "repository" : {
66 "type" : " git" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @nciocpl/ncids-js" ,
3- "version" : " 3.6.0 " ,
3+ "version" : " 3.6.1 " ,
44 "description" : " JS library for the National Cancer Institute Design System" ,
55 "author" : " NCIOCPL" ,
66 "homepage" : " https://github.com/NCIOCPL/ncids#readme" ,
Original file line number Diff line number Diff line change 22 * @packageDocumentation
33 */
44export { USAAccordion } from './usa-accordion.component' ;
5+
6+ import { AccordionOptions } from './usa-accordion-options' ;
7+ export type { AccordionOptions } ;
Original file line number Diff line number Diff line change 11import { ModalEventDetails } from './modal.event-details' ;
22
3+ /**
4+ * Enum representing the possible actions that can trigger the closing of a modal.
5+ */
36export enum ModalCloseAction {
7+ /* Modal Closed with Escape Key */
48 KEY_ESCAPE = 'escape' ,
9+ /* Modal Closed with Click Outside the Modal */
510 CLICK_OUTSIDE = 'outside' ,
11+ /* Modal Closed with Close Icon */
612 CLOSE_BUTTON = 'close' ,
13+ /* Modal Closed with Escape Key */
714 FOOTER_BUTTON = 'footer' ,
15+ /* Modal Closed with Escape Key */
816 OTHER_BUTTON = 'other' ,
917}
1018
1119/**
1220 * Custom event details for the `modal:close` event.
1321 */
1422export type ModalCloseEventDetails = ModalEventDetails & {
23+ /** The Close Action that triggered the event */
1524 closeAction ?: ModalCloseAction ;
1625} ;
Original file line number Diff line number Diff line change @@ -10,5 +10,16 @@ export { USAModal } from './modal.component';
1010
1111import type { ModalEventDetails } from './event-details/modal.event-details' ;
1212import type { ModalCloseEventDetails } from './event-details/modal.close.event-details' ;
13+ import type { ModalCloseAction } from './event-details/modal.close.event-details' ;
14+ import type { ModalConfig } from './modal-config' ;
15+ import type { ModalContent } from './modal-content' ;
16+ import type { ModalButtons } from './modal-buttons' ;
1317
14- export type { ModalEventDetails , ModalCloseEventDetails } ;
18+ export type {
19+ ModalEventDetails ,
20+ ModalCloseEventDetails ,
21+ ModalCloseAction ,
22+ ModalConfig ,
23+ ModalContent ,
24+ ModalButtons ,
25+ } ;
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ import { ModalButtons } from './modal-buttons';
1515 * ```
1616 */
1717export type ModalContent = {
18+ /** The title of the modal, which can be a string or an HTML heading element. */
1819 title ?: string | HTMLHeadingElement ;
20+ /** The content of the modal, which can be a string or an HTML element. */
1921 content : string | HTMLElement ;
22+ /** An optional array of buttons to be displayed in the modal footer. */
2023 footer ?: ModalButtons [ ] ;
2124} ;
Original file line number Diff line number Diff line change 1+ import { ModalConfig } from './modal-config' ;
2+ import { ModalContent } from './modal-content' ;
3+ import { ModalButtons } from './modal-buttons' ;
4+ import { FocusTrap } from '../../utils/focus-trap' ;
5+ import { scrollbarWidth } from './utils/scrollbar-width' ;
6+ import { ModalEventDetails } from './event-details/modal.event-details' ;
7+ import { ModalCloseEventDetails } from './event-details/modal.close.event-details' ;
8+ import { ModalCloseAction } from './event-details/modal.close.event-details' ;
9+
110/**
211 * The USAModal component is used to initialize and manage the `.usa-modal`
312 * component.
95104 *
96105 * These events provide hooks for integrating with analytics or other JavaScript logic to enhance user interaction tracking.
97106 */
98-
99- import { ModalConfig } from './modal-config' ;
100- import { ModalContent } from './modal-content' ;
101- import { ModalButtons } from './modal-buttons' ;
102- import { FocusTrap } from '../../utils/focus-trap' ;
103- import { scrollbarWidth } from './utils/scrollbar-width' ;
104- import { ModalEventDetails } from './event-details/modal.event-details' ;
105- import { ModalCloseEventDetails } from './event-details/modal.close.event-details' ;
106- import { ModalCloseAction } from './event-details/modal.close.event-details' ;
107-
108107export class USAModal {
109108 /** The .usa-modal element. */
110109 protected modal : HTMLElement ;
You can’t perform that action at this time.
0 commit comments