@yuno-payments/dashboard-design-system 2.2.1 → 2.3.2
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/dist/components/atoms/icon/icon-list.d.ts +0 -5
- package/dist/components/atoms/icon/icon-list.js +196 -206
- package/dist/components/organisms/dialog/dialog.d.ts +0 -5
- package/dist/components/organisms/dialog/dialog.js +80 -90
- package/dist/dashboard-design-system.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.min.js +5878 -6046
- package/dist/index.umd.min.js +14 -14
- package/package.json +3 -3
- package/registry/components-registry.json +2 -2
- package/dist/node_modules/@phosphor-icons/react/dist/csr/ArrowSquareOut.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Lifebuoy.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/NotePencil.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/SquareHalf.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/SquareHalfBottom.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/defs/ArrowSquareOut.es.js +0 -36
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Lifebuoy.es.js +0 -36
- package/dist/node_modules/@phosphor-icons/react/dist/defs/NotePencil.es.js +0 -30
- package/dist/node_modules/@phosphor-icons/react/dist/defs/SquareHalf.es.js +0 -36
- package/dist/node_modules/@phosphor-icons/react/dist/defs/SquareHalfBottom.es.js +0 -30
|
@@ -69,11 +69,6 @@ export interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
69
69
|
* Additional CSS classes for the footer
|
|
70
70
|
*/
|
|
71
71
|
footerClassName?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Optional z-index override. When provided, replaces the default z-dialog value.
|
|
74
|
-
* Useful for rendering inside high z-index containers like inspector panels.
|
|
75
|
-
*/
|
|
76
|
-
zIndex?: number;
|
|
77
72
|
}
|
|
78
73
|
/**
|
|
79
74
|
* Modal dialog component with header, content, and footer sections.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import * as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { useBodyScrollLock as
|
|
7
|
-
import { useEscapeKey as
|
|
8
|
-
import { DialogHeader as
|
|
9
|
-
import { DialogContent as
|
|
10
|
-
import { DialogFooter as
|
|
11
|
-
const
|
|
12
|
-
"fixed inset-0 flex items-center justify-center p-4",
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { createPortal as M } from "react-dom";
|
|
4
|
+
import { cva as x } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { cn as m, normalizeDimension as g } from "../../../lib/utils.js";
|
|
6
|
+
import { useBodyScrollLock as B } from "../../../hooks/use-body-scroll-lock.js";
|
|
7
|
+
import { useEscapeKey as C } from "../../../hooks/use-escape-key.js";
|
|
8
|
+
import { DialogHeader as F } from "../../molecules/dialog-header/dialog-header.js";
|
|
9
|
+
import { DialogContent as I } from "../../molecules/dialog-content/dialog-content.js";
|
|
10
|
+
import { DialogFooter as R } from "../../molecules/dialog-footer/dialog-footer.js";
|
|
11
|
+
const H = x(
|
|
12
|
+
"fixed inset-0 z-dialog flex items-center justify-center p-4",
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
verticalAlign: {
|
|
@@ -22,7 +22,7 @@ const P = p(
|
|
|
22
22
|
verticalAlign: "center"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
),
|
|
25
|
+
), K = x(
|
|
26
26
|
"relative bg-background rounded-lg shadow-lg border border-border max-h-[90vh] overflow-hidden flex flex-col",
|
|
27
27
|
{
|
|
28
28
|
variants: {
|
|
@@ -38,104 +38,94 @@ const P = p(
|
|
|
38
38
|
size: "default"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
),
|
|
41
|
+
), O = a.forwardRef(
|
|
42
42
|
({
|
|
43
|
-
className:
|
|
44
|
-
verticalAlign:
|
|
45
|
-
title:
|
|
46
|
-
open:
|
|
43
|
+
className: w,
|
|
44
|
+
verticalAlign: p,
|
|
45
|
+
title: v,
|
|
46
|
+
open: i,
|
|
47
47
|
closeIcon: o,
|
|
48
|
-
buttons:
|
|
49
|
-
widthContainer:
|
|
50
|
-
heightContainer:
|
|
51
|
-
backButtonAction:
|
|
52
|
-
showActions:
|
|
53
|
-
otherActions:
|
|
54
|
-
withHeader:
|
|
55
|
-
children:
|
|
56
|
-
headerClassName:
|
|
57
|
-
contentClassName:
|
|
58
|
-
footerClassName:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (i.useEffect(() => {
|
|
48
|
+
buttons: y = [],
|
|
49
|
+
widthContainer: r,
|
|
50
|
+
heightContainer: d,
|
|
51
|
+
backButtonAction: b,
|
|
52
|
+
showActions: h = !0,
|
|
53
|
+
otherActions: j,
|
|
54
|
+
withHeader: z = !0,
|
|
55
|
+
children: N,
|
|
56
|
+
headerClassName: k,
|
|
57
|
+
contentClassName: D,
|
|
58
|
+
footerClassName: E,
|
|
59
|
+
...T
|
|
60
|
+
}, V) => {
|
|
61
|
+
const [s, S] = a.useState(!1), [l, c] = a.useState(i), [u, f] = a.useState(!1);
|
|
62
|
+
if (a.useEffect(() => {
|
|
64
63
|
const t = () => {
|
|
65
|
-
|
|
64
|
+
S(window.innerWidth <= 599);
|
|
66
65
|
};
|
|
67
66
|
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
68
|
-
}, []),
|
|
69
|
-
let t,
|
|
70
|
-
return
|
|
71
|
-
|
|
67
|
+
}, []), a.useEffect(() => {
|
|
68
|
+
let t, n;
|
|
69
|
+
return i ? (c(!0), t = setTimeout(() => f(!0), 10)) : l && (f(!1), n = setTimeout(() => {
|
|
70
|
+
c(!1);
|
|
72
71
|
}, 600)), () => {
|
|
73
|
-
t && clearTimeout(t),
|
|
72
|
+
t && clearTimeout(t), n && clearTimeout(n);
|
|
74
73
|
};
|
|
75
|
-
}, [
|
|
76
|
-
const
|
|
77
|
-
width:
|
|
78
|
-
height:
|
|
79
|
-
},
|
|
74
|
+
}, [i, l]), B(i), C(i, o), !l) return null;
|
|
75
|
+
const A = {
|
|
76
|
+
width: r && !s ? g(r) : void 0,
|
|
77
|
+
height: d && !s ? g(d) : void 0
|
|
78
|
+
}, L = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
80
79
|
/* @__PURE__ */ e.jsx(
|
|
81
80
|
"div",
|
|
82
81
|
{
|
|
83
|
-
className:
|
|
84
|
-
"fixed inset-0 bg-black/25 transition-opacity duration-600 ease-out",
|
|
85
|
-
|
|
86
|
-
f ? "opacity-100" : "opacity-0"
|
|
82
|
+
className: m(
|
|
83
|
+
"fixed inset-0 z-dialog bg-black/25 transition-opacity duration-600 ease-out",
|
|
84
|
+
u ? "opacity-100" : "opacity-0"
|
|
87
85
|
),
|
|
88
|
-
style: x,
|
|
89
86
|
onClick: o,
|
|
90
87
|
"aria-hidden": "true"
|
|
91
88
|
}
|
|
92
89
|
),
|
|
93
|
-
/* @__PURE__ */ e.jsx(
|
|
90
|
+
/* @__PURE__ */ e.jsx("div", { className: m(H({ verticalAlign: p })), children: /* @__PURE__ */ e.jsxs(
|
|
94
91
|
"div",
|
|
95
92
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
),
|
|
127
|
-
/* @__PURE__ */ e.jsx(K, { className: T, children: E }),
|
|
128
|
-
N && /* @__PURE__ */ e.jsx(O, { buttons: j, className: V })
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
)
|
|
93
|
+
ref: V,
|
|
94
|
+
className: m(
|
|
95
|
+
"yuno-dialog",
|
|
96
|
+
K({
|
|
97
|
+
size: s ? "fullscreen" : "default"
|
|
98
|
+
}),
|
|
99
|
+
"transition-all duration-600 ease-out",
|
|
100
|
+
u ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-98 -translate-y-2",
|
|
101
|
+
r && !s && "max-w-none",
|
|
102
|
+
w
|
|
103
|
+
),
|
|
104
|
+
style: A,
|
|
105
|
+
role: "dialog",
|
|
106
|
+
"aria-modal": "true",
|
|
107
|
+
...T,
|
|
108
|
+
children: [
|
|
109
|
+
z && /* @__PURE__ */ e.jsx(
|
|
110
|
+
F,
|
|
111
|
+
{
|
|
112
|
+
title: v,
|
|
113
|
+
onClose: o,
|
|
114
|
+
onBack: b,
|
|
115
|
+
otherActions: j,
|
|
116
|
+
className: k
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ e.jsx(I, { className: D, children: N }),
|
|
120
|
+
h && /* @__PURE__ */ e.jsx(R, { buttons: y, className: E })
|
|
121
|
+
]
|
|
132
122
|
}
|
|
133
|
-
)
|
|
123
|
+
) })
|
|
134
124
|
] });
|
|
135
|
-
return
|
|
125
|
+
return M(L, document.body);
|
|
136
126
|
}
|
|
137
127
|
);
|
|
138
|
-
|
|
128
|
+
O.displayName = "Dialog";
|
|
139
129
|
export {
|
|
140
|
-
|
|
130
|
+
O as Dialog
|
|
141
131
|
};
|