@rotki/ui-library 2.4.1 → 2.4.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.
@@ -2,10 +2,10 @@ import { defineComponent as ne, computed as C, createElementBlock as g, openBloc
2
2
  import { isRuiIcon as Os } from "../icons/index.es.js";
3
3
  import { useElementSize as Pt, isDefined as te, onClickOutside as ws, whenever as ds, useClipboard as Fs, useElementBounding as As, useResizeObserver as It, useFocus as Bt, refDebounced as cs, useDebounceFn as ps, useFocusWithin as Yt, watchDebounced as Gs, watchIgnorable as Ws, useFetch as Ks, watchImmediate as gt, useScroll as Js, watchTriggerable as fs } from "@vueuse/core";
4
4
  import { get as t, set as y, objectOmit as Qs, clamp as Dt, objectPick as Ms, isClient as Xs, throttleFilter as ms } from "@vueuse/shared";
5
- import { u as Zs, a as Cs, b as Ss, c as xs, d as Vs, e as ea, f as zs, g as ta } from "../composables/index-DggmQIbL.js";
6
- import { u as $t, g as ut, a as yt, b as Rt, i as sa, c as aa, d as Ds, t as na, e as Ot, f as Xt } from "../utils/index-B__GIRn7.js";
5
+ import { u as Zs, a as Cs, b as Ss, c as xs, d as Vs, e as ea, f as zs, g as ta } from "../composables/index-Cfum5R97.js";
6
+ import { u as $t, g as ut, a as yt, b as Rt, i as sa, c as aa, d as Ds, t as na, e as Ot, f as Xt } from "../utils/index-DvfvOuTx.js";
7
7
  import { logicOr as St, logicNot as jt, logicAnd as Ht } from "@vueuse/math";
8
- import { t as rt } from "../vendor-DONK-IZM.js";
8
+ import { t as rt } from "../vendor-CZEjafxy.js";
9
9
  import { T as ft } from "../consts/time-accuracy-BnKA5GyT.js";
10
10
  import nt from "dayjs";
11
11
  import { R as Zt } from "../i18n/keys-CNGXWOJX.js";
@@ -1,11 +1,11 @@
1
1
  import { useWindowSize as se, breakpointsTailwind as re, useBreakpoints as ie, createSharedComposable as ce, useColorMode as ae, unrefElement as Z, useResizeObserver as te, useVirtualList as le, useArrayMap as ue, watchOnce as fe, useEventListener as F, useMutationObserver as de } from "@vueuse/core";
2
- import { c as G, p as pe, d as me, a as he, o as ge, f as ye, b as we, e as Le, g as be } from "../vendor-DONK-IZM.js";
3
- import { computed as R, inject as J, ref as y, watch as V, onMounted as ne, watchEffect as Ce, nextTick as ee } from "vue";
2
+ import { c as G, p as pe, d as me, a as he, o as ge, f as ye, b as we, e as Le, g as be } from "../vendor-CZEjafxy.js";
3
+ import { computed as R, inject as J, ref as y, watch as V, onMounted as ne, watchEffect as ve, nextTick as ee } from "vue";
4
4
  import { get as e, set as f } from "@vueuse/shared";
5
- import { LuChevronsUpDown as ve, LuArrowUp as Te, LuArrowDown as xe, LuArrowLeft as Se, LuArrowRight as Ee, LuChevronUp as Ie, LuChevronDown as ke, LuChevronLeft as Pe, LuChevronRight as Oe, LuChevronsLeft as $e, LuChevronsRight as Be, LuCircleAlert as De, LuCheck as Ae, LuCircleX as Re, LuCircleCheck as Me, LuCheckboxBlank as _e, LuCheckboxFill as ze, LuCheckboxIndeterminateFill as He, LuCheckboxBlankCircle as je, LuCheckboxBlankCircleFill as qe, LuRadioButtonFill as Ue, LuClock as Ne } from "../icons/icons_1.es.js";
5
+ import { LuChevronsUpDown as Ce, LuArrowUp as Te, LuArrowDown as xe, LuArrowLeft as Se, LuArrowRight as Ee, LuChevronUp as Ie, LuChevronDown as ke, LuChevronLeft as Pe, LuChevronRight as Oe, LuChevronsLeft as $e, LuChevronsRight as Be, LuCircleAlert as De, LuCheck as Ae, LuCircleX as Re, LuCircleCheck as Me, LuCheckboxBlank as _e, LuCheckboxFill as ze, LuCheckboxIndeterminateFill as He, LuCheckboxBlankCircle as je, LuCheckboxBlankCircleFill as qe, LuRadioButtonFill as Ue, LuClock as Ne } from "../icons/icons_1.es.js";
6
6
  import { LuEllipsis as Ve, LuInfo as We, LuEye as Ke, LuEyeOff as Xe } from "../icons/icons_2.es.js";
7
7
  import { LuTriangleAlert as Fe, LuX as Ge } from "../icons/icons_4.es.js";
8
- import { c as Je } from "../utils/index-B__GIRn7.js";
8
+ import { c as Je } from "../utils/index-DvfvOuTx.js";
9
9
  import { d as oe, T as O } from "../types/index-CN6Ip1GL.js";
10
10
  function pt() {
11
11
  const { width: o } = se(), l = {
@@ -19,7 +19,7 @@ function pt() {
19
19
  ), c = h.map(([n, u]) => [
20
20
  G(`is_${n}`),
21
21
  u
22
- ]), C = s.map((n) => [
22
+ ]), v = s.map((n) => [
23
23
  G(`is_${n}_and_up`),
24
24
  p.greaterOrEqual(n)
25
25
  ]), w = s.map((n) => [
@@ -31,14 +31,14 @@ function pt() {
31
31
  });
32
32
  return {
33
33
  ...Object.fromEntries(c),
34
- ...Object.fromEntries(C),
34
+ ...Object.fromEntries(v),
35
35
  ...Object.fromEntries(w),
36
36
  name: m,
37
37
  width: o
38
38
  };
39
39
  }
40
40
  const Ye = [
41
- ve,
41
+ Ce,
42
42
  Ve,
43
43
  Fe,
44
44
  Ge,
@@ -87,7 +87,7 @@ function ht() {
87
87
  const N = y({ ...oe }), gt = ce(() => {
88
88
  const { state: o, store: l } = ae(), p = R(() => e(l) === O.auto), a = R(() => e(o) === O.light), s = R(() => e(o) === O.dark), h = R(() => e(a) ? e(N).light : e(N).dark), c = (n) => {
89
89
  f(l, n || O.auto);
90
- }, C = () => {
90
+ }, v = () => {
91
91
  e(p) ? c(O.light) : e(a) ? c(O.dark) : e(s) && c(O.auto);
92
92
  }, w = (n) => {
93
93
  f(N, n);
@@ -97,14 +97,14 @@ const N = y({ ...oe }), gt = ce(() => {
97
97
  init: (n) => {
98
98
  c(n.mode ?? O.auto), w(n.config ?? { ...oe }), typeof window < "u" && V([a, h], ([u, T]) => {
99
99
  const r = /* @__PURE__ */ new Map();
100
- Object.entries(T).forEach(([v, x]) => {
101
- r.set(`--rui-${v}-darker`, x.darker), r.set(`--rui-${v}-lighter`, x.lighter), r.set(`--rui-${v}-main`, x.DEFAULT);
100
+ Object.entries(T).forEach(([C, x]) => {
101
+ r.set(`--rui-${C}-darker`, x.darker), r.set(`--rui-${C}-lighter`, x.lighter), r.set(`--rui-${C}-main`, x.DEFAULT);
102
102
  });
103
103
  const d = u ? O.light : O.dark;
104
104
  r.set("--rui-text-disabled", `var(--rui-${d}-text-disabled)`), r.set("--rui-text-primary", `var(--rui-${d}-text-primary)`), r.set("--rui-text-secondary", `var(--rui-${d}-text-secondary)`);
105
105
  const k = document.documentElement.style;
106
- r.forEach((v, x) => {
107
- k.setProperty(x, v);
106
+ r.forEach((C, x) => {
107
+ k.setProperty(x, C);
108
108
  });
109
109
  }, { immediate: !0 });
110
110
  },
@@ -116,7 +116,7 @@ const N = y({ ...oe }), gt = ce(() => {
116
116
  store: l,
117
117
  switchThemeScheme: c,
118
118
  theme: h,
119
- toggleThemeMode: C
119
+ toggleThemeMode: v
120
120
  };
121
121
  }), $ = {
122
122
  adaptive: !0,
@@ -141,11 +141,11 @@ const N = y({ ...oe }), gt = ce(() => {
141
141
  ]
142
142
  });
143
143
  function yt(o, l = y(!1), p = y(0), a = y(0), s) {
144
- const h = y(null), c = y(null), C = y(null), w = y(!1), m = y(), n = y(), u = y(!1), T = y(!1), r = () => {
144
+ const h = y(null), c = y(null), v = y(null), w = y(!1), m = y(), n = y(), u = y(!1), T = y(!1), r = () => {
145
145
  f(u, !1);
146
146
  }, d = () => {
147
147
  var g;
148
- (g = e(C)) == null || g.update();
148
+ (g = e(v)) == null || g.update();
149
149
  }, k = (g = !1) => {
150
150
  if (!e(l) && (e(n) && (clearTimeout(e(n)), f(n, void 0)), f(T, !1), !e(m))) {
151
151
  f(u, !0);
@@ -154,7 +154,7 @@ function yt(o, l = y(!1), p = y(0), a = y(0), s) {
154
154
  }, g ? 0 : e(p));
155
155
  f(m, b);
156
156
  }
157
- }, v = (g = !1) => {
157
+ }, C = (g = !1) => {
158
158
  if (!e(l) && (e(m) && (clearTimeout(e(m)), f(m, void 0)), !e(n))) {
159
159
  const b = setTimeout(() => {
160
160
  e(w) || r(), f(w, !1), f(n, void 0);
@@ -165,7 +165,7 @@ function yt(o, l = y(!1), p = y(0), a = y(0), s) {
165
165
  f(T, !0);
166
166
  };
167
167
  return ne(() => {
168
- Ce((g) => {
168
+ ve((g) => {
169
169
  if (!e(c) || !e(h) && !e(s))
170
170
  return;
171
171
  const b = Z(c), B = e(s) || Z(h);
@@ -224,15 +224,15 @@ function yt(o, l = y(!1), p = y(0), a = y(0), s) {
224
224
  placement: U,
225
225
  strategy: K
226
226
  });
227
- f(C, X), g(X.destroy);
227
+ f(v, X), g(X.destroy);
228
228
  });
229
229
  }), te([h, c], async () => {
230
- const g = e(C);
230
+ const g = e(v);
231
231
  e(w) && g && await g.update();
232
232
  }), {
233
- instance: C,
233
+ instance: v,
234
234
  leavePending: T,
235
- onClose: v,
235
+ onClose: C,
236
236
  onLeavePending: x,
237
237
  onOpen: k,
238
238
  onPopperLeave: r,
@@ -267,7 +267,7 @@ function wt({
267
267
  hideSelected: s,
268
268
  itemHeight: h = 48,
269
269
  keyAttr: c,
270
- menuRef: C,
270
+ menuRef: v,
271
271
  options: w,
272
272
  overscan: m = 5,
273
273
  prependWidth: n,
@@ -278,7 +278,7 @@ function wt({
278
278
  const d = R(() => {
279
279
  const t = e(w);
280
280
  return s ? t.filter((i) => !z(i)) : t;
281
- }), { getIdentifier: k, getText: v } = et({
281
+ }), { getIdentifier: k, getText: C } = et({
282
282
  keyAttr: c,
283
283
  textAttr: T
284
284
  }), { containerProps: x, list: g, scrollTo: b, wrapperProps: B } = le(
@@ -294,7 +294,7 @@ function wt({
294
294
  const t = { max: 0, min: 0 }, i = 30, P = 1.5, S = e(a) ? 12 : 13;
295
295
  e(d).forEach((D) => {
296
296
  var Y, Q;
297
- const A = ((Q = (Y = v(D)) == null ? void 0 : Y.toString()) == null ? void 0 : Q.length) ?? 0;
297
+ const A = ((Q = (Y = C(D)) == null ? void 0 : Y.toString()) == null ? void 0 : Q.length) ?? 0;
298
298
  t.min === 0 && t.max === 0 ? (t.min = A, t.max = A) : A < t.min ? t.min = A : A > t.max && (t.max = A);
299
299
  });
300
300
  const j = t.max - t.min;
@@ -318,12 +318,12 @@ function wt({
318
318
  const i = e(L);
319
319
  i > -1 && await ee(() => {
320
320
  var S, j;
321
- if ((S = e(C)) == null ? void 0 : S.parentElement) {
322
- const E = e(C).getElementsByClassName("highlighted")[0];
321
+ if ((S = e(v)) == null ? void 0 : S.parentElement) {
322
+ const E = e(v).getElementsByClassName("highlighted")[0];
323
323
  if (E)
324
324
  (j = E.scrollIntoView) == null || j.call(E, { behavior: t ? "smooth" : "auto", block: "nearest" }), e(l) && "focus" in E && typeof E.focus == "function" && (E == null || E.focus());
325
325
  else if (b(i), e(l)) {
326
- const D = e(C).getElementsByClassName("highlighted")[0];
326
+ const D = e(v).getElementsByClassName("highlighted")[0];
327
327
  D && "focus" in D && typeof D.focus == "function" && D.focus();
328
328
  }
329
329
  }
@@ -359,7 +359,7 @@ function wt({
359
359
  },
360
360
  containerProps: x,
361
361
  getIdentifier: k,
362
- getText: v,
362
+ getText: C,
363
363
  highlightedIndex: L,
364
364
  isActiveItem: z,
365
365
  isOpen: I,
@@ -384,7 +384,7 @@ function wt({
384
384
  }
385
385
  const tt = Symbol("rui:i18n");
386
386
  function Lt() {
387
- const o = J(tt), l = (a, s) => {
387
+ const o = J(tt, void 0), l = (a, s) => {
388
388
  if (o != null && o.te(a))
389
389
  return o == null ? void 0 : o.t(a, s);
390
390
  };
@@ -400,19 +400,19 @@ function bt(o) {
400
400
  ...o
401
401
  };
402
402
  }
403
- function Ct() {
403
+ function vt() {
404
404
  const o = J(nt);
405
405
  if (!o)
406
406
  throw new Error("Could not find rui table options injection");
407
407
  return o;
408
408
  }
409
- function vt(o = y(!1), l) {
409
+ function Ct(o = y(!1), l) {
410
410
  const p = y(null), a = y(null), s = y(!1), h = -0.5, c = {
411
411
  head: ":scope > thead[data-id=head-main]",
412
412
  headClone: ":scope > thead[data-id=head-clone]",
413
413
  row: ":scope > tbody > tr:not([hidden])",
414
414
  th: ":scope > th"
415
- }, C = () => {
415
+ }, v = () => {
416
416
  const m = e(p);
417
417
  if (!e(o) || !m)
418
418
  return;
@@ -422,9 +422,9 @@ function vt(o = y(!1), l) {
422
422
  const r = u == null ? void 0 : u.querySelectorAll(
423
423
  c.th
424
424
  ), d = n == null ? void 0 : n.querySelectorAll(c.th);
425
- d == null || d.forEach((k, v) => {
425
+ d == null || d.forEach((k, C) => {
426
426
  te(k, (x) => {
427
- const g = x[0].target.getBoundingClientRect(), b = r == null ? void 0 : r.item(v);
427
+ const g = x[0].target.getBoundingClientRect(), b = r == null ? void 0 : r.item(C);
428
428
  b && (b.style.width = `${g.width}px`);
429
429
  });
430
430
  });
@@ -449,20 +449,20 @@ function vt(o = y(!1), l) {
449
449
  return;
450
450
  const {
451
451
  height: k,
452
- left: v,
452
+ left: C,
453
453
  width: x
454
454
  } = T, { bottom: g, top: b } = n, B = e(l) ?? 0;
455
455
  r.style.width = `${x}px`;
456
456
  const M = m.querySelectorAll(c.row), I = (_ = M.item(M.length - 1)) == null ? void 0 : _.getBoundingClientRect();
457
457
  if (b <= B && g > B && M.length > 1) {
458
- f(s, !0), r.style.left = `${v + h}px`;
458
+ f(s, !0), r.style.left = `${C + h}px`;
459
459
  const L = (I == null ? void 0 : I.height) ?? 0;
460
460
  g <= L + k + B ? r.style.top = `${g - L - k}px` : r.style.top = `${B}px`;
461
461
  } else
462
462
  f(s, !1), r.style.left = `${h}px`, r.style.top = "0";
463
463
  };
464
464
  return ne(() => {
465
- w(), F(a, "scroll", w), F(document.body, "scroll", w), F(window, "resize", w), C();
465
+ w(), F(a, "scroll", w), F(document.body, "scroll", w), F(window, "resize", w), v();
466
466
  }), {
467
467
  stick: s,
468
468
  table: p,
@@ -478,8 +478,8 @@ export {
478
478
  et as c,
479
479
  wt as d,
480
480
  Lt as e,
481
- Ct as f,
482
- vt as g,
481
+ vt as f,
482
+ Ct as g,
483
483
  bt as h,
484
484
  mt as i,
485
485
  pt as j,
@@ -1,4 +1,4 @@
1
- import { j as o, u as a, b as u } from "./index-DggmQIbL.js";
1
+ import { j as o, u as a, b as u } from "./index-Cfum5R97.js";
2
2
  export {
3
3
  o as useBreakpoint,
4
4
  a as useIcons,
@@ -1,7 +1,7 @@
1
- import { h as b, i as u, R as s, b as f, T as m, I as p } from "./composables/index-DggmQIbL.js";
1
+ import { h as b, i as u, R as s, b as f, T as m, I as p } from "./composables/index-Cfum5R97.js";
2
2
  import "./types/index-CN6Ip1GL.js";
3
3
  import i from "dayjs";
4
- import { u as c, h as n } from "./vendor-DONK-IZM.js";
4
+ import { u as c, h as n } from "./vendor-CZEjafxy.js";
5
5
  import "./components/index.es.js";
6
6
  import "./consts/colors-D563Ic3q.js";
7
7
  import "./i18n/keys-CNGXWOJX.js";
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
- import { j as a, u as o, b as i } from "./composables/index-DggmQIbL.js";
1
+ import { j as a, u as o, b as i } from "./composables/index-Cfum5R97.js";
2
2
  import { S as n, T as t } from "./types/index-CN6Ip1GL.js";
3
3
  import "dayjs";
4
- import "./vendor-DONK-IZM.js";
5
- import { c, a as C } from "./index-B4Z0iEL-.js";
4
+ import "./vendor-CZEjafxy.js";
5
+ import { c, a as C } from "./index-oYTtW2tf.js";
6
6
  import { RuiAccordion as p, RuiAccordions as g, RuiAlert as h, RuiAutoComplete as S, RuiBadge as f, RuiBottomSheet as k, RuiButton as P, RuiButtonGroup as m, RuiCalendar as w, RuiCard as R, RuiCardHeader as B, RuiCheckbox as F, RuiChip as A, RuiColorPicker as D, RuiDataTable as M, RuiDateTimePicker as T, RuiDialog as b, RuiDivider as y, RuiFooterStepper as O, RuiIcon as U, RuiLogo as q, RuiMenu as H, RuiMenuSelect as v, RuiNavigationDrawer as x, RuiNotification as G, RuiProgress as I, RuiRadio as V, RuiRadioGroup as W, RuiRevealableTextField as E, RuiSimpleSelect as z, RuiSkeletonLoader as X, RuiSlider as N, RuiStepper as K, RuiSwitch as J, RuiTab as Z, RuiTabItem as Q, RuiTabItems as Y, RuiTablePagination as j, RuiTableRowExpander as _, RuiTabs as $, RuiTextArea as uu, RuiTextField as Lu, RuiTimePicker as eu, RuiTooltip as ru } from "./components/index.es.js";
7
7
  import { c as ou } from "./consts/colors-D563Ic3q.js";
8
8
  import { t as lu } from "./i18n/keys-CNGXWOJX.js";
@@ -1,7 +1,7 @@
1
1
  import { logicOr as l } from "@vueuse/math";
2
2
  import { computed as f, ref as y } from "vue";
3
3
  import { get as i, objectPick as p, objectOmit as b, set as d } from "@vueuse/shared";
4
- import { c as x } from "../vendor-DONK-IZM.js";
4
+ import { c as x } from "../vendor-CZEjafxy.js";
5
5
  import { createGlobalState as A } from "@vueuse/core";
6
6
  class j extends Error {
7
7
  constructor(r) {
@@ -1,4 +1,4 @@
1
- import { g as de } from "./index-B4Z0iEL-.js";
1
+ import { g as de } from "./index-oYTtW2tf.js";
2
2
  const Ce = /\d/, De = ["-", "_", "/", "."];
3
3
  function Ee(t = "") {
4
4
  if (!Ce.test(t))
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@rotki/ui-library",
5
- "version": "2.4.1",
5
+ "version": "2.4.2",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
8
8
  "contributions": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rotki/ui-library",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "A vue design system and component library for rotki",
5
5
  "type": "module",
6
6
  "keywords": [