@yuno-payments/dashboard-design-system 2.2.1 → 2.2.2-beta.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.
Files changed (24) hide show
  1. package/dist/components/atoms/icon/icon-list.d.ts +0 -5
  2. package/dist/components/atoms/icon/icon-list.js +196 -206
  3. package/dist/components/organisms/data-table/components/cells/data-table-resize-handle.js +18 -12
  4. package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +2 -2
  5. package/dist/components/organisms/data-table/utils/data-table-constants.js +5 -5
  6. package/dist/components/organisms/dialog/dialog.d.ts +0 -5
  7. package/dist/components/organisms/dialog/dialog.js +80 -90
  8. package/dist/components/organisms/tutorial/tutorial.js +42 -21
  9. package/dist/dashboard-design-system.css +1 -1
  10. package/dist/index.css +1 -1
  11. package/dist/index.esm.min.js +5914 -6055
  12. package/dist/index.umd.min.js +14 -14
  13. package/package.json +3 -3
  14. package/registry/components-registry.json +2 -2
  15. package/dist/node_modules/@phosphor-icons/react/dist/csr/ArrowSquareOut.es.js +0 -8
  16. package/dist/node_modules/@phosphor-icons/react/dist/csr/Lifebuoy.es.js +0 -8
  17. package/dist/node_modules/@phosphor-icons/react/dist/csr/NotePencil.es.js +0 -8
  18. package/dist/node_modules/@phosphor-icons/react/dist/csr/SquareHalf.es.js +0 -8
  19. package/dist/node_modules/@phosphor-icons/react/dist/csr/SquareHalfBottom.es.js +0 -8
  20. package/dist/node_modules/@phosphor-icons/react/dist/defs/ArrowSquareOut.es.js +0 -36
  21. package/dist/node_modules/@phosphor-icons/react/dist/defs/Lifebuoy.es.js +0 -36
  22. package/dist/node_modules/@phosphor-icons/react/dist/defs/NotePencil.es.js +0 -30
  23. package/dist/node_modules/@phosphor-icons/react/dist/defs/SquareHalf.es.js +0 -36
  24. package/dist/node_modules/@phosphor-icons/react/dist/defs/SquareHalfBottom.es.js +0 -30
