@rotki/ui-library 1.1.1 → 1.2.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 (56) hide show
  1. package/dist/{RuiNavigationDrawer-CduEnjlC.js → RuiNavigationDrawer-DePcKWZU.js} +2870 -2862
  2. package/dist/{breakpoint-OTAceaTK.js → breakpoint-sPlgsoXp.js} +1 -1
  3. package/dist/components/accordions/accordion/RuiAccordion.vue.d.ts +9 -7
  4. package/dist/components/accordions/accordions/RuiAccordions.vue.d.ts +1 -1
  5. package/dist/components/alerts/RuiAlert.vue.d.ts +10 -8
  6. package/dist/components/buttons/button/RuiButton.vue.d.ts +10 -66
  7. package/dist/components/buttons/button-group/RuiButtonGroup.vue.d.ts +9 -48
  8. package/dist/components/cards/RuiCard.vue.d.ts +12 -10
  9. package/dist/components/cards/RuiCardHeader.vue.d.ts +8 -6
  10. package/dist/components/chips/RuiChip.vue.d.ts +10 -8
  11. package/dist/components/forms/auto-complete/RuiAutoComplete.vue.d.ts +855 -0
  12. package/dist/components/forms/checkbox/RuiCheckbox.vue.d.ts +7 -5
  13. package/dist/components/forms/radio-button/radio/RuiRadio.vue.d.ts +7 -5
  14. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.vue.d.ts +1 -1
  15. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.vue.d.ts +12 -10
  16. package/dist/components/forms/select/RuiMenuSelect.vue.d.ts +10 -183
  17. package/dist/components/forms/slider/RuiSlider.vue.d.ts +1 -1
  18. package/dist/components/forms/switch/RuiSwitch.vue.d.ts +7 -5
  19. package/dist/components/forms/text-area/RuiTextArea.vue.d.ts +15 -13
  20. package/dist/components/forms/text-field/RuiTextField.vue.d.ts +12 -10
  21. package/dist/components/helpers/RuiFormTextDetail.vue.d.ts +6 -6
  22. package/dist/components/icons/RuiIcon.vue.d.ts +2 -2
  23. package/dist/components/index.es.js +1 -1
  24. package/dist/components/loaders/RuiSkeletonBase.vue.d.ts +1 -1
  25. package/dist/components/loaders/RuiSkeletonLoader.vue.d.ts +2 -2
  26. package/dist/components/logos/RuiLogo.vue.d.ts +1 -1
  27. package/dist/components/overlays/badge/RuiBadge.vue.d.ts +11 -9
  28. package/dist/components/overlays/bottom-sheet/RuiBottomSheet.vue.d.ts +4 -2
  29. package/dist/components/overlays/dialog/RuiDialog.vue.d.ts +19 -13
  30. package/dist/components/overlays/menu/RuiMenu.vue.d.ts +23 -21
  31. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue.d.ts +17 -15
  32. package/dist/components/overlays/notification/RuiNotification.vue.d.ts +8 -6
  33. package/dist/components/overlays/tooltip/RuiTooltip.vue.d.ts +10 -8
  34. package/dist/components/progress/RuiProgress.vue.d.ts +3 -3
  35. package/dist/components/steppers/RuiFooterStepper.vue.d.ts +1 -1
  36. package/dist/components/steppers/RuiStepper.vue.d.ts +9 -7
  37. package/dist/components/steppers/RuiStepperCustomIcon.vue.d.ts +2 -2
  38. package/dist/components/steppers/RuiStepperIcon.vue.d.ts +2 -2
  39. package/dist/components/tables/RuiDataTable.vue.d.ts +25 -296
  40. package/dist/components/tables/RuiExpandButton.vue.d.ts +7 -5
  41. package/dist/components/tables/RuiTableHead.vue.d.ts +17 -105
  42. package/dist/components/tabs/tab/RuiTab.vue.d.ts +16 -14
  43. package/dist/components/tabs/tab-item/RuiTabItem.vue.d.ts +8 -6
  44. package/dist/components/tabs/tab-items/RuiTabItems.vue.d.ts +10 -23
  45. package/dist/components/tabs/tabs/RuiTabs.vue.d.ts +3 -3
  46. package/dist/composables/dropdown-menu.d.ts +1 -1
  47. package/dist/composables/index.es.js +2 -2
  48. package/dist/composables/popper.d.ts +1 -1
  49. package/dist/index-DIN-6VhY.js +154 -0
  50. package/dist/index.es.js +5 -5
  51. package/dist/style.css +1 -1
  52. package/dist/theme/index.d.ts +1 -1
  53. package/dist/utils/helpers.d.ts +1 -1
  54. package/dist/web-types.json +12 -2
  55. package/package.json +48 -47
  56. package/dist/index-NNlkUY_M.js +0 -161
