@rotki/ui-library 0.10.0 → 0.11.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 (42) hide show
  1. package/README.md +18 -3
  2. package/dist/components/alerts/Alert.vue.d.ts +2 -2
  3. package/dist/components/buttons/button/Button.vue.d.ts +1 -1
  4. package/dist/components/buttons/button-group/ButtonGroup.vue.d.ts +1 -1
  5. package/dist/components/chips/Chip.vue.d.ts +2 -2
  6. package/dist/components/forms/auto-complete/AutoComplete.vue.d.ts +1 -1
  7. package/dist/components/forms/checkbox/Checkbox.vue.d.ts +1 -1
  8. package/dist/components/forms/radio-button/radio/Radio.vue.d.ts +1 -1
  9. package/dist/components/forms/radio-button/radio-group/RadioGroup.vue.d.ts +1 -1
  10. package/dist/components/forms/text-area/TextArea.vue.d.ts +2 -2
  11. package/dist/components/forms/text-field/TextField.vue.d.ts +2 -2
  12. package/dist/components/icons/Icon.vue.d.ts +2 -2
  13. package/dist/components/index.d.ts +2 -2
  14. package/dist/components/index.es.js +2 -2
  15. package/dist/components/overlays/badge/Badge.vue.d.ts +2 -2
  16. package/dist/components/progress/Progress.vue.d.ts +1 -1
  17. package/dist/components/tables/DataTable.vue.d.ts +71 -102
  18. package/dist/components/tables/ExpandButton.vue.d.ts +1 -1
  19. package/dist/components/tables/TableHead.vue.d.ts +6 -4
  20. package/dist/components/tabs/tab/Tab.vue.d.ts +1 -1
  21. package/dist/components/tabs/tabs/Tabs.vue.d.ts +1 -1
  22. package/dist/composables/breakpoint.d.ts +1 -1
  23. package/dist/composables/defaults/table.d.ts +4 -4
  24. package/dist/composables/icons.d.ts +1 -1
  25. package/dist/composables/index.es.js +17 -17
  26. package/dist/composables/popper.d.ts +7 -7
  27. package/dist/composables/sticky-header.d.ts +2 -2
  28. package/dist/composables/theme.d.ts +1 -1
  29. package/dist/consts/typography.d.ts +1 -1
  30. package/dist/icons/icons_6.es.js +2 -2
  31. package/dist/{index-2kT4UFtO.js → index-H4RSbryN.js} +3137 -3021
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.es.js +6 -6
  34. package/dist/style.css +1 -1
  35. package/dist/theme/index.es.js +51 -51
  36. package/dist/{theme-V5yenaDk.js → theme-DT8UjYf9.js} +44 -39
  37. package/dist/types/stepper.d.ts +3 -3
  38. package/dist/types/theme.d.ts +3 -3
  39. package/dist/utils/form-text-detail.d.ts +3 -3
  40. package/dist/utils/generate-id.d.ts +1 -1
  41. package/dist/utils/helpers.d.ts +7 -7
  42. package/package.json +45 -44
package/README.md CHANGED
@@ -6,7 +6,7 @@ A Vue component library and design system for rotki
6
6
 
7
7
  ### Installing the library
8
8
 
9
- You can start using the library after installing it from npm along with the roboto font:
9
+ You can start using the library after installing it from npm along with the roboto font:
10
10
 
11
11
  ```bash
12
12
  pnpm install -D --save-exact @rotki/ui-library @fontsource/roboto
@@ -45,7 +45,9 @@ import { RuiButton } from '@rotki/ui-library';
45
45
 
46
46
  <template>
47
47
  <div>
48
- <RuiButton outlined>This is button</RuiButton>
48
+ <RuiButton outlined>
49
+ This is button
50
+ </RuiButton>
49
51
  </div>
50
52
  </template>
51
53
  ```
@@ -71,6 +73,7 @@ switchThemeScheme(ThemeMode.dark);
71
73
  ### Using the icons
72
74
 
73
75
  You need to specify which icons you want to enable, when installing the RuiPlugin.
76
+
74
77
  ```typescript
75
78
  import { Ri4kFill, Ri4kLine, createRui } from '@rotki/ui-library';
76
79
 
@@ -96,6 +99,7 @@ import { RuiIcon } from '@rotki/ui-library';
96
99
  ```
