@trackunit/react-compound-components 0.0.106 → 0.0.107
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 +2 -1
- package/index.esm.js +2 -1
- package/package.json +3 -2
package/index.cjs.js
CHANGED
|
@@ -7,6 +7,7 @@ var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
|
|
|
7
7
|
var reactCoreHooks = require('@trackunit/react-core-hooks');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var reactComponents = require('@trackunit/react-components');
|
|
10
|
+
var reactModal = require('@trackunit/react-modal');
|
|
10
11
|
|
|
11
12
|
function _interopNamespace(e) {
|
|
12
13
|
if (e && e.__esModule) return e;
|
|
@@ -124,7 +125,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
124
125
|
*/
|
|
125
126
|
const ConfirmationDialogModal = (_a) => {
|
|
126
127
|
var { isOpen, title, handleDismiss, message, handlePrimaryActionClick, handleSecondaryActionClick, secondaryActionLabel, primaryActionType, primaryActionLabel } = _a, rest = __rest(_a, ["isOpen", "title", "handleDismiss", "message", "handlePrimaryActionClick", "handleSecondaryActionClick", "secondaryActionLabel", "primaryActionType", "primaryActionLabel"]);
|
|
127
|
-
return (jsxRuntime.jsx(
|
|
128
|
+
return (jsxRuntime.jsx(reactModal.Modal, Object.assign({ className: "max-w-xl", isOpen: isOpen, onDismissClick: handleDismiss }, rest, { 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: handleDismiss }), 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: "secondary", children: secondaryActionLabel }), jsxRuntime.jsx(reactComponents.Button, { dataTestId: "primaryAction", onClick: handlePrimaryActionClick, variant: primaryActionType, children: primaryActionLabel })] })] }) })));
|
|
128
129
|
};
|
|
129
130
|
|
|
130
131
|
/**
|
package/index.esm.js
CHANGED
|
@@ -3,7 +3,8 @@ import { registerTranslations, useNamespaceTranslation } from '@trackunit/i18n-l
|
|
|
3
3
|
import { ConfirmationDialogProvider } from '@trackunit/react-core-hooks';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useState } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { Card, CardHeader, CardBody, CardFooter, Button } from '@trackunit/react-components';
|
|
7
|
+
import { Modal } from '@trackunit/react-modal';
|
|
7
8
|
|
|
8
9
|
var defaultTranslations = {
|
|
9
10
|
"confirmationDialog.default.message": "Are you certain that you wish to proceed with this course of action?",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-compound-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.107",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"@trackunit/react-core-hooks": "*",
|
|
9
9
|
"react": "^18.2.0",
|
|
10
10
|
"@trackunit/react-components": "*",
|
|
11
|
-
"@trackunit/i18n-library-translation": "*"
|
|
11
|
+
"@trackunit/i18n-library-translation": "*",
|
|
12
|
+
"@trackunit/react-modal": "*"
|
|
12
13
|
},
|
|
13
14
|
"engines": {
|
|
14
15
|
"node": ">=20.x",
|