@eturnity/eturnity_reusable_components 7.30.3 → 7.32.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 (81) hide show
  1. package/.eslintrc.js +184 -0
  2. package/.prettierrc +8 -6
  3. package/package.json +9 -21
  4. package/src/App.vue +79 -78
  5. package/src/assets/theme.js +3 -3
  6. package/src/components/addNewButton/AddNewButton.stories.js +2 -2
  7. package/src/components/addNewButton/index.vue +48 -51
  8. package/src/components/banner/actionBanner/index.vue +54 -55
  9. package/src/components/banner/banner/banner.stories.js +5 -5
  10. package/src/components/banner/banner/index.vue +159 -159
  11. package/src/components/banner/infoBanner/index.vue +41 -53
  12. package/src/components/buttons/buttonIcon/index.vue +125 -122
  13. package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
  14. package/src/components/buttons/closeButton/index.vue +49 -49
  15. package/src/components/buttons/mainButton/index.vue +108 -108
  16. package/src/components/card/index.vue +70 -70
  17. package/src/components/collapsableInfoText/index.vue +96 -94
  18. package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
  19. package/src/components/deleteIcon/index.vue +54 -54
  20. package/src/components/draggableInputHandle/index.vue +37 -37
  21. package/src/components/dropdown/Dropdown.stories.js +9 -10
  22. package/src/components/dropdown/index.vue +106 -106
  23. package/src/components/errorMessage/index.vue +52 -52
  24. package/src/components/filter/filterSettings.vue +428 -422
  25. package/src/components/filter/index.vue +135 -135
  26. package/src/components/filter/parentDropdown.vue +73 -73
  27. package/src/components/icon/Icons.stories.js +7 -7
  28. package/src/components/icon/iconCollection.vue +53 -53
  29. package/src/components/icon/index.vue +122 -122
  30. package/src/components/iconWrapper/index.vue +156 -156
  31. package/src/components/infoCard/index.vue +30 -32
  32. package/src/components/infoText/index.vue +142 -137
  33. package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
  34. package/src/components/inputs/checkbox/index.vue +190 -180
  35. package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
  36. package/src/components/inputs/inputNumber/index.vue +696 -696
  37. package/src/components/inputs/inputNumberQuestion/index.vue +185 -182
  38. package/src/components/inputs/inputText/InputText.stories.js +22 -22
  39. package/src/components/inputs/inputText/index.vue +337 -336
  40. package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
  41. package/src/components/inputs/radioButton/index.vue +222 -219
  42. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  43. package/src/components/inputs/searchInput/index.vue +127 -126
  44. package/src/components/inputs/select/index.vue +792 -791
  45. package/src/components/inputs/select/option/index.vue +124 -124
  46. package/src/components/inputs/select/select.stories.js +31 -32
  47. package/src/components/inputs/slider/index.vue +99 -99
  48. package/src/components/inputs/switchField/index.vue +220 -222
  49. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
  50. package/src/components/inputs/textAreaInput/index.vue +171 -173
  51. package/src/components/inputs/toggle/Toggle.stories.js +14 -14
  52. package/src/components/inputs/toggle/index.vue +214 -217
  53. package/src/components/label/index.vue +82 -82
  54. package/src/components/markerItem/index.vue +68 -66
  55. package/src/components/modals/actionModal/index.vue +54 -54
  56. package/src/components/modals/infoModal/index.vue +39 -36
  57. package/src/components/modals/modal/index.vue +134 -134
  58. package/src/components/modals/modal/modal.stories.js +5 -5
  59. package/src/components/navigationTabs/index.vue +96 -94
  60. package/src/components/pageSubtitle/index.vue +55 -49
  61. package/src/components/pageTitle/index.vue +56 -56
  62. package/src/components/pagination/index.vue +92 -89
  63. package/src/components/progressBar/index.vue +107 -107
  64. package/src/components/projectMarker/index.vue +246 -244
  65. package/src/components/rangeSlider/Slider.vue +491 -465
  66. package/src/components/rangeSlider/index.vue +410 -410
  67. package/src/components/rangeSlider/utils/dom.js +5 -5
  68. package/src/components/selectedOptions/index.vue +119 -119
  69. package/src/components/sideMenu/index.vue +199 -199
  70. package/src/components/spinner/index.vue +57 -57
  71. package/src/components/tableDropdown/index.vue +520 -520
  72. package/src/components/tables/mainTable/index.vue +417 -400
  73. package/src/components/tables/viewTable/index.vue +171 -171
  74. package/src/components/threeDots/index.vue +340 -334
  75. package/src/components/videoThumbnail/index.vue +86 -86
  76. package/src/components/videoThumbnail/videoThumbnail.stories.js +14 -16
  77. package/src/helpers/numberConverter.js +2 -2
  78. package/src/helpers/translateLang.js +9 -9
  79. package/src/mixins/inputValidations.js +5 -5
  80. package/public/favicon.ico +0 -0
  81. package/public/index.html +0 -17
