@rotki/ui-library 1.8.3 → 1.8.4

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.
@@ -252,7 +252,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
252
252
  "text-shade": "_text-shade_ue1qo_1"
253
253
  }, Hn = {
254
254
  $style: qn
255
- }, Ce = /* @__PURE__ */ le(mn, [["__cssModules", Hn]]), On = { class: "flex space-x-3 py-1 flex-grow" }, Ln = {
255
+ }, we = /* @__PURE__ */ le(mn, [["__cssModules", Hn]]), On = { class: "flex space-x-3 py-1 flex-grow" }, Ln = {
256
256
  key: 1,
257
257
  class: "text-body-2"
258
258
  }, Nn = { key: 0 }, Wn = { key: 1 }, Fn = /* @__PURE__ */ J({
@@ -319,7 +319,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
319
319
  ], 2)
320
320
  ]),
321
321
  c.actionText ? (s(), _("div", Nn, [
322
- L(Ce, {
322
+ L(we, {
323
323
  variant: "text",
324
324
  size: "sm",
325
325
  color: c.variant === "filled" ? void 0 : e(f),
@@ -333,7 +333,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
333
333
  }, 8, ["color", "class"])
334
334
  ])) : g("", !0),
335
335
  c.closeable ? (s(), _("div", Wn, [
336
- L(Ce, {
336
+ L(we, {
337
337
  color: c.variant === "filled" ? void 0 : e(f),
338
338
  size: "sm",
339
339
  icon: "",
@@ -716,7 +716,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
716
716
  emits: ["update:modelValue", "update:searchInput"],
717
717
  setup(z, { expose: a }) {
718
718
  st((v) => ({
719
- "62fb1cdc": e(ze)
719
+ "88a7211c": e(ze)
720
720
  }));
721
721
  const l = Qe(z, "modelValue"), d = Qe(z, "searchInput"), u = z, f = Je(), { dense: h, disabled: c, options: y } = pe(u), { getText: r, getIdentifier: i } = Rs({
722
722
  keyAttr: u.keyAttr,
@@ -798,7 +798,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
798
798
  setValue: Oe,
799
799
  autoSelectFirst: u.autoSelectFirst,
800
800
  hideSelected: u.hideSelected
801
- }), me = B(() => u.variant === "outlined"), we = Ot(
801
+ }), me = B(() => u.variant === "outlined"), Ce = Ot(
802
802
  ht(
803
803
  ye,
804
804
  x,
@@ -960,7 +960,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
960
960
  [v.$style.readonly]: v.readOnly,
961
961
  [v.$style.outlined]: e(me),
962
962
  [v.$style.dense]: e(h),
963
- [v.$style.float]: e(we),
963
+ [v.$style.float]: e(Ce),
964
964
  [v.$style.opened]: oe,
965
965
  [v.$style["with-value"]]: e(x),
966
966
  [v.$style["with-error"]]: ve,
@@ -1058,17 +1058,25 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
1058
1058
  onFocus: H[2] || (H[2] = ($) => Lt())
1059
1059
  }, null, 42, Zo)
1060
1060
  ], 2),
1061
- v.clearable && e(x) && !e(c) ? (s(), _("span", {
1061
+ v.clearable && e(x) && !e(c) ? (s(), P(we, {
1062
1062
  key: 1,
1063
- class: p(["group-hover:!visible", [v.$style.clear, e(N) && "!visible"]]),
1063
+ variant: "text",
1064
+ icon: "",
1065
+ size: "sm",
1066
+ color: "error",
1067
+ class: p(["group-hover:!visible", [v.$style.clear, e(N) && "!visible", {
1068
+ "mr-2": !e(h)
1069
+ }]]),
1064
1070
  onClick: H[3] || (H[3] = Ie(($) => vt(), ["stop", "prevent"]))
1065
- }, [
1066
- L(ee, {
1067
- color: "error",
1068
- name: "lu-x",
1069
- size: "18"
1070
- })
1071
- ], 2)) : g("", !0),
1071
+ }, {
1072
+ default: W(() => [
1073
+ L(ee, {
1074
+ name: "lu-x",
1075
+ size: "18"
1076
+ })
1077
+ ]),
1078
+ _: 1
1079
+ }, 8, ["class"])) : g("", !0),
1072
1080
  S("span", {
1073
1081
  class: p(v.$style.icon__wrapper),
1074
1082
  onClick: H[4] || (H[4] = ($) => yt($))
@@ -1092,7 +1100,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
1092
1100
  class: p(v.$style.fieldset)
1093
1101
  }, [
1094
1102
  S("legend", {
1095
- class: p({ "px-2": e(we) })
1103
+ class: p({ "px-2": e(Ce) })
1096
1104
  }, null, 2)
1097
1105
  ], 2)) : g("", !0)
1098
1106
  ])
@@ -1120,7 +1128,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
1120
1128
  }), [
1121
1129
  (s(!0), _(he, null, ke(e(Me), ({ item: oe, _index: ve }) => {
1122
1130
  var o;
1123
- return s(), P(Ce, {
1131
+ return s(), P(we, {
1124
1132
  ref_for: !0,
1125
1133
  ref_key: "renderedOptions",
1126
1134
  ref: U,
@@ -2026,7 +2034,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
2026
2034
  ref: N,
2027
2035
  class: p(["flex items-center gap-1 shrink-0", e(U).append])
2028
2036
  }, [
2029
- e(V) ? (s(), P(Ce, {
2037
+ e(V) ? (s(), P(we, {
2030
2038
  key: 0,
2031
2039
  class: p([{ hidden: !e(ze) }, "!p-2 clear-btn"]),
2032
2040
  variant: "text",
@@ -2238,7 +2246,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
2238
2246
  ref: m,
2239
2247
  class: p(["flex items-center gap-1 shrink-0", C.$style.append])
2240
2248
  }, [
2241
- e(K) ? (s(), P(Ce, {
2249
+ e(K) ? (s(), P(we, {
2242
2250
  key: 0,
2243
2251
  class: p([{ hidden: !e(Y) }, "!p-2 clear-btn"]),
2244
2252
  variant: "text",
@@ -2690,7 +2698,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
2690
2698
  class: p([i.$style.pill, { [i.$style.active]: e(u) === b }])
2691
2699
  }, null, 2))), 128))
2692
2700
  ], 2)) : (s(), _(he, { key: 1 }, [
2693
- i.hideButtons ? g("", !0) : (s(), P(Ce, {
2701
+ i.hideButtons ? g("", !0) : (s(), P(we, {
2694
2702
  key: 0,
2695
2703
  class: p({ [i.$style.arrow__button]: i.arrowButtons }),
2696
2704
  disabled: e(u) <= 1,
@@ -2737,7 +2745,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
2737
2745
  color: "primary",
2738
2746
  value: e(u) / e(f) * 100
2739
2747
  }, null, 8, ["class", "value"])) : g("", !0),
2740
- i.hideButtons ? g("", !0) : (s(), P(Ce, {
2748
+ i.hideButtons ? g("", !0) : (s(), P(we, {
2741
2749
  key: 4,
2742
2750
  class: p({ [i.$style.arrow__button]: i.arrowButtons }),
2743
2751
  disabled: e(u) >= e(f),
@@ -2985,7 +2993,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
2985
2993
  }), Ke({
2986
2994
  append: W(() => [
2987
2995
  S("div", au, [
2988
- L(Ce, {
2996
+ L(we, {
2989
2997
  disabled: u.disabled,
2990
2998
  tabindex: "-1",
2991
2999
  variant: "text",
@@ -3163,7 +3171,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
3163
3171
  icon: { default: "lu-chevron-down" }
3164
3172
  },
3165
3173
  setup(z) {
3166
- return (a, l) => (s(), P(Ce, G({
3174
+ return (a, l) => (s(), P(we, G({
3167
3175
  class: [
3168
3176
  a.$style.tr__expander_button,
3169
3177
  {
@@ -3401,7 +3409,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
3401
3409
  ref_key: "menuRef",
3402
3410
  ref: f
3403
3411
  }), [
3404
- (s(!0), _(he, null, ke(e(b), ({ item: Q, _index: fe }) => (s(), P(Ce, {
3412
+ (s(!0), _(he, null, ke(e(b), ({ item: Q, _index: fe }) => (s(), P(we, {
3405
3413
  key: fe,
3406
3414
  active: e(N)(Q),
3407
3415
  size: e(d) ? "sm" : void 0,
@@ -3574,7 +3582,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
3574
3582
  S("div", {
3575
3583
  class: p(I.$style.navigation)
3576
3584
  }, [
3577
- L(Ce, {
3585
+ L(we, {
3578
3586
  size: I.dense ? "sm" : void 0,
3579
3587
  disabled: !e(b) || I.loading,
3580
3588
  variant: "text",
@@ -3586,7 +3594,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
3586
3594
  ]),
3587
3595
  _: 1
3588
3596
  }, 8, ["size", "disabled"]),
3589
- L(Ce, {
3597
+ L(we, {
3590
3598
  size: I.dense ? "sm" : void 0,
3591
3599
  disabled: !e(b) || I.loading,
3592
3600
  variant: "text",
@@ -3598,7 +3606,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
3598
3606
  ]),
3599
3607
  _: 1
3600
3608
  }, 8, ["size", "disabled"]),
3601
- L(Ce, {
3609
+ L(we, {
3602
3610
  size: I.dense ? "sm" : void 0,
3603
3611
  disabled: !e(M) || I.loading,
3604
3612
  variant: "text",
@@ -3610,7 +3618,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
3610
3618
  ]),
3611
3619
  _: 1
3612
3620
  }, 8, ["size", "disabled"]),
3613
- L(Ce, {
3621
+ L(we, {
3614
3622
  size: I.dense ? "sm" : void 0,
3615
3623
  disabled: !e(M) || I.loading,
3616
3624
  variant: "text",
@@ -3731,7 +3739,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
3731
3739
  size: "sm"
3732
3740
  }, {
3733
3741
  default: W(() => [
3734
- L(Ce, {
3742
+ L(we, {
3735
3743
  class: p([
3736
3744
  r.$style.sort__button,
3737
3745
  {
@@ -4039,7 +4047,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4039
4047
  const $ = t(x);
4040
4048
  return !$ || !Array.isArray($) || !re(o) ? -1 : $.findIndex((T) => T.column === o) ?? -1;
4041
4049
  }
4042
- function we(o) {
4050
+ function Ce(o) {
4043
4051
  const $ = t(K);
4044
4052
  return $ ? $.includes(o) : !1;
4045
4053
  }
@@ -4121,10 +4129,10 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4121
4129
  }
4122
4130
  }
4123
4131
  function vt(o) {
4124
- return we(o) || !Re(o);
4132
+ return Ce(o) || !Re(o);
4125
4133
  }
4126
4134
  function St(o) {
4127
- return we(o) && Re(o);
4135
+ return Ce(o) && Re(o);
4128
4136
  }
4129
4137
  function ut(o) {
4130
4138
  const $ = t(K) ?? [];
@@ -4151,7 +4159,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4151
4159
  const j = t(V);
4152
4160
  if (!j)
4153
4161
  return !1;
4154
- const de = we($);
4162
+ const de = Ce($);
4155
4163
  o && !de ? w(V, [...j, $]) : !o && de && w(
4156
4164
  V,
4157
4165
  [...j].filter((ae) => ae !== $)
@@ -4164,7 +4172,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4164
4172
  Te === -1 && (Te = T);
4165
4173
  const ct = t(qe), Le = ct[Te];
4166
4174
  if (n(Le)) {
4167
- const Ue = t(C), De = we(Le[Ue]);
4175
+ const Ue = t(C), De = Ce(Le[Ue]);
4168
4176
  if (Te === T)
4169
4177
  yt(!De, $);
4170
4178
  else {
@@ -4182,7 +4190,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4182
4190
  function ue() {
4183
4191
  var o;
4184
4192
  (o = t(K)) == null || o.forEach(($) => {
4185
- we($) && !t(Be).includes($) && yt(!1, $, !0);
4193
+ Ce($) && !t(Be).includes($) && yt(!1, $, !0);
4186
4194
  });
4187
4195
  }
4188
4196
  function ie() {
@@ -4307,7 +4315,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4307
4315
  key: `row-${de}`,
4308
4316
  class: p([
4309
4317
  o.$style.tr,
4310
- { [o.$style.tr__selected]: we(j[e(C)]) },
4318
+ { [o.$style.tr__selected]: Ce(j[e(C)]) },
4311
4319
  typeof o.itemClass == "string" ? o.itemClass : o.itemClass(j)
4312
4320
  ])
4313
4321
  }, [
@@ -4319,7 +4327,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4319
4327
  }, [
4320
4328
  L(ms, {
4321
4329
  "data-cy": `table-toggle-check-${de}`,
4322
- "model-value": we(j[e(C)]),
4330
+ "model-value": Ce(j[e(C)]),
4323
4331
  disabled: Re(j[e(C)]),
4324
4332
  size: o.dense ? "sm" : void 0,
4325
4333
  color: "primary",
@@ -4399,7 +4407,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4399
4407
  header: j
4400
4408
  }, () => [
4401
4409
  S("span", null, se(e(I)) + ": " + se(j.identifier), 1),
4402
- L(Ce, {
4410
+ L(we, {
4403
4411
  size: "sm",
4404
4412
  variant: "text",
4405
4413
  icon: "",
@@ -4419,7 +4427,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4419
4427
  class: "ml-auto mr-2"
4420
4428
  }, {
4421
4429
  activator: W(() => [
4422
- L(Ce, {
4430
+ L(we, {
4423
4431
  size: "sm",
4424
4432
  variant: "text",
4425
4433
  icon: "",
@@ -4715,7 +4723,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4715
4723
  }
4716
4724
  const O = Je(), N = B(() => {
4717
4725
  var Re;
4718
- const X = ((Re = O.default) == null ? void 0 : Re.call(O)) ?? [], re = R(X), me = t(n), we = {
4726
+ const X = ((Re = O.default) == null ? void 0 : Re.call(O)) ?? [], re = R(X), me = t(n), Ce = {
4719
4727
  color: t(u),
4720
4728
  grow: t(f),
4721
4729
  disabled: t(c),
@@ -4731,7 +4739,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4731
4739
  props: {
4732
4740
  value: Oe,
4733
4741
  active: me === Oe,
4734
- ...we,
4742
+ ...Ce,
4735
4743
  ...ce.props
4736
4744
  }
4737
4745
  };
@@ -4742,11 +4750,11 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4742
4750
  }
4743
4751
  const F = Hs();
4744
4752
  function U(X, { exactPath: re, exact: me }) {
4745
- const we = F.fullPath;
4753
+ const Ce = F.fullPath;
4746
4754
  if (re)
4747
- return we === X;
4755
+ return Ce === X;
4748
4756
  const Re = new URL(X, window.location.origin).pathname;
4749
- return me ? we === Re : we.startsWith(Re);
4757
+ return me ? Ce === Re : Ce.startsWith(Re);
4750
4758
  }
4751
4759
  function I() {
4752
4760
  Ye(() => {
@@ -4757,9 +4765,9 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4757
4765
  const me = X.querySelector(".active-tab") ?? X.querySelector(".active-tab-link");
4758
4766
  if (!me || !re)
4759
4767
  return;
4760
- const we = me.offsetLeft - X.offsetLeft, Re = me.offsetTop - X.offsetTop, ce = me.offsetWidth, Fe = me.offsetHeight, Oe = re.scrollLeft, ot = re.scrollTop, Se = re.offsetWidth, Ee = re.offsetHeight, Xe = Math.max(
4761
- Math.min(Oe, we),
4762
- we + ce - Se
4768
+ const Ce = me.offsetLeft - X.offsetLeft, Re = me.offsetTop - X.offsetTop, ce = me.offsetWidth, Fe = me.offsetHeight, Oe = re.scrollLeft, ot = re.scrollTop, Se = re.offsetWidth, Ee = re.offsetHeight, Xe = Math.max(
4769
+ Math.min(Oe, Ce),
4770
+ Ce + ce - Se
4763
4771
  ), dt = Math.max(
4764
4772
  Math.min(ot, Re),
4765
4773
  Re + Fe - Ee
@@ -4779,8 +4787,8 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4779
4787
  );
4780
4788
  if (re.length > 0) {
4781
4789
  let me = t(h) || 0;
4782
- re.forEach((we, Re) => {
4783
- const ce = we.props;
4790
+ re.forEach((Ce, Re) => {
4791
+ const ce = Ce.props;
4784
4792
  !X && Re === 0 && ce.value && (me = ce.value);
4785
4793
  const Fe = ce.to ? q.resolve(ce.to) : void 0;
4786
4794
  ce.link !== !1 && Fe && U(Fe.fullPath, ce) && (me = Fe.fullPath);
@@ -4833,7 +4841,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4833
4841
  key: 0,
4834
4842
  class: p([X.$style.arrow, { [X.$style["arrow--vertical"]]: e(y) }])
4835
4843
  }, [
4836
- L(Ce, {
4844
+ L(we, {
4837
4845
  class: "w-full h-full !rounded-none",
4838
4846
  variant: "text",
4839
4847
  color: e(u),
@@ -4867,8 +4875,8 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4867
4875
  { [X.$style["tabs-wrapper--grow"]]: e(f) }
4868
4876
  ])
4869
4877
  }, [
4870
- (s(!0), _(he, null, ke(e(N), (me, we) => (s(), P(lt(me), {
4871
- key: we,
4878
+ (s(!0), _(he, null, ke(e(N), (me, Ce) => (s(), P(lt(me), {
4879
+ key: Ce,
4872
4880
  onClick: re[1] || (re[1] = (Re) => k(Re))
4873
4881
  }))), 128))
4874
4882
  ], 2)
@@ -4877,7 +4885,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4877
4885
  key: 1,
4878
4886
  class: p([X.$style.arrow, { [X.$style["arrow--vertical"]]: e(y) }])
4879
4887
  }, [
4880
- L(Ce, {
4888
+ L(we, {
4881
4889
  class: "w-full h-full !rounded-none",
4882
4890
  variant: "text",
4883
4891
  color: e(u),
@@ -4945,7 +4953,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4945
4953
  }
4946
4954
  return (k, F) => {
4947
4955
  const U = Cs("RouterLink");
4948
- return e(r) ? (s(), P(Ce, G({
4956
+ return e(r) ? (s(), P(we, G({
4949
4957
  key: 0,
4950
4958
  variant: "text",
4951
4959
  disabled: "",
@@ -4966,7 +4974,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4966
4974
  custom: ""
4967
4975
  }, {
4968
4976
  default: W(({ href: I, navigate: q, isActive: A, isExactActive: Y }) => [
4969
- L(Ce, G({
4977
+ L(we, G({
4970
4978
  class: [
4971
4979
  ...e(O),
4972
4980
  {
@@ -4993,7 +5001,7 @@ const Ls = ["height", "width"], Ns = /* @__PURE__ */ J({
4993
5001
  ]), 1040, ["class", "color", "href", "target", "onClick"])
4994
5002
  ]),
4995
5003
  _: 3
4996
- }, 8, ["to", "exact", "exact-path"])) : (s(), P(Ce, G({
5004
+ }, 8, ["to", "exact", "exact-path"])) : (s(), P(we, G({
4997
5005
  key: 1,
4998
5006
  class: e(O),
4999
5007
  color: e(c) ? k.color : void 0,
@@ -5672,7 +5680,7 @@ const M0 = /* @__PURE__ */ J({
5672
5680
  ]),
5673
5681
  S("div", E0, se(e(l)), 1)
5674
5682
  ]),
5675
- L(Ce, {
5683
+ L(we, {
5676
5684
  class: "h-10",
5677
5685
  variant: "text",
5678
5686
  onClick: y[3] || (y[3] = (r) => u())
@@ -5926,7 +5934,7 @@ export {
5926
5934
  h1 as RuiAutoComplete,
5927
5935
  _d as RuiBadge,
5928
5936
  O1 as RuiBottomSheet,
5929
- Ce as RuiButton,
5937
+ we as RuiButton,
5930
5938
  $1 as RuiButtonGroup,
5931
5939
  S1 as RuiCard,
5932
5940
  kp as RuiCardHeader,