@dashadmin/dash-info 1.0.0

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 ADDED
File without changes
package/dash-info.css ADDED
@@ -0,0 +1 @@
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)}
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ // Auto-generated permissive types for @dashadmin/dash-info.
2
+ // Full typings can be regenerated with a tolerant tsc emit.
3
+ export {};
package/index.js ADDED
@@ -0,0 +1,96 @@
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) {
11
+ 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 })
15
+ ] });
16
+ 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 })
20
+ ] });
21
+ case "info":
22
+ 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 })
26
+ ] });
27
+ default:
28
+ return e ? /* @__PURE__ */ a("div", { className: "dash-modal-title", children: e }) : /* @__PURE__ */ a(o, {});
29
+ }
30
+ }, L = (t) => {
31
+ const e = F(), {
32
+ variant: n = "default",
33
+ onCancel: i,
34
+ onConfirm: s,
35
+ //onSubmit,
36
+ //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();
53
+ };
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}`,
60
+ 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
65
+ ] }),
66
+ /* @__PURE__ */ l(b, { children: [
67
+ g || /* @__PURE__ */ a(o, {}),
68
+ x ? /* @__PURE__ */ a(
69
+ h,
70
+ {
71
+ variant: "contained",
72
+ className: "btn-width-md",
73
+ color: "primary",
74
+ onClick: I,
75
+ children: c
76
+ }
77
+ ) : /* @__PURE__ */ a(o, {}),
78
+ v === !0 ? /* @__PURE__ */ a(
79
+ h,
80
+ {
81
+ variant: "contained",
82
+ className: "btn-width-md",
83
+ color: "primary",
84
+ onClick: w,
85
+ autoFocus: !0,
86
+ children: f
87
+ }
88
+ ) : /* @__PURE__ */ a(o, {})
89
+ ] })
90
+ ]
91
+ }
92
+ );
93
+ };
94
+ export {
95
+ L as default
96
+ };
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@dashadmin/dash-info",
3
+ "version": "1.0.0",
4
+ "description": "dash-info — DASH framework package",
5
+ "license": "MIT",
6
+ "author": "Francisco Aranda <farandal@gmail.com>",
7
+ "type": "module",
8
+ "main": "index.js",
9
+ "module": "index.js",
10
+ "types": "index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "**/*"
19
+ ],
20
+ "sideEffects": false,
21
+ "dependencies": {
22
+ "@emotion/react": "latest",
23
+ "@emotion/styled": "latest",
24
+ "@mui/material": "^7.3.10",
25
+ "query-string": "latest",
26
+ "react-admin": "5.14.6",
27
+ "react-custom-scrollbars-2": "latest",
28
+ "react-draggable": "latest",
29
+ "react-loading-overlay-ts": "latest",
30
+ "react-query": "latest",
31
+ "react-redux": "latest",
32
+ "react-router": "^7.9.6",
33
+ "react-router-dom": "^7.9.6",
34
+ "react-spinners": "latest",
35
+ "react-toastify": "latest"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "latest",
39
+ "react-beautiful-dnd": "latest",
40
+ "react-custom-scrollbars-2": "latest",
41
+ "react-dom": "latest"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "engines": {
47
+ "node": ">=18"
48
+ }
49
+ }