@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.
Files changed (26) hide show
  1. package/dist/components/atoms/icon/icon-list.d.ts +5 -0
  2. package/dist/components/atoms/icon/icon-list.js +206 -196
  3. package/dist/components/organisms/dialog/dialog.d.ts +5 -0
  4. package/dist/components/organisms/dialog/dialog.js +88 -78
  5. package/dist/components/organisms/sheet/sheet.js +23 -23
  6. package/dist/dashboard-design-system.css +1 -12
  7. package/dist/index.css +1 -12
  8. package/dist/index.esm.min.js +7251 -7071
  9. package/dist/index.umd.min.js +23 -23
  10. package/dist/node_modules/@phosphor-icons/react/dist/csr/ArrowSquareOut.es.js +8 -0
  11. package/dist/node_modules/@phosphor-icons/react/dist/csr/Lifebuoy.es.js +8 -0
  12. package/dist/node_modules/@phosphor-icons/react/dist/csr/NotePencil.es.js +8 -0
  13. package/dist/node_modules/@phosphor-icons/react/dist/csr/SquareHalf.es.js +8 -0
  14. package/dist/node_modules/@phosphor-icons/react/dist/csr/SquareHalfBottom.es.js +8 -0
  15. package/dist/node_modules/@phosphor-icons/react/dist/defs/ArrowSquareOut.es.js +36 -0
  16. package/dist/node_modules/@phosphor-icons/react/dist/defs/Lifebuoy.es.js +36 -0
  17. package/dist/node_modules/@phosphor-icons/react/dist/defs/NotePencil.es.js +30 -0
  18. package/dist/node_modules/@phosphor-icons/react/dist/defs/SquareHalf.es.js +36 -0
  19. package/dist/node_modules/@phosphor-icons/react/dist/defs/SquareHalfBottom.es.js +30 -0
  20. package/dist/vendor/shadcn/combobox.js +9 -9
  21. package/dist/vendor/shadcn/dropdown-menu.js +2 -2
  22. package/dist/vendor/shadcn/popover.js +8 -8
  23. package/dist/vendor/shadcn/select.js +12 -12
  24. package/dist/vendor/shadcn/tooltip.js +9 -9
  25. package/package.json +3 -3
  26. 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 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 C } from "../../../hooks/use-body-scroll-lock.js";
7
- import { useEscapeKey as L } from "../../../hooks/use-escape-key.js";
8
- import { DialogHeader as M } from "../../molecules/dialog-header/dialog-header.js";
9
- import { DialogContent as B } from "../../molecules/dialog-content/dialog-content.js";
10
- import { DialogFooter as F } from "../../molecules/dialog-footer/dialog-footer.js";
11
- const I = x(
12
- "fixed inset-0 z-dialog flex items-center justify-center p-4",
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
- ), R = x(
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
- ), H = i.forwardRef(
41
+ ), q = i.forwardRef(
42
42
  ({
43
- className: w,
44
- verticalAlign: p,
45
- title: v,
43
+ className: y,
44
+ verticalAlign: b,
45
+ title: h,
46
46
  open: a,
47
- closeIcon: l,
48
- buttons: y = [],
49
- widthContainer: o,
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] = i.useState(!1), [r, c] = i.useState(a), [u, f] = i.useState(!1);
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
- S(window.innerWidth <= 599);
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, n;
69
- return a ? (c(!0), t = setTimeout(() => f(!0), 10)) : r && (f(!1), n = setTimeout(() => {
70
- c(!1);
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), n && clearTimeout(n);
73
+ t && clearTimeout(t), m && clearTimeout(m);
73
74
  };
74
- }, [a, r]), C(a), L(a, l), !r) return null;
75
- const A = {
76
- width: o && !s ? g(o) : void 0,
77
- height: d && !s ? g(d) : void 0
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: m(
84
- "fixed inset-0 z-dialog bg-black/25 transition-opacity duration-600 ease-out",
85
- u ? "opacity-100" : "opacity-0"
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
- onClick: l,
88
+ style: x,
89
+ onClick: o,
88
90
  "aria-hidden": "true"
89
91
  }
90
92
  ),
91
- /* @__PURE__ */ e.jsx("div", { className: m(I({ verticalAlign: p })), children: /* @__PURE__ */ e.jsxs(
93
+ /* @__PURE__ */ e.jsx(
92
94
  "div",
93
95
  {
94
- ref: V,
95
- className: m(
96
- "yuno-dialog",
97
- R({
98
- size: s ? "fullscreen" : "default"
99
- }),
100
- "transition-all duration-600 ease-out",
101
- u ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-98 -translate-y-2",
102
- o && !s && "max-w-none",
103
- w
104
- ),
105
- style: A,
106
- role: "dialog",
107
- "aria-modal": "true",
108
- ...T,
109
- children: [
110
- z && /* @__PURE__ */ e.jsx(
111
- M,
112
- {
113
- title: v,
114
- onClose: l,
115
- onBack: b,
116
- otherActions: j,
117
- className: k
118
- }
119
- ),
120
- /* @__PURE__ */ e.jsx(B, { className: D, children: N }),
121
- h && /* @__PURE__ */ e.jsx(F, { buttons: y, className: E })
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
- H.displayName = "Dialog";
138
+ q.displayName = "Dialog";
129
139
  export {
130
- H as Dialog
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 B } from "../../../hooks/use-body-scroll-lock.js";
7
- import { useEscapeKey as H } from "../../../hooks/use-escape-key.js";
8
- import { Icon as M } from "../../atoms/icon/icon.js";
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 R = g(
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
- ), W = g(
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
- ), D = i.forwardRef(
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
- }, C) => {
74
- const [E, f] = i.useState(!1), [u, h] = i.useState(!1);
75
- if (B(a), H(a, n), i.useEffect(() => {
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]), !E) return null;
86
- const d = p(j), m = p(v), I = {
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: W({ isOpen: u }),
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: C,
103
- className: r(R({ side: s, isOpen: u }), y),
104
- style: I,
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(M, { name: "X", size: "md" })
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, A) => /* @__PURE__ */ e.jsx(
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
- A
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
- D.displayName = "Sheet";
178
+ K.displayName = "Sheet";
179
179
  export {
180
- D as Sheet
180
+ K as Sheet
181
181
  };