@yuno-payments/dashboard-design-system 2.1.1 → 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 +88 -78
- package/dist/components/organisms/sheet/sheet.js +23 -23
- package/dist/dashboard-design-system.css +1 -12
- package/dist/index.css +1 -12
- package/dist/index.esm.min.js +7251 -7071
- package/dist/index.umd.min.js +23 -23
- 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/dist/vendor/shadcn/combobox.js +9 -9
- package/dist/vendor/shadcn/dropdown-menu.js +2 -2
- package/dist/vendor/shadcn/popover.js +8 -8
- package/dist/vendor/shadcn/select.js +12 -12
- package/dist/vendor/shadcn/tooltip.js +9 -9
- 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
2
|
import * as i from "react";
|
|
3
|
-
import "react-dom";
|
|
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
|
|
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 I = 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 I = x(
|
|
|
38
38
|
size: "default"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
),
|
|
41
|
+
), q = i.forwardRef(
|
|
42
42
|
({
|
|
43
|
-
className:
|
|
44
|
-
verticalAlign:
|
|
45
|
-
title:
|
|
43
|
+
className: y,
|
|
44
|
+
verticalAlign: b,
|
|
45
|
+
title: h,
|
|
46
46
|
open: a,
|
|
47
|
-
closeIcon:
|
|
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
|
-
|
|
47
|
+
closeIcon: o,
|
|
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);
|
|
62
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
|
}, []), i.useEffect(() => {
|
|
68
|
-
let t,
|
|
69
|
-
return a ? (
|
|
70
|
-
|
|
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
|
-
}, [a,
|
|
75
|
-
const
|
|
76
|
-
width:
|
|
77
|
-
height:
|
|
78
|
-
}
|
|
79
|
-
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
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: [
|
|
80
80
|
/* @__PURE__ */ e.jsx(
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
|
-
className:
|
|
84
|
-
"fixed inset-0
|
|
85
|
-
|
|
83
|
+
className: d(
|
|
84
|
+
"fixed inset-0 bg-black/25 transition-opacity duration-600 ease-out",
|
|
85
|
+
v,
|
|
86
|
+
f ? "opacity-100" : "opacity-0"
|
|
86
87
|
),
|
|
87
|
-
|
|
88
|
+
style: x,
|
|
89
|
+
onClick: o,
|
|
88
90
|
"aria-hidden": "true"
|
|
89
91
|
}
|
|
90
92
|
),
|
|
91
|
-
/* @__PURE__ */ e.jsx(
|
|
93
|
+
/* @__PURE__ */ e.jsx(
|
|
92
94
|
"div",
|
|
93
95
|
{
|
|
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
|
-
|
|
122
|
-
|
|
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
|
+
)
|
|
123
132
|
}
|
|
124
|
-
)
|
|
133
|
+
)
|
|
125
134
|
] });
|
|
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
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import "react-dom";
|
|
3
|
+
import { createPortal as H } from "react-dom";
|
|
4
4
|
import { cva as g } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
5
5
|
import { cn as r, normalizeDimension as p } from "../../../lib/utils.js";
|
|
6
|
-
import { useBodyScrollLock as
|
|
7
|
-
import { useEscapeKey as
|
|
8
|
-
import { Icon as
|
|
6
|
+
import { useBodyScrollLock as M } from "../../../hooks/use-body-scroll-lock.js";
|
|
7
|
+
import { useEscapeKey as R } from "../../../hooks/use-escape-key.js";
|
|
8
|
+
import { Icon as W } from "../../atoms/icon/icon.js";
|
|
9
9
|
import { Button as x } from "../../atoms/button/button.js";
|
|
10
10
|
import { Typography as b } from "../../atoms/typography/typography.js";
|
|
11
|
-
const
|
|
11
|
+
const D = g(
|
|
12
12
|
"fixed z-sheet bg-background shadow-lg transition-transform duration-300 ease-in-out",
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
@@ -38,7 +38,7 @@ const R = g(
|
|
|
38
38
|
isOpen: !1
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
),
|
|
41
|
+
), F = g(
|
|
42
42
|
"fixed inset-0 z-sheet bg-black/50 transition-opacity duration-300",
|
|
43
43
|
{
|
|
44
44
|
variants: {
|
|
@@ -51,7 +51,7 @@ const R = g(
|
|
|
51
51
|
isOpen: !1
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
),
|
|
54
|
+
), K = i.forwardRef(
|
|
55
55
|
({
|
|
56
56
|
className: y,
|
|
57
57
|
side: s = "right",
|
|
@@ -70,9 +70,9 @@ const R = g(
|
|
|
70
70
|
footerClassName: z,
|
|
71
71
|
loading: T = !1,
|
|
72
72
|
...V
|
|
73
|
-
},
|
|
74
|
-
const [
|
|
75
|
-
if (
|
|
73
|
+
}, E) => {
|
|
74
|
+
const [I, f] = i.useState(!1), [u, h] = i.useState(!1);
|
|
75
|
+
if (M(a), R(a, n), i.useEffect(() => {
|
|
76
76
|
if (a) {
|
|
77
77
|
f(!0);
|
|
78
78
|
const t = setTimeout(() => h(!0), 10);
|
|
@@ -82,16 +82,15 @@ const R = g(
|
|
|
82
82
|
const t = setTimeout(() => f(!1), 300);
|
|
83
83
|
return () => clearTimeout(t);
|
|
84
84
|
}
|
|
85
|
-
}, [a]), !
|
|
86
|
-
const d = p(j), m = p(v),
|
|
85
|
+
}, [a]), !I) return null;
|
|
86
|
+
const d = p(j), m = p(v), A = {
|
|
87
87
|
...d && (s === "left" || s === "right") ? { width: d, maxWidth: d } : {},
|
|
88
88
|
...m && (s === "top" || s === "bottom") ? { height: m, maxHeight: m } : {}
|
|
89
|
-
}
|
|
90
|
-
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
89
|
+
}, B = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
91
90
|
/* @__PURE__ */ e.jsx(
|
|
92
91
|
"div",
|
|
93
92
|
{
|
|
94
|
-
className:
|
|
93
|
+
className: F({ isOpen: u }),
|
|
95
94
|
onClick: n,
|
|
96
95
|
"aria-hidden": "true"
|
|
97
96
|
}
|
|
@@ -99,9 +98,9 @@ const R = g(
|
|
|
99
98
|
/* @__PURE__ */ e.jsx(
|
|
100
99
|
"div",
|
|
101
100
|
{
|
|
102
|
-
ref:
|
|
103
|
-
className: r(
|
|
104
|
-
style:
|
|
101
|
+
ref: E,
|
|
102
|
+
className: r(D({ side: s, isOpen: u }), y),
|
|
103
|
+
style: A,
|
|
105
104
|
role: "dialog",
|
|
106
105
|
"aria-modal": "true",
|
|
107
106
|
"aria-labelledby": l ? "sheet-title" : void 0,
|
|
@@ -145,7 +144,7 @@ const R = g(
|
|
|
145
144
|
onClick: n,
|
|
146
145
|
"aria-label": "Close",
|
|
147
146
|
className: "h-6 w-6",
|
|
148
|
-
children: /* @__PURE__ */ e.jsx(
|
|
147
|
+
children: /* @__PURE__ */ e.jsx(W, { name: "X", size: "md" })
|
|
149
148
|
}
|
|
150
149
|
)
|
|
151
150
|
]
|
|
@@ -159,13 +158,13 @@ const R = g(
|
|
|
159
158
|
"flex items-center justify-end gap-3 border-t border-border p-6",
|
|
160
159
|
z
|
|
161
160
|
),
|
|
162
|
-
children: c.map((t,
|
|
161
|
+
children: c.map((t, C) => /* @__PURE__ */ e.jsx(
|
|
163
162
|
x,
|
|
164
163
|
{
|
|
165
164
|
disabled: T || t.disabled,
|
|
166
165
|
...t
|
|
167
166
|
},
|
|
168
|
-
|
|
167
|
+
C
|
|
169
168
|
))
|
|
170
169
|
}
|
|
171
170
|
)
|
|
@@ -173,9 +172,10 @@ const R = g(
|
|
|
173
172
|
}
|
|
174
173
|
)
|
|
175
174
|
] });
|
|
175
|
+
return H(B, document.body);
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
|
-
|
|
178
|
+
K.displayName = "Sheet";
|
|
179
179
|
export {
|
|
180
|
-
|
|
180
|
+
K as Sheet
|
|
181
181
|
};
|