@rotki/ui-library 0.5.1 → 0.7.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 (52) hide show
  1. package/dist/all-icons.d.ts +82 -21
  2. package/dist/all-icons.es.js +4996 -4752
  3. package/dist/components/alerts/Alert.vue.d.ts +1 -1
  4. package/dist/components/buttons/button/Button.vue.d.ts +39 -95
  5. package/dist/components/buttons/button-group/ButtonGroup.vue.d.ts +29 -41
  6. package/dist/components/cards/Card.vue.d.ts +21 -1
  7. package/dist/components/cards/CardHeader.vue.d.ts +1 -1
  8. package/dist/components/chips/Chip.vue.d.ts +1 -1
  9. package/dist/components/divider/Divider.vue.d.ts +17 -0
  10. package/dist/components/forms/auto-complete/AutoComplete.vue.d.ts +25 -25
  11. package/dist/components/forms/auto-complete/AutoCompleteSelection.vue.d.ts +1 -1
  12. package/dist/components/forms/checkbox/Checkbox.vue.d.ts +36 -16
  13. package/dist/components/forms/radio-button/radio/Radio.vue.d.ts +37 -17
  14. package/dist/components/forms/radio-button/radio-group/RadioGroup.vue.d.ts +63 -12
  15. package/dist/components/forms/revealable-text-field/RevealableTextField.vue.d.ts +160 -1
  16. package/dist/components/forms/select/SimpleSelect.vue.d.ts +1 -1
  17. package/dist/components/forms/text-area/TextArea.vue.d.ts +233 -0
  18. package/dist/components/forms/text-field/TextField.vue.d.ts +66 -34
  19. package/dist/components/helpers/FormTextDetail.vue.d.ts +32 -0
  20. package/dist/components/icons/Icon.vue.d.ts +1 -1
  21. package/dist/components/index.d.ts +22 -18
  22. package/dist/components/index.es.js +29 -24
  23. package/dist/components/loaders/Skeleton.vue.d.ts +27 -0
  24. package/dist/components/loaders/SkeletonBase.vue.d.ts +17 -0
  25. package/dist/components/logos/Logo.vue.d.ts +1 -1
  26. package/dist/components/overlays/badge/Badge.vue.d.ts +1 -1
  27. package/dist/components/overlays/dialog/Dialog.vue.d.ts +1 -1
  28. package/dist/components/overlays/tooltip/Tooltip.vue.d.ts +1 -1
  29. package/dist/components/progress/Progress.vue.d.ts +1 -1
  30. package/dist/components/steppers/FooterStepper.vue.d.ts +1 -1
  31. package/dist/components/steppers/Stepper.vue.d.ts +1 -1
  32. package/dist/components/steppers/StepperCustomIcon.vue.d.ts +1 -1
  33. package/dist/components/steppers/StepperIcon.vue.d.ts +1 -1
  34. package/dist/components/tables/DataTable.vue.d.ts +8 -1
  35. package/dist/components/tables/TablePagination.vue.d.ts +1 -1
  36. package/dist/components/tabs/tab/Tab.vue.d.ts +6 -2
  37. package/dist/components/tabs/tab-item/TabItem.vue.d.ts +1 -1
  38. package/dist/components/tabs/tab-items/TabItems.vue.d.ts +1 -1
  39. package/dist/components/tabs/tabs/Tabs.vue.d.ts +1 -1
  40. package/dist/composables/index.es.js +2 -2
  41. package/dist/composables/popper.d.ts +1 -1
  42. package/dist/index-Q2a5R3OH.js +6090 -0
  43. package/dist/{index-393a0e94.js → index-W2poXQa4.js} +1 -1
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.es.js +2629 -2563
  46. package/dist/style.css +1 -1
  47. package/dist/theme/index.es.js +1 -1
  48. package/dist/utils/form-text-detail.d.ts +8 -0
  49. package/dist/utils/helpers.d.ts +27 -0
  50. package/package.json +44 -42
  51. package/dist/index-c62f6196.js +0 -5605
  52. /package/dist/{colors-01d79c7b.js → colors-ikihApJv.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import o from "tailwindcss/plugin";
2
- import { b as d, a as h, c as t } from "../colors-01d79c7b.js";
2
+ import { b as d, a as h, c as t } from "../colors-ikihApJv.js";
3
3
  const u = Object.fromEntries(
4
4
  d.map((r) => [
5
5
  r,
@@ -0,0 +1,8 @@
1
+ import { type MaybeRef } from '@vueuse/shared';
2
+ export declare const useFormTextDetail: (errorMessages: MaybeRef<string | string[]>, successMessages: MaybeRef<string | string[]>) => {
3
+ formattedErrorMessages: globalThis.ComputedRef<string[]>;
4
+ formattedSuccessMessages: globalThis.ComputedRef<string[]>;
5
+ hasError: globalThis.ComputedRef<boolean>;
6
+ hasSuccess: globalThis.ComputedRef<boolean>;
7
+ hasMessages: globalThis.ComputedRef<boolean>;
8
+ };
@@ -1,9 +1,12 @@
1
+ import { type SetupContext } from 'vue';
1
2
  interface CurrencyOptions {
2
3
  currency?: string;
3
4
  locale?: string;
4
5
  style?: string;
5
6
  fractionDigits?: number;
6
7
  }
8
+ type SetupContextAttrs = SetupContext['attrs'];
9
+ type SetupContextAttrsKeys = (keyof SetupContextAttrs)[];
7
10
  /**
8
11
  * Format number value to specified currency format
9
12
  * @param {number} amount
@@ -21,4 +24,28 @@ export declare const formatNumber: (amount: number | string, { fractionDigits }:
21
24
  * @param {number} amount
22
25
  */
23
26
  export declare const formatInteger: (amount: number | string) => string;
27
+ /**
28
+ * Generates and returns the array of root allowed attributes
29
+ * @param {SetupContextAttrs} data
30
+ * @returns {SetupContextAttrsKeys}
31
+ */
32
+ export declare const getRootKeys: (data: SetupContextAttrs) => SetupContextAttrsKeys;
33
+ /**
34
+ * Picks only required attributes for root element
35
+ * @param {SetupContextAttrs} data
36
+ * @param {SetupContextAttrsKeys} include
37
+ * @returns {Pick<SetupContextAttrs, any>}
38
+ */
39
+ export declare const getRootAttrs: (data: SetupContextAttrs, include?: SetupContextAttrsKeys) => Pick<{
40
+ [x: string]: unknown;
41
+ }, string>;
42
+ /**
43
+ * Omits root attributes from component's attributes
44
+ * @param {SetupContextAttrs} data
45
+ * @param {SetupContextAttrsKeys} exclude
46
+ * @returns {Omit<SetupContextAttrs, any>}
47
+ */
48
+ export declare const getNonRootAttrs: (data: SetupContextAttrs, exclude?: SetupContextAttrsKeys) => Omit<{
49
+ [x: string]: unknown;
50
+ }, string>;
24
51
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rotki/ui-library",
3
- "version": "0.5.1",
3
+ "version": "0.7.0",
4
4
  "packageManager": "pnpm@8.7.6",
5
5
  "description": "A vue design system and component library for rotki",
6
6
  "type": "module",
@@ -72,59 +72,61 @@
72
72
  "vue-router": ">=4.0.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@babel/core": "7.22.20",
76
- "@babel/types": "7.22.19",
77
- "@commitlint/cli": "17.7.1",
78
- "@commitlint/config-conventional": "17.7.0",
75
+ "@babel/core": "7.23.5",
76
+ "@babel/types": "7.23.5",
77
+ "@commitlint/cli": "18.4.3",
78
+ "@commitlint/config-conventional": "18.4.3",
79
79
  "@fontsource/roboto": "5.0.8",
80
80
  "@headlessui/vue": "1.7.16",
81
81
  "@popperjs/core": "2.11.8",
82
82
  "@rotki/eslint-config": "1.1.2",
83
- "@storybook/addon-essentials": "7.4.2",
84
- "@storybook/addon-interactions": "7.4.2",
85
- "@storybook/addon-links": "7.4.2",
86
- "@storybook/addon-styling": "1.3.7",
87
- "@storybook/addons": "7.4.2",
88
- "@storybook/blocks": "7.4.2",
89
- "@storybook/testing-library": "0.2.1",
90
- "@storybook/vue3": "7.4.2",
91
- "@storybook/vue3-vite": "7.4.2",
92
- "@types/node": "20.2.4",
93
- "@vitejs/plugin-vue": "4.3.4",
94
- "@vitest/coverage-v8": "0.34.4",
95
- "@vitest/ui": "0.34.4",
96
- "@vue/test-utils": "2.4.1",
83
+ "@storybook/addon-docs": "7.6.3",
84
+ "@storybook/addon-essentials": "7.6.3",
85
+ "@storybook/addon-interactions": "7.6.3",
86
+ "@storybook/addon-links": "7.6.3",
87
+ "@storybook/addon-themes": "7.6.3",
88
+ "@storybook/addons": "7.6.3",
89
+ "@storybook/blocks": "7.6.3",
90
+ "@storybook/testing-library": "0.2.2",
91
+ "@storybook/vue3": "7.6.3",
92
+ "@storybook/vue3-vite": "7.6.3",
93
+ "@types/node": "20.10.3",
94
+ "@vitejs/plugin-vue": "4.5.1",
95
+ "@vitest/coverage-v8": "1.0.1",
96
+ "@vitest/ui": "1.0.1",
97
+ "@vue/test-utils": "2.4.3",
97
98
  "@vue/tsconfig": "0.4.0",
98
- "@vueuse/core": "10.4.1",
99
- "@vueuse/math": "10.4.1",
100
- "@vueuse/shared": "10.4.1",
99
+ "@vueuse/core": "10.7.0",
100
+ "@vueuse/math": "10.7.0",
101
+ "@vueuse/shared": "10.7.0",
101
102
  "argparse": "2.0.1",
102
- "autoprefixer": "10.4.15",
103
+ "autoprefixer": "10.4.16",
103
104
  "babel-loader": "8.3.0",
104
105
  "bumpp": "9.2.0",
105
106
  "css-loader": "6.8.1",
106
- "eslint": "8.49.0",
107
- "fast-glob": "3.3.1",
108
- "fast-xml-parser": "4.2.7",
109
- "fs-extra": "11.1.1",
107
+ "eslint": "8.55.0",
108
+ "eslint-plugin-storybook": "0.6.15",
109
+ "fast-glob": "3.3.2",
110
+ "fast-xml-parser": "4.3.2",
111
+ "fs-extra": "11.2.0",
110
112
  "husky": "8.0.3",
111
- "jsdom": "22.1.0",
112
- "lint-staged": "14.0.1",
113
- "postcss": "8.4.29",
113
+ "jsdom": "23.0.1",
114
+ "lint-staged": "15.2.0",
115
+ "postcss": "8.4.32",
114
116
  "react": "18.2.0",
115
117
  "react-dom": "18.2.0",
116
- "remixicon": "3.5.0",
117
- "sass": "1.67.0",
118
- "scule": "1.0.0",
119
- "storybook": "7.4.2",
120
- "tailwindcss": "3.3.3",
121
- "tsc-alias": "1.8.7",
122
- "typescript": "5.2.2",
123
- "unplugin-auto-import": "0.16.6",
124
- "vite": "4.4.9",
125
- "vitest": "0.34.4",
126
- "vue": "3.3.4",
127
- "vue-loader": "17.2.2",
118
+ "remixicon": "3.6.0",
119
+ "sass": "1.69.5",
120
+ "scule": "1.1.1",
121
+ "storybook": "7.6.3",
122
+ "tailwindcss": "3.3.6",
123
+ "tsc-alias": "1.8.8",
124
+ "typescript": "5.3.2",
125
+ "unplugin-auto-import": "0.17.2",
126
+ "vite": "5.0.6",
127
+ "vitest": "1.0.1",
128
+ "vue": "3.3.10",
129
+ "vue-loader": "17.3.1",
128
130
  "vue-router": "4.2.4",
129
131
  "vue-tsc": "1.8.11"
130
132
  },