package/.eslintrc.js ADDED
@@ -0,0 +1,184 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: {
4
+ browser: true,
5
+ node: true,
6
+ es6: true,
7
+ },
8
+ extends: [
9
+ 'eslint:recommended',
10
+ 'eslint:recommended',
11
+ 'plugin:vue/vue3-recommended',
12
+ 'plugin:prettier/recommended',
13
+ ],
14
+ plugins: ['vue', 'prettier'],
15
+ parserOptions: {
16
+ ecmaVersion: 2020,
17
+ sourceType: 'module',
18
+ },
19
+ rules: {
20
+ 'vue/component-name-in-template-casing': [
21
+ 'warn',
22
+ 'PascalCase',
23
+ {
24
+ registeredComponentsOnly: false,
25
+ ignores: [],
26
+ },
27
+ ],
28
+ 'vue/multi-word-component-names': [
29
+ 'warn',
30
+ {
31
+ ignores: [],
32
+ },
33
+ ],
34
+ 'vue/html-closing-bracket-newline': [
35
+ 'warn',
36
+ {
37
+ singleline: 'never',
38
+ multiline: 'always',
39
+ },
40
+ ],
41
+ 'vue/html-closing-bracket-spacing': [
42
+ 'warn',
43
+ {
44
+ startTag: 'never',
45
+ endTag: 'never',
46
+ selfClosingTag: 'always',
47
+ },
48
+ ],
49
+ 'vue/no-multi-spaces': [
50
+ 'warn',
51
+ {
52
+ ignoreProperties: false,
53
+ },
54
+ ],
55
+ 'vue/html-end-tags': 'warn',
56
+ 'keyword-spacing': [
57
+ 'warn',
58
+ {
59
+ before: true, // Require a space before keywords
60
+ after: true, // Require a space after keywords
61
+ },
62
+ ],
63
+ // Enforce one space after comma
64
+ 'comma-spacing': [
65
+ 'warn',
66
+ {
67
+ before: false, // No space before comma
68
+ after: true, // Require a space after comma
69
+ },
70
+ ],
71
+ 'func-call-spacing': ['warn', 'never'],
72
+ // Enforce one space around binary operators (+, -, *, /, etc.)
73
+ 'space-infix-ops': 'warn',
74
+ // Enforce no space inside parentheses
75
+ 'space-in-parens': ['warn', 'never'],
76
+ // Enforce one space before block statements (if, else, for, etc.)
77
+ 'space-before-blocks': 'warn',
78
+ // Enforce no spaces inside square brackets
79
+ 'array-bracket-spacing': ['warn', 'never'],
80
+ // Enforce one space before function parentheses
81
+ 'space-before-function-paren': ['warn', 'never'],
82
+ // Enforce one space inside braces of object literals
83
+ 'object-curly-spacing': ['warn', 'always'],
84
+ // Enforce one space before and after arrow functions (optional)
85
+ 'arrow-spacing': ['warn', { before: true, after: true }],
86
+ // Enforce one space after colon in object literals
87
+ 'key-spacing': [
88
+ 'warn',
89
+ {
90
+ beforeColon: false, // No space before colon
91
+ afterColon: true, // Require one space after colon
92
+ mode: 'strict', // Enforce spacing between key and value
93
+ },
94
+ ],
95
+ 'vue/html-indent': 'off',
96
+ 'vue/html-quotes': ['warn', 'double'],
97
+ 'vue/html-self-closing': [
98
+ 'warn',
99
+ {
100
+ html: {
101
+ void: 'always',
102
+ normal: 'never',
103
+ component: 'always',
104
+ },
105
+ svg: 'always',
106
+ math: 'always',
107
+ },
108
+ ],
109
+ 'vue/require-default-prop': 'warn',
110
+ 'vue/require-prop-types': 'warn',
111
+ 'vue/v-on-event-hyphenation': [
112
+ 'warn',
113
+ 'always',
114
+ {
115
+ autofix: true,
116
+ ignore: [],
117
+ },
118
+ ],
119
+ 'vue/prop-name-casing': ['warn', 'camelCase'],
120
+ 'vue/order-in-components': 'warn',
121
+ 'vue/this-in-template': ['warn', 'never'],
122
+ 'vue/attributes-order': [
123
+ 'warn',
124
+ {
125
+ order: [
126
+ 'DEFINITION',
127
+ 'LIST_RENDERING',
128
+ 'CONDITIONALS',
129
+ 'RENDER_MODIFIERS',
130
+ 'GLOBAL',
131
+ ['UNIQUE', 'SLOT'],
132
+ 'TWO_WAY_BINDING',
133
+ 'OTHER_DIRECTIVES',
134
+ 'OTHER_ATTR',
135
+ 'EVENTS',
136
+ 'CONTENT',
137
+ ],
138
+ alphabetical: true,
139
+ },
140
+ ],
141
+ 'vue/no-unused-vars': 'warn',
142
+ 'vue/no-use-v-if-with-v-for': [
143
+ 'warn',
144
+ {
145
+ allowUsingIterationVar: false,
146
+ },
147
+ ],
148
+ 'no-unused-vars': 'warn',
149
+ 'no-undef': 'warn',
150
+ 'no-console': 'warn',
151
+ 'no-debugger': 'warn',
152
+ 'no-multi-spaces': 'warn',
153
+ 'no-mixed-spaces-and-tabs': 'warn',
154
+ 'no-redeclare': 'warn',
155
+ 'no-prototype-builtins': 'warn',
156
+ 'no-unsafe-finally': 'warn',
157
+ 'max-len': [
158
+ 'warn',
159
+ {
160
+ code: 120,
161
+ tabWidth: 2,
162
+ ignoreUrls: true,
163
+ ignoreComments: true,
164
+ ignoreTrailingComments: true,
165
+ ignorePattern: '^import\\s.+\\sfrom\\s.+;$',
166
+ },
167
+ ],
168
+ 'prettier/prettier': [
169
+ 'warn',
170
+ {
171
+ semi: false,
172
+ singleQuote: true,
173
+ trailingComma: 'es5',
174
+ printWidth: 80,
175
+ tabWidth: 2,
176
+ useTabs: false,
177
+ endOfLine: 'auto',
178
+ },
179
+ ],
180
+ },
181
+ globals: {
182
+ _: true,
183
+ },
184
+ }
package/.prettierrc CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
- "semi": false,
3
- "singleQuote": true,
4
- "useTabs": false,
5
- "trailingComma": "none",
6
- "printWidth": 80
7
- }
2
+ "semi": false,
3
+ "singleQuote": true,
4
+ "printWidth": 80,
5
+ "tabWidth": 2,
6
+ "trailingComma": "es5",
7
+ "bracketSpacing": true,
8
+ "vueIndentScriptAndStyle": true
9
+ }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.30.3",
3
+ "version": "7.32.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "build": "vue-cli-service build",
8
8
  "lint": "vue-cli-service lint",
