@rotki/ui-library 1.0.0-beta.9 → 1.1.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.
@@ -1,5 +1,5 @@
1
1
  import RuiAlert, { type Props as AlertProps } from '../components/alerts/RuiAlert.vue';
2
- import RuiAutoComplete, { type AutoCompleteProps } from '@/components/forms/auto-complete/RuiAutoComplete.vue';
2
+ import RuiAutoComplete, { type AutoCompleteProps } from '../components/forms/auto-complete/RuiAutoComplete.vue';
3
3
  import RuiButton, { type Props as ButtonProps } from '../components/buttons/button/RuiButton.vue';
4
4
  import RuiButtonGroup, { type Props as ButtonGroupProps } from '../components/buttons/button-group/RuiButtonGroup.vue';
5
5
  import RuiIcon, { type Props as IconProps } from '../components/icons/RuiIcon.vue';
@@ -1,4 +1,4 @@
1
- import { I as u, H as s, R as e, a as R, b as o, J as t, c as r, d as l, u as d, v as n, e as p, f as c, K as T, r as b, t as S, D as g, g as m, h as x, _ as C, q as A, F as h, L as B, M as D, i as k, j as v, k as w, l as F, s as I, B as f, G, m as L, n as M, x as P, z as E, y as H, A as N, E as j, w as q, C as y, o as z, p as J } from "../RuiNavigationDrawer-8n-WtZE0.js";
1
+ import { I as u, H as s, R as e, a as R, b as o, J as t, c as r, d as l, u as d, v as n, e as p, f as c, K as T, r as b, t as S, D as g, g as m, h as x, _ as C, q as A, F as h, L as B, M as D, i as k, j as v, k as w, l as F, s as I, B as f, G, m as L, n as M, x as P, z as E, y as H, A as N, E as j, w as q, C as y, o as z, p as J } from "../RuiNavigationDrawer-Za-M5gUg.js";
2
2
  export {
3
3
  u as RuiAccordion,
4
4
  s as RuiAccordions,
@@ -5,6 +5,7 @@ export interface Props {
5
5
  hideArrow?: boolean;
6
6
  openDelay?: number;
7
7
  closeDelay?: number;
8
+ persistOnTooltipHover?: boolean;
8
9
  popper?: PopperOptions;
9
10
  tooltipClass?: string;
10
11
  }
@@ -14,14 +15,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
14
15
  hideArrow: boolean;
15
16
  openDelay: number;
16
17
  closeDelay: number;
18
+ persistOnTooltipHover: boolean;
17
19
  popper: () => {};
18
20
  tooltipClass: string;
19
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
21
+ }>, {
22
+ onOpen: () => void;
23
+ onClose: () => void;
24
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
20
25
  text: null;
21
26
  disabled: boolean;
22
27
  hideArrow: boolean;
23
28
  openDelay: number;
24
29
  closeDelay: number;
30
+ persistOnTooltipHover: boolean;
25
31
  popper: () => {};
26
32
  tooltipClass: string;
27
33
  }>>>, {
@@ -31,10 +37,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
31
37
  closeDelay: number;
32
38
  popper: PopperOptions;
33
39
  hideArrow: boolean;
40
+ persistOnTooltipHover: boolean;
34
41
  tooltipClass: string;
35
42
  }, {}>, {
36
43
  activator?(_: {
37
44
  open: boolean;
45
+ close: () => void;
38
46
  }): any;
39
47
  default?(_: {}): any;
40
48
  }>;
@@ -1,3 +1,4 @@
1
+ import type { RouteLocationRaw } from 'vue-router';
1
2
  import type { ContextColorsType } from '../../../consts/colors';
