@rotki/ui-library 0.2.3 → 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/auto-complete/AutoComplete.vue.d.ts +1 -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-8228cd5f.js +0 -2332
package/dist/theme/index.es.js
CHANGED
|
@@ -48,7 +48,7 @@ const u = Object.fromEntries(
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
])
|
|
51
|
-
),
|
|
51
|
+
), n = {
|
|
52
52
|
text: {
|
|
53
53
|
DEFAULT: "var(--rui-text-primary)",
|
|
54
54
|
secondary: "var(--rui-text-secondary)",
|
|
@@ -100,7 +100,7 @@ const u = Object.fromEntries(
|
|
|
100
100
|
"line-height": "2rem"
|
|
101
101
|
},
|
|
102
102
|
".text-h6": {
|
|
103
|
-
"@apply text-xl": {},
|
|
103
|
+
"@apply text-xl font-medium": {},
|
|
104
104
|
"line-height": "2rem"
|
|
105
105
|
}
|
|
106
106
|
}), p(
|
|
@@ -131,7 +131,7 @@ const u = Object.fromEntries(
|
|
|
131
131
|
...x.dark
|
|
132
132
|
},
|
|
133
133
|
...v,
|
|
134
|
-
...
|
|
134
|
+
...n
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
137
|
boxShadow: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface CurrencyOptions {
|
|
2
|
+
currency?: string;
|
|
3
|
+
locale?: string;
|
|
4
|
+
style?: string;
|
|
5
|
+
fractionDigits?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Format number value to specified currency format
|
|
9
|
+
* @param {number} amount
|
|
10
|
+
* @param {CurrencyOptions} options
|
|
11
|
+
*/
|
|
12
|
+
export declare const formatCurrency: (amount: number | string, { currency, style, fractionDigits, locale, }: CurrencyOptions) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Format number value
|
|
15
|
+
* @param {number} amount
|
|
16
|
+
* @param {CurrencyOptions} options
|
|
17
|
+
*/
|
|
18
|
+
export declare const formatNumber: (amount: number | string, { fractionDigits }: CurrencyOptions) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Format number value without fraction
|
|
21
|
+
* @param {number} amount
|
|
22
|
+
*/
|
|
23
|
+
export declare const formatInteger: (amount: number | string) => string;
|
|
24
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotki/ui-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"packageManager": "pnpm@8.6.9",
|
|
5
5
|
"description": "A vue design system and component library for rotki",
|
|
6
6
|
"type": "module",
|
|
@@ -73,54 +73,55 @@
|
|
|
73
73
|
"@babel/types": "7.22.5",
|
|
74
74
|
"@commitlint/cli": "17.6.7",
|
|
75
75
|
"@commitlint/config-conventional": "17.6.7",
|
|
76
|
-
"@fontsource/roboto": "5.0.
|
|
77
|
-
"@headlessui/vue": "1.7.
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"@storybook/addon-
|
|
81
|
-
"@storybook/addon-
|
|
82
|
-
"@storybook/addon-
|
|
83
|
-
"@storybook/
|
|
84
|
-
"@storybook/
|
|
76
|
+
"@fontsource/roboto": "5.0.7",
|
|
77
|
+
"@headlessui/vue": "1.7.15",
|
|
78
|
+
"@popperjs/core": "2.11.8",
|
|
79
|
+
"@rotki/eslint-config": "1.1.1",
|
|
80
|
+
"@storybook/addon-essentials": "7.2.1",
|
|
81
|
+
"@storybook/addon-interactions": "7.2.1",
|
|
82
|
+
"@storybook/addon-links": "7.2.1",
|
|
83
|
+
"@storybook/addon-styling": "1.3.5",
|
|
84
|
+
"@storybook/addons": "7.2.1",
|
|
85
|
+
"@storybook/blocks": "7.2.1",
|
|
85
86
|
"@storybook/testing-library": "0.2.0",
|
|
86
|
-
"@storybook/vue3": "7.1
|
|
87
|
-
"@storybook/vue3-vite": "7.1
|
|
87
|
+
"@storybook/vue3": "7.2.1",
|
|
88
|
+
"@storybook/vue3-vite": "7.2.1",
|
|
88
89
|
"@types/node": "20.2.4",
|
|
89
90
|
"@vitejs/plugin-vue": "4.2.3",
|
|
90
|
-
"@vitest/coverage-v8": "0.
|
|
91
|
-
"@vitest/ui": "0.
|
|
92
|
-
"@vue/test-utils": "2.4.
|
|
91
|
+
"@vitest/coverage-v8": "0.34.1",
|
|
92
|
+
"@vitest/ui": "0.34.1",
|
|
93
|
+
"@vue/test-utils": "2.4.1",
|
|
93
94
|
"@vue/tsconfig": "0.4.0",
|
|
94
|
-
"@vueuse/core": "10.
|
|
95
|
-
"@vueuse/shared": "10.
|
|
95
|
+
"@vueuse/core": "10.3.0",
|
|
96
|
+
"@vueuse/shared": "10.3.0",
|
|
96
97
|
"argparse": "2.0.1",
|
|
97
98
|
"autoprefixer": "10.4.14",
|
|
98
99
|
"babel-loader": "8.3.0",
|
|
99
100
|
"bumpp": "9.1.1",
|
|
100
101
|
"css-loader": "6.8.1",
|
|
101
|
-
"eslint": "8.
|
|
102
|
+
"eslint": "8.46.0",
|
|
102
103
|
"fast-glob": "3.3.1",
|
|
103
|
-
"fast-xml-parser": "4.2.
|
|
104
|
+
"fast-xml-parser": "4.2.7",
|
|
104
105
|
"fs-extra": "11.1.1",
|
|
105
106
|
"husky": "8.0.3",
|
|
106
107
|
"jsdom": "22.1.0",
|
|
107
108
|
"lint-staged": "13.2.3",
|
|
108
|
-
"postcss": "8.4.
|
|
109
|
+
"postcss": "8.4.27",
|
|
109
110
|
"react": "18.2.0",
|
|
110
111
|
"react-dom": "18.2.0",
|
|
111
|
-
"remixicon": "3.
|
|
112
|
-
"sass": "1.
|
|
112
|
+
"remixicon": "3.5.0",
|
|
113
|
+
"sass": "1.64.2",
|
|
113
114
|
"scule": "1.0.0",
|
|
114
|
-
"storybook": "7.1
|
|
115
|
+
"storybook": "7.2.1",
|
|
115
116
|
"tailwindcss": "3.3.3",
|
|
116
117
|
"tsc-alias": "1.8.7",
|
|
117
118
|
"typescript": "5.1.6",
|
|
118
119
|
"unplugin-auto-import": "0.16.6",
|
|
119
|
-
"vite": "4.4.
|
|
120
|
-
"vitest": "0.
|
|
120
|
+
"vite": "4.4.8",
|
|
121
|
+
"vitest": "0.34.1",
|
|
121
122
|
"vue": "3.3.4",
|
|
122
123
|
"vue-loader": "17.2.2",
|
|
123
|
-
"vue-tsc": "1.8.
|
|
124
|
+
"vue-tsc": "1.8.8"
|
|
124
125
|
},
|
|
125
126
|
"engines": {
|
|
126
127
|
"pnpm": ">=8 <9"
|
package/dist/index-1f5d0d16.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { RiAlertFill as y, RiAlertLine as E, RiArrowDropDownFill as T, RiArrowLeftSLine as w, RiArrowRightSLine as A, RiCheckLine as I, RiCheckboxBlankCircleFill as v, RiCheckboxBlankCircleLine as D, RiCheckboxBlankLine as B, RiCheckboxCircleFill as S, RiCheckboxCircleLine as M, RiCheckboxFill as O, RiCheckboxIndeterminateFill as j, RiCloseCircleLine as U, RiCloseFill as V, RiCloseLine as W, RiErrorWarningFill as q, RiErrorWarningLine as G, RiEyeLine as P, RiEyeOffLine as z, RiInformationFill as H, RiInformationLine as J, RiRadioButtonLine as K } from "./all-icons.es.js";
|
|
2
|
-
import { createGlobalState as N, useColorMode as Q } from "@vueuse/core";
|
|
3
|
-
import { ref as L, computed as m, watch as X } from "vue";
|
|
4
|
-
import { set as g, get as e } from "@vueuse/shared";
|
|
5
|
-
import { c as Y } from "./colors-01d79c7b.js";
|
|
6
|
-
const oe = N(() => {
|
|
7
|
-
const t = [
|
|
8
|
-
y,
|
|
9
|
-
E,
|
|
10
|
-
T,
|
|
11
|
-
w,
|
|
12
|
-
A,
|
|
13
|
-
I,
|
|
14
|
-
v,
|
|
15
|
-
D,
|
|
16
|
-
B,
|
|
17
|
-
S,
|
|
18
|
-
M,
|
|
19
|
-
O,
|
|
20
|
-
j,
|
|
21
|
-
U,
|
|
22
|
-
V,
|
|
23
|
-
W,
|
|
24
|
-
q,
|
|
25
|
-
G,
|
|
26
|
-
P,
|
|
27
|
-
z,
|
|
28
|
-
H,
|
|
29
|
-
J,
|
|
30
|
-
K
|
|
31
|
-
], i = L({});
|
|
32
|
-
return { registeredIcons: i, registerIcons: (a) => {
|
|
33
|
-
g(i, {
|
|
34
|
-
...e(i),
|
|
35
|
-
...Object.fromEntries(
|
|
36
|
-
[...t, ...a].map(({ name: s, path: d }) => [s, d])
|
|
37
|
-
)
|
|
38
|
-
});
|
|
39
|
-
} };
|
|
40
|
-
}), r = {
|
|
41
|
-
auto: "auto",
|
|
42
|
-
light: "light",
|
|
43
|
-
dark: "dark"
|
|
44
|
-
}, C = (t) => Object.fromEntries(
|
|
45
|
-
Y.map((i) => [
|
|
46
|
-
i,
|
|
47
|
-
{
|
|
48
|
-
DEFAULT: `var(--rui-${t}-${i}-main)`,
|
|
49
|
-
lighter: `var(--rui-${t}-${i}-lighter)`,
|
|
50
|
-
darker: `var(--rui-${t}-${i}-darker)`
|
|
51
|
-
}
|
|
52
|
-
])
|
|
53
|
-
), b = {
|
|
54
|
-
light: C("light"),
|
|
55
|
-
dark: C("dark")
|
|
56
|
-
}, u = L({ ...b }), ne = () => {
|
|
57
|
-
const { store: t, state: i, system: h } = Q(), a = m(
|
|
58
|
-
() => e(t) === r.auto
|
|
59
|
-
), s = m(
|
|
60
|
-
() => e(a) && e(h) === r.light || e(i) === r.light
|
|
61
|
-
), d = m(
|
|
62
|
-
() => e(a) && e(h) === r.dark || e(i) === r.dark
|
|
63
|
-
), k = m(() => e(s) ? e(u).light : e(u).dark), c = (l) => {
|
|
64
|
-
g(t, l || r.auto);
|
|
65
|
-
}, p = () => {
|
|
66
|
-
e(a) ? c(r.light) : e(s) ? c(r.dark) : e(d) && c(r.auto);
|
|
67
|
-
}, R = (l) => {
|
|
68
|
-
g(u, l);
|
|
69
|
-
};
|
|
70
|
-
return {
|
|
71
|
-
isAutoControlled: a,
|
|
72
|
-
isLight: s,
|
|
73
|
-
isDark: d,
|
|
74
|
-
config: u,
|
|
75
|
-
theme: k,
|
|
76
|
-
store: t,
|
|
77
|
-
state: i,
|
|
78
|
-
init: (l) => {
|
|
79
|
-
c(l.mode ?? r.auto), R(l.config ?? { ...b }), typeof window < "u" && X(
|
|
80
|
-
s,
|
|
81
|
-
(x) => {
|
|
82
|
-
const $ = Object.entries(e(k)).map(([o, n]) => ({
|
|
83
|
-
[`--rui-${o}-main`]: n.DEFAULT,
|
|
84
|
-
[`--rui-${o}-lighter`]: n.lighter,
|
|
85
|
-
[`--rui-${o}-darker`]: n.darker
|
|
86
|
-
})).reduce((o, n) => ({ ...o, ...n }), {}), f = x ? r.light : r.dark, F = {
|
|
87
|
-
"--rui-text-primary": `var(--rui-${f}-text-primary)`,
|
|
88
|
-
"--rui-text-secondary": `var(--rui-${f}-text-secondary)`,
|
|
89
|
-
"--rui-text-disabled": `var(--rui-${f}-text-disabled)`
|
|
90
|
-
};
|
|
91
|
-
Object.entries({
|
|
92
|
-
...$,
|
|
93
|
-
...F
|
|
94
|
-
}).forEach(([o, n]) => {
|
|
95
|
-
document.documentElement.style.setProperty(o, n);
|
|
96
|
-
});
|
|
97
|
-
},
|
|
98
|
-
{ immediate: !0 }
|
|
99
|
-
);
|
|
100
|
-
},
|
|
101
|
-
setThemeConfig: R,
|
|
102
|
-
toggleThemeMode: p,
|
|
103
|
-
switchThemeScheme: c
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
export {
|
|
107
|
-
r as T,
|
|
108
|
-
ne as a,
|
|
109
|
-
oe as u
|
|
110
|
-
};
|