@@ -1,5 +1,5 @@
1
1
  declare const themePlugin: {
2
2
  handler: import("tailwindcss/types/config").PluginCreator;
3
- config?: Partial<import("tailwindcss/types/config").Config> | undefined;
3
+ config?: Partial<import("tailwindcss/types/config").Config>;
4
4
  };
5
5
  export default themePlugin;
@@ -2,7 +2,7 @@ import type { SetupContext } from 'vue';
2
2
  interface CurrencyOptions {
3
3
  currency?: string;
4
4
  locale?: string;
5
- style?: string;
5
+ style?: Intl.NumberFormatOptionsStyle;
6
6
  fractionDigits?: number;
7
7
  }
8
8
  type SetupContextAttrs = SetupContext['attrs'];
@@ -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": "1.1.1",
5
+ "version": "1.2.0",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
8
8
  "contributions": {
@@ -1799,7 +1799,7 @@
1799
1799
  "arguments": [
1800
1800
  {
1801
1801
  "name": "argument",
1802
- "type": "{ key: never; direction?: 'asc' | 'desc' | undefined; }"
1802
+ "type": "{ key: never; direction?: 'desc' | 'asc' | undefined; }"
1803
1803
  }
1804
1804
  ]
1805
1805
  }
@@ -4602,6 +4602,16 @@
4602
4602
  "type": "boolean | undefined"
4603
4603
  }
4604
4604
  },
4605
+ {
4606
+ "name": "z-index",
4607
+ "description": "",
4608
+ "required": false,
4609
+ "default": "9999",
4610
+ "value": {
4611
+ "kind": "expression",
4612
+ "type": "number | undefined"
4613
+ }
4614
+ },
4605
4615
  {
4606
4616
  "name": "max-width",
4607
4617
  "description": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rotki/ui-library",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "A vue design system and component library for rotki",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -69,81 +69,82 @@
69
69
  },
70
70
  "web-types": "dist/web-types.json",
