@eintrek/erp-theme 1.0.0 → 1.0.3

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 (159) hide show
  1. package/dist/components/command-block.d.ts +3 -0
  2. package/dist/components/data-table/data-table-action-bar.d.ts +20 -0
  3. package/dist/components/data-table/data-table-advanced-toolbar.d.ts +7 -0
  4. package/dist/components/data-table/data-table-column-header.d.ts +8 -0
  5. package/dist/components/data-table/data-table-date-filter.d.ts +8 -0
  6. package/dist/components/data-table/data-table-faceted-filter.d.ts +10 -0
  7. package/dist/components/data-table/data-table-filter-list.d.ts +11 -0
  8. package/dist/components/data-table/data-table-filter-menu.d.ts +11 -0
  9. package/dist/components/data-table/data-table-pagination.d.ts +7 -0
  10. package/dist/components/data-table/data-table-range-filter.d.ts +11 -0
  11. package/dist/components/data-table/data-table-skeleton.d.ts +11 -0
  12. package/dist/components/data-table/data-table-slider-filter.d.ts +7 -0
  13. package/dist/components/data-table/data-table-sort-list.d.ts +8 -0
  14. package/dist/components/data-table/data-table-toolbar.d.ts +7 -0
  15. package/dist/components/data-table/data-table-view-options.d.ts +6 -0
  16. package/dist/components/data-table/data-table.d.ts +8 -0
  17. package/dist/components/footer.d.ts +1 -0
  18. package/dist/components/header.d.ts +1 -0
  19. package/dist/components/registry_item_row.d.ts +10 -0
  20. package/dist/components/ui/accordion.d.ts +7 -0
  21. package/dist/components/ui/alert-dialog.d.ts +14 -0
  22. package/dist/components/ui/alert.d.ts +9 -0
  23. package/dist/components/ui/aspect-ratio.d.ts +3 -0
  24. package/dist/components/ui/avatar.d.ts +6 -0
  25. package/dist/components/ui/badge.d.ts +9 -0
  26. package/dist/components/ui/breadcrumb.d.ts +11 -0
  27. package/dist/components/ui/button.d.ts +4 -8
  28. package/dist/components/ui/calendar.d.ts +8 -0
  29. package/dist/components/ui/card.d.ts +8 -7
  30. package/dist/components/ui/carousel.d.ts +19 -0
  31. package/dist/components/ui/chart.d.ts +40 -0
  32. package/dist/components/ui/checkbox.d.ts +4 -0
  33. package/dist/components/ui/collapsible.d.ts +5 -0
  34. package/dist/components/ui/command.d.ts +18 -0
  35. package/dist/components/ui/context-menu.d.ts +25 -0
  36. package/dist/components/ui/dialog.d.ts +15 -0
  37. package/dist/components/ui/drawer.d.ts +13 -0
  38. package/dist/components/ui/dropdown-menu.d.ts +25 -0
  39. package/dist/components/ui/faceted.d.ts +33 -0
  40. package/dist/components/ui/form.d.ts +23 -0
  41. package/dist/components/ui/hover-card.d.ts +6 -0
  42. package/dist/components/ui/input-otp.d.ts +11 -0
  43. package/dist/components/ui/input.d.ts +3 -0
  44. package/dist/components/ui/label.d.ts +5 -0
  45. package/dist/components/ui/menubar.d.ts +26 -0
  46. package/dist/components/ui/navigation-menu.d.ts +14 -0
  47. package/dist/components/ui/pagination.d.ts +13 -0
  48. package/dist/components/ui/popover.d.ts +7 -0
  49. package/dist/components/ui/progress.d.ts +4 -0
  50. package/dist/components/ui/radio-group.d.ts +5 -0
  51. package/dist/components/ui/resizable.d.ts +8 -0
  52. package/dist/components/ui/scroll-area.d.ts +5 -0
  53. package/dist/components/ui/select.d.ts +15 -0
  54. package/dist/components/ui/separator.d.ts +4 -0
  55. package/dist/components/ui/sheet.d.ts +13 -0
  56. package/dist/components/ui/sidebar.d.ts +69 -0
  57. package/dist/components/ui/skeleton.d.ts +2 -0
  58. package/dist/components/ui/slider.d.ts +4 -0
  59. package/dist/components/ui/sonner.d.ts +3 -0
  60. package/dist/components/ui/sortable.d.ts +53 -0
  61. package/dist/components/ui/switch.d.ts +4 -0
  62. package/dist/components/ui/table.d.ts +10 -0
  63. package/dist/components/ui/tabs.d.ts +7 -0
  64. package/dist/components/ui/textarea.d.ts +3 -0
  65. package/dist/components/ui/toggle-group.d.ts +7 -0
  66. package/dist/components/ui/toggle.d.ts +9 -0
  67. package/dist/components/ui/tooltip.d.ts +7 -0
  68. package/dist/config/data-table.d.ts +124 -0
  69. package/dist/config/flag.d.ts +16 -0
  70. package/dist/config/site.d.ts +9 -0
  71. package/dist/hooks/use-callback-ref.d.ts +9 -0
  72. package/dist/hooks/use-data-table.d.ts +23 -0
  73. package/dist/hooks/use-debounced-callback.d.ts +4 -0
  74. package/dist/hooks/use-media-query.d.ts +1 -0
  75. package/dist/hooks/use-mobile.d.ts +1 -0
  76. package/dist/index.css +1 -1
  77. package/dist/index.d.ts +65 -9
  78. package/dist/index.esm.css +1 -0
  79. package/dist/index.esm.js +48678 -0
  80. package/dist/index.esm.js.map +1 -0
  81. package/dist/index.js +48048 -10383
  82. package/dist/index.js.map +1 -1
  83. package/dist/lib/composition.d.ts +23 -0
  84. package/dist/lib/constants.d.ts +2 -0
  85. package/dist/lib/data-table.d.ts +12 -0
  86. package/dist/lib/export.d.ts +6 -0
  87. package/dist/lib/filter-columns.d.ts +8 -0
  88. package/dist/lib/fonts.d.ts +2 -0
  89. package/dist/lib/format.d.ts +1 -0
  90. package/dist/lib/handle-error.d.ts +1 -0
  91. package/dist/lib/id.d.ts +7 -0
  92. package/dist/lib/parsers.d.ts +25 -0
  93. package/dist/lib/unstable-cache.d.ts +10 -0
  94. package/dist/lib/utils.d.ts +1 -0
  95. package/dist/registry/alert.stories.d.ts +34 -0
  96. package/dist/registry/aspect-ratio.stories.d.ts +24 -0
  97. package/dist/registry/badge.stories.d.ts +42 -0
  98. package/dist/registry/breadcrumb.stories.d.ts +26 -0
  99. package/dist/registry/button.stories.d.ts +82 -0
  100. package/dist/registry/calendar.stories.d.ts +43 -0
  101. package/dist/registry/card.stories.d.ts +24 -0
  102. package/dist/registry/carousel.stories.d.ts +17 -0
  103. package/dist/registry/chart.stories.d.ts +32 -0
  104. package/dist/registry/checkbox.stories.d.ts +17 -0
  105. package/dist/registry/command.stories.d.ts +41 -0
  106. package/dist/registry/data-table.stories.d.ts +59 -0
  107. package/dist/registry/date-picker.stories.d.ts +32 -0
  108. package/dist/registry/drawer.stories.d.ts +27 -0
  109. package/dist/registry/form.stories.d.ts +14 -0
  110. package/dist/registry/input-otp.stories.d.ts +41 -0
  111. package/dist/registry/input.stories.d.ts +47 -0
  112. package/dist/registry/label.stories.d.ts +27 -0
  113. package/dist/registry/pagination.stories.d.ts +91 -0
  114. package/dist/registry/progress.stories.d.ts +31 -0
  115. package/dist/registry/resizable.stories.d.ts +12 -0
  116. package/dist/registry/scroll-area.stories.d.ts +41 -0
  117. package/dist/registry/select.stories.d.ts +13 -0
  118. package/dist/registry/separator.stories.d.ts +21 -0
  119. package/dist/registry/sheet.stories.d.ts +16 -0
  120. package/dist/registry/sidebar.stories.d.ts +336 -0
  121. package/dist/registry/skeleton.stories.d.ts +20 -0
  122. package/dist/registry/slider.stories.d.ts +30 -0
  123. package/dist/registry/sonner.stories.d.ts +14 -0
  124. package/dist/registry/table.stories.d.ts +104 -0
  125. package/dist/registry/textarea.stories.d.ts +40 -0
  126. package/dist/registry/toggle.stories.d.ts +35 -0
  127. package/dist/registry/tokens/color.stories.d.ts +23 -0
  128. package/dist/registry/tokens/radius.stories.d.ts +17 -0
  129. package/dist/registry/tokens/typography.stories.d.ts +28 -0
  130. package/dist/registry/tooltip.stories.d.ts +26 -0
  131. package/dist/types/data-table.d.ts +33 -0
  132. package/dist/types/doc.d.ts +195 -0
  133. package/dist/types/index.d.ts +26 -0
  134. package/package.json +54 -40
  135. package/dist/components/ui/Form.d.ts +0 -25
  136. package/dist/components/ui/Form.stories.d.ts +0 -8
  137. package/dist/components/ui/Input.d.ts +0 -17
  138. package/dist/components/ui/Input.stories.d.ts +0 -10
  139. package/dist/components/ui/InputDropdown.d.ts +0 -19
  140. package/dist/components/ui/InputDropdown.stories.d.ts +0 -9
  141. package/dist/components/ui/Label.d.ts +0 -8
  142. package/dist/components/ui/Label.stories.d.ts +0 -8
  143. package/dist/components/ui/Modal.d.ts +0 -12
  144. package/dist/components/ui/Modal.stories.d.ts +0 -13
  145. package/dist/components/ui/badge/Badge.d.ts +0 -6
  146. package/dist/components/ui/button/Button.d.ts +0 -7
  147. package/dist/components/ui/button.stories.d.ts +0 -25
  148. package/dist/components/ui/card.stories.d.ts +0 -8
  149. package/dist/components/ui/table/Table.d.ts +0 -5
  150. package/dist/components/ui/table/Table.stories.d.ts +0 -6
  151. package/dist/components/ui/table/TableBody.d.ts +0 -3
  152. package/dist/components/ui/table/TableBody.stories.d.ts +0 -7
  153. package/dist/components/ui/table/TableFilter.d.ts +0 -3
  154. package/dist/components/ui/table/TableFilter.stories.d.ts +0 -6
  155. package/dist/components/ui/table/TablePagination.d.ts +0 -10
  156. package/dist/components/ui/table/TablePagination.stories.d.ts +0 -6
  157. package/dist/components/ui/table/index.d.ts +0 -13
  158. package/dist/components/ui/table/types.d.ts +0 -54
  159. package/dist/components/ui/tabs/Tabs.d.ts +0 -11
