@rotki/ui-library 0.14.0 → 0.16.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.
Files changed (71) hide show
  1. package/dist/RuiColorPicker.vue_vue_type_script_setup_true_lang-ByCIjyQ_.js +8945 -0
  2. package/dist/breakpoint-DAvEs_TA.js +37 -0
  3. package/dist/components/alerts/{Alert.vue.d.ts → RuiAlert.vue.d.ts} +10 -10
  4. package/dist/components/buttons/button/{Button.vue.d.ts → RuiButton.vue.d.ts} +5 -5
  5. package/dist/components/buttons/button-group/{ButtonGroup.vue.d.ts → RuiButtonGroup.vue.d.ts} +4 -4
  6. package/dist/components/cards/{Card.vue.d.ts → RuiCard.vue.d.ts} +12 -12
  7. package/dist/components/chips/{Chip.vue.d.ts → RuiChip.vue.d.ts} +19 -19
  8. package/dist/components/color-picker/RuiColorBoard.vue.d.ts +23 -0
  9. package/dist/components/color-picker/RuiColorDisplay.vue.d.ts +12 -0
  10. package/dist/components/color-picker/RuiColorHue.vue.d.ts +12 -0
  11. package/dist/components/color-picker/RuiColorInput.vue.d.ts +13 -0
  12. package/dist/components/color-picker/RuiColorPicker.vue.d.ts +21 -0
  13. package/dist/components/color-picker/utils.d.ts +44 -0
  14. package/dist/components/forms/auto-complete/{AutoComplete.vue.d.ts → RuiAutoComplete.vue.d.ts} +1 -1
  15. package/dist/components/forms/auto-complete/{AutoCompleteSelection.vue.d.ts → RuiAutoCompleteSelection.vue.d.ts} +2 -2
  16. package/dist/components/forms/radio-button/radio-group/{RadioGroup.vue.d.ts → RuiRadioGroup.vue.d.ts} +10 -10
  17. package/dist/components/forms/revealable-text-field/{RevealableTextField.vue.d.ts → RuiRevealableTextField.vue.d.ts} +37 -37
  18. package/dist/components/forms/select/RuiMenuSelect.vue.d.ts +153 -0
  19. package/dist/components/forms/slider/{Slider.vue.d.ts → RuiSlider.vue.d.ts} +19 -19
  20. package/dist/components/forms/text-area/{TextArea.vue.d.ts → RuiTextArea.vue.d.ts} +37 -37
  21. package/dist/components/forms/text-field/{TextField.vue.d.ts → RuiTextField.vue.d.ts} +38 -38
  22. package/dist/components/icons/{Icon.vue.d.ts → RuiIcon.vue.d.ts} +9 -9
  23. package/dist/components/index.d.ts +41 -39
  24. package/dist/components/index.es.js +36 -34
  25. package/dist/components/loaders/{SkeletonBase.vue.d.ts → RuiSkeletonBase.vue.d.ts} +3 -3
  26. package/dist/components/loaders/{Skeleton.vue.d.ts → RuiSkeletonLoader.vue.d.ts} +7 -7
  27. package/dist/components/logos/RuiLogo.vue.d.ts +65 -0
  28. package/dist/components/overlays/badge/{Badge.vue.d.ts → RuiBadge.vue.d.ts} +19 -19
  29. package/dist/components/overlays/bottom-sheet/RuiBottomSheet.vue.d.ts +46 -0
  30. package/dist/components/overlays/dialog/RuiDialog.vue.d.ts +87 -0
  31. package/dist/components/overlays/menu/{Menu.vue.d.ts → RuiMenu.vue.d.ts} +90 -7
  32. package/dist/components/steppers/{FooterStepper.vue.d.ts → RuiFooterStepper.vue.d.ts} +19 -9
  33. package/dist/components/tables/{DataTable.vue.d.ts → RuiDataTable.vue.d.ts} +13 -9
  34. package/dist/components/tables/{ExpandButton.vue.d.ts → RuiExpandButton.vue.d.ts} +1 -1
  35. package/dist/components/tables/{TableHead.vue.d.ts → RuiTableHead.vue.d.ts} +16 -4
  36. package/dist/composables/dropdown-menu.d.ts +40 -0
  37. package/dist/composables/index.es.js +5 -81
  38. package/dist/consts/forms/auto-complete/index.d.ts +3 -3
  39. package/dist/consts/typography.d.ts +1 -2
  40. package/dist/index-RsNqSz2V.js +177 -0
  41. package/dist/index.es.js +2787 -2785
  42. package/dist/style.css +1 -1
  43. package/dist/theme/index.es.js +1 -1
  44. package/dist/utils/assert.d.ts +1 -0
  45. package/dist/utils/helpers.d.ts +7 -0
  46. package/package.json +45 -49
  47. package/dist/components/forms/select/MenuSelect.vue.d.ts +0 -62
  48. package/dist/components/logos/Logo.vue.d.ts +0 -27
  49. package/dist/components/overlays/dialog/Dialog.vue.d.ts +0 -60
  50. package/dist/index-4pX97qAk.js +0 -8090
  51. package/dist/theme-DT8UjYf9.js +0 -124
  52. package/dist/{colors-ikihApJv.js → colors-D563Ic3q.js} +0 -0
  53. package/dist/components/accordions/accordion/{Accordion.vue.d.ts → RuiAccordion.vue.d.ts} +0 -0
  54. package/dist/components/accordions/accordions/{Accordions.vue.d.ts → RuiAccordions.vue.d.ts} +0 -0
  55. package/dist/components/cards/{CardHeader.vue.d.ts → RuiCardHeader.vue.d.ts} +0 -0
  56. package/dist/components/divider/{Divider.vue.d.ts → RuiDivider.vue.d.ts} +0 -0
  57. package/dist/components/forms/checkbox/{Checkbox.vue.d.ts → RuiCheckbox.vue.d.ts} +18 -18
  58. package/dist/components/forms/radio-button/radio/{Radio.vue.d.ts → RuiRadio.vue.d.ts} +17 -17
  59. package/dist/components/forms/select/{SimpleSelect.vue.d.ts → RuiSimpleSelect.vue.d.ts} +8 -8
  60. package/dist/components/forms/switch/{Switch.vue.d.ts → RuiSwitch.vue.d.ts} +9 -9
  61. package/dist/components/helpers/{FormTextDetail.vue.d.ts → RuiFormTextDetail.vue.d.ts} +0 -0
  62. package/dist/components/overlays/tooltip/{Tooltip.vue.d.ts → RuiTooltip.vue.d.ts} +0 -0
  63. package/dist/components/progress/{Progress.vue.d.ts → RuiProgress.vue.d.ts} +9 -9
  64. package/dist/components/steppers/{Stepper.vue.d.ts → RuiStepper.vue.d.ts} +9 -9
  65. package/dist/components/steppers/{StepperCustomIcon.vue.d.ts → RuiStepperCustomIcon.vue.d.ts} +0 -0
  66. package/dist/components/steppers/{StepperIcon.vue.d.ts → RuiStepperIcon.vue.d.ts} +0 -0
  67. package/dist/components/tables/{TablePagination.vue.d.ts → RuiTablePagination.vue.d.ts} +8 -8
  68. package/dist/components/tabs/tab/{Tab.vue.d.ts → RuiTab.vue.d.ts} +18 -18
  69. package/dist/components/tabs/tab-item/{TabItem.vue.d.ts → RuiTabItem.vue.d.ts} +8 -8
  70. package/dist/components/tabs/tab-items/{TabItems.vue.d.ts → RuiTabItems.vue.d.ts} +0 -0
  71. package/dist/components/tabs/tabs/{Tabs.vue.d.ts → RuiTabs.vue.d.ts} +16 -16