71
71
  "devDependencies": {
72
- "@babel/core": "7.24.9",
73
- "@babel/types": "7.24.9",
74
- "@commitlint/cli": "19.3.0",
75
- "@commitlint/config-conventional": "19.2.2",
76
- "@fontsource/roboto": "5.0.13",
72
+ "@babel/core": "7.25.2",
73
+ "@babel/types": "7.25.6",
74
+ "@commitlint/cli": "19.4.1",
75
+ "@commitlint/config-conventional": "19.4.1",
76
+ "@fontsource/roboto": "5.0.14",
77
77
  "@popperjs/core": "2.11.8",
78
- "@rotki/eslint-config": "2.9.1",
79
- "@storybook/addon-docs": "8.2.6",
80
- "@storybook/addon-essentials": "8.2.6",
81
- "@storybook/addon-interactions": "8.2.6",
82
- "@storybook/addon-links": "8.2.6",
83
- "@storybook/addon-themes": "8.2.6",
84
- "@storybook/blocks": "8.2.6",
85
- "@storybook/preview-api": "8.2.6",
86
- "@storybook/test": "8.2.6",
87
- "@storybook/vue3": "8.2.6",
88
- "@storybook/vue3-vite": "8.2.6",
89
- "@types/node": "20.14.12",
78
+ "@rotki/eslint-config": "3.0.0",
79
+ "@storybook/addon-docs": "8.2.9",
80
+ "@storybook/addon-essentials": "8.2.9",
81
+ "@storybook/addon-interactions": "8.2.9",
82
+ "@storybook/addon-links": "8.2.9",
83
+ "@storybook/addon-themes": "8.2.9",
84
+ "@storybook/blocks": "8.2.9",
85
+ "@storybook/preview-api": "8.2.9",
86
+ "@storybook/test": "8.2.9",
87
+ "@storybook/vue3": "8.2.9",
88
+ "@storybook/vue3-vite": "8.2.9",
89
+ "@types/node": "20.16.2",
90
90
  "@types/tinycolor2": "1.4.6",
91
- "@vitejs/plugin-vue": "5.1.0",
92
- "@vitest/coverage-v8": "2.0.4",
93
- "@vitest/ui": "2.0.4",
91
+ "@vitejs/plugin-vue": "5.1.3",
92
+ "@vitest/coverage-v8": "2.0.5",
93
+ "@vitest/ui": "2.0.5",
94
94
  "@vue/test-utils": "2.4.6",
95
95
  "@vue/tsconfig": "0.5.1",
96
- "@vueuse/core": "10.11.0",
97
- "@vueuse/math": "10.11.0",
98
- "@vueuse/shared": "10.11.0",
96
+ "@vueuse/core": "11.0.3",
97
+ "@vueuse/math": "11.0.3",
98
+ "@vueuse/shared": "11.0.3",
99
99
  "argparse": "2.0.1",
100
- "autoprefixer": "10.4.19",
100
+ "autoprefixer": "10.4.20",
101
101
  "babel-loader": "9.1.3",
102
- "bumpp": "9.4.1",
102
+ "bumpp": "9.5.2",
103
103
  "consola": "3.2.3",
104
104
  "css-loader": "7.1.2",
105
- "eslint": "9.7.0",
106
- "eslint-plugin-cypress": "3.4.0",
105
+ "eslint": "9.9.1",
106
+ "eslint-plugin-cypress": "3.5.0",
107
107
  "eslint-plugin-storybook": "0.8.0",
108
108
  "fast-glob": "3.3.2",
109
- "fast-xml-parser": "4.4.0",
109
+ "fast-xml-parser": "4.4.1",
110
110
  "fs-extra": "11.2.0",
111
- "husky": "9.1.2",
112
- "jsdom": "24.1.1",
113
- "lint-staged": "15.2.7",
114
- "postcss": "8.4.40",
111
+ "husky": "9.1.5",
112
+ "jsdom": "25.0.0",
113
+ "lint-staged": "15.2.9",
114
+ "postcss": "8.4.41",
115
115
  "remixicon": "4.3.0",
116
116
  "sass": "1.77.8",
117
117
  "scule": "1.3.0",
118
- "storybook": "8.2.6",
119
- "tailwindcss": "3.4.6",
118
+ "storybook": "8.2.9",
119
+ "tailwindcss": "3.4.10",
120
120
  "tinycolor2": "1.6.0",
121
- "ts-node": "10.9.2",
122
121
  "tsc-alias": "1.8.10",
123
- "typescript": "5.4.5",
122
+ "tsx": "4.19.0",
123
+ "typescript": "5.5.4",
124
124
  "unplugin-auto-import": "0.18.2",
125
- "vite": "5.3.5",
126
- "vitest": "2.0.4",
127
- "vue": "3.4.31",
128
- "vue-component-meta": "2.0.26",
125
+ "vite": "5.4.2",
126
+ "vitest": "2.0.5",
127
+ "vue": "3.4.38",
128
+ "vue-component-meta": "2.1.2",
129
129
  "vue-loader": "17.4.2",
130
- "vue-router": "4.4.0",
131
- "vue-tsc": "2.0.26"
130
+ "vue-router": "4.4.3",
131
+ "vue-tsc": "2.0.29"
132
132
  },
133
133
  "engines": {
134
+ "node": ">=20 <21",
134
135
  "pnpm": ">=9 <10"
135
136
  },
136
137
  "lint-staged": {
137
138
  "*.{js,cjs,ts,vue,yml,json,md}": "eslint"
138
139
  },
