@yuno-payments/dashboard-design-system 0.0.170 → 0.0.171

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.
Files changed (161) hide show
  1. package/dist/components/atoms/access-denied-alert/access-denied-alert.d.ts +16 -0
  2. package/dist/components/atoms/accordion/accordion.d.ts +66 -0
  3. package/dist/components/atoms/alert/alert.d.ts +26 -1
  4. package/dist/components/atoms/alert/alert.js +9 -8
  5. package/dist/components/atoms/avatar/avatar-group.d.ts +28 -0
  6. package/dist/components/atoms/avatar/avatar.d.ts +25 -0
  7. package/dist/components/atoms/avatar/avatar.js +9 -9
  8. package/dist/components/atoms/badge/badge.d.ts +30 -2
  9. package/dist/components/atoms/badge/badge.js +27 -11
  10. package/dist/components/atoms/button/button.d.ts +44 -0
  11. package/dist/components/atoms/card/card.d.ts +137 -3
  12. package/dist/components/atoms/card/card.js +56 -28
  13. package/dist/components/atoms/checkbox/checkbox.d.ts +38 -2
  14. package/dist/components/atoms/checkbox/checkbox.js +61 -27
  15. package/dist/components/atoms/combobox/combobox.d.ts +18 -0
  16. package/dist/components/atoms/combobox/combobox.js +41 -41
  17. package/dist/components/atoms/combobox/types.d.ts +90 -1
  18. package/dist/components/atoms/currency-field/currency-field.d.ts +38 -0
  19. package/dist/components/atoms/currency-field/currency-field.js +22 -19
  20. package/dist/components/atoms/date-picker/date-picker.d.ts +15 -0
  21. package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +15 -0
  22. package/dist/components/atoms/dots-menu/dots-menu.d.ts +16 -0
  23. package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
  24. package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +52 -0
  25. package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +50 -0
  26. package/dist/components/atoms/field/field.d.ts +55 -0
  27. package/dist/components/atoms/field/field.js +53 -46
  28. package/dist/components/atoms/filter/filter-date-range.d.ts +12 -2
  29. package/dist/components/atoms/filter/filter-date-range.js +203 -168
  30. package/dist/components/atoms/filter/filter.d.ts +6 -0
  31. package/dist/components/atoms/filter/filter.js +91 -76
  32. package/dist/components/atoms/filter/index.d.ts +1 -1
  33. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +208 -2
  34. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +214 -160
  35. package/dist/components/atoms/icon/aida-logo.d.ts +3 -0
  36. package/dist/components/atoms/icon/aida-logo.js +64 -0
  37. package/dist/components/atoms/icon/icon-list.d.ts +5 -0
  38. package/dist/components/atoms/icon/icon-list.js +394 -384
  39. package/dist/components/atoms/icon/icon.d.ts +29 -0
  40. package/dist/components/atoms/index.d.ts +3 -2
  41. package/dist/components/atoms/label/index.d.ts +1 -1
  42. package/dist/components/atoms/label/label.d.ts +11 -0
  43. package/dist/components/atoms/label/label.js +28 -0
  44. package/dist/components/atoms/link/link.d.ts +20 -0
  45. package/dist/components/atoms/loading/index.d.ts +1 -0
  46. package/dist/components/atoms/loading/loading.d.ts +39 -0
  47. package/dist/components/atoms/loading/loading.js +37 -0
  48. package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
  49. package/dist/components/atoms/multi-select/multi-select.js +6 -6
  50. package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +16 -0
  51. package/dist/components/atoms/multi-values-field/multi-values-field.js +109 -87
  52. package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +81 -0
  53. package/dist/components/atoms/otp-field/otp-field.d.ts +32 -0
  54. package/dist/components/atoms/password-field/password-field.d.ts +23 -0
  55. package/dist/components/atoms/password-field/password-field.js +1 -1
  56. package/dist/components/atoms/progress/progress.d.ts +15 -0
  57. package/dist/components/atoms/protected-field/protected-field.d.ts +10 -0
  58. package/dist/components/atoms/protected-field/protected-field.types.d.ts +14 -0
  59. package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
  60. package/dist/components/atoms/radio-group/radio-group.d.ts +50 -1
  61. package/dist/components/atoms/radio-group/radio-group.js +13 -12
  62. package/dist/components/atoms/search-field/search-field.d.ts +14 -0
  63. package/dist/components/atoms/search-field/search-field.js +17 -17
  64. package/dist/components/atoms/search-field/search-field.types.d.ts +57 -0
  65. package/dist/components/atoms/select/index.d.ts +2 -0
  66. package/dist/components/atoms/select/search-select.d.ts +22 -0
  67. package/dist/components/atoms/select/search-select.js +201 -0
  68. package/dist/components/atoms/select/select.d.ts +83 -1
  69. package/dist/components/atoms/select/select.js +21 -21
  70. package/dist/components/atoms/separator/separator.d.ts +17 -0
  71. package/dist/components/atoms/skeleton/index.d.ts +9 -0
  72. package/dist/components/atoms/switch/switch.d.ts +56 -2
  73. package/dist/components/atoms/switch/switch.js +64 -32
  74. package/dist/components/atoms/tabs/index.d.ts +16 -0
  75. package/dist/components/atoms/textarea/textarea.d.ts +32 -0
  76. package/dist/components/atoms/textarea/textarea.js +1 -1
  77. package/dist/components/atoms/time-picker/time-picker.d.ts +73 -2
  78. package/dist/components/atoms/time-picker/time-picker.js +218 -3
  79. package/dist/components/atoms/toaster/index.d.ts +15 -0
  80. package/dist/components/atoms/toggle-group/toggle-group.d.ts +26 -1
  81. package/dist/components/atoms/toggle-group/toggle-group.js +15 -14
  82. package/dist/components/atoms/tooltip/tooltip.d.ts +53 -2
  83. package/dist/components/atoms/typography/typography.d.ts +18 -0
  84. package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +50 -0
  85. package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
  86. package/dist/components/molecules/dialog-content/dialog-content.d.ts +16 -0
  87. package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +20 -0
  88. package/dist/components/molecules/dialog-header/dialog-header.d.ts +31 -0
  89. package/dist/components/molecules/empty/empty-icon.js +6 -6
  90. package/dist/components/molecules/empty/empty.d.ts +16 -1
  91. package/dist/components/molecules/empty/empty.js +37 -34
  92. package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +17 -0
  93. package/dist/components/molecules/pagination/pagination.d.ts +49 -0
  94. package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +41 -0
  95. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
  96. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
  97. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +18 -0
  98. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
  99. package/dist/components/organisms/data-table/components/data-table-body.d.ts +18 -0
  100. package/dist/components/organisms/data-table/components/data-table-header.d.ts +12 -0
  101. package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
  102. package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +24 -0
  103. package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
  104. package/dist/components/organisms/data-table/data-table.d.ts +133 -4
  105. package/dist/components/organisms/data-table/data-table.js +132 -100
  106. package/dist/components/organisms/data-table/data-table.types.d.ts +35 -26
  107. package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +57 -41
  108. package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +8 -2
  109. package/dist/components/organisms/data-table/hooks/use-data-table-state.js +82 -47
  110. package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +8 -2
  111. package/dist/components/organisms/data-table/utils/data-table-constants.js +16 -10
  112. package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +1652 -0
  113. package/dist/components/organisms/data-table/utils/data-table-styles.js +29 -14
  114. package/dist/components/organisms/dialog/dialog.d.ts +67 -1
  115. package/dist/components/organisms/dialog/dialog.js +78 -61
  116. package/dist/components/organisms/index.d.ts +2 -0
  117. package/dist/components/organisms/sheet/sheet.d.ts +69 -0
  118. package/dist/components/organisms/sheet/sheet.js +34 -33
  119. package/dist/components/organisms/tutorial/index.d.ts +2 -0
  120. package/dist/components/organisms/tutorial/tutorial.d.ts +16 -0
  121. package/dist/components/organisms/tutorial/tutorial.js +114 -0
  122. package/dist/components/organisms/tutorial/tutorial.types.d.ts +15 -0
  123. package/dist/hooks/index.d.ts +3 -0
  124. package/dist/hooks/use-body-scroll-lock.d.ts +13 -0
  125. package/dist/hooks/use-escape-key.d.ts +14 -0
  126. package/dist/hooks/use-media-query.d.ts +20 -0
  127. package/dist/hooks/use-media-query.js +21 -0
  128. package/dist/index.css +1 -1
  129. package/dist/index.d.ts +2 -0
  130. package/dist/index.js +173 -162
  131. package/dist/lib/notification-alert.d.ts +42 -0
  132. package/dist/lib/notification-alert.js +75 -0
  133. package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +8 -0
  134. package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +8 -0
  135. package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +8 -0
  136. package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +8 -0
  137. package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +30 -0
  138. package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +36 -0
  139. package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +36 -0
  140. package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +30 -0
  141. package/dist/vendor/shadcn/avatar.js +19 -19
  142. package/dist/vendor/shadcn/badge.js +15 -15
  143. package/dist/vendor/shadcn/card.js +7 -7
  144. package/dist/vendor/shadcn/date-picker.d.ts +2 -2
  145. package/dist/vendor/shadcn/date-picker.js +1 -1
  146. package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
  147. package/dist/vendor/shadcn/date-range-picker.js +1 -1
  148. package/dist/vendor/shadcn/dialog.js +2 -2
  149. package/dist/vendor/shadcn/input-group.js +17 -17
  150. package/dist/vendor/shadcn/input.js +7 -7
  151. package/dist/vendor/shadcn/popover.js +1 -1
  152. package/dist/vendor/shadcn/select.js +2 -2
  153. package/dist/vendor/shadcn/sonner.d.ts +26 -1
  154. package/dist/vendor/shadcn/sonner.js +12 -8
  155. package/dist/vendor/shadcn/table.js +30 -30
  156. package/dist/vendor/shadcn/textarea.js +9 -9
  157. package/dist/vendor/shadcn/time-picker.d.ts +1 -2
  158. package/dist/vendor/shadcn/time-picker.js +17 -23
  159. package/dist/vendor/shadcn/toggle.js +13 -13
  160. package/dist/vendor/shadcn/tooltip.js +25 -15
  161. package/package.json +1 -1
