@yuno-payments/dashboard-design-system 0.0.190 → 0.0.192

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.
@@ -1,123 +1,106 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as z, useId as E } from "react";
3
- import { InputGroup as G, InputGroupAddon as h, InputGroupInput as R } from "../../../vendor/shadcn/input-group.js";
4
- import { cn as t } from "../../../lib/utils.js";
2
+ import { forwardRef as b, useId as w } from "react";
3
+ import { InputGroup as y, InputGroupAddon as j, InputGroupInput as z } from "../../../vendor/shadcn/input-group.js";
4
+ import { cn as a } from "../../../lib/utils.js";
5
5
  import { Button as B } from "../button/button.js";
6
- import { Icon as c } from "../icon/icon.js";
7
- import { Field as I, FieldLabel as T, FieldDescription as A, FieldError as D } from "../../../vendor/shadcn/field.js";
8
- import { Tooltip as L } from "../tooltip/tooltip.js";
9
- const k = z(
6
+ import { Icon as p } from "../icon/icon.js";
7
+ import { Field as I, FieldDescription as R, FieldError as A } from "../../../vendor/shadcn/field.js";
8
+ import { Label as D } from "../label/label.js";
9
+ const L = b(
10
10
  ({
11
- className: v,
12
- orientation: F = "vertical",
13
- label: u,
14
- description: r,
15
- error: s,
16
- info: x,
17
- requiredIndicator: l,
18
- required: f,
19
- id: y,
20
- button: p,
21
- disabled: a,
22
- startIcon: j,
23
- startIconProps: n,
24
- endIcon: N,
25
- endIconProps: d,
26
- inputProps: m,
11
+ className: h,
12
+ orientation: N = "vertical",
13
+ label: o,
14
+ description: l,
15
+ error: i,
16
+ info: v,
17
+ requiredIndicator: g,
18
+ required: c,
19
+ id: F,
20
+ button: x,
21
+ disabled: r,
22
+ startIcon: f,
23
+ startIconProps: d,
24
+ endIcon: u,
25
+ endIconProps: m,
26
+ inputProps: t,
27
27
  ...$
28
- }, b) => {
29
- const w = E(), i = y || m?.id || w, o = !!s, g = () => l ? typeof l == "string" ? l : f ? "required" : "optional" : null;
28
+ }, E) => {
29
+ const G = w(), s = F || t?.id || G, n = !!i;
30
30
  return /* @__PURE__ */ e.jsxs(
31
31
  I,
32
32
  {
33
- orientation: F,
34
- "data-invalid": o,
35
- className: t("w-full", v),
33
+ orientation: N,
34
+ "data-invalid": n,
35
+ className: a("w-full", h),
36
36
  children: [
37
- u && /* @__PURE__ */ e.jsxs(
38
- T,
37
+ o && /* @__PURE__ */ e.jsx(
38
+ D,
39
39
  {
40
- htmlFor: i,
41
- className: t(
42
- "flex items-center justify-between gap-2",
43
- a && "text-muted-foreground"
44
- ),
45
- children: [
46
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
47
- u,
48
- x && /* @__PURE__ */ e.jsx(L, { content: x, children: /* @__PURE__ */ e.jsx(
49
- c,
50
- {
51
- name: "Info",
52
- size: "sm",
53
- className: "cursor-default text-muted-foreground"
54
- }
55
- ) })
56
- ] }),
57
- g() && /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-muted-foreground font-normal", children: [
58
- "(",
59
- g(),
60
- ")"
61
- ] })
62
- ]
40
+ htmlFor: s,
41
+ info: v,
42
+ requiredIndicator: g,
43
+ required: c,
44
+ disabled: r,
45
+ children: o
63
46
  }
64
47
  ),