139
140
  "scripts": {
140
- "build:prod": "node scripts/dist-build.mjs",
141
+ "build:prod": "tsx scripts/dist-build.mjs",
141
142
  "build": "pnpm run generate-icons && vite build",
142
143
  "build:storybook": "STORYBOOK=true storybook build",
143
144
  "build:tailwind": "tailwindcss -o dist/style.css --minify",
144
145
  "build:types": "vue-tsc -p tsconfig.build.json",
145
- "build:web-types": "node scripts/build-web-types.mjs",
146
- "generate-icons": "node scripts/generate-icons.mjs",
146
+ "build:web-types": "tsx scripts/build-web-types.mjs",
147
+ "generate-icons": "tsx scripts/generate-icons.mjs",
147
148
  "resolve:alias": "tsc-alias --replacer ./scripts/tsc-alias-replacer.cjs -p tsconfig.build.json",
148
149
  "dev": "vite",
149
150
  "lint": "eslint .",
@@ -159,6 +160,6 @@
159
160
  "coverage:preview": "npx vite preview --open --outDir tests/coverage",
160
161
  "typecheck": "vue-tsc --noEmit",
161
162
  "release": "bumpp -r --no-push",
162
- "new": "node --experimental-specifier-resolution=node --loader ts-node/esm scripts/new-story.ts"
163
+ "new": "tsx scripts/new-story.ts"
163
164
  }
164
165
  }
