@trackunit/react-components 0.1.26 → 0.1.28

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
@@ -1001,9 +1001,9 @@ const StyledCardBody = twx(CardBody) `
1001
1001
  * @param {PopoverListItemProps} props - The props for the PopoverListItem component
1002
1002
  * @returns {JSX.Element} PopoverListItem component
1003
1003
  */
1004
- const PopoverListItem = ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix, dataTestId, }) => {
1004
+ const PopoverListItem = ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix, dataTestId, className, }) => {
1005
1005
  const content = (jsxs("div", Object.assign({ className: "flex items-center gap-3" }, { children: [prefix && jsx("div", { children: prefix }), jsx(StyledText$2, Object.assign({ weight: selected ? "bold" : "normal", "$selected": selected }, { children: children })), suffix && jsx("div", { children: suffix })] })));
1006
- return (jsx(ListItem, Object.assign({ "$selected": selected, disabled: disabled, onClick: onClick, "aria-label": ariaLabel, "data-testid": dataTestId }, { children: url ? jsx(PopoverLink, Object.assign({ to: url }, { children: content })) : content })));
1006
+ return (jsx(ListItem, Object.assign({ "$selected": selected, disabled: disabled, onClick: onClick, "aria-label": ariaLabel, "data-testid": dataTestId, className: className }, { children: url ? jsx(PopoverLink, Object.assign({ to: url }, { children: content })) : content })));
1007
1007
  };
1008
1008
  const StyledText$2 = twx(Text$1) `
1009
1009
  tu-popover-list-item__text
@@ -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.28",
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.
@@ -27,4 +27,4 @@ export interface PopoverListItemProps extends CommonProps {
27
27
  * @param {PopoverListItemProps} props - The props for the PopoverListItem component
28
28
  * @returns {JSX.Element} PopoverListItem component
29
29
  */
30
- export declare const PopoverListItem: ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix, dataTestId, }: PopoverListItemProps) => JSX.Element;
30
+ export declare const PopoverListItem: ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix, dataTestId, className, }: PopoverListItemProps) => JSX.Element;