ui-arreya-components 1.0.0 → 1.2.0

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 (103) hide show
  1. package/CHANGELOG.md +6 -26
  2. package/dist/components/feature/graph-card.d.ts +20 -0
  3. package/dist/components/feature/graph-card.stories.d.ts +9 -0
  4. package/dist/components/feature/header.d.ts +15 -0
  5. package/dist/components/feature/header.stories.d.ts +12 -0
  6. package/dist/components/feature/login-form.d.ts +1 -0
  7. package/dist/components/feature/login-form.stories.d.ts +13 -0
  8. package/dist/components/feature/search-bar.d.ts +10 -0
  9. package/dist/components/feature/search-bar.stories.d.ts +19 -0
  10. package/dist/components/feature/wizard.d.ts +57 -0
  11. package/dist/components/feature/wizard.stories.d.ts +8 -0
  12. package/dist/components/ui/accordion.d.ts +7 -0
  13. package/dist/components/ui/alert-dialog.d.ts +20 -0
  14. package/dist/components/ui/alert-dialog.stories.d.ts +12 -0
  15. package/dist/components/ui/alert.d.ts +8 -0
  16. package/dist/components/ui/alert.stories.d.ts +15 -0
  17. package/dist/components/ui/aspect-ratio.d.ts +3 -0
  18. package/dist/components/ui/aspect-ratio.stories.d.ts +12 -0
  19. package/dist/components/ui/avatar.d.ts +6 -0
  20. package/dist/components/ui/avatar.stories.d.ts +12 -0
  21. package/dist/components/ui/badge.d.ts +9 -0
  22. package/dist/components/ui/badge.stories.d.ts +16 -0
  23. package/dist/components/ui/breadcrumb.d.ts +11 -0
  24. package/dist/components/ui/breadcrumb.stories.d.ts +16 -0
  25. package/dist/components/ui/button.d.ts +11 -0
  26. package/dist/components/ui/button.stories.d.ts +21 -0
  27. package/dist/components/ui/card.d.ts +8 -0
  28. package/dist/components/ui/card.stories.d.ts +27 -0
  29. package/dist/components/ui/carousel.d.ts +18 -0
  30. package/dist/components/ui/carousel.stories.d.ts +17 -0
  31. package/dist/components/ui/chart.d.ts +62 -0
  32. package/dist/components/ui/checkbox.d.ts +4 -0
  33. package/dist/components/ui/checkbox.stories.d.ts +14 -0
  34. package/dist/components/ui/collapsible.d.ts +5 -0
  35. package/dist/components/ui/collapsible.stories.d.ts +12 -0
  36. package/dist/components/ui/context-menu.d.ts +27 -0
  37. package/dist/components/ui/context-menu.stories.d.ts +12 -0
  38. package/dist/components/ui/dialog.d.ts +19 -0
  39. package/dist/components/ui/dialog.stories.d.ts +12 -0
  40. package/dist/components/ui/drawer.d.ts +22 -0
  41. package/dist/components/ui/drawer.stories.d.ts +15 -0
  42. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  43. package/dist/components/ui/dropdown-menu.stories.d.ts +14 -0
  44. package/dist/components/ui/form.d.ts +23 -0
  45. package/dist/components/ui/hover-card.d.ts +6 -0
  46. package/dist/components/ui/hover-card.stories.d.ts +12 -0
  47. package/dist/components/ui/input-otp.d.ts +34 -0
  48. package/dist/components/ui/input.d.ts +3 -0
  49. package/dist/components/ui/input.stories.d.ts +16 -0
  50. package/dist/components/ui/label.d.ts +5 -0
  51. package/dist/components/ui/menubar.d.ts +28 -0
  52. package/dist/components/ui/navigation-menu.d.ts +12 -0
  53. package/dist/components/ui/pagination.d.ts +28 -0
  54. package/dist/components/ui/popover.d.ts +7 -0
  55. package/dist/components/ui/progress.d.ts +4 -0
  56. package/dist/components/ui/radio-group.d.ts +5 -0
  57. package/dist/components/ui/resizable.d.ts +23 -0
  58. package/dist/components/ui/scroll-area.d.ts +5 -0
  59. package/dist/components/ui/select.d.ts +13 -0
  60. package/dist/components/ui/separator.d.ts +4 -0
  61. package/dist/components/ui/sheet.d.ts +25 -0
  62. package/dist/components/ui/sidebar.d.ts +65 -0
  63. package/dist/components/ui/skeleton.d.ts +2 -0
  64. package/dist/components/ui/slider.d.ts +4 -0
  65. package/dist/components/ui/sonner.d.ts +4 -0
  66. package/dist/components/ui/switch.d.ts +4 -0
  67. package/dist/components/ui/table.d.ts +10 -0
  68. package/dist/components/ui/table.stories.d.ts +12 -0
  69. package/dist/components/ui/tabs.d.ts +7 -0
  70. package/dist/components/ui/textarea.d.ts +3 -0
  71. package/dist/components/ui/toast.d.ts +15 -0
  72. package/dist/components/ui/toaster.d.ts +1 -0
  73. package/dist/components/ui/toggle-group.d.ts +12 -0
  74. package/dist/components/ui/toggle.d.ts +12 -0
  75. package/dist/components/ui/tooltip.d.ts +7 -0
  76. package/dist/hooks/use-mobile.d.ts +1 -0
  77. package/dist/hooks/use-toast.d.ts +44 -0
  78. package/dist/index.d.ts +50 -0
  79. package/dist/lib/types.d.ts +4 -0
  80. package/dist/lib/utils.d.ts +2 -0
  81. package/dist/styles.css +1 -1
  82. package/dist/types/index.d.ts +642 -0
  83. package/dist/{ui.es.js → ui-arreya-components.es.js} +10284 -11014
  84. package/dist/ui-arreya-components.umd.js +238 -0
  85. package/package.json +54 -54
  86. package/rollup.config.js +12 -0
  87. package/src/components/feature/search-bar.tsx +1 -1
  88. package/src/components/ui/breadcrumb.tsx +75 -81
  89. package/src/components/ui/table.stories.tsx +102 -0
  90. package/src/index.css +14 -457
  91. package/src/index.ts +0 -1
  92. package/src/styles/tailwind.css +2 -2
  93. package/tsconfig.json +34 -7
  94. package/tsconfig.tsbuildinfo +1 -0
  95. package/vite.config.ts +5 -8
  96. package/.github/workflows/npm-publish.yml +0 -35
  97. package/.storybook/main.ts +0 -18
  98. package/.storybook/preview.ts +0 -16
  99. package/.storybook/vitest.setup.ts +0 -9
  100. package/dist/ui.cjs.js +0 -242
  101. package/dist/ui.umd.js +0 -242
  102. package/tsconfig.app.json +0 -30
  103. package/tsconfig.node.json +0 -24
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "ui-arreya-components",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
- "types": "dist/index.d.ts",
5
+ "main": "dist/ui-arreya-components.umd.js",
6
+ "types": "dist/types/index.d.ts",
6
7
  "exports": {
7
8
  ".": {
8
- "import": "./dist/ui.es.js",
9
- "require": "./dist/ui.umd.js"
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/ui-arreya-components.es.js",
11
+ "require": "./dist/ui-arreya-components.umd.js"
10
12
  },
11
13
  "./styles.css": {
12
14
  "require": "./dist/styles.css",
@@ -15,8 +17,9 @@
15
17
  },
16
18
  "scripts": {
17
19
  "dev": "vite",
18
- "build": "tsc -b && vite build && npm run build:css",
20
+ "build": "tsc -b && vite build && npm run build:css && npm run build:types",
19
21
  "build:css": "tailwindcss -m -i ./src/styles/tailwind.css -o ./dist/styles.css",
22
+ "build:types": "rollup -c",
20
23
  "lint": "eslint .",
21
24
  "preview": "vite preview",
22
25
  "storybook": "concurrently 'npm run storybook:css' 'storybook dev -p 6006'",
@@ -26,13 +29,36 @@
26
29
  "prepublish": "npm run build",
27
30
  "test": "echo 'setup unit testing'"
28
31
  },
29
- "peerDependencies": {
30
- "react": "^18.0.0",
31
- "react-dom": "^18.0.0"
32
- },
33
32
  "devDependencies": {
34
33
  "@chromatic-com/storybook": "^3.2.6",
35
34
  "@eslint/js": "^9.21.0",
35
+ "@radix-ui/react-accordion": "^1.2.3",
36
+ "@radix-ui/react-alert-dialog": "^1.1.6",
37
+ "@radix-ui/react-aspect-ratio": "^1.1.2",
38
+ "@radix-ui/react-avatar": "^1.1.3",
39
+ "@radix-ui/react-checkbox": "^1.1.4",
40
+ "@radix-ui/react-collapsible": "^1.1.3",
41
+ "@radix-ui/react-context-menu": "^2.2.6",
42
+ "@radix-ui/react-dialog": "^1.1.6",
43
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
44
+ "@radix-ui/react-hover-card": "^1.1.6",
45
+ "@radix-ui/react-label": "^2.1.2",
46
+ "@radix-ui/react-menubar": "^1.1.6",
47
+ "@radix-ui/react-navigation-menu": "^1.2.5",
48
+ "@radix-ui/react-popover": "^1.1.6",
49
+ "@radix-ui/react-progress": "^1.1.2",
50
+ "@radix-ui/react-radio-group": "^1.2.3",
51
+ "@radix-ui/react-scroll-area": "^1.2.3",
52
+ "@radix-ui/react-select": "^2.1.6",
53
+ "@radix-ui/react-separator": "^1.1.2",
54
+ "@radix-ui/react-slider": "^1.2.3",
55
+ "@radix-ui/react-slot": "^1.1.2",
56
+ "@radix-ui/react-switch": "^1.1.3",
57
+ "@radix-ui/react-tabs": "^1.1.3",
58
+ "@radix-ui/react-toast": "^1.2.6",
59
+ "@radix-ui/react-toggle": "^1.1.2",
60
+ "@radix-ui/react-toggle-group": "^1.1.2",
61
+ "@radix-ui/react-tooltip": "^1.1.8",
36
62
  "@storybook/addon-essentials": "^8.6.7",
37
63
  "@storybook/addon-onboarding": "^8.6.7",
38
64
  "@storybook/blocks": "^8.6.7",
@@ -42,8 +68,8 @@
42
68
  "@storybook/test": "^8.6.7",
43
69
  "@tailwindcss/vite": "^4.0.14",
44
70
  "@types/node": "^22.13.10",
45
- "@types/react": "^18",
46
- "@types/react-dom": "^18",
71
+ "@types/react": "^19.0.12",
72
+ "@types/react-dom": "^19.0.4",
47
73
  "@vitejs/plugin-react": "^4.3.4",
48
74
  "@vitest/browser": "^3.0.9",
49
75
  "@vitest/coverage-v8": "^3.0.9",
@@ -51,28 +77,36 @@
51
77
  "class-variance-authority": "^0.7.1",
52
78
  "clsx": "^2.1.1",
53
79
  "concurrently": "^9.1.2",
80
+ "embla-carousel-react": "^8.5.2",
54
81
  "eslint": "^9.21.0",
55
82
  "eslint-plugin-react-hooks": "^5.1.0",
56
83
  "eslint-plugin-react-refresh": "^0.4.19",
57
84
  "eslint-plugin-storybook": "^0.11.6",
58
85
  "globals": "^15.15.0",
59
86
  "husky": "^9.1.7",
87
+ "input-otp": "^1.4.2",
60
88
  "lucide-react": "^0.482.0",
89
+ "next-themes": "^0.4.6",
61
90
  "playwright": "^1.51.0",
62
91
  "postcss": "^8.5.3",
63
92
  "prop-types": "^15.8.1",
64
- "radix-ui": "^1.1.3",
65
- "react": "^18.0.0",
66
- "react-dom": "^18.0.0",
93
+ "react-hook-form": "^7.54.2",
94
+ "react-resizable-panels": "^2.1.7",
95
+ "recharts": "^2.15.1",
96
+ "rollup-plugin-dts": "^6.2.1",
97
+ "sonner": "^2.0.2",
67
98
  "storybook": "^8.6.7",
99
+ "tailwind-animate": "^0.2.10",
68
100
  "tailwind-merge": "^3.0.2",
69
101
  "tailwindcss": "^3.4.17",
70
102
  "tailwindcss-animate": "^1.0.7",
71
103
  "typescript": "~5.7.2",
72
104
  "typescript-eslint": "^8.24.1",
105
+ "vaul": "^1.1.2",
73
106
  "vite": "^6.2.0",
74
107
  "vite-plugin-dts": "^4.5.3",
75
- "vitest": "^3.0.9"
108
+ "vitest": "^3.0.9",
109
+ "zod": "^3.24.2"
76
110
  },
77
111
  "eslintConfig": {
78
112
  "extends": [
@@ -81,49 +115,15 @@
81
115
  },
82
116
  "dependencies": {
83
117
  "@hookform/resolvers": "^4.1.3",
84
- "@radix-ui/react-accordion": "^1.2.3",
85
- "@radix-ui/react-alert-dialog": "^1.1.6",
86
- "@radix-ui/react-aspect-ratio": "^1.1.2",
87
- "@radix-ui/react-avatar": "^1.1.3",
88
- "@radix-ui/react-checkbox": "^1.1.4",
89
- "@radix-ui/react-collapsible": "^1.1.3",
90
- "@radix-ui/react-context-menu": "^2.2.6",
91
- "@radix-ui/react-dialog": "^1.1.6",
92
- "@radix-ui/react-dropdown-menu": "^2.1.6",
93
- "@radix-ui/react-hover-card": "^1.1.6",
94
- "@radix-ui/react-label": "^2.1.2",
95
- "@radix-ui/react-menubar": "^1.1.6",
96
- "@radix-ui/react-navigation-menu": "^1.2.5",
97
- "@radix-ui/react-popover": "^1.1.6",
98
- "@radix-ui/react-progress": "^1.1.2",
99
- "@radix-ui/react-radio-group": "^1.2.3",
100
- "@radix-ui/react-scroll-area": "^1.2.3",
101
- "@radix-ui/react-select": "^2.1.6",
102
- "@radix-ui/react-separator": "^1.1.2",
103
- "@radix-ui/react-slider": "^1.2.3",
104
- "@radix-ui/react-slot": "^1.1.2",
105
- "@radix-ui/react-switch": "^1.1.3",
106
- "@radix-ui/react-tabs": "^1.1.3",
107
- "@radix-ui/react-toast": "^1.2.6",
108
- "@radix-ui/react-toggle": "^1.1.2",
109
- "@radix-ui/react-toggle-group": "^1.1.2",
110
- "@radix-ui/react-tooltip": "^1.1.8",
111
118
  "@semantic-release/changelog": "^6.0.3",
112
119
  "@semantic-release/commit-analyzer": "^13.0.1",
113
120
  "@semantic-release/github": "^11.0.1",
114
121
  "@semantic-release/npm": "^12.0.1",
115
122
  "@semantic-release/release-notes-generator": "^14.0.3",
116
- "embla-carousel-react": "^8.5.2",
117
- "input-otp": "^1.4.2",
118
- "next-themes": "^0.4.6",
119
- "react-hook-form": "^7.54.2",
120
- "react-resizable-panels": "^2.1.7",
121
- "recharts": "^2.15.1",
122
- "semantic-release": "^24.2.3",
123
- "sonner": "^2.0.1",
124
- "tailwind-animate": "^0.2.10",
125
- "ui-arreya-components": "^0.0.16",
126
- "vaul": "^1.1.2",
127
- "zod": "^3.24.2"
123
+ "semantic-release": "^24.2.3"
124
+ },
125
+ "peerDependencies": {
126
+ "react": "^18.0.0 || ^19.0.0",
127
+ "react-dom": "^18.0.0 || ^19.0.0"
128
128
  }
129
129
  }
@@ -0,0 +1,12 @@
1
+ import dts from 'rollup-plugin-dts';
2
+
3
+ export default [
4
+ {
5
+ input: './dist/index.d.ts',
6
+ output: {
7
+ file: 'dist/types/index.d.ts',
8
+ format: 'es',
9
+ },
10
+ plugins: [dts()]
11
+ }
12
+ ]
@@ -12,7 +12,7 @@ type SearchBarProps = {
12
12
  submit: (search:string, option?: string) => void
13
13
  }
14
14
 
15
- export const SearchBar = ({ search, options, submit }: SearchBarProps): JSX.Element => {
15
+ export const SearchBar = ({ search, options, submit }: SearchBarProps) => {
16
16
  const firstDropdownOption = (options && options.length > 0) ? options[0] : ""
17
17
 
18
18
  const [isOptionsOpen, setIsOptionsOpen] = useState(false)
@@ -4,105 +4,99 @@ import { ChevronRight, MoreHorizontal } from "lucide-react"
4
4
 
5
5
  import { cn } from "@/lib/utils"
6
6
 
7
- const Breadcrumb = React.forwardRef<
8
- HTMLElement,
9
- React.ComponentPropsWithoutRef<"nav"> & {
10
- separator?: React.ReactNode
11
- }
12
- >(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />)
13
- Breadcrumb.displayName = "Breadcrumb"
7
+ function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
8
+ return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
9
+ }
14
10
 
15
- const BreadcrumbList = React.forwardRef<
16
- HTMLOListElement,
17
- React.ComponentPropsWithoutRef<"ol">
18
- >(({ className, ...props }, ref) => (
19
- <ol
20
- ref={ref}
21
- className={cn(
22
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
23
- className
24
- )}
25
- {...props}
26
- />
27
- ))
28
- BreadcrumbList.displayName = "BreadcrumbList"
11
+ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
12
+ return (
13
+ <ol
14
+ data-slot="breadcrumb-list"
15
+ className={cn(
16
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
17
+ className
18
+ )}
19
+ {...props}
20
+ />
21
+ )
22
+ }
29
23
 
30
- const BreadcrumbItem = React.forwardRef<
31
- HTMLLIElement,
32
- React.ComponentPropsWithoutRef<"li">
33
- >(({ className, ...props }, ref) => (
34
- <li
35
- ref={ref}
36
- className={cn("inline-flex items-center gap-1.5", className)}
37
- {...props}
38
- />
39
- ))
40
- BreadcrumbItem.displayName = "BreadcrumbItem"
24
+ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
25
+ return (
26
+ <li
27
+ data-slot="breadcrumb-item"
28
+ className={cn("inline-flex items-center gap-1.5", className)}
29
+ {...props}
30
+ />
31
+ )
32
+ }
41
33
 
