@rotki/ui-library 0.9.0 → 0.10.1

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.
@@ -35,6 +35,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
35
35
  };
36
36
  tile: {
37
37
  type: globalThis.PropType<boolean>;
38
+ default: boolean;
38
39
  };
39
40
  clickable: {
40
41
  type: globalThis.PropType<boolean>;
@@ -78,6 +79,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
78
79
  };
79
80
  tile: {
80
81
  type: globalThis.PropType<boolean>;
82
+ default: boolean;
81
83
  };
82
84
  clickable: {
83
85
  type: globalThis.PropType<boolean>;
@@ -104,6 +106,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
104
106
  size: "sm" | "md";
105
107
  disabled: boolean;
106
108
  textColor: string;
109
+ tile: boolean;
107
110
  clickable: boolean;
108
111
  closeable: boolean;
109
112
  closeIcon: RuiIcons;
@@ -165,10 +165,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
165
165
  };
166
166
  }>> & {
167
167
  onBlur?: ((event: Event) => any) | undefined;
168
+ onClear?: (() => any) | undefined;
168
169
  "onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
169
170
  "onFocus-input"?: ((event: Event) => any) | undefined;
170
171
  onRemove?: ((value: unknown) => any) | undefined;
171
- onClear?: (() => any) | undefined;
172
172
  }, {
173
173
  readonly: boolean;
174
174
  variant: "default" | "outlined" | "filled";
@@ -19,7 +19,8 @@ import { type RadioProps as RadioProps, default as RuiRadio } from '../component
19
19
  import { type Props as RevealableTextFieldProps, default as RuiRevealableTextField } from '../components/forms/revealable-text-field/RevealableTextField.vue';
20
20
  import { type Props as LogoProps, default as RuiLogo } from '../components/logos/Logo.vue';
21
21
  import { default as RuiSimpleSelect, type Props as SimpleSelectProps } from '../components/forms/select/SimpleSelect.vue';
22
- import { type TableColumn as DataTableColumn, type TableOptions as DataTableOptions, type Props as DataTableProps, type SortColumn as DataTableSortColumn, default as RuiDataTable } from '../components/tables/DataTable.vue';
22
+ import { type TableColumn as DataTableColumn, type GroupKeys as DataTableGroupKeys, type SortColumn as DataTableSortColumn, type TableSortData as DataTableSortData } from '../components/tables/TableHead.vue';
23
+ import { type TableOptions as DataTableOptions, type Props as DataTableProps, default as RuiDataTable } from '../components/tables/DataTable.vue';
23
24
  import { type Props as ExpandButtonProps, default as RuiTableRowExpander } from '../components/tables/ExpandButton.vue';
24
25
  import { default as RuiTablePagination, type TablePaginationData, type Props as TablePaginationProps } from '../components/tables/TablePagination.vue';
25
26
  import { type Props as CardProps, default as RuiCard } from '../components/cards/Card.vue';
@@ -29,4 +30,4 @@ import { default as RuiTab, type Props as TabProps } from '../components/tabs/ta
29
30
  import { default as RuiTabItems, type Props as TabItemsProps } from '../components/tabs/tab-items/TabItems.vue';
30
31
  import { default as RuiTabItem, type Props as TabItemProps } from '../components/tabs/tab-item/TabItem.vue';
31
32
  import { default as RuiSkeletonLoader, type Props as SkeletonLoaderProps } from '../components/loaders/Skeleton.vue';
32
- export { RuiAlert, RuiAutoComplete, RuiBadge, RuiButton, RuiButtonGroup, RuiCheckbox, RuiChip, RuiFooterStepper, RuiIcon, RuiLogo, RuiProgress, RuiRadio, RuiRadioGroup, RuiRevealableTextField, RuiStepper, RuiTextField, RuiTooltip, RuiDataTable, RuiSimpleSelect, RuiDialog, RuiCard, RuiCardHeader, RuiTabs, RuiTab, RuiTabItems, RuiTabItem, RuiTablePagination, RuiSkeletonLoader, RuiTextArea, RuiDivider, RuiTableRowExpander, AutoCompleteProps, ChipProps, TooltipProps, SimpleSelectProps, DataTableProps, DataTableColumn, DataTableSortColumn, DataTableOptions, TablePaginationData, DialogProps, ButtonProps, ButtonGroupProps, CardProps, CardHeaderProps, BadgeProps, AlertProps, CheckboxProps, ProgressProps, RadioGroupProps, RadioProps, LogoProps, StepperProps, TextFieldProps, IconProps, FooterStepperProps, TabsProps, TabProps, TabItemsProps, TabItemProps, TablePaginationProps, RevealableTextFieldProps, SkeletonLoaderProps, DividerProps, TextAreaProps, ExpandButtonProps, };
33
+ export { RuiAlert, RuiAutoComplete, RuiBadge, RuiButton, RuiButtonGroup, RuiCheckbox, RuiChip, RuiFooterStepper, RuiIcon, RuiLogo, RuiProgress, RuiRadio, RuiRadioGroup, RuiRevealableTextField, RuiStepper, RuiTextField, RuiTooltip, RuiDataTable, RuiSimpleSelect, RuiDialog, RuiCard, RuiCardHeader, RuiTabs, RuiTab, RuiTabItems, RuiTabItem, RuiTablePagination, RuiSkeletonLoader, RuiTextArea, RuiDivider, RuiTableRowExpander, AutoCompleteProps, ChipProps, TooltipProps, SimpleSelectProps, DataTableProps, DataTableColumn, DataTableSortColumn, DataTableOptions, TablePaginationData, DialogProps, ButtonProps, ButtonGroupProps, CardProps, CardHeaderProps, BadgeProps, AlertProps, CheckboxProps, ProgressProps, RadioGroupProps, RadioProps, LogoProps, StepperProps, TextFieldProps, IconProps, FooterStepperProps, TabsProps, TabProps, TabItemsProps, TabItemProps, TablePaginationProps, RevealableTextFieldProps, SkeletonLoaderProps, DividerProps, TextAreaProps, ExpandButtonProps, DataTableSortData, DataTableGroupKeys, };
@@ -1,41 +1,43 @@
1
- import { A as p, a as l, R as m, B as d, b as T, m as b, n, C as g, d as x, D as C, l as S, v as A, F as B, I as D, _ as F, P as I, e as c, f as h, g as k, k as v, t as P, h as f, p as E, r as G, q as L, s as j, E as q, o as w, u as H, i as _, j as y } from "../index-XP-zcLsF.js";
1
+ import { A as m, a as d, B as T, b, d as n, m as g, n as x, C, e as S, D as A, l as B, v as D, F, I, _ as c, P as h, R as k, f as v, g as P, k as f, t as E, h as G, p as L, r as j, q, s as w, E as H, o as _, u as y, i as z, j as J } from "../index-qKuRALnN.js";
2
2
  import "vue";
3
3
  import "@vueuse/shared";
4
- import "../index-W2poXQa4.js";
5
- import "../all-icons.es.js";
4
+ import "../theme-V5yenaDk.js";
5
+ import "../icons/icons_1.es.js";
6
+ import "../icons/icons_2.es.js";
7
+ import "../icons/icons_5.es.js";
6
8
  import "@vueuse/core";
7
9
  import "../colors-ikihApJv.js";
8
10
  import "vue-router";
9
11
  export {
10
- p as RuiAlert,
11
- l as RuiAutoComplete,
12
- m as RuiBadge,
13
- d as RuiButton,
14
- T as RuiButtonGroup,
15
- b as RuiCard,
16
- n as RuiCardHeader,
17
- g as RuiCheckbox,
18
- x as RuiChip,
19
- C as RuiDataTable,
20
- S as RuiDialog,
21
- A as RuiDivider,
22
- B as RuiFooterStepper,
23
- D as RuiIcon,
24
- F as RuiLogo,
25
- I as RuiProgress,
26
- c as RuiRadio,
27
- h as RuiRadioGroup,
28
- k as RuiRevealableTextField,
29
- v as RuiSimpleSelect,
30
- P as RuiSkeletonLoader,
31
- f as RuiStepper,
32
- E as RuiTab,
33
- G as RuiTabItem,
34
- L as RuiTabItems,
35
- j as RuiTablePagination,
36
- q as RuiTableRowExpander,
37
- w as RuiTabs,
38
- H as RuiTextArea,
39
- _ as RuiTextField,
40
- y as RuiTooltip
12
+ m as RuiAlert,
13
+ d as RuiAutoComplete,
14
+ T as RuiBadge,
15
+ b as RuiButton,
16
+ n as RuiButtonGroup,
17
+ g as RuiCard,
18
+ x as RuiCardHeader,
19
+ C as RuiCheckbox,
20
+ S as RuiChip,
21
+ A as RuiDataTable,
22
+ B as RuiDialog,
23
+ D as RuiDivider,
24
+ F as RuiFooterStepper,
25
+ I as RuiIcon,
26
+ c as RuiLogo,
27
+ h as RuiProgress,
28
+ k as RuiRadio,
29
+ v as RuiRadioGroup,
30
+ P as RuiRevealableTextField,
31
+ f as RuiSimpleSelect,
32
+ E as RuiSkeletonLoader,
33
+ G as RuiStepper,
34
+ L as RuiTab,
35
+ j as RuiTabItem,
36
+ q as RuiTabItems,
37
+ w as RuiTablePagination,
38
+ H as RuiTableRowExpander,
39
+ _ as RuiTabs,
40
+ y as RuiTextArea,
41
+ z as RuiTextField,
42
+ J as RuiTooltip
41
43
  };
@@ -1,55 +1,13 @@
1
1
  import { type TablePaginationData } from './TablePagination.vue';
2
- /**
3
- * Represents a sortable column name for a given type.
4
- * The column name must be a key of the passed data object type.
5
- * @template T - The type of the data in the column.
6
- */
7
- export type SortableColumnName<T> = keyof T;
8
- /**
9
- * Represents the name of a column in a dataset.
10
- *
11
- * The `ColumnName` type can either be a `SortableColumnName` or a string.
12
- *
13
- * @typeparam T - The type of the dataset containing the column name.
14
- */
15
- export type ColumnName<T> = SortableColumnName<T> | string;
16
- export interface BaseTableColumn {
17
- direction?: 'asc' | 'desc';
18
- align?: 'start' | 'center' | 'end';
19
- class?: string;
20
- cellClass?: string;
21
- [key: string]: any;
22
- }
23
- /**
24
- * Represents a sortable table column.
25
- * This is used to ensure that when using sortable with a true value,
26
- * the key matches to an actual property of the object passed.
27
- *
28
- * @template T - The type of data in the table column.
29
- */
30
- export interface SortableTableColumn<T> extends BaseTableColumn {
31
- key: SortableColumnName<T>;
32
- sortable: true;
33
- }
34
- /**
35
- * An interface representing a column in a table that cannot be sorted.
36
- * This can be mapped to an actual property of the object or to a virtual column.
37
- *
38
- * @typeparam T - The type of data in the table.
39
- */
40
- export interface NoneSortableTableColumn<T> extends BaseTableColumn {
41
- key: string | SortableColumnName<T>;
42
- sortable?: false;
43
- }
44
- export type TableColumn<T> = SortableTableColumn<T> | NoneSortableTableColumn<T>;
45
- export interface SortColumn<T> {
46
- column?: SortableColumnName<T>;
47
- direction: 'asc' | 'desc';
48
- }
2
+ import { type GroupData, type GroupKeys, type SortColumn, type TableColumn, type TableRowKeyData, type TableSortData } from './TableHead.vue';
49
3
  export interface TableOptions<T> {
50
4
  pagination?: TablePaginationData;
51
5
  sort?: SortColumn<T> | SortColumn<T>[];
52
6
  }
7
+ export type GroupedTableRow<T> = T & Partial<{
8
+ groupVal: string;
9
+ group: Partial<T>;
10
+ }>;
53
11
  export interface Props<T, K extends keyof T> {
54
12
  /**
55
13
  * list of items for each row
@@ -92,7 +50,7 @@ export interface Props<T, K extends keyof T> {
92
50
  * multi columns sort
93
51
  * @example v-model:sort="[{ column: 'name', direction: 'asc' }]"
94
52
  */
95
- sort?: SortColumn<T> | SortColumn<T>[];
53
+ sort?: TableSortData<T>;
96
54
  /**
97
55
  * modifiers for specifying externally sorted tables
98
56
  * use this when api controls sorting
@@ -111,7 +69,7 @@ export interface Props<T, K extends keyof T> {
111
69
  /**
112
70
  * attribute to use from column definitions to display column titles
113
71
  */
114
- columnAttr?: string;
72
+ columnAttr?: keyof TableColumn<T>;
115
73
  /**
116
74
  * flag to show a more or less spacious table
117
75
  */
@@ -152,7 +110,7 @@ export interface Props<T, K extends keyof T> {
152
110
  */
153
111
  singleExpand?: boolean;
154
112
  /**
155
- * make expansion work like accordion
113
+ * make table head stick to top on scroll
156
114
  */
157
115
  stickyHeader?: boolean;
158
116
  stickyOffset?: number;
@@ -161,6 +119,15 @@ export interface Props<T, K extends keyof T> {
161
119
  * When true, changing the items per page setting in one table will affect other tables.
162
120
  */
163
121
  globalItemsPerPage?: boolean;
122
+ /**
123
+ * model for grouping column/columns data
124
+ * single column grouping
125
+ * @example v-model:group="'name'"
126
+ * multi columns grouping
127
+ * @example v-model:group="['name', 'country']"
128
+ */
129
+ group?: TableRowKeyData<T>;
130
+ collapsed?: T[];
164
131
  }
165
132
  declare const _default: <T extends object, IdType extends keyof T = keyof T>(__VLS_props: Props<T, IdType> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
166
133
  props: Props<T, IdType>;
@@ -170,28 +137,53 @@ declare const _default: <T extends object, IdType extends keyof T = keyof T>(__V
170
137
  column: TableColumn<T>;
171
138
  }) => any>> & Partial<Record<string, (_: {
172
139
  column: TableColumn<T>;
173
- row: T;
140
+ }) => any>> & Partial<Record<string, (_: {
141
+ column: TableColumn<T>;
142
+ row: GroupedTableRow<T>;
174
143
  index: number;
175
144
  }) => any>> & Partial<Record<string, (_: {
176
145
  column: TableColumn<T>;
177
- row: T;
178
146
  index: number;
147
+ row: GroupedTableRow<T>;
179
148
  }) => any>> & {
149
+ "body.prepend"?(_: {
150
+ colspan: number;
151
+ }): any;
152
+ "group.header"?(_: {
153
+ colspan: number;
154
+ row: GroupedTableRow<T>;
155
+ group: Partial<T> | undefined;
156
+ groupKey: string;
157
+ groupValue: string | undefined;
158
+ isOpen: boolean;
159
+ toggle: () => void;
160
+ }): any;
161
+ "group.header.content"?(_: {
162
+ row: GroupedTableRow<T>;
163
+ group: Partial<T> | undefined;
164
+ groupKey: string;
165
+ groupValue: string | undefined;
166
+ }): any;
180
167
  "expanded-item"?(_: {
181
- row: T;
168
+ row: GroupedTableRow<T>;
182
169
  index: number;
183
170
  }): any;
184
171
  "no-data"?(_: {}): any;
185
172
  "empty-description"?(_: {}): any;
186
- "body.append"?(_: {}): any;
173
+ "body.append"?(_: {
174
+ colspan: number;
175
+ }): any;
187
176
  tfoot?(_: {}): any;
188
177
  };
189
178
  emit: {
190
179
  (e: 'update:model-value', value?: T[IdType][] | undefined): void;
191
180
  (e: 'update:expanded', value: T[]): void;
192
181
  (e: 'update:pagination', value: TablePaginationData): void;
193
- (e: 'update:sort', value?: SortColumn<T> | SortColumn<T>[] | undefined): void;
182
+ (e: 'update:sort', value?: TableSortData<T>): void;
194
183
  (e: 'update:options', value: TableOptions<T>): void;
184
+ (e: 'update:group', value?: GroupKeys<T>): void;
185
+ (e: 'update:collapsed', value?: T[] | undefined): void;
186
+ (e: 'copy:group', value: GroupData<T>): void;
195
187
  };
196
188
  }, "attrs" | "emit" | "slots"> | undefined, __VLS_expose?: ((exposed: {}) => void) | undefined, __VLS_setup?: Promise<{
197
189
  props: Props<T, IdType>;
@@ -201,28 +193,53 @@ declare const _default: <T extends object, IdType extends keyof T = keyof T>(__V
201
193
  column: TableColumn<T>;
202
194
  }) => any>> & Partial<Record<string, (_: {
203
195
  column: TableColumn<T>;
204
- row: T;
196
+ }) => any>> & Partial<Record<string, (_: {
197
+ column: TableColumn<T>;
198
+ row: GroupedTableRow<T>;
205
199
  index: number;
206
200
  }) => any>> & Partial<Record<string, (_: {
207
201
  column: TableColumn<T>;
208
- row: T;
209
202
  index: number;
203
+ row: GroupedTableRow<T>;
210
204
  }) => any>> & {
205
+ "body.prepend"?(_: {
206
+ colspan: number;
207
+ }): any;
208
+ "group.header"?(_: {
209
+ colspan: number;
210
+ row: GroupedTableRow<T>;
211
+ group: Partial<T> | undefined;
212
+ groupKey: string;
213
+ groupValue: string | undefined;
214
+ isOpen: boolean;
215
+ toggle: () => void;
216
+ }): any;
217
+ "group.header.content"?(_: {
218
+ row: GroupedTableRow<T>;
219
+ group: Partial<T> | undefined;
220
+ groupKey: string;
221
+ groupValue: string | undefined;
222
+ }): any;
211
223
  "expanded-item"?(_: {
212
- row: T;
224
+ row: GroupedTableRow<T>;
213
225
  index: number;
214
226
  }): any;
215
227
  "no-data"?(_: {}): any;
216
228
  "empty-description"?(_: {}): any;
217
- "body.append"?(_: {}): any;
229
+ "body.append"?(_: {
230
+ colspan: number;
231
+ }): any;
218
232
  tfoot?(_: {}): any;
219
233
  };
220
234
  emit: {
221
235
  (e: 'update:model-value', value?: T[IdType][] | undefined): void;
222
236
  (e: 'update:expanded', value: T[]): void;
223
237
  (e: 'update:pagination', value: TablePaginationData): void;
224
- (e: 'update:sort', value?: SortColumn<T> | SortColumn<T>[] | undefined): void;
238
+ (e: 'update:sort', value?: TableSortData<T>): void;
225
239
  (e: 'update:options', value: TableOptions<T>): void;
240
+ (e: 'update:group', value?: GroupKeys<T>): void;
241
+ (e: 'update:collapsed', value?: T[] | undefined): void;
242
+ (e: 'copy:group', value: GroupData<T>): void;
226
243
  };
227
244
  }>) => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
