@yuno-payments/dashboard-design-system 2.0.16 → 2.1.0
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.d.ts +1 -31
- package/dist/components/atoms/filter/filter-date-range.js +144 -140
- package/dist/components/atoms/filter/filter-multi-input.d.ts +0 -11
- package/dist/components/atoms/filter/filter-multi-input.js +36 -42
- package/dist/components/atoms/filter/filter.d.ts +0 -30
- package/dist/components/atoms/filter/filter.js +171 -191
- package/dist/components/atoms/filter/index.d.ts +2 -2
- package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +2 -17
- package/dist/components/atoms/filter-dropdown/filter-dropdown.js +151 -160
- package/dist/components/atoms/icon/icon.d.ts +0 -6
- package/dist/components/atoms/icon/icon.js +21 -27
- package/dist/components/atoms/icon/index.d.ts +0 -1
- package/dist/components/atoms/index.d.ts +1 -1
- package/dist/components/atoms/radio-group/radio-group-option.js +2 -2
- package/dist/components/atoms/select/select.js +2 -2
- package/dist/components/molecules/pagination/index.d.ts +0 -1
- package/dist/components/molecules/pagination/page-numbers.d.ts +1 -3
- package/dist/components/molecules/pagination/page-numbers.js +9 -10
- package/dist/components/molecules/pagination/pagination.d.ts +0 -9
- package/dist/components/molecules/pagination/pagination.js +38 -46
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.d.ts +1 -3
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +27 -28
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +41 -44
- package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.d.ts +1 -3
- package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.js +44 -45
- package/dist/components/organisms/data-table/data-table.d.ts +2 -27
- package/dist/components/organisms/data-table/data-table.js +134 -146
- package/dist/components/organisms/data-table/data-table.types.d.ts +0 -68
- package/dist/components/organisms/data-table/index.d.ts +1 -2
- package/dist/components/organisms/data-table/utils/data-table-utils.js +8 -11
- package/dist/components/organisms/dialog/dialog.js +31 -31
- package/dist/components/organisms/sheet/sheet.js +23 -23
- package/dist/dashboard-design-system.css +4 -1
- package/dist/index.css +4 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.esm.min.js +8828 -9722
- package/dist/index.js +202 -208
- package/dist/index.umd.min.js +27 -27
- package/dist/lib/utils.d.ts +0 -13
- package/dist/lib/utils.js +10 -34
- package/dist/vendor/shadcn/combobox.js +9 -9
- package/dist/vendor/shadcn/dropdown-menu.js +2 -2
- package/dist/vendor/shadcn/pagination.d.ts +3 -19
- package/dist/vendor/shadcn/pagination.js +37 -41
- package/dist/vendor/shadcn/popover.js +8 -8
- package/dist/vendor/shadcn/select.js +33 -33
- package/dist/vendor/shadcn/switch.js +1 -1
- package/dist/vendor/shadcn/tooltip.js +9 -9
- package/package.json +2 -4
- package/registry/components-registry.json +12 -38
- package/dist/components/atoms/filter/filter-translations.d.ts +0 -75
- package/dist/components/atoms/filter/filter-translations.js +0 -450
- package/dist/components/atoms/icon/directional-icons.d.ts +0 -12
- package/dist/components/atoms/icon/directional-icons.js +0 -38
- package/dist/components/molecules/pagination/pagination-translations.d.ts +0 -33
- package/dist/components/molecules/pagination/pagination-translations.js +0 -82
- package/dist/components/organisms/data-table/data-table.types.js +0 -252
|
@@ -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 C } from "react";
|
|
3
|
+
import { Checkbox as j } from "../../../vendor/shadcn/checkbox.js";
|
|
4
|
+
import { cn as x } from "../../../lib/utils.js";
|
|
5
|
+
import { Label as k } from "../label/label.js";
|
|
6
|
+
const v = g(
|
|
7
7
|
({
|
|
8
8
|
label: n,
|
|
9
9
|
description: c,
|
|
@@ -15,7 +15,7 @@ const k = g(
|
|
|
15
15
|
info: l,
|
|
16
16
|
...p
|
|
17
17
|
}, h) => {
|
|
18
|
-
const u =
|
|
18
|
+
const u = C(), o = i || t || u, d = (r) => {
|
|
19
19
|
if (!a) return;
|
|
20
20
|
a({
|
|
21
21
|
target: {
|
|
@@ -35,8 +35,8 @@ const k = g(
|
|
|
35
35
|
stopPropagation: () => {
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
},
|
|
39
|
-
|
|
38
|
+
}, m = /* @__PURE__ */ e.jsx(
|
|
39
|
+
j,
|
|
40
40
|
{
|
|
41
41
|
ref: h,
|
|
42
42
|
id: o,
|
|
@@ -47,15 +47,15 @@ const k = 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
|
|
51
|
-
|
|
50
|
+
return n ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
51
|
+
m,
|
|
52
52
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
53
53
|
/* @__PURE__ */ e.jsx(
|
|
54
|
-
|
|
54
|
+
k,
|
|
55
55
|
{
|
|
56
56
|
htmlFor: o,
|
|
57
57
|
info: l,
|
|
58
|
-
className:
|
|
58
|
+
className: x(
|
|
59
59
|
"text-sm leading-none cursor-pointer",
|
|
60
60
|
s && "text-muted-foreground",
|
|
61
61
|
f
|
|
@@ -66,7 +66,7 @@ const k = g(
|
|
|
66
66
|
c && /* @__PURE__ */ e.jsx(
|
|
67
67
|
"p",
|
|
68
68
|
{
|
|
69
|
-
className:
|
|
69
|
+
className: x(
|
|
70
70
|
"text-sm text-muted-foreground",
|
|
71
71
|
s && "opacity-50"
|
|
72
72
|
),
|
|
@@ -74,10 +74,10 @@ const k = g(
|
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
] })
|
|
77
|
-
] }) :
|
|
77
|
+
] }) : m;
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
|
|
80
|
+
v.displayName = "Checkbox";
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
v as Checkbox
|
|
83
83
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { RadioGroup } from '../../../vendor/shadcn/radio-group';
|
|
3
|
-
import { FilterLanguage, FilterTranslations } from './filter-translations';
|
|
4
3
|
export declare const FilterDateRangeValue: {
|
|
5
4
|
readonly CUSTOM: "CUSTOM";
|
|
6
5
|
readonly TODAY: "TODAY";
|
|
@@ -17,21 +16,6 @@ interface FilterDateRangeOptionProps extends ComponentProps<"label"> {
|
|
|
17
16
|
value: string;
|
|
18
17
|
}
|
|
19
18
|
declare const FilterDateRangeOption: import('react').ForwardRefExoticComponent<Omit<FilterDateRangeOptionProps, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
20
|
-
/**
|
|
21
|
-
* Labels for date range filter options - allows i18n/translation support
|
|
22
|
-
* @deprecated Use `lang` prop or `translations` prop instead
|
|
23
|
-
*/
|
|
24
|
-
interface FilterDateRangeLabels {
|
|
25
|
-
custom?: string;
|
|
26
|
-
today?: string;
|
|
27
|
-
last3Days?: string;
|
|
28
|
-
last7Days?: string;
|
|
29
|
-
last30Days?: string;
|
|
30
|
-
thisMonth?: string;
|
|
31
|
-
allTime?: string;
|
|
32
|
-
startDate?: string;
|
|
33
|
-
endDate?: string;
|
|
34
|
-
}
|
|
35
19
|
interface FilterDateRangeProps extends ComponentProps<typeof RadioGroup> {
|
|
36
20
|
showCustomFields?: boolean;
|
|
37
21
|
onCustomFieldsChange?: (show: boolean) => void;
|
|
@@ -51,20 +35,6 @@ interface FilterDateRangeProps extends ComponentProps<typeof RadioGroup> {
|
|
|
51
35
|
* Announcement text to display at the top of the filter (e.g., timezone info)
|
|
52
36
|
*/
|
|
53
37
|
announcement?: ReactNode;
|
|
54
|
-
/**
|
|
55
|
-
* Labels for date preset options - enables i18n/translation support.
|
|
56
|
-
* @deprecated Use `lang` prop or `translations` prop instead
|
|
57
|
-
*/
|
|
58
|
-
labels?: FilterDateRangeLabels;
|
|
59
|
-
/**
|
|
60
|
-
* Language code for translations
|
|
61
|
-
* @default "en"
|
|
62
|
-
*/
|
|
63
|
-
lang?: FilterLanguage;
|
|
64
|
-
/**
|
|
65
|
-
* Custom translations (overrides lang-based translations)
|
|
66
|
-
*/
|
|
67
|
-
translations?: FilterTranslations;
|
|
68
38
|
}
|
|
69
39
|
declare const FilterDateRange: import('react').ForwardRefExoticComponent<Omit<FilterDateRangeProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
70
|
-
export { FilterDateRange, FilterDateRangeOption, type FilterDateRangeProps, type FilterDateRangeOptionProps,
|
|
40
|
+
export { FilterDateRange, FilterDateRangeOption, type FilterDateRangeProps, type FilterDateRangeOptionProps, };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { RadioGroup as
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const c = {
|
|
2
|
+
import { forwardRef as N, useMemo as b } from "react";
|
|
3
|
+
import { RadioGroup as H, RadioGroupItem as R } from "../../../vendor/shadcn/radio-group.js";
|
|
4
|
+
import { cn as j } from "../../../lib/utils.js";
|
|
5
|
+
import { Alert as C } from "../alert/alert.js";
|
|
6
|
+
import { DatePicker as h } from "../date-picker/date-picker.js";
|
|
7
|
+
import { TimePicker as y } from "../time-picker/time-picker.js";
|
|
8
|
+
const n = {
|
|
10
9
|
CUSTOM: "CUSTOM",
|
|
11
10
|
TODAY: "TODAY",
|
|
12
11
|
LAST_3_DAYS: "LAST_3_DAYS",
|
|
@@ -14,45 +13,71 @@ const c = {
|
|
|
14
13
|
LAST_30_DAYS: "LAST_30_DAYS",
|
|
15
14
|
THIS_MONTH: "THIS_MONTH",
|
|
16
15
|
ALL_TIME: "ALL_TIME"
|
|
17
|
-
},
|
|
18
|
-
const
|
|
19
|
-
return `${
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
}, i = (s) => {
|
|
17
|
+
const t = s.getDate();
|
|
18
|
+
return `${[
|
|
19
|
+
"Jan",
|
|
20
|
+
"Feb",
|
|
21
|
+
"Mar",
|
|
22
|
+
"Apr",
|
|
23
|
+
"May",
|
|
24
|
+
"Jun",
|
|
25
|
+
"Jul",
|
|
26
|
+
"Aug",
|
|
27
|
+
"Sep",
|
|
28
|
+
"Oct",
|
|
29
|
+
"Nov",
|
|
30
|
+
"Dec"
|
|
31
|
+
][s.getMonth()]} ${t}`;
|
|
32
|
+
}, F = (s) => {
|
|
33
|
+
const a = [
|
|
34
|
+
"Jan",
|
|
35
|
+
"Feb",
|
|
36
|
+
"Mar",
|
|
37
|
+
"Apr",
|
|
38
|
+
"May",
|
|
39
|
+
"Jun",
|
|
40
|
+
"Jul",
|
|
41
|
+
"Aug",
|
|
42
|
+
"Sep",
|
|
43
|
+
"Oct",
|
|
44
|
+
"Nov",
|
|
45
|
+
"Dec"
|
|
46
|
+
][s.getMonth()], o = s.getFullYear();
|
|
47
|
+
return `${a} ${o}`;
|
|
48
|
+
}, I = (s) => ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][s.getDay()], J = () => {
|
|
24
49
|
const s = /* @__PURE__ */ new Date();
|
|
25
50
|
s.setHours(0, 0, 0, 0);
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const
|
|
51
|
+
const t = `${I(s)}, ${i(s)}`, a = new Date(s);
|
|
52
|
+
a.setDate(a.getDate() - 2);
|
|
53
|
+
const o = `${i(a)} - ${i(s)}`, c = new Date(s);
|
|
54
|
+
c.setDate(c.getDate() - 6);
|
|
55
|
+
const m = `${i(c)} - ${i(s)}`, l = new Date(s);
|
|
56
|
+
l.setDate(l.getDate() - 29);
|
|
57
|
+
const x = `${i(l)} - ${i(s)}`, D = F(s);
|
|
33
58
|
return {
|
|
34
|
-
today:
|
|
35
|
-
last3Days:
|
|
36
|
-
last7Days:
|
|
37
|
-
last30Days:
|
|
38
|
-
thisMonth:
|
|
59
|
+
today: t,
|
|
60
|
+
last3Days: o,
|
|
61
|
+
last7Days: m,
|
|
62
|
+
last30Days: x,
|
|
63
|
+
thisMonth: D
|
|
39
64
|
};
|
|
40
|
-
},
|
|
41
|
-
({ label:
|
|
42
|
-
const
|
|
65
|
+
}, r = N(
|
|
66
|
+
({ label: s, description: t, value: a, className: o, ...c }, m) => {
|
|
67
|
+
const l = `date-range-${a}`;
|
|
43
68
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-4 w-full py-1", children: [
|
|
44
69
|
/* @__PURE__ */ e.jsxs(
|
|
45
70
|
"label",
|
|
46
71
|
{
|
|
47
|
-
ref:
|
|
48
|
-
className:
|
|
49
|
-
"flex-1 flex items-start gap-3 cursor-pointer
|
|
50
|
-
|
|
72
|
+
ref: m,
|
|
73
|
+
className: j(
|
|
74
|
+
"flex-1 flex items-start gap-3 cursor-pointer",
|
|
75
|
+
o
|
|
51
76
|
),
|
|
52
|
-
...
|
|
77
|
+
...c,
|
|
53
78
|
children: [
|
|
54
|
-
/* @__PURE__ */ e.jsx(
|
|
55
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none text-foreground", children:
|
|
79
|
+
/* @__PURE__ */ e.jsx(R, { id: l, value: a, className: "mt-px" }),
|
|
80
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none text-foreground", children: s }) })
|
|
56
81
|
]
|
|
57
82
|
}
|
|
58
83
|
),
|
|
@@ -60,97 +85,82 @@ const c = {
|
|
|
60
85
|
] });
|
|
61
86
|
}
|
|
62
87
|
);
|
|
63
|
-
|
|
64
|
-
const
|
|
88
|
+
r.displayName = "FilterDateRangeOption";
|
|
89
|
+
const P = N(
|
|
65
90
|
({
|
|
66
|
-
showCustomFields:
|
|
91
|
+
showCustomFields: s = !1,
|
|
67
92
|
onCustomFieldsChange: t,
|
|
68
|
-
startDate:
|
|
69
|
-
endDate:
|
|
70
|
-
startTime:
|
|
71
|
-
endTime:
|
|
72
|
-
onStartDateChange:
|
|
73
|
-
onEndDateChange:
|
|
74
|
-
onStartTimeChange:
|
|
75
|
-
onEndTimeChange:
|
|
76
|
-
mode:
|
|
77
|
-
singleDayLabel:
|
|
78
|
-
showAllTime:
|
|
79
|
-
className:
|
|
80
|
-
value:
|
|
81
|
-
onValueChange:
|
|
82
|
-
announcement:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
[S, _]
|
|
94
|
-
), b = (r) => {
|
|
95
|
-
C?.(r), t?.(r === c.CUSTOM);
|
|
96
|
-
}, P = (r) => {
|
|
97
|
-
if (r) {
|
|
98
|
-
const N = new Date(r);
|
|
99
|
-
N.setHours(0, 0, 0, 0);
|
|
100
|
-
const M = new Date(r);
|
|
101
|
-
M.setHours(23, 59, 59, 999), o?.(N), p?.(M);
|
|
93
|
+
startDate: a,
|
|
94
|
+
endDate: o,
|
|
95
|
+
startTime: c = "",
|
|
96
|
+
endTime: m = "",
|
|
97
|
+
onStartDateChange: l,
|
|
98
|
+
onEndDateChange: x,
|
|
99
|
+
onStartTimeChange: D,
|
|
100
|
+
onEndTimeChange: A,
|
|
101
|
+
mode: S = "range",
|
|
102
|
+
singleDayLabel: T = "Select date",
|
|
103
|
+
showAllTime: v = !1,
|
|
104
|
+
className: _,
|
|
105
|
+
value: M,
|
|
106
|
+
onValueChange: L,
|
|
107
|
+
announcement: f,
|
|
108
|
+
...w
|
|
109
|
+
}, O) => {
|
|
110
|
+
const p = b(() => J(), []), Y = (d) => {
|
|
111
|
+
L?.(d), t?.(d === n.CUSTOM);
|
|
112
|
+
}, $ = (d) => {
|
|
113
|
+
if (d) {
|
|
114
|
+
const u = new Date(d);
|
|
115
|
+
u.setHours(0, 0, 0, 0);
|
|
116
|
+
const g = new Date(d);
|
|
117
|
+
g.setHours(23, 59, 59, 999), l?.(u), x?.(g);
|
|
102
118
|
} else
|
|
103
|
-
|
|
119
|
+
l?.(void 0), x?.(void 0);
|
|
104
120
|
};
|
|
105
121
|
return /* @__PURE__ */ e.jsxs(
|
|
106
122
|
"div",
|
|
107
123
|
{
|
|
108
|
-
ref:
|
|
109
|
-
className:
|
|
124
|
+
ref: O,
|
|
125
|
+
className: j("flex flex-col gap-4 w-full", _),
|
|
110
126
|
children: [
|
|
111
|
-
|
|
127
|
+
f && (typeof f == "string" ? /* @__PURE__ */ e.jsx(C, { icon: "Info", description: f }) : f),
|
|
112
128
|
/* @__PURE__ */ e.jsxs(
|
|
113
|
-
|
|
129
|
+
H,
|
|
114
130
|
{
|
|
115
|
-
value:
|
|
116
|
-
onValueChange:
|
|
131
|
+
value: M,
|
|
132
|
+
onValueChange: Y,
|
|
117
133
|
className: "gap-2",
|
|
118
|
-
...
|
|
134
|
+
...w,
|
|
119
135
|
children: [
|
|
120
|
-
/* @__PURE__ */ e.jsx(
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
value: c.CUSTOM
|
|
125
|
-
}
|
|
126
|
-
),
|
|
127
|
-
l && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 ps-7 mb-2", children: [
|
|
128
|
-
j === "single" ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
129
|
-
A,
|
|
136
|
+
/* @__PURE__ */ e.jsx(r, { label: "Custom", value: n.CUSTOM }),
|
|
137
|
+
s && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 pl-7 mb-2", children: [
|
|
138
|
+
S === "single" ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
139
|
+
h,
|
|
130
140
|
{
|
|
131
|
-
date:
|
|
132
|
-
onChange:
|
|
133
|
-
placeholder:
|
|
141
|
+
date: a,
|
|
142
|
+
onChange: $,
|
|
143
|
+
placeholder: T,
|
|
134
144
|
className: "h-9",
|
|
135
145
|
iconPosition: "none"
|
|
136
146
|
}
|
|
137
147
|
) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex gap-4 items-start w-full", children: [
|
|
138
148
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
139
|
-
|
|
149
|
+
h,
|
|
140
150
|
{
|
|
141
|
-
date:
|
|
142
|
-
onChange:
|
|
143
|
-
placeholder:
|
|
151
|
+
date: a,
|
|
152
|
+
onChange: l,
|
|
153
|
+
placeholder: "Start date",
|
|
144
154
|
className: "h-9",
|
|
145
155
|
iconPosition: "none"
|
|
146
156
|
}
|
|
147
157
|
) }),
|
|
148
158
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
149
|
-
|
|
159
|
+
h,
|
|
150
160
|
{
|
|
151
|
-
date:
|
|
152
|
-
onChange:
|
|
153
|
-
placeholder:
|
|
161
|
+
date: o,
|
|
162
|
+
onChange: x,
|
|
163
|
+
placeholder: "End date",
|
|
154
164
|
className: "h-9",
|
|
155
165
|
iconPosition: "none"
|
|
156
166
|
}
|
|
@@ -158,20 +168,20 @@ const K = L(
|
|
|
158
168
|
] }),
|
|
159
169
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-4 items-start w-full", children: [
|
|
160
170
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
161
|
-
|
|
171
|
+
y,
|
|
162
172
|
{
|
|
163
|
-
value:
|
|
164
|
-
onChange:
|
|
173
|
+
value: c,
|
|
174
|
+
onChange: D,
|
|
165
175
|
mode: "dropdown",
|
|
166
176
|
use24Hour: !0,
|
|
167
177
|
width: "100%"
|
|
168
178
|
}
|
|
169
179
|
) }),
|
|
170
180
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
171
|
-
|
|
181
|
+
y,
|
|
172
182
|
{
|
|
173
|
-
value:
|
|
174
|
-
onChange:
|
|
183
|
+
value: m,
|
|
184
|
+
onChange: A,
|
|
175
185
|
mode: "dropdown",
|
|
176
186
|
use24Hour: !0,
|
|
177
187
|
width: "100%"
|
|
@@ -181,52 +191,46 @@ const K = L(
|
|
|
181
191
|
] }),
|
|
182
192
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
183
193
|
/* @__PURE__ */ e.jsx(
|
|
184
|
-
|
|
194
|
+
r,
|
|
185
195
|
{
|
|
186
|
-
label:
|
|
187
|
-
value:
|
|
188
|
-
description:
|
|
196
|
+
label: "Today",
|
|
197
|
+
value: n.TODAY,
|
|
198
|
+
description: p.today
|
|
189
199
|
}
|
|
190
200
|
),
|
|
191
201
|
/* @__PURE__ */ e.jsx(
|
|
192
|
-
|
|
202
|
+
r,
|
|
193
203
|
{
|
|
194
|
-
label:
|
|
195
|
-
value:
|
|
196
|
-
description:
|
|
204
|
+
label: "Last 3 days",
|
|
205
|
+
value: n.LAST_3_DAYS,
|
|
206
|
+
description: p.last3Days
|
|
197
207
|
}
|
|
198
208
|
),
|
|
199
209
|
/* @__PURE__ */ e.jsx(
|
|
200
|
-
|
|
210
|
+
r,
|
|
201
211
|
{
|
|
202
|
-
label:
|
|
203
|
-
value:
|
|
204
|
-
description:
|
|
212
|
+
label: "Last 7 days",
|
|
213
|
+
value: n.LAST_7_DAYS,
|
|
214
|
+
description: p.last7Days
|
|
205
215
|
}
|
|
206
216
|
),
|
|
207
217
|
/* @__PURE__ */ e.jsx(
|
|
208
|
-
|
|
218
|
+
r,
|
|
209
219
|
{
|
|
210
|
-
label:
|
|
211
|
-
value:
|
|
212
|
-
description:
|
|
220
|
+
label: "Last 30 days",
|
|
221
|
+
value: n.LAST_30_DAYS,
|
|
222
|
+
description: p.last30Days
|
|
213
223
|
}
|
|
214
224
|
),
|
|
215
225
|
/* @__PURE__ */ e.jsx(
|
|
216
|
-
|
|
226
|
+
r,
|
|
217
227
|
{
|
|
218
|
-
label:
|
|
219
|
-
value:
|
|
220
|
-
description:
|
|
228
|
+
label: "This month",
|
|
229
|
+
value: n.THIS_MONTH,
|
|
230
|
+
description: p.thisMonth
|
|
221
231
|
}
|
|
222
232
|
),
|
|
223
|
-
|
|
224
|
-
d,
|
|
225
|
-
{
|
|
226
|
-
label: n?.allTime ?? a.allTime,
|
|
227
|
-
value: c.ALL_TIME
|
|
228
|
-
}
|
|
229
|
-
)
|
|
233
|
+
v && /* @__PURE__ */ e.jsx(r, { label: "All time", value: n.ALL_TIME })
|
|
230
234
|
] })
|
|
231
235
|
]
|
|
232
236
|
}
|
|
@@ -236,9 +240,9 @@ const K = L(
|
|
|
236
240
|
);
|
|
237
241
|
}
|
|
238
242
|
);
|
|
239
|
-
|
|
243
|
+
P.displayName = "FilterDateRange";
|
|
240
244
|
export {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
245
|
+
P as FilterDateRange,
|
|
246
|
+
r as FilterDateRangeOption,
|
|
247
|
+
n as FilterDateRangeValue
|
|
244
248
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FilterLanguage, FilterTranslations } from './filter-translations';
|
|
2
1
|
/**
|
|
3
2
|
* Props for FilterMultiInput component
|
|
4
3
|
*/
|
|
@@ -50,15 +49,6 @@ export interface FilterMultiInputProps {
|
|
|
50
49
|
* @default false
|
|
51
50
|
*/
|
|
52
51
|
allowDuplicates?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Language code for translations
|
|
55
|
-
* @default "en"
|
|
56
|
-
*/
|
|
57
|
-
lang?: FilterLanguage;
|
|
58
|
-
/**
|
|
59
|
-
* Custom translations (overrides lang-based translations)
|
|
60
|
-
*/
|
|
61
|
-
translations?: FilterTranslations;
|
|
62
52
|
}
|
|
63
53
|
/**
|
|
64
54
|
* Filter section component for entering multiple values via an input field.
|
|
@@ -72,7 +62,6 @@ export interface FilterMultiInputProps {
|
|
|
72
62
|
* onChange={setSelectedBins}
|
|
73
63
|
* placeholder="Enter BIN(s) separated by comma"
|
|
74
64
|
* numericOnly
|
|
75
|
-
* lang="es"
|
|
76
65
|
* />
|
|
77
66
|
* ```
|
|
78
67
|
*/
|
|
@@ -1,56 +1,50 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Separator as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const A = h(
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
3
|
+
import { cn as j } from "../../../lib/utils.js";
|
|
4
|
+
import { Separator as b } from "../../../vendor/shadcn/separator.js";
|
|
5
|
+
import { MultiValuesField as h } from "../multi-values-field/multi-values-field.js";
|
|
6
|
+
const v = x(
|
|
8
7
|
({
|
|
9
|
-
title:
|
|
10
|
-
value:
|
|
11
|
-
onChange:
|
|
12
|
-
placeholder:
|
|
13
|
-
description:
|
|
14
|
-
error:
|
|
15
|
-
numericOnly:
|
|
16
|
-
maxItems:
|
|
17
|
-
disabled:
|
|
18
|
-
className:
|
|
19
|
-
allowDuplicates:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return r ? { ...t, ...r } : t;
|
|
26
|
-
}, [i, r]), b = d ? (t) => /^\d+$/.test(t) ? !0 : l.onlyNumericAllowed : void 0;
|
|
27
|
-
return /* @__PURE__ */ e.jsxs("div", { ref: j, className: y("flex flex-col h-full", u), children: [
|
|
28
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between mb-1", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-foreground", children: a }) }),
|
|
29
|
-
/* @__PURE__ */ e.jsx(g, { className: "w-full mb-6" }),
|
|
8
|
+
title: t,
|
|
9
|
+
value: l,
|
|
10
|
+
onChange: r,
|
|
11
|
+
placeholder: s = "Type and press Enter...",
|
|
12
|
+
description: a,
|
|
13
|
+
error: i,
|
|
14
|
+
numericOnly: o = !1,
|
|
15
|
+
maxItems: m,
|
|
16
|
+
disabled: n = !1,
|
|
17
|
+
className: f,
|
|
18
|
+
allowDuplicates: d = !1
|
|
19
|
+
}, u) => {
|
|
20
|
+
const c = o ? (p) => /^\d+$/.test(p) ? !0 : "Only numeric values are allowed" : void 0;
|
|
21
|
+
return /* @__PURE__ */ e.jsxs("div", { ref: u, className: j("flex flex-col h-full", f), children: [
|
|
22
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-between mb-1", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-foreground", children: t }) }),
|
|
23
|
+
/* @__PURE__ */ e.jsx(b, { className: "w-full mb-6" }),
|
|
30
24
|
/* @__PURE__ */ e.jsx(
|
|
31
|
-
|
|
25
|
+
h,
|
|
32
26
|
{
|
|
33
|
-
value:
|
|
34
|
-
onChange:
|
|
35
|
-
placeholder:
|
|
36
|
-
description:
|
|
37
|
-
error:
|
|
38
|
-
disabled:
|
|
39
|
-
maxItems:
|
|
40
|
-
allowDuplicates:
|
|
41
|
-
validate:
|
|
27
|
+
value: l,
|
|
28
|
+
onChange: r,
|
|
29
|
+
placeholder: s,
|
|
30
|
+
description: a,
|
|
31
|
+
error: i,
|
|
32
|
+
disabled: n,
|
|
33
|
+
maxItems: m,
|
|
34
|
+
allowDuplicates: d,
|
|
35
|
+
validate: c,
|
|
42
36
|
triggerKeys: ["Enter", "Tab", "Comma"],
|
|
43
|
-
deleteAll:
|
|
44
|
-
label:
|
|
37
|
+
deleteAll: l.length > 0 ? {
|
|
38
|
+
label: "Clear all",
|
|
45
39
|
length: 1,
|
|
46
|
-
onClick: () =>
|
|
40
|
+
onClick: () => r([])
|
|
47
41
|
} : void 0
|
|
48
42
|
}
|
|
49
43
|
)
|
|
50
44
|
] });
|
|
51
45
|
}
|
|
52
46
|
);
|
|
53
|
-
|
|
47
|
+
v.displayName = "FilterMultiInput";
|
|
54
48
|
export {
|
|
55
|
-
|
|
49
|
+
v as FilterMultiInput
|
|
56
50
|
};
|