@eturnity/eturnity_reusable_components 6.42.1-EPDM-3013.6 → 6.42.2-EPDM-6921.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "6.42.1-EPDM-3013.6",
3
+ "version": "6.42.2-EPDM-6921.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -11,14 +11,11 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@vueform/slider": "1.0.5",
14
+ "core-js": "^3.31.1",
14
15
  "html-loader": "0.5.5",
15
- "postcss": "^8.4.25",
16
16
  "v-click-outside": "2.1.4",
17
17
  "vue": "2.6.11",
18
- "vue-styled-components": "1.6.0",
19
- "vue2-datepicker": "3.11.1",
20
- "vuedraggable": "2.24.3",
21
- "core-js": "^3.31.1"
18
+ "vue-styled-components": "1.6.0"
22
19
  },
23
20
  "devDependencies": {
24
21
  "@storybook/addon-actions": "6.2.8",
package/src/App.vue CHANGED
@@ -1,107 +1,109 @@
1
1
  <template>
2
2
  <ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
3
3
  <page-container>
4
- <br />
5
4
 
6
- {{ alignItems }}
7
- <input-number
8
- :value="value"
9
- :minNumber="0"
10
- unitName="mm"
11
- :numberPrecision="0"
12
- backgroundColor="transparent"
13
- borderColor="eturnityGrey"
14
- inputHeight="34px"
15
- inputWidth="420px"
16
- textAlign="left"
17
- :isInteractive="true"
18
- :interactionStep="1"
19
- @on-input="value = $event"
20
- @input-change="changeHandler"
21
- @input-focus="focusHandler"
22
- @input-blur="blurHandler"
23
- >
24
- <template v-slot:label>
25
- <div>Interactive Label</div>
26
- </template>
27
- </input-number>
28
-
29
- <dropdown-component openingMode="hover" gap="30px">
30
- <template #trigger><i>Click Me</i></template>
31
- <template #dropdown>
32
- <div>
33
- <a href="">test1</a>
34
- <button href="">test2</button><br>
35
- <p>Text</p>
36
- </div>
37
- </template>
38
- </dropdown-component>
39
-
40
- <videoThumbnail src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
41
- playIconColor="red"
42
- playIconSize="20px"
43
- width="400px"
44
- height="600px"
45
- />
5
+ <br/>
6
+ <input-number
7
+ :value="value"
8
+ :minNumber="0"
9
+ unitName="mm"
10
+ :numberPrecision="0"
11
+ backgroundColor="transparent"
12
+ borderColor="eturnityGrey"
13
+ inputHeight="34px"
14
+ inputWidth="420px"
15
+ textAlign="left"
16
+ :isInteractive="true"
17
+ :interactionStep="1"
18
+ @on-input="value = $event"
19
+ @input-change="changeHandler"
20
+ @input-focus="focusHandler"
21
+ @input-blur="blurHandler"
22
+ >
23
+ <template v-slot:label>
24
+ <div>Interactive Label</div>
25
+ </template>
26
+ </input-number>
27
+
28
+ <dropdown-component openingMode="hover" gap="30px">
29
+ <template #trigger><i>Click Me</i></template>
30
+ <template #dropdown>
31
+ <div>
32
+ <a href="">test1</a>
33
+ <button href="">test2</button>
34
+ <br>
35
+ <p>Text</p>
36
+ </div>
37
+ </template>
38
+ </dropdown-component>
39
+
40
+ <videoThumbnail
41
+ src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
42
+ playIconColor="red"
43
+ playIconSize="20px"
44
+ width="400px"
45
+ height="600px"
46
+ />
46
47
 
47
- <SwitchField
48
- @on-switch-change="onInputChange($event)"
49
- :options="[
48
+ <SwitchField
49
+ @on-switch-change="onInputChange($event)"
50
+ :options="[
50
51
  { value: 0, content: 'zero' },
51
52
  { value: 1, content: 'one' },
52
53
  { value: 2, content: 'two' }
53
54
  ]"
