@trackunit/react-compound-components 1.6.64 → 1.6.65

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.cjs.js CHANGED
@@ -65,7 +65,7 @@ const setupLibraryTranslations = () => {
65
65
  *
66
66
  */
67
67
  const ConfirmationDialogModal = ({ title, message, handlePrimaryActionClick, handleSecondaryActionClick, secondaryActionLabel, primaryActionType, primaryActionLabel, ...modalProps }) => {
68
- return (jsxRuntime.jsx(reactModal.Modal, { ...modalProps, className: "max-w-xl", children: jsxRuntime.jsxs(reactComponents.Card, { "aria-describedby": "dialogDesc", "aria-labelledby": "dialogTitle", role: "dialog", children: [jsxRuntime.jsx(reactComponents.CardHeader, { id: "dialogTitle", heading: title, headingVariant: "secondary", onClose: modalProps.close }), jsxRuntime.jsx(reactComponents.CardBody, { className: "bg-secondary-50", id: "dialogDesc", children: message }), jsxRuntime.jsxs(reactComponents.CardFooter, { className: "bg-secondary-50", hideSeparator: true, children: [jsxRuntime.jsx(reactComponents.Button, { dataTestId: "secondaryAction", onClick: handleSecondaryActionClick, variant: "ghost-neutral", children: secondaryActionLabel }), jsxRuntime.jsx(reactComponents.Button, { dataTestId: "primaryAction", onClick: handlePrimaryActionClick, variant: primaryActionType, children: primaryActionLabel })] })] }) }));
68
+ return (jsxRuntime.jsxs(reactModal.Modal, { ...modalProps, className: "max-w-xl", children: [jsxRuntime.jsx(reactComponents.CardHeader, { id: "dialogTitle", heading: title, headingVariant: "secondary", onClose: modalProps.close }), jsxRuntime.jsx(reactComponents.CardBody, { className: "bg-secondary-50", id: "dialogDesc", children: message }), jsxRuntime.jsxs(reactComponents.CardFooter, { className: "bg-secondary-50", hideSeparator: true, children: [jsxRuntime.jsx(reactComponents.Button, { dataTestId: "secondaryAction", onClick: handleSecondaryActionClick, variant: "ghost-neutral", children: secondaryActionLabel }), jsxRuntime.jsx(reactComponents.Button, { dataTestId: "primaryAction", onClick: handlePrimaryActionClick, variant: primaryActionType, children: primaryActionLabel })] })] }));
69
69
  };
70
70
 
71
71
  /**
package/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { registerTranslations, useNamespaceTranslation } from '@trackunit/i18n-library-translation';
3
3
  import { ConfirmationDialogProvider } from '@trackunit/react-core-hooks';
4
4
  import { Modal, useModal } from '@trackunit/react-modal';
5
5
  import { useState, useMemo, useCallback, useRef, useEffect } from 'react';
6
- import { Card, CardHeader, CardBody, CardFooter, Button, useViewportBreakpoints, Icon, Spinner } from '@trackunit/react-components';
6
+ import { CardHeader, CardBody, CardFooter, Button, useViewportBreakpoints, Icon, Spinner } from '@trackunit/react-components';
7
7
  import { cvaMerge } from '@trackunit/css-class-variance-utilities';
8
8
  import ImageGallery from 'react-image-gallery';
9
9
  import { twMerge } from 'tailwind-merge';
@@ -63,7 +63,7 @@ const setupLibraryTranslations = () => {
63
63
  *
64
64
  */
65
65
  const ConfirmationDialogModal = ({ title, message, handlePrimaryActionClick, handleSecondaryActionClick, secondaryActionLabel, primaryActionType, primaryActionLabel, ...modalProps }) => {
66
- return (jsx(Modal, { ...modalProps, className: "max-w-xl", children: jsxs(Card, { "aria-describedby": "dialogDesc", "aria-labelledby": "dialogTitle", role: "dialog", children: [jsx(CardHeader, { id: "dialogTitle", heading: title, headingVariant: "secondary", onClose: modalProps.close }), jsx(CardBody, { className: "bg-secondary-50", id: "dialogDesc", children: message }), jsxs(CardFooter, { className: "bg-secondary-50", hideSeparator: true, children: [jsx(Button, { dataTestId: "secondaryAction", onClick: handleSecondaryActionClick, variant: "ghost-neutral", children: secondaryActionLabel }), jsx(Button, { dataTestId: "primaryAction", onClick: handlePrimaryActionClick, variant: primaryActionType, children: primaryActionLabel })] })] }) }));
66
+ return (jsxs(Modal, { ...modalProps, className: "max-w-xl", children: [jsx(CardHeader, { id: "dialogTitle", heading: title, headingVariant: "secondary", onClose: modalProps.close }), jsx(CardBody, { className: "bg-secondary-50", id: "dialogDesc", children: message }), jsxs(CardFooter, { className: "bg-secondary-50", hideSeparator: true, children: [jsx(Button, { dataTestId: "secondaryAction", onClick: handleSecondaryActionClick, variant: "ghost-neutral", children: secondaryActionLabel }), jsx(Button, { dataTestId: "primaryAction", onClick: handlePrimaryActionClick, variant: primaryActionType, children: primaryActionLabel })] })] }));
67
67
  };
68
68
 
69
69
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-compound-components",
3
- "version": "1.6.64",
3
+ "version": "1.6.65",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
@@ -10,7 +10,7 @@
10
10
  "@trackunit/react-core-contexts-api": "1.7.43",
11
11
  "@trackunit/react-core-hooks": "1.6.45",
12
12
  "@trackunit/react-components": "1.8.14",
13
- "@trackunit/react-modal": "1.6.59",
13
+ "@trackunit/react-modal": "1.6.60",
14
14
  "@trackunit/css-class-variance-utilities": "1.6.42",
15
15
  "@trackunit/date-and-time-utils": "1.6.42",
16
16
  "@trackunit/react-form-components": "1.7.30",