@@ -1,6 +1,9 @@
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
+ */
4
7
  interface AccessDeniedAlertProps extends HTMLAttributes<HTMLDivElement> {
5
8
  /**
6
9
  * Icon name to display on the left side.
@@ -18,5 +21,18 @@ interface AccessDeniedAlertProps extends HTMLAttributes<HTMLDivElement> {
18
21
  */
19
22
  text?: string;
20
23
  }
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
+ */
21
37
  declare const AccessDeniedAlert: import('react').ForwardRefExoticComponent<AccessDeniedAlertProps & import('react').RefAttributes<HTMLDivElement>>;
22
38
  export { AccessDeniedAlert, type AccessDeniedAlertProps };
@@ -1,26 +1,92 @@
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
+ */
3
7
  type AccordionProps = (AccordionPrimitive.AccordionSingleProps & {
8
+ /**
9
+ * Single selection mode - only one item can be expanded at a time
10
+ */
4
11
  type: "single";
12
+ /**
13
+ * Accordion items
14
+ */
5
15
  children: ReactNode;
16
+ /**
17
+ * Additional CSS classes
18
+ */
6
19
  className?: string;
7
20
  }) | (AccordionPrimitive.AccordionMultipleProps & {
21
+ /**
22
+ * Multiple selection mode - multiple items can be expanded simultaneously
23
+ */
8
24
  type: "multiple";
25
+ /**
26
+ * Accordion items
27
+ */
9
28
  children: ReactNode;
29
+ /**
30
+ * Additional CSS classes
31
+ */
10
32
  className?: string;
11
33
  });
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
+ */
12
48
  declare const Accordion: import('react').ForwardRefExoticComponent<AccordionProps & import('react').RefAttributes<HTMLDivElement>>;