65
48
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
66
49
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
67
- /* @__PURE__ */ e.jsxs(G, { className: "flex-1", children: [
68
- j && /* @__PURE__ */ e.jsx(h, { align: "inline-start", children: /* @__PURE__ */ e.jsx(
69
- c,
50
+ /* @__PURE__ */ e.jsxs(y, { className: "flex-1", children: [
51
+ f && /* @__PURE__ */ e.jsx(j, { align: "inline-start", children: /* @__PURE__ */ e.jsx(
52
+ p,
70
53
  {
71
- name: n?.name || j,
54
+ name: d?.name || f,
72
55
  size: "sm",
73
- ...n,
74
- className: t(
56
+ ...d,
57
+ className: a(
75
58
  "cursor-default text-muted-foreground",
76
- n?.className
59
+ d?.className
77
60
  )
78
61
  }
79
62
  ) }),
80
63
  /* @__PURE__ */ e.jsx(
81
- R,
64
+ z,
82
65
  {
83
- ref: b,
84
- disabled: a,
85
- required: f,
86
- className: t(
87
- o && "border-destructive focus-visible:border-destructive",
88
- m?.className
66
+ ref: E,
67
+ disabled: r,
68
+ required: c,
69
+ className: a(
70
+ n && "border-destructive focus-visible:border-destructive",
71
+ t?.className
89
72
  ),
90
- "aria-invalid": o ? !0 : void 0,
91
- "aria-describedby": r || s ? `${i}-description` : void 0,
73
+ "aria-invalid": n ? !0 : void 0,
74
+ "aria-describedby": l || i ? `${s}-description` : void 0,
92
75
  ...$,
93
- ...m,
94
- id: i
76
+ ...t,
77
+ id: s
95
78
  }
96
79
  ),
97
- N && /* @__PURE__ */ e.jsx(h, { align: "inline-end", children: /* @__PURE__ */ e.jsx(
98
- c,
80
+ u && /* @__PURE__ */ e.jsx(j, { align: "inline-end", children: /* @__PURE__ */ e.jsx(
81
+ p,
99
82
  {
100
- name: d?.name || N,
83
+ name: m?.name || u,
101
84
  size: "sm",
102
- ...d,
103
- className: t(
85
+ ...m,
86
+ className: a(
104
87
  "cursor-default text-muted-foreground",
105
- d?.className
88
+ m?.className
106
89
  )
107
90
  }
108
91
  ) })
109
92
  ] }),
110
- p && /* @__PURE__ */ e.jsx(B, { disabled: a, ...p })
93
+ x && /* @__PURE__ */ e.jsx(B, { disabled: r, ...x })
111
94
  ] }),
112
- r && !s && /* @__PURE__ */ e.jsx(A, { id: `${i}-description`, children: r }),
113
- s && /* @__PURE__ */ e.jsx(D, { id: `${i}-description`, children: s })
95
+ l && !i && /* @__PURE__ */ e.jsx(R, { id: `${s}-description`, children: l }),
96
+ i && /* @__PURE__ */ e.jsx(A, { id: `${s}-description`, children: i })
114
97
  ] })
115
98
  ]
116
99
  }
117
100
  );
118
101
  }
119
102
  );
120
- k.displayName = "Field";
103
+ L.displayName = "Field";
121
104
  export {
122
- k as Field
105
+ L as Field
123
106
  };
@@ -32,6 +32,7 @@ export { Switch, type SwitchProps } from './switch';
32
32
  export { Textarea, type TextareaProps } from './textarea';
33
33
  export { Typography, type TypographyProps } from './typography';
34
34
  export { Icon, type IconProps, type IconName } from './icon';
35
+ export { Label, type LabelProps } from './label';
35
36
  export { Loading, type LoadingProps } from './loading';
36
37
  export { OTPField, type OTPFieldProps } from './otp-field';
37
38
  export { PasswordField, type PasswordFieldProps } from './password-field';
@@ -1 +1 @@
1
- export { Label } from './label';
1
+ export { Label, type LabelProps } from './label';
@@ -1,11 +1,28 @@
1
1
  import { Label as ShadcnLabel } from '../../../vendor/shadcn/label';
2
2
  import { ComponentProps } from 'react';
3
- interface LabelProps extends ComponentProps<typeof ShadcnLabel> {
3
+ export interface LabelProps extends ComponentProps<typeof ShadcnLabel> {
4
+ /**
5
+ * Info text displayed in a tooltip next to the label
6
+ */
4
7
  info?: string;
8
+ /**
9
+ * Indicator to show at the right of the label.
10
+ * - Pass `true` to automatically show "required" or "optional" based on the `required` prop
11
+ * - Pass a custom string to display that text instead
12
+ */
13
+ requiredIndicator?: boolean | string;
14
+ /**
15
+ * Whether the field is required
16
+ */
17
+ required?: boolean;
18
+ /**
19
+ * Whether the field is disabled
20
+ */
21
+ disabled?: boolean;
5
22
  className?: string;
6
23
  }
7
24
  declare const Label: {
8
- ({ htmlFor, className, info, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
25
+ ({ htmlFor, className, info, requiredIndicator, required, disabled, children, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
9
26
  displayName: string;
10
27
  };
11
28
  export { Label };
@@ -1,28 +1,51 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
2
  import { cn as o } from "../../../lib/utils.js";
3
- import { Label as a } from "../../../vendor/shadcn/label.js";
3
+ import { Label as c } from "../../../vendor/shadcn/label.js";
4
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 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";
5
+ import { Icon as x } from "../icon/icon.js";
6
+ import { Tooltip as p } from "../tooltip/tooltip.js";
7
+ const u = ({
8
+ htmlFor: m,
9
+ className: n,
10
+ info: s,
11
+ requiredIndicator: t,
12
+ required: a = !1,
13
+ disabled: l = !1,
14
+ children: i,
15
+ ...f
16
+ }) => {
17
+ const r = () => t ? typeof t == "string" ? t : a ? "required" : "optional" : null;
18
+ return /* @__PURE__ */ e.jsxs("div", { className: o(
19
+ "flex items-center justify-between gap-2",
20
+ l && "text-muted-foreground"
21
+ ), children: [
22
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
23
+ /* @__PURE__ */ e.jsx(
24
+ c,
25
+ {
26
+ htmlFor: m,
27
+ className: o("text-sm cursor-pointer", n),
28
+ ...f,
29
+ children: i
30
+ }
31
+ ),
32
+ s && /* @__PURE__ */ e.jsx(p, { content: s, children: /* @__PURE__ */ e.jsx(
33
+ x,
34
+ {
35
+ name: "Info",
36
+ size: "sm",
37
+ className: "cursor-default text-muted-foreground"
38
+ }
39
+ ) })
40
+ ] }),
41
+ r() && /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-muted-foreground font-normal", children: [
42
+ "(",
43
+ r(),
44
+ ")"
45
+ ] })
46
+ ] });
47
+ };
48
+ u.displayName = "Label";
26
49
  export {
27
- l as Label
50
+ u as Label
28
51
  };
