@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
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { forwardRef as L, Fragment as i } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon as C } from "../../atoms/icon/icon.js";
|
|
4
|
+
import { Breadcrumb as M, BreadcrumbList as E, BreadcrumbItem as h, BreadcrumbEllipsis as I, BreadcrumbSeparator as N, BreadcrumbPage as V, BreadcrumbLink as k } from "../../../vendor/shadcn/breadcrumb.js";
|
|
4
5
|
import { DropdownMenu as u, DropdownMenuTrigger as x, DropdownMenuContent as j, DropdownMenuItem as p } from "../../../vendor/shadcn/dropdown-menu.js";
|
|
5
|
-
import { Icon as k } from "../../atoms/icon/icon.js";
|
|
6
6
|
const v = L(
|
|
7
|
-
({ items: s, separator:
|
|
8
|
-
const
|
|
7
|
+
({ items: s, separator: f, maxItems: l = 0, className: b }, m) => {
|
|
8
|
+
const d = l > 0 && s.length > l, o = d ? [
|
|
9
9
|
s[0],
|
|
10
10
|
// First item always visible
|
|
11
11
|
null,
|
|
12
12
|
// Placeholder for ellipsis
|
|
13
13
|
...s.slice(-(l - 2))
|
|
14
14
|
// Last items
|
|
15
|
-
] : s,
|
|
15
|
+
] : s, a = d ? s.slice(1, s.length - (l - 2)) : [], g = ((e) => {
|
|
16
16
|
for (let n = e.length - 1; n >= 0; n--)
|
|
17
17
|
if (e[n]) return n;
|
|
18
18
|
return -1;
|
|
19
|
-
})(
|
|
20
|
-
/* @__PURE__ */ r.jsxs(x, { className: "flex items-center gap-1 text-sm text-
|
|
19
|
+
})(o), t = () => /* @__PURE__ */ r.jsx(N, { children: f }), B = (e) => /* @__PURE__ */ r.jsxs(u, { children: [
|
|
20
|
+
/* @__PURE__ */ r.jsxs(x, { className: "flex items-center gap-1 text-sm text-muted-foreground hover:text-neutral-700 transition-colors", children: [
|
|
21
21
|
e.label,
|
|
22
|
-
/* @__PURE__ */ r.jsx(
|
|
22
|
+
/* @__PURE__ */ r.jsx(C, { name: "CaretDown", className: "size-4" })
|
|
23
23
|
] }),
|
|
24
|
-
/* @__PURE__ */ r.jsx(j, { children: e.dropdown?.map((n,
|
|
25
|
-
] }), w = (e, n) => n ? /* @__PURE__ */ r.jsx(
|
|
24
|
+
/* @__PURE__ */ r.jsx(j, { children: e.dropdown?.map((n, c) => /* @__PURE__ */ r.jsx(p, { asChild: !0, children: /* @__PURE__ */ r.jsx("a", { href: n.href, children: n.label }) }, c)) })
|
|
25
|
+
] }), w = (e, n) => n ? /* @__PURE__ */ r.jsx(V, { children: e.label }) : /* @__PURE__ */ r.jsx(k, { href: e.href, children: e.label }), D = () => /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
26
26
|
/* @__PURE__ */ r.jsx(h, { children: /* @__PURE__ */ r.jsxs(u, { children: [
|
|
27
|
-
/* @__PURE__ */ r.jsx(x, { children: /* @__PURE__ */ r.jsx(
|
|
28
|
-
/* @__PURE__ */ r.jsx(j, { children:
|
|
27
|
+
/* @__PURE__ */ r.jsx(x, { children: /* @__PURE__ */ r.jsx(I, {}) }),
|
|
28
|
+
/* @__PURE__ */ r.jsx(j, { children: a.map((e, n) => /* @__PURE__ */ r.jsx(p, { asChild: !0, children: /* @__PURE__ */ r.jsx("a", { href: e.href, children: e.label }) }, n)) })
|
|
29
29
|
] }) }),
|
|
30
30
|
t()
|
|
31
31
|
] });
|
|
32
|
-
return /* @__PURE__ */ r.jsx(
|
|
33
|
-
if (e === null &&
|
|
32
|
+
return /* @__PURE__ */ r.jsx(M, { ref: m, className: b, children: /* @__PURE__ */ r.jsx(E, { children: o.map((e, n) => {
|
|
33
|
+
if (e === null && a.length > 0)
|
|
34
34
|
return /* @__PURE__ */ r.jsx(i, { children: D() }, n);
|
|
35
35
|
if (!e) return null;
|
|
36
|
-
const
|
|
36
|
+
const c = n === g;
|
|
37
37
|
return /* @__PURE__ */ r.jsxs(i, { children: [
|
|
38
|
-
/* @__PURE__ */ r.jsx(h, { children: e.dropdown ? B(e) : w(e,
|
|
39
|
-
n <
|
|
38
|
+
/* @__PURE__ */ r.jsx(h, { children: e.dropdown ? B(e) : w(e, c) }),
|
|
39
|
+
n < o.length - 1 && e && t()
|
|
40
40
|
] }, n);
|
|
41
41
|
}) }) });
|
|
42
42
|
}
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DialogContent component
|
|
4
|
+
*/
|
|
2
5
|
export interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Content to display in the dialog body
|
|
8
|
+
*/
|
|
3
9
|
children: React.ReactNode;
|
|
4
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Scrollable content area for dialog body.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <DialogContent>
|
|
17
|
+
* <p>Your dialog content goes here...</p>
|
|
18
|
+
* </DialogContent>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
5
21
|
export declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import { ButtonProps } from '../../atoms/button';
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Props for the DialogFooter component
|
|
5
|
+
*/
|
|
3
6
|
export interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Array of button configurations to display in the footer
|
|
9
|
+
*/
|
|
4
10
|
buttons?: ButtonProps[];
|
|
5
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Dialog footer component for action buttons.
|
|
14
|
+
* Renders nothing if no buttons are provided.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <DialogFooter
|
|
19
|
+
* buttons={[
|
|
20
|
+
* { children: 'Cancel', variant: 'outline', onClick: handleCancel },
|
|
21
|
+
* { children: 'Save', variant: 'default', onClick: handleSave }
|
|
22
|
+
* ]}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
6
26
|
export declare const DialogFooter: React.ForwardRefExoticComponent<DialogFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,40 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DialogHeader component
|
|
4
|
+
*/
|
|
2
5
|
export interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Dialog title (text or custom element)
|
|
8
|
+
*/
|
|
3
9
|
title?: React.ReactElement | string;
|
|
10
|
+
/**
|
|
11
|
+
* Callback fired when the close button is clicked
|
|
12
|
+
*/
|
|
4
13
|
onClose?: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Callback fired when the back button is clicked
|
|
16
|
+
*/
|
|
5
17
|
onBack?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Additional action elements to display before the close button
|
|
20
|
+
*/
|
|
6
21
|
otherActions?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show the close button
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
7
26
|
showCloseButton?: boolean;
|
|
8
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Dialog header component with title, back button, and close button.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <DialogHeader
|
|
34
|
+
* title="Edit Profile"
|
|
35
|
+
* onClose={() => setOpen(false)}
|
|
36
|
+
* onBack={() => goToPreviousStep()}
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
9
40
|
export declare const DialogHeader: React.ForwardRefExoticComponent<DialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { j as o } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Icon as
|
|
4
|
-
function
|
|
3
|
+
import { Icon as t } from "../../atoms/icon/icon.js";
|
|
4
|
+
function d({
|
|
5
5
|
name: r,
|
|
6
|
-
size:
|
|
7
|
-
className:
|
|
6
|
+
size: m = "xl",
|
|
7
|
+
className: n,
|
|
8
8
|
children: s
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */ o.jsx("div", { className: "p-4 bg-
|
|
10
|
+
return /* @__PURE__ */ o.jsx("div", { className: "p-4 bg-background rounded-lg shadow-sm", children: s || /* @__PURE__ */ o.jsx(t, { name: r, size: m, className: n }) });
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
d as EmptyIcon
|
|
14
14
|
};
|
|
@@ -2,8 +2,10 @@ import { HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
export interface EmptyProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
/**
|
|
4
4
|
* Media content to display (image, icon, or any ReactNode)
|
|
5
|
+
* @default <img src="https://dashboard-assets.y.uno/common/empty_illustration.svg" alt="" />
|
|
6
|
+
* Pass `null` to hide the media content
|
|
5
7
|
*/
|
|
6
|
-
media?: ReactNode;
|
|
8
|
+
media?: ReactNode | null;
|
|
7
9
|
/**
|
|
8
10
|
* Title text displayed prominently
|
|
9
11
|
*/
|
|
@@ -17,5 +19,18 @@ export interface EmptyProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
19
|
*/
|
|
18
20
|
actions?: ReactNode;
|
|
19
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Empty state component for displaying when there's no content or data.
|
|
24
|
+
* Shows an optional image/icon, title, description, and action buttons.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Empty
|
|
29
|
+
* title="No results found"
|
|
30
|
+
* description="Try adjusting your search or filter criteria"
|
|
31
|
+
* actions={<Button>Clear filters</Button>}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
20
35
|
declare const Empty: import('react').ForwardRefExoticComponent<EmptyProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
36
|
export { Empty };
|
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Typography as
|
|
5
|
-
const
|
|
6
|
-
({ className:
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */ e.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
import { forwardRef as o } from "react";
|
|
3
|
+
import { cn as d } from "../../../lib/utils.js";
|
|
4
|
+
import { Typography as r } from "../../atoms/typography/typography.js";
|
|
5
|
+
const x = "https://dashboard-assets.y.uno/common/empty_illustration.svg", f = o(
|
|
6
|
+
({ className: c, media: s, title: i, description: t, actions: l, ...n }, m) => {
|
|
7
|
+
const a = s === void 0 ? /* @__PURE__ */ e.jsx("img", { src: x, alt: "" }) : s;
|
|
8
|
+
return /* @__PURE__ */ e.jsxs(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
ref: m,
|
|
12
|
+
className: d(
|
|
13
|
+
"flex flex-col items-center gap-6 bg-surface px-6 py-12 rounded-lg",
|
|
14
|
+
c
|
|
15
|
+
),
|
|
16
|
+
...n,
|
|
17
|
+
children: [
|
|
18
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: a }),
|
|
19
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-6 items-center w-full", children: [
|
|
20
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 items-center w-full", children: [
|
|
21
|
+
/* @__PURE__ */ e.jsx(
|
|
22
|
+
r,
|
|
23
|
+
{
|
|
24
|
+
as: "h3",
|
|
25
|
+
className: "text-base font-semibold text-center leading-none",
|
|
26
|
+
children: i
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
t && /* @__PURE__ */ e.jsx(r, { variant: "muted", className: "text-center", children: t })
|
|
30
|
+
] }),
|
|
31
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "flex gap-3 items-center justify-center", children: l })
|
|
32
|
+
] })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
34
37
|
);
|
|
35
|
-
|
|
38
|
+
f.displayName = "Empty";
|
|
36
39
|
export {
|
|
37
|
-
|
|
40
|
+
f as Empty
|
|
38
41
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { IconName } from '../../atoms/icon';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the HighlightBanner component
|
|
5
|
+
*/
|
|
3
6
|
interface HighlightBannerProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
4
7
|
/**
|
|
5
8
|
* Icon name to display on the left side of the banner.
|
|
@@ -21,5 +24,19 @@ interface HighlightBannerProps extends Omit<HTMLAttributes<HTMLDivElement>, "tit
|
|
|
21
24
|
*/
|
|
22
25
|
button?: ReactNode;
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Prominent banner component for highlighting important information or calls-to-action.
|
|
29
|
+
* Features an icon in a circular container, title, description, and optional action button.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <HighlightBanner
|
|
34
|
+
* icon="Lightbulb"
|
|
35
|
+
* title="Get started with our API"
|
|
36
|
+
* description="Learn how to integrate our payment solution in minutes"
|
|
37
|
+
* button={<Button>View Documentation</Button>}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
24
41
|
declare const HighlightBanner: import('react').ForwardRefExoticComponent<HighlightBannerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
25
42
|
export { HighlightBanner, type HighlightBannerProps };
|
|
@@ -1,14 +1,63 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the Pagination component
|
|
4
|
+
*/
|
|
2
5
|
interface PaginationProps extends ComponentProps<"nav"> {
|
|
6
|
+
/**
|
|
7
|
+
* Current active page number (1-indexed)
|
|
8
|
+
*/
|
|
3
9
|
currentPage: number;
|
|
10
|
+
/**
|
|
11
|
+
* Total number of pages available
|
|
12
|
+
*/
|
|
4
13
|
totalPages?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Callback fired when a page number is clicked
|
|
16
|
+
*/
|
|
5
17
|
onPageClick?: (page: number) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Callback fired when the next button is clicked
|
|
20
|
+
*/
|
|
6
21
|
onClickNext?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Callback fired when the previous button is clicked
|
|
24
|
+
*/
|
|
7
25
|
onClickPrev?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the previous button is disabled
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
8
30
|
disablePrevious?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the next button is disabled
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
9
35
|
disableNext?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to show previous/next navigation buttons
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
10
40
|
showPreviousNext?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Maximum number of page numbers to display before using ellipsis
|
|
43
|
+
* @default 5
|
|
44
|
+
*/
|
|
11
45
|
maxVisiblePages?: number;
|
|
12
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Pagination component for navigating through multiple pages of content.
|
|
49
|
+
* Supports custom page number display with ellipsis for large page counts.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <Pagination
|
|
54
|
+
* currentPage={5}
|
|
55
|
+
* totalPages={20}
|
|
56
|
+
* onPageClick={(page) => console.log('Go to page', page)}
|
|
57
|
+
* onClickNext={() => console.log('Next')}
|
|
58
|
+
* onClickPrev={() => console.log('Previous')}
|
|
59
|
+
* />
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
13
62
|
declare const Pagination: import('react').ForwardRefExoticComponent<Omit<PaginationProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
14
63
|
export { Pagination, type PaginationProps };
|
|
@@ -1,12 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a single item in the list cell
|
|
3
|
+
*/
|
|
1
4
|
export interface DataTableListCellItem {
|
|
5
|
+
/**
|
|
6
|
+
* Item name/label
|
|
7
|
+
*/
|
|
2
8
|
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional icon
|
|
11
|
+
*/
|
|
3
12
|
icon?: string;
|
|
4
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for the DataTableListCell component
|
|
16
|
+
*/
|
|
5
17
|
export interface DataTableListCellProps {
|
|
18
|
+
/**
|
|
19
|
+
* Array of items to display
|
|
20
|
+
*/
|
|
6
21
|
items: DataTableListCellItem[];
|
|
22
|
+
/**
|
|
23
|
+
* Maximum length for item names before truncation
|
|
24
|
+
* @default 7
|
|
25
|
+
*/
|
|
7
26
|
maxLength?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to show remaining items count
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
8
31
|
showRemainingCount?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Additional CSS classes
|
|
34
|
+
*/
|
|
9
35
|
className?: string;
|
|
10
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Table cell component for displaying a list of items with badges.
|
|
39
|
+
* Shows first item and remaining count with tooltip.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <DataTableListCell
|
|
44
|
+
* items={[
|
|
45
|
+
* { name: 'Item 1' },
|
|
46
|
+
* { name: 'Item 2' }
|
|
47
|
+
* ]}
|
|
48
|
+
* maxLength={10}
|
|
49
|
+
* />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
11
52
|
declare const DataTableListCell: import('react').ForwardRefExoticComponent<DataTableListCellProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
53
|
export { DataTableListCell };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "../../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Icon as o } from "../../../../atoms/icon/icon.js";
|
|
2
3
|
import { cn as u } from "../../../../../lib/utils.js";
|
|
3
4
|
import { DataTableSortIndicator as f } from "./data-table-sort-indicator.js";
|
|
4
5
|
import { COLUMN_HEADER_CONFIG as t } from "../../utils/data-table-constants.js";
|
|
5
|
-
import { Icon as o } from "../../../../atoms/icon/icon.js";
|
|
6
6
|
import { DropdownMenuTrigger as d } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
|
|
7
7
|
function N({
|
|
8
8
|
title: r,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "../../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Icon as n } from "../../../../atoms/icon/icon.js";
|
|
3
|
+
import { DropdownMenuContent as g, DropdownMenuItem as i, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
|
|
4
4
|
function p({
|
|
5
5
|
column: s,
|
|
6
6
|
isLastVisibleColumn: r,
|
|
@@ -9,63 +9,63 @@ function p({
|
|
|
9
9
|
const l = s.getCanSort(), d = s.getCanPin(), x = s.getCanHide(), t = s.getIsPinned(), c = s.getIsSorted();
|
|
10
10
|
return /* @__PURE__ */ e.jsxs(g, { align: "start", children: [
|
|
11
11
|
l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
12
|
-
/* @__PURE__ */ e.jsxs(
|
|
13
|
-
/* @__PURE__ */ e.jsx(
|
|
12
|
+
/* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!1), children: [
|
|
13
|
+
/* @__PURE__ */ e.jsx(n, { name: "ArrowUp", size: "sm" }),
|
|
14
14
|
"Ascending"
|
|
15
15
|
] }),
|
|
16
|
-
/* @__PURE__ */ e.jsxs(
|
|
17
|
-
/* @__PURE__ */ e.jsx(
|
|
16
|
+
/* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!0), children: [
|
|
17
|
+
/* @__PURE__ */ e.jsx(n, { name: "ArrowDown", size: "sm" }),
|
|
18
18
|
"Descending"
|
|
19
19
|
] }),
|
|
20
|
-
c && /* @__PURE__ */ e.jsxs(
|
|
21
|
-
/* @__PURE__ */ e.jsx(
|
|
20
|
+
c && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.clearSorting(), children: [
|
|
21
|
+
/* @__PURE__ */ e.jsx(n, { name: "X", size: "sm" }),
|
|
22
22
|
"Clear sorting"
|
|
23
23
|
] }),
|
|
24
24
|
/* @__PURE__ */ e.jsx(o, {})
|
|
25
25
|
] }),
|
|
26
26
|
d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
27
27
|
/* @__PURE__ */ e.jsxs(
|
|
28
|
-
|
|
28
|
+
i,
|
|
29
29
|
{
|
|
30
30
|
onClick: () => s.pin("left"),
|
|
31
31
|
disabled: t === "left",
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ e.jsx(
|
|
33
|
+
/* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
|
|
34
34
|
"Pin to the left"
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
38
|
/* @__PURE__ */ e.jsxs(
|
|
39
|
-
|
|
39
|
+
i,
|
|
40
40
|
{
|
|
41
41
|
onClick: () => s.pin("right"),
|
|
42
42
|
disabled: t === "right",
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */ e.jsx(
|
|
44
|
+
/* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
|
|
45
45
|
"Pin to the right"
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
t && /* @__PURE__ */ e.jsxs(
|
|
50
|
-
/* @__PURE__ */ e.jsx(
|
|
49
|
+
t && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.pin(!1), children: [
|
|
50
|
+
/* @__PURE__ */ e.jsx(n, { name: "PushPinSimpleSlash", size: "sm" }),
|
|
51
51
|
"Unpin"
|
|
52
52
|
] }),
|
|
53
53
|
/* @__PURE__ */ e.jsx(o, {})
|
|
54
54
|
] }),
|
|
55
55
|
x && /* @__PURE__ */ e.jsxs(
|
|
56
|
-
|
|
56
|
+
i,
|
|
57
57
|
{
|
|
58
58
|
onClick: () => s.toggleVisibility(!1),
|
|
59
59
|
disabled: r,
|
|
60
60
|
children: [
|
|
61
|
-
/* @__PURE__ */ e.jsx(
|
|
61
|
+
/* @__PURE__ */ e.jsx(n, { name: "EyeSlash", size: "sm" }),
|
|
62
62
|
"Hide",
|
|
63
63
|
r && /* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: "(Last column)" })
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
/* @__PURE__ */ e.jsxs(
|
|
68
|
-
/* @__PURE__ */ e.jsx(
|
|
67
|
+
/* @__PURE__ */ e.jsxs(i, { onClick: a, children: [
|
|
68
|
+
/* @__PURE__ */ e.jsx(n, { name: "Columns", size: "sm" }),
|
|
69
69
|
"Manage columns"
|
|
70
70
|
] })
|
|
71
71
|
] });
|
package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { Column, Table } from '@tanstack/react-table';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DataTableColumnHeader component
|
|
4
|
+
*/
|
|
2
5
|
interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* TanStack Table column instance
|
|
8
|
+
*/
|
|
3
9
|
column: Column<TData, TValue>;
|
|
10
|
+
/**
|
|
11
|
+
* TanStack Table instance
|
|
12
|
+
*/
|
|
4
13
|
table: Table<TData>;
|
|
14
|
+
/**
|
|
15
|
+
* Column header title text
|
|
16
|
+
*/
|
|
5
17
|
title: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional info/tooltip text
|
|
20
|
+
*/
|
|
6
21
|
info?: string;
|
|
7
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Column header component with sorting, pinning, and visibility controls
|
|
25
|
+
*/
|
|
8
26
|
export declare function DataTableColumnHeader<TData, TValue>({ column, table, title, className, info, }: DataTableColumnHeaderProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
9
27
|
export {};
|
package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as e } from "../../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Icon as b } from "../../../../atoms/icon/icon.js";
|
|
2
3
|
import { cn as m } from "../../../../../lib/utils.js";
|
|
3
|
-
import { useColumnHeader as
|
|
4
|
-
import { DataTableColumnHeaderMenu as
|
|
5
|
-
import { DataTableManageColumnsDialog as
|
|
6
|
-
import { DataTableColumnHeaderContent as
|
|
7
|
-
import { Icon as H } from "../../../../atoms/icon/icon.js";
|
|
4
|
+
import { useColumnHeader as D } from "../../hooks/use-column-header.js";
|
|
5
|
+
import { DataTableColumnHeaderMenu as O } from "./data-table-column-header-menu.js";
|
|
6
|
+
import { DataTableManageColumnsDialog as v } from "../dialogs/data-table-manage-columns-dialog.js";
|
|
7
|
+
import { DataTableColumnHeaderContent as H } from "./data-table-column-header-content.js";
|
|
8
8
|
import { DropdownMenu as I } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
|
|
9
9
|
function z({
|
|
10
10
|
column: o,
|
|
@@ -28,10 +28,10 @@ function z({
|
|
|
28
28
|
visibleColumnsCount: j,
|
|
29
29
|
isLastVisibleColumn: M,
|
|
30
30
|
handleManageColumnsClick: h
|
|
31
|
-
} =
|
|
31
|
+
} = D(o, l);
|
|
32
32
|
return !i && !x ? /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center gap-2", a), children: [
|
|
33
33
|
n && /* @__PURE__ */ e.jsx(
|
|
34
|
-
|
|
34
|
+
b,
|
|
35
35
|
{
|
|
36
36
|
name: "Info",
|
|
37
37
|
size: "sm",
|
|
@@ -43,7 +43,7 @@ function z({
|
|
|
43
43
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
44
44
|
/* @__PURE__ */ e.jsx("div", { className: m("flex items-center gap-2", a), children: /* @__PURE__ */ e.jsxs(I, { open: t, onOpenChange: p, children: [
|
|
45
45
|
/* @__PURE__ */ e.jsx(
|
|
46
|
-
|
|
46
|
+
H,
|
|
47
47
|
{
|
|
48
48
|
title: s,
|
|
49
49
|
info: n,
|
|
@@ -57,7 +57,7 @@ function z({
|
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
59
|
/* @__PURE__ */ e.jsx(
|
|
60
|
-
|
|
60
|
+
O,
|
|
61
61
|
{
|
|
62
62
|
column: o,
|
|
63
63
|
isLastVisibleColumn: M,
|
|
@@ -66,7 +66,7 @@ function z({
|
|
|
66
66
|
)
|
|
67
67
|
] }) }),
|
|
68
68
|
/* @__PURE__ */ e.jsx(
|
|
69
|
-
|
|
69
|
+
v,
|
|
70
70
|
{
|
|
71
71
|
isOpen: d,
|
|
72
72
|
onOpenChange: C,
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DataTableBody component
|
|
4
|
+
*/
|
|
2
5
|
interface DataTableBodyProps<TData> {
|
|
6
|
+
/**
|
|
7
|
+
* TanStack Table instance
|
|
8
|
+
*/
|
|
3
9
|
table: Table<TData>;
|
|
10
|
+
/**
|
|
11
|
+
* Whether column resizing is enabled
|
|
12
|
+
*/
|
|
4
13
|
enableColumnResizing?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Callback fired when a row is clicked
|
|
16
|
+
*/
|
|
5
17
|
onRowClick?: (row: TData) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Fixed height for each row in pixels
|
|
20
|
+
*/
|
|
6
21
|
rowHeight?: number;
|
|
7
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Table body component that renders data rows
|
|
25
|
+
*/
|
|
8
26
|
export declare function DataTableBody<TData>({ table, enableColumnResizing, onRowClick, rowHeight, }: DataTableBodyProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
9
27
|
export {};
|