@@ -1,161 +0,0 @@
1
- import { RiArrowDownLine as x, RiArrowDropDownFill as T, RiArrowLeftDoubleLine as $, RiArrowLeftLine as D, RiArrowLeftSLine as S, RiArrowRightDoubleLine as v, RiArrowRightLine as I, RiArrowRightSLine as U, RiExpandUpDownLine as M } from "./icons/icons_1.es.js";
2
- import { RiDatabase2Line as B } from "./icons/icons_2.es.js";
3
- import { RiAlertFill as _, RiAlertLine as j, RiCheckLine as O, RiCheckboxBlankCircleFill as P, RiCheckboxBlankCircleLine as W, RiCheckboxBlankLine as q, RiCheckboxCircleFill as z, RiCheckboxCircleLine as G, RiCheckboxFill as H, RiCheckboxIndeterminateFill as N, RiCloseCircleLine as V, RiCloseFill as J, RiCloseLine as K, RiErrorWarningFill as Q, RiErrorWarningLine as X, RiEyeLine as Y, RiEyeOffLine as Z, RiInformationFill as ee, RiInformationLine as ie } from "./icons/icons_5.es.js";
4
- import { RiRadioButtonLine as re, RiMoreFill as te } from "./icons/icons_6.es.js";
5
- import { createGlobalState as oe, createSharedComposable as ne, useColorMode as ae } from "@vueuse/core";
6
- import { ref as w, computed as p, watch as se } from "vue";
7
- import { set as g, get as s } from "@vueuse/shared";
8
- import { c as le } from "./colors-D563Ic3q.js";
9
- const ye = oe(() => {
10
- const e = [
11
- _,
12
- j,
13
- x,
14
- T,
15
- $,
16
- D,
17
- S,
18
- v,
19
- I,
20
- U,
21
- O,
22
- P,
23
- W,
24
- q,
25
- z,
26
- G,
27
- H,
28
- N,
29
- V,
30
- J,
31
- K,
32
- B,
33
- Q,
34
- X,
35
- Y,
36
- Z,
37
- ee,
38
- ie,
39
- re,
40
- te,
41
- M
42
- ], i = w({});
43
- return { registeredIcons: i, registerIcons: (t) => {
44
- g(i, {
45
- ...s(i),
46
- ...Object.fromEntries(
47
- [...e, ...t].map(({ name: r, path: o }) => [r, o])
48
- )
49
- });
50
- } };
51
- }), a = {
52
- auto: "auto",
53
- dark: "dark",
54
- light: "light"
55
- };
56
- function k(e) {
57
- return Object.fromEntries(
58
- le.map((i) => [
59
- i,
60
- {
61
- darker: `var(--rui-${e}-${i}-darker)`,
62
- DEFAULT: `var(--rui-${e}-${i}-main)`,
63
- lighter: `var(--rui-${e}-${i}-lighter)`
64
- }
65
- ])
66
- );
67
- }
68
- const b = {
69
- dark: k("dark"),
70
- light: k("light")
71
- }, C = w({ ...b }), Ee = ne(() => {
72
- const { state: e, store: i } = ae(), n = p(() => s(i) === a.auto), t = p(() => s(e) === a.light), r = p(() => s(e) === a.dark), o = p(() => s(t) ? s(C).light : s(C).dark), l = (c) => {
73
- g(i, c || a.auto);
74
- }, u = () => {
75
- s(n) ? l(a.light) : s(t) ? l(a.dark) : s(r) && l(a.auto);
76
- }, h = (c) => {
77
- g(C, c);
78
- };
79
- return {
80
- config: C,
81
- init: (c) => {
82
- l(c.mode ?? a.auto), h(c.config ?? { ...b }), typeof window < "u" && se([t, o], ([y, E]) => {
83
- const f = /* @__PURE__ */ new Map();
84
- Object.entries(E).forEach(([d, R]) => {
85
- f.set(`--rui-${d}-darker`, R.darker), f.set(`--rui-${d}-lighter`, R.lighter), f.set(`--rui-${d}-main`, R.DEFAULT);
86
- });
87
- const L = y ? a.light : a.dark;
88
- f.set("--rui-text-disabled", `var(--rui-${L}-text-disabled)`), f.set("--rui-text-primary", `var(--rui-${L}-text-primary)`), f.set("--rui-text-secondary", `var(--rui-${L}-text-secondary)`);
89
- const F = document.documentElement.style;
90
- f.forEach((d, R) => {
91
- F.setProperty(R, d);
92
- });
93
- }, { immediate: !0 });
94
- },
95
- isAutoControlled: n,
96
- isDark: r,
97
- isLight: t,
98
- setThemeConfig: h,
99
- state: e,
100
- store: i,
101
- switchThemeScheme: l,
102
- theme: o,
103
- toggleThemeMode: u
104
- };
105
- }), ce = /\d/, ue = ["-", "_", "/", "."];
106
- function fe(e = "") {
107
- if (!ce.test(e))
108
- return e !== e.toLowerCase();
109
- }
110
- function A(e, i) {
111
- const n = i ?? ue, t = [];
112
- if (!e || typeof e != "string")
113
- return t;
114
- let r = "", o, l;
115
- for (const u of e) {
116
- const h = n.includes(u);
117
- if (h === !0) {
118
- t.push(r), r = "", o = void 0;
119
- continue;
120
- }
121
- const m = fe(u);
122
- if (l === !1) {
123
- if (o === !1 && m === !0) {
124
- t.push(r), r = u, o = m;
125
- continue;
126
- }
127
- if (o === !0 && m === !1 && r.length > 1) {
128
- const c = r.at(-1);
129
- t.push(r.slice(0, Math.max(0, r.length - 1))), r = c + u, o = m;
130
- continue;
131
- }
132
- }
133
- r += u, o = m, l = h;
134
- }
135
- return t.push(r), t;
136
- }
137
- function me(e) {
138
- return e ? e[0].toUpperCase() + e.slice(1) : "";
139
- }
140
- function he(e) {
141
- return e ? e[0].toLowerCase() + e.slice(1) : "";
142
- }
143
- function de(e, i) {
144
- return e ? (Array.isArray(e) ? e : A(e)).map((n) => me(i != null && i.normalize ? n.toLowerCase() : n)).join("") : "";
145
- }
146
- function Fe(e, i) {
147
- return he(de(e || "", i));
148
- }
149
- function Re(e, i) {
150
- return e ? (Array.isArray(e) ? e : A(e)).map((n) => n.toLowerCase()).join(i ?? "-") : "";
151
- }
152
- function xe(e) {
153
- return Re(e || "", "_");
154
- }
155
- export {
156
- a as T,
157
- Ee as a,
158
- Fe as c,
159
- xe as s,
160
- ye as u
161
- };