@@ -1,103 +1,96 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import * as C from "react";
3
- import { cn as n } from "../../../lib/utils.js";
4
- import { Icon as G } from "../icon/icon.js";
5
- import { Select as L, SelectTrigger as O, SelectValue as V, SelectContent as z, SelectGroup as E, SelectLabel as F, SelectItem as h } from "../../../vendor/shadcn/select.js";
6
- import { Label as I } from "../label/label.js";
7
- import { Tooltip as $ } from "../tooltip/tooltip.js";
8
- import { Typography as r } from "../typography/typography.js";
9
- const k = C.forwardRef(
2
+ import * as G from "react";
3
+ import { cn as t } from "../../../lib/utils.js";
4
+ import { Select as L, SelectTrigger as O, SelectValue as R, SelectContent as T, SelectGroup as V, SelectLabel as E, SelectItem as j } from "../../../vendor/shadcn/select.js";
5
+ import { Label as F } from "../label/label.js";
6
+ import { Typography as n } from "../typography/typography.js";
7
+ const $ = G.forwardRef(
10
8
  ({
11
9
  label: m,
12
- description: i,
13
- error: t,
14
- info: x,
15
- requiredIndicator: a,
16
- required: j = !1,
17
- optional: p = !1,
10
+ description: r,
11
+ error: a,
12
+ info: f,
13
+ requiredIndicator: i,
14
+ required: u = !1,
15
+ optional: o = !1,
18
16
  placeholder: v = "Select an option",
19
- value: N,
20
- defaultValue: g,
21
- onChange: S,
17
+ value: p,
18
+ defaultValue: S,
19
+ onChange: N,
22
20
  disabled: c = !1,
23
- options: o = [],
24
- groups: f = [],
21
+ options: x = [],
22
+ groups: h = [],
25
23
  className: b,
26
24
  id: d
27
- }, y) => {
28
- const T = f.length > 0, w = o.length > 0, u = () => a ? typeof a == "string" ? a : j ? "required" : "optional" : null;
29
- return /* @__PURE__ */ e.jsxs("div", { className: n("w-full", b), children: [
30
- m && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-2 mb-2", children: [
31
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
32
- /* @__PURE__ */ e.jsx(I, { htmlFor: d, className: n(c && "opacity-50"), children: m }),
33
- x && /* @__PURE__ */ e.jsx($, { content: x, children: /* @__PURE__ */ e.jsx(
34
- G,
35
- {
36
- name: "Info",
37
- size: "sm",
38
- className: "cursor-default text-muted-foreground"
39
- }
40
- ) }),
41
- p && !a && /* @__PURE__ */ e.jsx(r, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
42
- ] }),
43
- u() && /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-muted-foreground font-normal", children: [
44
- "(",
45
- u(),
46
- ")"
47
- ] })
25
+ }, g) => {
26
+ const y = h.length > 0, w = x.length > 0;
27
+ return /* @__PURE__ */ e.jsxs("div", { className: t("w-full", b), children: [
28
+ m && /* @__PURE__ */ e.jsxs("div", { className: "mb-2", children: [
29
+ /* @__PURE__ */ e.jsx(
30
+ F,
31
+ {
32
+ htmlFor: d,
33
+ info: f,
34
+ requiredIndicator: i,
35
+ required: u,
36
+ disabled: c,
37
+ children: m
38
+ }
39
+ ),
40
+ o && !i && /* @__PURE__ */ e.jsx(n, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
48
41
  ] }),
49
- i && !t && /* @__PURE__ */ e.jsx(
50
- r,
42
+ r && !a && /* @__PURE__ */ e.jsx(
43
+ n,
51
44
  {
52
45
  variant: "sm",
53
- className: n(
46
+ className: t(
54
47
  "text-muted-foreground mb-2",
55
48
  c && "opacity-50"
56
49
  ),
57
- children: i
50
+ children: r
58
51
  }
59
52
  ),
60
53
  /* @__PURE__ */ e.jsxs(
61
54
  L,
62
55
  {
63
- value: N,
64
- defaultValue: g,
65
- onValueChange: S,
56
+ value: p,
57
+ defaultValue: S,
58
+ onValueChange: N,
66
59
  disabled: c,
67
60
  children: [
68
61
  /* @__PURE__ */ e.jsx(
69
62
  O,
70
63
  {
71
- ref: y,
64
+ ref: g,
72
65
  id: d,
73
- className: n(t && "border-destructive"),
74
- children: /* @__PURE__ */ e.jsx(V, { placeholder: v })
66
+ className: t(a && "border-destructive"),
67
+ children: /* @__PURE__ */ e.jsx(R, { placeholder: v })
75
68
  }
76
69
  ),
77
- /* @__PURE__ */ e.jsx(z, { children: T ? (
70
+ /* @__PURE__ */ e.jsx(T, { children: y ? (
78
71
  // Render grouped options
79
- f.map((s, R) => /* @__PURE__ */ e.jsxs(E, { children: [
80
- s.label && /* @__PURE__ */ e.jsx(F, { children: s.label }),
81
- s.options.map((l) => /* @__PURE__ */ e.jsxs(h, { value: l.value, children: [
82
- l.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: l.icon }),
83
- l.label
84
- ] }, l.value))
85
- ] }, R))
72
+ h.map((l, C) => /* @__PURE__ */ e.jsxs(V, { children: [
73
+ l.label && /* @__PURE__ */ e.jsx(E, { children: l.label }),
74
+ l.options.map((s) => /* @__PURE__ */ e.jsxs(j, { value: s.value, children: [
75
+ s.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: s.icon }),
76
+ s.label
77
+ ] }, s.value))
78
+ ] }, C))
86
79
  ) : w ? (
87
80
  // Render flat options
88
- o.map((s) => /* @__PURE__ */ e.jsx(h, { value: s.value, children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
89
- s.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: s.icon }),
90
- s.label
91
- ] }) }, s.value))
81
+ x.map((l) => /* @__PURE__ */ e.jsx(j, { value: l.value, children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
82
+ l.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: l.icon }),
83
+ l.label
84
+ ] }) }, l.value))
92
85
  ) : null })
