@yuno-payments/dashboard-design-system 1.4.4-RTL.2 → 2.0.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/alert/alert.js +11 -11
- package/dist/components/atoms/badge/badge.js +11 -10
- package/dist/components/atoms/button/button.js +13 -12
- package/dist/components/atoms/card/card.js +23 -23
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/atoms/page-title/index.d.ts +1 -0
- package/dist/components/atoms/page-title/page-title.d.ts +7 -0
- package/dist/components/atoms/page-title/page-title.js +18 -0
- package/dist/components/atoms/radio-group/radio-group-option.js +7 -7
- package/dist/components/atoms/typography/typography.js +1 -1
- package/dist/components/molecules/dialog-content/dialog-content.js +7 -6
- package/dist/components/molecules/dialog-footer/dialog-footer.js +11 -10
- package/dist/components/molecules/dialog-header/dialog-header.js +7 -6
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/components/molecules/provider-card/index.d.ts +1 -0
- package/dist/components/molecules/provider-card/provider-card.d.ts +25 -0
- package/dist/components/molecules/provider-card/provider-card.js +75 -0
- package/dist/components/organisms/data-table/data-table.js +13 -13
- package/dist/components/organisms/data-table/utils/data-table-utils.js +8 -11
- package/dist/components/organisms/dialog/dialog.js +19 -18
- package/dist/dashboard-design-system.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.min.js +3042 -2957
- package/dist/index.js +89 -85
- package/dist/index.umd.min.js +19 -19
- package/dist/lib/notification-alert.js +28 -28
- package/dist/tokens.css +246 -0
- package/dist/vendor/shadcn/switch.js +1 -1
- package/dist/vendor/shadcn/table.js +21 -18
- package/package.json +9 -4
- package/registry/components-registry.json +2 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { Alert as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
7
|
-
({ icon: e, title:
|
|
8
|
-
e && /* @__PURE__ */ r.jsx(
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { Alert as n, AlertTitle as c, AlertDescription as f } from "../../../vendor/shadcn/alert.js";
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
4
|
+
import { Icon as x } from "../icon/icon.js";
|
|
5
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
6
|
+
const j = p(
|
|
7
|
+
({ icon: e, title: s, description: m, iconProps: t, className: a, ...o }, i) => /* @__PURE__ */ r.jsxs(n, { ref: i, className: l("yuno-alert", a), ...o, children: [
|
|
8
|
+
e && /* @__PURE__ */ r.jsx(x, { name: e, className: l("size-4", t?.className), ...t }),
|
|
9
|
+
s && /* @__PURE__ */ r.jsx(c, { children: s }),
|
|
10
|
+
m && /* @__PURE__ */ r.jsx(f, { children: m })
|
|
11
11
|
] })
|
|
12
12
|
);
|
|
13
|
-
|
|
13
|
+
j.displayName = "Alert";
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
j as Alert
|
|
16
16
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Badge as
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
3
|
+
import { Badge as d } from "../../../vendor/shadcn/badge.js";
|
|
4
4
|
import { Icon as s } from "../icon/icon.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
6
|
+
const p = x(
|
|
7
|
+
({ children: g, className: o, startIcon: i, endIcon: m, startIconProps: r, endIconProps: a, ...t }, f) => /* @__PURE__ */ e.jsxs(d, { ref: f, className: l("yuno-badge", o), ...t, children: [
|
|
7
8
|
i && /* @__PURE__ */ e.jsx(
|
|
8
9
|
s,
|
|
9
10
|
{
|
|
10
11
|
name: i,
|
|
11
12
|
size: "xs",
|
|
12
|
-
weight:
|
|
13
|
-
...
|
|
13
|
+
weight: r?.weight || "fill",
|
|
14
|
+
...r
|
|
14
15
|
}
|
|
15
16
|
),
|
|
16
17
|
g,
|
|
17
|
-
|
|
18
|
+
m && /* @__PURE__ */ e.jsx(
|
|
18
19
|
s,
|
|
19
20
|
{
|
|
20
|
-
name:
|
|
21
|
+
name: m,
|
|
21
22
|
size: "xs",
|
|
22
23
|
weight: a?.weight || "regular",
|
|
23
24
|
...a
|
|
@@ -25,7 +26,7 @@ const d = f(
|
|
|
25
26
|
)
|
|
26
27
|
] })
|
|
27
28
|
);
|
|
28
|
-
|
|
29
|
+
p.displayName = "Badge";
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
p as Badge
|
|
31
32
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { j as s } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as b } from "react";
|
|
3
3
|
import { Button as f } from "../../../vendor/shadcn/button.js";
|
|
4
|
-
import { Icon as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
m,
|
|
12
|
-
|
|
4
|
+
import { Icon as m } from "../icon/icon.js";
|
|
5
|
+
import { cn as x } from "../../../lib/utils.js";
|
|
6
|
+
const d = b(
|
|
7
|
+
({ children: e, className: o, startIcon: r, endIcon: a, startIconProps: j, endIconProps: l, loading: t = !1, disabled: p, asChild: c = !1, ...i }, n) => {
|
|
8
|
+
const u = p || t;
|
|
9
|
+
return c ? /* @__PURE__ */ s.jsx(f, { ref: n, disabled: u, asChild: !0, className: x("yuno-button", o), ...i, children: e }) : /* @__PURE__ */ s.jsxs(f, { ref: n, disabled: u, className: x("yuno-button", o), ...i, children: [
|
|
10
|
+
t && /* @__PURE__ */ s.jsx(m, { name: "CircleNotch", size: "sm", className: "animate-spin" }),
|
|
11
|
+
r && !t && /* @__PURE__ */ s.jsx(m, { name: r, size: "sm", ...j }),
|
|
12
|
+
e,
|
|
13
|
+
a && !t && /* @__PURE__ */ s.jsx(m, { name: a, size: "sm", ...l })
|
|
13
14
|
] });
|
|
14
15
|
}
|
|
15
16
|
);
|
|
16
|
-
|
|
17
|
+
d.displayName = "Button";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
d as Button
|
|
19
20
|
};
|
|
@@ -2,28 +2,28 @@ import { j as d } from "../../../_virtual/jsx-runtime.js";
|
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
3
|
import { Card as D, CardContent as F, CardDescription as T, CardFooter as B, CardHeader as R, CardTitle as w } from "../../../vendor/shadcn/card.js";
|
|
4
4
|
import { cn as n } from "../../../lib/utils.js";
|
|
5
|
-
const C = t(
|
|
6
|
-
({ className: s, children: a, variant: r = "default", ...e }, o) => /* @__PURE__ */ d.jsx(D, { ref: o, className: n(s), variant: r, ...e, children: a })
|
|
7
|
-
);
|
|
8
|
-
C.displayName = "CardBase";
|
|
9
5
|
const c = t(
|
|
10
|
-
({ className: s, children: a,
|
|
6
|
+
({ className: s, children: a, variant: r = "default", ...e }, o) => /* @__PURE__ */ d.jsx(D, { ref: o, className: n("yuno-card", s), variant: r, ...e, children: a })
|
|
7
|
+
);
|
|
8
|
+
c.displayName = "CardBase";
|
|
9
|
+
const C = t(
|
|
10
|
+
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(R, { ref: e, className: n("yuno-card-header", s), ...r, children: a })
|
|
11
11
|
);
|
|
12
|
-
|
|
12
|
+
C.displayName = "CardHeader";
|
|
13
13
|
const l = t(
|
|
14
|
-
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(w, { ref: e, className: n(s), ...r, children: a })
|
|
14
|
+
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(w, { ref: e, className: n("yuno-card-title", s), ...r, children: a })
|
|
15
15
|
);
|
|
16
16
|
l.displayName = "CardTitle";
|
|
17
17
|
const m = t(
|
|
18
|
-
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(T, { ref: e, className: n(s), ...r, children: a })
|
|
18
|
+
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(T, { ref: e, className: n("yuno-card-description", s), ...r, children: a })
|
|
19
19
|
);
|
|
20
20
|
m.displayName = "CardDescription";
|
|
21
21
|
const i = t(
|
|
22
|
-
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(F, { ref: e, className: n(s), ...r, children: a })
|
|
22
|
+
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(F, { ref: e, className: n("yuno-card-content", s), ...r, children: a })
|
|
23
23
|
);
|
|
24
24
|
i.displayName = "CardContent";
|
|
25
25
|
const N = t(
|
|
26
|
-
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(B, { ref: e, className: n(s), ...r, children: a })
|
|
26
|
+
({ className: s, children: a, ...r }, e) => /* @__PURE__ */ d.jsx(B, { ref: e, className: n("yuno-card-footer", s), ...r, children: a })
|
|
27
27
|
);
|
|
28
28
|
N.displayName = "CardFooter";
|
|
29
29
|
const E = t(
|
|
@@ -34,31 +34,31 @@ const E = t(
|
|
|
34
34
|
children: e,
|
|
35
35
|
footer: o,
|
|
36
36
|
variant: p = "default",
|
|
37
|
-
headerClassName:
|
|
38
|
-
titleClassName:
|
|
39
|
-
descriptionClassName:
|
|
40
|
-
contentClassName:
|
|
41
|
-
footerClassName:
|
|
37
|
+
headerClassName: u,
|
|
38
|
+
titleClassName: x,
|
|
39
|
+
descriptionClassName: j,
|
|
40
|
+
contentClassName: y,
|
|
41
|
+
footerClassName: f,
|
|
42
42
|
...h
|
|
43
43
|
}, $) => {
|
|
44
44
|
const H = a || r;
|
|
45
|
-
return /* @__PURE__ */ d.jsxs(
|
|
46
|
-
H && /* @__PURE__ */ d.jsxs(
|
|
47
|
-
a && /* @__PURE__ */ d.jsx(l, { className:
|
|
48
|
-
r && /* @__PURE__ */ d.jsx(m, { className:
|
|
45
|
+
return /* @__PURE__ */ d.jsxs(c, { ref: $, className: s, variant: p, ...h, children: [
|
|
46
|
+
H && /* @__PURE__ */ d.jsxs(C, { className: u, children: [
|
|
47
|
+
a && /* @__PURE__ */ d.jsx(l, { className: x, children: a }),
|
|
48
|
+
r && /* @__PURE__ */ d.jsx(m, { className: j, children: r })
|
|
49
49
|
] }),
|
|
50
|
-
/* @__PURE__ */ d.jsx(i, { className:
|
|
51
|
-
o && /* @__PURE__ */ d.jsx(N, { className:
|
|
50
|
+
/* @__PURE__ */ d.jsx(i, { className: y, children: e }),
|
|
51
|
+
o && /* @__PURE__ */ d.jsx(N, { className: f, children: o })
|
|
52
52
|
] });
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
E.displayName = "Card";
|
|
56
56
|
export {
|
|
57
57
|
E as Card,
|
|
58
|
-
|
|
58
|
+
c as CardBase,
|
|
59
59
|
i as CardContent,
|
|
60
60
|
m as CardDescription,
|
|
61
61
|
N as CardFooter,
|
|
62
|
-
|
|
62
|
+
C as CardHeader,
|
|
63
63
|
l as CardTitle
|
|
64
64
|
};
|
|
@@ -35,6 +35,7 @@ export { Icon, type IconProps, type IconName } from './icon';
|
|
|
35
35
|
export { Label, type LabelProps } from './label';
|
|
36
36
|
export { Loading, type LoadingProps } from './loading';
|
|
37
37
|
export { OTPField, type OTPFieldProps } from './otp-field';
|
|
38
|
+
export { PageTitle, type PageTitleProps } from './page-title';
|
|
38
39
|
export { PasswordField, type PasswordFieldProps } from './password-field';
|
|
39
40
|
export { ProtectedField, type ProtectedFieldProps } from './protected-field';
|
|
40
41
|
export { Progress, type ProgressProps } from './progress';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageTitle, type PageTitleProps } from './page-title';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
+
interface PageTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
as?: ElementType;
|
|
5
|
+
}
|
|
6
|
+
declare const PageTitle: import('react').ForwardRefExoticComponent<PageTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
7
|
+
export { PageTitle, type PageTitleProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { j as i } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
4
|
+
const l = m(
|
|
5
|
+
({ className: e, children: t, as: o = "h1", ...r }, a) => /* @__PURE__ */ i.jsx(
|
|
6
|
+
o,
|
|
7
|
+
{
|
|
8
|
+
ref: a,
|
|
9
|
+
className: s("yuno-page-title", "text-3xl font-semibold leading-[140%]", e),
|
|
10
|
+
...r,
|
|
11
|
+
children: t
|
|
12
|
+
}
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
l.displayName = "PageTitle";
|
|
16
|
+
export {
|
|
17
|
+
l as PageTitle
|
|
18
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { RadioGroupItem as d } from "../../../vendor/shadcn/radio-group.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Label as
|
|
3
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
4
|
+
import { Label as a } from "../label/label.js";
|
|
5
5
|
const o = ({
|
|
6
6
|
option: e,
|
|
7
7
|
radioId: s,
|
|
@@ -22,23 +22,23 @@ const o = ({
|
|
|
22
22
|
),
|
|
23
23
|
t ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
24
24
|
/* @__PURE__ */ r.jsx(
|
|
25
|
-
|
|
25
|
+
a,
|
|
26
26
|
{
|
|
27
27
|
htmlFor: s,
|
|
28
|
-
className:
|
|
28
|
+
className: l(
|
|
29
29
|
"cursor-pointer",
|
|
30
30
|
e.disabled && "text-muted-foreground"
|
|
31
31
|
),
|
|
32
32
|
children: e.label
|
|
33
33
|
}
|
|
34
34
|
),
|
|
35
|
-
e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground
|
|
35
|
+
e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground ml-auto", children: e.description })
|
|
36
36
|
] }) : /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-1.5 flex-1", children: [
|
|
37
37
|
/* @__PURE__ */ r.jsx(
|
|
38
|
-
|
|
38
|
+
a,
|
|
39
39
|
{
|
|
40
40
|
htmlFor: s,
|
|
41
|
-
className:
|
|
41
|
+
className: l(
|
|
42
42
|
"cursor-pointer",
|
|
43
43
|
e.disabled && "text-muted-foreground"
|
|
44
44
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cva as s } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
2
2
|
import { cn as i } from "../../../lib/utils.js";
|
|
3
3
|
import { forwardRef as m, createElement as c } from "react";
|
|
4
|
-
const d = s("font-
|
|
4
|
+
const d = s("font-sans", {
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
7
|
h1: "scroll-m-20 text-4xl tracking-tight lg:text-5xl",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { j as a } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { cn as m } from "../../../lib/utils.js";
|
|
4
|
+
const i = n.forwardRef(({ className: o, children: t, ...r }, e) => /* @__PURE__ */ a.jsx(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
ref: e,
|
|
8
|
-
className:
|
|
8
|
+
className: m(
|
|
9
|
+
"yuno-dialog-content",
|
|
9
10
|
"flex-1 overflow-auto p-6 text-muted-foreground",
|
|
10
11
|
o
|
|
11
12
|
),
|
|
@@ -13,7 +14,7 @@ const s = m.forwardRef(({ className: o, children: t, ...r }, e) => /* @__PURE__
|
|
|
13
14
|
children: t
|
|
14
15
|
}
|
|
15
16
|
));
|
|
16
|
-
|
|
17
|
+
i.displayName = "DialogContent";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
i as DialogContent
|
|
19
20
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Button as
|
|
5
|
-
const
|
|
6
|
-
({ className: t, buttons: r = [], ...i },
|
|
3
|
+
import { cn as f } from "../../../lib/utils.js";
|
|
4
|
+
import { Button as l } from "../../atoms/button/button.js";
|
|
5
|
+
const n = s.forwardRef(
|
|
6
|
+
({ className: t, buttons: r = [], ...i }, a) => r.length === 0 ? null : /* @__PURE__ */ e.jsx(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
10
|
-
className:
|
|
9
|
+
ref: a,
|
|
10
|
+
className: f(
|
|
11
|
+
"yuno-dialog-footer",
|
|
11
12
|
"flex items-center justify-end gap-3 p-6 border-t border-border",
|
|
12
13
|
t
|
|
13
14
|
),
|
|
14
15
|
...i,
|
|
15
|
-
children: r.map((
|
|
16
|
+
children: r.map((o, m) => /* @__PURE__ */ e.jsx(l, { ...o }, o.key || m))
|
|
16
17
|
}
|
|
17
18
|
)
|
|
18
19
|
);
|
|
19
|
-
|
|
20
|
+
n.displayName = "DialogFooter";
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
n as DialogFooter
|
|
22
23
|
};
|
|
@@ -7,8 +7,8 @@ const x = d.forwardRef(
|
|
|
7
7
|
({
|
|
8
8
|
className: r,
|
|
9
9
|
title: t,
|
|
10
|
-
onClose:
|
|
11
|
-
onBack:
|
|
10
|
+
onClose: a,
|
|
11
|
+
onBack: s,
|
|
12
12
|
otherActions: o,
|
|
13
13
|
showCloseButton: l = !0,
|
|
14
14
|
...n
|
|
@@ -17,16 +17,17 @@ const x = d.forwardRef(
|
|
|
17
17
|
{
|
|
18
18
|
ref: c,
|
|
19
19
|
className: i(
|
|
20
|
+
"yuno-dialog-header",
|
|
20
21
|
"flex items-center justify-between p-6 border-b border-border",
|
|
21
22
|
r
|
|
22
23
|
),
|
|
23
24
|
...n,
|
|
24
25
|
children: [
|
|
25
26
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4 flex-1", children: [
|
|
26
|
-
|
|
27
|
+
s && /* @__PURE__ */ e.jsx(
|
|
27
28
|
"button",
|
|
28
29
|
{
|
|
29
|
-
onClick:
|
|
30
|
+
onClick: s,
|
|
30
31
|
className: i(
|
|
31
32
|
"inline-flex items-center justify-center size-6 rounded-sm opacity-70 hover:opacity-100 transition-opacity"
|
|
32
33
|
),
|
|
@@ -39,10 +40,10 @@ const x = d.forwardRef(
|
|
|
39
40
|
] }),
|
|
40
41
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
41
42
|
o,
|
|
42
|
-
l &&
|
|
43
|
+
l && a && /* @__PURE__ */ e.jsx(
|
|
43
44
|
"button",
|
|
44
45
|
{
|
|
45
|
-
onClick:
|
|
46
|
+
onClick: a,
|
|
46
47
|
className: i(
|
|
47
48
|
"inline-flex items-center justify-center size-6 rounded-sm opacity-70 hover:opacity-100 transition-opacity"
|
|
48
49
|
),
|
|
@@ -8,5 +8,6 @@ export { NavTabs, type NavTab, type NavTabsProps } from './nav-tabs';
|
|
|
8
8
|
export { HighlightBanner, type HighlightBannerProps } from './highlight-banner';
|
|
9
9
|
export { Empty, type EmptyProps } from './empty';
|
|
10
10
|
export { EmptyIcon, type EmptyIconProps } from './empty';
|
|
11
|
+
export { ProviderCard, type ProviderCardProps } from './provider-card';
|
|
11
12
|
export { FileUpload, type FileUploadProps, type UploadFile, } from './file-upload';
|
|
12
13
|
export { Stepper, type StepperProps, type StepperStep } from './stepper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProviderCard, type ProviderCardProps } from './provider-card';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface ProviderCardProps {
|
|
3
|
+
/** Provider logo — URL string or custom ReactNode */
|
|
4
|
+
logo?: string | ReactNode;
|
|
5
|
+
/** Fallback logo URL when primary logo fails to load */
|
|
6
|
+
fallbackLogo?: string;
|
|
7
|
+
/** Provider name */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Subtitle displayed below the name */
|
|
10
|
+
subtitle?: ReactNode;
|
|
11
|
+
/** Badge content (e.g. provider type) */
|
|
12
|
+
badge?: ReactNode;
|
|
13
|
+
/** Content rendered on the left side of the footer (replaces badge when provided) */
|
|
14
|
+
status?: ReactNode;
|
|
15
|
+
/** Action button label */
|
|
16
|
+
actionLabel?: string;
|
|
17
|
+
/** Callback when the action button is clicked */
|
|
18
|
+
onAction?: () => void;
|
|
19
|
+
/** Custom footer content — replaces the default footer entirely */
|
|
20
|
+
footer?: ReactNode;
|
|
21
|
+
/** Additional className for the card */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const ProviderCard: import('react').ForwardRefExoticComponent<ProviderCardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { ProviderCard, type ProviderCardProps };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { forwardRef as v, useState as t } from "react";
|
|
3
|
+
import { cn as b } from "../../../lib/utils.js";
|
|
4
|
+
import { Button as y } from "../../atoms/button/button.js";
|
|
5
|
+
import { CardBase as C, CardContent as E, CardFooter as w } from "../../atoms/card/card.js";
|
|
6
|
+
const k = v(
|
|
7
|
+
({
|
|
8
|
+
logo: e,
|
|
9
|
+
fallbackLogo: a,
|
|
10
|
+
name: s,
|
|
11
|
+
subtitle: o,
|
|
12
|
+
badge: m,
|
|
13
|
+
status: f,
|
|
14
|
+
actionLabel: n,
|
|
15
|
+
onAction: d,
|
|
16
|
+
footer: i,
|
|
17
|
+
className: x
|
|
18
|
+
}, u) => {
|
|
19
|
+
const [l, c] = t(!1), [p, h] = t(!1), [j, g] = t(!1), N = () => e && typeof e != "string" ? e : !p && typeof e == "string" ? /* @__PURE__ */ r.jsx(
|
|
20
|
+
"img",
|
|
21
|
+
{
|
|
22
|
+
src: e,
|
|
23
|
+
alt: s,
|
|
24
|
+
className: "w-10 h-10 shrink-0 rounded-md",
|
|
25
|
+
onError: () => h(!0)
|
|
26
|
+
}
|
|
27
|
+
) : !j && a ? /* @__PURE__ */ r.jsx(
|
|
28
|
+
"img",
|
|
29
|
+
{
|
|
30
|
+
src: a,
|
|
31
|
+
alt: s,
|
|
32
|
+
className: "w-10 h-10 shrink-0 rounded-md",
|
|
33
|
+
onError: () => g(!0)
|
|
34
|
+
}
|
|
35
|
+
) : /* @__PURE__ */ r.jsx("div", { className: "w-10 h-10 shrink-0 rounded-md bg-muted flex items-center justify-center", children: /* @__PURE__ */ r.jsx("span", { className: "text-sm font-semibold text-muted-foreground", children: s?.charAt(0)?.toUpperCase() || "?" }) });
|
|
36
|
+
return /* @__PURE__ */ r.jsxs(
|
|
37
|
+
C,
|
|
38
|
+
{
|
|
39
|
+
ref: u,
|
|
40
|
+
onMouseEnter: () => c(!0),
|
|
41
|
+
onMouseLeave: () => c(!1),
|
|
42
|
+
className: b(
|
|
43
|
+
"flex flex-col bg-card transition-all overflow-hidden",
|
|
44
|
+
l ? "border-primary shadow-lg" : "",
|
|
45
|
+
x
|
|
46
|
+
),
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ r.jsxs(E, { className: "flex flex-col gap-4", children: [
|
|
49
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex items-start gap-6", children: N() }),
|
|
50
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
51
|
+
/* @__PURE__ */ r.jsx("span", { className: "text-base font-semibold leading-none text-card-foreground tracking-tight", children: s }),
|
|
52
|
+
o && /* @__PURE__ */ r.jsx("span", { className: "text-sm text-muted-foreground", children: o })
|
|
53
|
+
] })
|
|
54
|
+
] }),
|
|
55
|
+
i !== void 0 ? i : /* @__PURE__ */ r.jsxs(w, { className: "justify-between border-t border-border px-6 py-4", children: [
|
|
56
|
+
f ?? m,
|
|
57
|
+
d && n && /* @__PURE__ */ r.jsx(
|
|
58
|
+
y,
|
|
59
|
+
{
|
|
60
|
+
size: "sm",
|
|
61
|
+
onClick: d,
|
|
62
|
+
className: l ? "" : "opacity-50",
|
|
63
|
+
children: n
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
k.displayName = "ProviderCard";
|
|
73
|
+
export {
|
|
74
|
+
k as ProviderCard
|
|
75
|
+
};
|
|
@@ -26,7 +26,7 @@ function Te({
|
|
|
26
26
|
sorting: F,
|
|
27
27
|
onSortingChange: M,
|
|
28
28
|
enableColumnFilters: O = !1,
|
|
29
|
-
enableColumnResizing:
|
|
29
|
+
enableColumnResizing: f = !0,
|
|
30
30
|
columnResizeMode: N = "onChange",
|
|
31
31
|
enableColumnPinning: k = !0,
|
|
32
32
|
onRowClick: A,
|
|
@@ -44,8 +44,8 @@ function Te({
|
|
|
44
44
|
checkboxSelection: h,
|
|
45
45
|
actions: g
|
|
46
46
|
}), {
|
|
47
|
-
sorting:
|
|
48
|
-
setSorting:
|
|
47
|
+
sorting: y,
|
|
48
|
+
setSorting: j,
|
|
49
49
|
columnFilters: _,
|
|
50
50
|
setColumnFilters: $,
|
|
51
51
|
columnVisibility: z,
|
|
@@ -54,7 +54,7 @@ function Te({
|
|
|
54
54
|
setRowSelection: U,
|
|
55
55
|
columnPinning: q,
|
|
56
56
|
handleColumnPinningChange: J,
|
|
57
|
-
columnOrder:
|
|
57
|
+
columnOrder: d,
|
|
58
58
|
setColumnOrder: m
|
|
59
59
|
} = se({
|
|
60
60
|
persistKey: B,
|
|
@@ -69,7 +69,7 @@ function Te({
|
|
|
69
69
|
data: l,
|
|
70
70
|
columns: W,
|
|
71
71
|
getCoreRowModel: me(),
|
|
72
|
-
enableColumnResizing:
|
|
72
|
+
enableColumnResizing: f,
|
|
73
73
|
columnResizeMode: N,
|
|
74
74
|
enableColumnPinning: k,
|
|
75
75
|
defaultColumn: {
|
|
@@ -78,7 +78,7 @@ function Te({
|
|
|
78
78
|
},
|
|
79
79
|
...E && {
|
|
80
80
|
onSortingChange: (e) => {
|
|
81
|
-
|
|
81
|
+
j(typeof e == "function" ? e(y) : e);
|
|
82
82
|
},
|
|
83
83
|
getSortedRowModel: ae(),
|
|
84
84
|
manualSorting: R
|
|
@@ -98,12 +98,12 @@ function Te({
|
|
|
98
98
|
onColumnPinningChange: J,
|
|
99
99
|
onColumnOrderChange: m,
|
|
100
100
|
state: {
|
|
101
|
-
sorting:
|
|
101
|
+
sorting: y,
|
|
102
102
|
columnFilters: _,
|
|
103
103
|
columnVisibility: z,
|
|
104
104
|
rowSelection: i,
|
|
105
105
|
columnPinning: q,
|
|
106
|
-
columnOrder:
|
|
106
|
+
columnOrder: d
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
c.useEffect(() => {
|
|
@@ -113,8 +113,8 @@ function Te({
|
|
|
113
113
|
}
|
|
114
114
|
}, [i, a, l, u]);
|
|
115
115
|
const v = c.useRef([]), K = c.useCallback(() => {
|
|
116
|
-
v.current =
|
|
117
|
-
}, [
|
|
116
|
+
v.current = d.length > 0 ? [...d] : r.getAllLeafColumns().map((e) => e.id);
|
|
117
|
+
}, [d, r]), Q = c.useCallback(
|
|
118
118
|
(e) => {
|
|
119
119
|
m((o) => {
|
|
120
120
|
const s = o.length > 0 ? o : r.getAllLeafColumns().map((C) => C.id);
|
|
@@ -158,7 +158,7 @@ function Te({
|
|
|
158
158
|
const D = /* @__PURE__ */ t.jsx("div", { className: S("yuno-data-table space-y-4", P), children: /* @__PURE__ */ t.jsx(
|
|
159
159
|
"div",
|
|
160
160
|
{
|
|
161
|
-
className: "rounded-md border overflow-x-auto",
|
|
161
|
+
className: "yuno-data-table rounded-md border overflow-x-auto",
|
|
162
162
|
style: { height: L || "auto" },
|
|
163
163
|
children: /* @__PURE__ */ t.jsxs(ee, { className: S("table-fixed"), children: [
|
|
164
164
|
/* @__PURE__ */ t.jsx("colgroup", { children: r.getHeaderGroups()[0]?.headers.map((e) => {
|
|
@@ -179,7 +179,7 @@ function Te({
|
|
|
179
179
|
te,
|
|
180
180
|
{
|
|
181
181
|
table: r,
|
|
182
|
-
enableColumnResizing:
|
|
182
|
+
enableColumnResizing: f,
|
|
183
183
|
enableColumnDragDrop: p
|
|
184
184
|
}
|
|
185
185
|
),
|
|
@@ -187,7 +187,7 @@ function Te({
|
|
|
187
187
|
ne,
|
|
188
188
|
{
|
|
189
189
|
table: r,
|
|
190
|
-
enableColumnResizing:
|
|
190
|
+
enableColumnResizing: f,
|
|
191
191
|
onRowClick: A,
|
|
192
192
|
rowHeight: x
|
|
193
193
|
}
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
function
|
|
1
|
+
function f(e) {
|
|
2
2
|
return typeof e == "object" && e !== null && "title" in e && typeof e.title == "string";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function n(e) {
|
|
5
5
|
return typeof e.columnDef.header == "string" ? e.columnDef.header : e.columnDef.header && typeof e.columnDef.header == "object" && "title" in e.columnDef.header ? e.columnDef.header.title : e.id;
|
|
6
6
|
}
|
|
7
|
-
function o(e, t, i,
|
|
7
|
+
function o(e, t, i, r) {
|
|
8
8
|
return e ? {
|
|
9
9
|
position: "sticky",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// "right"-pinned columns (e.g. actions) stick to the inline-end edge.
|
|
13
|
-
insetInlineStart: e === "left" ? `${t("left")}px` : void 0,
|
|
14
|
-
insetInlineEnd: e === "right" ? `${i("right")}px` : void 0,
|
|
10
|
+
left: e === "left" ? `${t("left")}px` : void 0,
|
|
11
|
+
right: e === "right" ? `${i("right")}px` : void 0,
|
|
15
12
|
zIndex: 10,
|
|
16
|
-
backgroundColor:
|
|
13
|
+
backgroundColor: r
|
|
17
14
|
} : {};
|
|
18
15
|
}
|
|
19
16
|
export {
|
|
20
|
-
|
|
17
|
+
n as getColumnDisplayName,
|
|
21
18
|
o as getPinnedStyles,
|
|
22
|
-
|
|
19
|
+
f as isHeaderConfig
|
|
23
20
|
};
|