@rotki/ui-library 0.1.2 → 0.2.1

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.
@@ -0,0 +1,16 @@
1
+ import { default as RuiAlert } from '../components/alerts/Alert.vue';
2
+ import { default as RuiAutoComplete } from '../components/forms/auto-complete/AutoComplete.vue';
3
+ import { default as RuiButton } from '../components/buttons/button/Button.vue';
4
+ import { default as RuiButtonGroup } from '../components/buttons/button-group/ButtonGroup.vue';
5
+ import { default as RuiIcon } from '../components/icons/Icon.vue';
6
+ import { default as RuiCheckbox } from '../components/forms/checkbox/Checkbox.vue';
7
+ import { default as RuiChip } from '../components/chips/Chip.vue';
8
+ import { default as RuiStepper } from '../components/steppers/Stepper.vue';
9
+ import { default as RuiTextField } from '../components/forms/text-field/TextField.vue';
10
+ import { default as RuiFooterStepper } from '../components/steppers/FooterStepper.vue';
11
+ import { default as RuiProgress } from '../components/progress/Progress.vue';
12
+ import { default as RuiRadioGroup } from '../components/forms/radio-button/radio-group/RadioGroup.vue';
13
+ import { default as RuiRadio } from '../components/forms/radio-button/radio/Radio.vue';
14
+ import { default as RuiRevealableTextField } from '../components/forms/revealable-text-field/RevealableTextField.vue';
15
+ import { default as RuiLogo } from '../components/logos/Logo.vue';
16
+ export { RuiAlert, RuiAutoComplete, RuiButton, RuiButtonGroup, RuiCheckbox, RuiChip, RuiFooterStepper, RuiIcon, RuiLogo, RuiProgress, RuiRadio, RuiRadioGroup, RuiRevealableTextField, RuiStepper, RuiTextField, };
@@ -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-9a66dcb6.mjs";
2
+ import "vue";
3
+ import "@vueuse/shared";
4
+ import "../index-7ca30db6.mjs";
5
+ import "../all-icons.es.js";
6
+ import "@vueuse/core";
7
+ import "../colors-01d79c7b.mjs";
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
+ };
@@ -2,6 +2,7 @@ export interface Props {
2
2
  pages: number;
3
3
  modelValue?: number;
4
4
  variant?: 'numeric' | 'bullet' | 'progress' | 'pill';
5
+ arrowButtons?: boolean;
5
6
  }
6
7
  declare const _default: import("vue").DefineComponent<{
7
8
  variant: {
@@ -16,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
16
17
  type: globalThis.PropType<number>;
17
18
  required: true;
18
19
  };
20
+ arrowButtons: {
21
+ type: globalThis.PropType<boolean>;
22
+ default: boolean;
23
+ };
19
24
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
25
  "update:modelValue": (modelValue: number) => void;
21
26
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -31,10 +36,15 @@ declare const _default: import("vue").DefineComponent<{
31
36
  type: globalThis.PropType<number>;
32
37
  required: true;
33
38
  };
39
+ arrowButtons: {
40
+ type: globalThis.PropType<boolean>;
41
+ default: boolean;
42
+ };
34
43
  }>> & {
35
44
  "onUpdate:modelValue"?: ((modelValue: number) => any) | undefined;
36
45
  }, {
37
46
  variant: "progress" | "numeric" | "bullet" | "pill";
38
47
  modelValue: number;
48
+ arrowButtons: boolean;
39
49
  }, {}>;
40
50
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import { StepperOrientation, StepperState, type StepperStep } from '../../types/stepper';
2
2
  export interface Props {
3
+ step?: number;
3
4
  steps: StepperStep[];
4
5
  iconTop?: boolean;
5
6
  custom?: boolean;
@@ -12,6 +13,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
12
13
  type: globalThis.PropType<StepperOrientation>;
13
14
  default: "horizontal";
14
15
  };
16
+ step: {
17
+ type: globalThis.PropType<number>;
18
+ default: number;
19
+ };
15
20
  steps: {
16
21
  type: globalThis.PropType<StepperStep[]>;
17
22
  required: true;
@@ -37,6 +42,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
37
42
  type: globalThis.PropType<StepperOrientation>;
38
43
  default: "horizontal";
39
44
  };
45
+ step: {
46
+ type: globalThis.PropType<number>;
47
+ default: number;
48
+ };
40
49
  steps: {
41
50
  type: globalThis.PropType<StepperStep[]>;
42
51
  required: true;
@@ -59,13 +68,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
59
68
  };
60
69
  }>>, {
61
70
  orientation: StepperOrientation;
71
+ step: number;
62
72
  iconTop: boolean;
63
73
  custom: boolean;
64
74
  titleClass: string;
65
75
  subtitleClass: string;
66
76
  }, {}>, {
67
77
  icon?(_: {
68
- state: StepperState;
78
+ state: StepperState | undefined;
69
79
  index: number;
70
80
  }): any;
71
81
  }>;
@@ -2,7 +2,7 @@ import { StepperState } from '../../types/stepper';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  state: {
4
4
  type: globalThis.PropType<StepperState>;
5
- required: true;
5
+ default: "inactive";
6
6
  };
7
7
  index: {
8
8
  type: globalThis.PropType<number>;
@@ -11,11 +11,13 @@ declare const _default: import("vue").DefineComponent<{
11
11
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
12
  state: {
13
13
  type: globalThis.PropType<StepperState>;
14
- required: true;
14
+ default: "inactive";
15
15
  };
16
16
  index: {
17
17
  type: globalThis.PropType<number>;
18
18
  required: true;
19
19
  };
20
- }>>, {}, {}>;
20
+ }>>, {
21
+ state: StepperState;
22
+ }, {}>;
21
23
  export default _default;
@@ -2,7 +2,7 @@ import { StepperState } from '../../types/stepper';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  state: {
4
4
  type: globalThis.PropType<StepperState>;
5
- required: true;
5
+ default: "inactive";
6
6
  };
7
7
  index: {
8
8
  type: globalThis.PropType<number>;
@@ -11,11 +11,13 @@ declare const _default: import("vue").DefineComponent<{
11
11
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
12
  state: {
13
13
  type: globalThis.PropType<StepperState>;
14
- required: true;
14
+ default: "inactive";
15
15
  };
16
16
  index: {
17
17
  type: globalThis.PropType<number>;
18
18
  required: true;
19
19
  };
20
- }>>, {}, {}>;
20
+ }>>, {
21
+ state: StepperState;
22
+ }, {}>;
21
23
  export default _default;
@@ -0,0 +1,2 @@
1
+ export { useIcons } from '../composables/icons';
2
+ export { useRotkiTheme } from '../composables/theme';
@@ -0,0 +1,10 @@
1
+ import { u as s, a } from "../index-7ca30db6.mjs";
2
+ import "../all-icons.es.js";
3
+ import "@vueuse/core";
4
+ import "vue";
5
+ import "@vueuse/shared";
6
+ import "../colors-01d79c7b.mjs";
7
+ export {
8
+ s as useIcons,
9
+ a as useRotkiTheme
10
+ };
@@ -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.mjs";
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
+ };