@yuno-payments/dashboard-design-system 0.0.166 → 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 +3 -115
- package/dist/components/organisms/data-table/data-table.js +104 -131
- package/dist/components/organisms/data-table/data-table.types.d.ts +24 -23
- 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 -7
- package/dist/components/organisms/data-table/hooks/use-data-table-state.js +46 -80
- 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,9 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { IconName } from '../icon';
|
|
3
3
|
import { IconWeight } from '@phosphor-icons/react';
|
|
4
|
-
/**
|
|
5
|
-
* Props for the AccessDeniedAlert component
|
|
6
|
-
*/
|
|
7
4
|
interface AccessDeniedAlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
5
|
/**
|
|
9
6
|
* Icon name to display on the left side.
|
|
@@ -21,18 +18,5 @@ interface AccessDeniedAlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
21
18
|
*/
|
|
22
19
|
text?: string;
|
|
23
20
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Alert component for displaying access denied / permission error messages.
|
|
26
|
-
* Shows an icon and customizable message for unauthorized access scenarios.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* <AccessDeniedAlert />
|
|
31
|
-
* <AccessDeniedAlert
|
|
32
|
-
* iconName="Lock"
|
|
33
|
-
* text="You need admin permissions to access this feature"
|
|
34
|
-
* />
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
21
|
declare const AccessDeniedAlert: import('react').ForwardRefExoticComponent<AccessDeniedAlertProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
38
22
|
export { AccessDeniedAlert, type AccessDeniedAlertProps };
|
|
@@ -1,92 +1,26 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import type * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
-
/**
|
|
4
|
-
* Props for the Accordion component.
|
|
5
|
-
* Supports both single and multiple selection modes.
|
|
6
|
-
*/
|
|
7
3
|
type AccordionProps = (AccordionPrimitive.AccordionSingleProps & {
|
|
8
|
-
/**
|
|
9
|
-
* Single selection mode - only one item can be expanded at a time
|
|
10
|
-
*/
|
|
11
4
|
type: "single";
|
|
12
|
-
/**
|
|
13
|
-
* Accordion items
|
|
14
|
-
*/
|
|
15
5
|
children: ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Additional CSS classes
|
|
18
|
-
*/
|
|
19
6
|
className?: string;
|
|
20
7
|
}) | (AccordionPrimitive.AccordionMultipleProps & {
|
|
21
|
-
/**
|
|
22
|
-
* Multiple selection mode - multiple items can be expanded simultaneously
|
|
23
|
-
*/
|
|
24
8
|
type: "multiple";
|
|
25
|
-
/**
|
|
26
|
-
* Accordion items
|
|
27
|
-
*/
|
|
28
9
|
children: ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Additional CSS classes
|
|
31
|
-
*/
|
|
32
10
|
className?: string;
|
|
33
11
|
});
|
|
34
|
-
/**
|
|
35
|
-
* Collapsible content sections organized in an accordion pattern.
|
|
36
|
-
* Supports single or multiple open items at once.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```tsx
|
|
40
|
-
* <Accordion type="single" collapsible>
|
|
41
|
-
* <AccordionItem value="item-1">
|
|
42
|
-
* <AccordionTrigger>Section 1</AccordionTrigger>
|
|
43
|
-
* <AccordionContent>Content 1</AccordionContent>
|
|
44
|
-
* </AccordionItem>
|
|
45
|
-
* </Accordion>
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
12
|
declare const Accordion: import('react').ForwardRefExoticComponent<AccordionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
49
|
-
/**
|
|
50
|
-
* Props for the AccordionItem component
|
|
51
|
-
*/
|
|
52
13
|
interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
53
|
-
/**
|
|
54
|
-
* Content of the accordion item (trigger and content)
|
|
55
|
-
*/
|
|
56
14
|
children: ReactNode;
|
|
57
|
-
/**
|
|
58
|
-
* Unique identifier for the accordion item
|
|
59
|
-
*/
|
|
60
15
|
value: string;
|
|
61
16
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Individual accordion section container
|
|
64
|
-
*/
|
|
65
17
|
declare const AccordionItem: import('react').ForwardRefExoticComponent<AccordionItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
66
|
-
/**
|
|
67
|
-
* Props for the AccordionTrigger component
|
|
68
|
-
*/
|
|
69
18
|
interface AccordionTriggerProps extends HTMLAttributes<HTMLButtonElement> {
|
|
70
|
-
/**
|
|
71
|
-
* Text or elements to display in the trigger button
|
|
72
|
-
*/
|
|
73
19
|
children: ReactNode;
|
|
74
20
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Clickable header that toggles the accordion item
|
|
77
|
-
*/
|
|
78
21
|
declare const AccordionTrigger: import('react').ForwardRefExoticComponent<AccordionTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
79
|
-
/**
|
|
80
|
-
* Props for the AccordionContent component
|
|
81
|
-
*/
|
|
82
22
|
interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
83
|
-
/**
|
|
84
|
-
* Content to display when the accordion item is expanded
|
|
85
|
-
*/
|
|
86
23
|
children: ReactNode;
|
|
87
24
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Collapsible content area of the accordion item
|
|
90
|
-
*/
|
|
91
25
|
declare const AccordionContent: import('react').ForwardRefExoticComponent<AccordionContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
92
26
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, type AccordionProps, type AccordionItemProps, type AccordionTriggerProps, type AccordionContentProps, };
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
import { Alert as ShadcnAlert } from '../../../vendor/shadcn/alert';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
/**
|
|
5
|
-
* Props for the Alert component
|
|
6
|
-
*/
|
|
3
|
+
import { IconName } from '../icon';
|
|
7
4
|
interface AlertProps extends Omit<ComponentProps<typeof ShadcnAlert>, "children"> {
|
|
8
|
-
/**
|
|
9
|
-
* Optional icon to display at the start of the alert
|
|
10
|
-
*/
|
|
11
5
|
icon?: IconName;
|
|
12
|
-
/**
|
|
13
|
-
* Alert title/heading
|
|
14
|
-
*/
|
|
15
6
|
title?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Alert description/body text
|
|
18
|
-
*/
|
|
19
7
|
description?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Props for the icon component
|
|
22
|
-
*/
|
|
23
|
-
iconProps?: ComponentProps<typeof Icon>;
|
|
24
8
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Alert component for displaying informational, success, warning, or error messages.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* <Alert variant="default" icon="Info" title="Information" description="This is an info alert" />
|
|
31
|
-
* <Alert variant="destructive" icon="Warning" title="Error" description="Something went wrong" />
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
9
|
declare const Alert: import('react').ForwardRefExoticComponent<Omit<AlertProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
35
10
|
export { Alert, type AlertProps };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { Alert as
|
|
2
|
+
import { Alert as l, AlertTitle as i, AlertDescription as a } from "../../../vendor/shadcn/alert.js";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
4
|
import { Icon as p } from "../icon/icon.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
s && /* @__PURE__ */ r.jsx(f, { children: s })
|
|
5
|
+
const x = n(
|
|
6
|
+
({ icon: e, title: s, description: t, ...m }, o) => /* @__PURE__ */ r.jsxs(l, { ref: o, ...m, children: [
|
|
7
|
+
e && /* @__PURE__ */ r.jsx(p, { name: e, className: "size-4" }),
|
|
8
|
+
s && /* @__PURE__ */ r.jsx(i, { children: s }),
|
|
9
|
+
t && /* @__PURE__ */ r.jsx(a, { children: t })
|
|
11
10
|
] })
|
|
12
11
|
);
|
|
13
|
-
|
|
12
|
+
x.displayName = "Alert";
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
x as Alert
|
|
16
15
|
};
|
|
@@ -1,37 +1,9 @@
|
|
|
1
1
|
import { AvatarProps } from './avatar';
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Props for the AvatarGroup component
|
|
5
|
-
*/
|
|
6
3
|
export interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
-
/**
|
|
8
|
-
* Avatar components to display in the group
|
|
9
|
-
*/
|
|
10
4
|
children: React.ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* Maximum number of avatars to display before showing "+N" badge
|
|
13
|
-
* @default 3
|
|
14
|
-
*/
|
|
15
5
|
max?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Size for all avatars in the group
|
|
18
|
-
* @default "default"
|
|
19
|
-
*/
|
|
20
6
|
size?: AvatarProps["size"];
|
|
21
7
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Displays multiple avatars in an overlapping stack.
|
|
24
|
-
* Shows remaining count when exceeding max.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* <AvatarGroup max={3} size="lg">
|
|
29
|
-
* <Avatar name="User 1" />
|
|
30
|
-
* <Avatar name="User 2" />
|
|
31
|
-
* <Avatar name="User 3" />
|
|
32
|
-
* <Avatar name="User 4" />
|
|
33
|
-
* </AvatarGroup>
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
8
|
declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
9
|
export { AvatarGroup };
|
|
@@ -4,36 +4,11 @@ import { Avatar as ShadcnAvatar } from '../../../vendor/shadcn/avatar';
|
|
|
4
4
|
declare const avatarVariants: (props?: ({
|
|
5
5
|
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
/**
|
|
8
|
-
* Props for the Avatar component
|
|
9
|
-
*/
|
|
10
7
|
export interface AvatarProps extends ComponentProps<typeof ShadcnAvatar>, VariantProps<typeof avatarVariants> {
|
|
11
|
-
/**
|
|
12
|
-
* Image source URL
|
|
13
|
-
*/
|
|
14
8
|
src?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Alternative text for the image
|
|
17
|
-
*/
|
|
18
9
|
alt?: string;
|
|
19
|
-
/**
|
|
20
|
-
* User name to generate initials from if image fails to load
|
|
21
|
-
*/
|
|
22
10
|
name?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Custom fallback content (overrides initials)
|
|
25
|
-
*/
|
|
26
11
|
fallback?: string | ReactNode;
|
|
27
12
|
}
|
|
28
|
-
/**
|
|
29
|
-
* User avatar component with automatic fallback to initials or icon.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```tsx
|
|
33
|
-
* <Avatar src="/user.jpg" name="John Doe" size="lg" />
|
|
34
|
-
* <Avatar name="Jane Smith" size="default" />
|
|
35
|
-
* <Avatar fallback={<CustomIcon />} />
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
13
|
declare const Avatar: import('react').ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
14
|
export { Avatar };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
3
|
import { cva as r } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
4
4
|
import { UserIcon as v } from "../../../node_modules/@phosphor-icons/react/dist/csr/User.es.js";
|
|
5
5
|
import { cn as s } from "../../../lib/utils.js";
|
|
@@ -22,7 +22,7 @@ const j = r(
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
), A = r("aspect-square h-full w-full object-cover"), b = r(
|
|
25
|
-
"flex h-full w-full items-center justify-center rounded-full bg-
|
|
25
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted text-muted-foreground font-medium uppercase",
|
|
26
26
|
{
|
|
27
27
|
variants: {
|
|
28
28
|
size: {
|
|
@@ -37,15 +37,15 @@ const j = r(
|
|
|
37
37
|
size: "default"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
), h =
|
|
41
|
-
({ size: l, src: i, alt:
|
|
42
|
-
const
|
|
40
|
+
), h = c(
|
|
41
|
+
({ size: l, src: i, alt: d, name: e, fallback: o, className: f, ...n }, u) => {
|
|
42
|
+
const m = e ? x(e) : void 0;
|
|
43
43
|
let a;
|
|
44
|
-
return o ? a = o :
|
|
44
|
+
return o ? a = o : m ? a = m : a = /* @__PURE__ */ t.jsx(v, { className: "size-1/2" }), /* @__PURE__ */ t.jsxs(
|
|
45
45
|
p,
|
|
46
46
|
{
|
|
47
|
-
ref:
|
|
48
|
-
className: s(j({ size: l }),
|
|
47
|
+
ref: u,
|
|
48
|
+
className: s(j({ size: l }), f),
|
|
49
49
|
"data-testid": "avatar",
|
|
50
50
|
...n,
|
|
51
51
|
children: [
|
|
@@ -53,7 +53,7 @@ const j = r(
|
|
|
53
53
|
g,
|
|
54
54
|
{
|
|
55
55
|
src: i,
|
|
56
|
-
alt:
|
|
56
|
+
alt: d || e || "Avatar",
|
|
57
57
|
className: s(A()),
|
|
58
58
|
"data-testid": "avatar-image",
|
|
59
59
|
"data-slot": "avatar-image"
|
|
@@ -1,40 +1,12 @@
|
|
|
1
|
-
import { ComponentProps
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { Badge as ShadcnBadge } from '../../../vendor/shadcn/badge';
|
|
3
3
|
import { Icon, IconName } from '../icon';
|
|
4
|
-
/**
|
|
5
|
-
* Props for the Badge component
|
|
6
|
-
*/
|
|
7
4
|
interface BadgeProps extends ComponentProps<typeof ShadcnBadge> {
|
|
8
|
-
/**
|
|
9
|
-
* Icon to display at the start (left side) of the badge
|
|
10
|
-
*/
|
|
11
5
|
startIcon?: IconName;
|
|
12
|
-
/**
|
|
13
|
-
* Icon to display at the end (right side) of the badge
|
|
14
|
-
*/
|
|
15
6
|
endIcon?: IconName;
|
|
16
|
-
/**
|
|
17
|
-
* Additional props to pass to the start icon
|
|
18
|
-
*/
|
|
19
7
|
startIconProps?: Partial<ComponentProps<typeof Icon>>;
|
|
20
|
-
/**
|
|
21
|
-
* Additional props to pass to the end icon
|
|
22
|
-
*/
|
|
23
8
|
endIconProps?: Partial<ComponentProps<typeof Icon>>;
|
|
24
|
-
|
|
25
|
-
* Text content of the badge
|
|
26
|
-
*/
|
|
27
|
-
children?: ReactNode | string;
|
|
9
|
+
children?: string;
|
|
28
10
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Badge component for displaying labels, statuses, or categories with optional icons.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```tsx
|
|
34
|
-
* <Badge variant="default">Active</Badge>
|
|
35
|
-
* <Badge variant="secondary" startIcon="CheckCircle">Completed</Badge>
|
|
36
|
-
* <Badge variant="destructive" endIcon="X">Error</Badge>
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
11
|
declare const Badge: import('react').ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
40
12
|
export { Badge, type BadgeProps };
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Icon as
|
|
5
|
-
const
|
|
6
|
-
({ children:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
name: i,
|
|
11
|
-
size: "xs",
|
|
12
|
-
weight: m?.weight || "fill",
|
|
13
|
-
...m
|
|
14
|
-
}
|
|
15
|
-
),
|
|
16
|
-
g,
|
|
17
|
-
r && /* @__PURE__ */ e.jsx(
|
|
18
|
-
s,
|
|
19
|
-
{
|
|
20
|
-
name: r,
|
|
21
|
-
size: "xs",
|
|
22
|
-
weight: a?.weight || "regular",
|
|
23
|
-
...a
|
|
24
|
-
}
|
|
25
|
-
)
|
|
1
|
+
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { Badge as d } from "../../../vendor/shadcn/badge.js";
|
|
4
|
+
import { Icon as m } from "../icon/icon.js";
|
|
5
|
+
const f = t(
|
|
6
|
+
({ children: o, startIcon: e, endIcon: s, startIconProps: a, endIconProps: i, ...x }, p) => /* @__PURE__ */ r.jsxs(d, { ref: p, ...x, children: [
|
|
7
|
+
e && /* @__PURE__ */ r.jsx(m, { name: e, size: "xs", ...a }),
|
|
8
|
+
o,
|
|
9
|
+
s && /* @__PURE__ */ r.jsx(m, { name: s, size: "xs", ...i })
|
|
26
10
|
] })
|
|
27
11
|
);
|
|
28
|
-
|
|
12
|
+
f.displayName = "Badge";
|
|
29
13
|
export {
|
|
30
|
-
|
|
14
|
+
f as Badge
|
|
31
15
|
};
|
|
@@ -2,60 +2,16 @@ import { ComponentProps, ReactNode } from 'react';
|
|
|
2
2
|
import { Icon, IconName } from '../icon';
|
|
3
3
|
type ButtonVariant = "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
4
4
|
type ButtonSize = "default" | "sm" | "lg" | "icon";
|
|
5
|
-
/**
|
|
6
|
-
* Props for the Button component
|
|
7
|
-
*/
|
|
8
5
|
interface ButtonProps extends Omit<ComponentProps<"button">, "children"> {
|
|
9
|
-
/**
|
|
10
|
-
* Visual style variant of the button
|
|
11
|
-
* @default "default"
|
|
12
|
-
*/
|
|
13
6
|
variant?: ButtonVariant;
|
|
14
|
-
/**
|
|
15
|
-
* Size of the button
|
|
16
|
-
* @default "default"
|
|
17
|
-
*/
|
|
18
7
|
size?: ButtonSize;
|
|
19
|
-
/**
|
|
20
|
-
* When true, button renders as Slot component to pass props to child element
|
|
21
|
-
* @default false
|
|
22
|
-
*/
|
|
23
8
|
asChild?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Icon to display at the start (left side) of the button
|
|
26
|
-
*/
|
|
27
9
|
startIcon?: IconName;
|
|
28
|
-
/**
|
|
29
|
-
* Icon to display at the end (right side) of the button
|
|
30
|
-
*/
|
|
31
10
|
endIcon?: IconName;
|
|
32
|
-
/**
|
|
33
|
-
* Additional props to pass to the start icon
|
|
34
|
-
*/
|
|
35
11
|
startIconProps?: Partial<ComponentProps<typeof Icon>>;
|
|
36
|
-
/**
|
|
37
|
-
* Additional props to pass to the end icon
|
|
38
|
-
*/
|
|
39
12
|
endIconProps?: Partial<ComponentProps<typeof Icon>>;
|
|
40
|
-
/**
|
|
41
|
-
* Shows loading spinner and disables the button
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
13
|
loading?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Button content (text, elements, etc.)
|
|
47
|
-
*/
|
|
48
14
|
children?: ReactNode;
|
|
49
15
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Versatile button component with icon support and loading state.
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```tsx
|
|
55
|
-
* <Button variant="default">Click me</Button>
|
|
56
|
-
* <Button startIcon="Plus" size="sm">Add Item</Button>
|
|
57
|
-
* <Button loading disabled>Saving...</Button>
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
16
|
declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
61
17
|
export { Button, type ButtonProps };
|
|
@@ -1,167 +1,33 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { CardProps as ShadcnCardProps } from '../../../vendor/shadcn/card';
|
|
3
|
-
|
|
4
|
-
* Props for the CardBase component (composable version)
|
|
5
|
-
*/
|
|
6
|
-
interface CardBaseProps extends ShadcnCardProps {
|
|
7
|
-
/**
|
|
8
|
-
* Content to display in the card
|
|
9
|
-
*/
|
|
3
|
+
interface CardProps extends ShadcnCardProps {
|
|
10
4
|
children: ReactNode;
|
|
11
5
|
/**
|
|
12
6
|
* Visual variant of the card
|
|
13
7
|
* - `default`: Standard gray border
|
|
14
8
|
* - `active`: Blue border for active/selected state
|
|
15
|
-
* @default "default"
|
|
16
9
|
*/
|
|
17
10
|
variant?: "default" | "active";
|
|
18
11
|
}
|
|
19
|
-
|
|
20
|
-
* Base container card component for manual composition.
|
|
21
|
-
* Use this when you need full control over the card structure.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* <CardBase variant="default">
|
|
26
|
-
* <CardHeader>
|
|
27
|
-
* <CardTitle>Title</CardTitle>
|
|
28
|
-
* <CardDescription>Description</CardDescription>
|
|
29
|
-
* </CardHeader>
|
|
30
|
-
* <CardContent>Content goes here</CardContent>
|
|
31
|
-
* <CardFooter>Footer actions</CardFooter>
|
|
32
|
-
* </CardBase>
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
declare const CardBase: import('react').ForwardRefExoticComponent<CardBaseProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
36
|
-
/**
|
|
37
|
-
* Props for the CardHeader component
|
|
38
|
-
*/
|
|
12
|
+
declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
13
|
interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
40
|
-
/**
|
|
41
|
-
* Content of the card header (typically CardTitle and CardDescription)
|
|
42
|
-
*/
|
|
43
14
|
children: ReactNode;
|
|
44
15
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Header section of a card
|
|
47
|
-
*/
|
|
48
16
|
declare const CardHeader: import('react').ForwardRefExoticComponent<CardHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
49
|
-
/**
|
|
50
|
-
* Props for the CardTitle component
|
|
51
|
-
*/
|
|
52
17
|
interface CardTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
53
|
-
/**
|
|
54
|
-
* Title text or elements
|
|
55
|
-
*/
|
|
56
18
|
children: ReactNode;
|
|
57
19
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Title element within a card header
|
|
60
|
-
*/
|
|
61
20
|
declare const CardTitle: import('react').ForwardRefExoticComponent<CardTitleProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
62
|
-
/**
|
|
63
|
-
* Props for the CardDescription component
|
|
64
|
-
*/
|
|
65
21
|
interface CardDescriptionProps extends HTMLAttributes<HTMLDivElement> {
|
|
66
|
-
/**
|
|
67
|
-
* Description text or elements
|
|
68
|
-
*/
|
|
69
22
|
children: ReactNode;
|
|
70
23
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Description element within a card header
|
|
73
|
-
*/
|
|
74
24
|
declare const CardDescription: import('react').ForwardRefExoticComponent<CardDescriptionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
75
|
-
/**
|
|
76
|
-
* Props for the CardContent component
|
|
77
|
-
*/
|
|
78
25
|
interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
79
|
-
/**
|
|
80
|
-
* Main content of the card
|
|
81
|
-
*/
|
|
82
26
|
children: ReactNode;
|
|
83
27
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Main content section of a card
|
|
86
|
-
*/
|
|
87
28
|
declare const CardContent: import('react').ForwardRefExoticComponent<CardContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
88
|
-
/**
|
|
89
|
-
* Props for the CardFooter component
|
|
90
|
-
*/
|
|
91
29
|
interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
92
|
-
/**
|
|
93
|
-
* Footer content (typically action buttons)
|
|
94
|
-
*/
|
|
95
30
|
children: ReactNode;
|
|
96
31
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Footer section of a card
|
|
99
|
-
*/
|
|
100
32
|
declare const CardFooter: import('react').ForwardRefExoticComponent<CardFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
101
|
-
|
|
102
|
-
* Props for the Card component (pre-composed version)
|
|
103
|
-
*/
|
|
104
|
-
interface CardProps extends Omit<ShadcnCardProps, 'children' | 'title'> {
|
|
105
|
-
/**
|
|
106
|
-
* Card title
|
|
107
|
-
*/
|
|
108
|
-
title?: ReactNode;
|
|
109
|
-
/**
|
|
110
|
-
* Card description (shown below the title)
|
|
111
|
-
*/
|
|
112
|
-
description?: ReactNode;
|
|
113
|
-
/**
|
|
114
|
-
* Main content of the card
|
|
115
|
-
*/
|
|
116
|
-
children: ReactNode;
|
|
117
|
-
/**
|
|
118
|
-
* Footer content (typically action buttons)
|
|
119
|
-
*/
|
|
120
|
-
footer?: ReactNode;
|
|
121
|
-
/**
|
|
122
|
-
* Visual variant of the card
|
|
123
|
-
* - `default`: Standard gray border
|
|
124
|
-
* - `active`: Blue border for active/selected state
|
|
125
|
-
* @default "default"
|
|
126
|
-
*/
|
|
127
|
-
variant?: "default" | "active";
|
|
128
|
-
/**
|
|
129
|
-
* Additional className for the header
|
|
130
|
-
*/
|
|
131
|
-
headerClassName?: string;
|
|
132
|
-
/**
|
|
133
|
-
* Additional className for the title
|
|
134
|
-
*/
|
|
135
|
-
titleClassName?: string;
|
|
136
|
-
/**
|
|
137
|
-
* Additional className for the description
|
|
138
|
-
*/
|
|
139
|
-
descriptionClassName?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Additional className for the content
|
|
142
|
-
*/
|
|
143
|
-
contentClassName?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Additional className for the footer
|
|
146
|
-
*/
|
|
147
|
-
footerClassName?: string;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Pre-composed Card component with built-in structure.
|
|
151
|
-
* Use this for simple cases where you just need to pass title and footer as props.
|
|
152
|
-
* For more complex layouts, use CardBase with manual composition.
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* ```tsx
|
|
156
|
-
* <Card
|
|
157
|
-
* title="Card Title"
|
|
158
|
-
* description="Card description"
|
|
159
|
-
* footer={<Button>Action</Button>}
|
|
160
|
-
* variant="default"
|
|
161
|
-
* >
|
|
162
|
-
* <p>Main content here</p>
|
|
163
|
-
* </Card>
|
|
164
|
-
* ```
|
|
165
|
-
*/
|
|
166
|
-
declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
167
|
-
export { Card, CardBase, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, type CardProps, type CardBaseProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, };
|
|
33
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, type CardProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, };
|