@eintrek/erp-theme 1.0.3 → 1.0.4

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 (78) hide show
  1. package/dist/components/ui/calendar.d.ts +23 -8
  2. package/dist/components/ui/carousel.d.ts +1 -1
  3. package/dist/components/ui/command.d.ts +1 -1
  4. package/dist/components/ui/faceted.d.ts +2 -2
  5. package/dist/components/ui/pagination.d.ts +1 -1
  6. package/dist/components/ui/sidebar.d.ts +4 -4
  7. package/dist/components/ui/tabs.d.ts +1 -1
  8. package/dist/components/ui/toggle-group.d.ts +1 -1
  9. package/dist/index.css +1 -1
  10. package/dist/index.d.ts +16 -19
  11. package/dist/index.esm.css +1 -1
  12. package/dist/index.esm.js +17658 -41957
  13. package/dist/index.esm.js.map +1 -1
  14. package/dist/index.js +17681 -41971
  15. package/dist/index.js.map +1 -1
  16. package/package.json +36 -23
  17. package/scripts/enforce-pnpm.js +18 -0
  18. package/dist/components/data-table/data-table-action-bar.d.ts +0 -20
  19. package/dist/components/data-table/data-table-advanced-toolbar.d.ts +0 -7
  20. package/dist/components/data-table/data-table-column-header.d.ts +0 -8
  21. package/dist/components/data-table/data-table-date-filter.d.ts +0 -8
  22. package/dist/components/data-table/data-table-faceted-filter.d.ts +0 -10
  23. package/dist/components/data-table/data-table-filter-list.d.ts +0 -11
  24. package/dist/components/data-table/data-table-filter-menu.d.ts +0 -11
  25. package/dist/components/data-table/data-table-pagination.d.ts +0 -7
  26. package/dist/components/data-table/data-table-range-filter.d.ts +0 -11
  27. package/dist/components/data-table/data-table-skeleton.d.ts +0 -11
  28. package/dist/components/data-table/data-table-slider-filter.d.ts +0 -7
  29. package/dist/components/data-table/data-table-sort-list.d.ts +0 -8
  30. package/dist/components/data-table/data-table-toolbar.d.ts +0 -7
  31. package/dist/components/data-table/data-table-view-options.d.ts +0 -6
  32. package/dist/components/data-table/data-table.d.ts +0 -8
  33. package/dist/config/data-table.d.ts +0 -124
  34. package/dist/hooks/use-data-table.d.ts +0 -23
  35. package/dist/lib/data-table.d.ts +0 -12
  36. package/dist/lib/filter-columns.d.ts +0 -8
  37. package/dist/lib/parsers.d.ts +0 -25
  38. package/dist/registry/alert.stories.d.ts +0 -34
  39. package/dist/registry/aspect-ratio.stories.d.ts +0 -24
  40. package/dist/registry/badge.stories.d.ts +0 -42
  41. package/dist/registry/breadcrumb.stories.d.ts +0 -26
  42. package/dist/registry/button.stories.d.ts +0 -82
  43. package/dist/registry/calendar.stories.d.ts +0 -43
  44. package/dist/registry/card.stories.d.ts +0 -24
  45. package/dist/registry/carousel.stories.d.ts +0 -17
  46. package/dist/registry/chart.stories.d.ts +0 -32
  47. package/dist/registry/checkbox.stories.d.ts +0 -17
  48. package/dist/registry/command.stories.d.ts +0 -41
  49. package/dist/registry/data-table.stories.d.ts +0 -59
  50. package/dist/registry/date-picker.stories.d.ts +0 -32
  51. package/dist/registry/drawer.stories.d.ts +0 -27
  52. package/dist/registry/form.stories.d.ts +0 -14
  53. package/dist/registry/input-otp.stories.d.ts +0 -41
  54. package/dist/registry/input.stories.d.ts +0 -47
  55. package/dist/registry/label.stories.d.ts +0 -27
  56. package/dist/registry/pagination.stories.d.ts +0 -91
  57. package/dist/registry/progress.stories.d.ts +0 -31
  58. package/dist/registry/resizable.stories.d.ts +0 -12
  59. package/dist/registry/scroll-area.stories.d.ts +0 -41
  60. package/dist/registry/select.stories.d.ts +0 -13
  61. package/dist/registry/separator.stories.d.ts +0 -21
  62. package/dist/registry/sheet.stories.d.ts +0 -16
  63. package/dist/registry/sidebar.stories.d.ts +0 -336
  64. package/dist/registry/skeleton.stories.d.ts +0 -20
  65. package/dist/registry/slider.stories.d.ts +0 -30
  66. package/dist/registry/sonner.stories.d.ts +0 -14
  67. package/dist/registry/table.stories.d.ts +0 -104
  68. package/dist/registry/textarea.stories.d.ts +0 -40
  69. package/dist/registry/toggle.stories.d.ts +0 -35
  70. package/dist/registry/tokens/color.stories.d.ts +0 -23
  71. package/dist/registry/tokens/radius.stories.d.ts +0 -17
  72. package/dist/registry/tokens/typography.stories.d.ts +0 -28
  73. package/dist/registry/tooltip.stories.d.ts +0 -26
  74. package/dist/types/data-table.d.ts +0 -33
  75. package/dist/types/doc.d.ts +0 -195
  76. /package/dist/components/ui/{form.d.ts → Form.d.ts} +0 -0
  77. /package/dist/components/ui/{input.d.ts → Input.d.ts} +0 -0
  78. /package/dist/components/ui/{label.d.ts → Label.d.ts} +0 -0
