@yuno-payments/dashboard-design-system 0.0.167 → 0.0.170
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/access-denied-alert/access-denied-alert.d.ts +0 -16
- package/dist/components/atoms/accordion/accordion.d.ts +0 -66
- package/dist/components/atoms/alert/alert.d.ts +1 -26
- package/dist/components/atoms/alert/alert.js +8 -9
- package/dist/components/atoms/avatar/avatar-group.d.ts +0 -28
- package/dist/components/atoms/avatar/avatar.d.ts +0 -25
- package/dist/components/atoms/avatar/avatar.js +9 -9
- package/dist/components/atoms/badge/badge.d.ts +2 -30
- package/dist/components/atoms/badge/badge.js +11 -27
- package/dist/components/atoms/button/button.d.ts +0 -44
- package/dist/components/atoms/card/card.d.ts +3 -137
- package/dist/components/atoms/card/card.js +28 -56
- package/dist/components/atoms/checkbox/checkbox.d.ts +2 -38
- package/dist/components/atoms/checkbox/checkbox.js +27 -61
- package/dist/components/atoms/combobox/combobox.d.ts +0 -18
- package/dist/components/atoms/combobox/combobox.js +41 -41
- package/dist/components/atoms/combobox/types.d.ts +1 -90
- package/dist/components/atoms/currency-field/currency-field.d.ts +0 -38
- package/dist/components/atoms/currency-field/currency-field.js +19 -22
- package/dist/components/atoms/date-picker/date-picker.d.ts +0 -15
- package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +0 -15
- package/dist/components/atoms/dots-menu/dots-menu.d.ts +0 -16
- package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
- package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +0 -52
- package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +0 -50
- package/dist/components/atoms/field/field.d.ts +0 -55
- package/dist/components/atoms/field/field.js +46 -53
- package/dist/components/atoms/filter/filter-date-range.d.ts +2 -12
- package/dist/components/atoms/filter/filter-date-range.js +168 -203
- package/dist/components/atoms/filter/filter.d.ts +0 -6
- package/dist/components/atoms/filter/filter.js +76 -91
- package/dist/components/atoms/filter/index.d.ts +1 -1
- package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +2 -208
- package/dist/components/atoms/filter-dropdown/filter-dropdown.js +160 -214
- package/dist/components/atoms/icon/icon-list.d.ts +0 -5
- package/dist/components/atoms/icon/icon-list.js +384 -394
- package/dist/components/atoms/icon/icon.d.ts +0 -29
- package/dist/components/atoms/index.d.ts +2 -3
- package/dist/components/atoms/label/index.d.ts +1 -1
- package/dist/components/atoms/link/link.d.ts +0 -20
- package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
- package/dist/components/atoms/multi-select/multi-select.js +6 -6
- package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +0 -16
- package/dist/components/atoms/multi-values-field/multi-values-field.js +87 -109
- package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +0 -81
- package/dist/components/atoms/otp-field/otp-field.d.ts +0 -32
- package/dist/components/atoms/password-field/password-field.d.ts +0 -23
- package/dist/components/atoms/password-field/password-field.js +1 -1
- package/dist/components/atoms/progress/progress.d.ts +0 -15
- package/dist/components/atoms/protected-field/protected-field.d.ts +0 -10
- package/dist/components/atoms/protected-field/protected-field.types.d.ts +0 -14
- package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
- package/dist/components/atoms/radio-group/radio-group.d.ts +1 -50
- package/dist/components/atoms/radio-group/radio-group.js +12 -13
- package/dist/components/atoms/search-field/search-field.d.ts +0 -14
- package/dist/components/atoms/search-field/search-field.js +17 -17
- package/dist/components/atoms/search-field/search-field.types.d.ts +0 -57
- package/dist/components/atoms/select/index.d.ts +0 -2
- package/dist/components/atoms/select/select.d.ts +1 -83
- package/dist/components/atoms/select/select.js +21 -21
- package/dist/components/atoms/separator/separator.d.ts +0 -17
- package/dist/components/atoms/skeleton/index.d.ts +0 -9
- package/dist/components/atoms/switch/switch.d.ts +2 -56
- package/dist/components/atoms/switch/switch.js +32 -64
- package/dist/components/atoms/tabs/index.d.ts +0 -16
- package/dist/components/atoms/textarea/textarea.d.ts +0 -32
- package/dist/components/atoms/textarea/textarea.js +1 -1
- package/dist/components/atoms/time-picker/time-picker.d.ts +2 -73
- package/dist/components/atoms/time-picker/time-picker.js +3 -218
- package/dist/components/atoms/toaster/index.d.ts +0 -15
- package/dist/components/atoms/toggle-group/toggle-group.d.ts +1 -26
- package/dist/components/atoms/toggle-group/toggle-group.js +14 -15
- package/dist/components/atoms/tooltip/tooltip.d.ts +2 -53
- package/dist/components/atoms/typography/typography.d.ts +0 -18
- package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +0 -50
- package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
- package/dist/components/molecules/dialog-content/dialog-content.d.ts +0 -16
- package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +0 -20
- package/dist/components/molecules/dialog-header/dialog-header.d.ts +0 -31
- package/dist/components/molecules/empty/empty-icon.js +6 -6
- package/dist/components/molecules/empty/empty.d.ts +1 -16
- package/dist/components/molecules/empty/empty.js +34 -37
- package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +0 -17
- package/dist/components/molecules/pagination/pagination.d.ts +0 -49
- package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +0 -41
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +0 -18
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
- package/dist/components/organisms/data-table/components/data-table-body.d.ts +0 -18
- package/dist/components/organisms/data-table/components/data-table-header.d.ts +0 -12
- package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
- package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +0 -24
- package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
- package/dist/components/organisms/data-table/data-table.d.ts +4 -133
- package/dist/components/organisms/data-table/data-table.js +100 -132
- package/dist/components/organisms/data-table/data-table.types.d.ts +26 -35
- package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +41 -57
- package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +2 -8
- package/dist/components/organisms/data-table/hooks/use-data-table-state.js +47 -82
- package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +2 -8
- package/dist/components/organisms/data-table/utils/data-table-constants.js +10 -16
- package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +0 -1652
- package/dist/components/organisms/data-table/utils/data-table-styles.js +14 -29
- package/dist/components/organisms/dialog/dialog.d.ts +1 -67
- package/dist/components/organisms/dialog/dialog.js +61 -78
- package/dist/components/organisms/index.d.ts +0 -2
- package/dist/components/organisms/sheet/sheet.d.ts +0 -69
- package/dist/components/organisms/sheet/sheet.js +33 -34
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +162 -173
- package/dist/vendor/shadcn/avatar.js +19 -19
- package/dist/vendor/shadcn/badge.js +15 -15
- package/dist/vendor/shadcn/card.js +7 -7
- package/dist/vendor/shadcn/date-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-picker.js +1 -1
- package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-range-picker.js +1 -1
- package/dist/vendor/shadcn/dialog.js +2 -2
- package/dist/vendor/shadcn/input-group.js +17 -17
- package/dist/vendor/shadcn/input.js +7 -7
- package/dist/vendor/shadcn/popover.js +1 -1
- package/dist/vendor/shadcn/select.js +2 -2
- package/dist/vendor/shadcn/sonner.d.ts +1 -26
- package/dist/vendor/shadcn/sonner.js +8 -12
- package/dist/vendor/shadcn/table.js +30 -30
- package/dist/vendor/shadcn/textarea.js +9 -9
- package/dist/vendor/shadcn/time-picker.d.ts +2 -1
- package/dist/vendor/shadcn/time-picker.js +23 -17
- package/dist/vendor/shadcn/toggle.js +13 -13
- package/dist/vendor/shadcn/tooltip.js +15 -25
- package/package.json +1 -1
- package/dist/components/atoms/icon/aida-logo.d.ts +0 -3
- package/dist/components/atoms/icon/aida-logo.js +0 -64
- package/dist/components/atoms/label/label.d.ts +0 -11
- package/dist/components/atoms/label/label.js +0 -28
- package/dist/components/atoms/loading/index.d.ts +0 -1
- package/dist/components/atoms/loading/loading.d.ts +0 -39
- package/dist/components/atoms/loading/loading.js +0 -37
- package/dist/components/atoms/select/search-select.d.ts +0 -22
- package/dist/components/atoms/select/search-select.js +0 -201
- package/dist/components/organisms/tutorial/index.d.ts +0 -2
- package/dist/components/organisms/tutorial/tutorial.d.ts +0 -16
- package/dist/components/organisms/tutorial/tutorial.js +0 -114
- package/dist/components/organisms/tutorial/tutorial.types.d.ts +0 -15
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/use-body-scroll-lock.d.ts +0 -13
- package/dist/hooks/use-escape-key.d.ts +0 -14
- package/dist/hooks/use-media-query.d.ts +0 -20
- package/dist/hooks/use-media-query.js +0 -21
- package/dist/lib/notification-alert.d.ts +0 -42
- package/dist/lib/notification-alert.js +0 -75
- package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +0 -8
- package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +0 -30
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +0 -36
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +0 -36
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +0 -30
|
@@ -1,28 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
export { Loading, type LoadingProps } from './loading';
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { IconWeight as PhosphorIconWeight } from '@phosphor-icons/react';
|
|
3
|
-
declare const loadingVariants: (props?: ({
|
|
4
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
/**
|
|
7
|
-
* Props for the Loading component
|
|
8
|
-
*/
|
|
9
|
-
interface LoadingProps extends VariantProps<typeof loadingVariants> {
|
|
10
|
-
/**
|
|
11
|
-
* Icon weight/style
|
|
12
|
-
* @default "light"
|
|
13
|
-
*/
|
|
14
|
-
weight?: PhosphorIconWeight;
|
|
15
|
-
/**
|
|
16
|
-
* Custom color for the loading icon
|
|
17
|
-
*/
|
|
18
|
-
color?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Additional CSS classes
|
|
21
|
-
*/
|
|
22
|
-
className?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Whether the loading icon should be mirrored
|
|
25
|
-
*/
|
|
26
|
-
mirrored?: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Loading component that displays an animated spinning icon.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```tsx
|
|
33
|
-
* <Loading size="md" />
|
|
34
|
-
* <Loading size="lg" color="#3b82f6" />
|
|
35
|
-
* <Loading weight="bold" className="text-primary" />
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
declare const Loading: import('react').ForwardRefExoticComponent<LoadingProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
39
|
-
export { Loading, type LoadingProps };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { j as n } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as e } from "react";
|
|
3
|
-
import { cva as d } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
4
|
-
import { cn as f } from "../../../lib/utils.js";
|
|
5
|
-
import { Icon as l } from "../icon/icon.js";
|
|
6
|
-
const p = d("animate-spin", {
|
|
7
|
-
variants: {
|
|
8
|
-
size: {
|
|
9
|
-
xs: "",
|
|
10
|
-
sm: "",
|
|
11
|
-
md: "",
|
|
12
|
-
lg: "",
|
|
13
|
-
xl: ""
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
size: "md"
|
|
18
|
-
}
|
|
19
|
-
}), c = e(
|
|
20
|
-
({ size: a = "md", weight: o = "light", color: r, className: m, mirrored: i = !1, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
21
|
-
l,
|
|
22
|
-
{
|
|
23
|
-
ref: s,
|
|
24
|
-
name: "CircleNotch",
|
|
25
|
-
size: a,
|
|
26
|
-
weight: o,
|
|
27
|
-
color: r,
|
|
28
|
-
mirrored: i,
|
|
29
|
-
className: f(p({ size: a }), m),
|
|
30
|
-
...t
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
c.displayName = "Loading";
|
|
35
|
-
export {
|
|
36
|
-
c as Loading
|
|
37
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
onChange?: (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,201 +0,0 @@
|
|
|
1
|
-
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import * as n from "react";
|
|
3
|
-
import { cn as a } from "../../../lib/utils.js";
|
|
4
|
-
import { FieldLabel as A } from "../../../vendor/shadcn/field.js";
|
|
5
|
-
import { Icon as b } from "../icon/icon.js";
|
|
6
|
-
import { Combobox as B, ComboboxTrigger as H, ComboboxContent as J } from "../../../vendor/shadcn/combobox.js";
|
|
7
|
-
import { Command as K, CommandInput as M, CommandList as P, CommandEmpty as Q, CommandGroup as U, CommandItem as k } from "../../../vendor/shadcn/command.js";
|
|
8
|
-
import { Typography as x } from "../typography/typography.js";
|
|
9
|
-
const W = n.forwardRef(
|
|
10
|
-
({
|
|
11
|
-
label: j,
|
|
12
|
-
description: N,
|
|
13
|
-
error: u,
|
|
14
|
-
optional: G = !1,
|
|
15
|
-
placeholder: L = "Select an option",
|
|
16
|
-
value: r,
|
|
17
|
-
defaultValue: p,
|
|
18
|
-
onChange: h,
|
|
19
|
-
disabled: f = !1,
|
|
20
|
-
options: c = [],
|
|
21
|
-
groups: o = [],
|
|
22
|
-
className: E,
|
|
23
|
-
id: g,
|
|
24
|
-
searchPlaceholder: z = "Search...",
|
|
25
|
-
maxHeight: F = 300
|
|
26
|
-
}, I) => {
|
|
27
|
-
const [i, C] = n.useState(!1), [v, S] = n.useState(""), d = o.length > 0, w = c.length > 0, R = n.useCallback(() => {
|
|
28
|
-
if (!r) return null;
|
|
29
|
-
if (d)
|
|
30
|
-
for (const s of o) {
|
|
31
|
-
const l = s.options.find((t) => t.value === r);
|
|
32
|
-
if (l) return l.label;
|
|
33
|
-
}
|
|
34
|
-
else if (w) {
|
|
35
|
-
const s = c.find((l) => l.value === r);
|
|
36
|
-
if (s) return s.label;
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
}, [r, o, c, d, w]), T = n.useCallback(
|
|
40
|
-
(s) => {
|
|
41
|
-
if (!s)
|
|
42
|
-
return { filteredOptions: c, filteredGroups: o };
|
|
43
|
-
const l = s.toLowerCase();
|
|
44
|
-
if (d) {
|
|
45
|
-
const t = o.map((m) => ({
|
|
46
|
-
...m,
|
|
47
|
-
options: m.options.filter(
|
|
48
|
-
(V) => V.label.toLowerCase().includes(l)
|
|
49
|
-
)
|
|
50
|
-
})).filter((m) => m.options.length > 0);
|
|
51
|
-
return { filteredOptions: [], filteredGroups: t };
|
|
52
|
-
} else
|
|
53
|
-
return { filteredOptions: c.filter(
|
|
54
|
-
(m) => m.label.toLowerCase().includes(l)
|
|
55
|
-
), filteredGroups: [] };
|
|
56
|
-
},
|
|
57
|
-
[c, o, d]
|
|
58
|
-
), { filteredOptions: q, filteredGroups: D } = T(v);
|
|
59
|
-
n.useEffect(() => {
|
|
60
|
-
i && setTimeout(() => {
|
|
61
|
-
document.querySelector(
|
|
62
|
-
'[data-slot="command-input"]'
|
|
63
|
-
)?.focus();
|
|
64
|
-
}, 0);
|
|
65
|
-
}, [i]), n.useEffect(() => {
|
|
66
|
-
i || S("");
|
|
67
|
-
}, [i]), n.useEffect(() => {
|
|
68
|
-
p && !r && h?.(p);
|
|
69
|
-
}, [p, r, h]);
|
|
70
|
-
const y = (s) => {
|
|
71
|
-
f || (h?.(s), C(!1));
|
|
72
|
-
}, O = R();
|
|
73
|
-
return /* @__PURE__ */ e.jsxs("div", { className: a("w-full", E), children: [
|
|
74
|
-
j && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 mb-2", children: [
|
|
75
|
-
/* @__PURE__ */ e.jsx(A, { htmlFor: g, className: a(f && "text-muted-foreground"), children: j }),
|
|
76
|
-
G && /* @__PURE__ */ e.jsx(x, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
|
|
77
|
-
] }),
|
|
78
|
-
N && !u && /* @__PURE__ */ e.jsx(
|
|
79
|
-
x,
|
|
80
|
-
{
|
|
81
|
-
variant: "sm",
|
|
82
|
-
className: a(
|
|
83
|
-
"text-muted-foreground mb-2",
|
|
84
|
-
f && "text-muted-"
|
|
85
|
-
),
|
|
86
|
-
children: N
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ e.jsxs(B, { open: i, onOpenChange: C, children: [
|
|
90
|
-
/* @__PURE__ */ e.jsx(H, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
91
|
-
"button",
|
|
92
|
-
{
|
|
93
|
-
ref: I,
|
|
94
|
-
id: g,
|
|
95
|
-
type: "button",
|
|
96
|
-
disabled: f,
|
|
97
|
-
role: "combobox",
|
|
98
|
-
"aria-expanded": i,
|
|
99
|
-
"aria-haspopup": "listbox",
|
|
100
|
-
className: a(
|
|
101
|
-
"flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:text-muted- shadow-xs [&>span]:min-w-0 [&>span]:truncate",
|
|
102
|
-
u && "border-destructive"
|
|
103
|
-
),
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ e.jsx(
|
|
106
|
-
"span",
|
|
107
|
-
{
|
|
108
|
-
className: a(
|
|
109
|
-
"truncate",
|
|
110
|
-
!O && "text-muted-foreground"
|
|
111
|
-
),
|
|
112
|
-
children: O || L
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
/* @__PURE__ */ e.jsx(
|
|
116
|
-
b,
|
|
117
|
-
{
|
|
118
|
-
name: "CaretDown",
|
|
119
|
-
size: "sm",
|
|
120
|
-
className: "text-muted- shrink-0"
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
) }),
|
|
126
|
-
/* @__PURE__ */ e.jsx(J, { className: "p-0", align: "start", children: /* @__PURE__ */ e.jsxs(K, { shouldFilter: !1, children: [
|
|
127
|
-
/* @__PURE__ */ e.jsx(
|
|
128
|
-
M,
|
|
129
|
-
{
|
|
130
|
-
placeholder: z,
|
|
131
|
-
value: v,
|
|
132
|
-
onValueChange: S
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
/* @__PURE__ */ e.jsxs(P, { style: { maxHeight: F }, children: [
|
|
136
|
-
/* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(
|
|
137
|
-
x,
|
|
138
|
-
{
|
|
139
|
-
variant: "sm",
|
|
140
|
-
className: "text-muted-foreground py-6 text-center",
|
|
141
|
-
children: "No results found."
|
|
142
|
-
}
|
|
143
|
-
) }),
|
|
144
|
-
d ? D.map((s, l) => /* @__PURE__ */ e.jsxs(U, { children: [
|
|
145
|
-
s.label && /* @__PURE__ */ e.jsx("div", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: s.label }),
|
|
146
|
-
s.options.map((t) => /* @__PURE__ */ e.jsxs(
|
|
147
|
-
k,
|
|
148
|
-
{
|
|
149
|
-
value: t.value,
|
|
150
|
-
onSelect: () => y(t.value),
|
|
151
|
-
className: a(
|
|
152
|
-
"cursor-pointer",
|
|
153
|
-
r === t.value && "bg-accent"
|
|
154
|
-
),
|
|
155
|
-
children: [
|
|
156
|
-
/* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
157
|
-
t.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: t.icon }),
|
|
158
|
-
t.label
|
|
159
|
-
] }),
|
|
160
|
-
r === t.value && /* @__PURE__ */ e.jsx(
|
|
161
|
-
b,
|
|
162
|
-
{
|
|
163
|
-
name: "Check",
|
|
164
|
-
size: "sm",
|
|
165
|
-
className: "ml-auto"
|
|
166
|
-
}
|
|
167
|
-
)
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
|
-
t.value
|
|
171
|
-
))
|
|
172
|
-
] }, l)) : q.map((s) => /* @__PURE__ */ e.jsxs(
|
|
173
|
-
k,
|
|
174
|
-
{
|
|
175
|
-
value: s.value,
|
|
176
|
-
onSelect: () => y(s.value),
|
|
177
|
-
className: a(
|
|
178
|
-
"cursor-pointer",
|
|
179
|
-
r === s.value && "bg-accent"
|
|
180
|
-
),
|
|
181
|
-
children: [
|
|
182
|
-
/* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
183
|
-
s.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: s.icon }),
|
|
184
|
-
s.label
|
|
185
|
-
] }),
|
|
186
|
-
r === s.value && /* @__PURE__ */ e.jsx(b, { name: "Check", size: "sm", className: "ml-auto" })
|
|
187
|
-
]
|
|
188
|
-
},
|
|
189
|
-
s.value
|
|
190
|
-
))
|
|
191
|
-
] })
|
|
192
|
-
] }) })
|
|
193
|
-
] }),
|
|
194
|
-
u && /* @__PURE__ */ e.jsx(x, { variant: "sm", className: "text-destructive mt-2", children: u })
|
|
195
|
-
] });
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
W.displayName = "SearchSelect";
|
|
199
|
-
export {
|
|
200
|
-
W as SearchSelect
|
|
201
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TutorialProps } from './tutorial.types';
|
|
2
|
-
/**
|
|
3
|
-
* Tutorial component that renders a customizable tooltip for guided tours.
|
|
4
|
-
* Designed to be used with react-joyride as a custom tooltip component.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <ReactJoyride
|
|
9
|
-
* tooltipComponent={(props) => (
|
|
10
|
-
* <Tutorial {...props} buttonGroup={buttons} width={400} />
|
|
11
|
-
* )}
|
|
12
|
-
* />
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
declare const Tutorial: import('react').ForwardRefExoticComponent<TutorialProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export { Tutorial };
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as C } from "react";
|
|
3
|
-
import { cn as j } from "../../../lib/utils.js";
|
|
4
|
-
import { Button as c } from "../../atoms/button/button.js";
|
|
5
|
-
import { Icon as y } from "../../atoms/icon/icon.js";
|
|
6
|
-
import { Typography as x } from "../../atoms/typography/typography.js";
|
|
7
|
-
import { Link as b } from "../../atoms/link/link.js";
|
|
8
|
-
import { Badge as w } from "../../atoms/badge/badge.js";
|
|
9
|
-
const B = C(
|
|
10
|
-
({
|
|
11
|
-
continuous: o,
|
|
12
|
-
step: a,
|
|
13
|
-
closeProps: l,
|
|
14
|
-
primaryProps: n,
|
|
15
|
-
tooltipProps: g,
|
|
16
|
-
withTag: v = !1,
|
|
17
|
-
tagLabel: f,
|
|
18
|
-
buttonGroup: r = [],
|
|
19
|
-
width: i,
|
|
20
|
-
skipProps: t,
|
|
21
|
-
index: h,
|
|
22
|
-
size: d,
|
|
23
|
-
...z
|
|
24
|
-
}, N) => {
|
|
25
|
-
const u = (s) => {
|
|
26
|
-
l?.onClick?.(s);
|
|
27
|
-
}, k = (s, m) => {
|
|
28
|
-
m(), u(s);
|
|
29
|
-
};
|
|
30
|
-
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
31
|
-
/* @__PURE__ */ e.jsx("style", { children: `
|
|
32
|
-
.react-joyride__spotlight {
|
|
33
|
-
border-radius: 8px !important;
|
|
34
|
-
}
|
|
35
|
-
` }),
|
|
36
|
-
/* @__PURE__ */ e.jsxs(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
ref: N,
|
|
40
|
-
...g,
|
|
41
|
-
className: j(
|
|
42
|
-
"bg-background rounded border shadow-lg p-4",
|
|
43
|
-
"max-w-[368px]",
|
|
44
|
-
i && `max-w-[${i}px]`
|
|
45
|
-
),
|
|
46
|
-
style: i ? { maxWidth: `${i}px` } : void 0,
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between gap-4 mb-3", children: [
|
|
49
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1", children: a.title && /* @__PURE__ */ e.jsx(x, { variant: "h4", className: "text-base font-semibold", children: a.title }) }),
|
|
50
|
-
!a.hideCloseButton && /* @__PURE__ */ e.jsx(
|
|
51
|
-
c,
|
|
52
|
-
{
|
|
53
|
-
variant: "ghost",
|
|
54
|
-
size: "icon",
|
|
55
|
-
className: "h-8 w-8 shrink-0",
|
|
56
|
-
onClick: l?.onClick,
|
|
57
|
-
children: /* @__PURE__ */ e.jsx(y, { name: "X", size: "sm" })
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
] }),
|
|
61
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-5", children: /* @__PURE__ */ e.jsx(x, { variant: "sm", className: "text-muted-foreground font-normal", children: a.content }) }),
|
|
62
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
63
|
-
t && h !== (d ?? 0) - 1 && /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: /* @__PURE__ */ e.jsx(
|
|
64
|
-
b,
|
|
65
|
-
{
|
|
66
|
-
...t,
|
|
67
|
-
onClick: l?.onClick,
|
|
68
|
-
underline: !1,
|
|
69
|
-
className: "text-xs",
|
|
70
|
-
children: t.title
|
|
71
|
-
}
|
|
72
|
-
) }),
|
|
73
|
-
(d ?? 0) > 1 && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e.jsxs(x, { variant: "xs", className: "text-muted-foreground mr-6", children: [
|
|
74
|
-
"Step ",
|
|
75
|
-
(h ?? 0) + 1,
|
|
76
|
-
" of ",
|
|
77
|
-
d
|
|
78
|
-
] }) }),
|
|
79
|
-
o && n && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e.jsx(c, { size: "default", ...n, children: n.title }) })
|
|
80
|
-
] }),
|
|
81
|
-
!o && r.length > 0 && /* @__PURE__ */ e.jsxs(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
className: j(
|
|
85
|
-
"flex items-center mt-6 gap-3",
|
|
86
|
-
r.length > 1 ? "justify-between" : "justify-end"
|
|
87
|
-
),
|
|
88
|
-
children: [
|
|
89
|
-
v && f && /* @__PURE__ */ e.jsx(w, { variant: "default", className: "bg-green-100 text-green-800", children: f }),
|
|
90
|
-
r.map((s, m) => /* @__PURE__ */ e.jsx(
|
|
91
|
-
c,
|
|
92
|
-
{
|
|
93
|
-
variant: s.variant || "default",
|
|
94
|
-
size: s.size || "default",
|
|
95
|
-
loading: s.loading,
|
|
96
|
-
disabled: s.disabled,
|
|
97
|
-
onClick: (p) => k(p, s.event),
|
|
98
|
-
children: s.label
|
|
99
|
-
},
|
|
100
|
-
m
|
|
101
|
-
))
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
] });
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
B.displayName = "Tutorial";
|
|
112
|
-
export {
|
|
113
|
-
B as Tutorial
|
|
114
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TooltipRenderProps } from 'react-joyride';
|
|
2
|
-
export interface TutorialButtonProps {
|
|
3
|
-
label: string;
|
|
4
|
-
event: () => void;
|
|
5
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
6
|
-
size?: "default" | "sm" | "lg" | "icon";
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface TutorialProps extends TooltipRenderProps {
|
|
11
|
-
withTag?: boolean;
|
|
12
|
-
tagLabel?: string;
|
|
13
|
-
buttonGroup?: TutorialButtonProps[];
|
|
14
|
-
width?: number;
|
|
15
|
-
}
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom hook to lock/unlock body scroll when a modal or overlay is open
|
|
3
|
-
* This prevents the background from scrolling while a modal is active
|
|
4
|
-
*
|
|
5
|
-
* @param isLocked - Whether the body scroll should be locked
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* const [isOpen, setIsOpen] = useState(false)
|
|
10
|
-
* useBodyScrollLock(isOpen)
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export declare function useBodyScrollLock(isLocked: boolean): void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom hook to handle Escape key press
|
|
3
|
-
* Commonly used for closing modals, dialogs, sheets, etc.
|
|
4
|
-
*
|
|
5
|
-
* @param isActive - Whether the Escape key handler should be active
|
|
6
|
-
* @param onEscape - Callback function to execute when Escape is pressed
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* const [isOpen, setIsOpen] = useState(false)
|
|
11
|
-
* useEscapeKey(isOpen, () => setIsOpen(false))
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare function useEscapeKey(isActive: boolean, onEscape: () => void): void;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom hook to track media query matches
|
|
3
|
-
* Returns true if the media query matches, false otherwise
|
|
4
|
-
*
|
|
5
|
-
* This hook uses the native window.matchMedia API and updates reactively
|
|
6
|
-
* when the media query match state changes
|
|
7
|
-
*
|
|
8
|
-
* @param query - Media query string (e.g., '(max-width: 768px)')
|
|
9
|
-
* @param defaultValue - Optional default value for SSR (defaults to false)
|
|
10
|
-
*
|
|
11
|
-
* @returns boolean indicating whether the media query matches
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const isMobile = useMediaQuery('(max-width: 599px)')
|
|
16
|
-
* const isTablet = useMediaQuery('(max-width: 1023px)')
|
|
17
|
-
* const isDesktop = useMediaQuery('(min-width: 1024px)')
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare function useMediaQuery(query: string, defaultValue?: boolean): boolean;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useState as s, useEffect as o } from "react";
|
|
2
|
-
function f(n, a = !1) {
|
|
3
|
-
const [i, r] = s(() => typeof window > "u" ? a : window.matchMedia(n).matches);
|
|
4
|
-
return o(() => {
|
|
5
|
-
if (typeof window > "u")
|
|
6
|
-
return;
|
|
7
|
-
const e = window.matchMedia(n);
|
|
8
|
-
r(e.matches);
|
|
9
|
-
const t = (d) => {
|
|
10
|
-
r(d.matches);
|
|
11
|
-
};
|
|
12
|
-
return e.addEventListener ? (e.addEventListener("change", t), () => {
|
|
13
|
-
e.removeEventListener("change", t);
|
|
14
|
-
}) : (e.addListener(t), () => {
|
|
15
|
-
e.removeListener(t);
|
|
16
|
-
});
|
|
17
|
-
}, [n]), i;
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
f as useMediaQuery
|
|
21
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export type NotificationMode = "success" | "error" | "warning" | "info";
|
|
2
|
-
export interface NotificationAlertOptions {
|
|
3
|
-
mode: NotificationMode;
|
|
4
|
-
title?: string;
|
|
5
|
-
message: string;
|
|
6
|
-
primaryActionLabel?: string;
|
|
7
|
-
onAction?: () => void;
|
|
8
|
-
timeToLive?: number;
|
|
9
|
-
withCloseButton?: boolean;
|
|
10
|
-
withProgress?: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Shows a notification alert toast with NotificationAlert structure.
|
|
14
|
-
* IMPORTANT: Requires <Toaster /> component to be mounted in your app.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* // In your root component:
|
|
19
|
-
* import { Toaster } from '@yuno-payments/dashboard-design-system';
|
|
20
|
-
* <Toaster position="top-right" />
|
|
21
|
-
*
|
|
22
|
-
* // Anywhere in your app:
|
|
23
|
-
* import { showNotificationAlert } from '@yuno-payments/dashboard-design-system';
|
|
24
|
-
*
|
|
25
|
-
* // Simple message
|
|
26
|
-
* showNotificationAlert({
|
|
27
|
-
* mode: 'success',
|
|
28
|
-
* message: 'Operation completed successfully',
|
|
29
|
-
* });
|
|
30
|
-
*
|
|
31
|
-
* // With title and action
|
|
32
|
-
* showNotificationAlert({
|
|
33
|
-
* mode: 'error',
|
|
34
|
-
* title: 'Error saving',
|
|
35
|
-
* message: 'Could not save changes. Please try again.',
|
|
36
|
-
* primaryActionLabel: 'Retry',
|
|
37
|
-
* onAction: () => retryOperation(),
|
|
38
|
-
* timeToLive: 8000,
|
|
39
|
-
* });
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare const showNotificationAlert: ({ mode, title, message, primaryActionLabel, onAction, timeToLive, withCloseButton, withProgress, }: NotificationAlertOptions) => string | number;
|