@rotki/ui-library 0.2.0 → 0.2.2
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-eb935704.mjs → all-icons.es.js} +4989 -5689
- package/dist/components/index.es.js +24 -0
- package/dist/composables/index.es.js +10 -0
- package/dist/index-1f5d0d16.js +110 -0
- package/dist/{index-74133324.mjs → index-b9d540d9.js} +580 -578
- package/dist/index.es.js +2525 -2522
- package/dist/{theme.es.js → theme/index.es.js} +1 -1
- package/package.json +33 -12
- package/dist/components.es.js +0 -21
- package/dist/composables.es.js +0 -7
- /package/dist/{colors-01d79c7b.mjs → colors-01d79c7b.js} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { A as r, a as p, R as m, B as l, C as d, b as x, F as C, c as F, _ as b, d as c, e as g, f as h, g as n, h as A, i as B } from "../index-b9d540d9.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
import "@vueuse/shared";
|
|
4
|
+
import "../index-1f5d0d16.js";
|
|
5
|
+
import "../all-icons.es.js";
|
|
6
|
+
import "@vueuse/core";
|
|
7
|
+
import "../colors-01d79c7b.js";
|
|
8
|
+
export {
|
|
9
|
+
r as RuiAlert,
|
|
10
|
+
p as RuiAutoComplete,
|
|
11
|
+
m as RuiButton,
|
|
12
|
+
l as RuiButtonGroup,
|
|
13
|
+
d as RuiCheckbox,
|
|
14
|
+
x as RuiChip,
|
|
15
|
+
C as RuiFooterStepper,
|
|
16
|
+
F as RuiIcon,
|
|
17
|
+
b as RuiLogo,
|
|
18
|
+
c as RuiProgress,
|
|
19
|
+
g as RuiRadio,
|
|
20
|
+
h as RuiRadioGroup,
|
|
21
|
+
n as RuiRevealableTextField,
|
|
22
|
+
A as RuiStepper,
|
|
23
|
+
B as RuiTextField
|
|
24
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
};
|