@@ -1,35 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
- import { Toggle } from "@/components/ui/toggle";
3
- /**
4
- * A two-state button that can be either on or off.
5
- */
6
- declare const meta: Meta<typeof Toggle>;
7
- export default meta;
8
- type Story = StoryObj<typeof Toggle>;
9
- /**
10
- * The default form of the toggle.
11
- */
12
- export declare const Default: Story;
13
- /**
14
- * Use the `outline` variant for a distinct outline, emphasizing the boundary
15
- * of the selection circle for clearer visibility
16
- */
17
- export declare const Outline: Story;
18
- /**
19
- * Use the text element to add a label to the toggle.
20
- */
21
- export declare const WithText: Story;
22
- /**
23
- * Use the `sm` size for a smaller toggle, suitable for interfaces needing
24
- * compact elements without sacrificing usability.
25
- */
26
- export declare const Small: Story;
27
- /**
28
- * Use the `lg` size for a larger toggle, offering better visibility and
29
- * easier interaction for users.
30
- */
31
- export declare const Large: Story;
32
- /**
33
- * Add the `disabled` prop to prevent interactions with the toggle.
34
- */
35
- export declare const Disabled: Story;
@@ -1,23 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
- type Swatch = {
3
- name: string;
4
- colors: Record<string, string>;
5
- };
6
- /**
7
- * Color tokens for the design system
8
- */
9
- declare const meta: Meta<{
10
- swatch: Swatch[];
11
- }>;
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
- /**
15
- * Functional color tokens are used to define the core colors of the design system.
16
- * These colors are used throughout the application for backgrounds, text, borders, etc.
17
- */
18
- export declare const Functional: Story;
19
- /**
20
- * Component color tokens are used to define the colors of specific components in the design system.
21
- * These colors are used to style components like buttons, inputs, and alerts.
22
- */
23
- export declare const Component: Story;
@@ -1,17 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/nextjs-vite";
2
- type Radius = {
3
- name: string;
4
- value: string;
5
- };
6
- /**
7
- * Radius tokens for the design system
8
- */
9
- declare const meta: Meta<{
10
- radius: Radius[];
11
- }>;
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
- /**
15
- * The default radius tokens for the design system.
16
- */
17
- export declare const Core: Story;
@@ -1,28 +0,0 @@
1
- import { CSSProperties } from "react";
2
- import type { Meta, StoryObj } from "@storybook/nextjs-vite";
3
- type Typography = {
4
- name: string;
5
- value: string;
6
- };
7
- /**
8
- * Typography tokens for the design system
9
- */
10
- declare const meta: Meta<{
11
- children: string;
12
- cssKey: keyof CSSProperties;
13
- properties: Typography[];
14
- }>;
15
- export default meta;
16
- type Story = StoryObj<typeof meta>;
17
- /**
18
- * Font family tokens for the design system.
19
- */
20
- export declare const FontFamily: Story;
21
- /**
22
- * Font size tokens for the design system.
23
- */
24
- export declare const FontSize: Story;
25
- /**
26
- * Font weight tokens for the design system.
27
- */
28
- export declare const FontWeight: Story;
@@ -1,26 +0,0 @@
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;
@@ -1,33 +0,0 @@
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
- }
@@ -1,195 +0,0 @@
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
- }
File without changes
File without changes
File without changes