@rotki/ui-library 0.10.1 → 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.
- package/README.md +18 -3
- package/dist/components/alerts/Alert.vue.d.ts +2 -2
- package/dist/components/buttons/button/Button.vue.d.ts +1 -1
- package/dist/components/buttons/button-group/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/chips/Chip.vue.d.ts +2 -2
- package/dist/components/forms/auto-complete/AutoComplete.vue.d.ts +1 -1
- package/dist/components/forms/checkbox/Checkbox.vue.d.ts +1 -1
- package/dist/components/forms/radio-button/radio/Radio.vue.d.ts +1 -1
- package/dist/components/forms/radio-button/radio-group/RadioGroup.vue.d.ts +1 -1
- package/dist/components/forms/text-area/TextArea.vue.d.ts +2 -2
- package/dist/components/forms/text-field/TextField.vue.d.ts +2 -2
- package/dist/components/icons/Icon.vue.d.ts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.es.js +2 -2
- package/dist/components/overlays/badge/Badge.vue.d.ts +2 -2
- package/dist/components/progress/Progress.vue.d.ts +1 -1
- package/dist/components/tables/DataTable.vue.d.ts +71 -102
- package/dist/components/tables/ExpandButton.vue.d.ts +1 -1
- package/dist/components/tables/TableHead.vue.d.ts +4 -4
- package/dist/components/tabs/tab/Tab.vue.d.ts +1 -1
- package/dist/components/tabs/tabs/Tabs.vue.d.ts +1 -1
- package/dist/composables/breakpoint.d.ts +1 -1
- package/dist/composables/defaults/table.d.ts +4 -4
- package/dist/composables/icons.d.ts +1 -1
- package/dist/composables/index.es.js +17 -17
- package/dist/composables/popper.d.ts +7 -7
- package/dist/composables/sticky-header.d.ts +2 -2
- package/dist/composables/theme.d.ts +1 -1
- package/dist/consts/typography.d.ts +1 -1
- package/dist/{index-qKuRALnN.js → index-H4RSbryN.js} +3047 -2940
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +6 -6
- package/dist/style.css +1 -1
- package/dist/theme/index.es.js +51 -51
- package/dist/{theme-V5yenaDk.js → theme-DT8UjYf9.js} +44 -39
- package/dist/types/stepper.d.ts +3 -3
- package/dist/types/theme.d.ts +3 -3
- package/dist/utils/form-text-detail.d.ts +3 -3
- package/dist/utils/generate-id.d.ts +1 -1
- package/dist/utils/helpers.d.ts +7 -7
- 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>
|
|
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 © 2023- [Rotki Solutions GmbH](https://github.com/rotki)
|
|
195
|
-
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 {
|
|
2
|
-
import {
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
|
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-
|
|
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-
|
|
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 {
|
|
2
|
-
import {
|
|
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;
|
|
@@ -4,10 +4,12 @@ export interface TableOptions<T> {
|
|
|
4
4
|
pagination?: TablePaginationData;
|
|
5
5
|
sort?: SortColumn<T> | SortColumn<T>[];
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
"body.prepend"?(_: {
|
|
144
|
+
}) => any> & {
|
|
145
|
+
'body.prepend': (props: {
|
|
150
146
|
colspan: number;
|
|
151
|
-
})
|
|
152
|
-
|
|
147
|
+
}) => any;
|
|
148
|
+
'body.append': (props: {
|
|
153
149
|
colspan: number;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
}) => any;
|
|
151
|
+
'group.header': (props: {
|
|
152
|
+
colspan: number;
|
|
153
|
+
header: GroupHeader<T>;
|
|
158
154
|
isOpen: boolean;
|
|
159
155
|
toggle: () => void;
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
group: Partial<T> | undefined;
|
|
156
|
+
}) => any;
|
|
157
|
+
'group.header.content': (props: {
|
|
158
|
+
header: GroupHeader<T>;
|
|
164
159
|
groupKey: string;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
row: GroupedTableRow<T>;
|
|
160
|
+
}) => any;
|
|
161
|
+
'expanded-item': (props: {
|
|
162
|
+
row: T;
|
|
169
163
|
index: number;
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
|
193
|
-
column: TableColumn<T>;
|
|
194
|
-
}) => any>> & Partial<Record<string, (_: {
|
|
183
|
+
slots: Partial<Record<`header.${string}`, (props: {
|
|
195
184
|
column: TableColumn<T>;
|
|
196
|
-
}) => any
|
|
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
|
-
|
|
204
|
-
|
|
205
|
-
"body.prepend"?(_: {
|
|
189
|
+
}) => any> & {
|
|
190
|
+
'body.prepend': (props: {
|
|
206
191
|
colspan: number;
|
|
207
|
-
})
|
|
208
|
-
|
|
192
|
+
}) => any;
|
|
193
|
+
'body.append': (props: {
|
|
209
194
|
colspan: number;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
195
|
+
}) => any;
|
|
196
|
+
'group.header': (props: {
|
|
197
|
+
colspan: number;
|
|
198
|
+
header: GroupHeader<T>;
|
|
214
199
|
isOpen: boolean;
|
|
215
200
|
toggle: () => void;
|
|
216
|
-
})
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
group: Partial<T> | undefined;
|
|
201
|
+
}) => any;
|
|
202
|
+
'group.header.content': (props: {
|
|
203
|
+
header: GroupHeader<T>;
|
|
220
204
|
groupKey: string;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
row: GroupedTableRow<T>;
|
|
205
|
+
}) => any;
|
|
206
|
+
'expanded-item': (props: {
|
|
207
|
+
row: T;
|
|
225
208
|
index: number;
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
|
252
|
-
column: TableColumn<T>;
|
|
253
|
-
}) => any>> & Partial<Record<string, (_: {
|
|
231
|
+
slots: Partial<Record<`header.${string}`, (props: {
|
|
254
232
|
column: TableColumn<T>;
|
|
255
|
-
}) => any
|
|
233
|
+
}) => any> & Record<`item.${string}`, (props: {
|
|
256
234
|
column: TableColumn<T>;
|
|
257
|
-
row:
|
|
235
|
+
row: T;
|
|
258
236
|
index: number;
|
|
259
|
-
}) => any
|
|
260
|
-
|
|
261
|
-
index: number;
|
|
262
|
-
row: GroupedTableRow<T>;
|
|
263
|
-
}) => any>> & {
|
|
264
|
-
"body.prepend"?(_: {
|
|
237
|
+
}) => any> & {
|
|
238
|
+
'body.prepend': (props: {
|
|
265
239
|
colspan: number;
|
|
266
|
-
})
|
|
267
|
-
|
|
240
|
+
}) => any;
|
|
241
|
+
'body.append': (props: {
|
|
268
242
|
colspan: number;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
243
|
+
}) => any;
|
|
244
|
+
'group.header': (props: {
|
|
245
|
+
colspan: number;
|
|
246
|
+
header: GroupHeader<T>;
|
|
273
247
|
isOpen: boolean;
|
|
274
248
|
toggle: () => void;
|
|
275
|
-
})
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
group: Partial<T> | undefined;
|
|
249
|
+
}) => any;
|
|
250
|
+
'group.header.content': (props: {
|
|
251
|
+
header: GroupHeader<T>;
|
|
279
252
|
groupKey: string;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
row: GroupedTableRow<T>;
|
|
253
|
+
}) => any;
|
|
254
|
+
'expanded-item': (props: {
|
|
255
|
+
row: T;
|
|
284
256
|
index: number;
|
|
285
|
-
})
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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;
|
|
@@ -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;
|
|
@@ -75,7 +75,7 @@ declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_pr
|
|
|
75
75
|
emit: {
|
|
76
76
|
(e: 'select:all', value: boolean): void;
|
|
77
77
|
(e: 'sort', value: {
|
|
78
|
-
key:
|
|
78
|
+
key: TableRowKey<T>;
|
|
79
79
|
direction?: "desc" | "asc" | undefined;
|
|
80
80
|
}): void;
|
|
81
81
|
};
|
|
@@ -89,7 +89,7 @@ declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_pr
|
|
|
89
89
|
emit: {
|
|
90
90
|
(e: 'select:all', value: boolean): void;
|
|
91
91
|
(e: 'sort', value: {
|
|
92
|
-
key:
|
|
92
|
+
key: TableRowKey<T>;
|
|
93
93
|
direction?: "desc" | "asc" | undefined;
|
|
94
94
|
}): void;
|
|
95
95
|
};
|
|
@@ -106,7 +106,7 @@ declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_pr
|
|
|
106
106
|
emit: {
|
|
107
107
|
(e: 'select:all', value: boolean): void;
|
|
108
108
|
(e: 'sort', value: {
|
|
109
|
-
key:
|
|
109
|
+
key: TableRowKey<T>;
|
|
110
110
|
direction?: "desc" | "asc" | undefined;
|
|
111
111
|
}): void;
|
|
112
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function useBreakpoint(): any;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
|
10
|
-
export declare
|
|
9
|
+
export declare function createTableDefaults(options?: Partial<TableOptions>): TableOptions;
|
|
10
|
+
export declare function useTable(): TableOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as A, a as $ } from "../theme-
|
|
1
|
+
import { u as A, a as $ } from "../theme-DT8UjYf9.js";
|
|
2
2
|
import { useWindowSize as m, breakpointsTailwind as d, useBreakpoints as w } from "@vueuse/core";
|
|
3
3
|
import { computed as _ } from "vue";
|
|
4
4
|
import { get as h } from "@vueuse/shared";
|
|
@@ -22,19 +22,19 @@ function S(e, n) {
|
|
|
22
22
|
r.push(t), t = "", i = void 0;
|
|
23
23
|
continue;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const u = E(c);
|
|
26
26
|
if (p === !1) {
|
|
27
|
-
if (i === !1 &&
|
|
28
|
-
r.push(t), t = c, i =
|
|
27
|
+
if (i === !1 && u === !0) {
|
|
28
|
+
r.push(t), t = c, i = u;
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
|
-
if (i === !0 &&
|
|
31
|
+
if (i === !0 && u === !1 && t.length > 1) {
|
|
32
32
|
const s = t.at(-1);
|
|
33
|
-
r.push(t.slice(0, Math.max(0, t.length - 1))), t = s + c, i =
|
|
33
|
+
r.push(t.slice(0, Math.max(0, t.length - 1))), t = s + c, i = u;
|
|
34
34
|
continue;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
t += c, i =
|
|
37
|
+
t += c, i = u, p = f;
|
|
38
38
|
}
|
|
39
39
|
return r.push(t), r;
|
|
40
40
|
}
|
|
@@ -50,36 +50,36 @@ function R(e, n) {
|
|
|
50
50
|
function l(e, n) {
|
|
51
51
|
return z(R(e || "", n));
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
function B() {
|
|
54
54
|
const { width: e } = m(), n = {
|
|
55
55
|
xs: 0,
|
|
56
56
|
...d
|
|
57
57
|
}, o = w(n), r = Object.keys, t = r(n), i = t.map(
|
|
58
|
-
(s,
|
|
58
|
+
(s, a) => [
|
|
59
59
|
s,
|
|
60
|
-
|
|
60
|
+
a < t.length - 1 ? o.between(s, t[a + 1]) : o[s]
|
|
61
61
|
]
|
|
62
|
-
), p = i.map(([s,
|
|
62
|
+
), p = i.map(([s, a]) => [
|
|
63
63
|
l(`is_${s}`),
|
|
64
|
-
|
|
64
|
+
a
|
|
65
65
|
]), c = t.map((s) => [
|
|
66
66
|
l(`is_${s}_and_up`),
|
|
67
67
|
o.greaterOrEqual(s)
|
|
68
68
|
]), f = t.map((s) => [
|
|
69
69
|
l(`is_${s}_and_down`),
|
|
70
70
|
o.smaller(s)
|
|
71
|
-
]),
|
|
71
|
+
]), u = _(() => {
|
|
72
72
|
var s;
|
|
73
|
-
return ((s = i.find((
|
|
73
|
+
return ((s = i.find((a) => h(a[1]))) == null ? void 0 : s[0]) || "";
|
|
74
74
|
});
|
|
75
75
|
return {
|
|
76
76
|
...Object.fromEntries(p),
|
|
77
77
|
...Object.fromEntries(c),
|
|
78
78
|
...Object.fromEntries(f),
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
name: u,
|
|
80
|
+
width: e
|
|
81
81
|
};
|
|
82
|
-
}
|
|
82
|
+
}
|
|
83
83
|
export {
|
|
84
84
|
B as useBreakpoint,
|
|
85
85
|
A as useIcons,
|