9
9
  "storybook": "start-storybook -p 6006",
10
- "build-storybook": "build-storybook"
10
+ "build-storybook": "build-storybook",
11
+ "prettier": "prettier --write 'src/**/*.{js,vue}'"
11
12
  },
12
13
  "dependencies": {
13
14
  "@storybook/vue3": "7.0.18",
@@ -22,28 +23,15 @@
22
23
  "vuedraggable": "4.1.0"
23
24
  },
24
25
  "devDependencies": {
25
- "@babel/core": "7.12.16",
26
- "@babel/eslint-parser": "7.12.16",
27
- "@vue/cli-plugin-babel": "5.0.8",
26
+ "babel-eslint": "10.1.0",
28
27
  "@vue/cli-plugin-eslint": "5.0.8",
29
28
  "@vue/cli-service": "5.0.8",
30
29
  "@vue/compiler-sfc": "3.3.4",
31
- "eslint": "7.32.0",
32
- "eslint-plugin-vue": "8.0.3"
33
- },
34
- "eslintConfig": {
35
- "root": true,
36
- "env": {
37
- "node": true
38
- },
39
- "extends": [
40
- "plugin:vue/essential",
41
- "eslint:recommended"
42
- ],
43
- "parserOptions": {
44
- "parser": "@babel/eslint-parser"
45
- },
46
- "rules": {}
30
+ "eslint": "8.0.1",
31
+ "eslint-config-prettier": "8.8.0",
32
+ "eslint-plugin-prettier": "4.2.1",
33
+ "eslint-plugin-vue": "9.14.1",
34
+ "prettier": "2.8.4"
47
35
  },