42
- const BreadcrumbLink = React.forwardRef<
43
- HTMLAnchorElement,
44
- React.ComponentPropsWithoutRef<"a"> & {
45
- asChild?: boolean
46
- }
47
- >(({ asChild, className, ...props }, ref) => {
34
+ function BreadcrumbLink({
35
+ asChild,
36
+ className,
37
+ ...props
38
+ }: React.ComponentProps<"a"> & {
39
+ asChild?: boolean
40
+ }) {
48
41
  const Comp = asChild ? Slot : "a"
49
42
 
50
43
  return (
51
44
  <Comp
52
- ref={ref}
53
- className={cn("transition-colors hover:text-foreground", className)}
45
+ data-slot="breadcrumb-link"
46
+ className={cn("hover:text-foreground transition-colors", className)}
54
47
  {...props}
55
48
  />
56
49
  )
57
- })
58
- BreadcrumbLink.displayName = "BreadcrumbLink"
50
+ }
59
51
 
60
- const BreadcrumbPage = React.forwardRef<
61
- HTMLSpanElement,
62
- React.ComponentPropsWithoutRef<"span">
63
- >(({ className, ...props }, ref) => (
64
- <span
65
- ref={ref}
66
- role="link"
67
- aria-disabled="true"
68
- aria-current="page"
69
- className={cn("font-normal text-foreground", className)}
70
- {...props}
71
- />
72
- ))
73
- BreadcrumbPage.displayName = "BreadcrumbPage"
52
+ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
53
+ return (
54
+ <span
55
+ data-slot="breadcrumb-page"
56
+ role="link"
57
+ aria-disabled="true"
58
+ aria-current="page"
59
+ className={cn("text-foreground font-normal", className)}
60
+ {...props}
61
+ />
62
+ )
63
+ }
74
64
 