93
86
  ]
94
87
  }
95
88
  ),
96
- t && /* @__PURE__ */ e.jsx(r, { variant: "sm", className: "text-destructive mt-2", children: t })
89
+ a && /* @__PURE__ */ e.jsx(n, { variant: "sm", className: "text-destructive mt-2", children: a })
97
90
  ] });
98
91
  }
99
92
  );
100
- k.displayName = "Select";
93
+ $.displayName = "Select";
101
94
  export {
102
- k as Select
95
+ $ as Select
103
96
  };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { cn as t, normalizeDimension as p } from "./lib/utils.js";
3
3
  import { toast as a } from "sonner";
4
4
  import { showNotificationAlert as m } from "./lib/notification-alert.js";
5
5
  import { Alert as f } from "./components/atoms/alert/alert.js";
6
- import { Accordion as l, AccordionContent as u, AccordionItem as c, AccordionTrigger as g } from "./components/atoms/accordion/accordion.js";
6
+ import { Accordion as d, AccordionContent as u, AccordionItem as c, AccordionTrigger as g } from "./components/atoms/accordion/accordion.js";
7
7
  import { AccessDeniedAlert as s } from "./components/atoms/access-denied-alert/access-denied-alert.js";
8
8
  import { Avatar as P } from "./components/atoms/avatar/avatar.js";
