@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.2 → 7.24.3-qa-elisee-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 (83) hide show
  1. package/.prettierrc +6 -8
  2. package/package.json +21 -9
  3. package/public/favicon.ico +0 -0
  4. package/public/index.html +17 -0
  5. package/src/App.vue +78 -79
  6. package/src/assets/svgIcons/adjust_roof.svg +6 -0
  7. package/src/assets/svgIcons/copy.svg +10 -0
  8. package/src/assets/theme.js +3 -3
  9. package/src/components/addNewButton/AddNewButton.stories.js +2 -2
  10. package/src/components/addNewButton/index.vue +51 -48
  11. package/src/components/banner/actionBanner/index.vue +55 -54
  12. package/src/components/banner/banner/banner.stories.js +5 -5
  13. package/src/components/banner/banner/index.vue +159 -159
  14. package/src/components/banner/infoBanner/index.vue +53 -41
  15. package/src/components/buttons/buttonIcon/index.vue +122 -125
  16. package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
  17. package/src/components/buttons/closeButton/index.vue +49 -49
  18. package/src/components/buttons/mainButton/index.vue +119 -119
  19. package/src/components/card/index.vue +70 -70
  20. package/src/components/collapsableInfoText/index.vue +94 -96
  21. package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
  22. package/src/components/deleteIcon/index.vue +54 -54
  23. package/src/components/draggableInputHandle/index.vue +37 -37
  24. package/src/components/dropdown/Dropdown.stories.js +10 -9
  25. package/src/components/dropdown/index.vue +106 -106
  26. package/src/components/errorMessage/index.vue +52 -52
  27. package/src/components/filter/filterSettings.vue +433 -439
  28. package/src/components/filter/index.vue +135 -135
  29. package/src/components/filter/parentDropdown.vue +73 -73
  30. package/src/components/icon/Icons.stories.js +7 -7
  31. package/src/components/icon/iconCollection.vue +53 -53
  32. package/src/components/icon/index.vue +121 -121
  33. package/src/components/iconWrapper/index.vue +156 -156
  34. package/src/components/infoCard/index.vue +26 -26
  35. package/src/components/infoText/index.vue +132 -133
  36. package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
  37. package/src/components/inputs/checkbox/index.vue +180 -190
  38. package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
  39. package/src/components/inputs/inputNumber/index.vue +644 -647
  40. package/src/components/inputs/inputNumberQuestion/index.vue +182 -185
  41. package/src/components/inputs/inputText/InputText.stories.js +22 -22
  42. package/src/components/inputs/inputText/index.vue +336 -337
  43. package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
  44. package/src/components/inputs/radioButton/index.vue +219 -221
  45. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  46. package/src/components/inputs/searchInput/index.vue +126 -126
  47. package/src/components/inputs/select/index.vue +776 -778
  48. package/src/components/inputs/select/option/index.vue +124 -124
  49. package/src/components/inputs/select/select.stories.js +32 -31
  50. package/src/components/inputs/slider/index.vue +99 -99
  51. package/src/components/inputs/switchField/index.vue +222 -220
  52. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
  53. package/src/components/inputs/textAreaInput/index.vue +173 -171
  54. package/src/components/inputs/toggle/Toggle.stories.js +14 -14
  55. package/src/components/inputs/toggle/index.vue +217 -214
  56. package/src/components/label/index.vue +82 -82
  57. package/src/components/markerItem/index.vue +66 -68
  58. package/src/components/modals/actionModal/index.vue +54 -54
  59. package/src/components/modals/infoModal/index.vue +36 -39
  60. package/src/components/modals/modal/index.vue +134 -134
  61. package/src/components/modals/modal/modal.stories.js +5 -5
  62. package/src/components/navigationTabs/index.vue +94 -96
  63. package/src/components/pageSubtitle/index.vue +49 -55
  64. package/src/components/pageTitle/index.vue +56 -56
  65. package/src/components/pagination/index.vue +89 -92
  66. package/src/components/progressBar/index.vue +107 -107
  67. package/src/components/projectMarker/index.vue +244 -246
  68. package/src/components/rangeSlider/Slider.vue +465 -491
  69. package/src/components/rangeSlider/index.vue +410 -410
  70. package/src/components/rangeSlider/utils/dom.js +5 -5
  71. package/src/components/selectedOptions/index.vue +119 -119
  72. package/src/components/sideMenu/index.vue +199 -199
  73. package/src/components/spinner/index.vue +57 -57
  74. package/src/components/tableDropdown/index.vue +520 -520
  75. package/src/components/tables/mainTable/index.vue +362 -366
  76. package/src/components/tables/viewTable/index.vue +171 -171
  77. package/src/components/threeDots/index.vue +334 -340
  78. package/src/components/videoThumbnail/index.vue +86 -86
  79. package/src/components/videoThumbnail/videoThumbnail.stories.js +16 -14
  80. package/src/helpers/numberConverter.js +2 -2
  81. package/src/helpers/translateLang.js +9 -9
  82. package/src/mixins/inputValidations.js +5 -5
  83. package/.eslintrc.js +0 -184
