@eturnity/eturnity_reusable_components 7.30.3-EPDM-10647.0 → 7.30.3-EPDM-10576.2

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 (82) 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 +486 -452
  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 -701
  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 -792
  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
  82. package/src/utils/index.js +0 -12
@@ -1,148 +1,148 @@
1
1
  <template>
2
- <optionContainer
2
+ <OptionContainer
3
+ :background-color="colorMode == 'dark' ? '#000000' : backgroundColor"
4
+ :cursor-type="cursorType"
3
5
  :data-value="value"
4
- :hoveredBgColor="
6
+ :disabled-bg-color="disabledBgColor"
7
+ :disabled-text-color="disabledTextColor"
8
+ :hovered-bg-color="
5
9
  colorMode == 'dark'
6
10
  ? '#000000'
7
11
  : hoveredBgColor
8
12
  ? hoveredBgColor
9
13
  : 'grey5'
10
14
  "
15
+ :is-disabled="isDisabled"
16
+ :min-width="minWidth"
17
+ :padding="padding"
18
+ :title="hoverText"
11
19
  @click="clickHandler"
12
20
  @mouseover="hoverHandler"
13
- :cursorType="cursorType"
14
- :isDisabled="isDisabled"
15
- :disabledBgColor="disabledBgColor"
16
- :disabledTextColor="disabledTextColor"
17
- :backgroundColor="colorMode == 'dark' ? '#000000' : backgroundColor"
18
- :title="hoverText"
19
- :minWidth="minWidth"
20
- :padding="padding"
21
21
  >
22
22
  <slot></slot>
23
- </optionContainer>
23
+ </OptionContainer>
24
24
  </template>
25
25
 
26
26
  <script>
27
- // import selectButton from './selectButton'
28
- // import selectDropdown from './selectDropDown'
29
- import styled from 'vue3-styled-components'
30
- const optionProps = {
31
- isDisabled: Boolean,
32
- hoveredBgColor: String,
33
- cursorType: String,
34
- backgroundColor: String,
35
- minWidth: String,
36
- disabledBgColor: String,
37
- disabledTextColor: String,
38
- padding: String
39
- }
40
- const optionContainer = styled('div', optionProps)`
41
- display: flex;
42
- cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
43
- flex-direction: row;
44
- justify-content: space-between;
45
- align-items: center;
46
- padding: ${(props) => props.padding};
47
- gap: 14px;
48
- width: 100%;
49
- min-width: ${(props) => (props.minWidth ? props.minWidth : '100%')};
50
- background-color: ${(props) =>
51
- props.isDisabled
52
- ? props.theme.colors[props.disabledBgColor]
53
- ? props.theme.colors[props.disabledBgColor]
54
- : props.disabledBgColor
55
- : props.theme.colors[props.backgroundColor]
56
- ? props.theme.colors[props.backgroundColor]
57
- : props.backgroundColor} !important;
58
- box-sizing: inherit;
59
- background-color: ${(props) =>
60
- props.theme.colors[props.backgroundColor]
61
- ? props.theme.colors[props.backgroundColor]
62
- : props.backgroundColor};
63
- color: ${(props) =>
64
- props.isDisabled
65
- ? !!props.disabledTextColor
66
- ? props.theme.colors[props.disabledTextColor]
67
- ? props.theme.colors[props.disabledTextColor]
68
- : props.disabledTextColor
69
- : props.theme.colors.grey3
70
- : 'inherit'};
71
- &:hover {
27
+ // import selectButton from './selectButton'
28
+ // import selectDropdown from './selectDropDown'
29
+ import styled from 'vue3-styled-components'
30
+ const optionProps = {
31
+ isDisabled: Boolean,
32
+ hoveredBgColor: String,
33
+ cursorType: String,
34
+ backgroundColor: String,
35
+ minWidth: String,
36
+ disabledBgColor: String,
37
+ disabledTextColor: String,
38
+ padding: String,
39
+ }
40
+ const OptionContainer = styled('div', optionProps)`
41
+ display: flex;
42
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
43
+ flex-direction: row;
44
+ justify-content: space-between;
45
+ align-items: center;
46
+ padding: ${(props) => props.padding};
47
+ gap: 14px;
48
+ width: 100%;
49
+ min-width: ${(props) => (props.minWidth ? props.minWidth : '100%')};
72
50
  background-color: ${(props) =>
73
- !!props.disabledTextColor && props.isDisabled
51
+ props.isDisabled
74
52
  ? props.theme.colors[props.disabledBgColor]
75
53
  ? props.theme.colors[props.disabledBgColor]
76
54
  : props.disabledBgColor
77
- : props.theme.colors[props.hoveredBgColor]
78
- ? props.theme.colors[props.hoveredBgColor]
79
- : props.hoveredBgColor} !important;
80
- }
81
- `
55
+ : props.theme.colors[props.backgroundColor]
56
+ ? props.theme.colors[props.backgroundColor]
57
+ : props.backgroundColor} !important;
58
+ box-sizing: inherit;
59
+ background-color: ${(props) =>
60
+ props.theme.colors[props.backgroundColor]
61
+ ? props.theme.colors[props.backgroundColor]
62
+ : props.backgroundColor};
63
+ color: ${(props) =>
64
+ props.isDisabled
65
+ ? props.disabledTextColor
66
+ ? props.theme.colors[props.disabledTextColor]
67
+ ? props.theme.colors[props.disabledTextColor]
68
+ : props.disabledTextColor
69
+ : props.theme.colors.grey3
70
+ : 'inherit'};
71
+ &:hover {
72
+ background-color: ${(props) =>
73
+ !!props.disabledTextColor && props.isDisabled
74
+ ? props.theme.colors[props.disabledBgColor]
75
+ ? props.theme.colors[props.disabledBgColor]
76
+ : props.disabledBgColor
77
+ : props.theme.colors[props.hoveredBgColor]
78
+ ? props.theme.colors[props.hoveredBgColor]
79
+ : props.hoveredBgColor} !important;
80
+ }
81
+ `
82
82
 
