@dashadmin/dash-info 1.3.25 → 1.3.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/README.md CHANGED
@@ -0,0 +1,29 @@
1
+ # @dashadmin/dash-info
2
+
3
+ > Application info / metadata display component.
4
+
5
+ ## Overview
6
+
7
+ The `DashInfo` component for surfacing app version, build and environment information.
8
+
9
+ ## Key exports & features
10
+
11
+ - `DashInfo` component
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ # From the public npm registry
17
+ npm install @dashadmin/dash-info
18
+
19
+ # Or the local Verdaccio registry (unscoped)
20
+ npm install dash-info --registry http://localhost:4873
21
+ ```
22
+
23
+ ## Development & publishing
24
+
25
+ This package is part of the **dash-frontend-core** monorepo. See [`DEVELOPMENT.md`](../../DEVELOPMENT.md) for the source-modification workflow, local Verdaccio publishing, npm publishing and version-bump policy.
26
+
27
+ ---
28
+
29
+ _Part of the [Dash Framework](https://www.npmjs.com/org/dashadmin) · `@dashadmin` scope._
package/dist/index.cjs ADDED
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/index.ts
50
+ var index_exports = {};
51
+ __export(index_exports, {
52
+ default: () => DashInfo_default
53
+ });
54
+ module.exports = __toCommonJS(index_exports);
55
+
56
+ // src/DashInfo.tsx
57
+ var import_material = require("@mui/material");
58
+ var import_react = require("react");
59
+
60
+ // ../../node_modules/@mui/icons-material/esm/utils/createSvgIcon.js
61
+ var import_utils = require("@mui/material/utils");
62
+
63
+ // ../../node_modules/@mui/icons-material/esm/Info.js
64
+ var import_jsx_runtime = require("react/jsx-runtime");
65
+ var Info_default = (0, import_utils.createSvgIcon)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
66
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"
67
+ }), "Info");
68
+
69
+ // ../../node_modules/@mui/icons-material/esm/CheckCircle.js
70
+ var import_jsx_runtime2 = require("react/jsx-runtime");
71
+ var CheckCircle_default = (0, import_utils.createSvgIcon)(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", {
72
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"
73
+ }), "CheckCircle");
74
+
75
+ // ../../node_modules/@mui/icons-material/esm/Dangerous.js
76
+ var import_jsx_runtime3 = require("react/jsx-runtime");
77
+ var Dangerous_default = (0, import_utils.createSvgIcon)(/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", {
78
+ d: "M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27zM17 15.74 15.74 17 12 13.26 8.26 17 7 15.74 10.74 12 7 8.26 8.26 7 12 10.74 15.74 7 17 8.26 13.26 12z"
79
+ }), "Dangerous");
80
+
81
+ // src/DashInfo.tsx
82
+ var import_react_admin = require("react-admin");
83
+ var import_jsx_runtime4 = require("react/jsx-runtime");
84
+ var Icon = (props) => {
85
+ const { children, variant } = props;
86
+ switch (variant) {
87
+ case "success":
88
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `dash-modal-img dash-modal-img-${variant}`, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CheckCircle_default, {}) }),
90
+ children && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "dash-modal-title", children })
91
+ ] });
92
+ case "danger":
93
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `dash-modal-img dash-modal-img-${variant}`, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dangerous_default, {}) }),
95
+ children && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "dash-modal-title", children })
96
+ ] });
97
+ case "info":
98
+ case "default":
99
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `dash-modal-img dash-modal-img-${variant}`, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Info_default, {}) }),
101
+ children && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "dash-modal-title", children })
102
+ ] });
103
+ default:
104
+ return children ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "dash-modal-title", children }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {});
105
+ }
106
+ };
107
+ var DashInfo = (props) => {
108
+ const translate = (0, import_react_admin.useTranslate)();
109
+ const _a = props, {
110
+ variant = "default",
111
+ onCancel,
112
+ onConfirm,
113
+ cancelText: cancelText = translate("dash.action.cancel"),
114
+ confirmText = translate("dash.action.continue"),
115
+ closeText = null,
116
+ title,
117
+ content = null,
118
+ className,
119
+ showCancelButton = false,
120
+ showConfirmButton = false,
121
+ dialogActions,
122
+ fullscreen = false,
123
+ children
124
+ } = _a, rest = __objRest(_a, [
125
+ "variant",
126
+ "onCancel",
127
+ "onConfirm",
128
+ //onSubmit,
129
+ //closeText = null,
130
+ "cancelText",
131
+ "confirmText",
132
+ "closeText",
133
+ "title",
134
+ "content",
135
+ "className",
136
+ "showCancelButton",
137
+ "showConfirmButton",
138
+ "dialogActions",
139
+ "fullscreen",
140
+ "children"
141
+ ]);
142
+ const effectiveShowCancelButton = typeof showCancelButton === "boolean" ? showCancelButton : !!cancelText;
143
+ const [isModalOpen, setIsModalOpen] = (0, import_react.useState)(open);
144
+ const handleOnCancel = (_e) => {
145
+ if (onCancel) {
146
+ onCancel();
147
+ }
148
+ };
149
+ const handleOnConfirm = (_e) => {
150
+ if (onConfirm) {
151
+ onConfirm();
152
+ }
153
+ };
154
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
155
+ import_material.Box,
156
+ __spreadProps(__spreadValues({
157
+ component: fullscreen ? "div" : import_material.Paper
158
+ }, rest), {
159
+ className: `dash-modal ${className ? className + " " : ""}${fullscreen ? "fullscreen " : ""}dash-modal-${variant}`,
160
+ children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material.DialogTitle, { id: "alert-dialog-title", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { variant }) }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_material.DialogContent, { children: [
163
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "dash-modal-title", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { children: title }) }),
164
+ children || content
165
+ ] }),
166
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_material.DialogActions, { children: [
167
+ dialogActions || /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {}),
168
+ effectiveShowCancelButton ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
169
+ import_material.Button,
170
+ {
171
+ variant: "contained",
172
+ className: "btn-width-md",
173
+ color: "primary",
174
+ onClick: handleOnCancel,
175
+ children: cancelText
176
+ }
177
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {}),
178
+ showConfirmButton === true ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
179
+ import_material.Button,
180
+ {
181
+ variant: "contained",
182
+ className: "btn-width-md",
183
+ color: "primary",
184
+ onClick: handleOnConfirm,
185
+ autoFocus: true,
186
+ children: confirmText
187
+ }
188
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, {})
189
+ ] })
190
+ ]
191
+ })
192
+ );
193
+ };
194
+ var DashInfo_default = DashInfo;
@@ -0,0 +1,21 @@
1
+ import React$1, { PropsWithChildren, JSX } from 'react';
2
+
3
+ interface IAppDialogProps extends PropsWithChildren {
4
+ variant: 'default' | 'info' | 'success' | 'danger';
5
+ onConfirm?: () => void;
6
+ onCancel?: () => void;
7
+ closeText?: React.ReactNode;
8
+ confirmText?: React.ReactNode;
9
+ cancelText?: React.ReactNode;
10
+ showCancelButton?: boolean;
11
+ showConfirmButton?: boolean;
12
+ dialogActions?: JSX.Element;
13
+ title: string | JSX.Element;
14
+ content?: string | JSX.Element;
15
+ className?: string;
16
+ fullscreen?: boolean;
17
+ }
18
+
19
+ declare const DashInfo: React$1.FC<IAppDialogProps>;
20
+
21
+ export { DashInfo as default };
@@ -0,0 +1,21 @@
1
+ import React$1, { PropsWithChildren, JSX } from 'react';
2
+
3
+ interface IAppDialogProps extends PropsWithChildren {
4
+ variant: 'default' | 'info' | 'success' | 'danger';
5
+ onConfirm?: () => void;
6
+ onCancel?: () => void;
7
+ closeText?: React.ReactNode;
8
+ confirmText?: React.ReactNode;
9
+ cancelText?: React.ReactNode;
10
+ showCancelButton?: boolean;
11
+ showConfirmButton?: boolean;
12
+ dialogActions?: JSX.Element;
13
+ title: string | JSX.Element;
14
+ content?: string | JSX.Element;
15
+ className?: string;
16
+ fullscreen?: boolean;
17
+ }
18
+
19
+ declare const DashInfo: React$1.FC<IAppDialogProps>;
20
+
21
+ export { DashInfo as default };
package/dist/index.js CHANGED
@@ -1,96 +1,181 @@
1
- import { jsxs as l, jsx as a, Fragment as o } from "react/jsx-runtime";
2
- import { Box as B, Paper as T, DialogTitle as D, DialogContent as O, DialogActions as b, Button as h } from "@mui/material";
3
- import { useState as k } from "react";
4
- import y from "@mui/icons-material/Info";
5
- import j from "@mui/icons-material/CheckCircle";
6
- import A from "@mui/icons-material/Dangerous";
7
- import { useTranslate as F } from "react-admin";
8
- const M = (t) => {
9
- const { children: e, variant: n } = t;
10
- switch (n) {
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/DashInfo.tsx
34
+ import {
35
+ Box,
36
+ Button,
37
+ DialogActions,
38
+ DialogContent,
39
+ DialogTitle,
40
+ Paper
41
+ } from "@mui/material";
42
+ import { useState } from "react";
43
+
44
+ // ../../node_modules/@mui/icons-material/esm/utils/createSvgIcon.js
45
+ import { createSvgIcon } from "@mui/material/utils";
46
+
47
+ // ../../node_modules/@mui/icons-material/esm/Info.js
48
+ import { jsx as _jsx } from "react/jsx-runtime";
49
+ var Info_default = createSvgIcon(/* @__PURE__ */ _jsx("path", {
50
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"
51
+ }), "Info");
52
+
53
+ // ../../node_modules/@mui/icons-material/esm/CheckCircle.js
54
+ import { jsx as _jsx2 } from "react/jsx-runtime";
55
+ var CheckCircle_default = createSvgIcon(/* @__PURE__ */ _jsx2("path", {
56
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"
57
+ }), "CheckCircle");
58
+
59
+ // ../../node_modules/@mui/icons-material/esm/Dangerous.js
60
+ import { jsx as _jsx3 } from "react/jsx-runtime";
61
+ var Dangerous_default = createSvgIcon(/* @__PURE__ */ _jsx3("path", {
62
+ d: "M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27zM17 15.74 15.74 17 12 13.26 8.26 17 7 15.74 10.74 12 7 8.26 8.26 7 12 10.74 15.74 7 17 8.26 13.26 12z"
63
+ }), "Dangerous");
64
+
65
+ // src/DashInfo.tsx
66
+ import { useTranslate } from "react-admin";
67
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
68
+ var Icon = (props) => {
69
+ const { children, variant } = props;
70
+ switch (variant) {
11
71
  case "success":
12
- return /* @__PURE__ */ l(o, { children: [
13
- /* @__PURE__ */ a("div", { className: `dash-modal-img dash-modal-img-${n}`, children: /* @__PURE__ */ a(j, {}) }),
14
- e && /* @__PURE__ */ a("div", { className: "dash-modal-title", children: e })
72
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
73
+ /* @__PURE__ */ jsx("div", { className: `dash-modal-img dash-modal-img-${variant}`, children: /* @__PURE__ */ jsx(CheckCircle_default, {}) }),
74
+ children && /* @__PURE__ */ jsx("div", { className: "dash-modal-title", children })
15
75
  ] });
16
76
  case "danger":
17
- return /* @__PURE__ */ l(o, { children: [
18
- /* @__PURE__ */ a("div", { className: `dash-modal-img dash-modal-img-${n}`, children: /* @__PURE__ */ a(A, {}) }),
19
- e && /* @__PURE__ */ a("div", { className: "dash-modal-title", children: e })
77
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
78
+ /* @__PURE__ */ jsx("div", { className: `dash-modal-img dash-modal-img-${variant}`, children: /* @__PURE__ */ jsx(Dangerous_default, {}) }),
79
+ children && /* @__PURE__ */ jsx("div", { className: "dash-modal-title", children })
20
80
  ] });
21
81
  case "info":
22
82
  case "default":
23
- return /* @__PURE__ */ l(o, { children: [
24
- /* @__PURE__ */ a("div", { className: `dash-modal-img dash-modal-img-${n}`, children: /* @__PURE__ */ a(y, {}) }),
25
- e && /* @__PURE__ */ a("div", { className: "dash-modal-title", children: e })
83
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
84
+ /* @__PURE__ */ jsx("div", { className: `dash-modal-img dash-modal-img-${variant}`, children: /* @__PURE__ */ jsx(Info_default, {}) }),
85
+ children && /* @__PURE__ */ jsx("div", { className: "dash-modal-title", children })
26
86
  ] });
27
87
  default:
28
- return e ? /* @__PURE__ */ a("div", { className: "dash-modal-title", children: e }) : /* @__PURE__ */ a(o, {});
88
+ return children ? /* @__PURE__ */ jsx("div", { className: "dash-modal-title", children }) : /* @__PURE__ */ jsx(Fragment, {});
29
89
  }
30
- }, L = (t) => {
31
- const e = F(), {
32
- variant: n = "default",
33
- onCancel: i,
34
- onConfirm: s,
90
+ };
91
+ var DashInfo = (props) => {
92
+ const translate = useTranslate();
93
+ const _a = props, {
94
+ variant = "default",
95
+ onCancel,
96
+ onConfirm,
97
+ cancelText: cancelText = translate("dash.action.cancel"),
98
+ confirmText = translate("dash.action.continue"),
99
+ closeText = null,
100
+ title,
101
+ content = null,
102
+ className,
103
+ showCancelButton = false,
104
+ showConfirmButton = false,
105
+ dialogActions,
106
+ fullscreen = false,
107
+ children
108
+ } = _a, rest = __objRest(_a, [
109
+ "variant",
110
+ "onCancel",
111
+ "onConfirm",
35
112
  //onSubmit,
36
113
  //closeText = null,
37
- cancelText: c = e("dash.action.cancel"),
38
- confirmText: f = e("dash.action.continue"),
39
- closeText: S = null,
40
- title: u,
41
- content: p = null,
42
- className: d,
43
- showCancelButton: r = !1,
44
- showConfirmButton: v = !1,
45
- dialogActions: g,
46
- fullscreen: m = !1,
47
- children: C,
48
- ...N
49
- } = t, x = typeof r == "boolean" ? r : !!c, [_, E] = k(open), I = ($) => {
50
- i && i();
51
- }, w = ($) => {
52
- s && s();
114
+ "cancelText",
115
+ "confirmText",
116
+ "closeText",
117
+ "title",
118
+ "content",
119
+ "className",
120
+ "showCancelButton",
121
+ "showConfirmButton",
122
+ "dialogActions",
123
+ "fullscreen",
124
+ "children"
125
+ ]);
126
+ const effectiveShowCancelButton = typeof showCancelButton === "boolean" ? showCancelButton : !!cancelText;
127
+ const [isModalOpen, setIsModalOpen] = useState(open);
128
+ const handleOnCancel = (_e) => {
129
+ if (onCancel) {
130
+ onCancel();
131
+ }
132
+ };
133
+ const handleOnConfirm = (_e) => {
134
+ if (onConfirm) {
135
+ onConfirm();
136
+ }
53
137
  };
54
- return /* @__PURE__ */ l(
55
- B,
56
- {
57
- component: m ? "div" : T,
58
- ...N,
59
- className: `dash-modal ${d ? d + " " : ""}${m ? "fullscreen " : ""}dash-modal-${n}`,
138
+ return /* @__PURE__ */ jsxs(
139
+ Box,
140
+ __spreadProps(__spreadValues({
141
+ component: fullscreen ? "div" : Paper
142
+ }, rest), {
143
+ className: `dash-modal ${className ? className + " " : ""}${fullscreen ? "fullscreen " : ""}dash-modal-${variant}`,
60
144
  children: [
61
- /* @__PURE__ */ a(D, { id: "alert-dialog-title", children: /* @__PURE__ */ a(M, { variant: n }) }),
62
- /* @__PURE__ */ l(O, { children: [
63
- /* @__PURE__ */ a("div", { className: "dash-modal-title", children: /* @__PURE__ */ a("h3", { children: u }) }),
64
- C || p
145
+ /* @__PURE__ */ jsx(DialogTitle, { id: "alert-dialog-title", children: /* @__PURE__ */ jsx(Icon, { variant }) }),
146
+ /* @__PURE__ */ jsxs(DialogContent, { children: [
147
+ /* @__PURE__ */ jsx("div", { className: "dash-modal-title", children: /* @__PURE__ */ jsx("h3", { children: title }) }),
148
+ children || content
65
149
  ] }),
66
- /* @__PURE__ */ l(b, { children: [
67
- g || /* @__PURE__ */ a(o, {}),
68
- x ? /* @__PURE__ */ a(
69
- h,
150
+ /* @__PURE__ */ jsxs(DialogActions, { children: [
151
+ dialogActions || /* @__PURE__ */ jsx(Fragment, {}),
152
+ effectiveShowCancelButton ? /* @__PURE__ */ jsx(
153
+ Button,
70
154
  {
71
155
  variant: "contained",
72
156
  className: "btn-width-md",
73
157
  color: "primary",
74
- onClick: I,
75
- children: c
158
+ onClick: handleOnCancel,
159
+ children: cancelText
76
160
  }
77
- ) : /* @__PURE__ */ a(o, {}),
78
- v === !0 ? /* @__PURE__ */ a(
79
- h,
161
+ ) : /* @__PURE__ */ jsx(Fragment, {}),
162
+ showConfirmButton === true ? /* @__PURE__ */ jsx(
163
+ Button,
80
164
  {
81
165
  variant: "contained",
82
166
  className: "btn-width-md",
83
167
  color: "primary",
84
- onClick: w,
85
- autoFocus: !0,
86
- children: f
168
+ onClick: handleOnConfirm,
169
+ autoFocus: true,
170
+ children: confirmText
87
171
  }
88
- ) : /* @__PURE__ */ a(o, {})
172
+ ) : /* @__PURE__ */ jsx(Fragment, {})
89
173
  ] })
90
174
  ]
91
- }
175
+ })
92
176
  );
93
177
  };
178
+ var DashInfo_default = DashInfo;
94
179
  export {
95
- L as default
180
+ DashInfo_default as default
96
181
  };
package/package.json CHANGED
@@ -1,123 +1,122 @@
1
1
  {
2
- "name": "@dashadmin/dash-info",
3
- "version": "1.3.25",
4
- "private": false,
5
- "main": "dist/index.js",
6
- "type": "module",
7
- "browserslist": {
8
- "production": [
9
- ">0.2%",
10
- "not dead",
11
- "not op_mini all"
12
- ],
13
- "development": [
14
- "last 1 chrome version",
15
- "last 1 firefox version",
16
- "last 1 safari version"
17
- ]
18
- },
19
- "dependencies": {
20
- "@emotion/react": "latest",
21
- "@emotion/styled": "latest",
22
- "@mui/material": "^7.3.10",
23
- "@rollup/plugin-alias": "latest",
24
- "@rollup/plugin-commonjs": "latest",
25
- "@rollup/plugin-node-resolve": "latest",
26
- "@rollup/plugin-replace": "latest",
27
- "@rollup/plugin-typescript": "latest",
28
- "query-string": "latest",
29
- "react-admin": "5.14.7",
30
- "react-custom-scrollbars-2": "latest",
31
- "react-draggable": "latest",
32
- "@achmadk/react-loading-overlay": "latest",
33
- "react-query": "latest",
34
- "react-redux": "latest",
35
- "react-router": "7.17.0",
36
- "react-router-dom": "7.17.0",
37
- "react-spinners": "latest",
38
- "react-toastify": "latest",
39
- "rollup-plugin-cleaner": "latest",
40
- "rollup-plugin-dts": "latest",
41
- "rollup-plugin-peer-deps-external": "latest",
42
- "rollup-plugin-svg": "latest"
43
- },
44
- "devDependencies": {
45
- "@babel/core": "latest",
46
- "@babel/preset-env": "latest",
47
- "@babel/preset-react": "latest",
48
- "@babel/preset-typescript": "latest",
49
- "@commitlint/config-conventional": "latest",
50
- "@types/node": "latest",
51
- "@types/react": "latest",
52
- "@types/react-dom": "latest",
53
- "@zerollup/ts-transform-paths": "latest",
54
- "babel-loader": "latest",
55
- "eslint": "latest",
56
- "eslint-config-airbnb": "latest",
57
- "eslint-config-airbnb-typescript": "latest",
58
- "eslint-config-prettier": "latest",
59
- "eslint-import-resolver-typescript": "latest",
60
- "eslint-plugin-html": "latest",
61
- "eslint-plugin-import": "latest",
62
- "eslint-plugin-jsdoc": "latest",
63
- "eslint-plugin-json": "latest",
64
- "eslint-plugin-jsx-a11y": "latest",
65
- "eslint-plugin-prettier": "latest",
66
- "eslint-plugin-react": "latest",
67
- "eslint-plugin-react-hooks": "latest",
68
- "query-string": "latest",
69
- "react-dom": "latest",
70
- "rollup": "latest",
71
- "rollup-plugin-copy-assets": "latest",
72
- "rollup-plugin-external-globals": "latest",
73
- "rollup-plugin-includepaths": "latest",
74
- "rollup-plugin-less": "latest",
75
- "@rollup/plugin-node-resolve": "latest",
76
- "rollup-plugin-postcss": "latest",
77
- "rollup-plugin-sourcemaps": "latest",
78
- "rollup-plugin-typescript2": "latest",
79
- "tsc-alias": "latest",
80
- "ttypescript": "latest",
81
- "typescript": "latest",
82
- "vite": "^5.2.0",
83
- "@dashadmin/dash-eslint": "1.3.25",
84
- "@dashadmin/dash-prettier": "1.3.25",
85
- "@dashadmin/dash-tsconfig": "1.3.25"
86
- },
87
- "peerDependencies": {
88
- "react": "latest",
89
- "@hello-pangea/dnd": "latest",
90
- "react-custom-scrollbars-2": "latest",
91
- "react-dom": "latest"
92
- },
93
- "eslintConfig": {
94
- "extends": "react-app"
95
- },
96
- "_todo_storybook": {
97
- "eslint-plugin-storybook": "latest"
98
- },
99
- "publishConfig": {
100
- "name": "@dashadmin/dash-info",
101
- "access": "public"
102
- },
103
- "files": [
104
- "dist"
105
- ],
106
- "exports": {
107
- ".": {
108
- "import": "./dist/index.js"
109
- },
110
- "./src/*": {
111
- "import": "./dist/*.js"
112
- }
113
- },
114
- "scripts": {
115
- "lint": "eslint --ext .ts,.tsx .",
116
- "format": "pnpm prettier --write . && pnpm format-check && pnpm lint",
117
- "lint:check": "pnpm prettier --check .",
118
- "lint:fix": "pnpm prettier --write .",
119
- "check-updates": "pnpm npm-check-updates",
120
- "updates-packages": "pnpm npm-check-updates -u",
121
- "build": "rm -rf dist && node ../dash-build/compile.mjs && vite build"
122
- }
123
- }
2
+ "name": "@dashadmin/dash-info",
3
+ "version": "1.3.28",
4
+ "main": "dist/index.cjs",
5
+ "type": "module",
6
+ "scripts": {
7
+ "lint": "eslint --ext .ts,.tsx .",
8
+ "format": "pnpm prettier --write . && pnpm format-check && pnpm lint",
9
+ "lint:check": "pnpm prettier --check .",
10
+ "lint:fix": "pnpm prettier --write .",
11
+ "check-updates": "pnpm npm-check-updates",
12
+ "updates-packages": "pnpm npm-check-updates -u",
13
+ "build": "tsup"
14
+ },
15
+ "browserslist": {
16
+ "production": [
17
+ ">0.2%",
18
+ "not dead",
19
+ "not op_mini all"
20
+ ],
21
+ "development": [
22
+ "last 1 chrome version",
23
+ "last 1 firefox version",
24
+ "last 1 safari version"
25
+ ]
26
+ },
27
+ "dependencies": {
28
+ "@emotion/react": "latest",
29
+ "@emotion/styled": "latest",
30
+ "@mui/material": "^7.3.10",
31
+ "@rollup/plugin-alias": "latest",
32
+ "@rollup/plugin-commonjs": "latest",
33
+ "@rollup/plugin-node-resolve": "latest",
34
+ "@rollup/plugin-replace": "latest",
35
+ "@rollup/plugin-typescript": "latest",
36
+ "query-string": "latest",
37
+ "react-admin": "5.14.6",
38
+ "react-custom-scrollbars-2": "latest",
39
+ "react-draggable": "latest",
40
+ "react-loading-overlay-ts": "latest",
41
+ "react-query": "latest",
42
+ "react-redux": "latest",
43
+ "react-router": "^7.9.6",
44
+ "react-router-dom": "^7.9.6",
45
+ "react-spinners": "latest",
46
+ "react-toastify": "latest",
47
+ "rollup-plugin-cleaner": "latest",
48
+ "rollup-plugin-dts": "latest",
49
+ "rollup-plugin-peer-deps-external": "latest",
50
+ "rollup-plugin-svg": "latest"
51
+ },
52
+ "devDependencies": {
53
+ "@babel/core": "latest",
54
+ "@babel/preset-env": "latest",
55
+ "@babel/preset-react": "latest",
56
+ "@babel/preset-typescript": "latest",
57
+ "@commitlint/config-conventional": "latest",
58
+ "@types/node": "latest",
59
+ "@types/react": "latest",
60
+ "@types/react-dom": "latest",
61
+ "@zerollup/ts-transform-paths": "latest",
62
+ "babel-loader": "latest",
63
+ "eslint": "latest",
64
+ "eslint-config-airbnb": "latest",
65
+ "eslint-config-airbnb-typescript": "latest",
66
+ "eslint-config-prettier": "latest",
67
+ "@dashadmin/dash-eslint": "workspace:*",
68
+ "eslint-import-resolver-typescript": "latest",
69
+ "eslint-plugin-html": "latest",
70
+ "eslint-plugin-import": "latest",
71
+ "eslint-plugin-jsdoc": "latest",
72
+ "eslint-plugin-json": "latest",
73
+ "eslint-plugin-jsx-a11y": "latest",
74
+ "eslint-plugin-prettier": "latest",
75
+ "eslint-plugin-react": "latest",
76
+ "eslint-plugin-react-hooks": "latest",
77
+ "@dashadmin/dash-prettier": "workspace:*",
78
+ "query-string": "latest",
79
+ "react-dom": "latest",
80
+ "rollup": "latest",
81
+ "rollup-plugin-copy-assets": "latest",
82
+ "rollup-plugin-external-globals": "latest",
83
+ "rollup-plugin-includepaths": "latest",
84
+ "rollup-plugin-less": "latest",
85
+ "rollup-plugin-node-resolve": "latest",
86
+ "rollup-plugin-postcss": "latest",
87
+ "rollup-plugin-sourcemaps": "latest",
88
+ "rollup-plugin-typescript2": "latest",
89
+ "@dashadmin/dash-tsconfig": "workspace:*",
90
+ "tsc": "latest",
91
+ "tsc-alias": "latest",
92
+ "ttypescript": "latest",
93
+ "typescript": "latest"
94
+ },
95
+ "peerDependencies": {
96
+ "react": "latest",
97
+ "react-custom-scrollbars-2": "^4.5.0",
98
+ "react-dom": "latest"
99
+ },
100
+ "eslintConfig": {
101
+ "extends": "react-app"
102
+ },
103
+ "_todo_storybook": {
104
+ "eslint-plugin-storybook": "latest"
105
+ },
106
+ "module": "dist/index.js",
107
+ "types": "dist/index.d.ts",
108
+ "exports": {
109
+ ".": {
110
+ "types": "./dist/index.d.ts",
111
+ "import": "./dist/index.js",
112
+ "require": "./dist/index.cjs"
113
+ }
114
+ },
115
+ "publishConfig": {
116
+ "access": "public",
117
+ "registry": "https://registry.npmjs.org"
118
+ },
119
+ "files": [
120
+ "dist"
121
+ ]
122
+ }
package/dist/DashInfo.js DELETED
@@ -1 +0,0 @@
1
- import{Fragment as e,jsx as a,jsxs as n}from"react/jsx-runtime";import{Box as T,Button as f,DialogActions as w,DialogContent as $,DialogTitle as y,Paper as P}from"@mui/material";import{useState as b}from"react";import E from"@mui/icons-material/Info";import M from"@mui/icons-material/CheckCircle";import O from"@mui/icons-material/Dangerous";import{useTranslate as R}from"react-admin";import"./styles/info.less";const k=i=>{const{children:o,variant:t}=i;switch(t){case"success":return n(e,{children:[a("div",{className:`dash-modal-img dash-modal-img-${t}`,children:a(M,{})}),o&&a("div",{className:"dash-modal-title",children:o})]});case"danger":return n(e,{children:[a("div",{className:`dash-modal-img dash-modal-img-${t}`,children:a(O,{})}),o&&a("div",{className:"dash-modal-title",children:o})]});case"info":case"default":return n(e,{children:[a("div",{className:`dash-modal-img dash-modal-img-${t}`,children:a(E,{})}),o&&a("div",{className:"dash-modal-title",children:o})]});default:return o?a("div",{className:"dash-modal-title",children:o}):a(e,{})}},A=i=>{const o=R(),{variant:t="default",onCancel:s,onConfirm:l,cancelText:c=o("dash.action.cancel"),confirmText:h=o("dash.action.continue"),closeText:F=null,title:u,content:v=null,className:d,showCancelButton:r=!1,showConfirmButton:p=!1,dialogActions:C,fullscreen:m=!1,children:g,...I}=i,N=typeof r=="boolean"?r:!!c,[H,S]=b(open),x=D=>{s&&s()},B=D=>{l&&l()};return n(T,{component:m?"div":P,...I,className:`dash-modal ${d?d+" ":""}${m?"fullscreen ":""}dash-modal-${t}`,children:[a(y,{id:"alert-dialog-title",children:a(k,{variant:t})}),n($,{children:[a("div",{className:"dash-modal-title",children:a("h3",{children:u})}),g||v]}),n(w,{children:[C||a(e,{}),N?a(f,{variant:"contained",className:"btn-width-md",color:"primary",onClick:x,children:c}):a(e,{}),p===!0?a(f,{variant:"contained",className:"btn-width-md",color:"primary",onClick:B,autoFocus:!0,children:h}):a(e,{})]})]})};var Y=A;export{Y as default};
File without changes
@@ -1 +0,0 @@
1
- .dash-modal{font-family:Montserrat}.dash-modal-default{background:var(--module-bg);box-shadow:var(--component-shadow)}.dash-modal-default.MuiPaper-root{background:var(--module-bg)}.dash-modal-default>.MuiTypography-root.MuiDialogTitle-root{font-family:Montserrat;font-style:normal;font-weight:700;font-size:16px;line-height:24px;color:var(--heading-color);padding:16px 24px}.dash-modal-default>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img{display:flex;align-items:center;margin-right:8px}.dash-modal-default>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg{font-size:20px}.dash-modal-default>.MuiDialogContent-root{padding:24px;border:1px solid var(--component-border-split);border-left:unset;border-right:unset;font-family:Montserrat;font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:var(--text-color)}.dash-modal-default>.MuiDialogActions-root{padding:10px 16px}.dash-modal-default.fullscreen{background:none;box-shadow:none}.dash-modal-default.fullscreen.MuiPaper-root{background:none}.dash-modal-default.fullscreen>.MuiDialogContent-root{border:none}.dash-modal-info,.dash-modal-success,.dash-modal-danger{padding-top:39px!important;background:transparent!important;box-shadow:unset!important;overflow:visible!important}.dash-modal-info.MuiPaper-root,.dash-modal-success.MuiPaper-root,.dash-modal-danger.MuiPaper-root{background:transparent!important;box-shadow:none!important;overflow:visible!important}.dash-modal-info>.MuiTypography-root.MuiDialogTitle-root,.dash-modal-success>.MuiTypography-root.MuiDialogTitle-root,.dash-modal-danger>.MuiTypography-root.MuiDialogTitle-root{border-radius:8px;padding:0 0 30px;overflow:visible}.dash-modal-info>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img,.dash-modal-success>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img,.dash-modal-danger>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img{position:relative;width:140px;height:120px;margin:-40px auto 0;display:flex;justify-content:center;align-items:center}.dash-modal-info>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg,.dash-modal-success>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg,.dash-modal-danger>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg{width:100%;height:100%;object-fit:contain}.dash-modal-info>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg *,.dash-modal-success>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg *,.dash-modal-danger>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg *{pointer-events:none}.dash-modal-info>.MuiDialogContent-root,.dash-modal-success>.MuiDialogContent-root,.dash-modal-danger>.MuiDialogContent-root{margin-top:-20px;padding:42px 32px 0;border:unset;background:var(--component-bg);border-top-left-radius:8px;border-top-right-radius:8px;position:relative;z-index:1;font-family:Montserrat;font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;color:var(--text-color)}.dash-modal-info>.MuiDialogContent-root .dash-modal-title,.dash-modal-success>.MuiDialogContent-root .dash-modal-title,.dash-modal-danger>.MuiDialogContent-root .dash-modal-title{margin-bottom:16px}.dash-modal-info>.MuiDialogContent-root .dash-modal-title h3,.dash-modal-success>.MuiDialogContent-root .dash-modal-title h3,.dash-modal-danger>.MuiDialogContent-root .dash-modal-title h3{font-family:Montserrat;font-style:normal;font-weight:700;font-size:20px;line-height:24px;text-align:center;color:var(--heading-color);margin:0}.dash-modal-info>.MuiDialogActions-root,.dash-modal-success>.MuiDialogActions-root,.dash-modal-danger>.MuiDialogActions-root{padding:16px;background:var(--component-bg);border-bottom-left-radius:8px;border-bottom-right-radius:8px;justify-content:center}.dash-modal-info.fullscreen.MuiPaper-root,.dash-modal-success.fullscreen.MuiPaper-root,.dash-modal-danger.fullscreen.MuiPaper-root{background:none!important}.dash-modal-info.fullscreen>.MuiTypography-root.MuiDialogTitle-root,.dash-modal-success.fullscreen>.MuiTypography-root.MuiDialogTitle-root,.dash-modal-danger.fullscreen>.MuiTypography-root.MuiDialogTitle-root{background:none!important}.dash-modal-info.fullscreen>.MuiDialogContent-root,.dash-modal-success.fullscreen>.MuiDialogContent-root,.dash-modal-danger.fullscreen>.MuiDialogContent-root{background:none;border:none}.dash-modal-info.fullscreen>.MuiDialogActions-root,.dash-modal-success.fullscreen>.MuiDialogActions-root,.dash-modal-danger.fullscreen>.MuiDialogActions-root{background:none}.dash-modal-info>.MuiTypography-root.MuiDialogTitle-root{background:linear-gradient(93.81deg,var(--primary-color) 2.98%,var(--primary-contrast) 102.49%)}.dash-modal-info>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg{fill:var(--alert-info-bg)}.dash-modal-success>.MuiTypography-root.MuiDialogTitle-root{background:var(--btn-success-bg)}.dash-modal-success>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg{fill:var(--alert-success-bg)}.dash-modal-danger>.MuiTypography-root.MuiDialogTitle-root{background:var(--btn-danger-bg)}.dash-modal-danger>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg{fill:var(--alert-error-bg)}.dash-modal-danger>.MuiTypography-root.MuiDialogTitle-root .dash-modal-img svg path{fill:var(--alert-error-bg)}
@@ -1,194 +0,0 @@
1
-
2
-
3
- .dash-modal {
4
- // Shared defaults if needed
5
- font-family: 'Montserrat';
6
-
7
- &-default {
8
- background: var(--module-bg);
9
- box-shadow: var(--component-shadow);
10
-
11
- &.MuiPaper-root {
12
- background: var(--module-bg);
13
- }
14
-
15
- > .MuiTypography-root.MuiDialogTitle-root {
16
- font-family: 'Montserrat';
17
- font-style: normal;
18
- font-weight: 700;
19
- font-size: 16px;
20
- line-height: 24px;
21
- color: var(--heading-color);
22
- padding: 16px 24px;
23
-
24
- .dash-modal-img {
25
- display: flex;
26
- align-items: center;
27
- margin-right: 8px;
28
- svg {
29
- font-size: 20px;
30
- }
31
- }
32
- }
33
-
34
- > .MuiDialogContent-root {
35
- padding: 24px;
36
- border: 1px solid var(--component-border-split);
37
- border-left: unset;
38
- border-right: unset;
39
-
40
- font-family: 'Montserrat';
41
- font-style: normal;
42
- font-weight: 400;
43
- font-size: 14px;
44
- line-height: 22px;
45
- color: var(--text-color);
46
- }
47
-
48
- > .MuiDialogActions-root {
49
- padding: 10px 16px;
50
- }
51
-
52
- // Fullscreen Override
53
- &.fullscreen {
54
- background: none;
55
- box-shadow: none;
56
-
57
- &.MuiPaper-root {
58
- background: none;
59
- }
60
-
61
- > .MuiDialogContent-root {
62
- border: none;
63
- }
64
- }
65
- }
66
-
67
- &-info, &-success, &-danger {
68
- padding-top: 39px !important;
69
- background: transparent !important;
70
- box-shadow: unset !important;
71
- overflow: visible !important;
72
-
73
- &.MuiPaper-root {
74
- background: transparent !important;
75
- box-shadow: none !important;
76
- overflow: visible !important;
77
- }
78
-
79
- > .MuiTypography-root.MuiDialogTitle-root {
80
- //height: 115px;
81
- border-radius: 8px;
82
- padding: 0 0 30px;
83
- overflow: visible;
84
-
85
- .dash-modal-img {
86
- position: relative;
87
- width: 140px;
88
- height: 120px;
89
- margin: -40px auto 0;
90
- display: flex;
91
- justify-content: center;
92
- align-items: center;
93
-
94
- svg {
95
- width: 100%;
96
- height: 100%;
97
- object-fit: contain;
98
- * {
99
- pointer-events: none;
100
- }
101
- }
102
- }
103
- }
104
-
105
- > .MuiDialogContent-root {
106
- margin-top: -20px;
107
- padding: 42px 32px 0; // Increased top padding to push content down from title area
108
- border: unset;
109
- background: var(--component-bg);
110
- border-top-left-radius: 8px;
111
- border-top-right-radius: 8px;
112
- position: relative;
113
- z-index: 1;
114
-
115
- .dash-modal-title {
116
- margin-bottom: 16px;
117
- h3 {
118
- font-family: 'Montserrat';
119
- font-style: normal;
120
- font-weight: 700;
121
- font-size: 20px;
122
- line-height: 24px;
123
- text-align: center;
124
- color: var(--heading-color);
125
- margin: 0;
126
- }
127
- }
128
-
129
- font-family: 'Montserrat';
130
- font-style: normal;
131
- font-weight: 400;
132
- font-size: 16px;
133
- line-height: 24px;
134
- text-align: center;
135
- color: var(--text-color);
136
- }
137
-
138
- > .MuiDialogActions-root {
139
- padding: 16px;
140
- background: var(--component-bg);
141
- border-bottom-left-radius: 8px;
142
- border-bottom-right-radius: 8px;
143
- justify-content: center;
144
- }
145
-
146
- // Shared Fullscreen Overrides
147
- &.fullscreen {
148
- &.MuiPaper-root {
149
- background: none !important;
150
- }
151
- > .MuiTypography-root.MuiDialogTitle-root {
152
- background: none !important; // Override the gradient/color set in specific variants
153
- }
154
- > .MuiDialogContent-root {
155
- background: none;
156
- border: none;
157
- }
158
- > .MuiDialogActions-root {
159
- background: none;
160
- }
161
- }
162
- }
163
-
164
- &-info {
165
- > .MuiTypography-root.MuiDialogTitle-root {
166
- background: linear-gradient(93.81deg, var(--primary-color) 2.98%, var(--primary-contrast) 102.49%);
167
- .dash-modal-img svg {
168
- fill: var(--alert-info-bg);
169
- }
170
- }
171
- }
172
-
173
- &-success {
174
- > .MuiTypography-root.MuiDialogTitle-root {
175
- background: var(--btn-success-bg);
176
- .dash-modal-img svg {
177
- fill: var(--alert-success-bg);
178
- }
179
- }
180
- }
181
-
182
- &-danger {
183
- > .MuiTypography-root.MuiDialogTitle-root {
184
- background: var(--btn-danger-bg);
185
- .dash-modal-img svg {
186
- fill: var(--alert-error-bg); // or var(--highlight-color) if needed
187
- path {
188
- fill: var(--alert-error-bg);
189
- }
190
- }
191
- }
192
- }
193
- }
194
-