@@ -1,148 +1,148 @@
1
1
  <template>
2
- <OptionContainer
3
- :background-color="colorMode == 'dark' ? '#000000' : backgroundColor"
4
- :cursor-type="cursorType"
2
+ <optionContainer
5
3
  :data-value="value"
6
- :disabled-bg-color="disabledBgColor"
7
- :disabled-text-color="disabledTextColor"
8
- :hovered-bg-color="
4
+ :hoveredBgColor="
9
5
  colorMode == 'dark'
10
6
  ? '#000000'
11
7
  : hoveredBgColor
12
8
  ? hoveredBgColor
13
9
  : 'grey5'
14
10
  "
15
- :is-disabled="isDisabled"
16
- :min-width="minWidth"
17
- :padding="padding"
18
- :title="hoverText"
19
11
  @click="clickHandler"
20
12
  @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%')};
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 {
50
72
  background-color: ${(props) =>
51
- props.isDisabled
73
+ !!props.disabledTextColor && props.isDisabled
52
74
  ? props.theme.colors[props.disabledBgColor]
53
75
  ? props.theme.colors[props.disabledBgColor]
54
76
  : 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 {
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
-
83
- export default {
84
- name: 'RCoption',
77
+ : props.theme.colors[props.hoveredBgColor]
78
+ ? props.theme.colors[props.hoveredBgColor]
79
+ : props.hoveredBgColor} !important;
80
+ }
81
+ `
85
82
 
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
- },
83
+ export default {
84
+ name: 'RCoption',
85
+ emits: ['option-hovered', 'option-selected'],
86
+ props: {
87
+ value: {
88
+ required: true
128
89
  },
129
- emits: ['option-hovered', 'option-selected'],
130
- data() {
131
- return {}
90
+ hoveredBgColor: {
91
+ required: false
132
92
  },
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
- },
93
+ colorMode: {
94
+ required: false,
95
+ default: 'light'
146
96
  },
147
- }
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'
118
+ },
119
+ disabledTextColor: {
120
+ required: false,
121
+ default: null
122
+ },
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
+ }
141
+ },
142
+ hoverHandler() {
143
+ this.$parent.$emit('option-hovered', this.value)
144
+ }
145
+ },
146
+ computed: {}
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,35 +24,36 @@ 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"
7
4
  :value="value"
8
5
  @update="onChange($event)"
6
+ :tooltips="false"
7
+ :min="minValue"
8
+ :max="maxValue"
9
9
  />
10
- <NumberText> {{ value }} {{ unit }} </NumberText>
11
- </Container>
10
+ <number-text> {{ value }} {{ unit }} </number-text>
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'
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
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;
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;
33
33
 
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);
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
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;
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;
52
- }
50
+ &:nth-of-type(1) {
51
+ margin-left: 7px;
53
52
  }
54
53
  }
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,
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
- },
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
107
94
  },
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)
95
+ unit: {
96
+ required: false,
97
+ default: ''
117
98
  },
118
- methods: {
119
- onChange(value) {
120
- this.$emit('change', value)
121
- },
99
+ minValue: {
100
+ required: false,
101
+ default: 0
122
102
  },
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)
123
122
  }
123
+ }
124
124
  </script>
125
125
 
126
126
  <style src="@vueform/slider/themes/default.css"></style>