@yuno-payments/dashboard-design-system 0.0.152 → 0.0.155
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.d.ts +8 -0
- package/dist/components/atoms/checkbox/checkbox.js +26 -14
- package/dist/components/atoms/combobox/combobox.js +1 -1
- package/dist/components/atoms/label/index.d.ts +1 -1
- package/dist/components/atoms/label/label.d.ts +11 -0
- package/dist/components/atoms/label/label.js +28 -0
- package/dist/components/atoms/password-field/password-field.js +1 -1
- package/dist/components/atoms/radio-group/radio-group-option.js +1 -1
- package/dist/components/atoms/search-field/search-field.js +1 -1
- package/dist/components/atoms/select/select.js +1 -1
- package/dist/components/atoms/switch/switch.d.ts +8 -0
- package/dist/components/atoms/switch/switch.js +35 -32
- package/dist/components/atoms/textarea/textarea.js +1 -1
- package/dist/vendor/shadcn/avatar.js +19 -19
- package/package.json +1 -1
|
@@ -17,6 +17,14 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof ShadcnCheckbox
|
|
|
17
17
|
* Provides a synthetic ChangeEvent compatible with react-hook-form
|
|
18
18
|
*/
|
|
19
19
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Additional CSS classes to apply to the label element
|
|
22
|
+
*/
|
|
23
|
+
labelClassName?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional info icon with tooltip
|
|
26
|
+
*/
|
|
27
|
+
info?: string;
|
|
20
28
|
}
|
|
21
29
|
/**
|
|
22
30
|
* Checkbox component with optional label and description.
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Checkbox as
|
|
2
|
+
import { forwardRef as g, useId as C } from "react";
|
|
3
|
+
import { Checkbox as j } from "../../../vendor/shadcn/checkbox.js";
|
|
4
4
|
import { cn as x } from "../../../lib/utils.js";
|
|
5
|
-
import { Label as
|
|
6
|
-
const
|
|
7
|
-
({
|
|
8
|
-
|
|
5
|
+
import { Label as k } from "../label/label.js";
|
|
6
|
+
const v = g(
|
|
7
|
+
({
|
|
8
|
+
label: n,
|
|
9
|
+
description: c,
|
|
10
|
+
id: i,
|
|
11
|
+
name: t,
|
|
12
|
+
disabled: s,
|
|
13
|
+
onChange: a,
|
|
14
|
+
labelClassName: f,
|
|
15
|
+
info: l,
|
|
16
|
+
...p
|
|
17
|
+
}, h) => {
|
|
18
|
+
const u = C(), o = i || t || u, d = (r) => {
|
|
9
19
|
if (!a) return;
|
|
10
20
|
a({
|
|
11
21
|
target: {
|
|
@@ -26,14 +36,14 @@ const j = u(
|
|
|
26
36
|
}
|
|
27
37
|
});
|
|
28
38
|
}, m = /* @__PURE__ */ e.jsx(
|
|
29
|
-
|
|
39
|
+
j,
|
|
30
40
|
{
|
|
31
|
-
ref:
|
|
41
|
+
ref: h,
|
|
32
42
|
id: o,
|
|
33
43
|
name: t,
|
|
34
44
|
disabled: s,
|
|
35
|
-
onCheckedChange:
|
|
36
|
-
...
|
|
45
|
+
onCheckedChange: d,
|
|
46
|
+
...p,
|
|
37
47
|
className: "size-3.5 cursor-pointer"
|
|
38
48
|
}
|
|
39
49
|
);
|
|
@@ -41,12 +51,14 @@ const j = u(
|
|
|
41
51
|
m,
|
|
42
52
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
43
53
|
/* @__PURE__ */ e.jsx(
|
|
44
|
-
|
|
54
|
+
k,
|
|
45
55
|
{
|
|
46
56
|
htmlFor: o,
|
|
57
|
+
info: l,
|
|
47
58
|
className: x(
|
|
48
59
|
"text-sm leading-none cursor-pointer",
|
|
49
|
-
s && "text-muted-foreground"
|
|
60
|
+
s && "text-muted-foreground",
|
|
61
|
+
f
|
|
50
62
|
),
|
|
51
63
|
children: n
|
|
52
64
|
}
|
|
@@ -65,7 +77,7 @@ const j = u(
|
|
|
65
77
|
] }) : m;
|
|
66
78
|
}
|
|
67
79
|
);
|
|
68
|
-
|
|
80
|
+
v.displayName = "Checkbox";
|
|
69
81
|
export {
|
|
70
|
-
|
|
82
|
+
v as Checkbox
|
|
71
83
|
};
|
|
@@ -3,7 +3,7 @@ import { forwardRef as Y, useState as y, useRef as Z, useEffect as I } from "rea
|
|
|
3
3
|
import { cn as m } from "../../../lib/utils.js";
|
|
4
4
|
import { Combobox as _, ComboboxTrigger as A, ComboboxContent as W } from "../../../vendor/shadcn/combobox.js";
|
|
5
5
|
import { Icon as $ } from "../icon/icon.js";
|
|
6
|
-
import { Label as P } from "
|
|
6
|
+
import { Label as P } from "../label/label.js";
|
|
7
7
|
import { Typography as C } from "../typography/typography.js";
|
|
8
8
|
import { Badge as N } from "../badge/badge.js";
|
|
9
9
|
import { Checkbox as ee } from "../checkbox/checkbox.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Label } from '
|
|
1
|
+
export { Label } from './label';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Label as ShadcnLabel } from '../../../vendor/shadcn/label';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
interface LabelProps extends ComponentProps<typeof ShadcnLabel> {
|
|
4
|
+
info?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const Label: {
|
|
8
|
+
({ htmlFor, className, info, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export { Label };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
3
|
+
import { Label as a } from "../../../vendor/shadcn/label.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Icon as i } from "../icon/icon.js";
|
|
6
|
+
const l = ({ htmlFor: r, className: t, info: s, ...m }) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7
|
+
/* @__PURE__ */ e.jsx(
|
|
8
|
+
a,
|
|
9
|
+
{
|
|
10
|
+
htmlFor: r,
|
|
11
|
+
className: o("text-sm leading-[18.39px] cursor-pointer", t),
|
|
12
|
+
...m
|
|
13
|
+
}
|
|
14
|
+
),
|
|
15
|
+
s && /* @__PURE__ */ e.jsx(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
name: "Info",
|
|
19
|
+
size: "sm",
|
|
20
|
+
className: "text-muted-foreground",
|
|
21
|
+
tooltip: s
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
] });
|
|
25
|
+
l.displayName = "Label";
|
|
26
|
+
export {
|
|
27
|
+
l as Label
|
|
28
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as s } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { forwardRef as m, useState as p } from "react";
|
|
3
3
|
import { cn as x } from "../../../lib/utils.js";
|
|
4
|
-
import { Label as f } from "
|
|
4
|
+
import { Label as f } from "../label/label.js";
|
|
5
5
|
import { Link as w } from "../link/link.js";
|
|
6
6
|
import { Field as d } from "../field/field.js";
|
|
7
7
|
const u = m(
|
|
@@ -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
3
|
import { cn as a } from "../../../lib/utils.js";
|
|
4
|
-
import { Label as l } from "
|
|
4
|
+
import { Label as l } from "../label/label.js";
|
|
5
5
|
const o = ({
|
|
6
6
|
option: e,
|
|
7
7
|
radioId: s,
|
|
@@ -4,7 +4,7 @@ import { cn as r } from "../../../lib/utils.js";
|
|
|
4
4
|
import { Input as Z } from "../../../vendor/shadcn/input.js";
|
|
5
5
|
import { Icon as w } from "../icon/icon.js";
|
|
6
6
|
import { cva as D } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
7
|
-
import { Label as K } from "
|
|
7
|
+
import { Label as K } from "../label/label.js";
|
|
8
8
|
const P = D("flex gap-2 w-full", {
|
|
9
9
|
variants: {
|
|
10
10
|
layout: {
|
|
@@ -2,7 +2,7 @@ import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
|
2
2
|
import * as y from "react";
|
|
3
3
|
import { cn as c } from "../../../lib/utils.js";
|
|
4
4
|
import { Select as w, SelectTrigger as C, SelectValue as G, SelectContent as L, SelectGroup as O, SelectLabel as R, SelectItem as d } from "../../../vendor/shadcn/select.js";
|
|
5
|
-
import { Label as T } from "
|
|
5
|
+
import { Label as T } from "../label/label.js";
|
|
6
6
|
import { Typography as n } from "../typography/typography.js";
|
|
7
7
|
const V = y.forwardRef(
|
|
8
8
|
({
|
|
@@ -37,6 +37,14 @@ export interface SwitchProps extends Omit<ComponentProps<typeof ShadcnSwitch>, "
|
|
|
37
37
|
* Additional CSS classes to apply to the switch element itself
|
|
38
38
|
*/
|
|
39
39
|
switchClassName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Additional CSS classes to apply to the label element
|
|
42
|
+
*/
|
|
43
|
+
labelClassName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional info icon with tooltip
|
|
46
|
+
*/
|
|
47
|
+
info?: string;
|
|
40
48
|
}
|
|
41
49
|
/**
|
|
42
50
|
* Toggle switch component with label and optional description.
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { Switch as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Label as
|
|
6
|
-
const
|
|
2
|
+
import { Switch as v } from "../../../vendor/shadcn/switch.js";
|
|
3
|
+
import { forwardRef as N, useId as y } from "react";
|
|
4
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
5
|
+
import { Label as S } from "../label/label.js";
|
|
6
|
+
const C = N(
|
|
7
7
|
({
|
|
8
8
|
label: c,
|
|
9
|
-
description:
|
|
9
|
+
description: a,
|
|
10
10
|
side: i = "left",
|
|
11
11
|
variant: l = "default",
|
|
12
12
|
id: d,
|
|
13
13
|
name: t,
|
|
14
|
-
onChange:
|
|
15
|
-
className:
|
|
16
|
-
switchClassName:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
onChange: n,
|
|
15
|
+
className: m,
|
|
16
|
+
switchClassName: x,
|
|
17
|
+
info: f,
|
|
18
|
+
labelClassName: p,
|
|
19
|
+
...h
|
|
20
|
+
}, u) => {
|
|
21
|
+
const g = y(), r = d || t || g, w = (s) => {
|
|
22
|
+
if (!n) return;
|
|
23
|
+
n({
|
|
22
24
|
target: {
|
|
23
25
|
name: t || r,
|
|
24
26
|
checked: s,
|
|
@@ -36,41 +38,42 @@ const N = j(
|
|
|
36
38
|
stopPropagation: () => {
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
+
}, b = /* @__PURE__ */ e.jsx(
|
|
42
|
+
v,
|
|
41
43
|
{
|
|
42
|
-
ref:
|
|
44
|
+
ref: u,
|
|
43
45
|
id: r,
|
|
44
46
|
name: t,
|
|
45
|
-
className:
|
|
46
|
-
onCheckedChange:
|
|
47
|
-
...
|
|
47
|
+
className: o("cursor-pointer", x),
|
|
48
|
+
onCheckedChange: w,
|
|
49
|
+
...h
|
|
48
50
|
}
|
|
49
|
-
),
|
|
50
|
-
"flex gap-
|
|
51
|
+
), j = o(
|
|
52
|
+
"flex gap-2 items-start",
|
|
51
53
|
{
|
|
52
54
|
"flex-row-reverse": i === "right",
|
|
53
55
|
"bg-background box-border justify-start p-4 rounded-lg border shadow-xs": l === "box"
|
|
54
56
|
},
|
|
55
|
-
|
|
57
|
+
m
|
|
56
58
|
);
|
|
57
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
58
|
-
|
|
59
|
+
return /* @__PURE__ */ e.jsxs("div", { className: j, children: [
|
|
60
|
+
b,
|
|
59
61
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
60
|
-
/* @__PURE__ */ e.jsx(
|
|
61
|
-
|
|
62
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(
|
|
63
|
+
S,
|
|
62
64
|
{
|
|
63
65
|
htmlFor: r,
|
|
64
|
-
|
|
66
|
+
info: f,
|
|
67
|
+
className: o("text-sm leading-[18.39px] cursor-pointer", p),
|
|
65
68
|
children: c
|
|
66
69
|
}
|
|
67
|
-
),
|
|
68
|
-
|
|
70
|
+
) }),
|
|
71
|
+
a && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: a })
|
|
69
72
|
] })
|
|
70
73
|
] });
|
|
71
74
|
}
|
|
72
75
|
);
|
|
73
|
-
|
|
76
|
+
C.displayName = "Switch";
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
C as Switch
|
|
76
79
|
};
|
|
@@ -3,7 +3,7 @@ import { forwardRef as p, useId as h } from "react";
|
|
|
3
3
|
import { cva as d } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
4
4
|
import { Textarea as j } from "../../../vendor/shadcn/textarea.js";
|
|
5
5
|
import { cn as s } from "../../../lib/utils.js";
|
|
6
|
-
import { Label as N } from "
|
|
6
|
+
import { Label as N } from "../label/label.js";
|
|
7
7
|
const b = d("flex gap-2 w-full", {
|
|
8
8
|
variants: {
|
|
9
9
|
layout: {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as r } from "../../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
3
|
+
import * as e from "@radix-ui/react-avatar";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
function n({
|
|
6
6
|
className: a,
|
|
7
7
|
...t
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
return /* @__PURE__ */ r.jsx(
|
|
10
|
+
e.Root,
|
|
11
11
|
{
|
|
12
12
|
"data-slot": "avatar",
|
|
13
|
-
className:
|
|
13
|
+
className: s(
|
|
14
14
|
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
15
15
|
a
|
|
16
16
|
),
|
|
@@ -18,29 +18,29 @@ function m({
|
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function f({
|
|
22
22
|
className: a,
|
|
23
23
|
...t
|
|
24
24
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
25
|
+
return /* @__PURE__ */ r.jsx(
|
|
26
|
+
e.Image,
|
|
27
27
|
{
|
|
28
28
|
"data-slot": "avatar-image",
|
|
29
|
-
className:
|
|
29
|
+
className: s("aspect-square size-full", a),
|
|
30
30
|
...t
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function m({
|
|
35
35
|
className: a,
|
|
36
36
|
...t
|
|
37
37
|
}) {
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
|
|
38
|
+
return /* @__PURE__ */ r.jsx(
|
|
39
|
+
e.Fallback,
|
|
40
40
|
{
|
|
41
41
|
"data-slot": "avatar-fallback",
|
|
42
|
-
className:
|
|
43
|
-
"bg-
|
|
42
|
+
className: s(
|
|
43
|
+
"bg-surface flex size-full items-center justify-center rounded-full",
|
|
44
44
|
a
|
|
45
45
|
),
|
|
46
46
|
...t
|
|
@@ -48,7 +48,7 @@ function u({
|
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
n as Avatar,
|
|
52
|
+
m as AvatarFallback,
|
|
53
|
+
f as AvatarImage
|
|
54
54
|
};
|