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