@eturnity/eturnity_reusable_components 1.2.41-3d-master.0 → 1.2.41-3d-master.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.41-3d-master.0",
3
+ "version": "1.2.41-3d-master.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -1,9 +1,7 @@
1
1
  <template>
2
2
  <ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
3
3
  <page-container>
4
- <br />
5
-
6
- <modal v-if="true" backdrop="dark" :isLoading="false" :isOpen="true">
4
+ <!-- <modal v-if="true" backdrop="dark" :isLoading="false" :isOpen="true"> -->
7
5
  <div :style="{ padding: '50px' }">
8
6
  <input-number
9
7
  :value="value"
@@ -45,6 +43,28 @@
45
43
  :disabled="false"
46
44
  />
47
45
 
46
+ <Select
47
+ :value="value"
48
+ selectWidth="100%"
49
+ optionWidth="50%"
50
+ label="that is a label"
51
+ alignItems="vertical"
52
+ colorMode="dark"
53
+ @input-change="value = $event"
54
+ @search-change="searchValue = $event"
55
+ >
56
+ <template #selector="{ selectedValue }">
57
+ value selected: {{ selectedValue }}
58
+ </template>
59
+ <template #dropdown>
60
+ <Option
61
+ v-for="opt in filteredOptionList"
62
+ :key="opt.id"
63
+ :value="opt.val"
64
+ >{{ opt.lookFor }}</Option
65
+ >
66
+ </template>
67
+ </Select>
48
68
  <Select
49
69
  :value="value"
50
70
  selectWidth="100%"
@@ -69,8 +89,8 @@
69
89
  </Select>
70
90
  {{ filteredOptionList }}
71
91
  </div>
72
- </modal>
73
- <iconCollection />
92
+ <!-- </modal> -->
93
+ <!-- <iconCollection /> -->
74
94
  </page-container>
75
95
  </ThemeProvider>
76
96
  </template>
@@ -83,8 +103,8 @@ import InputNumber from '@/components/inputs/inputNumber'
83
103
  import Select from '@/components/inputs/select'
84
104
  import SwitchField from '@/components/inputs/switchField'
85
105
  import Option from '@/components/inputs/select/option'
86
- import Modal from '@/components/modals/modal'
87
- import iconCollection from '@/components/icon/iconCollection'
106
+ // import Modal from '@/components/modals/modal'
107
+ // import iconCollection from '@/components/icon/iconCollection'
88
108
  // import TableDropdown from "@/components/tableDropdown"
89
109
 
90
110
  const PageContainer = styled.div`
@@ -103,11 +123,11 @@ export default {
103
123
  ThemeProvider,
104
124
  PageContainer,
105
125
  InputNumber,
106
- Modal,
126
+ // Modal,
107
127
  Option,
108
128
  Select,
109
129
  SwitchField,
110
- iconCollection
130
+ // iconCollection
111
131
  },
112
132
  data() {
113
133
  return {
@@ -279,6 +279,9 @@ const InputWrapper = styled('div', inputAttrs)`
279
279
  mounted(){
280
280
  this.selectedValue=this.value
281
281
  },
282
+ beforeDestroy(){
283
+ document.removeEventListener('click', this.clickOutside)
284
+ },
282
285
  methods:{
283
286
  focus(){
284
287
  this.isActive=true
@@ -286,11 +289,11 @@ const InputWrapper = styled('div', inputAttrs)`
286
289
  blur(){
287
290
  this.isActive=false
288
291
  },
289
- toggleDropdown(e){
292
+ toggleDropdown(){
290
293
  if(this.isSearchBarVisible){return}
291
294
  this.isDropdownOpen=!this.isDropdownOpen
292
295
  if (this.isDropdownOpen) {
293
- setTimeout(()=>document.addEventListener('click', this.clickOutside),10)
296
+ document.addEventListener('click', this.clickOutside)
294
297
  } else {
295
298
  document.removeEventListener('click', this.clickOutside)
296
299
  }
@@ -299,7 +302,7 @@ const InputWrapper = styled('div', inputAttrs)`
299
302
  openDropdown(){
300
303
  this.focus()
301
304
  this.isDropdownOpen=true
302
- setTimeout(()=>document.addEventListener('click', this.clickOutside),10)
305
+ document.addEventListener('click', this.clickOutside)
303
306
  },
304
307
  closeDropdown(){
305
308
  this.blur()