83
- export default {
84
- name: 'RCoption',
85
- emits: ['option-hovered', 'option-selected'],
86
- props: {
87
- value: {
88
- required: true
89
- },
90
- hoveredBgColor: {
91
- required: false
92
- },
93
- colorMode: {
94
- required: false,
95
- default: 'light'
96
- },
97
- cursorType: {
98
- required: false,
99
- default: 'pointer'
100
- },
101
- backgroundColor: {
102
- required: false,
103
- default: 'white'
104
- },
105
- hoverText: {
106
- required: false
107
- },
108
- isDisabled: {
109
- required: false,
110
- default: false
111
- },
112
- minWidth: {
113
- required: false
114
- },
115
- disabledBgColor: {
116
- required: false,
117
- default: 'white'
83
+ export default {
84
+ name: 'RCoption',
85
+
86
+ components: { OptionContainer },
87
+ props: {
88
+ value: {
89
+ required: true,
90
+ },
91
+ hoveredBgColor: {
92
+ required: false,
93
+ },
94
+ colorMode: {
95
+ required: false,
96
+ default: 'light',
97
+ },
98
+ cursorType: {
99
+ required: false,
100
+ default: 'pointer',
101
+ },
102
+ backgroundColor: {
103
+ required: false,
104
+ default: 'white',
105
+ },
106
+ hoverText: {
107
+ required: false,
108
+ },
109
+ isDisabled: {
110
+ required: false,
111
+ default: false,
112
+ },
113
+ minWidth: {
114
+ required: false,
115
+ },
116
+ disabledBgColor: {
117
+ required: false,
118
+ default: 'white',
119
+ },
120
+ disabledTextColor: {
121
+ required: false,
122
+ default: null,
123
+ },
124
+ padding: {
125
+ required: false,
126
+ default: '12px 10px',
127
+ },
118
128
  },
119
- disabledTextColor: {
120
- required: false,
121
- default: null
129
+ emits: ['option-hovered', 'option-selected'],
130
+ data() {
131
+ return {}
122
132
  },
123
- padding: {
124
- required: false,
125
- default: '12px 10px'
126
- }
127
- },
128
-
129
- components: { optionContainer },
130
- data() {
131
- return {}
132
- },
133
- methods: {
134
- clickHandler(e) {
135
- if (this.isDisabled) {
136
- // prevent emitter if the option is disabled
137
- return
138
- } else {
139
- this.$parent.$emit('option-selected', this.value, e)
140
- }
133
+ computed: {},
134
+ methods: {
135
+ clickHandler(e) {
136
+ if (this.isDisabled) {
137
+ // prevent emitter if the option is disabled
138
+ return
139
+ } else {
140
+ this.$parent.$emit('option-selected', this.value, e)
141
+ }
142
+ },
143
+ hoverHandler() {
144
+ this.$parent.$emit('option-hovered', this.value)
145
+ },
141
146
  },
142
- hoverHandler() {
143
- this.$parent.$emit('option-hovered', this.value)
144
- }
145
- },
146
- computed: {}
147
- }
147
+ }
148
148
  </script>
@@ -1,15 +1,15 @@
1
- import Select from "./index.vue"
2
- import Option from "./option/index.vue"
1
+ import Select from './index.vue'
2
+ import Option from './option/index.vue'
3
3
 
4
4
  export default {
5
- title: "select",
5
+ title: 'select',
6
6
  component: Select,
7
7
  // argTypes: {},
8
8
  }
9
9
 
10
10
  const Template = (args, { argTypes }) => ({
11
11
  // Components used in your story `template` are defined in the `components` object
12
- components: { Select,Option },
12
+ components: { Select, Option },
13
13
  // The story's `args` need to be mapped into the template through the `setup()` method
14
14
  props: Object.keys(argTypes),
15
15
  template: `<Select v-bind="$props">
@@ -24,36 +24,35 @@ const Template = (args, { argTypes }) => ({
24
24
  </template>
25
25
  </Select>`,
26
26
 
27
- // import Select from "@eturnity/eturnity_reusable_components/src/components/inputs/select"
28
- // import Option from "@eturnity/eturnity_reusable_components/src/components/inputs/select/option"
29
- // To use:
30
- // How to use it
31
- // <Select
32
- // hoverDropdown="true"
33
- // selectWidth="100%"
34
- // optionWidth="50%"
35
- // label="that is a label"
36
- // alignItems="vertical"
37
- // >
38
- // <template #selector="{selectedValue}">
39
- // value selected: {{selectedValue}}
40
- // </template>
41
- // <template #dropdown>
42
- // <Option value="1">value one</Option>
43
- // <Option value="2">value two</Option>
44
- // <Option value="3">value three</Option>
45
- // <Option value="4">value four</Option>
46
- // </template>
47
- // </Select>
27
+ // import Select from "@eturnity/eturnity_reusable_components/src/components/inputs/select"
28
+ // import Option from "@eturnity/eturnity_reusable_components/src/components/inputs/select/option"
29
+ // To use:
30
+ // How to use it
31
+ // <Select
32
+ // hoverDropdown="true"
33
+ // selectWidth="100%"
34
+ // optionWidth="50%"
35
+ // label="that is a label"
36
+ // alignItems="vertical"
37
+ // >
38
+ // <template #selector="{selectedValue}">
39
+ // value selected: {{selectedValue}}
40
+ // </template>
41
+ // <template #dropdown>
42
+ // <Option value="1">value one</Option>
43
+ // <Option value="2">value two</Option>
44
+ // <Option value="3">value three</Option>
45
+ // <Option value="4">value four</Option>
46
+ // </template>
47
+ // </Select>
48
48
  })
49
49
 
50
50
  export const Default = Template.bind({})
51
51
  Default.args = {
52
- hoverDropdown="true"
53
- selectWidth="100%"
54
- optionWidth="50%"
55
- label="that is a label"
56
- alignItems="vertical"
57
- value="2"
52
+ hoverDropdown: 'true',
53
+ selectWidth: '100%',
54
+ optionWidth: '50%',
55
+ label: 'that is a label',
56
+ alignItems: 'vertical',
57
+ value: '2',
58
58
  }
59
-
@@ -1,126 +1,126 @@
1
1
  <template>
2
- <container>
2
+ <Container>
3
3
  <Slider
4
+ :max="maxValue"
5
+ :min="minValue"
6
+ :tooltips="false"
4
7
  :value="value"
5
8
  @update="onChange($event)"
6
- :tooltips="false"
7
- :min="minValue"
8
- :max="maxValue"
9
9
  />
10
- <number-text> {{ value }} {{ unit }} </number-text>
11
- </container>
10
+ <NumberText> {{ value }} {{ unit }} </NumberText>
11
+ </Container>
12
12
  </template>
13
13
 
14
14
  <script>
15
- // import Slider from "@eturnity/eturnity_reusable_components/src/components/inputs/slider"
16
- //To use:
17
- // <slider
18
- // :value="sliderValue" //required from parent
19
- // unit="m" //optional
20
- // @change="onChangeSlider($event)" //required to have @change in parent
21
- // :minValue="10" //default is 0 if not specified
22
- // :maxValue="500" //default is 100 if not specified
23
- // />
24
- import Slider from '@vueform/slider'
25
- import styled from 'vue3-styled-components'
26
-
27
- const Container = styled.div`
28
- margin: 16px 0 16px 21px;
29
- display: grid;
30
- grid-template-columns: 1fr auto;
31
- grid-gap: 40px;
32
- align-items: center;
15
+ // import Slider from "@eturnity/eturnity_reusable_components/src/components/inputs/slider"
16
+ //To use:
17
+ // <slider
18
+ // :value="sliderValue" //required from parent
19
+ // unit="m" //optional
20
+ // @change="onChangeSlider($event)" //required to have @change in parent
21
+ // :minValue="10" //default is 0 if not specified
22
+ // :maxValue="500" //default is 100 if not specified
23
+ // />
24
+ import Slider from '@vueform/slider'
25
+ import styled from 'vue3-styled-components'
33
26
 
34
- .slider-touch-area {
35
- background-color: ${(props) => props.theme.colors.mediumGray};
36
- border-radius: 100%;
37
- display: flex;
38
- grid-gap: 3px;
27
+ const Container = styled.div`
28
+ margin: 16px 0 16px 21px;
29
+ display: grid;
30
+ grid-template-columns: 1fr auto;
31
+ grid-gap: 40px;
39
32
  align-items: center;
40
- justify-items: center;
41
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
42
33
 
43
- span {
44
- // This is for the white lines on the button
45
- width: 2px;
46
- height: 10px;
47
- background: white;
48
- display: inline-block;
34
+ .slider-touch-area {
35
+ background-color: ${(props) => props.theme.colors.mediumGray};
36
+ border-radius: 100%;
37
+ display: flex;
38
+ grid-gap: 3px;
39
+ align-items: center;
40
+ justify-items: center;
41
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
42
+
43
+ span {
44
+ // This is for the white lines on the button
45
+ width: 2px;
46
+ height: 10px;
47
+ background: white;
48
+ display: inline-block;
49
49
 
50
- &:nth-of-type(1) {
51
- margin-left: 7px;
50
+ &:nth-of-type(1) {
51
+ margin-left: 7px;
52
+ }
52
53
  }
53
54
  }
54
- }
55
55
 
56
- .slider-connect {
57
- background: ${(props) => props.theme.colors.blue};
58
- }
56
+ .slider-connect {
57
+ background: ${(props) => props.theme.colors.blue};
58
+ }
59
59
 
60
- .slider-base {
61
- background-color: ${(props) => props.theme.colors.lightGray};
62
- border-radius: 0;
63
- }
60
+ .slider-base {
61
+ background-color: ${(props) => props.theme.colors.lightGray};
62
+ border-radius: 0;
63
+ }
64
64
 
65
- .slider-connects {
66
- border-radius: 0;
67
- }
65
+ .slider-connects {
66
+ border-radius: 0;
67
+ }
68
68
 
69
- .slider-handle {
70
- //we need to override the default values coming from the package
71
- height: 26px !important;
72
- width: 26px !important;
73
- top: -11px !important;
74
- }
75
- `
69
+ .slider-handle {
70
+ //we need to override the default values coming from the package
71
+ height: 26px !important;
72
+ width: 26px !important;
73
+ top: -11px !important;
74
+ }
75
+ `
76
76
 
77
- const NumberText = styled.div`
78
- font-weight: 500;
79
- font-size: 24px;
80
- color: ${(props) => props.theme.colors.black};
81
- `
77
+ const NumberText = styled.div`
78
+ font-weight: 500;
79
+ font-size: 24px;
80
+ color: ${(props) => props.theme.colors.black};
81
+ `
82
82
 
83
- export default {
84
- name: 'slider',
85
- components: {
86
- Slider,
87
- Container,
88
- NumberText
89
- },
90
- props: {
91
- value: {
92
- required: false,
93
- default: 0
83
+ export default {
84
+ name: 'Slider',
85
+ components: {
86
+ Slider,
87
+ Container,
88
+ NumberText,
94
89
  },
95
- unit: {
96
- required: false,
97
- default: ''
90
+ props: {
91
+ value: {
92
+ required: false,
93
+ default: 0,
94
+ },
95
+ unit: {
96
+ required: false,
97
+ default: '',
98
+ },
99
+ minValue: {
100
+ required: false,
101
+ default: 0,
102
+ },
103
+ maxValue: {
104
+ required: false,
105
+ default: 100,
106
+ },
98
107
  },
99
- minValue: {
100
- required: false,
101
- default: 0
108
+ mounted() {
109
+ // This is to add the 3 white lines to the slider button
110
+ let slider = document.querySelector('.slider-touch-area')
111
+ let span1 = document.createElement('span')
112
+ let span2 = document.createElement('span')
113
+ let span3 = document.createElement('span')
114
+ slider.appendChild(span1)
115
+ slider.appendChild(span2)
116
+ slider.appendChild(span3)
117
+ },
118
+ methods: {
119
+ onChange(value) {
120
+ this.$emit('change', value)
121
+ },
102
122
  },
103
- maxValue: {
104
- required: false,
105
- default: 100
106
- }
107
- },
108
- methods: {
109
- onChange(value) {
110
- this.$emit('change', value)
111
- }
112
- },
113
- mounted() {
114
- // This is to add the 3 white lines to the slider button
115
- let slider = document.querySelector('.slider-touch-area')
116
- let span1 = document.createElement('span')
117
- let span2 = document.createElement('span')
118
- let span3 = document.createElement('span')
119
- slider.appendChild(span1)
120
- slider.appendChild(span2)
121
- slider.appendChild(span3)
122
123
  }
123
- }
124
124
  </script>
125
125
 
126
126
  <style src="@vueform/slider/themes/default.css"></style>