@yuno-payments/dashboard-design-system 0.0.170 → 0.0.172
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 +16 -0
- package/dist/components/atoms/accordion/accordion.d.ts +66 -0
- package/dist/components/atoms/alert/alert.d.ts +26 -1
- package/dist/components/atoms/alert/alert.js +9 -8
- package/dist/components/atoms/avatar/avatar-group.d.ts +28 -0
- package/dist/components/atoms/avatar/avatar.d.ts +25 -0
- package/dist/components/atoms/avatar/avatar.js +9 -9
- package/dist/components/atoms/badge/badge.d.ts +30 -2
- package/dist/components/atoms/badge/badge.js +27 -11
- package/dist/components/atoms/button/button.d.ts +44 -0
- package/dist/components/atoms/card/card.d.ts +137 -3
- package/dist/components/atoms/card/card.js +56 -28
- package/dist/components/atoms/checkbox/checkbox.d.ts +38 -2
- package/dist/components/atoms/checkbox/checkbox.js +61 -27
- package/dist/components/atoms/combobox/combobox.d.ts +18 -0
- package/dist/components/atoms/combobox/combobox.js +41 -41
- package/dist/components/atoms/combobox/types.d.ts +90 -1
- package/dist/components/atoms/currency-field/currency-field.d.ts +38 -0
- package/dist/components/atoms/currency-field/currency-field.js +22 -19
- package/dist/components/atoms/date-picker/date-picker.d.ts +15 -0
- package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +15 -0
- package/dist/components/atoms/dots-menu/dots-menu.d.ts +16 -0
- package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
- package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +52 -0
- package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +50 -0
- package/dist/components/atoms/field/field.d.ts +55 -0
- package/dist/components/atoms/field/field.js +53 -46
- package/dist/components/atoms/filter/filter-date-range.d.ts +12 -2
- package/dist/components/atoms/filter/filter-date-range.js +203 -168
- package/dist/components/atoms/filter/filter.d.ts +6 -0
- package/dist/components/atoms/filter/filter.js +91 -76
- package/dist/components/atoms/filter/index.d.ts +1 -1
- package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +208 -2
- package/dist/components/atoms/filter-dropdown/filter-dropdown.js +214 -160
- package/dist/components/atoms/icon/aida-logo.d.ts +3 -0
- package/dist/components/atoms/icon/aida-logo.js +64 -0
- package/dist/components/atoms/icon/icon-list.d.ts +5 -0
- package/dist/components/atoms/icon/icon-list.js +394 -384
- package/dist/components/atoms/icon/icon.d.ts +29 -0
- package/dist/components/atoms/index.d.ts +3 -2
- 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/link/link.d.ts +20 -0
- package/dist/components/atoms/loading/index.d.ts +1 -0
- package/dist/components/atoms/loading/loading.d.ts +39 -0
- package/dist/components/atoms/loading/loading.js +37 -0
- 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 +16 -0
- package/dist/components/atoms/multi-values-field/multi-values-field.js +109 -87
- package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +81 -0
- package/dist/components/atoms/otp-field/otp-field.d.ts +32 -0
- package/dist/components/atoms/password-field/password-field.d.ts +23 -0
- package/dist/components/atoms/password-field/password-field.js +1 -1
- package/dist/components/atoms/progress/progress.d.ts +15 -0
- package/dist/components/atoms/protected-field/protected-field.d.ts +10 -0
- package/dist/components/atoms/protected-field/protected-field.types.d.ts +14 -0
- package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
- package/dist/components/atoms/radio-group/radio-group.d.ts +50 -1
- package/dist/components/atoms/radio-group/radio-group.js +13 -12
- package/dist/components/atoms/search-field/search-field.d.ts +14 -0
- package/dist/components/atoms/search-field/search-field.js +17 -17
- package/dist/components/atoms/search-field/search-field.types.d.ts +57 -0
- 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/select/search-select.js +201 -0
- package/dist/components/atoms/select/select.d.ts +83 -1
- package/dist/components/atoms/select/select.js +21 -21
- package/dist/components/atoms/separator/separator.d.ts +17 -0
- package/dist/components/atoms/skeleton/index.d.ts +9 -0
- package/dist/components/atoms/switch/switch.d.ts +56 -2
- package/dist/components/atoms/switch/switch.js +64 -32
- package/dist/components/atoms/tabs/index.d.ts +16 -0
- package/dist/components/atoms/textarea/textarea.d.ts +32 -0
- package/dist/components/atoms/textarea/textarea.js +1 -1
- package/dist/components/atoms/time-picker/time-picker.d.ts +73 -2
- package/dist/components/atoms/time-picker/time-picker.js +218 -3
- package/dist/components/atoms/toaster/index.d.ts +15 -0
- package/dist/components/atoms/toggle-group/toggle-group.d.ts +26 -1
- package/dist/components/atoms/toggle-group/toggle-group.js +15 -14
- package/dist/components/atoms/tooltip/tooltip.d.ts +53 -2
- package/dist/components/atoms/typography/typography.d.ts +18 -0
- package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +50 -0
- package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
- package/dist/components/molecules/dialog-content/dialog-content.d.ts +16 -0
- package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +20 -0
- package/dist/components/molecules/dialog-header/dialog-header.d.ts +31 -0
- package/dist/components/molecules/empty/empty-icon.js +6 -6
- package/dist/components/molecules/empty/empty.d.ts +16 -1
- package/dist/components/molecules/empty/empty.js +37 -34
- package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +17 -0
- package/dist/components/molecules/pagination/pagination.d.ts +49 -0
- package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +41 -0
- 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 +18 -0
- 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 +18 -0
- package/dist/components/organisms/data-table/components/data-table-header.d.ts +12 -0
- 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 +24 -0
- package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
- package/dist/components/organisms/data-table/data-table.d.ts +133 -4
- package/dist/components/organisms/data-table/data-table.js +132 -100
- package/dist/components/organisms/data-table/data-table.types.d.ts +35 -26
- package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +57 -41
- package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +8 -2
- package/dist/components/organisms/data-table/hooks/use-data-table-state.js +82 -47
- package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +8 -2
- package/dist/components/organisms/data-table/utils/data-table-constants.js +16 -10
- package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +1652 -0
- package/dist/components/organisms/data-table/utils/data-table-styles.js +29 -14
- package/dist/components/organisms/dialog/dialog.d.ts +67 -1
- package/dist/components/organisms/dialog/dialog.js +78 -61
- package/dist/components/organisms/index.d.ts +2 -0
- package/dist/components/organisms/sheet/sheet.d.ts +69 -0
- package/dist/components/organisms/sheet/sheet.js +34 -33
- package/dist/components/organisms/tutorial/index.d.ts +2 -0
- package/dist/components/organisms/tutorial/tutorial.d.ts +16 -0
- package/dist/components/organisms/tutorial/tutorial.js +114 -0
- package/dist/components/organisms/tutorial/tutorial.types.d.ts +15 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/use-body-scroll-lock.d.ts +13 -0
- package/dist/hooks/use-escape-key.d.ts +14 -0
- package/dist/hooks/use-media-query.d.ts +20 -0
- package/dist/hooks/use-media-query.js +21 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +173 -162
- package/dist/lib/notification-alert.d.ts +42 -0
- package/dist/lib/notification-alert.js +75 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +30 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +36 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +36 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +30 -0
- 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 +26 -1
- package/dist/vendor/shadcn/sonner.js +12 -8
- package/dist/vendor/shadcn/table.js +30 -30
- package/dist/vendor/shadcn/textarea.js +9 -9
- package/dist/vendor/shadcn/time-picker.d.ts +1 -2
- package/dist/vendor/shadcn/time-picker.js +17 -23
- package/dist/vendor/shadcn/toggle.js +13 -13
- package/dist/vendor/shadcn/tooltip.js +25 -15
- package/package.json +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
};
|