2
3
  export interface Props {
3
4
  color?: ContextColorsType;
@@ -8,7 +9,7 @@ export interface Props {
8
9
  activeClass?: string;
9
10
  link?: boolean;
10
11
  target?: string;
11
- to?: string;
12
+ to?: RouteLocationRaw;
12
13
  exact?: boolean;
13
14
  exactPath?: boolean;
14
15
  vertical?: boolean;
@@ -55,7 +56,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
55
56
  disabled: boolean;
56
57
  target: string;
57
58
  exact: boolean;
58
- to: string;
59
+ to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
59
60
  align: "center" | "end" | "start";
60
61
  grow: boolean;
61
62
  activeClass: string;
@@ -2,6 +2,10 @@ import type { Ref } from 'vue';
2
2
  export type KeyOfType<T, V> = keyof {
3
3
  [P in keyof T as T[P] extends V ? P : never]: any;
4
4
  };
5
+ export interface DropdownItemAttr<TValue, TItem> {
6
+ keyAttr?: KeyOfType<TItem, TValue extends Array<infer U> ? U : TValue>;
7
+ textAttr?: keyof TItem | ((item: TItem) => string);
8
+ }
5
9
  export interface DropdownOptions<TValue, TItem> {
6
10
  options: Ref<TItem[]>;
7
11
  dense?: Ref<boolean>;
@@ -18,6 +22,10 @@ export interface DropdownOptions<TValue, TItem> {
18
22
  setValue?: (val: TItem) => void;
19
23
  hideSelected?: boolean;
20
24
  }
25
+ export declare function useDropdownOptionProperty<TValue, TItem>({ keyAttr, textAttr, }: DropdownItemAttr<TValue, TItem>): {
26
+ getIdentifier: (item: TItem) => TItem | TItem[KeyOfType<TItem, TValue>];
27
+ getText: (item: TItem) => string | undefined;
28
+ };
21
29
  export declare function useDropdownMenu<TValue, TItem>({ appendWidth, autoFocus, autoSelectFirst, dense, hideSelected, itemHeight, keyAttr, menuRef, options: allOptions, overscan, prependWidth, setValue, textAttr, value, }: DropdownOptions<TValue, TItem>): {
22
30
  applyHighlighted: () => void;
23
31
  containerProps: {
@@ -25,7 +33,7 @@ export declare function useDropdownMenu<TValue, TItem>({ appendWidth, autoFocus,
25
33
  onScroll: () => void;
26
34
  style: import("vue").StyleValue;
27
35
  };
28
- getIdentifier: (item: TItem) => TItem | TItem[KeyOfType<TItem, TValue>];
36
+ getIdentifier: (item: TItem) => TItem | TItem[keyof { [P in keyof TItem as TItem[P] extends TValue ? P : never]: any; }];
29
37
  getText: (item: TItem) => string | undefined;
30
38
  highlightedIndex: Ref<number>;
31
39
  isActiveItem: (item: TItem) => boolean;
@@ -39,7 +47,7 @@ export declare function useDropdownMenu<TValue, TItem>({ appendWidth, autoFocus,
39
47
  item: TItem;
40
48
  }[]>;
41
49
  toggle: (state?: boolean) => void;
42
- valueKey: globalThis.ComputedRef<TItem | TItem[] | TItem[keyof { [P in keyof TItem as TItem[P] extends (TValue extends (infer U)[] ? U : TValue) ? P : never]: any; }][] | NonNullable<TItem>[keyof { [P in keyof TItem as TItem[P] extends (TValue extends (infer U)[] ? U : TValue) ? P : never]: any; }] | undefined>;
50
+ valueKey: globalThis.ComputedRef<TItem | TItem[] | TItem[keyof { [P_1 in keyof TItem as TItem[P_1] extends (TValue extends (infer U)[] ? U : TValue) ? P_1 : never]: any; }][] | NonNullable<TItem>[keyof { [P_1 in keyof TItem as TItem[P_1] extends (TValue extends (infer U)[] ? U : TValue) ? P_1 : never]: any; }] | undefined>;
43
51
  wrapperProps: globalThis.ComputedRef<{
44
52
  style: {
45
53
  width: string;
@@ -1,5 +1,9 @@
1
1
  export declare const baseColors: string[];
2
2
  export declare const baseColorsIntensities: string[];
3
+ /**
4
+ * The available context colors.
5
+ * Keep in sync with build-web-types.mjs
6
+ */
3
7
  export declare const contextColors: readonly ["primary", "secondary", "error", "warning", "info", "success"];
4
8
  export type ContextColorsType = (typeof contextColors)[number];
5
9
  export declare const contextColorsIntensities: {
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { u as a, a as r } from "./index-NNlkUY_M.js";
2
2
  import { T as C } from "./index-NNlkUY_M.js";
3
- import { N as F, T as L } from "./RuiNavigationDrawer-8n-WtZE0.js";
4
- import { I as S, H as g, R as m, a as k, b as B, J as w, c as f, d as P, u as y, v as D, e as M, f as b, K as A, r as T, t as x, D as H, g as U, h as E, _ as v, q as G, F as I, L as W, M as V, i as O, j as N, k as z, l as K, s as q, B as Q, G as j, m as Z, n as X, x as J, z as Y, y as _, A as $, E as ii, w as li, C as ei, o as Ri, p as ni, S as oi } from "./RuiNavigationDrawer-8n-WtZE0.js";
3
+ import { N as F, T as L } from "./RuiNavigationDrawer-Za-M5gUg.js";
4
+ import { I as S, H as g, R as m, a as k, b as B, J as w, c as f, d as P, u as y, v as D, e as M, f as b, K as A, r as T, t as x, D as H, g as U, h as E, _ as v, q as G, F as I, L as W, M as V, i as O, j as N, k as z, l as K, s as q, B as Q, G as j, m as Z, n as X, x as J, z as Y, y as _, A as $, E as ii, w as li, C as ei, o as Ri, p as ni, S as oi } from "./RuiNavigationDrawer-Za-M5gUg.js";
5
5
  import { u as ri } from "./breakpoint-OTAceaTK.js";
6
6
  import { RuiIcons as Li, isRuiIcon as ti } from "./icons/index.es.js";
7
7
  import { c as di } from "./colors-D563Ic3q.js";