@itfin/components 1.3.14 → 1.3.15

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": "@itfin/components",
3
- "version": "1.3.14",
3
+ "version": "1.3.15",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1037,21 +1037,12 @@ $rangeThumbSize: 12px;
1037
1037
  }
1038
1038
  &__dropdown {
1039
1039
  width: max-content;
1040
- border: $input-border-width solid $input-border-color;
1041
1040
  border-radius: $input-border-radius;
1042
1041
  background-color: $body-bg;
1043
1042
  overflow: hidden;
1044
- @if $enable-shadows {
1045
- @include box-shadow($input-box-shadow, $input-btn-focus-box-shadow);
1046
- } @else {
1047
- // Avoid using mixin so we can pass custom focus shadow properly
1048
- box-shadow: $input-btn-focus-box-shadow;
1049
- }
1050
1043
 
1051
1044
  [data-theme="dark"] & {
1052
1045
  background-color: $dark-body-bg;
1053
- border-color: $dark-border-color;
1054
- box-shadow: 0 0 0 2px $dark-input-focus-border;
1055
1046
  }
1056
1047
  }
1057
1048
  }
@@ -6,28 +6,31 @@
6
6
  </slot>
7
7
  </div>
8
8
  <input
9
- ref="input"
10
- readonly
11
- :disabled="disabled"
12
- class="form-control text-capitalize"
13
- :class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
14
- @focus="onFocus"
15
- @blur="onBlur"
16
- :value="displayValue"
17
- :placeholder="placeholder"
9
+ ref="input"
10
+ readonly
11
+ :disabled="disabled"
12
+ class="form-control text-capitalize"
13
+ :class="{ 'is-invalid': isInvalid(), 'is-valid': isSuccess() }"
14
+ @focus="onFocus"
15
+ @blur="onBlur"
16
+ :value="displayValue"
17
+ :placeholder="placeholder"
18
18
  />
19
19
  <div style="display: none">
20
- <div ref="dropdown" class="itf-monthpicker__dropdown">
21
- <itf-date-picker-inline
22
- :value="value"
23
- start-view="months"
24
- min-view="months"
25
- :min-date="minDate"
26
- only-calendar
27
- :display-format="displayFormat"
28
- :value-format="valueFormat"
29
- @input="selectInlineDate"
30
- ></itf-date-picker-inline>
20
+ <div ref="dropdown" class="itf-monthpicker__dropdown border rounded">
21
+ <div>
22
+ <itf-date-picker-inline
23
+ :value="value"
24
+ start-view="months"
25
+ min-view="months"
26
+ :min-date="minDate"
27
+ only-calendar
28
+ :display-format="displayFormat"
29
+ :value-format="valueFormat"
30
+ @input="selectInlineDate"
31
+ />
32
+ </div>
33
+ <slot name="after-calendar" />
31
34
  </div>
32
35
  </div>
33
36
  </div>
@@ -50,6 +53,7 @@ class itfMonthPicker extends Vue {
50
53
  @Inject({ default: null }) itemLabel;
51
54
 
52
55
  @Prop({ type: String }) value;
56
+ @Prop({ type: String }) customValue;
53
57
  @Prop({ type: Boolean }) disabled;
54
58
  @Prop({ type: String, default: 'ISO' }) valueFormat;
55
59
  @Prop({ type: [String, Date], default: '' }) minDate;
@@ -98,6 +102,9 @@ class itfMonthPicker extends Vue {
98
102
  }
99
103
 
100
104
  get displayValue() {
105
+ if (this.customValue) {
106
+ return this.customValue;
107
+ }
101
108
  if (!this.valueAsLuxon) {
102
109
  return '';
103
110
  }
@@ -131,9 +138,13 @@ class itfMonthPicker extends Vue {
131
138
  this.focused = false;
132
139
  }
133
140
 
141
+ hide() {
142
+ this.tooltip.hide();
143
+ }
144
+
134
145
  selectInlineDate(date) {
135
146
  this.$emit('input', date);
136
- this.tooltip.hide();
147
+ this.hide();
137
148
  }
138
149
  }
139
150
  </script>