97
100
 
98
101
  ### Use @rotki/ui-library tailwindcss theme
102
+
99
103
  You can extend @rotki/ui-library tailwind theme configuration by adding these to your tailwind config. It will provide you the classes for the colors, typography, and shadow.
100
104
 
101
105
  ```javascript
@@ -118,33 +122,40 @@ pnpm install --frozen-lockfile
118
122
  ```
119
123
 
120
124
  ### Compiles and minifies for production
125
+
121
126
  The following command when executed from the project root will build the `@rotki/ui-library` bundle.
122
127
  This command will create the bundle for both Vue version >=3.4.3.
128
+
123
129
  ```
124
130
  pnpm run build:prod
125
131
  ```
126
132
 
127
133
  If you want to build for specific version, you can run:
134
+
128
135
  ```
129
136
  pnpm run build
130
137
  ```
131
138
 
132
139
  ### Lint check
140
+
133
141
  ```
134
142
  pnpm run lint
135
143
  ```
136
144
 
137
145
  ### Lints and fixes files
146
+
138
147
  ```
139
148
  pnpm run lint:fix
140
149
  ```
141
150
 
142
151
  ### Type check
152
+
143
153
  ```
144
154
  pnpm run typecheck
145
155
  ```
146
156
 
147
157
  ### Storybook
158
+
148
159
  In order to run the storybook, you can run:
149
160
 
150
161
  ```
@@ -152,6 +163,7 @@ pnpm run storybook
152
163
  ```
153
164
 
154
165
  ### Testing: Unit
166
+
155
167
  In order to test the components, you can run:
156
168
 
157
169
  ```
@@ -159,6 +171,7 @@ pnpm run test
159
171
  ```
160
172
 
161
173
  ### Testing: end-to-end
174
+
162
175
  In order to test the components in use in a vue 3 project, you can run:
163
176
 
164
177
  ```
@@ -173,6 +186,7 @@ pnpm run coverage:preview
173
186
  ```
174
187
 
175
188
  ### Locally testing the library
189
+
176
190
  After you build the bundle, in the `package.json` on your main project, you can add this to the dependencies:
177
191
 
178
192
  ```json
@@ -184,7 +198,9 @@ After you build the bundle, in the `package.json` on your main project, you can
184
198
  When the dependency installed on the main project, it will run the `prepare` script.
185
199
 
186
200
  ### Generating the library icons
201
+
187
202
  We use remix-icons. You need to run this script to scrap the svgs data from remix-icons. (This script runs automatically on `prepare`. Run this in case the icons aren't generated properly)
203
+
188
204
  ```
189
205
  pnpm run generate:icons
