@politicalwatch/tipi-uikit 1.7.20 → 1.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.
package/.storybook/preview.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@politicalwatch/tipi-uikit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"main": "src/components/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"build-storybook": "storybook build"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@storybook/test": "^8.0.0",
|
|
15
16
|
"core-js": "^3.32.2",
|
|
16
17
|
"d3": "^7.8.5",
|
|
17
18
|
"d3-cloud": "^1.2.5",
|
|
@@ -28,29 +29,27 @@
|
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@rushstack/eslint-patch": "^1.1.0",
|
|
31
|
-
"@storybook/addon-essentials": "^
|
|
32
|
-
"@storybook/addon-interactions": "^
|
|
33
|
-
"@storybook/addon-links": "^
|
|
34
|
-
"@storybook/blocks": "^
|
|
35
|
-
"@storybook/
|
|
36
|
-
"@storybook/vue3": "^
|
|
37
|
-
"@storybook/vue3-vite": "^7.6.9",
|
|
32
|
+
"@storybook/addon-essentials": "^8.0.0",
|
|
33
|
+
"@storybook/addon-interactions": "^8.0.0",
|
|
34
|
+
"@storybook/addon-links": "^8.0.0",
|
|
35
|
+
"@storybook/blocks": "^8.0.0",
|
|
36
|
+
"@storybook/vue3": "^8.0.0",
|
|
37
|
+
"@storybook/vue3-vite": "^8.0.0",
|
|
38
38
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
39
39
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
40
40
|
"@vue/test-utils": "^2.4.1",
|
|
41
41
|
"autoprefixer": "^10.4.16",
|
|
42
42
|
"eslint": "^8.5.0",
|
|
43
|
-
"eslint-plugin-storybook": "^0.
|
|
43
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
44
44
|
"eslint-plugin-vue": "^9.0.0",
|
|
45
45
|
"jsdom": "^24.0.0",
|
|
46
46
|
"prettier": "^3.0.3",
|
|
47
|
-
"react": "^18.2.0",
|
|
48
|
-
"react-dom": "^18.2.0",
|
|
49
47
|
"sass": "^1.67.0",
|
|
50
|
-
"storybook": "^
|
|
48
|
+
"storybook": "^8.0.0",
|
|
51
49
|
"stylelint": "^16.1.0",
|
|
52
50
|
"terser": "^5.14.2",
|
|
53
51
|
"vite": "^5.0.12",
|
|
54
52
|
"vitest": "^1.0.0"
|
|
55
|
-
}
|
|
53
|
+
},
|
|
54
|
+
"packageManager": "pnpm@7.30.5+sha256.c8d730294f671574458704cd56e81dc0eb8d345a444e4c7a728d8d2cdc4f5045"
|
|
56
55
|
}
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
datum: {
|
|
29
29
|
type: Array,
|
|
30
30
|
required: true,
|
|
31
|
-
default: () =>
|
|
31
|
+
default: () => [],
|
|
32
32
|
},
|
|
33
33
|
title: {
|
|
34
34
|
type: String,
|
|
@@ -44,7 +44,6 @@ export default {
|
|
|
44
44
|
},
|
|
45
45
|
download: {
|
|
46
46
|
type: String,
|
|
47
|
-
default: 'Descargar',
|
|
48
47
|
},
|
|
49
48
|
},
|
|
50
49
|
methods: {
|
|
@@ -63,10 +62,12 @@ export default {
|
|
|
63
62
|
deep: true,
|
|
64
63
|
},
|
|
65
64
|
datum(vals) {
|
|
66
|
-
this.chart.updateData([
|
|
65
|
+
this.chart.updateData([...vals]);
|
|
67
66
|
},
|
|
68
67
|
height(val) {
|
|
69
|
-
setTimeout(() =>{
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
this.chart.resizeChart();
|
|
70
|
+
}, 10);
|
|
70
71
|
},
|
|
71
72
|
},
|
|
72
73
|
beforeDestroy() {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import D3WordsCloud from '@/components/Charts/WordsCloud/d3.wordscloud.vue';
|
|
2
|
+
|
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Example/D3WordsCloud',
|
|
6
|
+
component: D3WordsCloud,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
|
|
9
|
+
argTypes: {
|
|
10
|
+
icon: {
|
|
11
|
+
type: 'text',
|
|
12
|
+
},
|
|
13
|
+
icon: {
|
|
14
|
+
type: 'text',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// More on writing stories with args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
20
|
+
export const WordsCloud = {
|
|
21
|
+
args: {
|
|
22
|
+
datum: [
|
|
23
|
+
{ tag: 'Atención a personas dependientes', size: 25, value: 1, color: '#dd1367' },
|
|
24
|
+
{ tag: 'Atención a la dependencia', size: 25, value: 1, color: '#4c9f38' },
|
|
25
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
26
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
27
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
28
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
29
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
30
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
31
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
32
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
33
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
34
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
35
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
36
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
37
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
38
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
39
|
+
{ tag: 'Financiación de la sanidad', size: 25, value: 1, color: '#4c9f38' },
|
|
40
|
+
],
|
|
41
|
+
config: {
|
|
42
|
+
key: 'tag',
|
|
43
|
+
size: 'size',
|
|
44
|
+
value: 'value',
|
|
45
|
+
angle: [0],
|
|
46
|
+
color: { key: 'color' },
|
|
47
|
+
fontFamily: 'Rubik',
|
|
48
|
+
tooltip: { suffix: 'aparición', suffixPlural: 'apariciones' },
|
|
49
|
+
},
|
|
50
|
+
height: 400,
|
|
51
|
+
},
|
|
52
|
+
};
|