@itfin/components 2.0.14 → 2.0.16

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": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -151,6 +151,10 @@
151
151
  &.active, &:hover, &.show {
152
152
  border: 1px solid #1A4A974D;
153
153
  color: #1A4A97;
154
+
155
+ .itf-icon {
156
+ color: #1A4A97;
157
+ }
154
158
  }
155
159
  }
156
160
  }
@@ -91,8 +91,8 @@ body .form-check-input:checked[type=checkbox] {
91
91
  body .form-check-input:indeterminate[type=checkbox] {
92
92
  box-shadow: 0px 2px 3px 0px #00000026;
93
93
  }
94
- .text-muted {
95
- color: #666770;
94
+ body .text-muted {
95
+ color: #7A818E !important;
96
96
  }
97
97
  body .form-control {
98
98
  &:focus {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <itf-dropdown text ref="dropdown" autoclose="outside" shadow class="h-100">
2
+ <itf-dropdown text ref="dropdown" autoclose="outside" shadow class="h-100" append-to-context>
3
3
  <template #button>
4
4
  <div class="filter-pill rounded" :class="{'filter-not-default-pill': !isDefault && !isInvalid, 'filter-invalid-pill': isInvalid}">
5
5
  <div class="filter-pill__label" :class="{'filter-pill__not-default-value': !isDefault && !isInvalid, 'filter-pill__default-value': isDefault, 'filter-pill__label-invalid': isInvalid}">
@@ -24,7 +24,7 @@
24
24
  <slot name="after-filter-btn"></slot>
25
25
  </div>
26
26
  </div>
27
- <div v-if="showFilters" class="d-flex gap-2 flex-nowrap">
27
+ <div v-if="showFilters" class="d-flex gap-2 flex-nowrap filters-row">
28
28
  <filter-badge
29
29
  v-for="(facet, n) in visibleFilters"
30
30
  :key="n"
@@ -61,6 +61,15 @@
61
61
  color: #8E97A5;
62
62
  }
63
63
  }
64
+
65
+ .filters-row {
66
+ @media (max-width: 768px) {
67
+ overflow: auto;
68
+ width: 100%;
69
+ padding: 2px;
70
+ margin: -2px;
71
+ }
72
+ }
64
73
  }
65
74
  </style>
66
75
  <script>
@@ -15,8 +15,8 @@
15
15
  <div slot="content" class="modal-content rounded-3 shadow itf-append-context">
16
16
  <div class="modal-body p-4 text-center">
17
17
  <slot>
18
- <h5 class="mb-0">{{$t('components.popover.confirmDelete')}}</h5>
19
- <p class="mb-0">{{$t('components.popover.areYouSureToDeleteThis')}}</p>
18
+ <h5 class="mb-0">{{ title }}</h5>
19
+ <p class="mb-0">{{ message }}</p>
20
20
  </slot>
21
21
  </div>
22
22
  <div class="modal-footer flex-nowrap p-0">
@@ -26,7 +26,7 @@
26
26
  data-bs-dismiss="modal"
27
27
  @click="$emit('cancel')"
28
28
  >
29
- <span v-html="$t('components.popover.noKeepIt')"></span>
29
+ <span v-html="cancelCaption"></span>
30
30
  </button>
31
31
  <button
32
32
  type="button"
@@ -34,7 +34,7 @@
34
34
  :class="confirmClass"
35
35
  @click="onConfirm"
36
36
  >
37
- <span v-html="$t('components.popover.yesDelete')"></span>
37
+ <span v-html="deleteCaption"></span>
38
38
  </button>
39
39
  </div>
40
40
  </div>
@@ -59,8 +59,10 @@ class itfDeleteConfirmModal extends Vue {
59
59
  @Prop(Boolean) loading;
60
60
  @Prop({ type: Boolean, default: false }) disabled;
61
61
  @Prop({ type: String, default: 'text-danger' }) confirmClass;
62
- @Prop({ type: String, default () { return this.$t('noKeepIt'); } }) cancelCaption;
63
- @Prop({ type: String, default () { return this.$t('yesDelete'); } }) deleteCaption;
62
+ @Prop({ type: String, default () { return this.$t('components.popover.noKeepIt'); } }) cancelCaption;
63
+ @Prop({ type: String, default () { return this.$t('components.popover.yesDelete'); } }) deleteCaption;
64
+ @Prop({ type: String, default () { return this.$t('components.popover.confirmDelete'); } }) title;
65
+ @Prop({ type: String, default () { return this.$t('components.popover.areYouSureToDeleteThis'); } }) message;
64
66
 
65
67
  isModalShown = false;
66
68
 
@@ -12,12 +12,12 @@
12
12
  </div>
13
13
  <div v-if="!nocard" v-show="!collapsed" class="b-panel-header px-3 pt-3 pb-2">
14
14
  <slot name="header">
15
- <div class="d-flex gap-3 align-items-center">
15
+ <div class="d-flex gap-3 align-items-center text-truncate">
16
16
  <itf-button v-if="closeable" icon default class="d-md-none" @click="closePanel">
17
17
  <itf-icon name="chevron_left" />
18
18
  </itf-button>
19
19
  <slot name="title">
20
- <div class="b-panel__title fw-bold mb-0 h2" v-text="title"></div>
20
+ <div class="b-panel__title fw-bold mb-0 h2 text-truncate" v-text="title"></div>
21
21
  </slot>
22
22
  </div>
23
23
  <div class="d-flex gap-1">
@@ -4,14 +4,14 @@
4
4
  <span v-if="!isUndefined" ref="slider" class="selection" :class="{'elevation-1': !disabled}"></span>
5
5
 
6
6
  <div class="option" v-for="(item, n) in itemsWithNames" :key="n">
7
- <label>
7
+ <label v-tooltip="tooltipCallback(item)" :key="n">
8
8
  <slot name="itemMarkup" :item="item" />
9
9
  <input
10
10
  ref="input"
11
11
  type="radio"
12
12
  :name="name"
13
13
  :value="n"
14
- v-tooltip="tooltipCallback(item)"
14
+ :disabled="disabled"
15
15
  :checked="isChecked(item)"
16
16
  @change="onItemChanged(item)" />
17
17
  <span>
@@ -24,6 +24,7 @@
24
24
  <itf-select
25
25
  :value="value"
26
26
  @input="$emit('input', $event)"
27
+ :disabled="disabled"
27
28
  :options="itemsWithNames"
28
29
  :reduce="(item) => item[itemKey]"
29
30
  :get-option-label="(item) => item[itemText]"
@@ -127,6 +128,9 @@ class itfSegmentedControl extends Vue {
127
128
  }
128
129
 
129
130
  onItemChanged (item) {
131
+ if (this.disabled) {
132
+ return;
133
+ }
130
134
  this.$emit('input', this.returnObject ? item : item[this.itemKey]);
131
135
  }
132
136
  }
@@ -103,10 +103,19 @@ body[data-theme="dark"] {
103
103
  padding-left: 5px;
104
104
  display: flex;
105
105
  align-items: center;
106
+
107
+ @media (max-width: 768px) {
108
+ position: relative;
109
+ opacity: 1;
110
+ }
106
111
  }
107
112
  .on-hover {
108
113
  opacity: 0;
109
114
  pointer-events: none;
115
+
116
+ @media (max-width: 768px) {
117
+ opacity: 1;
118
+ }
110
119
  }
111
120
  .table-row-template:hover .on-hover {
112
121
  opacity: 1;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="itf-money-field ph-no-capture" :class="{'currency-arrow': !currencyDisabled, 'currency-select': currencySelect}">
3
- <div :class="{'input-group h-100': noCurrencySign}" :style="`--itf-money-field-padding-left: ${noCurrencySign ? 1 : selectedCurrencySymbol.length * 0.6 + 1}rem`">
3
+ <div class="h-100" :class="{'input-group h-100': noCurrencySign}" :style="`--itf-money-field-padding-left: ${noCurrencySign ? 1 : selectedCurrencySymbol.length * 0.6 + 1}rem`">
4
4
  <span class="itf-money-field__prepend" v-if="!noCurrencySign">{{ selectedCurrencySymbol }}</span>
5
5
  <i-mask-component
6
6
  ref="input"
@@ -1,4 +0,0 @@
1
- <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.4 5V8C11.4 8.88366 12.1163 9.6 13 9.6H16V15.7372L15.8527 15.5899C15.2279 14.9651 14.2148 14.9651 13.59 15.5899C12.9651 16.2148 12.9651 17.2278 13.59 17.8527L14.7373 19H7C6.44772 19 6 18.5523 6 18V6C6 5.44772 6.44772 5 7 5H11.4ZM12.6 5.6V8C12.6 8.22091 12.7791 8.4 13 8.4H15.4L12.6 5.6ZM18.1456 20.1456C18.0881 20.2031 18.0218 20.2465 17.951 20.2758C17.8803 20.3051 17.8027 20.3213 17.7213 20.3213C17.6401 20.323 17.4416 20.2901 17.2971 20.1456L14.2971 17.1456C14.0627 16.9113 14.0627 16.5314 14.2971 16.297C14.5314 16.0627 14.9113 16.0627 15.1456 16.297L17.1213 18.2728V13.7213C17.1213 13.3899 17.39 13.1213 17.7213 13.1213C18.0527 13.1213 18.3213 13.3899 18.3213 13.7213V18.2728L20.2971 16.297C20.5314 16.0627 20.9113 16.0627 21.1456 16.297C21.3799 16.5314 21.3799 16.9113 21.1456 17.1456L18.1456 20.1456Z" fill="currentColor"/>
3
- </svg>
4
- </template>
@@ -1,4 +0,0 @@
1
- <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12 4.3999C13.9882 4.3999 15.6 6.01168 15.6 7.9999V10.0489C16.033 10.1018 16.3329 10.2114 16.5607 10.4392C17 10.8786 17 11.5857 17 12.9999V14.9999C17 16.4141 17 17.1212 16.5607 17.5606C16.1213 17.9999 15.4142 17.9999 14 17.9999H10C8.58579 17.9999 7.87868 17.9999 7.43934 17.5606C7 17.1212 7 16.4141 7 14.9999V12.9999C7 11.5857 7 10.8786 7.43934 10.4392C7.66715 10.2114 7.96695 10.1018 8.4 10.0489L8.4 7.9999C8.4 6.01168 10.0118 4.3999 12 4.3999ZM14.4 7.9999V10.0003C14.2733 9.99991 14.1401 9.99991 14 9.99991H10C9.85987 9.99991 9.72668 9.99991 9.6 10.0003L9.6 7.9999C9.6 6.67442 10.6745 5.5999 12 5.5999C13.3255 5.5999 14.4 6.67442 14.4 7.9999ZM12.6 12.9999C12.6 12.6685 12.3314 12.3999 12 12.3999C11.6686 12.3999 11.4 12.6685 11.4 12.9999V14.9999C11.4 15.3313 11.6686 15.5999 12 15.5999C12.3314 15.5999 12.6 15.3313 12.6 14.9999V12.9999Z" fill="currentColor"/>
3
- </svg>
4
- </template>