@dynamic-labs-sdk/droplet 1.49.0 → 1.50.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 (57) hide show
  1. package/dist/components/empty-state/empty-state.d.ts +3 -3
  2. package/dist/components/empty-state/empty-state.d.ts.map +1 -1
  3. package/dist/components/status-badge/status-badge.d.ts.map +1 -1
  4. package/dist/components/tab-navigation/tab-navigation.d.ts.map +1 -1
  5. package/dist/components/ui/data-table/create-column-helper.d.ts +20 -0
  6. package/dist/components/ui/data-table/create-column-helper.d.ts.map +1 -0
  7. package/dist/components/ui/data-table/data-table-active-filters.d.ts +37 -0
  8. package/dist/components/ui/data-table/data-table-active-filters.d.ts.map +1 -0
  9. package/dist/components/ui/data-table/data-table-column-filter.d.ts +48 -0
  10. package/dist/components/ui/data-table/data-table-column-filter.d.ts.map +1 -0
  11. package/dist/components/ui/data-table/data-table-column-visibility.d.ts +37 -0
  12. package/dist/components/ui/data-table/data-table-column-visibility.d.ts.map +1 -0
  13. package/dist/components/ui/data-table/data-table-content.d.ts +43 -0
  14. package/dist/components/ui/data-table/data-table-content.d.ts.map +1 -0
  15. package/dist/components/ui/data-table/data-table-context.d.ts +13 -0
  16. package/dist/components/ui/data-table/data-table-context.d.ts.map +1 -0
  17. package/dist/components/ui/data-table/data-table-pagination.d.ts +38 -0
  18. package/dist/components/ui/data-table/data-table-pagination.d.ts.map +1 -0
  19. package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts +21 -0
  20. package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts.map +1 -0
  21. package/dist/components/ui/data-table/data-table-rows.d.ts +22 -0
  22. package/dist/components/ui/data-table/data-table-rows.d.ts.map +1 -0
  23. package/dist/components/ui/data-table/data-table-search.d.ts +40 -0
  24. package/dist/components/ui/data-table/data-table-search.d.ts.map +1 -0
  25. package/dist/components/ui/data-table/data-table.d.ts +56 -0
  26. package/dist/components/ui/data-table/data-table.d.ts.map +1 -0
  27. package/dist/components/ui/data-table/data-table.stories.d.ts +32 -0
  28. package/dist/components/ui/data-table/data-table.stories.d.ts.map +1 -0
  29. package/dist/components/ui/data-table/data-table.types.d.ts +189 -0
  30. package/dist/components/ui/data-table/data-table.types.d.ts.map +1 -0
  31. package/dist/components/ui/data-table/expand-chevron.d.ts +7 -0
  32. package/dist/components/ui/data-table/expand-chevron.d.ts.map +1 -0
  33. package/dist/components/ui/data-table/get-column-label.d.ts +7 -0
  34. package/dist/components/ui/data-table/get-column-label.d.ts.map +1 -0
  35. package/dist/components/ui/data-table/get-pinned-cell-props.d.ts +15 -0
  36. package/dist/components/ui/data-table/get-pinned-cell-props.d.ts.map +1 -0
  37. package/dist/components/ui/data-table/selection-column.d.ts +24 -0
  38. package/dist/components/ui/data-table/selection-column.d.ts.map +1 -0
  39. package/dist/components/ui/data-table/use-data-table.d.ts +157 -0
  40. package/dist/components/ui/data-table/use-data-table.d.ts.map +1 -0
  41. package/dist/components/ui/pagination/pagination.d.ts +2 -2
  42. package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
  43. package/dist/components/ui/table/table.d.ts +7 -3
  44. package/dist/components/ui/table/table.d.ts.map +1 -1
  45. package/dist/components/ui/table/table.stories.d.ts +3 -1
  46. package/dist/components/ui/table/table.stories.d.ts.map +1 -1
  47. package/dist/components/ui/tabs/tabs.d.ts +3 -1
  48. package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
  49. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  50. package/dist/index.cjs +1434 -99
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.ts +19 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.esm.js +1426 -103
  55. package/dist/index.esm.js.map +1 -1
  56. package/package.json +3 -1
  57. package/src/styles/globals.css +44 -1