9
9
  import { Badge as M } from "./components/atoms/badge/badge.js";
@@ -38,45 +38,46 @@ import { SearchField as tr } from "./components/atoms/search-field/search-field.
38
38
  import { Skeleton as nr } from "./vendor/shadcn/skeleton.js";
39
39
  import { Separator as ir } from "./components/atoms/separator/separator.js";
40
40
  import { Switch as xr } from "./components/atoms/switch/switch.js";
41
- import { Textarea as dr } from "./components/atoms/textarea/textarea.js";
41
+ import { Textarea as lr } from "./components/atoms/textarea/textarea.js";
42
42
  import { Typography as ur } from "./components/atoms/typography/typography.js";
43
43
  import { Icon as gr } from "./components/atoms/icon/icon.js";
44
- import { Loading as sr } from "./components/atoms/loading/loading.js";
45
- import { OTPField as Pr } from "./components/atoms/otp-field/otp-field.js";
46
- import { PasswordField as Mr } from "./components/atoms/password-field/password-field.js";
47
- import { ProtectedField as wr } from "./components/atoms/protected-field/protected-field.js";
48
- import { Progress as br } from "./components/atoms/progress/progress.js";
49
- import { Toaster as hr } from "./vendor/shadcn/sonner.js";
50
- import { Breadcrumb as Ir } from "./components/molecules/breadcrumb/breadcrumb.js";
51
- import { Pagination as Gr, Pagination as vr } from "./components/molecules/pagination/pagination.js";
52
- import { PaginationContent as Br, PaginationEllipsis as Lr, PaginationItem as Or, PaginationLink as Er, PaginationNext as Hr, PaginationPrevious as Nr } from "./vendor/shadcn/pagination.js";
53
- import { NavTabs as zr } from "./components/molecules/nav-tabs/nav-tabs.js";
54
- import { HighlightBanner as Qr } from "./components/molecules/highlight-banner/highlight-banner.js";
55
- import { Empty as qr } from "./components/molecules/empty/empty.js";
56
- import { EmptyIcon as Ur } from "./components/molecules/empty/empty-icon.js";
57
- import { DialogHeader as Xr } from "./components/molecules/dialog-header/dialog-header.js";
58
- import { DialogContent as Zr } from "./components/molecules/dialog-content/dialog-content.js";
59
- import { DialogFooter as $r } from "./components/molecules/dialog-footer/dialog-footer.js";
60
- import { Dialog as re } from "./components/organisms/dialog/dialog.js";
61
- import { Sheet as te } from "./components/organisms/sheet/sheet.js";
62
- import { Tutorial as ne } from "./components/organisms/tutorial/tutorial.js";
63
- import { DataTable as ie } from "./components/organisms/data-table/data-table.js";
64
- import { DataTableColumnHeader as xe } from "./components/organisms/data-table/components/column-header/data-table-column-header.js";
65
- import { DataTableSortIndicator as de } from "./components/organisms/data-table/components/column-header/data-table-sort-indicator.js";
66
- import { DataTableListCell as ue } from "./components/organisms/data-table/components/cells/data-table-list-cell.js";
67
- import { useBodyScrollLock as ge } from "./hooks/use-body-scroll-lock.js";
68
- import { useEscapeKey as se } from "./hooks/use-escape-key.js";
69
- import { useMediaQuery as Pe } from "./hooks/use-media-query.js";
44
+ import { Label as sr } from "./components/atoms/label/label.js";
45
+ import { Loading as Pr } from "./components/atoms/loading/loading.js";
46
+ import { OTPField as Mr } from "./components/atoms/otp-field/otp-field.js";
47
+ import { PasswordField as wr } from "./components/atoms/password-field/password-field.js";
48
+ import { ProtectedField as br } from "./components/atoms/protected-field/protected-field.js";
49
+ import { Progress as hr } from "./components/atoms/progress/progress.js";
50
+ import { Toaster as Ir } from "./vendor/shadcn/sonner.js";
51
+ import { Breadcrumb as Gr } from "./components/molecules/breadcrumb/breadcrumb.js";
52
+ import { Pagination as yr, Pagination as Br } from "./components/molecules/pagination/pagination.js";
53
+ import { PaginationContent as Or, PaginationEllipsis as Er, PaginationItem as Hr, PaginationLink as Nr, PaginationNext as Vr, PaginationPrevious as zr } from "./vendor/shadcn/pagination.js";
54
+ import { NavTabs as Qr } from "./components/molecules/nav-tabs/nav-tabs.js";
55
+ import { HighlightBanner as qr } from "./components/molecules/highlight-banner/highlight-banner.js";
56
+ import { Empty as Ur } from "./components/molecules/empty/empty.js";
57
+ import { EmptyIcon as Xr } from "./components/molecules/empty/empty-icon.js";
58
+ import { DialogHeader as Zr } from "./components/molecules/dialog-header/dialog-header.js";
59
+ import { DialogContent as $r } from "./components/molecules/dialog-content/dialog-content.js";
60
+ import { DialogFooter as re } from "./components/molecules/dialog-footer/dialog-footer.js";
61
+ import { Dialog as te } from "./components/organisms/dialog/dialog.js";
62
+ import { Sheet as ne } from "./components/organisms/sheet/sheet.js";
63
+ import { Tutorial as ie } from "./components/organisms/tutorial/tutorial.js";
64
+ import { DataTable as xe } from "./components/organisms/data-table/data-table.js";
65
+ import { DataTableColumnHeader as le } from "./components/organisms/data-table/components/column-header/data-table-column-header.js";
66
+ import { DataTableSortIndicator as ue } from "./components/organisms/data-table/components/column-header/data-table-sort-indicator.js";
67
+ import { DataTableListCell as ge } from "./components/organisms/data-table/components/cells/data-table-list-cell.js";
68
+ import { useBodyScrollLock as se } from "./hooks/use-body-scroll-lock.js";
69
+ import { useEscapeKey as Pe } from "./hooks/use-escape-key.js";
70
+ import { useMediaQuery as Me } from "./hooks/use-media-query.js";
70
71
  export {
71
72
  s as AccessDeniedAlert,
72
- l as Accordion,
73
+ d as Accordion,
73
74
  u as AccordionContent,
74
75
  c as AccordionItem,
75
76
  g as AccordionTrigger,
76
77
  f as Alert,
77
78
  P as Avatar,
78
79
  M as Badge,
79
- Ir as Breadcrumb,
80
+ Gr as Breadcrumb,
80
81
  w as Button,
81
82
  b as Card,
82
83
  R as CardBase,
@@ -88,16 +89,16 @@ export {
88
89
  y as Checkbox,
89
90
  Ho as Combobox,
90
91
  L as CurrencyField,
91
- ie as DataTable,
92
- xe as DataTableColumnHeader,
93
- ue as DataTableListCell,
94
- de as DataTableSortIndicator,
92
+ xe as DataTable,
93
+ le as DataTableColumnHeader,
94
+ ge as DataTableListCell,
95
+ ue as DataTableSortIndicator,
95
96
  E as DatePicker,
96
97
  N as DateRangePicker,
97
- re as Dialog,
98
- Zr as DialogContent,
99
- $r as DialogFooter,
100
- Xr as DialogHeader,
98
+ te as Dialog,
99
+ $r as DialogContent,
100
+ re as DialogFooter,
101
+ Zr as DialogHeader,
101
102
  Mo as DotsMenu,
102
103
  po as DropdownMenu,
103
104
  no as DropdownMenuCheckboxItem,
@@ -114,8 +115,8 @@ export {
114
115
  so as DropdownMenuSubContent,
115
116
  Co as DropdownMenuSubTrigger,
116
117
  Po as DropdownMenuTrigger,
117
- qr as Empty,
118
- Ur as EmptyIcon,
118
+ Ur as Empty,
119
+ Xr as EmptyIcon,
119
120
  Ao as Field,
120
121
  Q as FilterButton,
121
122
  j as FilterCheckboxOption,
@@ -129,29 +130,30 @@ export {
129
130
  J as FilterRadioOption,
130
131
  U as FilterSection,
131
132
  W as FilterTag,
132
- Qr as HighlightBanner,
133
+ qr as HighlightBanner,
133
134
  gr as Icon,
135
+ sr as Label,
134
136
  Vo as Link,
135
- sr as Loading,
137
+ Pr as Loading,
136
138
  jo as MultiSelect,
137
139
  Ko as MultiValuesField,
138
140
  vo as NavLink,
139
- zr as NavTabs,
140
- Pr as OTPField,
141
- Gr as Pagination,
142
- Br as PaginationContent,
143
- Lr as PaginationEllipsis,
144
- Or as PaginationItem,
145
- Er as PaginationLink,
146
- Hr as PaginationNext,
147
- Nr as PaginationPrevious,
148
- vr as PaginationRoot,
149
- Mr as PasswordField,
141
+ Qr as NavTabs,
142
+ Mr as OTPField,
143
+ yr as Pagination,
144
+ Or as PaginationContent,
145
+ Er as PaginationEllipsis,
146
+ Hr as PaginationItem,
147
+ Nr as PaginationLink,
148
+ Vr as PaginationNext,
149
+ zr as PaginationPrevious,
150
+ Br as PaginationRoot,
151
+ wr as PasswordField,
150
152
  Jo as Popover,
151
153
  Uo as PopoverContent,
152
154
  Wo as PopoverTrigger,
153
- br as Progress,
154
- wr as ProtectedField,
155
+ hr as Progress,
156
+ br as ProtectedField,
155
157
  Yo as RadioGroup,
156
158
  _o as RadioGroupBase,
157
159
  $o as RadioGroupItem,
@@ -160,23 +162,23 @@ export {
160
162
  Oo as SearchSelect,
161
163
  Bo as Select,
162
164
  ir as Separator,
163
- te as Sheet,
165
+ ne as Sheet,
164
166
  nr as Skeleton,
165
167
  xr as Switch,
166
- dr as Textarea,
168
+ lr as Textarea,
167
169
  z as TimePicker,
168
- hr as Toaster,
170
+ Ir as Toaster,
169
171
  wo as ToggleGroup,
170
172
  So as ToggleGroupItem,
171
173
  Ro as Tooltip,
172
174
  ko as TooltipProvider,
173
- ne as Tutorial,
175
+ ie as Tutorial,
174
176
  ur as Typography,
175
177
  t as cn,
176
178
  p as normalizeDimension,
177
179
  m as showNotificationAlert,
178
180
  a as toast,
179
- ge as useBodyScrollLock,
180
- se as useEscapeKey,
181
- Pe as useMediaQuery
181
+ se as useBodyScrollLock,
182
+ Pe as useEscapeKey,
183
+ Me as useMediaQuery
182
184
  };
@@ -1,115 +1,97 @@
1
1
  import { j as e } from "../../_virtual/jsx-runtime.js";
2
- import { useId as I } from "react";
3
- import { cn as l } from "../../lib/utils.js";
4
- import { Button as P } from "./button.js";
5
- import { Calendar as b } from "./calendar.js";
6
- import { Popover as k, PopoverTrigger as E, PopoverContent as $ } from "./popover.js";
7
- import { Field as M, FieldLabel as T, FieldDescription as B, FieldError as R } from "./field.js";
8
- import { Icon as S } from "../../components/atoms/icon/icon.js";
9
- import z from "../../node_modules/lucide-react/dist/esm/icons/calendar.js";
2
+ import { useId as P } from "react";
3
+ import { cn as f } from "../../lib/utils.js";
4
+ import { Button as F } from "./button.js";
5
+ import { Calendar as I } from "./calendar.js";
6
+ import { Popover as b, PopoverTrigger as k, PopoverContent as E } from "./popover.js";
7
+ import { Field as $, FieldDescription as M, FieldError as B } from "./field.js";
8
+ import S from "../../node_modules/lucide-react/dist/esm/icons/calendar.js";
10
9
  import L from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
11
- import { Tooltip as q } from "../../components/atoms/tooltip/tooltip.js";
12
- import { formatDate as A } from "../../node_modules/date-fns/format.js";
13
- function _({
14
- date: s,
15
- onChange: h,
16
- placeholder: j = "Pick a date",
17
- disabled: c = !1,
18
- className: d,
19
- iconPosition: m = "start",
20
- minDate: v,
21
- maxDate: g,
22
- dateFormat: w = "MMM d, yyyy",
10
+ import { Label as R } from "../../components/atoms/label/label.js";
11
+ import { formatDate as T } from "../../node_modules/date-fns/format.js";
12
+ function W({
13
+ date: o,
14
+ onChange: x,
15
+ placeholder: p = "Pick a date",
16
+ disabled: n = !1,
17
+ className: l,
18
+ iconPosition: d = "start",
19
+ minDate: u,
20
+ maxDate: h,
21
+ dateFormat: j = "MMM d, yyyy",
23
22
  label: i,
24
23
  error: t,
25
- description: o,
26
- info: f,
27
- requiredIndicator: n,
24
+ description: s,
25
+ info: v,
26
+ requiredIndicator: w,
28
27
  required: y = !1,
29
- orientation: N = "vertical",
28
+ orientation: g = "vertical",
30
29
  id: C
31
30
  }) {
32
- const D = I(), r = C || D, a = !!t, F = m === "start", u = m === "end", x = () => n ? typeof n == "string" ? n : y ? "required" : "optional" : null, p = /* @__PURE__ */ e.jsxs(k, { children: [
33
- /* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
34
- P,
31
+ const D = P(), r = C || D, a = !!t, N = d === "start", c = d === "end", m = /* @__PURE__ */ e.jsxs(b, { children: [
32
+ /* @__PURE__ */ e.jsx(k, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
33
+ F,
35
34
  {
36
35
  variant: "outline",
37
- className: l(
36
+ className: f(
38
37
  "w-full text-left font-normal h-9",
39
- u ? "justify-between" : "justify-start",
40
- !s && "text-muted-foreground",
38
+ c ? "justify-between" : "justify-start",
39
+ !o && "text-muted-foreground",
41
40
  a && "border-destructive focus-visible:border-destructive",
42
- d
41
+ l
43
42
  ),
44
- disabled: c,
43
+ disabled: n,
45
44
  "aria-invalid": a ? !0 : void 0,
46
- "aria-describedby": o || t ? `${r}-description` : void 0,
45
+ "aria-describedby": s || t ? `${r}-description` : void 0,
47
46
  id: r,
48
47
  children: [
49
48
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
50
- F && /* @__PURE__ */ e.jsx(z, { className: "h-4 w-4" }),
51
- s ? A(s, w) : /* @__PURE__ */ e.jsx("span", { children: j })
49
+ N && /* @__PURE__ */ e.jsx(S, { className: "h-4 w-4" }),
50
+ o ? T(o, j) : /* @__PURE__ */ e.jsx("span", { children: p })
52
51
  ] }),
53
- u && /* @__PURE__ */ e.jsx(L, { className: "h-4 w-4 opacity-50" })
52
+ c && /* @__PURE__ */ e.jsx(L, { className: "h-4 w-4 opacity-50" })
54
53
  ]
55
54
  }
56
55
  ) }),
57
- /* @__PURE__ */ e.jsx($, { className: "w-auto p-0", children: /* @__PURE__ */ e.jsx(
58
- b,
56
+ /* @__PURE__ */ e.jsx(E, { className: "w-auto p-0", children: /* @__PURE__ */ e.jsx(
57
+ I,
59
58
  {
60
59
  mode: "single",
61
- selected: s,
62
- onSelect: h,
60
+ selected: o,
61
+ onSelect: x,
63
62
  initialFocus: !0,
64
- fromDate: v,
65
- toDate: g
63
+ fromDate: u,
64
+ toDate: h
66
65
  }
67
66
  ) })
68
67
  ] });
69
- return i || t || o ? /* @__PURE__ */ e.jsxs(
70
- M,
68
+ return i || t || s ? /* @__PURE__ */ e.jsxs(
69
+ $,
71
70
  {
72
- orientation: N,
71
+ orientation: g,
73
72
  "data-invalid": a,
74
- className: l("w-full", d),
73
+ className: f("w-full", l),
75
74
  children: [
76
- i && /* @__PURE__ */ e.jsxs(
77
- T,
75
+ i && /* @__PURE__ */ e.jsx(
76
+ R,
78
77
  {
79
78
  htmlFor: r,
80
- className: l(
81
- "flex items-center justify-between gap-2",
82
- c && "text-muted-foreground"
83
- ),
84
- children: [
85
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
86
- i,
87
- f && /* @__PURE__ */ e.jsx(q, { content: f, children: /* @__PURE__ */ e.jsx(
88
- S,
89
- {
90
- name: "Info",
91
- size: "sm",
92
- className: "cursor-default text-muted-foreground"
93
- }
94
- ) })
95
- ] }),
96
- x() && /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-muted-foreground font-normal", children: [
97
- "(",
98
- x(),
99
- ")"
100
- ] })
101
- ]
79
+ info: v,
80
+ requiredIndicator: w,
81
+ required: y,
82
+ disabled: n,
83
+ children: i
102
84
  }
103
85
  ),
104
86
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
105
- p,
106
- o && !t && /* @__PURE__ */ e.jsx(B, { id: `${r}-description`, children: o }),
107
- t && /* @__PURE__ */ e.jsx(R, { id: `${r}-description`, children: t })
87
+ m,
88
+ s && !t && /* @__PURE__ */ e.jsx(M, { id: `${r}-description`, children: s }),
89
+ t && /* @__PURE__ */ e.jsx(B, { id: `${r}-description`, children: t })
108
90
  ] })
109
91
  ]
110
92
  }
111
- ) : p;
93
+ ) : m;
112
94
  }
113
95
  export {
114
- _ as DatePicker
96
+ W as DatePicker
115
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/dashboard-design-system",
3
- "version": "0.0.190",
3
+ "version": "0.0.192",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",