@rotki/ui-library 0.14.0 → 0.15.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/{index-4pX97qAk.js → Accordion-BFcz_iFc.js} +3648 -3352
- package/dist/breakpoint-CRvqq4aP.js +37 -0
- package/dist/components/buttons/button/Button.vue.d.ts +4 -4
- package/dist/components/buttons/button-group/ButtonGroup.vue.d.ts +3 -3
- package/dist/components/forms/checkbox/Checkbox.vue.d.ts +9 -9
- package/dist/components/forms/radio-button/radio/Radio.vue.d.ts +9 -9
- package/dist/components/forms/radio-button/radio-group/RadioGroup.vue.d.ts +9 -9
- package/dist/components/forms/revealable-text-field/RevealableTextField.vue.d.ts +9 -9
- package/dist/components/forms/select/RuiMenuSelect.vue.d.ts +155 -0
- package/dist/components/forms/slider/Slider.vue.d.ts +9 -9
- package/dist/components/forms/switch/Switch.vue.d.ts +9 -9
- package/dist/components/forms/text-field/TextField.vue.d.ts +9 -9
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.es.js +7 -7
- package/dist/components/logos/Logo.vue.d.ts +42 -4
- package/dist/components/overlays/dialog/Dialog.vue.d.ts +5 -5
- package/dist/components/overlays/menu/Menu.vue.d.ts +85 -2
- package/dist/components/tables/DataTable.vue.d.ts +9 -6
- package/dist/components/tables/TableHead.vue.d.ts +15 -3
- package/dist/composables/dropdown-menu.d.ts +40 -0
- package/dist/composables/index.es.js +5 -81
- package/dist/consts/forms/auto-complete/index.d.ts +3 -3
- package/dist/index-x2urm9HD.js +176 -0
- package/dist/index.es.js +6 -6
- package/dist/style.css +1 -1
- package/dist/theme/index.es.js +1 -1
- package/dist/utils/assert.d.ts +1 -0
- package/dist/utils/helpers.d.ts +7 -0
- package/package.json +39 -41
- package/dist/components/forms/select/MenuSelect.vue.d.ts +0 -62
- package/dist/theme-DT8UjYf9.js +0 -124
- /package/dist/{colors-ikihApJv.js → colors-D563Ic3q.js} +0 -0
package/dist/theme/index.es.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assert(condition: any, msg?: string): asserts condition;
|
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -48,4 +48,11 @@ export declare function getRootAttrs(data: SetupContextAttrs, include?: SetupCon
|
|
|
48
48
|
export declare function getNonRootAttrs(data: SetupContextAttrs, exclude?: SetupContextAttrsKeys): Omit<{
|
|
49
49
|
[x: string]: unknown;
|
|
50
50
|
}, string>;
|
|
51
|
+
/**
|
|
52
|
+
* Transforms the keys of an object to either camelCase or snake_case
|
|
53
|
+
* @param {T} item
|
|
54
|
+
* @param {"camelCase" | "snake_case"} to
|
|
55
|
+
* @returns {Record<string, any>}
|
|
56
|
+
*/
|
|
57
|
+
export declare function transformCase<T extends object>(item: T, to: 'camelCase' | 'snake_case'): Record<string, any>;
|
|
51
58
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotki/ui-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"packageManager": "pnpm@8.15.3",
|
|
5
5
|
"description": "A vue design system and component library for rotki",
|
|
6
6
|
"type": "module",
|
|
@@ -69,65 +69,63 @@
|
|
|
69
69
|
"vue": ">=3.4.0"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"vue-router": ">=4.
|
|
72
|
+
"vue-router": ">=4.3.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@babel/core": "7.
|
|
76
|
-
"@babel/types": "7.
|
|
77
|
-
"@commitlint/cli": "
|
|
78
|
-
"@commitlint/config-conventional": "
|
|
79
|
-
"@fontsource/roboto": "5.0.
|
|
75
|
+
"@babel/core": "7.24.4",
|
|
76
|
+
"@babel/types": "7.24.0",
|
|
77
|
+
"@commitlint/cli": "19.2.1",
|
|
78
|
+
"@commitlint/config-conventional": "19.1.0",
|
|
79
|
+
"@fontsource/roboto": "5.0.12",
|
|
80
80
|
"@headlessui/vue": "1.7.19",
|
|
81
81
|
"@popperjs/core": "2.11.8",
|
|
82
|
-
"@rotki/eslint-config": "2.
|
|
83
|
-
"@storybook/addon-docs": "
|
|
84
|
-
"@storybook/addon-essentials": "
|
|
85
|
-
"@storybook/addon-interactions": "
|
|
86
|
-
"@storybook/addon-links": "
|
|
87
|
-
"@storybook/addon-themes": "
|
|
88
|
-
"@storybook/
|
|
89
|
-
"@storybook/
|
|
90
|
-
"@storybook/
|
|
91
|
-
"@storybook/vue3": "
|
|
92
|
-
"@storybook/vue3-vite": "
|
|
93
|
-
"@types/node": "20.
|
|
82
|
+
"@rotki/eslint-config": "2.7.0",
|
|
83
|
+
"@storybook/addon-docs": "8.0.6",
|
|
84
|
+
"@storybook/addon-essentials": "8.0.6",
|
|
85
|
+
"@storybook/addon-interactions": "8.0.6",
|
|
86
|
+
"@storybook/addon-links": "8.0.6",
|
|
87
|
+
"@storybook/addon-themes": "8.0.6",
|
|
88
|
+
"@storybook/blocks": "8.0.6",
|
|
89
|
+
"@storybook/preview-api": "8.0.6",
|
|
90
|
+
"@storybook/test": "8.0.6",
|
|
91
|
+
"@storybook/vue3": "8.0.6",
|
|
92
|
+
"@storybook/vue3-vite": "8.0.6",
|
|
93
|
+
"@types/node": "20.12.4",
|
|
94
94
|
"@vitejs/plugin-vue": "5.0.4",
|
|
95
|
-
"@vitest/coverage-v8": "1.
|
|
96
|
-
"@vitest/ui": "1.
|
|
97
|
-
"@vue/test-utils": "2.4.
|
|
95
|
+
"@vitest/coverage-v8": "1.5.0",
|
|
96
|
+
"@vitest/ui": "1.5.0",
|
|
97
|
+
"@vue/test-utils": "2.4.5",
|
|
98
98
|
"@vue/tsconfig": "0.5.1",
|
|
99
|
-
"@vueuse/core": "10.
|
|
100
|
-
"@vueuse/math": "10.
|
|
101
|
-
"@vueuse/shared": "10.
|
|
99
|
+
"@vueuse/core": "10.9.0",
|
|
100
|
+
"@vueuse/math": "10.9.0",
|
|
101
|
+
"@vueuse/shared": "10.9.0",
|
|
102
102
|
"argparse": "2.0.1",
|
|
103
|
-
"autoprefixer": "10.4.
|
|
103
|
+
"autoprefixer": "10.4.19",
|
|
104
104
|
"babel-loader": "9.1.3",
|
|
105
|
-
"bumpp": "9.
|
|
106
|
-
"css-loader": "
|
|
107
|
-
"eslint": "8.
|
|
105
|
+
"bumpp": "9.4.0",
|
|
106
|
+
"css-loader": "7.0.0",
|
|
107
|
+
"eslint": "8.57.0",
|
|
108
108
|
"eslint-plugin-cypress": "2.15.1",
|
|
109
|
-
"eslint-plugin-storybook": "0.
|
|
109
|
+
"eslint-plugin-storybook": "0.8.0",
|
|
110
110
|
"fast-glob": "3.3.2",
|
|
111
|
-
"fast-xml-parser": "4.3.
|
|
111
|
+
"fast-xml-parser": "4.3.6",
|
|
112
112
|
"fs-extra": "11.2.0",
|
|
113
113
|
"husky": "9.0.11",
|
|
114
114
|
"jsdom": "24.0.0",
|
|
115
115
|
"lint-staged": "15.2.2",
|
|
116
|
-
"postcss": "8.4.
|
|
117
|
-
"react": "18.2.0",
|
|
118
|
-
"react-dom": "18.2.0",
|
|
116
|
+
"postcss": "8.4.38",
|
|
119
117
|
"remixicon": "4.1.0",
|
|
120
|
-
"sass": "1.
|
|
118
|
+
"sass": "1.74.1",
|
|
121
119
|
"scule": "1.3.0",
|
|
122
|
-
"storybook": "
|
|
123
|
-
"tailwindcss": "3.4.
|
|
120
|
+
"storybook": "8.0.6",
|
|
121
|
+
"tailwindcss": "3.4.3",
|
|
124
122
|
"ts-node": "10.9.2",
|
|
125
123
|
"tsc-alias": "1.8.8",
|
|
126
|
-
"typescript": "5.
|
|
124
|
+
"typescript": "5.4.4",
|
|
127
125
|
"unplugin-auto-import": "0.17.5",
|
|
128
|
-
"vite": "5.
|
|
129
|
-
"vitest": "1.
|
|
130
|
-
"vue": "3.4.
|
|
126
|
+
"vite": "5.2.8",
|
|
127
|
+
"vitest": "1.5.0",
|
|
128
|
+
"vue": "3.4.21",
|
|
131
129
|
"vue-loader": "17.4.2",
|
|
132
130
|
"vue-router": "4.2.5",
|
|
133
131
|
"vue-tsc": "1.8.11"
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { type Props as MenuProps } from '../../../components/overlays/menu/Menu.vue';
|
|
2
|
-
export interface Props<T, K extends keyof T = keyof T> {
|
|
3
|
-
options: T[];
|
|
4
|
-
keyAttr: K;
|
|
5
|
-
textAttr: K;
|
|
6
|
-
modelValue?: T | null;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
dense?: boolean;
|
|
9
|
-
outlined?: boolean;
|
|
10
|
-
label?: string;
|
|
11
|
-
menuOptions?: MenuProps;
|
|
12
|
-
labelClass?: string;
|
|
13
|
-
menuClass?: string;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: <T extends object, K extends keyof T = keyof T>(__VLS_props: Props<T, K> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
|
|
16
|
-
props: Props<T, K>;
|
|
17
|
-
expose(exposed: {}): void;
|
|
18
|
-
attrs: any;
|
|
19
|
-
slots: {
|
|
20
|
-
activator?(_: {
|
|
21
|
-
disabled: boolean;
|
|
22
|
-
value: T | null | undefined;
|
|
23
|
-
outlined: boolean;
|
|
24
|
-
on: any;
|
|
25
|
-
open: any;
|
|
26
|
-
}): any;
|
|
27
|
-
};
|
|
28
|
-
emit: (e: 'update:model-value', value?: T | null | undefined) => void;
|
|
29
|
-
}, "attrs" | "emit" | "slots"> | undefined, __VLS_expose?: ((exposed: {}) => void) | undefined, __VLS_setup?: Promise<{
|
|
30
|
-
props: Props<T, K>;
|
|
31
|
-
expose(exposed: {}): void;
|
|
32
|
-
attrs: any;
|
|
33
|
-
slots: {
|
|
34
|
-
activator?(_: {
|
|
35
|
-
disabled: boolean;
|
|
36
|
-
value: T | null | undefined;
|
|
37
|
-
outlined: boolean;
|
|
38
|
-
on: any;
|
|
39
|
-
open: any;
|
|
40
|
-
}): any;
|
|
41
|
-
};
|
|
42
|
-
emit: (e: 'update:model-value', value?: T | null | undefined) => void;
|
|
43
|
-
}>) => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
|
-
[key: string]: any;
|
|
45
|
-
}> & {
|
|
46
|
-
__ctx?: {
|
|
47
|
-
props: Props<T, K>;
|
|
48
|
-
expose(exposed: {}): void;
|
|
49
|
-
attrs: any;
|
|
50
|
-
slots: {
|
|
51
|
-
activator?(_: {
|
|
52
|
-
disabled: boolean;
|
|
53
|
-
value: T | null | undefined;
|
|
54
|
-
outlined: boolean;
|
|
55
|
-
on: any;
|
|
56
|
-
open: any;
|
|
57
|
-
}): any;
|
|
58
|
-
};
|
|
59
|
-
emit: (e: 'update:model-value', value?: T | null | undefined) => void;
|
|
60
|
-
} | undefined;
|
|
61
|
-
};
|
|
62
|
-
export default _default;
|
package/dist/theme-DT8UjYf9.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { RiArrowDownLine as $, RiArrowDropDownFill as y, RiArrowLeftDoubleLine as D, RiArrowLeftLine as E, RiArrowLeftSLine as T, RiArrowRightDoubleLine as I, RiArrowRightLine as v, RiArrowRightSLine as B } from "./icons/icons_1.es.js";
|
|
2
|
-
import { RiDatabase2Line as M } from "./icons/icons_2.es.js";
|
|
3
|
-
import { RiAlertFill as S, RiAlertLine as O, RiCheckLine as j, RiCheckboxBlankCircleFill as U, RiCheckboxBlankCircleLine as V, RiCheckboxBlankLine as W, RiCheckboxCircleFill as q, RiCheckboxCircleLine as G, RiCheckboxFill as P, RiCheckboxIndeterminateFill as z, RiCloseCircleLine as H, RiCloseFill as J, RiCloseLine as K, RiErrorWarningFill as N, RiErrorWarningLine as Q, RiEyeLine as X, RiEyeOffLine as Y, RiInformationFill as Z, RiInformationLine as _, RiRadioButtonLine as ee, RiMoreFill as ie } from "./icons/icons_5.es.js";
|
|
4
|
-
import { createGlobalState as re, useColorMode as te } from "@vueuse/core";
|
|
5
|
-
import { ref as C, computed as m, watch as oe } from "vue";
|
|
6
|
-
import { set as f, get as e } from "@vueuse/shared";
|
|
7
|
-
import { c as ne } from "./colors-ikihApJv.js";
|
|
8
|
-
const Re = re(() => {
|
|
9
|
-
const t = [
|
|
10
|
-
S,
|
|
11
|
-
O,
|
|
12
|
-
$,
|
|
13
|
-
y,
|
|
14
|
-
D,
|
|
15
|
-
E,
|
|
16
|
-
T,
|
|
17
|
-
I,
|
|
18
|
-
v,
|
|
19
|
-
B,
|
|
20
|
-
j,
|
|
21
|
-
U,
|
|
22
|
-
V,
|
|
23
|
-
W,
|
|
24
|
-
q,
|
|
25
|
-
G,
|
|
26
|
-
P,
|
|
27
|
-
z,
|
|
28
|
-
H,
|
|
29
|
-
J,
|
|
30
|
-
K,
|
|
31
|
-
M,
|
|
32
|
-
N,
|
|
33
|
-
Q,
|
|
34
|
-
X,
|
|
35
|
-
Y,
|
|
36
|
-
Z,
|
|
37
|
-
_,
|
|
38
|
-
ee,
|
|
39
|
-
ie
|
|
40
|
-
], i = C({});
|
|
41
|
-
return { registeredIcons: i, registerIcons: (a) => {
|
|
42
|
-
f(i, {
|
|
43
|
-
...e(i),
|
|
44
|
-
...Object.fromEntries(
|
|
45
|
-
[...t, ...a].map(({ name: s, path: u }) => [s, u])
|
|
46
|
-
)
|
|
47
|
-
});
|
|
48
|
-
} };
|
|
49
|
-
}), r = {
|
|
50
|
-
auto: "auto",
|
|
51
|
-
dark: "dark",
|
|
52
|
-
light: "light"
|
|
53
|
-
};
|
|
54
|
-
function L(t) {
|
|
55
|
-
return Object.fromEntries(
|
|
56
|
-
ne.map((i) => [
|
|
57
|
-
i,
|
|
58
|
-
{
|
|
59
|
-
darker: `var(--rui-${t}-${i}-darker)`,
|
|
60
|
-
DEFAULT: `var(--rui-${t}-${i}-main)`,
|
|
61
|
-
lighter: `var(--rui-${t}-${i}-lighter)`
|
|
62
|
-
}
|
|
63
|
-
])
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
const b = {
|
|
67
|
-
dark: L("dark"),
|
|
68
|
-
light: L("light")
|
|
69
|
-
}, d = C({ ...b });
|
|
70
|
-
function fe() {
|
|
71
|
-
const { state: t, store: i, system: h } = te(), a = m(
|
|
72
|
-
() => e(i) === r.auto
|
|
73
|
-
), s = m(
|
|
74
|
-
() => e(a) && e(h) === r.light || e(t) === r.light
|
|
75
|
-
), u = m(
|
|
76
|
-
() => e(a) && e(h) === r.dark || e(t) === r.dark
|
|
77
|
-
), g = m(() => e(s) ? e(d).light : e(d).dark), c = (l) => {
|
|
78
|
-
f(i, l || r.auto);
|
|
79
|
-
}, p = () => {
|
|
80
|
-
e(a) ? c(r.light) : e(s) ? c(r.dark) : e(u) && c(r.auto);
|
|
81
|
-
}, k = (l) => {
|
|
82
|
-
f(d, l);
|
|
83
|
-
};
|
|
84
|
-
return {
|
|
85
|
-
config: d,
|
|
86
|
-
init: (l) => {
|
|
87
|
-
c(l.mode ?? r.auto), k(l.config ?? { ...b }), typeof window < "u" && oe(
|
|
88
|
-
[s, g],
|
|
89
|
-
([w, x]) => {
|
|
90
|
-
const A = Object.entries(x).map(([o, n]) => ({
|
|
91
|
-
[`--rui-${o}-darker`]: n.darker,
|
|
92
|
-
[`--rui-${o}-lighter`]: n.lighter,
|
|
93
|
-
[`--rui-${o}-main`]: n.DEFAULT
|
|
94
|
-
})).reduce((o, n) => ({ ...o, ...n }), {}), R = w ? r.light : r.dark, F = {
|
|
95
|
-
"--rui-text-disabled": `var(--rui-${R}-text-disabled)`,
|
|
96
|
-
"--rui-text-primary": `var(--rui-${R}-text-primary)`,
|
|
97
|
-
"--rui-text-secondary": `var(--rui-${R}-text-secondary)`
|
|
98
|
-
};
|
|
99
|
-
Object.entries({
|
|
100
|
-
...A,
|
|
101
|
-
...F
|
|
102
|
-
}).forEach(([o, n]) => {
|
|
103
|
-
document.documentElement.style.setProperty(o, n);
|
|
104
|
-
});
|
|
105
|
-
},
|
|
106
|
-
{ immediate: !0 }
|
|
107
|
-
);
|
|
108
|
-
},
|
|
109
|
-
isAutoControlled: a,
|
|
110
|
-
isDark: u,
|
|
111
|
-
isLight: s,
|
|
112
|
-
setThemeConfig: k,
|
|
113
|
-
state: t,
|
|
114
|
-
store: i,
|
|
115
|
-
switchThemeScheme: c,
|
|
116
|
-
theme: g,
|
|
117
|
-
toggleThemeMode: p
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
export {
|
|
121
|
-
r as T,
|
|
122
|
-
fe as a,
|
|
123
|
-
Re as u
|
|
124
|
-
};
|
|
File without changes
|