@rotki/ui-library 0.2.4 → 0.3.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/dist/all-icons.d.ts +44 -0
- package/dist/all-icons.es.js +4829 -4657
- package/dist/components/alerts/Alert.vue.d.ts +18 -9
- package/dist/components/cards/Card.vue.d.ts +60 -0
- package/dist/components/cards/CardHeader.vue.d.ts +26 -0
- package/dist/components/forms/select/SimpleSelect.vue.d.ts +59 -0
- package/dist/components/forms/text-field/TextField.vue.d.ts +14 -13
- package/dist/components/icons/Icon.vue.d.ts +4 -3
- package/dist/components/index.d.ts +9 -4
- package/dist/components/index.es.js +22 -17
- package/dist/components/logos/Logo.vue.d.ts +10 -0
- package/dist/components/overlays/dialog/Dialog.vue.d.ts +60 -0
- package/dist/components/overlays/tooltip/Tooltip.vue.d.ts +78 -0
- package/dist/components/tables/DataTable.vue.d.ts +280 -0
- package/dist/components/tables/TablePagination.vue.d.ts +46 -0
- package/dist/composables/index.es.js +1 -1
- package/dist/composables/popper.d.ts +251 -0
- package/dist/index-2304aade.js +115 -0
- package/dist/index-63107447.js +5008 -0
- package/dist/index.es.js +2560 -2512
- package/dist/style.css +1 -1
- package/dist/theme/index.es.js +3 -3
- package/dist/utils/helpers.d.ts +24 -0
- package/package.json +27 -26
- package/dist/index-1f5d0d16.js +0 -110
- package/dist/index-b6044b77.js +0 -2336
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { type TablePaginationData } from './TablePagination.vue';
|
|
2
|
+
export interface TableColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
sortable?: boolean;
|
|
5
|
+
direction?: 'asc' | 'desc';
|
|
6
|
+
align?: 'left' | 'right';
|
|
7
|
+
class?: string;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface SortColumn {
|
|
11
|
+
column?: string;
|
|
12
|
+
direction: 'asc' | 'desc';
|
|
13
|
+
}
|
|
14
|
+
export interface TableOptions {
|
|
15
|
+
pagination?: TablePaginationData;
|
|
16
|
+
sort?: SortColumn | SortColumn[];
|
|
17
|
+
}
|
|
18
|
+
export interface Props {
|
|
19
|
+
/**
|
|
20
|
+
* list of items for each row
|
|
21
|
+
*/
|
|
22
|
+
rows: Array<Record<string, any>>;
|
|
23
|
+
/**
|
|
24
|
+
* the attribute used to identify each row uniquely for selection, usually `id`
|
|
25
|
+
*/
|
|
26
|
+
rowAttr: string;
|
|
27
|
+
/**
|
|
28
|
+
* model for selected rows, add a v-model to support row selection
|
|
29
|
+
*/
|
|
30
|
+
modelValue?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* model for insternal searching
|
|
33
|
+
*/
|
|
34
|
+
search?: string;
|
|
35
|
+
/**
|
|
36
|
+
* model for paginating data
|
|
37
|
+
* @example v-model:pagination="{ total: 10, limit: 5, page: 1 }"
|
|
38
|
+
*/
|
|
39
|
+
pagination?: TablePaginationData;
|
|
40
|
+
/**
|
|
41
|
+
* modifiers for specifying externally paginated tables
|
|
42
|
+
* use this when api controls pagination
|
|
43
|
+
* @example v-model:pagination.external="{ total: 10, limit: 5, page: 1 }"
|
|
44
|
+
*/
|
|
45
|
+
paginationModifiers?: {
|
|
46
|
+
external: boolean;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* model for sort column/columns data
|
|
50
|
+
* single column sort
|
|
51
|
+
* @example v-model:sort="{ column: 'name', direction: 'asc' }"
|
|
52
|
+
* multi columns sort
|
|
53
|
+
* @example v-model:sort="[{ column: 'name', direction: 'asc' }]"
|
|
54
|
+
*/
|
|
55
|
+
sort?: SortColumn | SortColumn[];
|
|
56
|
+
/**
|
|
57
|
+
* modifiers for specifying externally sorted tables
|
|
58
|
+
* use this when api controls sorting
|
|
59
|
+
* single column sort
|
|
60
|
+
* @example v-model:sort.external="{ column: 'name', direction: 'asc' }"
|
|
61
|
+
* multi columns sort
|
|
62
|
+
* @example v-model:sort.external="[{ column: 'name', direction: 'asc' }]"
|
|
63
|
+
*/
|
|
64
|
+
sortModifiers?: {
|
|
65
|
+
external: boolean;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* list of column definitions
|
|
69
|
+
*/
|
|
70
|
+
cols?: Array<TableColumn>;
|
|
71
|
+
/**
|
|
72
|
+
* attribute to use from column definitions to display column titles
|
|
73
|
+
*/
|
|
74
|
+
columnAttr?: string;
|
|
75
|
+
/**
|
|
76
|
+
* flag to show a more or less spaceous table
|
|
77
|
+
*/
|
|
78
|
+
dense?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* flag to outline the flag with a border
|
|
81
|
+
*/
|
|
82
|
+
outlined?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* flag to show loading state of the table
|
|
85
|
+
* triggers an indefinite progress at the bottom of the table header
|
|
86
|
+
*/
|
|
87
|
+
loading?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* data to display for empty state
|
|
90
|
+
* text and icon
|
|
91
|
+
* @example :empty="{ icon: 'transactions-line', label: 'No transactions found' }"
|
|
92
|
+
*/
|
|
93
|
+
empty?: {
|
|
94
|
+
label?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
99
|
+
sort: {
|
|
100
|
+
type: globalThis.PropType<SortColumn | SortColumn[]>;
|
|
101
|
+
default: undefined;
|
|
102
|
+
};
|
|
103
|
+
search: {
|
|
104
|
+
type: globalThis.PropType<string>;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
outlined: {
|
|
108
|
+
type: globalThis.PropType<boolean>;
|
|
109
|
+
};
|
|
110
|
+
loading: {
|
|
111
|
+
type: globalThis.PropType<boolean>;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
modelValue: {
|
|
115
|
+
type: globalThis.PropType<string[]>;
|
|
116
|
+
default: undefined;
|
|
117
|
+
};
|
|
118
|
+
dense: {
|
|
119
|
+
type: globalThis.PropType<boolean>;
|
|
120
|
+
};
|
|
121
|
+
empty: {
|
|
122
|
+
type: globalThis.PropType<{
|
|
123
|
+
label?: string | undefined;
|
|
124
|
+
description?: string | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
default: () => {
|
|
127
|
+
label: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
rows: {
|
|
131
|
+
type: globalThis.PropType<Record<string, any>[]>;
|
|
132
|
+
required: true;
|
|
133
|
+
};
|
|
134
|
+
rowAttr: {
|
|
135
|
+
type: globalThis.PropType<string>;
|
|
136
|
+
required: true;
|
|
137
|
+
};
|
|
138
|
+
pagination: {
|
|
139
|
+
type: globalThis.PropType<TablePaginationData>;
|
|
140
|
+
default: undefined;
|
|
141
|
+
};
|
|
142
|
+
paginationModifiers: {
|
|
143
|
+
type: globalThis.PropType<{
|
|
144
|
+
external: boolean;
|
|
145
|
+
}>;
|
|
146
|
+
default: undefined;
|
|
147
|
+
};
|
|
148
|
+
sortModifiers: {
|
|
149
|
+
type: globalThis.PropType<{
|
|
150
|
+
external: boolean;
|
|
151
|
+
}>;
|
|
152
|
+
default: undefined;
|
|
153
|
+
};
|
|
154
|
+
cols: {
|
|
155
|
+
type: globalThis.PropType<TableColumn[]>;
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
columnAttr: {
|
|
159
|
+
type: globalThis.PropType<string>;
|
|
160
|
+
default: string;
|
|
161
|
+
};
|
|
162
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
163
|
+
"update:model-value": (value?: string[] | undefined) => void;
|
|
164
|
+
"update:pagination": (value?: TablePaginationData | undefined) => void;
|
|
165
|
+
"update:sort": (value?: SortColumn | SortColumn[] | undefined) => void;
|
|
166
|
+
"update:options": (value?: TableOptions | undefined) => void;
|
|
167
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
168
|
+
sort: {
|
|
169
|
+
type: globalThis.PropType<SortColumn | SortColumn[]>;
|
|
170
|
+
default: undefined;
|
|
171
|
+
};
|
|
172
|
+
search: {
|
|
173
|
+
type: globalThis.PropType<string>;
|
|
174
|
+
default: string;
|
|
175
|
+
};
|
|
176
|
+
outlined: {
|
|
177
|
+
type: globalThis.PropType<boolean>;
|
|
178
|
+
};
|
|
179
|
+
loading: {
|
|
180
|
+
type: globalThis.PropType<boolean>;
|
|
181
|
+
default: boolean;
|
|
182
|
+
};
|
|
183
|
+
modelValue: {
|
|
184
|
+
type: globalThis.PropType<string[]>;
|
|
185
|
+
default: undefined;
|
|
186
|
+
};
|
|
187
|
+
dense: {
|
|
188
|
+
type: globalThis.PropType<boolean>;
|
|
189
|
+
};
|
|
190
|
+
empty: {
|
|
191
|
+
type: globalThis.PropType<{
|
|
192
|
+
label?: string | undefined;
|
|
193
|
+
description?: string | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
default: () => {
|
|
196
|
+
label: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
rows: {
|
|
200
|
+
type: globalThis.PropType<Record<string, any>[]>;
|
|
201
|
+
required: true;
|
|
202
|
+
};
|
|
203
|
+
rowAttr: {
|
|
204
|
+
type: globalThis.PropType<string>;
|
|
205
|
+
required: true;
|
|
206
|
+
};
|
|
207
|
+
pagination: {
|
|
208
|
+
type: globalThis.PropType<TablePaginationData>;
|
|
209
|
+
default: undefined;
|
|
210
|
+
};
|
|
211
|
+
paginationModifiers: {
|
|
212
|
+
type: globalThis.PropType<{
|
|
213
|
+
external: boolean;
|
|
214
|
+
}>;
|
|
215
|
+
default: undefined;
|
|
216
|
+
};
|
|
217
|
+
sortModifiers: {
|
|
218
|
+
type: globalThis.PropType<{
|
|
219
|
+
external: boolean;
|
|
220
|
+
}>;
|
|
221
|
+
default: undefined;
|
|
222
|
+
};
|
|
223
|
+
cols: {
|
|
224
|
+
type: globalThis.PropType<TableColumn[]>;
|
|
225
|
+
default: undefined;
|
|
226
|
+
};
|
|
227
|
+
columnAttr: {
|
|
228
|
+
type: globalThis.PropType<string>;
|
|
229
|
+
default: string;
|
|
230
|
+
};
|
|
231
|
+
}>> & {
|
|
232
|
+
"onUpdate:model-value"?: ((value?: string[] | undefined) => any) | undefined;
|
|
233
|
+
"onUpdate:pagination"?: ((value?: TablePaginationData | undefined) => any) | undefined;
|
|
234
|
+
"onUpdate:sort"?: ((value?: SortColumn | SortColumn[] | undefined) => any) | undefined;
|
|
235
|
+
"onUpdate:options"?: ((value?: TableOptions | undefined) => any) | undefined;
|
|
236
|
+
}, {
|
|
237
|
+
sort: SortColumn | SortColumn[];
|
|
238
|
+
search: string;
|
|
239
|
+
loading: boolean;
|
|
240
|
+
modelValue: string[];
|
|
241
|
+
empty: {
|
|
242
|
+
label?: string | undefined;
|
|
243
|
+
description?: string | undefined;
|
|
244
|
+
};
|
|
245
|
+
pagination: TablePaginationData;
|
|
246
|
+
paginationModifiers: {
|
|
247
|
+
external: boolean;
|
|
248
|
+
};
|
|
249
|
+
sortModifiers: {
|
|
250
|
+
external: boolean;
|
|
251
|
+
};
|
|
252
|
+
cols: TableColumn[];
|
|
253
|
+
columnAttr: string;
|
|
254
|
+
}, {}>, Partial<Record<string, (_: {
|
|
255
|
+
column: TableColumn | {
|
|
256
|
+
[x: string]: string | boolean;
|
|
257
|
+
key: string;
|
|
258
|
+
sortable: boolean;
|
|
259
|
+
class: string;
|
|
260
|
+
};
|
|
261
|
+
}) => any>> & Partial<Record<string, (_: {
|
|
262
|
+
column: TableColumn | {
|
|
263
|
+
[x: string]: string | boolean;
|
|
264
|
+
key: string;
|
|
265
|
+
sortable: boolean;
|
|
266
|
+
class: string;
|
|
267
|
+
};
|
|
268
|
+
row: Record<string, any>;
|
|
269
|
+
index: number;
|
|
270
|
+
}) => any>> & {
|
|
271
|
+
"no-data"?(_: {}): any;
|
|
272
|
+
"empty-description"?(_: {}): any;
|
|
273
|
+
tfoot?(_: {}): any;
|
|
274
|
+
}>;
|
|
275
|
+
export default _default;
|
|
276
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
277
|
+
new (): {
|
|
278
|
+
$slots: S;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
@@ -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,251 @@
|
|
|
1
|
+
import { type VirtualElement } from '@popperjs/core/lib/popper-lite';
|
|
2
|
+
import { type MaybeElement } from '@vueuse/core';
|
|
3
|
+
import type { Instance, Placement, PositioningStrategy } from '@popperjs/core';
|
|
4
|
+
import type { Ref } from 'vue';
|
|
5
|
+
export interface PopperOptions {
|
|
6
|
+
locked?: boolean;
|
|
7
|
+
overflowPadding?: number;
|
|
8
|
+
offsetDistance?: number;
|
|
9
|
+
offsetSkid?: number;
|
|
10
|
+
placement?: Placement;
|
|
11
|
+
strategy?: PositioningStrategy;
|
|
12
|
+
gpuAcceleration?: boolean;
|
|
13
|
+
adaptive?: boolean;
|
|
14
|
+
scroll?: boolean;
|
|
15
|
+
resize?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_POPPER_OPTIONS: PopperOptions;
|
|
18
|
+
export declare const createPopper: <TModifier extends Partial<import("@popperjs/core").Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<import("@popperjs/core").OptionsGeneric<TModifier>> | undefined) => Instance;
|
|
19
|
+
export declare const usePopper: (options: Ref<PopperOptions>, disabled?: Ref<boolean>, openDelay?: Ref<number>, closeDelay?: Ref<number>, virtualReference?: Ref<Element | VirtualElement>) => {
|
|
20
|
+
reference: Ref<MaybeElement>;
|
|
21
|
+
popper: Ref<MaybeElement>;
|
|
22
|
+
instance: Ref<{
|
|
23
|
+
state: {
|
|
24
|
+
elements: {
|
|
25
|
+
reference: Element | {
|
|
26
|
+
getBoundingClientRect: () => ClientRect | DOMRect;
|
|
27
|
+
contextElement?: Element | undefined;
|
|
28
|
+
};
|
|
29
|
+
popper: HTMLElement;
|
|
30
|
+
arrow?: HTMLElement | undefined;
|
|
31
|
+
};
|
|
32
|
+
options: {
|
|
33
|
+
placement: Placement;
|
|
34
|
+
modifiers: any[];
|
|
35
|
+
strategy: PositioningStrategy;
|
|
36
|
+
onFirstUpdate?: ((arg0: Partial<import("@popperjs/core").State>) => void) | undefined;
|
|
37
|
+
};
|
|
38
|
+
placement: Placement;
|
|
39
|
+
strategy: PositioningStrategy;
|
|
40
|
+
orderedModifiers: {
|
|
41
|
+
name: any;
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
phase: import("@popperjs/core").ModifierPhases;
|
|
44
|
+
requires?: string[] | undefined;
|
|
45
|
+
requiresIfExists?: string[] | undefined;
|
|
46
|
+
fn: (arg0: import("@popperjs/core").ModifierArguments<any>) => void | import("@popperjs/core").State;
|
|
47
|
+
effect?: ((arg0: import("@popperjs/core").ModifierArguments<any>) => void | (() => void)) | undefined;
|
|
48
|
+
options?: Partial<any> | undefined;
|
|
49
|
+
data?: import("@popperjs/core").Obj | undefined;
|
|
50
|
+
}[];
|
|
51
|
+
rects: {
|
|
52
|
+
reference: {
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
};
|
|
58
|
+
popper: {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
scrollParents: {
|
|
66
|
+
reference: (Element | {
|
|
67
|
+
innerHeight: number;
|
|
68
|
+
offsetHeight: number;
|
|
69
|
+
innerWidth: number;
|
|
70
|
+
offsetWidth: number;
|
|
71
|
+
pageXOffset: number;
|
|
72
|
+
pageYOffset: number;
|
|
73
|
+
getComputedStyle: typeof getComputedStyle;
|
|
74
|
+
addEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
|
75
|
+
removeEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
|
76
|
+
Element: Element;
|
|
77
|
+
HTMLElement: HTMLElement;
|
|
78
|
+
Node: Node;
|
|
79
|
+
toString: () => "[object Window]";
|
|
80
|
+
devicePixelRatio: number;
|
|
81
|
+
visualViewport?: {
|
|
82
|
+
addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
|
83
|
+
dispatchEvent: (event: Event) => boolean;
|
|
84
|
+
removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
offsetLeft: number;
|
|
88
|
+
offsetTop: number;
|
|
89
|
+
scale: number;
|
|
90
|
+
} | undefined;
|
|
91
|
+
ShadowRoot: ShadowRoot;
|
|
92
|
+
} | {
|
|
93
|
+
addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
|
94
|
+
dispatchEvent: (event: Event) => boolean;
|
|
95
|
+
removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
|
96
|
+
width: number;
|
|
97
|
+
height: number;
|
|
98
|
+
offsetLeft: number;
|
|
99
|
+
offsetTop: number;
|
|
100
|
+
scale: number;
|
|
101
|
+
})[];
|
|
102
|
+
popper: (Element | {
|
|
103
|
+
innerHeight: number;
|
|
104
|
+
offsetHeight: number;
|
|
105
|
+
innerWidth: number;
|
|
106
|
+
offsetWidth: number;
|
|
107
|
+
pageXOffset: number;
|
|
108
|
+
pageYOffset: number;
|
|
109
|
+
getComputedStyle: typeof getComputedStyle;
|
|
110
|
+
addEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
|
111
|
+
removeEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
|
112
|
+
Element: Element;
|
|
113
|
+
HTMLElement: HTMLElement;
|
|
114
|
+
Node: Node;
|
|
115
|
+
toString: () => "[object Window]";
|
|
116
|
+
devicePixelRatio: number;
|
|
117
|
+
visualViewport?: {
|
|
118
|
+
addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
|
119
|
+
dispatchEvent: (event: Event) => boolean;
|
|
120
|
+
removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
|
121
|
+
width: number;
|
|
122
|
+
height: number;
|
|
123
|
+
offsetLeft: number;
|
|
124
|
+
offsetTop: number;
|
|
125
|
+
scale: number;
|
|
126
|
+
} | undefined;
|
|
127
|
+
ShadowRoot: ShadowRoot;
|
|
128
|
+
} | {
|
|
129
|
+
addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
|
130
|
+
dispatchEvent: (event: Event) => boolean;
|
|
131
|
+
removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
|
132
|
+
width: number;
|
|
133
|
+
height: number;
|
|
134
|
+
offsetLeft: number;
|
|
135
|
+
offsetTop: number;
|
|
136
|
+
scale: number;
|
|
137
|
+
})[];
|
|
138
|
+
};
|
|
139
|
+
styles: {
|
|
140
|
+
[key: string]: Partial<CSSStyleDeclaration>;
|
|
141
|
+
};
|
|
142
|
+
attributes: {
|
|
143
|
+
[key: string]: {
|
|
144
|
+
[key: string]: string | boolean;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
modifiersData: {
|
|
148
|
+
[x: string]: any;
|
|
149
|
+
arrow?: {
|
|
150
|
+
x?: number | undefined;
|
|
151
|
+
y?: number | undefined;
|
|
152
|
+
centerOffset: number;
|
|
153
|
+
} | undefined;
|
|
154
|
+
hide?: {
|
|
155
|
+
isReferenceHidden: boolean;
|
|
156
|
+
hasPopperEscaped: boolean;
|
|
157
|
+
referenceClippingOffsets: {
|
|
158
|
+
top: number;
|
|
159
|
+
left: number;
|
|
160
|
+
right: number;
|
|
161
|
+
bottom: number;
|
|
162
|
+
};
|
|
163
|
+
popperEscapeOffsets: {
|
|
164
|
+
top: number;
|
|
165
|
+
left: number;
|
|
166
|
+
right: number;
|
|
167
|
+
bottom: number;
|
|
168
|
+
};
|
|
169
|
+
} | undefined;
|
|
170
|
+
offset?: {
|
|
171
|
+
auto?: {
|
|
172
|
+
y: number;
|
|
173
|
+
x: number;
|
|
174
|
+
} | undefined;
|
|
175
|
+
left?: {
|
|
176
|
+
y: number;
|
|
177
|
+
x: number;
|
|
178
|
+
} | undefined;
|
|
179
|
+
right?: {
|
|
180
|
+
y: number;
|
|
181
|
+
x: number;
|
|
182
|
+
} | undefined;
|
|
183
|
+
"auto-start"?: {
|
|
184
|
+
y: number;
|
|
185
|
+
x: number;
|
|
186
|
+
} | undefined;
|
|
187
|
+
"auto-end"?: {
|
|
188
|
+
y: number;
|
|
189
|
+
x: number;
|
|
190
|
+
} | undefined;
|
|
191
|
+
top?: {
|
|
192
|
+
y: number;
|
|
193
|
+
x: number;
|
|
194
|
+
} | undefined;
|
|
195
|
+
bottom?: {
|
|
196
|
+
y: number;
|
|
197
|
+
x: number;
|
|
198
|
+
} | undefined;
|
|
199
|
+
"top-start"?: {
|
|
200
|
+
y: number;
|
|
201
|
+
x: number;
|
|
202
|
+
} | undefined;
|
|
203
|
+
"top-end"?: {
|
|
204
|
+
y: number;
|
|
205
|
+
x: number;
|
|
206
|
+
} | undefined;
|
|
207
|
+
"bottom-start"?: {
|
|
208
|
+
y: number;
|
|
209
|
+
x: number;
|
|
210
|
+
} | undefined;
|
|
211
|
+
"bottom-end"?: {
|
|
212
|
+
y: number;
|
|
213
|
+
x: number;
|
|
214
|
+
} | undefined;
|
|
215
|
+
"right-start"?: {
|
|
216
|
+
y: number;
|
|
217
|
+
x: number;
|
|
218
|
+
} | undefined;
|
|
219
|
+
"right-end"?: {
|
|
220
|
+
y: number;
|
|
221
|
+
x: number;
|
|
222
|
+
} | undefined;
|
|
223
|
+
"left-start"?: {
|
|
224
|
+
y: number;
|
|
225
|
+
x: number;
|
|
226
|
+
} | undefined;
|
|
227
|
+
"left-end"?: {
|
|
228
|
+
y: number;
|
|
229
|
+
x: number;
|
|
230
|
+
} | undefined;
|
|
231
|
+
} | undefined;
|
|
232
|
+
preventOverflow?: {
|
|
233
|
+
y: number;
|
|
234
|
+
x: number;
|
|
235
|
+
} | undefined;
|
|
236
|
+
popperOffsets?: {
|
|
237
|
+
y: number;
|
|
238
|
+
x: number;
|
|
239
|
+
} | undefined;
|
|
240
|
+
};
|
|
241
|
+
reset: boolean;
|
|
242
|
+
};
|
|
243
|
+
destroy: () => void;
|
|
244
|
+
forceUpdate: () => void;
|
|
245
|
+
update: () => Promise<Partial<import("@popperjs/core").State>>;
|
|
246
|
+
setOptions: (setOptionsAction: Partial<import("@popperjs/core").OptionsGeneric<any>> | ((prev: Partial<import("@popperjs/core").OptionsGeneric<any>>) => Partial<import("@popperjs/core").OptionsGeneric<any>>)) => Promise<Partial<import("@popperjs/core").State>>;
|
|
247
|
+
} | null>;
|
|
248
|
+
open: Ref<boolean>;
|
|
249
|
+
onMouseOver: () => void;
|
|
250
|
+
onMouseLeave: () => void;
|
|
251
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { RiAlertFill as A, RiAlertLine as y, RiArrowDownLine as E, RiArrowDropDownFill as T, RiArrowLeftLine as D, RiArrowLeftSLine as I, RiArrowRightLine as v, RiArrowRightSLine as B, RiCheckLine as M, RiCheckboxBlankCircleFill as S, RiCheckboxBlankCircleLine as O, RiCheckboxBlankLine as j, RiCheckboxCircleFill as U, RiCheckboxCircleLine as V, RiCheckboxFill as W, RiCheckboxIndeterminateFill as q, RiCloseCircleLine as G, RiCloseFill as P, RiCloseLine as z, RiDatabase2Line as H, RiErrorWarningFill as J, RiErrorWarningLine as K, RiEyeLine as N, RiEyeOffLine as Q, RiInformationFill as X, RiInformationLine as Y, RiRadioButtonLine as Z, RiMoreFill as _ } from "./all-icons.es.js";
|
|
2
|
+
import { createGlobalState as ee, useColorMode as ie } from "@vueuse/core";
|
|
3
|
+
import { ref as C, computed as m, watch as re } from "vue";
|
|
4
|
+
import { set as f, get as e } from "@vueuse/shared";
|
|
5
|
+
import { c as te } from "./colors-01d79c7b.js";
|
|
6
|
+
const de = ee(() => {
|
|
7
|
+
const t = [
|
|
8
|
+
A,
|
|
9
|
+
y,
|
|
10
|
+
E,
|
|
11
|
+
T,
|
|
12
|
+
D,
|
|
13
|
+
I,
|
|
14
|
+
v,
|
|
15
|
+
B,
|
|
16
|
+
M,
|
|
17
|
+
S,
|
|
18
|
+
O,
|
|
19
|
+
j,
|
|
20
|
+
U,
|
|
21
|
+
V,
|
|
22
|
+
W,
|
|
23
|
+
q,
|
|
24
|
+
G,
|
|
25
|
+
P,
|
|
26
|
+
z,
|
|
27
|
+
H,
|
|
28
|
+
J,
|
|
29
|
+
K,
|
|
30
|
+
N,
|
|
31
|
+
Q,
|
|
32
|
+
X,
|
|
33
|
+
Y,
|
|
34
|
+
Z,
|
|
35
|
+
_
|
|
36
|
+
], i = C({});
|
|
37
|
+
return { registeredIcons: i, registerIcons: (a) => {
|
|
38
|
+
f(i, {
|
|
39
|
+
...e(i),
|
|
40
|
+
...Object.fromEntries(
|
|
41
|
+
[...t, ...a].map(({ name: s, path: d }) => [s, d])
|
|
42
|
+
)
|
|
43
|
+
});
|
|
44
|
+
} };
|
|
45
|
+
}), r = {
|
|
46
|
+
auto: "auto",
|
|
47
|
+
light: "light",
|
|
48
|
+
dark: "dark"
|
|
49
|
+
}, L = (t) => Object.fromEntries(
|
|
50
|
+
te.map((i) => [
|
|
51
|
+
i,
|
|
52
|
+
{
|
|
53
|
+
DEFAULT: `var(--rui-${t}-${i}-main)`,
|
|
54
|
+
lighter: `var(--rui-${t}-${i}-lighter)`,
|
|
55
|
+
darker: `var(--rui-${t}-${i}-darker)`
|
|
56
|
+
}
|
|
57
|
+
])
|
|
58
|
+
), b = {
|
|
59
|
+
light: L("light"),
|
|
60
|
+
dark: L("dark")
|
|
61
|
+
}, u = C({ ...b }), me = () => {
|
|
62
|
+
const { store: t, state: i, system: h } = ie(), a = m(
|
|
63
|
+
() => e(t) === r.auto
|
|
64
|
+
), s = m(
|
|
65
|
+
() => e(a) && e(h) === r.light || e(i) === r.light
|
|
66
|
+
), d = m(
|
|
67
|
+
() => e(a) && e(h) === r.dark || e(i) === r.dark
|
|
68
|
+
), g = m(() => e(s) ? e(u).light : e(u).dark), c = (l) => {
|
|
69
|
+
f(t, l || r.auto);
|
|
70
|
+
}, p = () => {
|
|
71
|
+
e(a) ? c(r.light) : e(s) ? c(r.dark) : e(d) && c(r.auto);
|
|
72
|
+
}, k = (l) => {
|
|
73
|
+
f(u, l);
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
isAutoControlled: a,
|
|
77
|
+
isLight: s,
|
|
78
|
+
isDark: d,
|
|
79
|
+
config: u,
|
|
80
|
+
theme: g,
|
|
81
|
+
store: t,
|
|
82
|
+
state: i,
|
|
83
|
+
init: (l) => {
|
|
84
|
+
c(l.mode ?? r.auto), k(l.config ?? { ...b }), typeof window < "u" && re(
|
|
85
|
+
[s, g],
|
|
86
|
+
([x, w]) => {
|
|
87
|
+
const F = Object.entries(w).map(([o, n]) => ({
|
|
88
|
+
[`--rui-${o}-main`]: n.DEFAULT,
|
|
89
|
+
[`--rui-${o}-lighter`]: n.lighter,
|
|
90
|
+
[`--rui-${o}-darker`]: n.darker
|
|
91
|
+
})).reduce((o, n) => ({ ...o, ...n }), {}), R = x ? r.light : r.dark, $ = {
|
|
92
|
+
"--rui-text-primary": `var(--rui-${R}-text-primary)`,
|
|
93
|
+
"--rui-text-secondary": `var(--rui-${R}-text-secondary)`,
|
|
94
|
+
"--rui-text-disabled": `var(--rui-${R}-text-disabled)`
|
|
95
|
+
};
|
|
96
|
+
Object.entries({
|
|
97
|
+
...F,
|
|
98
|
+
...$
|
|
99
|
+
}).forEach(([o, n]) => {
|
|
100
|
+
document.documentElement.style.setProperty(o, n);
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
{ immediate: !0 }
|
|
104
|
+
);
|
|
105
|
+
},
|
|
106
|
+
setThemeConfig: k,
|
|
107
|
+
toggleThemeMode: p,
|
|
108
|
+
switchThemeScheme: c
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export {
|
|
112
|
+
r as T,
|
|
113
|
+
me as a,
|
|
114
|
+
de as u
|
|
115
|
+
};
|