@yuno-payments/dashboard-design-system 2.0.6 → 2.0.8
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/checkbox/checkbox.js +16 -16
- package/dist/components/atoms/filter/filter-date-range.js +28 -28
- package/dist/components/atoms/filter/filter.js +12 -12
- package/dist/components/atoms/radio-group/radio-group-option.js +7 -7
- package/dist/dashboard-design-system.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.min.js +1018 -1018
- package/dist/index.umd.min.js +3 -3
- package/package.json +1 -1
- package/registry/components-registry.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as g, useId as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Label as
|
|
6
|
-
const
|
|
2
|
+
import { forwardRef as g, useId as v } from "react";
|
|
3
|
+
import { Checkbox as C } from "../../../vendor/shadcn/checkbox.js";
|
|
4
|
+
import { cn as m } from "../../../lib/utils.js";
|
|
5
|
+
import { Label as j } from "../label/label.js";
|
|
6
|
+
const k = g(
|
|
7
7
|
({
|
|
8
8
|
label: n,
|
|
9
9
|
description: c,
|
|
@@ -15,7 +15,7 @@ const v = g(
|
|
|
15
15
|
info: l,
|
|
16
16
|
...p
|
|
17
17
|
}, h) => {
|
|
18
|
-
const u =
|
|
18
|
+
const u = v(), o = i || t || u, d = (r) => {
|
|
19
19
|
if (!a) return;
|
|
20
20
|
a({
|
|
21
21
|
target: {
|
|
@@ -35,8 +35,8 @@ const v = g(
|
|
|
35
35
|
stopPropagation: () => {
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
},
|
|
39
|
-
|
|
38
|
+
}, x = /* @__PURE__ */ e.jsx(
|
|
39
|
+
C,
|
|
40
40
|
{
|
|
41
41
|
ref: h,
|
|
42
42
|
id: o,
|
|
@@ -47,15 +47,15 @@ const v = g(
|
|
|
47
47
|
className: "size-3.5 cursor-pointer"
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
return n ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
51
|
-
|
|
50
|
+
return n ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2 rtl:flex-row-reverse", children: [
|
|
51
|
+
x,
|
|
52
52
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
53
53
|
/* @__PURE__ */ e.jsx(
|
|
54
|
-
|
|
54
|
+
j,
|
|
55
55
|
{
|
|
56
56
|
htmlFor: o,
|
|
57
57
|
info: l,
|
|
58
|
-
className:
|
|
58
|
+
className: m(
|
|
59
59
|
"text-sm leading-none cursor-pointer",
|
|
60
60
|
s && "text-muted-foreground",
|
|
61
61
|
f
|
|
@@ -66,7 +66,7 @@ const v = g(
|
|
|
66
66
|
c && /* @__PURE__ */ e.jsx(
|
|
67
67
|
"p",
|
|
68
68
|
{
|
|
69
|
-
className:
|
|
69
|
+
className: m(
|
|
70
70
|
"text-sm text-muted-foreground",
|
|
71
71
|
s && "opacity-50"
|
|
72
72
|
),
|
|
@@ -74,10 +74,10 @@ const v = g(
|
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
] })
|
|
77
|
-
] }) :
|
|
77
|
+
] }) : x;
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
|
|
80
|
+
k.displayName = "Checkbox";
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
k as Checkbox
|
|
83
83
|
};
|
|
@@ -18,36 +18,36 @@ const c = {
|
|
|
18
18
|
const s = l.getDate();
|
|
19
19
|
return `${t[l.getMonth()]} ${s}`;
|
|
20
20
|
}, z = (l, t) => {
|
|
21
|
-
const s = t[l.getMonth()],
|
|
22
|
-
return `${s} ${
|
|
21
|
+
const s = t[l.getMonth()], i = l.getFullYear();
|
|
22
|
+
return `${s} ${i}`;
|
|
23
23
|
}, B = (l, t) => t[l.getDay()], J = (l, t) => {
|
|
24
24
|
const s = /* @__PURE__ */ new Date();
|
|
25
25
|
s.setHours(0, 0, 0, 0);
|
|
26
|
-
const
|
|
26
|
+
const i = `${B(s, l)}, ${D(s, t)}`, x = new Date(s);
|
|
27
27
|
x.setDate(x.getDate() - 2);
|
|
28
|
-
const
|
|
28
|
+
const f = `${D(x, t)} - ${D(s, t)}`, o = new Date(s);
|
|
29
29
|
o.setDate(o.getDate() - 6);
|
|
30
|
-
const
|
|
30
|
+
const p = `${D(o, t)} - ${D(s, t)}`, m = new Date(s);
|
|
31
31
|
m.setDate(m.getDate() - 29);
|
|
32
32
|
const y = `${D(m, t)} - ${D(s, t)}`, j = z(s, t);
|
|
33
33
|
return {
|
|
34
|
-
today:
|
|
35
|
-
last3Days:
|
|
36
|
-
last7Days:
|
|
34
|
+
today: i,
|
|
35
|
+
last3Days: f,
|
|
36
|
+
last7Days: p,
|
|
37
37
|
last30Days: y,
|
|
38
38
|
thisMonth: j
|
|
39
39
|
};
|
|
40
40
|
}, d = L(
|
|
41
|
-
({ label: l, description: t, value: s, className:
|
|
41
|
+
({ label: l, description: t, value: s, className: i, ...x }, f) => {
|
|
42
42
|
const o = `date-range-${s}`;
|
|
43
43
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-4 w-full py-1", children: [
|
|
44
44
|
/* @__PURE__ */ e.jsxs(
|
|
45
45
|
"label",
|
|
46
46
|
{
|
|
47
|
-
ref:
|
|
47
|
+
ref: f,
|
|
48
48
|
className: O(
|
|
49
|
-
"flex-1 flex items-start gap-3 cursor-pointer",
|
|
50
|
-
|
|
49
|
+
"flex-1 flex items-start gap-3 cursor-pointer rtl:flex-row-reverse",
|
|
50
|
+
i
|
|
51
51
|
),
|
|
52
52
|
...x,
|
|
53
53
|
children: [
|
|
@@ -66,11 +66,11 @@ const K = L(
|
|
|
66
66
|
showCustomFields: l = !1,
|
|
67
67
|
onCustomFieldsChange: t,
|
|
68
68
|
startDate: s,
|
|
69
|
-
endDate:
|
|
69
|
+
endDate: i,
|
|
70
70
|
startTime: x = "",
|
|
71
|
-
endTime:
|
|
71
|
+
endTime: f = "",
|
|
72
72
|
onStartDateChange: o,
|
|
73
|
-
onEndDateChange:
|
|
73
|
+
onEndDateChange: p,
|
|
74
74
|
onStartTimeChange: m,
|
|
75
75
|
onEndTimeChange: y,
|
|
76
76
|
mode: j = "range",
|
|
@@ -86,21 +86,21 @@ const K = L(
|
|
|
86
86
|
...F
|
|
87
87
|
}, I) => {
|
|
88
88
|
const a = u(() => {
|
|
89
|
-
const
|
|
90
|
-
return T ? { ...
|
|
89
|
+
const r = E(v);
|
|
90
|
+
return T ? { ...r, ...T } : r;
|
|
91
91
|
}, [v, T]), S = u(() => G(a), [a]), _ = u(() => V(a), [a]), g = u(
|
|
92
92
|
() => J(S, _),
|
|
93
93
|
[S, _]
|
|
94
|
-
), b = (
|
|
95
|
-
C?.(
|
|
96
|
-
}, P = (
|
|
97
|
-
if (
|
|
98
|
-
const N = new Date(
|
|
94
|
+
), b = (r) => {
|
|
95
|
+
C?.(r), t?.(r === c.CUSTOM);
|
|
96
|
+
}, P = (r) => {
|
|
97
|
+
if (r) {
|
|
98
|
+
const N = new Date(r);
|
|
99
99
|
N.setHours(0, 0, 0, 0);
|
|
100
|
-
const M = new Date(
|
|
101
|
-
M.setHours(23, 59, 59, 999), o?.(N),
|
|
100
|
+
const M = new Date(r);
|
|
101
|
+
M.setHours(23, 59, 59, 999), o?.(N), p?.(M);
|
|
102
102
|
} else
|
|
103
|
-
o?.(void 0),
|
|
103
|
+
o?.(void 0), p?.(void 0);
|
|
104
104
|
};
|
|
105
105
|
return /* @__PURE__ */ e.jsxs(
|
|
106
106
|
"div",
|
|
@@ -148,8 +148,8 @@ const K = L(
|
|
|
148
148
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
149
149
|
A,
|
|
150
150
|
{
|
|
151
|
-
date:
|
|
152
|
-
onChange:
|
|
151
|
+
date: i,
|
|
152
|
+
onChange: p,
|
|
153
153
|
placeholder: n?.endDate ?? a.endDate,
|
|
154
154
|
className: "h-9",
|
|
155
155
|
iconPosition: "none"
|
|
@@ -170,7 +170,7 @@ const K = L(
|
|
|
170
170
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
171
171
|
w,
|
|
172
172
|
{
|
|
173
|
-
value:
|
|
173
|
+
value: f,
|
|
174
174
|
onChange: y,
|
|
175
175
|
mode: "dropdown",
|
|
176
176
|
use24Hour: !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { forwardRef as p, useMemo as k, useState as Q } from "react";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as w } from "../../../vendor/shadcn/button.js";
|
|
4
4
|
import { Badge as I } from "../../../vendor/shadcn/badge.js";
|
|
5
5
|
import { Separator as S } from "../../../vendor/shadcn/separator.js";
|
|
6
6
|
import { Checkbox as D } from "../../../vendor/shadcn/checkbox.js";
|
|
@@ -49,10 +49,10 @@ const H = p(
|
|
|
49
49
|
const f = k(() => {
|
|
50
50
|
const o = T(m);
|
|
51
51
|
return c ? { ...o, ...c } : o;
|
|
52
|
-
}, [m, c]), x = s.length > 0,
|
|
52
|
+
}, [m, c]), x = s.length > 0, F = s.slice(0, a), b = s.length - a;
|
|
53
53
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
54
54
|
/* @__PURE__ */ e.jsxs(
|
|
55
|
-
|
|
55
|
+
w,
|
|
56
56
|
{
|
|
57
57
|
ref: y,
|
|
58
58
|
variant: "outline",
|
|
@@ -68,7 +68,7 @@ const H = p(
|
|
|
68
68
|
x && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
69
69
|
/* @__PURE__ */ e.jsx(S, { orientation: "vertical", className: "h-5" }),
|
|
70
70
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
71
|
-
|
|
71
|
+
F.map((o) => /* @__PURE__ */ e.jsx(
|
|
72
72
|
A,
|
|
73
73
|
{
|
|
74
74
|
label: o.label,
|
|
@@ -78,7 +78,7 @@ const H = p(
|
|
|
78
78
|
)),
|
|
79
79
|
b > 0 && /* @__PURE__ */ e.jsx(I, { variant: "default", className: "h-8 px-3 py-2 shadow-xs", children: /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none", children: q(f, b) }) }),
|
|
80
80
|
n && /* @__PURE__ */ e.jsx(
|
|
81
|
-
|
|
81
|
+
w,
|
|
82
82
|
{
|
|
83
83
|
variant: "ghost",
|
|
84
84
|
size: "sm",
|
|
@@ -109,7 +109,7 @@ const J = p(
|
|
|
109
109
|
enableSelectAll: y = !0,
|
|
110
110
|
enableInverse: f = !0,
|
|
111
111
|
enableNone: x = !0,
|
|
112
|
-
description:
|
|
112
|
+
description: F,
|
|
113
113
|
lang: b,
|
|
114
114
|
translations: o
|
|
115
115
|
} = s, C = k(() => {
|
|
@@ -160,12 +160,12 @@ const J = p(
|
|
|
160
160
|
className: "mb-4"
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
|
|
163
|
+
F && /* @__PURE__ */ e.jsx("p", { className: "text-xs font-normal text-muted-foreground mb-4", children: F }),
|
|
164
164
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between mb-1", children: [
|
|
165
165
|
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-foreground", children: n }),
|
|
166
166
|
d && g === "checkbox" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-4", children: [
|
|
167
167
|
y && /* @__PURE__ */ e.jsx(
|
|
168
|
-
|
|
168
|
+
w,
|
|
169
169
|
{
|
|
170
170
|
variant: "link",
|
|
171
171
|
size: "sm",
|
|
@@ -175,7 +175,7 @@ const J = p(
|
|
|
175
175
|
}
|
|
176
176
|
),
|
|
177
177
|
f && /* @__PURE__ */ e.jsx(
|
|
178
|
-
|
|
178
|
+
w,
|
|
179
179
|
{
|
|
180
180
|
variant: "link",
|
|
181
181
|
size: "sm",
|
|
@@ -185,7 +185,7 @@ const J = p(
|
|
|
185
185
|
}
|
|
186
186
|
),
|
|
187
187
|
x && /* @__PURE__ */ e.jsx(
|
|
188
|
-
|
|
188
|
+
w,
|
|
189
189
|
{
|
|
190
190
|
variant: "link",
|
|
191
191
|
size: "sm",
|
|
@@ -228,7 +228,7 @@ const J = p(
|
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
J.displayName = "FilterSection";
|
|
231
|
-
const L = p(({ label: s, checked: l, onCheckedChange: n, description: a, className: r, icon: m }, c) => /* @__PURE__ */ e.jsxs("label", { className: v("flex items-start gap-2 cursor-pointer", r), children: [
|
|
231
|
+
const L = p(({ label: s, checked: l, onCheckedChange: n, description: a, className: r, icon: m }, c) => /* @__PURE__ */ e.jsxs("label", { className: v("flex items-start gap-2 cursor-pointer rtl:flex-row-reverse", r), children: [
|
|
232
232
|
/* @__PURE__ */ e.jsx(D, { ref: c, checked: l, onCheckedChange: n }),
|
|
233
233
|
m && /* @__PURE__ */ e.jsx(
|
|
234
234
|
"img",
|
|
@@ -248,7 +248,7 @@ const L = p(({ label: s, checked: l, onCheckedChange: n, description: a, classNa
|
|
|
248
248
|
] }));
|
|
249
249
|
L.displayName = "FilterCheckboxOption";
|
|
250
250
|
const O = p(
|
|
251
|
-
({ label: s, value: l, description: n, className: a }, r) => /* @__PURE__ */ e.jsxs("div", { className: v("flex items-start gap-3", a), children: [
|
|
251
|
+
({ label: s, value: l, description: n, className: a }, r) => /* @__PURE__ */ e.jsxs("div", { className: v("flex items-start gap-3 rtl:flex-row-reverse", a), children: [
|
|
252
252
|
/* @__PURE__ */ e.jsx(U, { ref: r, value: l, id: `radio-${l}` }),
|
|
253
253
|
/* @__PURE__ */ e.jsxs(
|
|
254
254
|
"label",
|
|
@@ -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,
|
|
@@ -9,7 +9,7 @@ const o = ({
|
|
|
9
9
|
}) => /* @__PURE__ */ r.jsxs(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
12
|
-
className: t ? "flex items-center gap-3" : "flex items-start gap-3",
|
|
12
|
+
className: t ? "flex items-center gap-3 rtl:flex-row-reverse" : "flex items-start gap-3 rtl:flex-row-reverse",
|
|
13
13
|
children: [
|
|
14
14
|
/* @__PURE__ */ r.jsx(
|
|
15
15
|
d,
|
|
@@ -22,10 +22,10 @@ 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
|
),
|
|
@@ -35,10 +35,10 @@ const o = ({
|
|
|
35
35
|
e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground ms-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
|
),
|