49
+ /**
50
+ * Props for the AccordionItem component
51
+ */
13
52
  interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {
53
+ /**
54
+ * Content of the accordion item (trigger and content)
55
+ */
14
56
  children: ReactNode;
57
+ /**
58
+ * Unique identifier for the accordion item
59
+ */
15
60
  value: string;
16
61
  }
62
+ /**
63
+ * Individual accordion section container
64
+ */
17
65
  declare const AccordionItem: import('react').ForwardRefExoticComponent<AccordionItemProps & import('react').RefAttributes<HTMLDivElement>>;
66
+ /**
67
+ * Props for the AccordionTrigger component
68
+ */
18
69
  interface AccordionTriggerProps extends HTMLAttributes<HTMLButtonElement> {
70
+ /**
71
+ * Text or elements to display in the trigger button
72
+ */
19
73
  children: ReactNode;
20
74
  }
75
+ /**
76
+ * Clickable header that toggles the accordion item
77
+ */
21
78
  declare const AccordionTrigger: import('react').ForwardRefExoticComponent<AccordionTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
79
+ /**
80
+ * Props for the AccordionContent component
81
+ */
22
82
  interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {
83
+ /**
84
+ * Content to display when the accordion item is expanded
85
+ */
23
86
  children: ReactNode;
24
87
  }
