@yuno-payments/dashboard-design-system 0.0.68 → 0.0.69
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/select/index.d.ts +2 -0
- package/dist/components/atoms/select/search-select.d.ts +22 -0
- package/dist/components/atoms/time-picker/time-picker.d.ts +2 -1
- package/dist/components/atoms/time-picker/time-picker.js +36 -32
- package/dist/vendor/shadcn/date-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-picker.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SelectOption, SelectOptionGroup } from './select';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface SearchSelectProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onValueChange?: (value: string) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
options?: SelectOption[];
|
|
14
|
+
groups?: SelectOptionGroup[];
|
|
15
|
+
className?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
searchPlaceholder?: string;
|
|
18
|
+
maxHeight?: number;
|
|
19
|
+
}
|
|
20
|
+
declare const SearchSelect: React.ForwardRefExoticComponent<SearchSelectProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
export { SearchSelect };
|
|
22
|
+
export type { SearchSelectProps };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { TimePickerProps as TimePickerPrimitiveProps } from '../../../vendor/shadcn/time-picker';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
export interface TimePickerProps extends TimePickerPrimitiveProps {
|
|
3
|
+
export interface TimePickerProps extends Omit<TimePickerPrimitiveProps, "onChange"> {
|
|
4
4
|
label?: string;
|
|
5
5
|
error?: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
8
9
|
}
|
|
9
10
|
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
11
|
export { TimePicker };
|
|
@@ -1,52 +1,56 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import * as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { TimePicker as
|
|
6
|
-
import { Field as
|
|
7
|
-
const
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { useId as h } from "react";
|
|
4
|
+
import { cn as c } from "../../../lib/utils.js";
|
|
5
|
+
import { TimePicker as j } from "../../../vendor/shadcn/time-picker.js";
|
|
6
|
+
import { Field as k, FieldLabel as P, FieldDescription as F, FieldError as g } from "../../../vendor/shadcn/field.js";
|
|
7
|
+
const T = v.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
className: o,
|
|
10
|
-
label:
|
|
10
|
+
label: s,
|
|
11
11
|
error: i,
|
|
12
12
|
description: r,
|
|
13
|
-
orientation:
|
|
13
|
+
orientation: m = "vertical",
|
|
14
14
|
id: n,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
onValueChange: l,
|
|
16
|
+
...f
|
|
17
|
+
}, x) => {
|
|
18
|
+
const p = h(), t = n || p, d = !!i, a = /* @__PURE__ */ e.jsx(
|
|
19
|
+
j,
|
|
19
20
|
{
|
|
20
|
-
ref:
|
|
21
|
-
id:
|
|
22
|
-
className:
|
|
23
|
-
|
|
24
|
-
!(
|
|
21
|
+
ref: x,
|
|
22
|
+
id: t,
|
|
23
|
+
className: c(
|
|
24
|
+
d && "border-destructive focus-visible:border-destructive",
|
|
25
|
+
!(s || i || r) && o
|
|
25
26
|
),
|
|
26
|
-
"aria-invalid":
|
|
27
|
-
"aria-describedby": r || i ? `${
|
|
28
|
-
|
|
27
|
+
"aria-invalid": d ? !0 : void 0,
|
|
28
|
+
"aria-describedby": r || i ? `${t}-description` : void 0,
|
|
29
|
+
onChange: (u) => {
|
|
30
|
+
l?.(u.target.value);
|
|
31
|
+
},
|
|
32
|
+
...f
|
|
29
33
|
}
|
|
30
34
|
);
|
|
31
|
-
return
|
|
32
|
-
|
|
35
|
+
return s || i || r ? /* @__PURE__ */ e.jsxs(
|
|
36
|
+
k,
|
|
33
37
|
{
|
|
34
|
-
orientation:
|
|
35
|
-
"data-invalid":
|
|
36
|
-
className:
|
|
38
|
+
orientation: m,
|
|
39
|
+
"data-invalid": d,
|
|
40
|
+
className: c("w-full", o),
|
|
37
41
|
children: [
|
|
38
|
-
|
|
42
|
+
s && /* @__PURE__ */ e.jsx(P, { htmlFor: t, children: s }),
|
|
39
43
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
40
|
-
|
|
41
|
-
r && !i && /* @__PURE__ */ e.jsx(
|
|
42
|
-
i && /* @__PURE__ */ e.jsx(
|
|
44
|
+
a,
|
|
45
|
+
r && !i && /* @__PURE__ */ e.jsx(F, { id: `${t}-description`, children: r }),
|
|
46
|
+
i && /* @__PURE__ */ e.jsx(g, { id: `${t}-description`, children: i })
|
|
43
47
|
] })
|
|
44
48
|
]
|
|
45
49
|
}
|
|
46
|
-
) :
|
|
50
|
+
) : a;
|
|
47
51
|
}
|
|
48
52
|
);
|
|
49
|
-
|
|
53
|
+
T.displayName = "TimePicker";
|
|
50
54
|
export {
|
|
51
|
-
|
|
55
|
+
T as TimePicker
|
|
52
56
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface DatePickerProps {
|
|
2
2
|
date?: Date;
|
|
3
|
-
|
|
3
|
+
onValueChange?: (date: Date | undefined) => void;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
className?: string;
|
|
@@ -14,4 +14,4 @@ export interface DatePickerProps {
|
|
|
14
14
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
15
15
|
id?: string;
|
|
16
16
|
}
|
|
17
|
-
export declare function DatePicker({ date,
|
|
17
|
+
export declare function DatePicker({ date, onValueChange, placeholder, disabled, className, iconPosition, minDate, maxDate, dateFormat, label, error, description, orientation, id, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ import B from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
|
10
10
|
import { formatDate as S } from "../../node_modules/date-fns/format.js";
|
|
11
11
|
function O({
|
|
12
12
|
date: s,
|
|
13
|
-
|
|
13
|
+
onValueChange: f,
|
|
14
14
|
placeholder: x = "Pick a date",
|
|
15
15
|
disabled: p = !1,
|
|
16
16
|
className: n,
|