@@ -0,0 +1,26 @@
1
+ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
+ import { TooltipContent } from "@/components/ui/tooltip";
3
+ /**
4
+ * A popup that displays information related to an element when the element
5
+ * receives keyboard focus or the mouse hovers over it.
6
+ */
7
+ declare const meta: Meta<typeof TooltipContent>;
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ /**
11
+ * The default form of the tooltip.
12
+ */
13
+ export declare const Default: Story;
14
+ /**
15
+ * Use the `bottom` side to display the tooltip below the element.
16
+ */
17
+ export declare const Bottom: Story;
18
+ /**
19
+ * Use the `left` side to display the tooltip to the left of the element.
20
+ */
21
+ export declare const Left: Story;
22
+ /**
23
+ * Use the `right` side to display the tooltip to the right of the element.
24
+ */
25
+ export declare const Right: Story;
26
+ export declare const ShouldShowOnHover: Story;
@@ -0,0 +1,33 @@
1
+ import type { DataTableConfig } from "@/config/data-table";
2
+ import type { FilterItemSchema } from "@/lib/parsers";
3
+ import type { ColumnSort, Row, RowData } from "@tanstack/react-table";
4
+ declare module "@tanstack/react-table" {
5
+ interface ColumnMeta<TData extends RowData, TValue> {
6
+ label?: string;
7
+ placeholder?: string;
8
+ variant?: FilterVariant;
9
+ options?: Option[];
10
+ range?: [number, number];
11
+ unit?: string;
12
+ icon?: React.FC<React.SVGProps<SVGSVGElement>>;
13
+ }
14
+ }
15
+ export interface Option {
16
+ label: string;
17
+ value: string;
18
+ count?: number;
19
+ icon?: React.FC<React.SVGProps<SVGSVGElement>>;
20
+ }
21
+ export type FilterOperator = DataTableConfig["operators"][number];
22
+ export type FilterVariant = DataTableConfig["filterVariants"][number];
23
+ export type JoinOperator = DataTableConfig["joinOperators"][number];
24
+ export interface ExtendedColumnSort<TData> extends Omit<ColumnSort, "id"> {
25
+ id: Extract<keyof TData, string>;
26
+ }
27
+ export interface ExtendedColumnFilter<TData> extends FilterItemSchema {
28
+ id: Extract<keyof TData, string>;
29
+ }
30
+ export interface DataTableRowAction<TData> {
31
+ row: Row<TData>;
32
+ variant: "update" | "delete";
33
+ }
@@ -0,0 +1,195 @@
1
+ import type { DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
2
+ import type { EmptyProps } from "@/types";
3
+ import type { ExtendedColumnFilter, Option } from "@/types/data-table";
4
+ import type { Column, Table, TableOptions } from "@tanstack/react-table";
5
+ import type { motion } from "motion/react";
6
+ import type * as React from "react";
7
+ export interface UseDataTableProps<TData> extends Required<Pick<TableOptions<TData>, "pageCount">>, Pick<TableOptions<TData>, "data" | "columns" | "getRowId" | "defaultColumn" | "initialState"> {
8
+ /**
9
+ * Determines how query updates affect history.
10
+ * `push` creates a new history entry; `replace` (default) updates the current entry.
11
+ * @default "replace"
12
+ */
13
+ history?: "push" | "replace";
14
+ /**
15
+ * Debounce time (ms) for filter updates to enhance performance during rapid input.
16
+ * @default 300
17
+ */
18
+ debounceMs?: number;
19
+ /**
20
+ * Maximum time (ms) to wait between URL query string updates.
21
+ * Helps with browser rate-limiting. Minimum effective value is 50ms.
22
+ * @default 50
23
+ */
24
+ throttleMs?: number;
25
+ /**
26
+ * Clear URL query key-value pair when state is set to default.
27
+ * Keep URL meaning consistent when defaults change.
28
+ * @default false
29
+ */
30
+ clearOnDefault?: boolean;
31
+ /**
32
+ * Enable notion like column filters.
33
+ * Advanced filters and column filters cannot be used at the same time.
34
+ * @default false
35
+ * @type boolean
36
+ */
37
+ enableAdvancedFilter?: boolean;
38
+ /**
39
+ * Whether the page should scroll to the top when the URL changes.
40
+ * @default false
41
+ */
42
+ scroll?: boolean;
43
+ /**
44
+ * Whether to keep query states client-side, avoiding server calls.
45
+ * Setting to `false` triggers a network request with the updated querystring.
46
+ * @default true
47
+ */
48
+ shallow?: boolean;
49
+ /**
50
+ * Observe Server Component loading states for non-shallow updates.
51
+ * Pass `startTransition` from `React.useTransition()`.
52
+ * Sets `shallow` to `false` automatically.
53
+ * So shallow: true` and `startTransition` cannot be used at the same time.
54
+ * @see https://react.dev/reference/react/useTransition
55
+ */
56
+ startTransition?: React.TransitionStartFunction;
57
+ }
58
+ export interface DataTableProps<TData> extends EmptyProps<"div"> {
59
+ /** The table instance. */
60
+ table: Table<TData>;
61
+ /** The action bar to display above the table. */
62
+ actionBar?: React.ReactNode;
63
+ }
64
+ export interface DataTableToolbarProps<TData> extends EmptyProps<"div"> {
65
+ /** The table instance. */
66
+ table: Table<TData>;
67
+ }
68
+ export interface DataTableAdvancedToolbarProps<TData> extends EmptyProps<"div"> {
69
+ /** The table instance. */
70
+ table: Table<TData>;
71
+ }
72
+ export interface DataTableActionBarProps<TData> extends EmptyProps<typeof motion.div> {
73
+ /** The table instance. */
74
+ table: Table<TData>;
75
+ /** Whether the action bar is visible. */
76
+ visible?: boolean;
77
+ /**
78
+ * The container to mount the portal into.
79
+ * @default document.body
80
+ */
81
+ container?: Element | DocumentFragment | null;
82
+ }
83
+ export interface DataTableColumnHeaderProps<TData, TValue> extends EmptyProps<typeof DropdownMenuTrigger> {
84
+ /** The column instance. */
85
+ column: Column<TData, TValue>;
86
+ /** The column title. */
87
+ title: string;
88
+ }
89
+ export interface DataTableDateFilterProps<TData> {
90
+ /** The column instance. */
91
+ column: Column<TData, unknown>;
92
+ /** The title of the date picker. */
93
+ title?: string;
94
+ /** Whether to enable range selection. */
95
+ multiple?: boolean;
96
+ }
97
+ export interface DataTableFacetedFilterProps<TData, TValue> {
98
+ /** The column instance. */
99
+ column?: Column<TData, TValue>;
100
+ /** The title of the filter. */
101
+ title?: string;
102
+ /** The options of the filter. */
103
+ options: Option[];
104
+ /** Whether to enable multiple selection. */
105
+ multiple?: boolean;
106
+ }
107
+ export interface DataTableSliderFilterProps<TData> {
108
+ /** The column instance. */
109
+ column: Column<TData, unknown>;
110
+ /** The title of the slider filter. */
111
+ title?: string;
112
+ }
113
+ export interface DataTableRangeFilterProps<TData> extends EmptyProps<"div"> {
114
+ /** The extended column filter. */
115
+ filter: ExtendedColumnFilter<TData>;
116
+ /** The column instance. */
117
+ column: Column<TData>;
118
+ /** The input id for screen readers. */
119
+ inputId: string;
120
+ /** The function to update the filter. */
121
+ onFilterUpdate: (filterId: string, updates: Partial<Omit<ExtendedColumnFilter<TData>, "filterId">>) => void;
122
+ }
123
+ export interface DataTableFilterListProps<TData> {
124
+ /** The table instance. */
125
+ table: Table<TData>;
126
+ /**
127
+ * Debounce time (ms) for filter updates to enhance performance during rapid input.
128
+ * @default 300
129
+ */
130
+ debounceMs?: number;
131
+ /**
132
+ * Maximum time (ms) to wait between URL query string updates.
133
+ * Helps with browser rate-limiting. Minimum effective value is 50ms.
134
+ * @default 50
135
+ */
136
+ throttleMs?: number;
137
+ /**
138
+ * Whether to keep query states client-side, avoiding server calls.
139
+ * Setting to `false` triggers a network request with the updated querystring.
140
+ * @default true
141
+ */
142
+ shallow?: boolean;
143
+ }
144
+ export interface DataTableFilterMenuProps<TData> extends DataTableFilterListProps<TData> {
145
+ }
146
+ export interface DataTableSortListProps<TData> extends DataTableFilterListProps<TData> {
147
+ }
148
+ export interface DataTablePaginationProps<TData> extends EmptyProps<"div"> {
149
+ /** The table instance. */
150
+ table: Table<TData>;
151
+ /**
152
+ * The options of the pagination.
153
+ * @default [10, 20, 30, 40, 50]
154
+ */
155
+ pageSizeOptions?: number[];
156
+ }
157
+ export interface DataTableViewOptionsProps<TData> {
158
+ /** The table instance. */
159
+ table: Table<TData>;
160
+ }
161
+ export interface DataTableSkeletonProps extends EmptyProps<"div"> {
162
+ /** The number of columns in the table. */
163
+ columnCount: number;
164
+ /**
165
+ * The number of rows in the table.
166
+ * @default 10
167
+ */
168
+ rowCount?: number;
169
+ /**
170
+ * The number of filters in the table.
171
+ * @default 0
172
+ */
173
+ filterCount?: number;
174
+ /**
175
+ * Array of CSS width values for each table column.
176
+ * The maximum length of the array must match columnCount, extra values will be ignored.
177
+ * @default ["auto"]
178
+ */
179
+ cellWidths?: string[];
180
+ /**
181
+ * Whether to show the view options.
182
+ * @default true
183
+ */
184
+ withViewOptions?: boolean;
185
+ /**
186
+ * Whether to show the pagination bar.
187
+ * @default true
188
+ */
189
+ withPagination?: boolean;
190
+ /**
191
+ * Whether to prevent the table cells from shrinking.
192
+ * @default false
193
+ */
194
+ shrinkZero?: boolean;
195
+ }
@@ -0,0 +1,26 @@
1
+ import type { SQL } from "drizzle-orm";
2
+ export type Prettify<T> = {
3
+ [K in keyof T]: T[K];
4
+ } & {};
5
+ export type EmptyProps<T extends React.ElementType> = Omit<React.ComponentProps<T>, keyof React.ComponentProps<T>>;
6
+ export interface SearchParams {
7
+ [key: string]: string | string[] | undefined;
8
+ }
9
+ export interface Supplier {
10
+ id: number;
11
+ supplier_code: string;
12
+ supplier_name: string;
13
+ contact_person: string;
14
+ phone: string;
15
+ email: string;
16
+ address: string;
17
+ tax_id: string;
18
+ payment_terms: "cash" | "7" | "15" | "30" | "45" | "60";
19
+ status: "active" | "inactive";
20
+ }
21
+ export interface QueryBuilderOpts {
22
+ where?: SQL;
23
+ orderBy?: SQL;
24
+ distinct?: boolean;
25
+ nullish?: boolean;
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eintrek/erp-theme",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "A shadcn/ui component library with Storybook",
@@ -11,15 +11,6 @@
11
11
  "files": [
12
12
  "dist"
13
13
  ],
14
- "scripts": {
15
- "build": "NODE_ENV=production rollup -c",
16
- "dev": "NODE_ENV=production rollup -c -w",
17
- "storybook": "storybook dev -p 6006",
18
- "build-storybook": "storybook build",
19
- "clean": "rimraf dist",
20
- "prepare": "npm run clean && npm run build",
21
- "pack": "NODE_ENV=production pnpm build && pnpm pack"
22
- },
23
14
  "keywords": [
24
15
  "react",
25
16
  "components",
@@ -34,6 +25,7 @@
34
25
  "react-dom": "^19.1.0"
35
26
  },
36
27
  "devDependencies": {
28
+ "@eslint/eslintrc": "^3.3.1",
37
29
  "@rollup/plugin-commonjs": "^28.0.5",
38
30
  "@rollup/plugin-node-resolve": "^16.0.1",
39
31
  "@rollup/plugin-typescript": "^12.1.2",
@@ -41,13 +33,21 @@
41
33
  "@storybook/addon-links": "^9.0.9",
42
34
  "@storybook/addon-onboarding": "^9.0.9",
43
35
  "@storybook/nextjs": "^9.0.9",
36
+ "@storybook/nextjs-vite": "^9.0.12",
37
+ "@tailwindcss/postcss": "^4.1.10",
38
+ "@types/node": "^24.0.3",
44
39
  "@types/react": "^19.0.0",
45
40
  "@types/react-date-range": "^1.4.10",
46
41
  "@types/react-dom": "^19.0.0",
47
42
  "autoprefixer": "^10.4.16",
43
+ "eslint": "^9.29.0",
44
+ "eslint-config-next": "^15.3.4",
45
+ "eslint-plugin-storybook": "^9.0.12",
48
46
  "postcss": "^8.4.32",
49
47
  "postcss-import": "^16.1.0",
50
48
  "postcss-prefix-selector": "^1.15.0",
49
+ "prettier-plugin-organize-imports": "^4.1.0",
50
+ "prettier-plugin-tailwindcss": "^0.6.13",
51
51
  "react": "^19.1.0",
52
52
  "react-dom": "^19.1.0",
53
53
  "rimraf": "^5.0.5",
@@ -56,51 +56,65 @@
56
56
  "rollup-plugin-postcss": "^4.0.2",
57
57
  "rollup-plugin-typescript2": "^0.36.0",
58
58
  "storybook": "^9.0.9",
59
- "tailwindcss": "^3.4.0",
59
+ "tailwindcss": "^4.0.0",
60
60
  "typescript": "^5.3.3"
61
61
  },
62
62
  "dependencies": {
63
+ "@dnd-kit/core": "^6.3.1",
64
+ "@dnd-kit/modifiers": "^9.0.0",
65
+ "@dnd-kit/sortable": "^10.0.0",
66
+ "@dnd-kit/utilities": "^3.2.2",
67
+ "@faker-js/faker": "^9.8.0",
63
68
  "@hookform/resolvers": "^5.1.1",
64
- "@radix-ui/react-accordion": "^1.1.2",
65
- "@radix-ui/react-alert-dialog": "^1.0.5",
66
- "@radix-ui/react-aspect-ratio": "^1.0.3",
67
- "@radix-ui/react-avatar": "^1.0.4",
68
- "@radix-ui/react-checkbox": "^1.0.4",
69
- "@radix-ui/react-collapsible": "^1.0.3",
70
- "@radix-ui/react-context-menu": "^2.1.5",
71
- "@radix-ui/react-dialog": "^1.0.5",
72
- "@radix-ui/react-dropdown-menu": "^2.0.6",
73
- "@radix-ui/react-hover-card": "^1.0.7",
74
69
  "@radix-ui/react-label": "^2.1.7",
75
- "@radix-ui/react-menubar": "^1.0.4",
76
- "@radix-ui/react-navigation-menu": "^1.1.4",
77
- "@radix-ui/react-popover": "^1.0.7",
78
- "@radix-ui/react-progress": "^1.0.3",
79
- "@radix-ui/react-radio-group": "^1.1.3",
80
- "@radix-ui/react-scroll-area": "^1.0.5",
81
- "@radix-ui/react-select": "^2.0.0",
82
- "@radix-ui/react-separator": "^1.0.3",
83
- "@radix-ui/react-slider": "^1.1.2",
70
+ "@radix-ui/react-select": "^2.2.5",
84
71
  "@radix-ui/react-slot": "^1.2.3",
85
- "@radix-ui/react-switch": "^1.0.3",
86
- "@radix-ui/react-tabs": "^1.0.4",
87
- "@radix-ui/react-toast": "^1.1.5",
88
- "@radix-ui/react-toggle": "^1.0.3",
89
- "@radix-ui/react-toggle-group": "^1.0.4",
90
- "@radix-ui/react-tooltip": "^1.0.7",
91
72
  "@tanstack/react-table": "^8.21.3",
92
73
  "class-variance-authority": "^0.7.1",
93
74
  "clsx": "^2.1.1",
75
+ "cmdk": "^1.1.1",
94
76
  "date-fns": "^4.1.0",
77
+ "drizzle-orm": "^0.44.2",
78
+ "embla-carousel-react": "^8.6.0",
79
+ "geist": "^1.4.2",
80
+ "input-otp": "^1.4.2",
95
81
  "lucide-react": "^0.516.0",
96
- "react-date-range": "^2.0.1",
82
+ "motion": "^12.19.1",
83
+ "nanoid": "^5.1.5",
84
+ "next": "^15.0.0",
85
+ "next-themes": "^0.4.6",
86
+ "nuqs": "^2.4.3",
87
+ "prettier": "^3.5.3",
88
+ "radix-ui": "^1.4.2",
89
+ "react": "^19.1.0",
90
+ "react-day-picker": "^9.7.0",
91
+ "react-dom": "^19.1.0",
97
92
  "react-hook-form": "^7.58.1",
98
- "react-tailwindcss-datepicker": "^2.0.0",
93
+ "react-resizable-panels": "^3.0.3",
94
+ "recharts": "^2.15.3",
95
+ "server-only": "^0.0.1",
96
+ "shadcn": "^2.7.0",
97
+ "sonner": "^2.0.5",
99
98
  "tailwind-merge": "^2.6.0",
100
99
  "tailwindcss-animate": "^1.0.7",
101
- "zod": "^3.25.64"
100
+ "tw-animate-css": "^1.3.4",
101
+ "vaul": "^1.1.2",
102
+ "zod": "^3.25.67"
102
103
  },
103
104
  "publishConfig": {
104
105
  "registry": "https://registry.npmjs.org/"
106
+ },
107
+ "eslintConfig": {
108
+ "extends": [
109
+ "plugin:storybook/recommended"
110
+ ]
111
+ },
112
+ "scripts": {
113
+ "build": "NODE_ENV=production rollup -c",
114
+ "dev": "NODE_ENV=production rollup -c -w",
115
+ "storybook": "storybook dev -p 6006",
116
+ "build-storybook": "storybook build",
117
+ "clean": "rimraf dist",
118
+ "pack": "NODE_ENV=production pnpm build && pnpm pack"
105
119
  }
106
- }
120
+ }
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- export interface FormField {
3
- name: string;
4
- label: string;
5
- type: string;
6
- placeholder: string;
7
- required: boolean;
8
- component?: 'input' | 'dropdown';
9
- options?: {
10
- label: string;
11
- value: string;
12
- }[];
13
- }
14
- export interface FormProps {
15
- onSubmit: (data: any) => void;
16
- children: (props: {
17
- control: any;
18
- errors: any;
19
- handleSubmit: any;
20
- }) => React.ReactNode;
21
- defaultValues?: Record<string, any>;
22
- formRef?: React.Ref<HTMLFormElement>;
23
- }
24
- declare const Form: React.FC<FormProps>;
25
- export default Form;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Form from './Form';
3
- declare const meta: Meta<typeof Form>;
4
- export default meta;
5
- type Story = StoryObj<typeof Form>;
6
- export declare const Basic: Story;
7
- export declare const WithValidation: Story;
8
- export declare const WithDefaultValues: Story;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- export interface InputProps {
3
- label: string;
4
- type?: string;
5
- value?: string;
6
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
- placeholder?: string;
8
- required?: boolean;
9
- error?: string;
10
- name?: string;
11
- icon?: string;
12
- suffix?: string;
13
- disabled?: boolean;
14
- inputClassName?: string;
15
- }
16
- declare const Input: React.FC<InputProps>;
17
- export default Input;
@@ -1,10 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Input from './Input';
3
- declare const meta: Meta<typeof Input>;
4
- export default meta;
5
- type Story = StoryObj<typeof Input>;
6
- export declare const Basic: Story;
7
- export declare const Disabled: Story;
8
- export declare const WithIcon: Story;
9
- export declare const SuffixText: Story;
10
- export declare const SuffixIcon: Story;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- export interface InputDropdownOption {
3
- label: string;
4
- value: string;
5
- }
6
- export interface InputDropdownProps {
7
- label: string;
8
- options: InputDropdownOption[];
9
- value?: string;
10
- onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
11
- placeholder?: string;
12
- required?: boolean;
13
- error?: string;
14
- name?: string;
15
- disabled?: boolean;
16
- inputClassName?: string;
17
- }
18
- declare const InputDropdown: React.FC<InputDropdownProps>;
19
- export default InputDropdown;
@@ -1,9 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import InputDropdown from './InputDropdown';
3
- declare const meta: Meta<typeof InputDropdown>;
4
- export default meta;
5
- type Story = StoryObj<typeof InputDropdown>;
6
- export declare const Basic: Story;
7
- export declare const Disabled: Story;
8
- export declare const CustomBackground: Story;
9
- export declare const InputClassNameStringExample: Story;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export interface LabelProps {
3
- label: string;
4
- required?: boolean;
5
- className?: string;
6
- }
7
- declare const Label: React.FC<LabelProps>;
8
- export default Label;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Label from './Label';
3
- declare const meta: Meta<typeof Label>;
4
- export default meta;
5
- type Story = StoryObj<typeof Label>;
6
- export declare const Basic: Story;
7
- export declare const Required: Story;
8
- export declare const CustomClass: Story;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export interface ModalProps {
3
- open: boolean;
4
- onClose: () => void;
5
- children: React.ReactNode;
6
- actions?: React.ReactNode;
7
- header?: React.ReactNode;
8
- footer?: React.ReactNode;
9
- size?: 'sm' | 'md' | 'lg' | 'full';
10
- }
11
- declare const Modal: React.FC<ModalProps>;
12
- export default Modal;
@@ -1,13 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Modal from './Modal';
3
- declare const meta: Meta<typeof Modal>;
4
- export default meta;
5
- type Story = StoryObj<typeof Modal>;
6
- export declare const Basic: Story;
7
- export declare const WithForm: Story;
8
- export declare const WithFormFooterSubmit: Story;
9
- export declare const WithHeaderAndFooter: Story;
10
- export declare const Sizes: Story;
11
- export declare const SuccessModal: Story;
12
- export declare const WarningModal: Story;
13
- export declare const InfoModal: Story;
@@ -1,6 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
3
- variant?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'destructive';
4
- }
5
- declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLDivElement>>;
6
- export { Badge };
@@ -1,7 +0,0 @@
1
- import { ButtonHTMLAttributes } from 'react';
2
- export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
- variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
4
- size?: 'default' | 'sm' | 'lg' | 'icon';
5
- }
6
- declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
7
- export { Button };
@@ -1,25 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Button } from './button';
3
- declare const meta: Meta<typeof Button>;
4
- export default meta;
5
- type Story = StoryObj<typeof Button>;
6
- export declare const Default: Story;
7
- export declare const Secondary: Story;
8
- export declare const Destructive: Story;
9
- export declare const Outline: Story;
10
- export declare const Ghost: Story;
11
- export declare const Link: Story;
12
- export declare const Small: Story;
13
- export declare const Large: Story;
14
- export declare const Blue: Story;
15
- export declare const Green: Story;
16
- export declare const Red: Story;
17
- export declare const Yellow: Story;
18
- export declare const Purple: Story;
19
- export declare const Pink: Story;
20
- export declare const Gray: Story;
21
- export declare const Basic: Story;
22
- export declare const Disabled: Story;
23
- export declare const WithPrefixIcon: Story;
24
- export declare const WithSuffixIcon: Story;
25
- export declare const WithBothIcons: Story;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Card } from './card';
3
- declare const meta: Meta<typeof Card>;
4
- export default meta;
5
- type Story = StoryObj<typeof Card>;
6
- export declare const Default: Story;
7
- export declare const WithImage: Story;
8
- export declare const Simple: Story;
@@ -1,5 +0,0 @@
1
- import { ColumnDef } from '@tanstack/react-table';
2
- import { TableProps } from './types';
3
- export declare function Table<T extends Record<string, any> = any>({ data, columns, className, height, enableRowSelection, enableMultiRowSelection, enableSorting, enableFiltering, enablePagination, enableDateFilter, dateColumn, onRowClick, onSelectionChange, onSortingChange, onFilteringChange, onDateFilterChange, headerLeftSection, headerRightSection, }: TableProps<T> & {
4
- columns: ColumnDef<T>[];
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Table } from './Table';
3
- declare const meta: Meta<typeof Table>;
4
- export default meta;
5
- type Story = StoryObj<typeof Table>;
6
- export declare const Basic: Story;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { TableBodyProps } from './types';
3
- export declare const TableBody: React.FC<TableBodyProps>;
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { TableBody } from './TableBody';
3
- declare const meta: Meta<typeof TableBody>;
4
- export default meta;
5
- type Story = StoryObj<typeof TableBody>;
6
- export declare const Default: Story;
7
- export declare const Basic: Story;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { TableFilterProps } from './types';
3
- export declare const TableFilter: React.FC<TableFilterProps>;