88
+ /**
89
+ * Collapsible content area of the accordion item
90
+ */
25
91
  declare const AccordionContent: import('react').ForwardRefExoticComponent<AccordionContentProps & import('react').RefAttributes<HTMLDivElement>>;
26
92
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, type AccordionProps, type AccordionItemProps, type AccordionTriggerProps, type AccordionContentProps, };
@@ -1,10 +1,35 @@
1
1
  import { Alert as ShadcnAlert } from '../../../vendor/shadcn/alert';
2
2
  import { ComponentProps } from 'react';
3
- import { IconName } from '../icon';
3
+ import { Icon, IconName } from '../icon';
4
+ /**
5
+ * Props for the Alert component
6
+ */
4
7
  interface AlertProps extends Omit<ComponentProps<typeof ShadcnAlert>, "children"> {
8
+ /**
9
+ * Optional icon to display at the start of the alert
10
+ */
5
11
  icon?: IconName;
12
+ /**
13
+ * Alert title/heading
14
+ */
6
15
  title?: string;
16
+ /**
17
+ * Alert description/body text
18
+ */
7
19
  description?: string;
20
+ /**
21
+ * Props for the icon component
22
+ */
23
+ iconProps?: ComponentProps<typeof Icon>;
8
24
  }
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
+ */
9
34
  declare const Alert: import('react').ForwardRefExoticComponent<Omit<AlertProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
10
35
  export { Alert, type AlertProps };
@@ -1,15 +1,16 @@
1
1
  import { j as r } from "../../../_virtual/jsx-runtime.js";
2
- import { Alert as l, AlertTitle as i, AlertDescription as a } from "../../../vendor/shadcn/alert.js";
2
+ import { Alert as a, AlertTitle as i, AlertDescription as f } from "../../../vendor/shadcn/alert.js";
3
3
  import { forwardRef as n } from "react";
4
4
  import { Icon as p } from "../icon/icon.js";
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 })
5
+ import { cn as x } from "../../../lib/utils.js";
6
+ const c = n(
7
+ ({ icon: e, title: m, description: s, iconProps: t, ...l }, o) => /* @__PURE__ */ r.jsxs(a, { ref: o, ...l, children: [
8
+ e && /* @__PURE__ */ r.jsx(p, { name: e, className: x("size-4", t?.className), ...t }),
9
+ m && /* @__PURE__ */ r.jsx(i, { children: m }),
10
+ s && /* @__PURE__ */ r.jsx(f, { children: s })
10
11
  ] })
11
12
  );
12
- x.displayName = "Alert";
13
+ c.displayName = "Alert";
13
14
  export {
14
- x as Alert
15
+ c as Alert
15
16
  };
@@ -1,9 +1,37 @@
1
1
  import { AvatarProps } from './avatar';
2
2
  import * as React from "react";
3
+ /**
4
+ * Props for the AvatarGroup component
5
+ */
3
6
  export interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ /**
8
+ * Avatar components to display in the group
9
+ */
4
10
  children: React.ReactNode;
11
+ /**
12
+ * Maximum number of avatars to display before showing "+N" badge
13
+ * @default 3
14
+ */
5
15
  max?: number;
16
+ /**
17
+ * Size for all avatars in the group
18
+ * @default "default"
19
+ */
6
20
  size?: AvatarProps["size"];
7
21
  }
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
+ */
8
36
  declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
