@yuno-payments/dashboard-design-system 2.0.2 → 2.0.4-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.
- package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +3 -3
- package/dist/components/organisms/data-table/utils/data-table-styles.js +20 -23
- package/dist/dashboard-design-system.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.min.js +154 -137
- package/dist/index.umd.min.js +9 -9
- package/dist/vendor/shadcn/calendar.js +32 -26
- package/dist/vendor/shadcn/date-picker.d.ts +6 -1
- package/dist/vendor/shadcn/date-picker.js +68 -54
- package/package.json +1 -1
- package/registry/components-registry.json +4 -4
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as a } from "../../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { DayPicker as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { buttonVariants as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
className:
|
|
10
|
-
classNames:
|
|
11
|
-
showOutsideDays:
|
|
12
|
-
...
|
|
3
|
+
import { DayPicker as i } from "../../node_modules/react-day-picker/dist/index.esm.js";
|
|
4
|
+
import { cn as e } from "../../lib/utils.js";
|
|
5
|
+
import { buttonVariants as r } from "./button.js";
|
|
6
|
+
import c from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
7
|
+
import l from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
8
|
+
function m({
|
|
9
|
+
className: o,
|
|
10
|
+
classNames: n,
|
|
11
|
+
showOutsideDays: d = !0,
|
|
12
|
+
...t
|
|
13
13
|
}) {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const s = t.captionLayout === "dropdown" || t.captionLayout === "dropdown-buttons";
|
|
15
|
+
return /* @__PURE__ */ a.jsx(
|
|
16
|
+
i,
|
|
16
17
|
{
|
|
17
|
-
showOutsideDays:
|
|
18
|
-
className:
|
|
18
|
+
showOutsideDays: d,
|
|
19
|
+
className: e("p-3", o),
|
|
19
20
|
classNames: {
|
|
20
21
|
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
21
22
|
month: "space-y-4",
|
|
22
23
|
caption: "flex justify-center pt-1 relative items-center",
|
|
23
|
-
caption_label: "text-sm font-medium",
|
|
24
|
+
caption_label: e("text-sm font-medium", s && "hidden"),
|
|
25
|
+
caption_dropdowns: "flex gap-1 items-center",
|
|
26
|
+
dropdown: "appearance-none bg-transparent border border-input rounded-md px-2 py-1 text-sm cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring",
|
|
27
|
+
dropdown_month: "",
|
|
28
|
+
dropdown_year: "",
|
|
29
|
+
vhidden: "sr-only",
|
|
24
30
|
nav: "space-x-1 flex items-center",
|
|
25
|
-
nav_button:
|
|
26
|
-
|
|
31
|
+
nav_button: e(
|
|
32
|
+
r({ variant: "outline" }),
|
|
27
33
|
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
28
34
|
),
|
|
29
35
|
nav_button_previous: "absolute left-1",
|
|
@@ -33,8 +39,8 @@ function l({
|
|
|
33
39
|
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
34
40
|
row: "flex w-full mt-2",
|
|
35
41
|
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
36
|
-
day:
|
|
37
|
-
|
|
42
|
+
day: e(
|
|
43
|
+
r({ variant: "ghost" }),
|
|
38
44
|
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
39
45
|
),
|
|
40
46
|
day_range_end: "day-range-end",
|
|
@@ -44,17 +50,17 @@ function l({
|
|
|
44
50
|
day_disabled: "text-muted-foreground opacity-50",
|
|
45
51
|
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
46
52
|
day_hidden: "invisible",
|
|
47
|
-
...
|
|
53
|
+
...n
|
|
48
54
|
},
|
|
49
55
|
components: {
|
|
50
|
-
IconLeft: () => /* @__PURE__ */
|
|
51
|
-
IconRight: () => /* @__PURE__ */
|
|
56
|
+
IconLeft: () => /* @__PURE__ */ a.jsx(l, { className: "h-4 w-4" }),
|
|
57
|
+
IconRight: () => /* @__PURE__ */ a.jsx(c, { className: "h-4 w-4" })
|
|
52
58
|
},
|
|
53
|
-
...
|
|
59
|
+
...t
|
|
54
60
|
}
|
|
55
61
|
);
|
|
56
62
|
}
|
|
57
|
-
|
|
63
|
+
m.displayName = "Calendar";
|
|
58
64
|
export {
|
|
59
|
-
|
|
65
|
+
m as Calendar
|
|
60
66
|
};
|
|
@@ -16,5 +16,10 @@ export interface DatePickerProps {
|
|
|
16
16
|
required?: boolean;
|
|
17
17
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
18
18
|
id?: string;
|
|
19
|
+
captionLayout?: "dropdown" | "buttons" | "dropdown-buttons";
|
|
20
|
+
fromYear?: number;
|
|
21
|
+
toYear?: number;
|
|
22
|
+
fromMonth?: Date;
|
|
23
|
+
toMonth?: Date;
|
|
19
24
|
}
|
|
20
|
-
export declare function DatePicker({ date, onChange, placeholder, disabled, className, iconPosition, minDate, maxDate, dateFormat, label, error, description, info, requiredIndicator, required, orientation, id, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function DatePicker({ date, onChange, placeholder, disabled, className, iconPosition, minDate, maxDate, dateFormat, label, error, description, info, requiredIndicator, required, orientation, id, captionLayout, fromYear, toYear, fromMonth, toMonth, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,97 +1,111 @@
|
|
|
1
1
|
import { j as e } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useId as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Calendar as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { Field as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { Label as
|
|
11
|
-
import { format as
|
|
12
|
-
function
|
|
2
|
+
import { useId as I } from "react";
|
|
3
|
+
import { cn as u } from "../../lib/utils.js";
|
|
4
|
+
import { Button as M } from "./button.js";
|
|
5
|
+
import { Calendar as B } from "./calendar.js";
|
|
6
|
+
import { Popover as S, PopoverTrigger as D, PopoverContent as L } from "./popover.js";
|
|
7
|
+
import { Field as R, FieldDescription as T, FieldError as z } from "./field.js";
|
|
8
|
+
import A from "../../node_modules/lucide-react/dist/esm/icons/calendar.js";
|
|
9
|
+
import G from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
10
|
+
import { Label as H } from "../../components/atoms/label/label.js";
|
|
11
|
+
import { format as J } from "../../node_modules/date-fns/format.js";
|
|
12
|
+
function ee({
|
|
13
13
|
date: s,
|
|
14
|
-
onChange:
|
|
15
|
-
placeholder:
|
|
16
|
-
disabled:
|
|
17
|
-
className:
|
|
18
|
-
iconPosition:
|
|
19
|
-
minDate:
|
|
20
|
-
maxDate:
|
|
14
|
+
onChange: j,
|
|
15
|
+
placeholder: v = "Pick a date",
|
|
16
|
+
disabled: m = !1,
|
|
17
|
+
className: f,
|
|
18
|
+
iconPosition: p = "start",
|
|
19
|
+
minDate: i,
|
|
20
|
+
maxDate: a,
|
|
21
21
|
dateFormat: w = "MMM d, yyyy",
|
|
22
|
-
label:
|
|
22
|
+
label: l,
|
|
23
23
|
error: t,
|
|
24
24
|
description: o,
|
|
25
|
-
info:
|
|
26
|
-
requiredIndicator:
|
|
25
|
+
info: n,
|
|
26
|
+
requiredIndicator: d,
|
|
27
27
|
required: y = !1,
|
|
28
28
|
orientation: g = "vertical",
|
|
29
|
-
id: C
|
|
29
|
+
id: C,
|
|
30
|
+
captionLayout: b,
|
|
31
|
+
fromYear: N,
|
|
32
|
+
toYear: P,
|
|
33
|
+
fromMonth: F,
|
|
34
|
+
toMonth: k
|
|
30
35
|
}) {
|
|
31
|
-
const
|
|
32
|
-
/* @__PURE__ */ e.jsx(
|
|
33
|
-
|
|
36
|
+
const E = I(), r = C || E, c = !!t, $ = p === "start", x = p === "end", h = /* @__PURE__ */ e.jsxs(S, { children: [
|
|
37
|
+
/* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
38
|
+
M,
|
|
34
39
|
{
|
|
35
40
|
variant: "outline",
|
|
36
|
-
className:
|
|
41
|
+
className: u(
|
|
37
42
|
"w-full text-left font-normal h-9",
|
|
38
|
-
|
|
43
|
+
x ? "justify-between" : "justify-start",
|
|
39
44
|
!s && "text-muted-foreground",
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
c && "border-destructive focus-visible:border-destructive",
|
|
46
|
+
f
|
|
42
47
|
),
|
|
43
|
-
disabled:
|
|
44
|
-
"aria-invalid":
|
|
48
|
+
disabled: m,
|
|
49
|
+
"aria-invalid": c ? !0 : void 0,
|
|
45
50
|
"aria-describedby": o || t ? `${r}-description` : void 0,
|
|
46
51
|
id: r,
|
|
47
52
|
children: [
|
|
48
53
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
49
|
-
|
|
50
|
-
s ?
|
|
54
|
+
$ && /* @__PURE__ */ e.jsx(A, { className: "h-4 w-4" }),
|
|
55
|
+
s ? J(s, w) : /* @__PURE__ */ e.jsx("span", { children: v })
|
|
51
56
|
] }),
|
|
52
|
-
|
|
57
|
+
x && /* @__PURE__ */ e.jsx(G, { className: "h-4 w-4 opacity-50" })
|
|
53
58
|
]
|
|
54
59
|
}
|
|
55
60
|
) }),
|
|
56
|
-
/* @__PURE__ */ e.jsx(
|
|
57
|
-
|
|
61
|
+
/* @__PURE__ */ e.jsx(L, { className: "w-auto p-0", children: /* @__PURE__ */ e.jsx(
|
|
62
|
+
B,
|
|
58
63
|
{
|
|
59
64
|
mode: "single",
|
|
60
65
|
selected: s,
|
|
61
|
-
onSelect:
|
|
66
|
+
onSelect: j,
|
|
62
67
|
initialFocus: !0,
|
|
63
|
-
fromDate:
|
|
64
|
-
toDate:
|
|
68
|
+
fromDate: i,
|
|
69
|
+
toDate: a,
|
|
70
|
+
disabled: [
|
|
71
|
+
...i ? [{ before: i }] : [],
|
|
72
|
+
...a ? [{ after: a }] : []
|
|
73
|
+
],
|
|
74
|
+
captionLayout: b,
|
|
75
|
+
fromYear: N,
|
|
76
|
+
toYear: P,
|
|
77
|
+
fromMonth: F,
|
|
78
|
+
toMonth: k
|
|
65
79
|
}
|
|
66
80
|
) })
|
|
67
81
|
] });
|
|
68
|
-
return
|
|
69
|
-
|
|
82
|
+
return l || t || o || n || d ? /* @__PURE__ */ e.jsxs(
|
|
83
|
+
R,
|
|
70
84
|
{
|
|
71
85
|
orientation: g,
|
|
72
|
-
"data-invalid":
|
|
73
|
-
className:
|
|
86
|
+
"data-invalid": c,
|
|
87
|
+
className: u("w-full", f),
|
|
74
88
|
children: [
|
|
75
|
-
(
|
|
76
|
-
|
|
89
|
+
(l || n || d) && /* @__PURE__ */ e.jsx(
|
|
90
|
+
H,
|
|
77
91
|
{
|
|
78
92
|
htmlFor: r,
|
|
79
|
-
info:
|
|
80
|
-
requiredIndicator:
|
|
93
|
+
info: n,
|
|
94
|
+
requiredIndicator: d,
|
|
81
95
|
required: y,
|
|
82
|
-
disabled:
|
|
83
|
-
children:
|
|
96
|
+
disabled: m,
|
|
97
|
+
children: l
|
|
84
98
|
}
|
|
85
99
|
),
|
|
86
100
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
87
|
-
|
|
88
|
-
o && !t && /* @__PURE__ */ e.jsx(
|
|
89
|
-
t && /* @__PURE__ */ e.jsx(
|
|
101
|
+
h,
|
|
102
|
+
o && !t && /* @__PURE__ */ e.jsx(T, { id: `${r}-description`, children: o }),
|
|
103
|
+
t && /* @__PURE__ */ e.jsx(z, { id: `${r}-description`, children: t })
|
|
90
104
|
] })
|
|
91
105
|
]
|
|
92
106
|
}
|
|
93
|
-
) :
|
|
107
|
+
) : h;
|
|
94
108
|
}
|
|
95
109
|
export {
|
|
96
|
-
|
|
110
|
+
ee as DatePicker
|
|
97
111
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.2",
|
|
3
|
-
"generatedAt": "2026-03-
|
|
2
|
+
"version": "2.0.4-beta.2",
|
|
3
|
+
"generatedAt": "2026-03-19T00:50:25.015Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "AccessDeniedAlert",
|
|
@@ -801,8 +801,8 @@
|
|
|
801
801
|
"code": "<DatePicker placeholder=\"Pick a date\" disabled />"
|
|
802
802
|
},
|
|
803
803
|
{
|
|
804
|
-
"name": "
|
|
805
|
-
"code": "<DatePicker
|
|
804
|
+
"name": "DropdownNavigation",
|
|
805
|
+
"code": "<DatePicker disabled={false} />"
|
|
806
806
|
}
|
|
807
807
|
]
|
|
808
808
|
},
|