48
36
  "browserslist": [
49
37
  "> 1%",
package/src/App.vue CHANGED
@@ -1,109 +1,110 @@
1
1
  <template>
2
- <ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
3
- <page-container>
2
+ <ThemeProvider :style="{ height: '100%' }" :theme="getTheme()">
3
+ <PageContainer>
4
4
  <br />
5
- <input-number
5
+ <InputNumber
6
+ background-color="transparent"
7
+ border-color="eturnityGrey"
8
+ input-height="34px"
9
+ input-width="420px"
10
+ :interaction-step="1"
11
+ :is-interactive="true"
12
+ :min-number="0"
13
+ :number-precision="0"
14
+ text-align="left"
15
+ unit-name="mm"
6
16
  :value="value"
7
- :minNumber="0"
8
- unitName="mm"
9
- :numberPrecision="0"
10
- backgroundColor="transparent"
11
- borderColor="eturnityGrey"
12
- inputHeight="34px"
13
- inputWidth="420px"
14
- textAlign="left"
15
- :isInteractive="true"
16
- :interactionStep="1"
17
- @on-input="inputHandler"
17
+ @input-blur="blurHandler"
18
18
  @input-change="changeHandler"
19
19
  @input-focus="focusHandler"
20
- @input-blur="blurHandler"
20
+ @on-input="inputHandler"
21
21
  >
22
- <template v-slot:label>
22
+ <template #label>
23
23
  <div>Interactive Label 1</div>
24
24
  </template>
25
- </input-number>
25
+ </InputNumber>
26
26
 
27
- <hr>
27
+ <hr />
28
28
 
29
- <input-number
29
+ <InputNumber
30
+ background-color="transparent"
31
+ border-color="eturnityGrey"
32
+ input-height="34px"
33
+ input-width="420px"
34
+ :interaction-step="1"
35
+ :is-interactive="true"
36
+ :min-number="0"
37
+ :number-precision="0"
38
+ text-align="left"
39
+ unit-name="mm"
30
40
  :value="value"
31
- :minNumber="0"
32
- unitName="mm"
33
- :numberPrecision="0"
34
- backgroundColor="transparent"
35
- borderColor="eturnityGrey"
36
- inputHeight="34px"
37
- inputWidth="420px"
38
- textAlign="left"
39
- :isInteractive="true"
40
- :interactionStep="1"
41
- @on-input="inputHandler"
41
+ @input-blur="blurHandler"
42
42
  @input-change="changeHandler"
43
43
  @input-focus="focusHandler"
44
- @input-blur="blurHandler"
44
+ @on-input="inputHandler"
45
45
  >
46
- <template v-slot:label>
46
+ <template #label>
47
47
  <div>Interactive Label 2</div>
48
48
  </template>
49
- </input-number>
49
+ </InputNumber>
50
50
 
51
- <hr>
52
- <button @click="value=42">Click to set at 42</button>
53
- </page-container>
51
+ <hr />
52
+ <button @click="value = 42">Click to set at 42</button>
53
+ </PageContainer>
54
54
  </ThemeProvider>
55
55
  </template>
56
56
 
57
57
  <script>
58
- import { ThemeProvider } from 'vue3-styled-components'
59
- import theme from './assets/theme'
60
- import styled from 'vue3-styled-components'
61
- import InputNumber from '@/components/inputs/inputNumber'
58
+ import { ThemeProvider } from 'vue3-styled-components'
59
+ import theme from './assets/theme'
60
+ import styled from 'vue3-styled-components'
61
+ import InputNumber from '@/components/inputs/inputNumber'
62
62
 
63
- const PageContainer = styled.div`
64
- padding: 40px;
65
- `
63
+ const PageContainer = styled.div`
64
+ padding: 40px;
65
+ `
66
66
 
67
- export default {
68
- name: 'App',
69
- components: {
70
- ThemeProvider,
71
- PageContainer,
72
- InputNumber,
73
- },
74
- data() {
75
- return {
76
- value: 42,
77
- }
78
- },
79
- computed: {
80
- },
81
- methods: {
82
- blurHandler(e) {
83
- console.log('blur', e)
67
+ export default {
68
+ name: 'App',
69
+ components: {
70
+ ThemeProvider,
71
+ PageContainer,
72
+ InputNumber,
84
73
  },
85
- changeHandler(e) {
86
- console.log('change', e)
74
+ data() {
75
+ return {
76
+ value: 42,
77
+ }
87
78
  },
88
- focusHandler(e) {
89
- console.log('focus', e)
79
+ computed: {},
80
+ methods: {
81
+ blurHandler(e) {
82
+ console.log('blur', e)
83
+ },
84
+ changeHandler(e) {
85
+ console.log('change', e)
86
+ },
87
+ focusHandler(e) {
88
+ console.log('focus', e)
89
+ },
90
+ inputHandler(e) {
91
+ console.log('input', e)
92
+ //this.value = e
93
+ setTimeout(() => {
94
+ this.value = e
95
+ }, 1000)
96
+ },
97
+ getTheme() {
98
+ return theme
99
+ },
90
100
  },
91
- inputHandler(e) {
92
- console.log('input', e)
93
- //this.value = e
94
- setTimeout(()=>{this.value = e},1000)
95
- },
96
- getTheme() {
97
- return theme
98
- }
99
101
  }
100
- }
101
102
  </script>
102
103
 
103
104
  <style>
104
- html,
105
- body {
106
- height: 100%;
107
- margin: 0;
108
- }
105
+ html,
106
+ body {
107
+ height: 100%;
108
+ margin: 0;
109
+ }
109
110
  </style>
@@ -26,16 +26,16 @@ const theme = {
26
26
  transparentWhite3: '#ffffff48',
27
27
  transparentBlack1: '#263238e6',
28
28
  disabled: '#dfe1e1',
29
- eturnityGrey: '#263238'
29
+ eturnityGrey: '#263238',
30
30
  },
31
31
  screen: {
32
32
  mobileSmall: '345px',
33
33
  mobile: '425px',
34
34
  mobileLarge: '530px',
35
35
  tablet: '768px',
36
- tabletLarge: '950px'
36
+ tabletLarge: '950px',
37
37
  },
38
- borderRadius: '4px'
38
+ borderRadius: '4px',
39
39
  }
40
40
 
41
41
  export default theme
@@ -1,7 +1,7 @@
1
- import AddNewButton from "./index.vue"
1
+ import AddNewButton from './index.vue'
2
2
 
3
3
  export default {
4
- title: "AddNewButton",
4
+ title: 'AddNewButton',
5
5
  component: AddNewButton,
6
6
  // argTypes: {},
7
7
  }
@@ -1,64 +1,61 @@
1
1
  <template>
2
- <page-container :shouldPosition="shouldPosition">
3
- <button-container :data-id="dataId">
2
+ <PageContainer :should-position="shouldPosition">
3
+ <ButtonContainer :data-id="dataId">
4
4
  <PlusButtonSvg />
5
- </button-container>
6
- </page-container>
5
+ </ButtonContainer>
6
+ </PageContainer>
7
7
  </template>
8
8
 
9
9
  <script>
10
- // import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
11
- import styled from 'vue3-styled-components'
12
- import PlusButtonSvg from '../../assets/icons/plus_button.svg'
10
+ // import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
11
+ import styled from 'vue3-styled-components'
12
+ import PlusButtonSvg from '../../assets/icons/plus_button.svg'
13
13
 
14
- const pageAttrs = { shouldPosition: Boolean }
15
- const PageContainer = styled('div', pageAttrs)`
16
- position: ${(props) => (props.shouldPosition ? 'fixed' : 'unset')};
17
- bottom: 30px;
18
- right: 30px;
19
- `
14
+ const pageAttrs = { shouldPosition: Boolean }
15
+ const PageContainer = styled('div', pageAttrs)`
16
+ position: ${(props) => (props.shouldPosition ? 'fixed' : 'unset')};
17
+ bottom: 30px;
18
+ right: 30px;
19
+ `
20
20
 
21
- const ButtonContainer = styled.div`
22
- height: 60px;
23
- width: 60px;
24
- background-color: ${(props) => props.theme.colors.green};
25
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
26
- border-radius: 100%;
27
- cursor: pointer;
28
- display: grid;
29
- align-items: center;
30
- justify-items: center;
21
+ const ButtonContainer = styled.div`
22
+ height: 60px;
23
+ width: 60px;
24
+ background-color: ${(props) => props.theme.colors.green};
25
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
26
+ border-radius: 100%;
27
+ cursor: pointer;
28
+ display: grid;
29
+ align-items: center;
30
+ justify-items: center;
31
31
 
32
- &:hover {
33
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
34
- ${(props) => props.theme.colors.green};
35
- }
36
-
37
- &:active,
38
- &:focus {
39
- background: ${(props) => props.theme.colors.green};
40
- }
41
- `
32
+ &:hover {
33
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
34
+ ${(props) => props.theme.colors.green};
35
+ }
42
36
 
43
- const PlusButton = styled.img``
37
+ &:active,
38
+ &:focus {
39
+ background: ${(props) => props.theme.colors.green};
40
+ }
41
+ `
44
42
 
45
- export default {
46
- name: 'add-new-button',
47
- components: {
48
- PageContainer,
49
- ButtonContainer,
50
- PlusButton,
51
- PlusButtonSvg
52
- },
53
- props: {
54
- shouldPosition: {
55
- required: false,
56
- default: true
43
+ export default {
44
+ name: 'AddNewButton',
45
+ components: {
46
+ PageContainer,
47
+ ButtonContainer,
48
+ PlusButtonSvg,
49
+ },
50
+ props: {
51
+ shouldPosition: {
52
+ required: false,
53
+ default: true,
54
+ },
55
+ dataId: {
56
+ type: String,
57
+ default: '',
58
+ },
57
59
  },
58
- dataId: {
59
- type: String,
60
- default: ''
61
- }
62
60
  }
63
- }
64
61
  </script>