190
206
  ```
@@ -192,4 +208,3 @@ pnpm run generate:icons
192
208
  ## License
193
209
 
194
210
  [AGPL-3.0](./LICENSE) License &copy; 2023- [Rotki Solutions GmbH](https://github.com/rotki)
195
-
@@ -1,5 +1,5 @@
1
- import { type ContextColorsType } from '../../consts/colors';
2
- import { type RuiIcons } from '~/src';
1
+ import type { ContextColorsType } from '../../consts/colors';
2
+ import type { RuiIcons } from '~/src';
3
3
  export interface Props {
4
4
  title?: string;
5
5
  description?: string;
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
2
  export interface Props<T = undefined> {
3
3
  disabled?: boolean;
4
4
  loading?: boolean;
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
2
  export interface Props<T = undefined> {
3
3
  vertical?: boolean;
4
4
  color?: ContextColorsType;
@@ -1,5 +1,5 @@
1
- import { type ContextColorsType } from '../../consts/colors';
2
- import { type RuiIcons } from '~/src';
1
+ import type { ContextColorsType } from '../../consts/colors';
2
+ import type { RuiIcons } from '~/src';
3
3
  export interface Props {
4
4
  tile?: boolean;
5
5
  clickable?: boolean;
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
2
  export type Option = Record<string, any>;
3
3
  export type ModelValue = Option | Option[] | null;
4
4
  export interface Props {
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
2
  export interface Props {
3
3
  modelValue?: boolean;
4
4
  indeterminate?: boolean;
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../../../consts/colors';
1
+ import type { ContextColorsType } from '../../../../consts/colors';
2
2
  export interface RadioProps {
3
3
  value: string;
4
4
  modelValue?: string;
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '~/src';
1
+ import type { ContextColorsType } from '~/src';
2
2
  export interface Props {
3
3
  modelValue?: string;
4
4
  inline?: boolean;
@@ -1,5 +1,5 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
2
- import { type RuiIcons } from '~/src';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
+ import type { RuiIcons } from '~/src';
3
3
  export interface Props {
4
4
  value?: string;
5
5
  label?: string;
@@ -1,5 +1,5 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
2
- import { type RuiIcons } from '~/src';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
+ import type { RuiIcons } from '~/src';
3
3
  export interface TextFieldProps {
4
4
  modelValue?: string;
5
5
  label?: string;
@@ -1,5 +1,5 @@
1
- import { type ContextColorsType } from '../../consts/colors';
2
- import { type RuiIcons } from '~/src';
1
+ import type { ContextColorsType } from '../../consts/colors';
2
+ import type { RuiIcons } from '~/src';
3
3
  export interface Props {
4
4
  name: RuiIcons;
5
5
  size?: number | string;
@@ -15,11 +15,10 @@ import { type Props as DialogProps, default as RuiDialog } from '../components/o
15
15
  import { type Props as FooterStepperProps, default as RuiFooterStepper } from '../components/steppers/FooterStepper.vue';
16
16
  import { type Props as ProgressProps, default as RuiProgress } from '../components/progress/Progress.vue';
17
17
  import { type Props as RadioGroupProps, default as RuiRadioGroup } from '../components/forms/radio-button/radio-group/RadioGroup.vue';
18
- import { type RadioProps as RadioProps, default as RuiRadio } from '../components/forms/radio-button/radio/Radio.vue';
18
+ import { type RadioProps, default as RuiRadio } from '../components/forms/radio-button/radio/Radio.vue';
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 GroupKeys as DataTableGroupKeys, type SortColumn as DataTableSortColumn, type TableSortData as DataTableSortData } from '../components/tables/TableHead.vue';
23
22
  import { type TableOptions as DataTableOptions, type Props as DataTableProps, default as RuiDataTable } from '../components/tables/DataTable.vue';
24
23
  import { type Props as ExpandButtonProps, default as RuiTableRowExpander } from '../components/tables/ExpandButton.vue';
25
24
  import { default as RuiTablePagination, type TablePaginationData, type Props as TablePaginationProps } from '../components/tables/TablePagination.vue';
@@ -30,4 +29,5 @@ import { default as RuiTab, type Props as TabProps } from '../components/tabs/ta
30
29
  import { default as RuiTabItems, type Props as TabItemsProps } from '../components/tabs/tab-items/TabItems.vue';
31
30
  import { default as RuiTabItem, type Props as TabItemProps } from '../components/tabs/tab-item/TabItem.vue';
32
31
  import { default as RuiSkeletonLoader, type Props as SkeletonLoaderProps } from '../components/loaders/Skeleton.vue';
32
+ import type { TableColumn as DataTableColumn, GroupKeys as DataTableGroupKeys, SortColumn as DataTableSortColumn, TableSortData as DataTableSortData } from '../components/tables/TableHead.vue';
33
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,7 +1,7 @@
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-2kT4UFtO.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-H4RSbryN.js";
2
2
  import "vue";
3
3
  import "@vueuse/shared";
4
- import "../theme-V5yenaDk.js";
4
+ import "../theme-DT8UjYf9.js";
5
5
  import "../icons/icons_1.es.js";
6
6
  import "../icons/icons_2.es.js";
7
7
  import "../icons/icons_5.es.js";
@@ -1,5 +1,5 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
2
- import { type RuiIcons } from '~/src';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
+ import type { RuiIcons } from '~/src';
3
3
  export interface Props {
4
4
  text?: string | null;
5
5
  icon?: RuiIcons | null;
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../consts/colors';
1
+ import type { ContextColorsType } from '../../consts/colors';
2
2
  export interface Props {
3
3
  /**
4
4
  * in percentage value, required when variant === determinate or buffer
@@ -4,10 +4,12 @@ export interface TableOptions<T> {
4
4
  pagination?: TablePaginationData;
5
5
  sort?: SortColumn<T> | SortColumn<T>[];
6
6
  }
7
- export type GroupedTableRow<T> = T & Partial<{
8
- groupVal: string;
7
+ export interface GroupHeader<T> {
8
+ __header__: true;
9
+ identifier: string;
9
10
  group: Partial<T>;
10
- }>;
11
+ }
12
+ export type GroupedTableRow<T> = T | GroupHeader<T>;
11
13
  export interface Props<T, K extends keyof T> {
12
14
  /**
13
15
  * list of items for each row
@@ -133,48 +135,37 @@ declare const _default: <T extends object, IdType extends keyof T = keyof T>(__V
133
135
  props: Props<T, IdType>;
134
136
  expose(exposed: {}): void;
135
137
  attrs: any;
136
- slots: Partial<Record<string, (_: {
137
- column: TableColumn<T>;
138
- }) => any>> & Partial<Record<string, (_: {
139
- column: TableColumn<T>;
140
- }) => any>> & Partial<Record<string, (_: {
138
+ slots: Partial<Record<`header.${string}`, (props: {
141
139
  column: TableColumn<T>;
142
- row: GroupedTableRow<T>;
143
- index: number;
144
- }) => any>> & Partial<Record<string, (_: {
140
+ }) => any> & Record<`item.${string}`, (props: {
145
141
  column: TableColumn<T>;
142
+ row: T;
146
143
  index: number;
147
- row: GroupedTableRow<T>;
148
- }) => any>> & {
149
- "body.prepend"?(_: {
144
+ }) => any> & {
145
+ 'body.prepend': (props: {
150
146
  colspan: number;
151
- }): any;
152
- "group.header"?(_: {
147
+ }) => any;
148
+ 'body.append': (props: {
153
149
  colspan: number;
154
- row: GroupedTableRow<T>;
155
- group: Partial<T> | undefined;
156
- groupKey: string;
157
- groupValue: string | undefined;
150
+ }) => any;
151
+ 'group.header': (props: {
152
+ colspan: number;
153
+ header: GroupHeader<T>;
158
154
  isOpen: boolean;
159
155
  toggle: () => void;
160
- }): any;
161
- "group.header.content"?(_: {
162
- row: GroupedTableRow<T>;
163
- group: Partial<T> | undefined;
156
+ }) => any;
157
+ 'group.header.content': (props: {
158
+ header: GroupHeader<T>;
164
159
  groupKey: string;
165
- groupValue: string | undefined;
166
- }): any;
167
- "expanded-item"?(_: {
168
- row: GroupedTableRow<T>;
160
+ }) => any;
161
+ 'expanded-item': (props: {
162
+ row: T;
169
163
  index: number;
170
- }): any;
171
- "no-data"?(_: {}): any;
172
- "empty-description"?(_: {}): any;
173
- "body.append"?(_: {
174
- colspan: number;
175
- }): any;
176
- tfoot?(_: {}): any;
177
- };
164
+ }) => any;
165
+ 'no-data': () => any;
166
+ 'empty-description': () => any;
167
+ tfoot: () => any;
168
+ }>;
178
169
  emit: {
179
170
  (e: 'update:model-value', value?: T[IdType][] | undefined): void;
180
171
  (e: 'update:expanded', value: T[]): void;
@@ -189,48 +180,37 @@ declare const _default: <T extends object, IdType extends keyof T = keyof T>(__V
189
180
  props: Props<T, IdType>;
190
181
  expose(exposed: {}): void;
191
182
  attrs: any;
192
- slots: Partial<Record<string, (_: {
193
- column: TableColumn<T>;
194
- }) => any>> & Partial<Record<string, (_: {
183
+ slots: Partial<Record<`header.${string}`, (props: {
195
184
  column: TableColumn<T>;
196
- }) => any>> & Partial<Record<string, (_: {
197
- column: TableColumn<T>;
198
- row: GroupedTableRow<T>;
199
- index: number;
200
- }) => any>> & Partial<Record<string, (_: {
185
+ }) => any> & Record<`item.${string}`, (props: {
201
186
  column: TableColumn<T>;
187
+ row: T;
202
188
  index: number;
203
- row: GroupedTableRow<T>;
204
- }) => any>> & {
205
- "body.prepend"?(_: {
189
+ }) => any> & {
190
+ 'body.prepend': (props: {
206
191
  colspan: number;
207
- }): any;
208
- "group.header"?(_: {
192
+ }) => any;
193
+ 'body.append': (props: {
209
194
  colspan: number;
210
- row: GroupedTableRow<T>;
211
- group: Partial<T> | undefined;
212
- groupKey: string;
213
- groupValue: string | undefined;
195
+ }) => any;
196
+ 'group.header': (props: {
197
+ colspan: number;
198
+ header: GroupHeader<T>;
214
199
  isOpen: boolean;
215
200
  toggle: () => void;
216
- }): any;
217
- "group.header.content"?(_: {
218
- row: GroupedTableRow<T>;
219
- group: Partial<T> | undefined;
201
+ }) => any;
202
+ 'group.header.content': (props: {
203
+ header: GroupHeader<T>;
220
204
  groupKey: string;
221
- groupValue: string | undefined;
222
- }): any;
223
- "expanded-item"?(_: {
224
- row: GroupedTableRow<T>;
205
+ }) => any;
206
+ 'expanded-item': (props: {
207
+ row: T;
225
208
  index: number;
226
- }): any;
227
- "no-data"?(_: {}): any;
228
- "empty-description"?(_: {}): any;
229
- "body.append"?(_: {
230
- colspan: number;
231
- }): any;
232
- tfoot?(_: {}): any;
233
- };
209
+ }) => any;
210
+ 'no-data': () => any;
211
+ 'empty-description': () => any;
212
+ tfoot: () => any;
213
+ }>;
234
214
  emit: {
235
215
  (e: 'update:model-value', value?: T[IdType][] | undefined): void;
236
216
  (e: 'update:expanded', value: T[]): void;
@@ -248,48 +228,37 @@ declare const _default: <T extends object, IdType extends keyof T = keyof T>(__V
248
228
  props: Props<T, IdType>;
249
229
  expose(exposed: {}): void;
250
230
  attrs: any;
251
- slots: Partial<Record<string, (_: {
252
- column: TableColumn<T>;
253
- }) => any>> & Partial<Record<string, (_: {
231
+ slots: Partial<Record<`header.${string}`, (props: {
254
232
  column: TableColumn<T>;
255
- }) => any>> & Partial<Record<string, (_: {
233
+ }) => any> & Record<`item.${string}`, (props: {
256
234
  column: TableColumn<T>;
257
- row: GroupedTableRow<T>;
235
+ row: T;
258
236
  index: number;
259
- }) => any>> & Partial<Record<string, (_: {
260
- column: TableColumn<T>;
261
- index: number;
262
- row: GroupedTableRow<T>;
263
- }) => any>> & {
264
- "body.prepend"?(_: {
237
+ }) => any> & {
238
+ 'body.prepend': (props: {
265
239
  colspan: number;
266
- }): any;
267
- "group.header"?(_: {
240
+ }) => any;
241
+ 'body.append': (props: {
268
242
  colspan: number;
269
- row: GroupedTableRow<T>;
270
- group: Partial<T> | undefined;
271
- groupKey: string;
272
- groupValue: string | undefined;
243
+ }) => any;
244
+ 'group.header': (props: {
245
+ colspan: number;
246
+ header: GroupHeader<T>;
273
247
  isOpen: boolean;
274
248
  toggle: () => void;
275
- }): any;
276
- "group.header.content"?(_: {
277
- row: GroupedTableRow<T>;
278
- group: Partial<T> | undefined;
249
+ }) => any;
250
+ 'group.header.content': (props: {
251
+ header: GroupHeader<T>;
279
252
  groupKey: string;
280
- groupValue: string | undefined;
281
- }): any;
282
- "expanded-item"?(_: {
283
- row: GroupedTableRow<T>;
253
+ }) => any;
254
+ 'expanded-item': (props: {
255
+ row: T;
284
256
  index: number;
285
- }): any;
286
- "no-data"?(_: {}): any;
287
- "empty-description"?(_: {}): any;
288
- "body.append"?(_: {
289
- colspan: number;
290
- }): any;
291
- tfoot?(_: {}): any;
292
- };
257
+ }) => any;
258
+ 'no-data': () => any;
259
+ 'empty-description': () => any;
260
+ tfoot: () => any;
261
+ }>;
293
262
  emit: {
294
263
  (e: 'update:model-value', value?: T[IdType][] | undefined): void;
295
264
  (e: 'update:expanded', value: T[]): void;
@@ -1,4 +1,4 @@
1
- import { type RuiIcons } from '~/src';
1
+ import type { RuiIcons } from '~/src';
2
2
  export interface Props {
3
3
  expanded: boolean;
4
4
  icon?: RuiIcons;
@@ -3,7 +3,7 @@
3
3
  * The column name must be a key of the passed data object type.
4
4
  * @template T - The type of the data in the column.
5
5
  */
6
- export type TableRowKey<T> = keyof T;
6
+ export type TableRowKey<T> = keyof T extends string ? keyof T : never;
7
7
  export interface BaseTableColumn<T> {
8
8
  key: TableRowKey<T> | string;
9
9
  sortable?: boolean;
@@ -11,6 +11,8 @@ export interface BaseTableColumn<T> {
11
11
  align?: 'start' | 'center' | 'end';
12
12
  class?: string;
13
13
  cellClass?: string;
14
+ colspan?: string | number;
15
+ rowspan?: string | number;
14
16
  [key: string]: any;
15
17
  }
16
18
  /**
@@ -73,7 +75,7 @@ declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_pr
73
75
  emit: {
74
76
  (e: 'select:all', value: boolean): void;
75
77
  (e: 'sort', value: {
76
- key: keyof T;
78
+ key: TableRowKey<T>;
77
79
  direction?: "desc" | "asc" | undefined;
78
80
  }): void;
79
81
  };
@@ -87,7 +89,7 @@ declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_pr
87
89
  emit: {
88
90
  (e: 'select:all', value: boolean): void;
89
91
  (e: 'sort', value: {
90
- key: keyof T;
92
+ key: TableRowKey<T>;
91
93
  direction?: "desc" | "asc" | undefined;
92
94
  }): void;
93
95
  };
@@ -104,7 +106,7 @@ declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_pr
104
106
  emit: {
105
107
  (e: 'select:all', value: boolean): void;
106
108
  (e: 'sort', value: {
107
- key: keyof T;
109
+ key: TableRowKey<T>;
108
110
  direction?: "desc" | "asc" | undefined;
109
111
  }): void;
110
112
  };
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
2
  export interface Props {
3
3
  color?: ContextColorsType;
4
4
  disabled?: boolean;
@@ -1,4 +1,4 @@
1
- import { type ContextColorsType } from '../../../consts/colors';
1
+ import type { ContextColorsType } from '../../../consts/colors';
2
2
  export interface Props {
3
3
  color?: ContextColorsType;
4
4
  vertical?: boolean;
@@ -1 +1 @@
1
- export declare const useBreakpoint: () => any;
1
+ export declare function useBreakpoint(): any;
@@ -1,10 +1,10 @@
1
- import { type InjectionKey, type Ref } from 'vue';
2
- import { type MaybeRef } from '@vueuse/shared';
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { MaybeRef } from '@vueuse/shared';
3
3
  export interface TableOptions {
4
4
  itemsPerPage: Ref<number>;
5
5
  globalItemsPerPage: MaybeRef<boolean>;
6
6
  limits: MaybeRef<number[]>;
7
7
  }
8
8
  export declare const TableSymbol: InjectionKey<TableOptions>;
9
- export declare const createTableDefaults: (options?: Partial<TableOptions>) => TableOptions;
10
- export declare const useTable: () => TableOptions;
9
+ export declare function createTableDefaults(options?: Partial<TableOptions>): TableOptions;
10
+ export declare function useTable(): TableOptions;
@@ -1,4 +1,4 @@
1
- import { type GeneratedIcon } from '../types/icons';
1
+ import type { GeneratedIcon } from '../types/icons';
2
2
  export declare const useIcons: () => {
3
3
  registeredIcons: globalThis.Ref<Record<string, string>>;
4
4
  registerIcons: (iconsToAdd: GeneratedIcon[]) => void;