54
- :value="value"
55
- label="label"
56
- toggleColor="red"
57
- size="large"
58
- backgroundColor="blue"
59
- labelAlign="left"
60
- fontColor="black"
61
- :disabled="false"
62
- />
63
- <icon
64
- name="opacity"
65
- color="red"
66
- hoveredColor="blue"
67
- size="60px"
68
- cursor="default"
69
- isStriked = "true"
70
- />
71
- <Select
72
- :value="value"
73
- selectWidth="100%"
74
- optionWidth="50%"
75
- label="that is a label"
76
- alignItems="vertical"
77
- colorMode="dark"
78
- isSearchable="true"
79
- @input-change="value = $event"
80
- @search-change="searchValue = $event"
55
+ :value="value"
56
+ label="label"
57
+ toggleColor="red"
58
+ size="large"
59
+ backgroundColor="blue"
60
+ labelAlign="left"
61
+ fontColor="black"
62
+ :disabled="false"
63
+ />
64
+ <icon
65
+ name="opacity"
66
+ color="red"
67
+ hoveredColor="blue"
68
+ size="60px"
69
+ cursor="default"
70
+ isStriked="true"
71
+ />
72
+ <Select
73
+ :value="value"
74
+ selectWidth="100%"
75
+ optionWidth="50%"
76
+ label="that is a label"
77
+ alignItems="vertical"
78
+ colorMode="dark"
79
+ isSearchable="true"
80
+ @input-change="value = $event"
81
+ @search-change="searchValue = $event"
82
+ >
83
+ <template #selector="{ selectedValue }">
84
+ value selected: {{ selectedValue }}
85
+ </template>
86
+ <template #dropdown>
87
+ <Option
88
+ v-for="opt in filteredOptionList"
89
+ :key="opt.id"
90
+ :value="opt.val"
91
+ >{{ opt.lookFor }}
92
+ </Option
81
93
  >
82
- <template #selector="{ selectedValue }">
83
- value selected: {{ selectedValue }}
84
- </template>
85
- <template #dropdown>
86
- <Option
87
- v-for="opt in filteredOptionList"
88
- :key="opt.id"
89
- :value="opt.val"
90
- >{{ opt.lookFor }}</Option
91
- >
92
- </template>
93
- </Select>
94
-
95
-
96
- {{ filteredOptionList }}
97
-
98
- <iconCollection color="red" />
94
+ </template>
95
+ </Select>
96
+
97
+
98
+ {{ filteredOptionList }}
99
+
100
+ <iconCollection color="red"/>
99
101
  </page-container>
100
102
  </ThemeProvider>
101
103
  </template>
102
104
 
103
105
  <script>
104
- import { ThemeProvider } from 'vue-styled-components'
106
+ import {ThemeProvider} from 'vue-styled-components'
105
107
  import theme from './assets/theme'
106
108
  import styled from 'vue-styled-components'
107
109
  import InputNumber from '@/components/inputs/inputNumber'
@@ -144,14 +146,14 @@ export default {
144
146
  value2: 42,
145
147
  companyName: 'toto',
146
148
  optionList: [
147
- { id: 'a', val: 'A', lookFor: 'babababa' },
148
- { id: 'b', val: 'B', lookFor: 'abab' },
149
- { id: 'c', val: 'C', lookFor: 'ccc' },
150
- { id: 'd', val: 'D', lookFor: 'ddd' },
151
- { id: 'e', val: 'E', lookFor: 'dddee' },
152
- { id: 'f', val: 'F', lookFor: 'ddfff' },
153
- { id: 'g', val: 'G', lookFor: 'dggg' },
154
- { id: 'h', val: 'H', lookFor: 'dddhhh' },
149
+ {id: 'a', val: 'A', lookFor: 'babababa'},
150
+ {id: 'b', val: 'B', lookFor: 'abab'},
151
+ {id: 'c', val: 'C', lookFor: 'ccc'},
152
+ {id: 'd', val: 'D', lookFor: 'ddd'},
153
+ {id: 'e', val: 'E', lookFor: 'dddee'},
154
+ {id: 'f', val: 'F', lookFor: 'ddfff'},
155
+ {id: 'g', val: 'G', lookFor: 'dggg'},
156
+ {id: 'h', val: 'H', lookFor: 'dddhhh'},
155
157
  ],
156
158
  searchValue: ''
157
159
  }
@@ -159,7 +161,7 @@ export default {
159
161
  computed: {
160
162
  filteredOptionList() {
161
163
  return this.optionList.filter((opt) =>
162
- opt.lookFor.includes(this.searchValue)
164
+ opt.lookFor.includes(this.searchValue)
163
165
  )
164
166
  }
165
167
  },
@@ -222,7 +224,7 @@ export default {
222
224
  ]
223
225
  return items
224
226
  },