@@ -0,0 +1,189 @@
1
+ import type { RowData, CellContext as TanStackCellContext, ColumnDef as TanStackColumnDef, ColumnFiltersState as TanStackColumnFiltersState, ColumnPinningState as TanStackColumnPinningState, ColumnSizingState as TanStackColumnSizingState, GroupingState as TanStackGroupingState, PaginationState as TanStackPaginationState, Row as TanStackRow, RowSelectionState as TanStackRowSelectionState, SortingState as TanStackSortingState, VisibilityState as TanStackVisibilityState } from '@tanstack/react-table';
2
+ declare module '@tanstack/react-table' {
3
+ /**
4
+ * The column `meta` options data table reads: `filter`, `filterOptions` and `label`.
5
+ * This augmentation merges globally into `@tanstack/react-table`'s `ColumnMeta`, so every TanStack table in an app that
6
+ * imports this package sees these keys too.
7
+ */
8
+ interface ColumnMeta<TData extends RowData, TValue> {
9
+ /** Column filter shown in the header: free text, or a checklist of values. */
10
+ filter?: 'text' | 'values';
11
+ /** Values for a `values` filter when the server filters; defaults to the values in the data. */
12
+ filterOptions?: string[];
13
+ /** Readable name for menus and labels when `header` is not plain text. */
14
+ label?: string;
15
+ }
16
+ }
17
+ /**
18
+ * Describes one column of a data table: how to read its value from a row, its header, how its cells render, and options such as `size` or `enableSorting`.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const columns: ColumnDef<User>[] = [
23
+ * { accessorKey: 'name', header: 'Name' },
24
+ * { accessorKey: 'email', header: 'Email', size: 240 },
25
+ * ];
26
+ * ```
27
+ * @see useDataTable
28
+ * @see createColumnHelper
29
+ * @see selectionColumn
30
+ */
31
+ type ColumnDef<TData extends RowData, TValue = unknown> = TanStackColumnDef<TData, TValue>;
32
+ /**
33
+ * What a column's `cell` and `header` renderers receive: the row, the column and the cell's current value.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * const renderEmail = ({ getValue }: CellContext<User, string>) => (
38
+ * <a href={`mailto:${getValue()}`}>{getValue()}</a>
39
+ * );
40
+ * ```
41
+ * @see ColumnDef
42
+ * @see Row
43
+ */
44
+ type CellContext<TData extends RowData, TValue> = TanStackCellContext<TData, TValue>;
45
+ /**
46
+ * One row of a data table. Gives access to the row's original data, its cells, and its selection state.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * const getUserId = (row: Row<User>) => row.original.id;
51
+ * ```
52
+ * @see ColumnDef
53
+ * @see RowSelectionState
54
+ */
55
+ type Row<TData extends RowData> = TanStackRow<TData>;
56
+ /**
57
+ * The sort order of a table: a list of `{ id, desc }` rules, where `id` is a column id.
58
+ *
59
+ * @example
60
+ * ```tsx
61
+ * const sorting: SortingState = [{ id: 'createdAt', desc: true }];
62
+ * ```
63
+ * @see useDataTable
64
+ * @see PaginationState
65
+ */
66
+ type SortingState = TanStackSortingState;
67
+ /**
68
+ * The current page of a table: the zero-based `pageIndex` and the number of rows per page, `pageSize`.
69
+ *
70
+ * @example
71
+ * ```tsx
72
+ * const pagination: PaginationState = { pageIndex: 0, pageSize: 25 };
73
+ * ```
74
+ * @see useDataTable
75
+ * @see DataTablePagination
76
+ */
77
+ type PaginationState = TanStackPaginationState;
78
+ /**
79
+ * The selected rows of a table, keyed by row id. A row is selected when its id maps to `true`.
80
+ *
81
+ * @example
82
+ * ```tsx
83
+ * const selection: RowSelectionState = { 'user_1': true, 'user_7': true };
84
+ * ```
85
+ * @see useDataTable
86
+ * @see selectionColumn
87
+ */
88
+ type RowSelectionState = TanStackRowSelectionState;
89
+ /**
90
+ * Which columns are shown, keyed by column id. A column is hidden when its id maps to `false`.
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * const visibility: VisibilityState = { email: false };
95
+ * ```
96
+ * @see useDataTable
97
+ * @see DataTableColumnVisibility
98
+ */
99
+ type VisibilityState = TanStackVisibilityState;
100
+ /**
101
+ * The columns pinned to each edge of a table: `left` pins to the start edge and `right` to the end edge. Lists hold column ids.
102
+ * `useDataTable` pins to one edge only; see `DataTableColumnPinningState`.
103
+ *
104
+ * @example
105
+ * ```tsx
106
+ * const pinning: ColumnPinningState = { left: ['select', 'name'] };
107
+ * ```
108
+ * @see DataTableColumnPinningState
109
+ * @see useDataTable
110
+ * @see ColumnSizingState
111
+ */
112
+ type ColumnPinningState = TanStackColumnPinningState;
113
+ /**
114
+ * The columns pinned to one edge of a data table, as a list of column ids. A table pins to the start edge or the end edge, never both:
115
+ * `left` pins to the start edge and `right` to the end edge (the edges swap in right-to-left layouts).
116
+ *
117
+ * @example
118
+ * ```tsx
119
+ * const pinning: DataTableColumnPinningState = { left: ['select', 'name'] };
120
+ *
121
+ * const dataTable = useDataTable({ columnPinning: { initial: pinning }, columns, data });
122
+ * ```
123
+ * @see useDataTable
124
+ * @see ColumnPinningState
125
+ */
126
+ type DataTableColumnPinningState = {
127
+ left: string[];
128
+ right?: never;
129
+ } | {
130
+ left?: never;
131
+ right: string[];
132
+ };
133
+ /**
134
+ * Column widths in pixels, keyed by column id.
135
+ *
136
+ * @example
137
+ * ```tsx
138
+ * const sizing: ColumnSizingState = { name: 280, email: 220 };
139
+ * ```
140
+ * @see useDataTable
141
+ * @see ColumnPinningState
142
+ */
143
+ type ColumnSizingState = TanStackColumnSizingState;
144
+ /**
145
+ * The active column filters of a table: a list of `{ id, value }` entries, where `id` is a column id.
146
+ * A `text` filter holds a string and a `values` filter holds the list of checked values.
147
+ *
148
+ * @example
149
+ * ```tsx
150
+ * const columnFilters: ColumnFiltersState = [
151
+ * { id: 'role', value: ['Admin'] },
152
+ * { id: 'name', value: 'ali' },
153
+ * ];
154
+ * ```
155
+ * @see DataTableFilterState
156
+ * @see useDataTable
157
+ */
158
+ type ColumnFiltersState = TanStackColumnFiltersState;
159
+ /**
160
+ * The filters of a table: the column filters and the search text that matches across columns.
161
+ * With manual filtering, the app receives this state and filters the data itself, usually on the server.
162
+ *
163
+ * @example
164
+ * ```tsx
165
+ * const filters: DataTableFilterState = {
166
+ * columnFilters: [{ id: 'role', value: ['Admin'] }],
167
+ * globalFilter: 'ali',
168
+ * };
169
+ * ```
170
+ * @see ColumnFiltersState
171
+ * @see useDataTable
172
+ */
173
+ type DataTableFilterState = {
174
+ columnFilters: ColumnFiltersState;
175
+ globalFilter: string;
176
+ };
177
+ /**
178
+ * The column ids a table groups its rows by, outermost group first.
179
+ *
180
+ * @example
181
+ * ```tsx
182
+ * const grouping: GroupingState = ['status'];
183
+ * ```
184
+ * @see useDataTable
185
+ * @see SortingState
186
+ */
187
+ type GroupingState = TanStackGroupingState;
188
+ export type { CellContext, ColumnDef, ColumnFiltersState, ColumnPinningState, ColumnSizingState, DataTableColumnPinningState, DataTableFilterState, GroupingState, PaginationState, Row, RowSelectionState, SortingState, VisibilityState, };
189
+ //# sourceMappingURL=data-table.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/data-table.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,WAAW,IAAI,mBAAmB,EAClC,SAAS,IAAI,iBAAiB,EAC9B,kBAAkB,IAAI,0BAA0B,EAChD,kBAAkB,IAAI,0BAA0B,EAChD,iBAAiB,IAAI,yBAAyB,EAC9C,aAAa,IAAI,qBAAqB,EACtC,eAAe,IAAI,uBAAuB,EAC1C,GAAG,IAAI,WAAW,EAClB,iBAAiB,IAAI,yBAAyB,EAC9C,YAAY,IAAI,oBAAoB,EACpC,eAAe,IAAI,uBAAuB,EAC3C,MAAM,uBAAuB,CAAC;AAE/B,OAAO,QAAQ,uBAAuB,CAAC;IACrC;;;;OAIG;IAGH,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD,8EAA8E;QAC9E,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;QAC3B,gGAAgG;QAChG,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,0EAA0E;QAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;CACF;AAED;;;;;;;;;;;;;GAaG;AACH,KAAK,SAAS,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,iBAAiB,CACzE,KAAK,EACL,MAAM,CACP,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,KAAK,WAAW,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM,IAAI,mBAAmB,CACnE,KAAK,EACL,MAAM,CACP,CAAC;AAEF;;;;;;;;;GASG;AACH,KAAK,GAAG,CAAC,KAAK,SAAS,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;AAErD;;;;;;;;;GASG;AACH,KAAK,YAAY,GAAG,oBAAoB,CAAC;AAEzC;;;;;;;;;GASG;AACH,KAAK,eAAe,GAAG,uBAAuB,CAAC;AAE/C;;;;;;;;;GASG;AACH,KAAK,iBAAiB,GAAG,yBAAyB,CAAC;AAEnD;;;;;;;;;GASG;AACH,KAAK,eAAe,GAAG,uBAAuB,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,KAAK,kBAAkB,GAAG,0BAA0B,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,KAAK,2BAA2B,GAC5B;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACjC;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEtC;;;;;;;;;GASG;AACH,KAAK,iBAAiB,GAAG,yBAAyB,CAAC;AAEnD;;;;;;;;;;;;;GAaG;AACH,KAAK,kBAAkB,GAAG,0BAA0B,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,KAAK,oBAAoB,GAAG;IAC1B,aAAa,EAAE,kBAAkB,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;;;;GASG;AACH,KAAK,aAAa,GAAG,qBAAqB,CAAC;AAE3C,YAAY,EACV,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,2BAA2B,EAC3B,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,GAAG,EACH,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type ReactElement } from 'react';
2
+ /** A right-pointing chevron that turns to point down while its group is open. */
3
+ declare const ExpandChevron: ({ isOpen }: {
4
+ isOpen: boolean;
5
+ }) => ReactElement;
6
+ export { ExpandChevron };
7
+ //# sourceMappingURL=expand-chevron.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expand-chevron.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/expand-chevron.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,iFAAiF;AACjF,QAAA,MAAM,aAAa,eAAgB;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,KAAG,YASxD,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Column } from '@tanstack/react-table';
2
+ /**
3
+ * Read a column the way users see it, so menus and handles name it: its `meta.label`, then a plain-text header, then its id.
4
+ */
5
+ declare const getColumnLabel: <TData>(column: Column<TData, unknown>) => string;
6
+ export { getColumnLabel };
7
+ //# sourceMappingURL=get-column-label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-column-label.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/get-column-label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;GAEG;AACH,QAAA,MAAM,cAAc,GAAI,KAAK,UAAU,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,KAAG,MAK/D,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { Column } from '@tanstack/react-table';
2
+ import type { CSSProperties } from 'react';
3
+ type PinnedCellProps = {
4
+ className?: string;
5
+ 'data-pinned'?: 'left' | 'right';
6
+ style?: CSSProperties;
7
+ };
8
+ /** Sticky position, background and edge divider for a cell in a pinned column. */
9
+ declare const getPinnedCellProps: <TData>({ column, section, }: {
10
+ column: Column<TData, unknown>;
11
+ section: "body" | "header";
12
+ }) => PinnedCellProps;
13
+ export { getPinnedCellProps };
14
+ export type { PinnedCellProps };
15
+ //# sourceMappingURL=get-pinned-cell-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pinned-cell-props.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/get-pinned-cell-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAcF,kFAAkF;AAClF,QAAA,MAAM,kBAAkB,GAAI,KAAK,wBAG9B;IACD,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC5B,KAAG,eAqBH,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { ColumnDef } from '@tanstack/react-table';
2
+ /**
3
+ * Id of the checkbox column added by `selectionColumn`. Use it to find that column, for example when pinning it to the start edge.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * const columnPinning = { initial: { left: [SELECTION_COLUMN_ID] } };
8
+ * ```
9
+ * @see selectionColumn
10
+ * @see useDataTable
11
+ */
12
+ declare const SELECTION_COLUMN_ID = "select";
13
+ /**
14
+ * A checkbox column for row selection. Put it first in `columns` and pass `selection` to `useDataTable`.
15
+ *
16
+ * @example
17
+ * const columns = [selectionColumn<User>(), { accessorKey: 'name', header: 'Name' }];
18
+ * @returns A column definition that renders a checkbox for each row and a select-all checkbox in the header.
19
+ * @see SELECTION_COLUMN_ID
20
+ * @see useDataTable
21
+ */
22
+ declare const selectionColumn: <TData>() => ColumnDef<TData>;
23
+ export { SELECTION_COLUMN_ID, selectionColumn };
24
+ //# sourceMappingURL=selection-column.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-column.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/selection-column.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,SAAS,EAAwB,MAAM,uBAAuB,CAAC;AAK1F;;;;;;;;;GASG;AACH,QAAA,MAAM,mBAAmB,WAAW,CAAC;AA8BrC;;;;;;;;GAQG;AACH,QAAA,MAAM,eAAe,GAAI,KAAK,OAAM,SAAS,CAAC,KAAK,CAQjD,CAAC;AAEH,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,157 @@
1
+ import { type ColumnDef, type ColumnSizingState, type GroupingState, type PaginationState, type RowSelectionState, type SortingState, type Table, type VisibilityState } from '@tanstack/react-table';
2
+ import type { DataTableColumnPinningState, DataTableFilterState } from './data-table.types';
3
+ /** A feature whose state the app owns, for example when the server sorts or pages. `onChange` receives the next state. */
4
+ type ControlledState<TState> = {
5
+ onChange: (next: TState) => void;
6
+ state: TState;
7
+ };
8
+ /** A feature whose state the table owns, optionally seeded. */
9
+ type UncontrolledState<TState> = {
10
+ initial?: TState;
11
+ };
12
+ type FeatureState<TState> = ControlledState<TState> | UncontrolledState<TState>;
13
+ type DataTableSortingOptions = {
14
+ initial?: SortingState;
15
+ mode: 'client';
16
+ } | ({
17
+ mode: 'manual';
18
+ } & ControlledState<SortingState>);
19
+ /** `client` filters the data in memory; `manual` lets the app filter, usually on the server. */
20
+ type DataTableFilteringOptions = {
21
+ initial?: Partial<DataTableFilterState>;
22
+ mode: 'client';
23
+ } | ({
24
+ mode: 'manual';
25
+ } & ControlledState<DataTableFilterState>);
26
+ /**
27
+ * Turns on row virtualization in `DataTableContent`: only the rows in view are rendered, for long client-side lists.
28
+ * `estimateRowHeight` is the expected row height in pixels before rows are measured; `overscan` is how many rows to render beyond the edges of the view.
29
+ * The table needs a bounded height to scroll within: pass `fill` to `DataTable` inside a bounded parent, or a max height through `scrollAreaProps` on `DataTableContent`.
30
+ * Without one, every row is in view and every row renders.
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * const virtualization: DataTableVirtualization = { estimateRowHeight: 41, overscan: 8 };
35
+ *
36
+ * const dataTable = useDataTable({ columns, data, virtualization });
37
+ * ```
38
+ * @see useDataTable
39
+ * @see DataTableContent
40
+ */
41
+ type DataTableVirtualization = {
42
+ estimateRowHeight: number;
43
+ overscan?: number;
44
+ };
45
+ type DataTablePaginationOptions = {
46
+ mode: 'client';
47
+ pageSize: number;
48
+ } | ({
49
+ mode: 'manual';
50
+ rowCount: number;
51
+ } & ControlledState<PaginationState>);
52
+ /**
53
+ * Options for {@link useDataTable}: the rows and columns to show, plus one option per feature to turn on (sorting, filtering, pagination, selection, grouping, column visibility, pinning, sizing and virtualization).
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * const options: UseDataTableOptions<User> = {
58
+ * columns,
59
+ * data: users,
60
+ * getRowId: (user) => user.id,
61
+ * selection: { initial: {} },
62
+ * sorting: { mode: 'client' },
63
+ * };
64
+ * ```
65
+ * @see useDataTable
66
+ * @see DataTableInstance
67
+ */
68
+ type UseDataTableOptions<TData> = {
69
+ /**
70
+ * Pin columns to one edge: `left` pins to the start, `right` to the end. Turns pinning on.
71
+ * A table pins to one edge only: pinning a column to the other edge unpins the columns on the first.
72
+ * Pinning switches the table to fixed column widths, so give columns a `size`.
73
+ */
74
+ columnPinning?: FeatureState<DataTableColumnPinningState>;
75
+ /** Column widths. Turns resizing on. */
76
+ columnSizing?: FeatureState<ColumnSizingState>;
77
+ /** Which columns are shown. Columns can always be hidden; this seeds or controls it. */
78
+ columnVisibility?: FeatureState<VisibilityState>;
79
+ columns: ColumnDef<TData, any>[];
80
+ data: TData[];
81
+ /**
82
+ * `client` filters the data in memory; `manual` lets the app filter, usually on the server. Turns search and column filters on.
83
+ * Only columns with `meta.filter` get a column filter.
84
+ * With `manual`, `onChange` fires on every keystroke in the search: store the state right away and debounce the fetch instead.
85
+ * Treat the search text and filter values as untrusted input on the server.
86
+ */
87
+ filtering?: DataTableFilteringOptions;
88
+ /** Stable row ids, so selection survives sorting and refetching. Defaults to the row index. */
89
+ getRowId?: (row: TData, index: number) => string;
90
+ /**
91
+ * Column ids to group rows by. Turns grouping on. Groups start open.
92
+ * While every group is open, groups that appear later open too; collapsing one fixes the open set to the groups shown at that moment.
93
+ */
94
+ grouping?: FeatureState<GroupingState>;
95
+ /** Show skeleton rows instead of data. */
96
+ loading?: boolean;
97
+ /**
98
+ * `client` pages the data in memory; `manual` lets the app fetch each page.
99
+ * With `manual`, client sorting only sorts the current page. With grouping, client pages count group header rows as rows.
100
+ */
101
+ pagination?: DataTablePaginationOptions;
102
+ /** Selected rows by id. Turns selection on. */
103
+ selection?: FeatureState<RowSelectionState>;
104
+ /**
105
+ * `client` sorts the data in memory; `manual` lets the app sort, usually on the server.
106
+ * Shift-click a second header to sort by more than one column.
107
+ */
108
+ sorting?: DataTableSortingOptions;
109
+ /**
110
+ * Render only the rows in view. Use it for long lists without pagination.
111
+ * Needs a bounded table height: `fill` on `DataTable`, or a max height through `scrollAreaProps` on `DataTableContent`.
112
+ */
113
+ virtualization?: DataTableVirtualization;
114
+ };
115
+ /**
116
+ * The value `useDataTable` returns. Pass it to `DataTable` as `table`; it holds the table state and the loading flag.
117
+ *
118
+ * @example
119
+ * ```tsx
120
+ * const dataTable: DataTableInstance<User> = useDataTable({ columns, data });
121
+ *
122
+ * return <DataTable table={dataTable}>...</DataTable>;
123
+ * ```
124
+ * @see useDataTable
125
+ * @see DataTable
126
+ */
127
+ type DataTableInstance<TData> = {
128
+ loading: boolean;
129
+ table: Table<TData>;
130
+ virtualization: DataTableVirtualization | undefined;
131
+ };
132
+ /**
133
+ * Create the state for a `DataTable`. Each feature stays off until its option is passed.
134
+ * Pass `{ state, onChange }` to own a feature's state, or `mode: 'manual'` for server-driven sorting and pagination.
135
+ * `onChange` receives the next state, ready to store.
136
+ *
137
+ * @example
138
+ * const dataTable = useDataTable({
139
+ * columns,
140
+ * data,
141
+ * pagination: { mode: 'client', pageSize: 25 },
142
+ * sorting: { mode: 'client' },
143
+ * });
144
+ *
145
+ * <DataTable table={dataTable}>
146
+ * <DataTableContent />
147
+ * <DataTablePagination />
148
+ * </DataTable>
149
+ * @returns A table instance to pass to `DataTable` as `table`.
150
+ * @see UseDataTableOptions
151
+ * @see DataTable
152
+ * @see DataTableContent
153
+ */
154
+ declare const useDataTable: <TData>({ columnPinning, columnSizing, columnVisibility, columns, data, filtering, getRowId, grouping, loading, pagination, selection, sorting, virtualization, }: UseDataTableOptions<TData>) => DataTableInstance<TData>;
155
+ export { useDataTable };
156
+ export type { DataTableInstance, DataTableVirtualization, UseDataTableOptions, };
157
+ //# sourceMappingURL=use-data-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/use-data-table.ts"],"names":[],"mappings":"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"}
@@ -48,7 +48,7 @@ type CursorPaginationProps = {
48
48
  /** Whether a previous page exists; disables the previous button when false. */
49
49
  hasPrevious: boolean;
50
50
  /**
51
- * Optional content rendered between the two navigation buttons.
51
+ * Optional content rendered before the navigation buttons.
52
52
  * Commonly used for a "Page N of M" or record-range label.
53
53
  */
54
54
  label?: ReactNode;
@@ -60,7 +60,7 @@ type CursorPaginationProps = {
60
60
  /**
61
61
  * Pre-assembled cursor-based pagination bar.
62
62
  *
63
- * Renders a Previous button, an optional center label, and a Next button.
63
+ * Renders an optional label, such as a record range, followed by previous and next arrow buttons, aligned to the end.
64
64
  * Each button is disabled automatically when there is no page in that direction.
65
65
  * Designed for dashboard tables and lists that use cursor/keyset pagination rather
66
66
  * than numbered pages — which is the dominant pattern in the Redcoast design system.
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/pagination/pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc/E;;;GAGG;AACH,QAAA,MAAM,UAAU,4BAGb,cAAc,CAAC,KAAK,CAAC,KAAG,YAQ1B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,iBAAiB,4BAGpB,cAAc,CAAC,IAAI,CAAC,KAAG,YAMzB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,4BAGjB,cAAc,CAAC,IAAI,CAAC,KAAG,YAEzB,CAAC;AAEF,KAAK,mBAAmB,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG;IAC/C,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,cAAc,gDAKjB,mBAAmB,KAAG,YAgBxB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,sCAIrB,cAAc,CAAC,GAAG,CAAC,KAAG,YAgBxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,sCAIjB,cAAc,CAAC,GAAG,CAAC,KAAG,YAexB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,4BAGrB,cAAc,CAAC,MAAM,CAAC,KAAG,YAa3B,CAAC;AAMF,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kDAAkD;IAClD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,sDAAsD;IACtD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,gBAAgB,oEAOnB,qBAAqB,KAAG,YAiC1B,CAAC;AAEF,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,CAAC;AACF,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/pagination/pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc/E;;;GAGG;AACH,QAAA,MAAM,UAAU,4BAGb,cAAc,CAAC,KAAK,CAAC,KAAG,YAQ1B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,iBAAiB,4BAGpB,cAAc,CAAC,IAAI,CAAC,KAAG,YAMzB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,4BAGjB,cAAc,CAAC,IAAI,CAAC,KAAG,YAEzB,CAAC;AAEF,KAAK,mBAAmB,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG;IAC/C,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,cAAc,gDAKjB,mBAAmB,KAAG,YAgBxB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,sCAIrB,cAAc,CAAC,GAAG,CAAC,KAAG,YAgBxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,sCAIjB,cAAc,CAAC,GAAG,CAAC,KAAG,YAexB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,4BAGrB,cAAc,CAAC,MAAM,CAAC,KAAG,YAa3B,CAAC;AAMF,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kDAAkD;IAClD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,sDAAsD;IACtD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,gBAAgB,oEAOnB,qBAAqB,KAAG,YAqC1B,CAAC;AAEF,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,CAAC;AACF,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,16 +1,20 @@
1
- import { type ComponentProps, type ReactElement } from 'react';
1
+ import { type ComponentProps, type ReactElement, type Ref } from 'react';
2
2
  type TableProps = ComponentProps<'table'> & {
3
+ /** Stretch to the height the parent gives it, with one scroller and a pinned header. The parent must be a flex column with a bounded height. */
4
+ fill?: boolean;
3
5
  /** Customize the native scroll viewport, including an optional max-height. */
4
6
  scrollAreaProps?: Omit<ComponentProps<'div'>, 'children' | 'ref' | 'role' | 'tabIndex'>;
5
7
  /** Pin the first column at inline-start; cells spanning multiple columns stay unpinned. */
6
8
  stickyFirstColumn?: boolean;
9
+ /** Receives the scroll viewport element, for code that follows its scrolling such as row virtualization. */
10
+ viewportRef?: Ref<HTMLDivElement>;
7
11
  };
8
12
  /** Render a table in a stable tray with keyboard access only when content overflows. */
9
- declare const Table: ({ className, scrollAreaProps, stickyFirstColumn, ...props }: TableProps) => ReactElement;
13
+ declare const Table: ({ className, fill, scrollAreaProps, stickyFirstColumn, viewportRef, ...props }: TableProps) => ReactElement;
10
14
  declare const TableHeader: ({ className, ...props }: ComponentProps<"thead">) => ReactElement;
11
15
  declare const TableBody: ({ className, ...props }: ComponentProps<"tbody">) => ReactElement;
12
16
  declare const TableFooter: ({ className, ...props }: ComponentProps<"tfoot">) => ReactElement;
13
- declare const TableRow: ({ className, ...props }: ComponentProps<"tr">) => ReactElement;
17
+ declare const TableRow: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & import("react").RefAttributes<HTMLTableRowElement>>;
14
18
  declare const TableHead: ({ className, scope, ...props }: ComponentProps<"th">) => ReactElement;
15
19
  declare const TableCell: ({ className, ...props }: ComponentProps<"td">) => ReactElement;
16
20
  declare const TableCaption: ({ className, ...props }: ComponentProps<"caption">) => ReactElement;
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAC;AAKf,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IAC1C,8EAA8E;IAC9E,eAAe,CAAC,EAAE,IAAI,CACpB,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CACzC,CAAC;IACF,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AA8DF,wFAAwF;AACxF,QAAA,MAAM,KAAK,gEAKR,UAAU,KAAG,YAkRf,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAEF,QAAA,MAAM,SAAS,4BAGZ,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAEF,QAAA,MAAM,QAAQ,4BAGX,cAAc,CAAC,IAAI,CAAC,KAAG,YAYzB,CAAC;AAEF,QAAA,MAAM,SAAS,mCAIZ,cAAc,CAAC,IAAI,CAAC,KAAG,YAYzB,CAAC;AAEF,QAAA,MAAM,SAAS,4BAGZ,cAAc,CAAC,IAAI,CAAC,KAAG,YAWzB,CAAC;AAEF,QAAA,MAAM,YAAY,4BAGf,cAAc,CAAC,SAAS,CAAC,KAAG,YAW9B,CAAC;AAEF,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAC"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,GAAG,EAOT,MAAM,OAAO,CAAC;AAKf,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IAC1C,gJAAgJ;IAChJ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8EAA8E;IAC9E,eAAe,CAAC,EAAE,IAAI,CACpB,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CACzC,CAAC;IACF,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4GAA4G;IAC5G,WAAW,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACnC,CAAC;AAwEF,wFAAwF;AACxF,QAAA,MAAM,KAAK,mFAOR,UAAU,KAAG,YA0Rf,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAEF,QAAA,MAAM,SAAS,4BAGZ,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAGF,QAAA,MAAM,QAAQ,0NAcb,CAAC;AAGF,QAAA,MAAM,SAAS,mCAIZ,cAAc,CAAC,IAAI,CAAC,KAAG,YAYzB,CAAC;AAEF,QAAA,MAAM,SAAS,4BAGZ,cAAc,CAAC,IAAI,CAAC,KAAG,YAWzB,CAAC;AAEF,QAAA,MAAM,YAAY,4BAGf,cAAc,CAAC,SAAS,CAAC,KAAG,YAW9B,CAAC;AAEF,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import type { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
- component: ({ className, scrollAreaProps, stickyFirstColumn, ...props }: import("react").ClassAttributes<HTMLTableElement> & import("react").TableHTMLAttributes<HTMLTableElement> & {
3
+ component: ({ className, fill, scrollAreaProps, stickyFirstColumn, viewportRef, ...props }: import("react").ClassAttributes<HTMLTableElement> & import("react").TableHTMLAttributes<HTMLTableElement> & {
4
+ fill?: boolean;
4
5
  scrollAreaProps?: Omit<import("react").ComponentProps<"div">, "children" | "ref" | "role" | "tabIndex">;
5
6
  stickyFirstColumn?: boolean;
7
+ viewportRef?: import("react").Ref<HTMLDivElement>;
6
8
  }) => import("react").ReactElement;
7
9
  parameters: {
8
10
  layout: string;
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgB5D,QAAA,MAAM,IAAI;;;;;;;;;;CAKoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA0CnC,eAAO,MAAM,OAAO,EAAE,KAsCrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkCtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAwBnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA6ChC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoD9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA6G9B,CAAC"}
1
+ {"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgB5D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAKoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA0CnC,eAAO,MAAM,OAAO,EAAE,KAsCrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkCtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAwBnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA6ChC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoD9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA6G9B,CAAC"}
@@ -5,7 +5,9 @@ declare const Tabs: ({ className, orientation, ...props }: ComponentProps<typeof
5
5
  declare const tabsListVariants: (props?: ({
6
6
  variant?: "default" | "line" | "navigation" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- declare const TabsList: ({ className, variant, ...props }: ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>) => ReactElement;
8
+ declare const TabsList: import("react").ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & import("react").RefAttributes<HTMLDivElement> & VariantProps<(props?: ({
9
+ variant?: "default" | "line" | "navigation" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
11
  declare const TabsTrigger: ({ className, ...props }: ComponentProps<typeof TabsPrimitive.Trigger>) => ReactElement;
10
12
  declare const TabsContent: ({ className, ...props }: ComponentProps<typeof TabsPrimitive.Content>) => ReactElement;
11
13
  export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tabs/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD,QAAA,MAAM,IAAI,yCAIP,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,KAAG,YAa9C,CAAC;AAEF,QAAA,MAAM,gBAAgB;;8EAcrB,CAAC;AAEF,QAAA,MAAM,QAAQ,qCAIX,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,GAC1C,YAAY,CAAC,OAAO,gBAAgB,CAAC,KAAG,YASzC,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAejD,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAWjD,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tabs/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD,QAAA,MAAM,IAAI,yCAIP,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,KAAG,YAa9C,CAAC;AAEF,QAAA,MAAM,gBAAgB;;8EAcrB,CAAC;AAIF,QAAA,MAAM,QAAQ;;wIAYZ,CAAC;AAGH,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAejD,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAWjD,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/tooltip.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,eAAe,4EAAW,CAAC;AAEjC,QAAA,MAAM,OAAO,oEAAO,CAAC;AAErB,QAAA,MAAM,cAAc,qJAAU,CAAC;AAE/B,QAAA,MAAM,cAAc,+MAelB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/tooltip.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,eAAe,4EAAW,CAAC;AAEjC,QAAA,MAAM,OAAO,oEAAO,CAAC;AAErB,QAAA,MAAM,cAAc,qJAAU,CAAC;AAG/B,QAAA,MAAM,cAAc,+MA6BlB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}