@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.
@@ -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 u, useId as d } from "react";
3
- import { Checkbox as g } from "../../../vendor/shadcn/checkbox.js";
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 C } from "../../../vendor/shadcn/label.js";
6
- const j = u(
7
- ({ label: n, description: c, id: i, name: t, disabled: s, onChange: a, ...f }, l) => {
8
- const p = d(), o = i || t || p, h = (r) => {
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
- g,
39
+ j,
30
40
  {
31
- ref: l,
41
+ ref: h,
32
42
  id: o,
33
43
  name: t,
34
44
  disabled: s,
35
- onCheckedChange: h,
36
- ...f,
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
- C,
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
- j.displayName = "Checkbox";
80
+ v.displayName = "Checkbox";
69
81
  export {
70
- j as Checkbox
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 "../../../vendor/shadcn/label.js";
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 '../../../vendor/shadcn/label';
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 "../../../vendor/shadcn/label.js";
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 "../../../vendor/shadcn/label.js";
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 "../../../vendor/shadcn/label.js";
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 "../../../vendor/shadcn/label.js";
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 b } from "../../../vendor/shadcn/switch.js";
3
- import { forwardRef as j, useId as v } from "react";
4
- import { cn as n } from "../../../lib/utils.js";
5
- import { Label as y } from "../../../vendor/shadcn/label.js";
6
- const N = j(
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: o,
9
+ description: a,
10
10
  side: i = "left",
11
11
  variant: l = "default",
12
12
  id: d,
13
13
  name: t,
14
- onChange: a,
15
- className: f,
16
- switchClassName: m,
17
- ...x
18
- }, p) => {
19
- const h = v(), r = d || t || h, u = (s) => {
20
- if (!a) return;
21
- a({
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
- }, g = /* @__PURE__ */ e.jsx(
40
- b,
41
+ }, b = /* @__PURE__ */ e.jsx(
42
+ v,
41
43
  {
42
- ref: p,
44
+ ref: u,
43
45
  id: r,
44
46
  name: t,
45
- className: n("cursor-pointer", m),
46
- onCheckedChange: u,
47
- ...x
47
+ className: o("cursor-pointer", x),
48
+ onCheckedChange: w,
49
+ ...h
48
50
  }
49
- ), w = n(
50
- "flex gap-3 items-start",
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
- f
57
+ m
56
58
  );
57
- return /* @__PURE__ */ e.jsxs("div", { className: w, children: [
58
- g,
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
- y,
62
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(
63
+ S,
62
64
  {
63
65
  htmlFor: r,
64
- className: "text-sm leading-[18.39px] cursor-pointer",
66
+ info: f,
67
+ className: o("text-sm leading-[18.39px] cursor-pointer", p),
65
68
  children: c
66
69
  }
67
- ),
68
- o && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: o })
70
+ ) }),
71
+ a && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: a })
69
72
  ] })
70
73
  ] });
71
74
  }
72
75
  );
73
- N.displayName = "Switch";
76
+ C.displayName = "Switch";
74
77
  export {
75
- N as Switch
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 "../../../vendor/shadcn/label.js";
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 e } from "../../_virtual/jsx-runtime.js";
1
+ import { j as r } from "../../_virtual/jsx-runtime.js";
2
2
  import "react";
3
- import * as r from "@radix-ui/react-avatar";
4
- import { cn as l } from "../../lib/utils.js";
5
- function m({
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__ */ e.jsx(
10
- r.Root,
9
+ return /* @__PURE__ */ r.jsx(
10
+ e.Root,
11
11
  {
12
12
  "data-slot": "avatar",
13
- className: l(
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 n({
21
+ function f({
22
22
  className: a,
23
23
  ...t
24
24
  }) {
25
- return /* @__PURE__ */ e.jsx(
26
- r.Image,
25
+ return /* @__PURE__ */ r.jsx(
26
+ e.Image,
27
27
  {
28
28
  "data-slot": "avatar-image",
29
- className: l("aspect-square size-full", a),
29
+ className: s("aspect-square size-full", a),
30
30
  ...t
31
31
  }
32
32
  );
33
33
  }
34
- function u({
34
+ function m({
35
35
  className: a,
36
36
  ...t
37
37
  }) {
38
- return /* @__PURE__ */ e.jsx(
39
- r.Fallback,
38
+ return /* @__PURE__ */ r.jsx(
39
+ e.Fallback,
40
40
  {
41
41
  "data-slot": "avatar-fallback",
42
- className: l(
43
- "bg-muted flex size-full items-center justify-center rounded-full",
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
- m as Avatar,
52
- u as AvatarFallback,
53
- n as AvatarImage
51
+ n as Avatar,
52
+ m as AvatarFallback,
53
+ f as AvatarImage
54
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/dashboard-design-system",
3
- "version": "0.0.152",
3
+ "version": "0.0.155",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",