toggle-components-library 1.33.0-beta.11 → 1.33.0-beta.13

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": "toggle-components-library",
3
- "version": "1.33.0-beta.11",
3
+ "version": "1.33.0-beta.13",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
 
3
- <div v-if="show" class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid, 'toggle-input-is-disabled':disabled}" v-on:click="focusClosestInput">
3
+ <div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid, 'toggle-input-is-disabled':disabled}" v-on:click="focusClosestInput">
4
4
  <label
5
5
  v-if="label"
6
6
  :for="name ? name : 'ToggleInputSelect' "
@@ -88,19 +88,11 @@ export default {
88
88
  type: Boolean,
89
89
  required: false,
90
90
  default: false
91
- },
92
- // in toggle-table context, if search bar height expand transition has finished
93
- applyFocus: {
94
- type: Boolean,
95
- required: false,
96
- default: null
97
91
  }
98
92
  },
99
93
 
100
94
  created : function(){
101
- if(this.applyFocus === null || this.applyFocus){
102
- this.show = true;
103
- }
95
+
104
96
  },
105
97
  computed: {
106
98
  inputVal: {
@@ -126,11 +118,6 @@ export default {
126
118
  options(options) {
127
119
  if (options.filter( option => option.value == this.inputVal).length == 0)
128
120
  this.inputVal = "";
129
- },
130
- applyFocus(new_value){
131
- if(new_value){
132
- this.show = true;
133
- }
134
121
  }
135
122
  }
136
123
  }
@@ -102,26 +102,12 @@ export default {
102
102
  type: Boolean,
103
103
  required: false,
104
104
  default: false
105
- },
106
- // in toggle-table context, if search bar height expand transition has finished
107
- applyFocus: {
108
- type: Boolean,
109
- required: false
110
105
  }
111
106
  },
112
107
 
113
108
  created : function()
114
109
  {
115
- if(this.applyFocus){
116
- this.$nextTick(() => this.$refs['input_ele'].focus());
117
- }
118
- },
119
- watch: {
120
- applyFocus(new_value){
121
- if(new_value){
122
- this.$nextTick(() => this.$refs['input_ele'].focus());
123
- }
124
- }
110
+ this.$nextTick(() => this.$refs['input_ele'].focus());
125
111
  },
126
112
  computed: {
127
113
  inputVal: {
@@ -20,28 +20,26 @@
20
20
  <span class="toggle-table-close-search" v-on:click.stop @click="closeSearch(field)"></span>
21
21
 
22
22
  <ToggleInputText
23
- v-if="field.type === 'text' && (searchModels[field.key] || editingInput === field.key)"
23
+ v-if="field.type === 'text' && (searchModels[field.key] || editingInput === field.key) && applyFocus"
24
24
  type="text"
25
25
  :ref="field.key+'-input'"
26
26
  v-model="searchModels[field.key]"
27
- @input="searchChange(field)"
27
+ @input="searchChange()"
28
28
  @bail="closeSearch(field)"
29
- :applyFocus="applyFocus"
30
29
  />
31
30
  <ToggleInputSelect
32
31
  style="margin-top:2px;"
33
32
  :size="'small'"
34
- v-if="field.type === 'select' && (searchModels[field.key] || editingInput === field.key)"
35
- :applyFocus="applyFocus"
33
+ v-if="field.type === 'select' && (searchModels[field.key] || editingInput === field.key) && applyFocus"
36
34
  :options="field.select_options"
37
35
  v-model="searchModels[field.key]"
38
- @input="val=>searchChange(val, field)"
36
+ @input="searchChange()"
39
37
  />
40
38
  <ToggleDateRangePicker
41
39
  v-if="field.type === 'date_range' && (searchModels[field.key].start || searchModels[field.key].end || editingInput === field.key)"
42
40
  name="date_range"
43
41
  v-model="searchModels[field.key]"
44
- @input="val=>searchChange(val, field)"
42
+ @input="searchChange()"
45
43
  />
46
44
  </div>
47
45
  </th>
@@ -227,7 +227,6 @@
227
227
  }
228
228
  }
229
229
 
230
-
231
230
  .calendar-icon-disabled {
232
231
  cursor: default;
233
232
  opacity: 0.5;
@@ -235,24 +234,28 @@
235
234
 
236
235
  .toggle-input-select-container {
237
236
  position:relative;
237
+ background-color: $toggle-dark-grey;
238
238
  border-radius:5px;
239
239
  overflow: auto;
240
240
  float: left;
241
241
  clear: both;
242
242
  width: 100%;
243
- &:after{
244
- content: '';
245
- width: 1.5rem;
246
- height: 1.5rem;
247
- background: transparent url("../assets/icons/arrow_down.svg") no-repeat 100% 50%;
248
- position: absolute;
249
- right: 1rem;
250
- top: 0.7rem;
251
- pointer-events: none;
243
+ container-type: inline-size;
244
+ @container (inline-size > 140px){
245
+ &:after{
246
+ content: '';
247
+ width: 1.5rem;
248
+ height: 1.5rem;
249
+ background: transparent url("../assets/icons/arrow_down.svg") no-repeat 100% 50%;
250
+ position: absolute;
251
+ z-index: 1;
252
+ right: 1rem;
253
+ top: 0.7rem;
254
+ pointer-events: none;
255
+ }
252
256
  }
253
257
  }
254
258
 
255
-
256
259
  .toggle-input-select{
257
260
 
258
261
  //padding : 0.5rem 2.5rem 0.5rem 1rem;