228
245
  [key: string]: any;
@@ -235,28 +252,53 @@ declare const _default: <T extends object, IdType extends keyof T = keyof T>(__V
235
252
  column: TableColumn<T>;
236
253
  }) => any>> & Partial<Record<string, (_: {
237
254
  column: TableColumn<T>;
238
- row: T;
255
+ }) => any>> & Partial<Record<string, (_: {
256
+ column: TableColumn<T>;
257
+ row: GroupedTableRow<T>;
239
258
  index: number;
240
259
  }) => any>> & Partial<Record<string, (_: {
241
260
  column: TableColumn<T>;
242
- row: T;
243
261
  index: number;
262
+ row: GroupedTableRow<T>;
244
263
  }) => any>> & {
264
+ "body.prepend"?(_: {
265
+ colspan: number;
266
+ }): any;
267
+ "group.header"?(_: {
268
+ colspan: number;
269
+ row: GroupedTableRow<T>;
270
+ group: Partial<T> | undefined;
271
+ groupKey: string;
272
+ groupValue: string | undefined;
273
+ isOpen: boolean;
274
+ toggle: () => void;
275
+ }): any;
276
+ "group.header.content"?(_: {
277
+ row: GroupedTableRow<T>;
278
+ group: Partial<T> | undefined;
279
+ groupKey: string;
280
+ groupValue: string | undefined;
281
+ }): any;
245
282
  "expanded-item"?(_: {
246
- row: T;
283
+ row: GroupedTableRow<T>;
247
284
  index: number;
248
285
  }): any;
249
286
  "no-data"?(_: {}): any;
250
287
  "empty-description"?(_: {}): any;
251
- "body.append"?(_: {}): any;
288
+ "body.append"?(_: {
289
+ colspan: number;
290
+ }): any;
252
291
  tfoot?(_: {}): any;
253
292
  };