@@ -0,0 +1,177 @@
1
+ import { RiArrowDownLine as T, RiArrowDropDownFill as $, RiArrowLeftDoubleLine as D, RiArrowLeftLine as v, RiArrowLeftSLine as I, RiArrowRightDoubleLine as S, RiArrowRightLine as U, RiArrowRightSLine as B, RiExpandUpDownLine as M } from "./icons/icons_1.es.js";
2
+ import { RiDatabase2Line as _ } from "./icons/icons_2.es.js";
3
+ import { RiAlertFill as j, RiAlertLine as O, RiCheckLine as P, RiCheckboxBlankCircleFill as V, RiCheckboxBlankCircleLine as W, RiCheckboxBlankLine as q, RiCheckboxCircleFill as z, RiCheckboxCircleLine as G, RiCheckboxFill as H, RiCheckboxIndeterminateFill as N, RiCloseCircleLine as J, RiCloseFill as K, RiCloseLine as Q, RiErrorWarningFill as X, RiErrorWarningLine as Y, RiEyeLine as Z, RiEyeOffLine as ee, RiInformationFill as ie, RiInformationLine as re, RiRadioButtonLine as te, RiMoreFill as ne } from "./icons/icons_5.es.js";
4
+ import { createGlobalState as oe, useColorMode as ae } from "@vueuse/core";
5
+ import { ref as b, computed as R, watch as se } from "vue";
6
+ import { set as L, get as t } from "@vueuse/shared";
7
+ import { c as le } from "./colors-D563Ic3q.js";
8
+ const Ae = oe(() => {
9
+ const e = [
10
+ j,
11
+ O,
12
+ T,
13
+ $,
14
+ D,
15
+ v,
16
+ I,
17
+ S,
18
+ U,
19
+ B,
20
+ P,
21
+ V,
22
+ W,
23
+ q,
24
+ z,
25
+ G,
26
+ H,
27
+ N,
28
+ J,
29
+ K,
30
+ Q,
31
+ _,
32
+ X,
33
+ Y,
34
+ Z,
35
+ ee,
36
+ ie,
37
+ re,
38
+ te,
39
+ ne,
40
+ M
41
+ ], i = b({});
42
+ return { registeredIcons: i, registerIcons: (n) => {
43
+ L(i, {
44
+ ...t(i),
45
+ ...Object.fromEntries(
46
+ [...e, ...n].map(({ name: r, path: a }) => [r, a])
47
+ )
48
+ });
49
+ } };
50
+ }), o = {
51
+ auto: "auto",
52
+ dark: "dark",
53
+ light: "light"
54
+ };
55
+ function k(e) {
56
+ return Object.fromEntries(
57
+ le.map((i) => [
58
+ i,
59
+ {
60
+ darker: `var(--rui-${e}-${i}-darker)`,
61
+ DEFAULT: `var(--rui-${e}-${i}-main)`,
62
+ lighter: `var(--rui-${e}-${i}-lighter)`
63
+ }
64
+ ])
65
+ );
66
+ }
67
+ const w = {
68
+ dark: k("dark"),
69
+ light: k("light")
70
+ }, p = b({ ...w });
71
+ function ye() {
72
+ const { state: e, store: i, system: l } = ae(), n = R(
73
+ () => t(i) === o.auto
74
+ ), r = R(
75
+ () => t(n) && t(l) === o.light || t(e) === o.light
76
+ ), a = R(
77
+ () => t(n) && t(l) === o.dark || t(e) === o.dark
78
+ ), d = R(() => t(r) ? t(p).light : t(p).dark), s = (m) => {
79
+ L(i, m || o.auto);
80
+ }, h = () => {
81
+ t(n) ? s(o.light) : t(r) ? s(o.dark) : t(a) && s(o.auto);
82
+ }, c = (m) => {
83
+ L(p, m);
84
+ };
85
+ return {
86
+ config: p,
87
+ init: (m) => {
88
+ s(m.mode ?? o.auto), c(m.config ?? { ...w }), typeof window < "u" && se(
89
+ [r, d],
90
+ ([y, x]) => {
91
+ const E = Object.entries(x).map(([u, f]) => ({
92
+ [`--rui-${u}-darker`]: f.darker,
93
+ [`--rui-${u}-lighter`]: f.lighter,
94
+ [`--rui-${u}-main`]: f.DEFAULT
95
+ })).reduce((u, f) => ({ ...u, ...f }), {}), C = y ? o.light : o.dark, F = {
96
+ "--rui-text-disabled": `var(--rui-${C}-text-disabled)`,
97
+ "--rui-text-primary": `var(--rui-${C}-text-primary)`,
98
+ "--rui-text-secondary": `var(--rui-${C}-text-secondary)`
99
+ };
100
+ Object.entries({
101
+ ...E,
102
+ ...F
103
+ }).forEach(([u, f]) => {
104
+ document.documentElement.style.setProperty(u, f);
105
+ });
106
+ },
107
+ { immediate: !0 }
108
+ );
109
+ },
110
+ isAutoControlled: n,
111
+ isDark: a,
112
+ isLight: r,
113
+ setThemeConfig: c,
114
+ state: e,
115
+ store: i,
116
+ switchThemeScheme: s,
117
+ theme: d,
118
+ toggleThemeMode: h
119
+ };
120
+ }
121
+ const ce = /\d/, ue = ["-", "_", "/", "."];
122
+ function fe(e = "") {
123
+ if (!ce.test(e))
124
+ return e !== e.toLowerCase();
125
+ }
126
+ function A(e, i) {
127
+ const l = i ?? ue, n = [];
128
+ if (!e || typeof e != "string")
129
+ return n;
130
+ let r = "", a, d;
131
+ for (const s of e) {
132
+ const h = l.includes(s);
133
+ if (h === !0) {
134
+ n.push(r), r = "", a = void 0;
135
+ continue;
136
+ }
137
+ const c = fe(s);
138
+ if (d === !1) {
139
+ if (a === !1 && c === !0) {
140
+ n.push(r), r = s, a = c;
141
+ continue;
142
+ }
143
+ if (a === !0 && c === !1 && r.length > 1) {
144
+ const g = r.at(-1);
145
+ n.push(r.slice(0, Math.max(0, r.length - 1))), r = g + s, a = c;
146
+ continue;
147
+ }
148
+ }
149
+ r += s, a = c, d = h;
150
+ }
151
+ return n.push(r), n;
152
+ }
153
+ function me(e) {
154
+ return e ? e[0].toUpperCase() + e.slice(1) : "";
155
+ }
156
+ function de(e) {
157
+ return e ? e[0].toLowerCase() + e.slice(1) : "";
158
+ }
159
+ function he(e, i) {
160
+ return e ? (Array.isArray(e) ? e : A(e)).map((l) => me(i != null && i.normalize ? l.toLowerCase() : l)).join("") : "";
161
+ }
162
+ function xe(e, i) {
163
+ return de(he(e || "", i));
164
+ }
165
+ function Re(e, i) {
166
+ return e ? (Array.isArray(e) ? e : A(e)).map((l) => l.toLowerCase()).join(i ?? "-") : "";
167
+ }
168
+ function Ee(e) {
169
+ return Re(e || "", "_");
170
+ }
171
+ export {
172
+ o as T,
173
+ ye as a,
174
+ xe as c,
175
+ Ee as s,
176
+ Ae as u
177
+ };