75
- const BreadcrumbSeparator = ({
65
+ function BreadcrumbSeparator({
76
66
  children,
77
67
  className,
78
68
  ...props
79
- }: React.ComponentProps<"li">) => (
80
- <li
81
- role="presentation"
82
- aria-hidden="true"
83
- className={cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)}
84
- {...props}
85
- >
86
- {children ?? <ChevronRight />}
87
- </li>
88
- )
89
- BreadcrumbSeparator.displayName = "BreadcrumbSeparator"
69
+ }: React.ComponentProps<"li">) {
70
+ return (
71
+ <li
72
+ data-slot="breadcrumb-separator"
73
+ role="presentation"
74
+ aria-hidden="true"
75
+ className={cn("[&>svg]:size-3.5", className)}
76
+ {...props}
77
+ >
78
+ {children ?? <ChevronRight />}
79
+ </li>
80
+ )
81
+ }
90
82
 
91
- const BreadcrumbEllipsis = ({
83
+ function BreadcrumbEllipsis({
92
84
  className,
93
85
  ...props
94
- }: React.ComponentProps<"span">) => (
95
- <span
96
- role="presentation"
97
- aria-hidden="true"
98
- className={cn("flex h-9 w-9 items-center justify-center", className)}
99
- {...props}
100
- >
101
- <MoreHorizontal className="h-4 w-4" />
102
- <span className="sr-only">More</span>
103
- </span>
104
- )
105
- BreadcrumbEllipsis.displayName = "BreadcrumbElipssis"
86
+ }: React.ComponentProps<"span">) {
87
+ return (
88
+ <span
89
+ data-slot="breadcrumb-ellipsis"
90
+ role="presentation"
91
+ aria-hidden="true"
92
+ className={cn("flex size-9 items-center justify-center", className)}
93
+ {...props}
94
+ >
95
+ <MoreHorizontal className="size-4" />
96
+ <span className="sr-only">More</span>
97
+ </span>
98
+ )
99
+ }
106
100
 