254
293
  emit: {
255
294
  (e: 'update:model-value', value?: T[IdType][] | undefined): void;
256
295
  (e: 'update:expanded', value: T[]): void;
257
296
  (e: 'update:pagination', value: TablePaginationData): void;
258
- (e: 'update:sort', value?: SortColumn<T> | SortColumn<T>[] | undefined): void;
297
+ (e: 'update:sort', value?: TableSortData<T>): void;
259
298
  (e: 'update:options', value: TableOptions<T>): void;
299
+ (e: 'update:group', value?: GroupKeys<T>): void;
300
+ (e: 'update:collapsed', value?: T[] | undefined): void;
301
+ (e: 'copy:group', value: GroupData<T>): void;
260
302
  };
261
303
  } | undefined;
262
304
  };
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Represents a sortable column name for a given type.
3
+ * The column name must be a key of the passed data object type.
4
+ * @template T - The type of the data in the column.
5
+ */
6
+ export type TableRowKey<T> = keyof T;
7
+ export interface BaseTableColumn<T> {
8
+ key: TableRowKey<T> | string;
9
+ sortable?: boolean;
10
+ direction?: 'asc' | 'desc';
11
+ align?: 'start' | 'center' | 'end';
12
+ class?: string;
13
+ cellClass?: string;
14
+ colspan?: string | number;
15
+ rowspan?: string | number;
16
+ [key: string]: any;
17
+ }
18
+ /**
19
+ * Represents a sortable table column.
20
+ * This is used to ensure that when using sortable with a true value,
21
+ * the key matches to an actual property of the object passed.
22
+ *
23
+ * @template T - The type of data in the table column.
24
+ */
25
+ export interface SortableTableColumn<T> extends BaseTableColumn<T> {
26
+ sortable: true;
27
+ }
28
+ /**
29
+ * An interface representing a column in a table that cannot be sorted.
30
+ * This can be mapped to an actual property of the object or to a virtual column.
31
+ *
32
+ * @typeparam T - The type of data in the table.
33
+ */
34
+ export interface NoneSortableTableColumn<T> extends BaseTableColumn<T> {
35
+ sortable?: false;
36
+ }
37
+ export type TableColumn<T> = SortableTableColumn<T> | NoneSortableTableColumn<T>;
38
+ export interface SortColumn<T> {
39
+ column?: TableRowKey<T>;
40
+ direction: 'asc' | 'desc';
41
+ }
42
+ export type TableSortData<T> = SortColumn<T> | SortColumn<T>[] | undefined;
43
+ export type TableRowKeyData<T> = TableRowKey<T> | TableRowKey<T>[] | undefined;
44
+ export interface GroupData<T> {
45
+ key: string;
46
+ value?: Partial<T>;
47
+ }
48
+ export type GroupKey<T> = TableColumn<T>['key'];
49
+ export type GroupKeys<T> = GroupKey<T> | GroupKey<T>[] | undefined;
50
+ export interface Props<T> {
51
+ loading?: boolean;
52
+ stickyHeader?: boolean;
53
+ stick?: boolean;
54
+ selectable?: boolean;
55
+ disableCheckAll?: boolean;
56
+ noData?: boolean;
57
+ colspan?: number;
58
+ columns: TableColumn<T>[];
59
+ capitalizeHeaders?: boolean;
60
+ isAllSelected?: boolean;
61
+ indeterminate?: boolean;
62
+ dense?: boolean;
63
+ sortedMap: Partial<Record<TableRowKey<T>, SortColumn<T>>>;
64
+ sortData?: TableSortData<T>;
65
+ columnAttr: keyof TableColumn<T>;
66
+ dataId?: string;
67
+ }
68
+ declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_props: Props<T> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
69
+ props: Props<T>;
70
+ expose(exposed: {}): void;
71
+ attrs: any;
72
+ slots: Partial<Record<string, (_: {
73
+ column: TableColumn<T>;
74
+ }) => any>>;
75
+ emit: {
76
+ (e: 'select:all', value: boolean): void;
77
+ (e: 'sort', value: {
78
+ key: keyof T;
79
+ direction?: "desc" | "asc" | undefined;
80
+ }): void;
81
+ };
82
+ }, "attrs" | "emit" | "slots"> | undefined, __VLS_expose?: ((exposed: {}) => void) | undefined, __VLS_setup?: Promise<{
83
+ props: Props<T>;
84
+ expose(exposed: {}): void;
85
+ attrs: any;
86
+ slots: Partial<Record<string, (_: {
87
+ column: TableColumn<T>;
88
+ }) => any>>;
89
+ emit: {
90
+ (e: 'select:all', value: boolean): void;
91
+ (e: 'sort', value: {
92
+ key: keyof T;
93
+ direction?: "desc" | "asc" | undefined;
94
+ }): void;
95
+ };
96
+ }>) => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
97
+ [key: string]: any;
98
+ }> & {
99
+ __ctx?: {
100
+ props: Props<T>;
101
+ expose(exposed: {}): void;
102
+ attrs: any;
103
+ slots: Partial<Record<string, (_: {
104
+ column: TableColumn<T>;
105
+ }) => any>>;
106
+ emit: {
107
+ (e: 'select:all', value: boolean): void;
108
+ (e: 'sort', value: {
109
+ key: keyof T;
110
+ direction?: "desc" | "asc" | undefined;
111
+ }): void;
112
+ };
113
+ } | undefined;
114
+ };
115
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const useBreakpoint: () => any;
@@ -3,6 +3,7 @@ import { type MaybeRef } from '@vueuse/shared';
3
3
  export interface TableOptions {
4
4
  itemsPerPage: Ref<number>;
5
5
  globalItemsPerPage: MaybeRef<boolean>;
6
+ limits: MaybeRef<number[]>;
6
7
  }
