@trackunit/react-components 0.1.26 → 0.1.27

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/index.js CHANGED
@@ -1483,10 +1483,10 @@ const Backdrop = tw.div `
1483
1483
  * - Modals interrupt a user's workflow by design.
1484
1484
  * - The modal component provides a foundation for creating dialogs, lightboxes, etc.
1485
1485
  */
1486
- const Modal = React.forwardRef(({ isOpen, children, dataTestId, className, onDismissClick = () => {
1486
+ const Modal = React.forwardRef(({ isOpen, children, dataTestId, className, role = "", onDismissClick = () => {
1487
1487
  return;
1488
1488
  }, }, ref) => {
1489
- return (jsx(ModalBackdrop, Object.assign({ isVisible: isOpen, onClick: onDismissClick }, { children: isOpen && (jsx(StyledDiv, Object.assign({ ref: ref }, { children: jsx(StyledCard, Object.assign({ dataTestId: dataTestId, className: className }, { children: children })) }))) })));
1489
+ return (jsx(ModalBackdrop, Object.assign({ isVisible: isOpen, onClick: onDismissClick }, { children: isOpen && (jsx(StyledDiv, Object.assign({ ref: ref, role: role }, { children: jsx(StyledCard, Object.assign({ dataTestId: dataTestId, className: className }, { children: children })) }))) })));
1490
1490
  });
1491
1491
  const StyledCard = twx(Card) `
1492
1492
  tu-modal__card
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
@@ -17,6 +17,10 @@ export interface ModalProps extends CommonProps {
17
17
  * Test id to be applied to the modal.
18
18
  */
19
19
  dataTestId?: string;
20
+ /**
21
+ * Aria role to be applied to element
22
+ */
23
+ role?: string;
20
24
  }
21
25
  /**
22
26
  * - Modals are used to present critical information or request user input needed to complete a user's workflow.