@@ -1,24 +1,30 @@
1
- import { j as t } from "../../../../../_virtual/jsx-runtime.js";
2
- import { RESIZE_HANDLE_CONFIG as e } from "../../utils/data-table-constants.js";
3
- function l({
4
- onMouseDown: r,
5
- onTouchStart: i
1
+ import { j as e } from "../../../../../_virtual/jsx-runtime.js";
2
+ import { RESIZE_HANDLE_CONFIG as t } from "../../utils/data-table-constants.js";
3
+ function c({
4
+ onMouseDown: n,
5
+ onTouchStart: r
6
6
  }) {
7
- return /* @__PURE__ */ t.jsx(
7
+ const s = (o) => {
8
+ o.stopPropagation(), n(o);
9
+ }, a = (o) => {
10
+ o.stopPropagation(), r(o);
11
+ };
12
+ return /* @__PURE__ */ e.jsx(
8
13
  "div",
9
14
  {
10
- onMouseDown: r,
11
- onTouchStart: i,
12
- className: `absolute right-0 top-0 h-full ${e.width} cursor-col-resize select-none touch-none flex items-center justify-center hover:bg-neutral-100`,
13
- children: /* @__PURE__ */ t.jsx(
15
+ onMouseDown: s,
16
+ onTouchStart: a,
17
+ onPointerDown: (o) => o.stopPropagation(),
18
+ className: `absolute right-0 top-0 h-full ${t.width} cursor-col-resize select-none touch-none flex items-center justify-center hover:bg-neutral-100`,
19
+ children: /* @__PURE__ */ e.jsx(
14
20
  "div",
15
21
  {
16
- className: `${e.lineHeight} ${e.lineWidth} bg-neutral-300`
22
+ className: `${t.lineHeight} ${t.lineWidth} bg-neutral-300`
17
23
  }
18
24
  )
19
25
  }
20
26
  );
21
27
  }
22
28
  export {
23
- l as DataTableResizeHandle
29
+ c as DataTableResizeHandle
24
30
  };
@@ -21,8 +21,8 @@ export declare const ACTIONS_COLUMN_CONFIG: {
21
21
  readonly maxSize: 50;
22
22
  };
23
23
  export declare const CELL_BACKGROUND_COLORS: {
24
- readonly header: "hsl(var(--sidebar))";
25
- readonly body: "hsl(var(--background))";
24
+ readonly header: "var(--sidebar)";
25
+ readonly body: "var(--background)";
26
26
  };
27
27
  export declare const ROW_HEIGHT_DEFAULT = 66;
28
28
  export declare const COLUMN_MIN_SIZE_DEFAULT = 50;
@@ -17,16 +17,16 @@ const _ = {
17
17
  minSize: 50,
18
18
  maxSize: 50
19
19
  }, n = {
20
- header: "hsl(var(--sidebar))",
21
- body: "hsl(var(--background))"
22
- }, o = 66, s = 50, C = "shadow-[-4px_0_4px_-2px_rgba(0,0,0,0.1)]";
20
+ header: "var(--sidebar)",
21
+ body: "var(--background)"
22
+ }, o = 66, C = 50, s = "shadow-[-4px_0_4px_-2px_rgba(0,0,0,0.1)]";
23
23
  export {
24
24
  i as ACTIONS_COLUMN_CONFIG,
25
25
  n as CELL_BACKGROUND_COLORS,
26
26
  t as CHECKBOX_COLUMN_CONFIG,
27
27
  _ as COLUMN_HEADER_CONFIG,
28
- s as COLUMN_MIN_SIZE_DEFAULT,
29
- C as PINNED_SHADOW_CLASS,
28
+ C as COLUMN_MIN_SIZE_DEFAULT,
29
+ s as PINNED_SHADOW_CLASS,
30
30
  e as RESIZE_HANDLE_CONFIG,
31
31
  o as ROW_HEIGHT_DEFAULT
32
32
  };
@@ -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 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",
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
- ), W = p(
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
- ), q = i.forwardRef(
41
+ ), O = a.forwardRef(
42
42
  ({
43
- className: y,
44
- verticalAlign: b,
45
- title: h,
46
- open: a,
43
+ className: w,
44
+ verticalAlign: p,
45
+ title: v,
46
+ open: i,
47
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);
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
- L(window.innerWidth <= 599);
64
+ S(window.innerWidth <= 599);
66
65
  };
67
66
  return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
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);
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), m && clearTimeout(m);
72
+ t && clearTimeout(t), n && clearTimeout(n);
74
73
  };
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: [
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: d(
84
- "fixed inset-0 bg-black/25 transition-opacity duration-600 ease-out",
85
- v,
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
- 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
- )
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 F(B, document.body);
125
+ return M(L, document.body);
136
126
  }
137
127
  );
138
- q.displayName = "Dialog";
128
+ O.displayName = "Dialog";
139
129
  export {
140
- q as Dialog
130
+ O as Dialog
141
131
  };
@@ -3,28 +3,28 @@ import { forwardRef as C } from "react";
3
3
  import { cn as j } from "../../../lib/utils.js";
4
4
  import { Button as c } from "../../atoms/button/button.js";
5
5
  import { Icon as y } from "../../atoms/icon/icon.js";
6
- import { Typography as x } from "../../atoms/typography/typography.js";
6
+ import { Typography as o } from "../../atoms/typography/typography.js";
7
7
  import { Link as b } from "../../atoms/link/link.js";
8
8
  import { Badge as w } from "../../atoms/badge/badge.js";
