@rotki/ui-library 0.2.4 → 0.4.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 (32) hide show
  1. package/dist/all-icons.d.ts +44 -0
  2. package/dist/all-icons.es.js +4829 -4657
  3. package/dist/components/alerts/Alert.vue.d.ts +18 -9
  4. package/dist/components/buttons/button/Button.vue.d.ts +10 -0
  5. package/dist/components/cards/Card.vue.d.ts +60 -0
  6. package/dist/components/cards/CardHeader.vue.d.ts +26 -0
  7. package/dist/components/chips/Chip.vue.d.ts +1 -0
  8. package/dist/components/forms/select/SimpleSelect.vue.d.ts +59 -0
  9. package/dist/components/forms/text-field/TextField.vue.d.ts +24 -13
  10. package/dist/components/icons/Icon.vue.d.ts +4 -3
  11. package/dist/components/index.d.ts +13 -4
  12. package/dist/components/index.es.js +24 -14
  13. package/dist/components/logos/Logo.vue.d.ts +10 -0
  14. package/dist/components/overlays/dialog/Dialog.vue.d.ts +60 -0
  15. package/dist/components/overlays/tooltip/Tooltip.vue.d.ts +88 -0
  16. package/dist/components/tables/DataTable.vue.d.ts +281 -0
  17. package/dist/components/tables/TablePagination.vue.d.ts +46 -0
  18. package/dist/components/tabs/tab/Tab.vue.d.ts +136 -0
  19. package/dist/components/tabs/tab-item/TabItem.vue.d.ts +53 -0
  20. package/dist/components/tabs/tab-items/TabItems.vue.d.ts +17 -0
  21. package/dist/components/tabs/tabs/Tabs.vue.d.ts +72 -0
  22. package/dist/composables/index.es.js +1 -1
  23. package/dist/composables/popper.d.ts +251 -0
  24. package/dist/index-393a0e94.js +117 -0
  25. package/dist/index-65c6da26.js +5422 -0
  26. package/dist/index.es.js +2569 -2516
  27. package/dist/style.css +1 -1
  28. package/dist/theme/index.es.js +3 -3
  29. package/dist/utils/helpers.d.ts +24 -0
  30. package/package.json +31 -26
  31. package/dist/index-1f5d0d16.js +0 -110
  32. package/dist/index-b6044b77.js +0 -2336
