@rotki/ui-library 0.6.0 → 0.8.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/README.md +11 -8
  2. package/dist/all-icons.d.ts +82 -21
  3. package/dist/all-icons.es.js +4996 -4752
  4. package/dist/components/alerts/Alert.vue.d.ts +10 -10
  5. package/dist/components/buttons/button/Button.vue.d.ts +1 -0
  6. package/dist/components/buttons/button-group/ButtonGroup.vue.d.ts +1 -0
  7. package/dist/components/cards/Card.vue.d.ts +21 -1
  8. package/dist/components/cards/CardHeader.vue.d.ts +1 -1
  9. package/dist/components/chips/Chip.vue.d.ts +55 -15
  10. package/dist/components/divider/Divider.vue.d.ts +17 -0
  11. package/dist/components/forms/auto-complete/AutoComplete.vue.d.ts +25 -25
  12. package/dist/components/forms/auto-complete/AutoCompleteSelection.vue.d.ts +1 -1
  13. package/dist/components/forms/checkbox/Checkbox.vue.d.ts +36 -16
  14. package/dist/components/forms/radio-button/radio/Radio.vue.d.ts +37 -17
  15. package/dist/components/forms/radio-button/radio-group/RadioGroup.vue.d.ts +63 -12
  16. package/dist/components/forms/revealable-text-field/RevealableTextField.vue.d.ts +52 -43
  17. package/dist/components/forms/select/SimpleSelect.vue.d.ts +1 -1
  18. package/dist/components/forms/text-area/TextArea.vue.d.ts +233 -0
  19. package/dist/components/forms/text-field/TextField.vue.d.ts +59 -47
  20. package/dist/components/helpers/FormTextDetail.vue.d.ts +32 -0
  21. package/dist/components/icons/Icon.vue.d.ts +1 -1
  22. package/dist/components/index.d.ts +6 -2
  23. package/dist/components/index.es.js +28 -24
  24. package/dist/components/loaders/Skeleton.vue.d.ts +27 -0
  25. package/dist/components/loaders/SkeletonBase.vue.d.ts +17 -0
  26. package/dist/components/logos/Logo.vue.d.ts +1 -1
  27. package/dist/components/overlays/badge/Badge.vue.d.ts +4 -4
  28. package/dist/components/overlays/dialog/Dialog.vue.d.ts +1 -1
  29. package/dist/components/overlays/tooltip/Tooltip.vue.d.ts +1 -1
  30. package/dist/components/progress/Progress.vue.d.ts +1 -1
  31. package/dist/components/steppers/FooterStepper.vue.d.ts +1 -1
  32. package/dist/components/steppers/Stepper.vue.d.ts +1 -1
  33. package/dist/components/steppers/StepperCustomIcon.vue.d.ts +1 -1
  34. package/dist/components/steppers/StepperIcon.vue.d.ts +1 -1
  35. package/dist/components/tables/DataTable.vue.d.ts +47 -2
  36. package/dist/components/tables/ExpandButton.vue.d.ts +34 -0
  37. package/dist/components/tables/TablePagination.vue.d.ts +1 -1
  38. package/dist/components/tabs/tab/Tab.vue.d.ts +1 -1
  39. package/dist/components/tabs/tab-item/TabItem.vue.d.ts +1 -1
  40. package/dist/components/tabs/tab-items/TabItems.vue.d.ts +1 -1
  41. package/dist/components/tabs/tabs/Tabs.vue.d.ts +1 -1
  42. package/dist/composables/defaults/table.d.ts +9 -0
  43. package/dist/composables/index.es.js +2 -2
  44. package/dist/composables/popper.d.ts +1 -1
  45. package/dist/composables/sticky-header.d.ts +9 -0
  46. package/dist/index-2YbRDW3N.js +6333 -0
  47. package/dist/{index-393a0e94.js → index-W2poXQa4.js} +1 -1
  48. package/dist/index.d.ts +12 -2
  49. package/dist/index.es.js +2578 -2505
  50. package/dist/style.css +1 -1
  51. package/dist/theme/index.es.js +1 -1
  52. package/dist/utils/form-text-detail.d.ts +8 -0
  53. package/dist/utils/helpers.d.ts +27 -0
  54. package/package.json +39 -39
  55. package/dist/index-2e3eeb1f.js +0 -5701
  56. /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.6.0",
3
+ "version": "0.8.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,61 +72,61 @@
72
72
  "vue-router": ">=4.0.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@babel/core": "7.23.2",
76
- "@babel/types": "7.23.0",
77
- "@commitlint/cli": "18.0.0",
78
- "@commitlint/config-conventional": "18.0.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-docs": "7.5.1",
84
- "@storybook/addon-essentials": "7.5.1",
85
- "@storybook/addon-interactions": "7.5.1",
86
- "@storybook/addon-links": "7.5.1",
87
- "@storybook/addon-themes": "7.5.1",
88
- "@storybook/addons": "7.5.1",
89
- "@storybook/blocks": "7.5.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
90
  "@storybook/testing-library": "0.2.2",
91
- "@storybook/vue3": "7.5.1",
92
- "@storybook/vue3-vite": "7.5.1",
93
- "@types/node": "20.2.4",
94
- "@vitejs/plugin-vue": "4.4.0",
95
- "@vitest/coverage-v8": "0.34.6",
96
- "@vitest/ui": "0.34.6",
97
- "@vue/test-utils": "2.4.1",
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",
98
98
  "@vue/tsconfig": "0.4.0",
99
- "@vueuse/core": "10.5.0",
100
- "@vueuse/math": "10.5.0",
101
- "@vueuse/shared": "10.5.0",
99
+ "@vueuse/core": "10.7.0",
100
+ "@vueuse/math": "10.7.0",
101
+ "@vueuse/shared": "10.7.0",
102
102
  "argparse": "2.0.1",
103
103
  "autoprefixer": "10.4.16",
104
104
  "babel-loader": "8.3.0",
105
105
  "bumpp": "9.2.0",
106
106
  "css-loader": "6.8.1",
107
- "eslint": "8.52.0",
107
+ "eslint": "8.55.0",
108
108
  "eslint-plugin-storybook": "0.6.15",
109
- "fast-glob": "3.3.1",
109
+ "fast-glob": "3.3.2",
110
110
  "fast-xml-parser": "4.3.2",
111
- "fs-extra": "11.1.1",
111
+ "fs-extra": "11.2.0",
112
112
  "husky": "8.0.3",
113
- "jsdom": "22.1.0",
114
- "lint-staged": "15.0.2",
115
- "postcss": "8.4.31",
113
+ "jsdom": "23.0.1",
114
+ "lint-staged": "15.2.0",
115
+ "postcss": "8.4.32",
116
116
  "react": "18.2.0",
117
117
  "react-dom": "18.2.0",
118
- "remixicon": "3.5.0",
119
- "sass": "1.69.4",
120
- "scule": "1.0.0",
121
- "storybook": "7.5.1",
122
- "tailwindcss": "3.3.4",
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
123
  "tsc-alias": "1.8.8",
124
- "typescript": "5.2.2",
125
- "unplugin-auto-import": "0.16.6",
126
- "vite": "4.5.0",
127
- "vitest": "0.34.6",
128
- "vue": "3.3.6",
129
- "vue-loader": "17.2.2",
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",
130
130
  "vue-router": "4.2.4",
131
131
  "vue-tsc": "1.8.11"
132
132
  },