7
8
  export declare const TableSymbol: InjectionKey<TableOptions>;
8
9
  export declare const createTableDefaults: (options?: Partial<TableOptions>) => TableOptions;
@@ -1,2 +1,3 @@
1
1
  export { useIcons } from '../composables/icons';
2
2
  export { useRotkiTheme } from '../composables/theme';
3
+ export { useBreakpoint } from '../composables/breakpoint';
@@ -1,10 +1,87 @@
1
- import { u as s, a } from "../index-W2poXQa4.js";
2
- import "../all-icons.es.js";
3
- import "@vueuse/core";
4
- import "vue";
5
- import "@vueuse/shared";
1
+ import { u as A, a as $ } from "../theme-V5yenaDk.js";
2
+ import { useWindowSize as m, breakpointsTailwind as d, useBreakpoints as w } from "@vueuse/core";
3
+ import { computed as _ } from "vue";
4
+ import { get as h } from "@vueuse/shared";
5
+ import "../icons/icons_1.es.js";
6
+ import "../icons/icons_2.es.js";
7
+ import "../icons/icons_5.es.js";
6
8
  import "../colors-ikihApJv.js";
9
+ const C = /\d/, g = ["-", "_", "/", "."];
10
+ function E(e = "") {
11
+ if (!C.test(e))
12
+ return e !== e.toLowerCase();
13
+ }
14
+ function S(e, n) {
15
+ const o = n ?? g, r = [];
16
+ if (!e || typeof e != "string")
17
+ return r;
18
+ let t = "", i, p;
19
+ for (const c of e) {
20
+ const f = o.includes(c);
21
+ if (f === !0) {
22
+ r.push(t), t = "", i = void 0;
23
+ continue;
24
+ }
25
+ const a = E(c);
26
+ if (p === !1) {
27
+ if (i === !1 && a === !0) {
28
+ r.push(t), t = c, i = a;
29
+ continue;
30
+ }
31
+ if (i === !0 && a === !1 && t.length > 1) {
32
+ const s = t.at(-1);
33
+ r.push(t.slice(0, Math.max(0, t.length - 1))), t = s + c, i = a;
34
+ continue;
35
+ }
36
+ }
37
+ t += c, i = a, p = f;
38
+ }
39
+ return r.push(t), r;
40
+ }
41
+ function y(e) {
42
+ return e ? e[0].toUpperCase() + e.slice(1) : "";
43
+ }
44
+ function z(e) {
45
+ return e ? e[0].toLowerCase() + e.slice(1) : "";
46
+ }
47
+ function R(e, n) {
48
+ return e ? (Array.isArray(e) ? e : S(e)).map((o) => y(n != null && n.normalize ? o.toLowerCase() : o)).join("") : "";
49
+ }
50
+ function l(e, n) {
51
+ return z(R(e || "", n));
52
+ }
53
+ const B = () => {
54
+ const { width: e } = m(), n = {
55
+ xs: 0,
56
+ ...d
57
+ }, o = w(n), r = Object.keys, t = r(n), i = t.map(
58
+ (s, u) => [
59
+ s,
60
+ u < t.length - 1 ? o.between(s, t[u + 1]) : o[s]
61
+ ]
62
+ ), p = i.map(([s, u]) => [
63
+ l(`is_${s}`),
64
+ u
65
+ ]), c = t.map((s) => [
66
+ l(`is_${s}_and_up`),
67
+ o.greaterOrEqual(s)
68
+ ]), f = t.map((s) => [
69
+ l(`is_${s}_and_down`),
70
+ o.smaller(s)
71
+ ]), a = _(() => {
72
+ var s;
73
+ return ((s = i.find((u) => h(u[1]))) == null ? void 0 : s[0]) || "";
74
+ });
75
+ return {
76
+ ...Object.fromEntries(p),
77
+ ...Object.fromEntries(c),
78
+ ...Object.fromEntries(f),
79
+ width: e,
80
+ name: a
81
+ };
82
+ };
7
83
  export {
8
- s as useIcons,
9
- a as useRotkiTheme
84
+ B as useBreakpoint,
85
+ A as useIcons,
86
+ $ as useRotkiTheme
10
87
  };
@@ -2,7 +2,7 @@ import { type Ref } from 'vue';
2
2
  /**
3
3
  * Setup sticky table header
4
4
  */
5
- export declare const useStickyTableHeader: (offsetTop?: Ref<number>) => {
5
+ export declare const useStickyTableHeader: (offsetTop?: Ref<number>, sticky?: Ref<boolean>) => {
6
6
  stick: Ref<boolean>;
7
7
  table: Ref<HTMLTableElement | null>;
8
8
  tableScroller: Ref<HTMLElement | null>;