9
37
  export { AvatarGroup };
@@ -4,11 +4,36 @@ 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
+ */
7
10
  export interface AvatarProps extends ComponentProps<typeof ShadcnAvatar>, VariantProps<typeof avatarVariants> {
11
+ /**
12
+ * Image source URL
13
+ */
8
14
  src?: string;
15
+ /**
16
+ * Alternative text for the image
17
+ */
9
18
  alt?: string;
19
+ /**
20
+ * User name to generate initials from if image fails to load
21
+ */
10
22
  name?: string;
23
+ /**
24
+ * Custom fallback content (overrides initials)
25
+ */
11
26
  fallback?: string | ReactNode;
12
27
  }
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
+ */
13
38
  declare const Avatar: import('react').ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
14
39
  export { Avatar };
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as c } from "react";
2
+ import { forwardRef as u } 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-muted text-muted-foreground font-medium uppercase",
25
+ "flex h-full w-full items-center justify-center rounded-full bg-surface 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 = c(
41
- ({ size: l, src: i, alt: d, name: e, fallback: o, className: f, ...n }, u) => {
42
- const m = e ? x(e) : void 0;
40
+ ), h = u(
41
+ ({ size: l, src: i, alt: m, name: e, fallback: o, className: d, ...n }, c) => {
42
+ const f = e ? x(e) : void 0;
43
43
  let a;
44
- return o ? a = o : m ? a = m : a = /* @__PURE__ */ t.jsx(v, { className: "size-1/2" }), /* @__PURE__ */ t.jsxs(
44
+ return o ? a = o : f ? a = f : a = /* @__PURE__ */ t.jsx(v, { className: "size-1/2" }), /* @__PURE__ */ t.jsxs(
45
45
  p,
46
46
  {
47
- ref: u,
48
- className: s(j({ size: l }), f),
47
+ ref: c,
48
+ className: s(j({ size: l }), d),
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: d || e || "Avatar",
56
+ alt: m || e || "Avatar",
57
57
  className: s(A()),
58
58
  "data-testid": "avatar-image",
59
59
  "data-slot": "avatar-image"
@@ -1,12 +1,40 @@
1
- import { ComponentProps } from 'react';
1
+ import { ComponentProps, ReactNode } 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
+ */
4
7
  interface BadgeProps extends ComponentProps<typeof ShadcnBadge> {
8
+ /**
9
+ * Icon to display at the start (left side) of the badge
10
+ */
5
11
  startIcon?: IconName;
12
+ /**
13
+ * Icon to display at the end (right side) of the badge
14
+ */
6
15
  endIcon?: IconName;
16
+ /**
17
+ * Additional props to pass to the start icon
18
+ */
7
19
  startIconProps?: Partial<ComponentProps<typeof Icon>>;
20
+ /**
21
+ * Additional props to pass to the end icon
22
+ */
8
23
  endIconProps?: Partial<ComponentProps<typeof Icon>>;
9
- children?: string;
24
+ /**
25
+ * Text content of the badge
26
+ */
27
+ children?: ReactNode | string;
10
28
  }
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
+ */
11
39
  declare const Badge: import('react').ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
12
40
  export { Badge, type BadgeProps };
@@ -1,15 +1,31 @@
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 })
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as f } from "react";
3
+ import { Badge as o } from "../../../vendor/shadcn/badge.js";
4
+ import { Icon as s } from "../icon/icon.js";
5
+ const d = f(
6
+ ({ children: g, startIcon: i, endIcon: r, startIconProps: m, endIconProps: a, ...t }, x) => /* @__PURE__ */ e.jsxs(o, { ref: x, ...t, children: [
7
+ i && /* @__PURE__ */ e.jsx(
8
+ s,
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
+ )
10
26
  ] })
11
27
  );
12
- f.displayName = "Badge";
28
+ d.displayName = "Badge";
13
29
  export {
14
- f as Badge
30
+ d as Badge
15
31
  };
@@ -2,16 +2,60 @@ 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
+ */
5
8
  interface ButtonProps extends Omit<ComponentProps<"button">, "children"> {
9
+ /**
10
+ * Visual style variant of the button
11
+ * @default "default"
12
+ */
6
13
  variant?: ButtonVariant;
14
+ /**
15
+ * Size of the button
16
+ * @default "default"
17
+ */
7
18
  size?: ButtonSize;
19
+ /**
20
+ * When true, button renders as Slot component to pass props to child element
21
+ * @default false
22
+ */
8
23
  asChild?: boolean;
24
+ /**
25
+ * Icon to display at the start (left side) of the button
26
+ */
9
27
  startIcon?: IconName;
28
+ /**
29
+ * Icon to display at the end (right side) of the button
30
+ */
10
31
  endIcon?: IconName;
32
+ /**
33
+ * Additional props to pass to the start icon
34
+ */
11
35
  startIconProps?: Partial<ComponentProps<typeof Icon>>;
36
+ /**
37
+ * Additional props to pass to the end icon
38
+ */
12
39
  endIconProps?: Partial<ComponentProps<typeof Icon>>;
40
+ /**
41
+ * Shows loading spinner and disables the button
42
+ * @default false
43
+ */
13
44
  loading?: boolean;
45
+ /**
46
+ * Button content (text, elements, etc.)
47
+ */
14
48
  children?: ReactNode;
15
49
  }
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
+ */
16
60
  declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
17
61
  export { Button, type ButtonProps };
@@ -1,33 +1,167 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { CardProps as ShadcnCardProps } from '../../../vendor/shadcn/card';
3
- interface CardProps extends ShadcnCardProps {
3
+ /**
4
+ * Props for the CardBase component (composable version)
5
+ */
6
+ interface CardBaseProps extends ShadcnCardProps {
7
+ /**
8
+ * Content to display in the card
9
+ */
4
10
  children: ReactNode;
5
11
  /**
6
12
  * Visual variant of the card
7
13
  * - `default`: Standard gray border
8
14
  * - `active`: Blue border for active/selected state
15
+ * @default "default"
9
16
  */
10
17
  variant?: "default" | "active";
11
18
  }
12
- declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
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
+ */
13
39
  interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
40
+ /**
41
+ * Content of the card header (typically CardTitle and CardDescription)
42
+ */
14
43
  children: ReactNode;
15
44
  }
45
+ /**
46
+ * Header section of a card
47
+ */
16
48
  declare const CardHeader: import('react').ForwardRefExoticComponent<CardHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
49
+ /**
50
+ * Props for the CardTitle component
51
+ */
17
52
  interface CardTitleProps extends HTMLAttributes<HTMLDivElement> {
53
+ /**
54
+ * Title text or elements
55
+ */
18
56
  children: ReactNode;
19
57
  }
58
+ /**
59
+ * Title element within a card header
60
+ */
20
61
  declare const CardTitle: import('react').ForwardRefExoticComponent<CardTitleProps & import('react').RefAttributes<HTMLDivElement>>;
62
+ /**
63
+ * Props for the CardDescription component
64
+ */
21
65
  interface CardDescriptionProps extends HTMLAttributes<HTMLDivElement> {
66
+ /**
67
+ * Description text or elements
68
+ */
22
69
  children: ReactNode;
23
70
  }
71
+ /**
72
+ * Description element within a card header
73
+ */
24
74
  declare const CardDescription: import('react').ForwardRefExoticComponent<CardDescriptionProps & import('react').RefAttributes<HTMLDivElement>>;
75
+ /**
76
+ * Props for the CardContent component
77
+ */
25
78
  interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
79
+ /**
80
+ * Main content of the card
81
+ */
26
82
  children: ReactNode;
27
83
  }
84
+ /**
85
+ * Main content section of a card
86
+ */
28
87
  declare const CardContent: import('react').ForwardRefExoticComponent<CardContentProps & import('react').RefAttributes<HTMLDivElement>>;
88
+ /**
89
+ * Props for the CardFooter component
90
+ */
29
91
  interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
92
+ /**
93
+ * Footer content (typically action buttons)
94
+ */
30
95
  children: ReactNode;
31
96
  }
97
+ /**
98
+ * Footer section of a card
99
+ */
32
100
  declare const CardFooter: import('react').ForwardRefExoticComponent<CardFooterProps & import('react').RefAttributes<HTMLDivElement>>;
33
- export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, type CardProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, };
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, };