@@ -0,0 +1,281 @@
1
+ import { type TablePaginationData } from './TablePagination.vue';
2
+ export interface TableColumn {
3
+ key: string;
4
+ sortable?: boolean;
5
+ direction?: 'asc' | 'desc';
6
+ align?: 'start' | 'center' | 'end';
7
+ class?: string;
8
+ cellClass?: string;
9
+ [key: string]: any;
10
+ }
11
+ export interface SortColumn {
12
+ column?: string;
13
+ direction: 'asc' | 'desc';
14
+ }
15
+ export interface TableOptions {
16
+ pagination?: TablePaginationData;
17
+ sort?: SortColumn | SortColumn[];
18
+ }
19
+ export interface Props {
20
+ /**
21
+ * list of items for each row
22
+ */
23
+ rows: Array<Record<string, any>>;
24
+ /**
25
+ * the attribute used to identify each row uniquely for selection, usually `id`
26
+ */
27
+ rowAttr: string;
28
+ /**
29
+ * model for selected rows, add a v-model to support row selection
30
+ */
31
+ modelValue?: string[];
32
+ /**
33
+ * model for insternal searching
34
+ */
35
+ search?: string;
36
+ /**
37
+ * model for paginating data
38
+ * @example v-model:pagination="{ total: 10, limit: 5, page: 1 }"
39
+ */
40
+ pagination?: TablePaginationData;
41
+ /**
42
+ * modifiers for specifying externally paginated tables
43
+ * use this when api controls pagination
44
+ * @example v-model:pagination.external="{ total: 10, limit: 5, page: 1 }"
45
+ */
46
+ paginationModifiers?: {
47
+ external: boolean;
48
+ };
49
+ /**
50
+ * model for sort column/columns data
51
+ * single column sort
52
+ * @example v-model:sort="{ column: 'name', direction: 'asc' }"
53
+ * multi columns sort
54
+ * @example v-model:sort="[{ column: 'name', direction: 'asc' }]"
55
+ */
56
+ sort?: SortColumn | SortColumn[];
57
+ /**
58
+ * modifiers for specifying externally sorted tables
59
+ * use this when api controls sorting
60
+ * single column sort
61
+ * @example v-model:sort.external="{ column: 'name', direction: 'asc' }"
62
+ * multi columns sort
63
+ * @example v-model:sort.external="[{ column: 'name', direction: 'asc' }]"
64
+ */
65
+ sortModifiers?: {
66
+ external: boolean;
67
+ };
68
+ /**
69
+ * list of column definitions
70
+ */
71
+ cols?: Array<TableColumn>;
72
+ /**
73
+ * attribute to use from column definitions to display column titles
74
+ */
75
+ columnAttr?: string;
76
+ /**
77
+ * flag to show a more or less spaceous table
78
+ */
79
+ dense?: boolean;
80
+ /**
81
+ * flag to outline the flag with a border
82
+ */
83
+ outlined?: boolean;
84
+ /**
85
+ * flag to show loading state of the table
86
+ * triggers an indefinite progress at the bottom of the table header
87
+ */
88
+ loading?: boolean;
89
+ /**
90
+ * data to display for empty state
91
+ * text and icon
92
+ * @example :empty="{ icon: 'transactions-line', label: 'No transactions found' }"
93
+ */
94
+ empty?: {
95
+ label?: string;
96
+ description?: string;
97
+ };
98
+ }
99
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
100
+ sort: {
101
+ type: globalThis.PropType<SortColumn | SortColumn[]>;
102
+ default: undefined;
103
+ };
104
+ search: {
105
+ type: globalThis.PropType<string>;
106
+ default: string;
107
+ };
108
+ outlined: {
109
+ type: globalThis.PropType<boolean>;
110
+ };
111
+ loading: {
112
+ type: globalThis.PropType<boolean>;
113
+ default: boolean;
114
+ };
115
+ modelValue: {
116
+ type: globalThis.PropType<string[]>;
117
+ default: undefined;
118
+ };
119
+ dense: {
120
+ type: globalThis.PropType<boolean>;
121
+ };
122
+ empty: {
123
+ type: globalThis.PropType<{
124
+ label?: string | undefined;
125
+ description?: string | undefined;
126
+ }>;
127
+ default: () => {
128
+ label: string;
129
+ };
130
+ };
131
+ rows: {
132
+ type: globalThis.PropType<Record<string, any>[]>;
133
+ required: true;
134
+ };
135
+ rowAttr: {
136
+ type: globalThis.PropType<string>;
137
+ required: true;
138
+ };
139
+ pagination: {
140
+ type: globalThis.PropType<TablePaginationData>;
141
+ default: undefined;
142
+ };
143
+ paginationModifiers: {
144
+ type: globalThis.PropType<{
145
+ external: boolean;
146
+ }>;
147
+ default: undefined;
148
+ };
149
+ sortModifiers: {
150
+ type: globalThis.PropType<{
151
+ external: boolean;
152
+ }>;
153
+ default: undefined;
154
+ };
155
+ cols: {
156
+ type: globalThis.PropType<TableColumn[]>;
157
+ default: undefined;
158
+ };
159
+ columnAttr: {
160
+ type: globalThis.PropType<string>;
161
+ default: string;
162
+ };
163
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
164
+ "update:model-value": (value?: string[] | undefined) => void;
165
+ "update:pagination": (value?: TablePaginationData | undefined) => void;
166
+ "update:sort": (value?: SortColumn | SortColumn[] | undefined) => void;
167
+ "update:options": (value?: TableOptions | undefined) => void;
168
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
169
+ sort: {
170
+ type: globalThis.PropType<SortColumn | SortColumn[]>;
171
+ default: undefined;
172
+ };
173
+ search: {
174
+ type: globalThis.PropType<string>;
175
+ default: string;
176
+ };
177
+ outlined: {
178
+ type: globalThis.PropType<boolean>;
179
+ };
180
+ loading: {
181
+ type: globalThis.PropType<boolean>;
182
+ default: boolean;
183
+ };
184
+ modelValue: {
185
+ type: globalThis.PropType<string[]>;
186
+ default: undefined;
187
+ };
188
+ dense: {
189
+ type: globalThis.PropType<boolean>;
190
+ };
191
+ empty: {
192
+ type: globalThis.PropType<{
193
+ label?: string | undefined;
194
+ description?: string | undefined;
195
+ }>;
196
+ default: () => {
197
+ label: string;
198
+ };
199
+ };
200
+ rows: {
201
+ type: globalThis.PropType<Record<string, any>[]>;
202
+ required: true;
203
+ };
204
+ rowAttr: {
205
+ type: globalThis.PropType<string>;
206
+ required: true;
207
+ };
208
+ pagination: {
209
+ type: globalThis.PropType<TablePaginationData>;
210
+ default: undefined;
211
+ };
212
+ paginationModifiers: {
213
+ type: globalThis.PropType<{
214
+ external: boolean;
215
+ }>;
216
+ default: undefined;
217
+ };
218
+ sortModifiers: {
219
+ type: globalThis.PropType<{
220
+ external: boolean;
221
+ }>;
222
+ default: undefined;
223
+ };
224
+ cols: {
225
+ type: globalThis.PropType<TableColumn[]>;
226
+ default: undefined;
227
+ };
228
+ columnAttr: {
229
+ type: globalThis.PropType<string>;
230
+ default: string;
231
+ };
232
+ }>> & {
233
+ "onUpdate:model-value"?: ((value?: string[] | undefined) => any) | undefined;
234
+ "onUpdate:pagination"?: ((value?: TablePaginationData | undefined) => any) | undefined;
235
+ "onUpdate:sort"?: ((value?: SortColumn | SortColumn[] | undefined) => any) | undefined;
236
+ "onUpdate:options"?: ((value?: TableOptions | undefined) => any) | undefined;
237
+ }, {
238
+ sort: SortColumn | SortColumn[];
239
+ search: string;
240
+ loading: boolean;
241
+ modelValue: string[];
242
+ empty: {
243
+ label?: string | undefined;
244
+ description?: string | undefined;
245
+ };
246
+ pagination: TablePaginationData;
247
+ paginationModifiers: {
248
+ external: boolean;
249
+ };
250
+ sortModifiers: {
251
+ external: boolean;
252
+ };
253
+ cols: TableColumn[];
254
+ columnAttr: string;
255
+ }, {}>, Partial<Record<string, (_: {
256
+ column: TableColumn | {
257
+ [x: string]: string | boolean;
258
+ key: string;
259
+ sortable: boolean;
260
+ class: string;
261
+ };
262
+ }) => any>> & Partial<Record<string, (_: {
263
+ column: TableColumn | {
264
+ [x: string]: string | boolean;
265
+ key: string;
266
+ sortable: boolean;
267
+ class: string;
268
+ };
269
+ row: Record<string, any>;
270
+ index: number;
271
+ }) => any>> & {
272
+ "no-data"?(_: {}): any;
273
+ "empty-description"?(_: {}): any;
274
+ tfoot?(_: {}): any;
275
+ }>;
276
+ export default _default;
277
+ type __VLS_WithTemplateSlots<T, S> = T & {
278
+ new (): {
279
+ $slots: S;
280
+ };
281
+ };
@@ -0,0 +1,46 @@
1
+ export interface TablePaginationData {
2
+ page: number;
3
+ total: number;
4
+ limit: number;
5
+ limits?: number[];
6
+ }
7
+ export interface Props {
8
+ modelValue: TablePaginationData;
9
+ dense?: boolean;
10
+ loading?: boolean;
11
+ }
12
+ declare const _default: import("vue").DefineComponent<{
13
+ loading: {
14
+ type: globalThis.PropType<boolean>;
15
+ default: boolean;
16
+ };
17
+ modelValue: {
18
+ type: globalThis.PropType<TablePaginationData>;
19
+ required: true;
20
+ };
21
+ dense: {
22
+ type: globalThis.PropType<boolean>;
23
+ default: boolean;
24
+ };
25
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:model-value": (value: TablePaginationData) => void;
27
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
28
+ loading: {
29
+ type: globalThis.PropType<boolean>;
30
+ default: boolean;
31
+ };
32
+ modelValue: {
33
+ type: globalThis.PropType<TablePaginationData>;
34
+ required: true;
35
+ };
36
+ dense: {
37
+ type: globalThis.PropType<boolean>;
38
+ default: boolean;
39
+ };
40
+ }>> & {
41
+ "onUpdate:model-value"?: ((value: TablePaginationData) => any) | undefined;
42
+ }, {
43
+ loading: boolean;
44
+ dense: boolean;
45
+ }, {}>;
46
+ export default _default;
@@ -0,0 +1,136 @@
1
+ import { type ContextColorsType } from '../../../consts/colors';
2
+ export interface Props {
3
+ color?: ContextColorsType;
4
+ disabled?: boolean;
5
+ grow?: boolean;
6
+ tabValue: number | string;
7
+ active?: boolean;
8
+ link?: boolean;
9
+ target?: string;
10
+ to?: string;
11
+ exact?: boolean;
12
+ exactPath?: boolean;
13
+ vertical?: boolean;
14
+ align?: 'start' | 'center' | 'end';
15
+ }
16
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
17
+ color: {
18
+ type: globalThis.PropType<"primary" | "secondary" | "error" | "warning" | "info" | "success">;
19
+ default: undefined;
20
+ };
21
+ link: {
22
+ type: globalThis.PropType<boolean>;
23
+ default: boolean;
24
+ };
25
+ target: {
26
+ type: globalThis.PropType<string>;
27
+ default: string;
28
+ };
29
+ to: {
30
+ type: globalThis.PropType<string>;
31
+ default: string;
32
+ };
33
+ disabled: {
34
+ type: globalThis.PropType<boolean>;
35
+ default: boolean;
36
+ };
37
+ active: {
38
+ type: globalThis.PropType<boolean>;
39
+ default: boolean;
40
+ };
41
+ vertical: {
42
+ type: globalThis.PropType<boolean>;
43
+ default: boolean;
44
+ };
45
+ align: {
46
+ type: globalThis.PropType<"end" | "center" | "start">;
47
+ default: string;
48
+ };
49
+ grow: {
50
+ type: globalThis.PropType<boolean>;
51
+ default: boolean;
52
+ };
53
+ tabValue: {
54
+ type: globalThis.PropType<string | number>;
55
+ required: true;
56
+ };
57
+ exact: {
58
+ type: globalThis.PropType<boolean>;
59
+ default: boolean;
60
+ };
61
+ exactPath: {
62
+ type: globalThis.PropType<boolean>;
63
+ default: boolean;
64
+ };
65
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
66
+ click: (tabValue: string | number) => void;
67
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
68
+ color: {
69
+ type: globalThis.PropType<"primary" | "secondary" | "error" | "warning" | "info" | "success">;
70
+ default: undefined;
71
+ };
72
+ link: {
73
+ type: globalThis.PropType<boolean>;
74
+ default: boolean;
75
+ };
76
+ target: {
77
+ type: globalThis.PropType<string>;
78
+ default: string;
79
+ };
80
+ to: {
81
+ type: globalThis.PropType<string>;
82
+ default: string;
83
+ };
84
+ disabled: {
85
+ type: globalThis.PropType<boolean>;
86
+ default: boolean;
87
+ };
88
+ active: {
89
+ type: globalThis.PropType<boolean>;
90
+ default: boolean;
91
+ };
92
+ vertical: {
93
+ type: globalThis.PropType<boolean>;
94
+ default: boolean;
95
+ };
96
+ align: {
97
+ type: globalThis.PropType<"end" | "center" | "start">;
98
+ default: string;
99
+ };
100
+ grow: {
101
+ type: globalThis.PropType<boolean>;
102
+ default: boolean;
103
+ };
104
+ tabValue: {
105
+ type: globalThis.PropType<string | number>;
106
+ required: true;
107
+ };
108
+ exact: {
109
+ type: globalThis.PropType<boolean>;
110
+ default: boolean;
111
+ };
112
+ exactPath: {
113
+ type: globalThis.PropType<boolean>;
114
+ default: boolean;
115
+ };
116
+ }>> & {
117
+ onClick?: ((tabValue: string | number) => any) | undefined;
118
+ }, {
119
+ color: "primary" | "secondary" | "error" | "warning" | "info" | "success";
120
+ link: boolean;
121
+ target: string;
122
+ to: string;
123
+ disabled: boolean;
124
+ active: boolean;
125
+ vertical: boolean;
126
+ align: "end" | "center" | "start";
127
+ grow: boolean;
128
+ exact: boolean;
129
+ exactPath: boolean;
130
+ }, {}>, Partial<Record<NonNullable<string | number>, (_: any) => any>> & Partial<Record<NonNullable<string | number>, (_: any) => any>> & Partial<Record<NonNullable<string | number>, (_: any) => any>>>;
131
+ export default _default;
132
+ type __VLS_WithTemplateSlots<T, S> = T & {
133
+ new (): {
134
+ $slots: S;
135
+ };
136
+ };
@@ -0,0 +1,53 @@
1
+ export interface Props {
2
+ active?: boolean;
3
+ value: number | string;
4
+ eager?: boolean;
5
+ reverse?: boolean;
6
+ }
7
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
8
+ reverse: {
9
+ type: globalThis.PropType<boolean>;
10
+ default: boolean;
11
+ };
12
+ value: {
13
+ type: globalThis.PropType<string | number>;
14
+ required: true;
15
+ };
16
+ active: {
17
+ type: globalThis.PropType<boolean>;
18
+ default: boolean;
19
+ };
20
+ eager: {
21
+ type: globalThis.PropType<boolean>;
22
+ default: boolean;
23
+ };
24
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ reverse: {
26
+ type: globalThis.PropType<boolean>;
27
+ default: boolean;
28
+ };
29
+ value: {
30
+ type: globalThis.PropType<string | number>;
31
+ required: true;
32
+ };
33
+ active: {
34
+ type: globalThis.PropType<boolean>;
35
+ default: boolean;
36
+ };
37
+ eager: {
38
+ type: globalThis.PropType<boolean>;
39
+ default: boolean;
40
+ };
41
+ }>>, {
42
+ reverse: boolean;
43
+ active: boolean;
44
+ eager: boolean;
45
+ }, {}>, {
46
+ default?(_: {}): any;
47
+ }>;
48
+ export default _default;
49
+ type __VLS_WithTemplateSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -0,0 +1,17 @@
1
+ export interface Props {
2
+ modelValue?: number | string;
3
+ }
4
+ declare const _default: import("vue").DefineComponent<{
5
+ modelValue: {
6
+ type: globalThis.PropType<string | number>;
7
+ default: undefined;
8
+ };
9
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
10
+ modelValue: {
11
+ type: globalThis.PropType<string | number>;
12
+ default: undefined;
13
+ };
14
+ }>>, {
15
+ modelValue: string | number;
16
+ }, {}>;
17
+ export default _default;
@@ -0,0 +1,72 @@
1
+ import { type ContextColorsType } from '../../../consts/colors';
2
+ export interface Props {
3
+ color?: ContextColorsType;
4
+ vertical?: boolean;
5
+ disabled?: boolean;
6
+ grow?: boolean;
7
+ modelValue?: number | string;
8
+ align?: 'start' | 'center' | 'end';
9
+ }
10
+ declare const _default: import("vue").DefineComponent<{
11
+ color: {
12
+ type: globalThis.PropType<"primary" | "secondary" | "error" | "warning" | "info" | "success">;
13
+ default: undefined;
14
+ };
15
+ disabled: {
16
+ type: globalThis.PropType<boolean>;
17
+ default: boolean;
18
+ };
19
+ vertical: {
20
+ type: globalThis.PropType<boolean>;
21
+ default: boolean;
22
+ };
23
+ modelValue: {
24
+ type: globalThis.PropType<string | number>;
25
+ default: undefined;
26
+ };
27
+ align: {
28
+ type: globalThis.PropType<"end" | "center" | "start">;
29
+ default: string;
30
+ };
31
+ grow: {
32
+ type: globalThis.PropType<boolean>;
33
+ default: boolean;
34
+ };
35
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ "update:modelValue": (modelValue: string | number) => void;
37
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
+ color: {
39
+ type: globalThis.PropType<"primary" | "secondary" | "error" | "warning" | "info" | "success">;
40
+ default: undefined;
41
+ };
42
+ disabled: {
43
+ type: globalThis.PropType<boolean>;
44
+ default: boolean;
45
+ };
46
+ vertical: {
47
+ type: globalThis.PropType<boolean>;
48
+ default: boolean;
49
+ };
50
+ modelValue: {
51
+ type: globalThis.PropType<string | number>;
52
+ default: undefined;
53
+ };
54
+ align: {
55
+ type: globalThis.PropType<"end" | "center" | "start">;
56
+ default: string;
57
+ };
58
+ grow: {
59
+ type: globalThis.PropType<boolean>;
60
+ default: boolean;
61
+ };
62
+ }>> & {
63
+ "onUpdate:modelValue"?: ((modelValue: string | number) => any) | undefined;
64
+ }, {
65
+ color: "primary" | "secondary" | "error" | "warning" | "info" | "success";
66
+ disabled: boolean;
67
+ vertical: boolean;
68
+ modelValue: string | number;
69
+ align: "end" | "center" | "start";
70
+ grow: boolean;
71
+ }, {}>;
72
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { u as s, a } from "../index-1f5d0d16.js";
1
+ import { u as s, a } from "../index-393a0e94.js";
2
2
  import "../all-icons.es.js";
3
3
  import "@vueuse/core";
4
4
  import "vue";