225
- getComponentInfo({ row, value }) {
227
+ getComponentInfo({row, value}) {
226
228
  let item
227
229
  if (row.selectedValue && row.selectedValue[value]) {
228
230
  item = row.selectedValue[value]
@@ -1,136 +1,129 @@
1
1
  <template>
2
- <Wrapper
3
- :disabled="disabled"
4
- :size="size"
5
- :backgroundColor="backgroundColor"
2
+ <Wrapper
3
+ :disabled="disabled"
4
+ :size="size"
5
+ :backgroundColor="backgroundColor"
6
6
  :borderRadius="borderRadius"
7
7
  :hasBorder="hasBorder"
8
8
  :color="iconColor"
9
9
  :hoveredBackgroundColor="hoveredBackgroundColor"
10
10
  :isHovered="isHovered"
11
- >
12
- <icon
13
- :disabled="disabled"
14
- :size="iconSize"
15
- :name="name"
16
- :color="iconColor"
17
- :hoveredColor="hoveredIconColor"
18
- />
19
- <caret v-if="hasCaret">
20
- <iconWrapper
21
- :disabled="disabled"
22
- size="10px"
23
- name="arrow_down"
24
- :iconColor="iconColor"
25
- :hoveredBackgroundColor="hoveredIconColor"
26
- borderRadius="1px"
27
- />
28
- </caret>
29
- </Wrapper>
30
- </template>
31
-
32
- <script>
33
- // import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
34
- // How to use:
35
- //<icon
36
- // name="House" //required. a svg file named [name].svg should be present in /assets/svgIcons
37
- // color="red"
38
- // hoveredColor="blue"
39
- // size="60px" by default, this is 30px
40
- // />
41
-
42
- import styled from 'vue-styled-components'
43
- import icon from '../icon'
44
- const wrapperAttrs = {
45
- isHovered: Boolean,
46
- borderRadius: String,
47
- disabled: Boolean,
48
- size: String,
49
- backgroundColor: String,
50
- hoveredBackgroundColor: String
51
- }
52
- const Wrapper = styled('div', wrapperAttrs)`
53
- position: relative;
54
- display: inline-flex;
55
- width: ${(props) => props.size};
56
- height: ${(props) => props.size};
57
- justify-content: center;
58
- align-items: center;
59
- cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
60
- background-color: ${(props) =>
61
- props.theme.colors[props.backgroundColor] || props.backgroundColor};
62
- border-radius: ${(props) => props.borderRadius};
63
- ${(props) =>
64
- props.isHovered
65
- ? 'background-color:' +
66
- props.theme.colors[props.hoveredBackgroundColor] ||
67
- props.hoveredBackgroundColor
68
- : ''};
69
- &:hover {
70
- background-color: ${(props) =>
71
- props.theme.colors[props.hoveredBackgroundColor] ||
72
- props.hoveredBackgroundColor};
73
- }
74
- `
75
- const caret = styled.div`
76
- position: absolute;
77
- bottom: 3px;
78
- right: 2px;
79
- height: 10px;
80
- `
11
+ >
12
+ <icon :disabled="disabled"
13
+ :size="iconSize"
14
+ :name="name"
15
+ :color="iconColor"
16
+ :hoveredColor="hoveredIconColor"
17
+ :isStriked="isStriked"
18
+ />
19
+
20
+ <caret v-if="hasCaret">
21
+ <iconWrapper :disabled="disabled"
22
+ size="10px"
23
+ name="arrow_down"
24
+ :iconColor="iconColor"
25
+ :hoveredBackgroundColor="hoveredIconColor"
26
+ borderRadius="1px"
27
+ />
28
+ </caret>
29
+ </Wrapper>
30
+ </template>
31
+
32
+ <script>
33
+ // import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
34
+ // How to use:
35
+ //<icon
36
+ // name="House" //required. a svg file named [name].svg should be present in /assets/svgIcons
37
+ // color="red"
38
+ // hoveredColor="blue"
39
+ // size="60px" by default, this is 30px
40
+ // />
41
+
42
+ import styled from 'vue-styled-components'
43
+ import icon from '../icon'
44
+ const wrapperAttrs = { color: String, isHovered:Boolean,borderRadius:String,disabled: Boolean, size: String,backgroundColor:String,hoveredBackgroundColor:String,hasBorder:Boolean }
45
+ const Wrapper = styled('div', wrapperAttrs)`
46
+ position:relative;
47
+ display: inline-flex;
48
+ width: ${(props) => props.size};
49
+ height: ${(props) => props.size};
50
+ border: ${(props) => props.hasBorder? 'solid 1px '+props.theme.colors[props.color] || props.color : ""};
51
+ justify-content:center;
52
+ align-items:center;
53
+ cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
54
+ background-color: ${(props)=>props.theme.colors[props.backgroundColor] || props.backgroundColor};
55
+ border-radius: ${(props) => props.borderRadius};
56
+ ${(props)=>(props.isHovered ? 'background-color:'+props.theme.colors[props.hoveredBackgroundColor] || props.hoveredBackgroundColor : "")};
57
+ &:hover{
58
+ background-color:${(props)=>props.theme.colors[props.hoveredBackgroundColor] || props.hoveredBackgroundColor};
59
+ }
60
+ `
61
+ const caret=styled.div`
62
+ position:absolute;
63
+ bottom:3px;
64
+ right:2px;
65
+ height:10px;
66
+ `
81
67
 
82
- export default {
83
- name: 'iconWrapper',
84
- components: {
85
- Wrapper,
86
- icon,
87
- caret
88
- },
89
- props: {
90
- disabled: {
91
- required: false,
92
- default: false
93
- },
94
- name: {
95
- required: true
96
- },
97
- iconColor: {
98
- required: false,
99
- default: 'white'
100
- },
101
- hoveredIconColor: {
102
- required: false
103
- },
104
- backgroundColor: {
105
- required: false
106
- },
107
- hoveredBackgroundColor: {
108
- required: false,
109
- default: 'transparentWhite1'
110
- },
111
- size: {
112
- required: false,
113
- default: '32px'
114
- },
115
- iconSize: {
116
- required: false,
117
- default: '18px'
118
- },
119
- hasCaret: {
120
- required: false,
121
- default: false
68
+ export default {
69
+ name: 'iconWrapper',
70
+ components: {
71
+ Wrapper,
72
+ icon,
73
+ caret
122
74
  },
123
- borderRadius: {
124
- required: false,
125
- default: '6px'
75
+ props: {
76
+ disabled: {
77
+ required: false,
78
+ default: false
79
+ },
80
+ name: {
81
+ required: true
82
+ },
83
+ iconColor: {
84
+ required: false,
85
+ default: 'white'
86
+ },
87
+ hoveredIconColor: {
88
+ required: false
89
+ },
90
+ backgroundColor: {
91
+ required: false,
92
+ },
93
+ hasBorder: {
94
+ required: false,
95
+ },
96
+ hoveredBackgroundColor: {
97
+ required: false,
98
+ default:"transparentWhite1"
99
+ },
100
+ size: {
101
+ required: false,
102
+ default: '32px'
103
+ },
104
+ iconSize:{
105
+ required: false,
106
+ default:'18px'
107
+ },
108
+ hasCaret:{
109
+ required: false,
110
+ default: false
111
+ },
112
+ borderRadius:{
113
+ required:false,
114
+ default:'4px'
115
+ },
116
+ isHovered:{
117
+ required:false,
118
+ default:false
119
+ },
120
+ isStriked:{
121
+ required:false,
122
+ default:false
123
+ }
126
124
  },
127
- isHovered: {
128
- required: false,
129
- default: false
125
+ data() {
126
+ return {}
130
127
  }
131
- },
132
- data() {
133
- return {}
134
128
  }
135
- }
136
- </script>
129
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <container :inputWidth="inputWidth">
2
+ <container>
3
3
  <input-wrapper>
4
4
  <input-container
5
5
  ref="inputElement"
@@ -9,7 +9,6 @@
9
9
  :disabled="disabled"
10
10
  :isDisabled="disabled"
11
11
  :inputWidth="inputWidth"
12
- :isFilter="isFilter"
13
12
  :hasFocus="hasFocus"
14
13
  />
15
14
  <img
@@ -29,24 +28,18 @@
29
28
  // :disabled="true"
30
29
  // inputWidth="250px"
31
30
  // @on-change="function($event)"
32
- // :isFilter="true" // to set the height at 30px
33
31
  // />
34
32
  import styled from 'vue-styled-components'
35
33
 
36
- const inputAttrs = {
37
- isDisabled: Boolean,
38
- inputWidth: String,
39
- isFilter: Boolean
40
- }
41
- const Container = styled('div', inputAttrs)`
42
- width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
34
+ const Container = styled.div`
35
+ width: 100%;
43
36
  position: relative;
44
37
  `
45
38
 
39
+ const inputAttrs = { isDisabled: Boolean, inputWidth: String }
46
40
  const InputContainer = styled('input', inputAttrs)`
47
- border: 1px solid ${(props) => props.theme.colors.grey4};
48
- padding: ${(props) =>
49
- props.isFilter ? '7px 30px 7px 10px' : '11px 30px 11px 10px'};
41
+ border: 1px solid ${(props) => props.theme.colors.mediumGray};
42
+ padding: 11px 30px 11px 10px;
50
43
  border-radius: 4px;
51
44
  font-size: 13px;
52
45
  color: ${(props) => props.theme.colors.black};
@@ -97,10 +90,6 @@ export default {
97
90
  required: false,
98
91
  default: null
99
92
  },
100
- isFilter: {
101
- required: false,
102
- default: false
103
- },
104
93
  hasFocus: {
105
94
  required: false,
106
95
  default: false
@@ -110,10 +99,10 @@ export default {
110
99
  onChangeHandler(event) {
111
100
  this.$emit('on-change', event)
112
101
  },
113
- focusInputElement() {
102
+ focusInputElement(){
114
103
  this.$nextTick(() => {
115
- this.$refs.inputElement.$el.focus()
116
- })
104
+ this.$refs.inputElement.$el.focus();
105
+ });
117
106
  }
118
107
  },
119
108
  watch: {
@@ -123,5 +112,6 @@ export default {
123
112
  }
124
113
  }
125
114
  }
115
+
126
116
  }
127
117
  </script>
@@ -32,6 +32,8 @@
32
32
  ref="select"
33
33
  @click="toggleDropdown"
34
34
  :selectHeight="selectHeight"
35
+ :height="height"
36
+ :selectMinHeight="selectMinHeight"
35
37
  :bgColor="
36
38
  buttonBgColor || colorMode == 'dark' ? 'transparentBlack1' : 'white'
37
39
  "
@@ -142,8 +144,7 @@ const Caret = styled.div`
142
144
  justify-content: center;
143
145
  width: 30px;
144
146
  min-width: 30px;
145
- height: 100%;
146
- align-items: stretch
147
+ padding-top: 3px;
147
148
  cursor: pointer;
148
149
  margin-left: auto;
149
150
  `
@@ -191,6 +192,8 @@ const selectButtonAttrs = {
191
192
  hasError: Boolean,
192
193
  disabled: Boolean,
193
194
  selectHeight: String,
195
+ height: String,
196
+ selectMinHeight: String,
194
197
  isSearchBarVisible: Boolean,
195
198
  showBorder: Boolean
196
199
  }
@@ -201,10 +204,11 @@ const selectButton = styled('div', selectButtonAttrs)`
201
204
  padding: ${(props) => (props.isSearchBarVisible ? '0' : '0px 0px 0 15px')};
202
205
  text-align: left;
203
206
  border-radius: 4px;
204
- min-height: 36px;
207
+ min-height: ${(props) => props.selectMinHeight};
205
208
  display: flex;
206
209
  align-items: center;
207
210
  max-height: ${(props) => props.selectHeight};
211
+ ${(props) => (props.height ? `height: ${props.height}` : '')};
208
212
  ${({ showBorder, theme, hasError }) =>
209
213
  showBorder &&
210
214
  `
@@ -251,9 +255,8 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
251
255
  props.theme.colors[props.fontColor]
252
256
  ? props.theme.colors[props.fontColor]
253
257
  : props.fontColor};
254
- max-height: 300px;
255
- min-height: 39px;
256
- overflow-y: auto;
258
+ max-height:300px;
259
+ overflow-y:auto;
257
260
  & [data-value="${(props) => props.selectedValue}"]{
258
261
  backdrop-filter: brightness(1.4);
259
262
  }
@@ -303,9 +306,18 @@ export default {
303
306
  default: null
304
307
  },
305
308
  selectHeight: {
309
+ type: String,
306
310
  required: false,
307
311
  default: null
308
312
  },
313
+ height: {
314
+ required: false,
315
+ default: null
316
+ },
317
+ selectMinHeight: {
318
+ required: false,
319
+ default: '36px'
320
+ },
309
321
  optionWidth: {
310
322
  required: false,
311
323
  default: null