9
9
  const B = C(
10
10
  ({
11
- continuous: o,
11
+ continuous: x,
12
12
  step: a,
13
13
  closeProps: l,
14
- primaryProps: n,
15
- tooltipProps: g,
16
- withTag: v = !1,
14
+ primaryProps: r,
15
+ tooltipProps: v,
16
+ withTag: g = !1,
17
17
  tagLabel: f,
18
- buttonGroup: r = [],
18
+ buttonGroup: n = [],
19
19
  width: i,
20
20
  skipProps: t,
21
21
  index: h,
22
22
  size: d
23
23
  }, N) => {
24
- const u = (s) => {
24
+ const p = (s) => {
25
25
  l?.onClick?.(s);
26
- }, k = (s, m) => {
27
- m(), u(s);
26
+ }, u = (s, m) => {
27
+ m(), p(s);
28
28
  };
29
29
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
30
30
  /* @__PURE__ */ e.jsx("style", { children: `
@@ -35,17 +35,24 @@ const B = C(
35
35
  /* @__PURE__ */ e.jsxs(
36
36
  "div",
37
37
  {
38
- ...g,
38
+ ...v,
39
39
  ref: N,
40
40
  className: j(
41
- "bg-background rounded border shadow-lg p-4",
41
+ "bg-popover rounded-md border border-border shadow-md p-4",
42
42
  "max-w-[368px]",
43
43
  i && `max-w-[${i}px]`
44
44
  ),
45
45
  style: i ? { maxWidth: `${i}px` } : void 0,
46
46
  children: [
47
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-4 mb-3", children: [
48
- /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: a.title && /* @__PURE__ */ e.jsx(x, { variant: "h4", className: "text-base font-semibold", children: a.title }) }),
47
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-4 mb-2", children: [
48
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: a.title && /* @__PURE__ */ e.jsx(
49
+ o,
50
+ {
51
+ variant: "h4",
52
+ className: "text-base font-medium leading-none",
53
+ children: a.title
54
+ }
55
+ ) }),
49
56
  !a.hideCloseButton && /* @__PURE__ */ e.jsx(
50
57
  c,
51
58
  {
@@ -57,7 +64,14 @@ const B = C(
57
64
  }
58
65
  )
59
66
  ] }),
60
- /* @__PURE__ */ e.jsx("div", { className: "mb-5", children: /* @__PURE__ */ e.jsx(x, { variant: "sm", className: "text-muted-foreground font-normal", children: a.content }) }),
67
+ /* @__PURE__ */ e.jsx("div", { className: "mb-6", children: /* @__PURE__ */ e.jsx(
68
+ o,
69
+ {
70
+ variant: "sm",
71
+ className: "text-muted-foreground font-normal",
72
+ children: a.content
73
+ }
74
+ ) }),
61
75
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
62
76
  t && h !== (d ?? 0) - 1 && /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: /* @__PURE__ */ e.jsx(
63
77
  b,
@@ -69,31 +83,38 @@ const B = C(
69
83
  children: t.title
70
84
  }
71
85
  ) }),
72
- (d ?? 0) > 1 && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e.jsxs(x, { variant: "xs", className: "text-muted-foreground mr-6", children: [
86
+ (d ?? 0) > 1 && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e.jsxs(o, { variant: "xs", className: "text-muted-foreground mr-6", children: [
73
87
  "Step ",
74
88
  (h ?? 0) + 1,
75
89
  " of ",
76
90
  d
77
91
  ] }) }),
78
- o && n && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e.jsx(c, { size: "default", ...n, children: n.title }) })
92
+ x && r && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e.jsx(c, { size: "default", ...r, children: r.title }) })
79
93
  ] }),
80
- !o && r.length > 0 && /* @__PURE__ */ e.jsxs(
94
+ !x && n.length > 0 && /* @__PURE__ */ e.jsxs(
81
95
  "div",
82
96
  {
83
97
  className: j(
84
98
  "flex items-center mt-6 gap-3",
85
- r.length > 1 ? "justify-between" : "justify-end"
99
+ n.length > 1 ? "justify-between" : "justify-end"
86
100
  ),
87
101
  children: [
88
- v && f && /* @__PURE__ */ e.jsx(w, { variant: "default", className: "bg-green-100 text-green-800", children: f }),
89
- r.map((s, m) => /* @__PURE__ */ e.jsx(
102
+ g && f && /* @__PURE__ */ e.jsx(
103
+ w,
104
+ {
105
+ variant: "default",
106
+ className: "bg-green-100 text-green-800",
107
+ children: f
108
+ }
109
+ ),
110
+ n.map((s, m) => /* @__PURE__ */ e.jsx(
90
111
  c,
91
112
  {
92
113
  variant: s.variant || "default",
93
114
  size: s.size || "default",
94
115
  loading: s.loading,
95
116
  disabled: s.disabled,
96
- onClick: (p) => k(p, s.event),
117
+ onClick: (k) => u(k, s.event),
97
118
  children: s.label
98
119
  },
99
120
  m