107
101
  export {
108
102
  Breadcrumb,
@@ -0,0 +1,102 @@
1
+ import { Meta, StoryObj } from "@storybook/react"
2
+
3
+ import {
4
+ Table,
5
+ TableBody,
6
+ TableCaption,
7
+ TableCell,
8
+ TableFooter,
9
+ TableHead,
10
+ TableHeader,
11
+ TableRow,
12
+ } from "./table"
13
+
14
+ const meta = {
15
+ title: "Components/Table",
16
+ component: Table,
17
+ parameters: {
18
+ layout: "centered",
19
+ },
20
+ tags: ["autodocs"],
21
+ } satisfies Meta<typeof Table>
22
+
23
+ export default meta
24
+ type Story = StoryObj<typeof meta>
25
+
26
+ const invoices = [
27
+ {
28
+ invoice: "INV001",
29
+ paymentStatus: "Paid",
30
+ totalAmount: "$250.00",
31
+ paymentMethod: "Credit Card",
32
+ },
33
+ {
34
+ invoice: "INV002",
35
+ paymentStatus: "Pending",
36
+ totalAmount: "$150.00",
37
+ paymentMethod: "PayPal",
38
+ },
39
+ {
40
+ invoice: "INV003",
41
+ paymentStatus: "Unpaid",
42
+ totalAmount: "$350.00",
43
+ paymentMethod: "Bank Transfer",
44
+ },
45
+ {
46
+ invoice: "INV004",
47
+ paymentStatus: "Paid",
48
+ totalAmount: "$450.00",
49
+ paymentMethod: "Credit Card",
50
+ },
51
+ {
52
+ invoice: "INV005",
53
+ paymentStatus: "Paid",
54
+ totalAmount: "$550.00",
55
+ paymentMethod: "PayPal",
56
+ },
57
+ {
58
+ invoice: "INV006",
59
+ paymentStatus: "Pending",
60
+ totalAmount: "$200.00",
61
+ paymentMethod: "Bank Transfer",
62
+ },
63
+ {
64
+ invoice: "INV007",
65
+ paymentStatus: "Unpaid",
66
+ totalAmount: "$300.00",
67
+ paymentMethod: "Credit Card",
68
+ },
69
+ ]
70
+
71
+ export const Default: Story = {
72
+ render: () => (
73
+ <Table>
74
+ <TableCaption>A list of your recent invoices.</TableCaption>
75
+ <TableHeader>
76
+ <TableRow>
77
+ <TableHead className="w-[100px]">Invoice</TableHead>
78
+ <TableHead>Status</TableHead>
79
+ <TableHead>Method</TableHead>
80
+ <TableHead className="text-right">Amount</TableHead>
81
+ </TableRow>
82
+ </TableHeader>
83
+ <TableBody>
84
+ {invoices.map((invoice) => (
85
+ <TableRow key={invoice.invoice}>
86
+ <TableCell className="font-medium">{invoice.invoice}</TableCell>
87
+ <TableCell>{invoice.paymentStatus}</TableCell>
88
+ <TableCell>{invoice.paymentMethod}</TableCell>
89
+ <TableCell className="text-right">{invoice.totalAmount}</TableCell>
90
+ </TableRow>
91
+ ))}
92
+ </TableBody>
93
+ <TableFooter>
94
+ <TableRow>
95
+ <TableCell colSpan={3}>Total</TableCell>
96
+ <TableCell className="text-right">$2,500.00</TableCell>
97
+ </TableRow>
98
+ </TableFooter>
99
+ </Table>
100
+
101
+ )
102
+ }