@itfin/components 2.0.65 → 2.0.67

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.65",
3
+ "version": "2.0.67",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -74,17 +74,17 @@
74
74
  &.btn-squircle:focus:after {
75
75
  border-color: rgb(103, 146, 244);
76
76
  }
77
- &:not(.dropdown-toggle):focus:after {
78
- border: 3px solid #6792f4;
79
- border-radius: .5rem;
80
- content: '';
81
- position: absolute;
82
- top: -3px;
83
- left: -3px;
84
- right: -3px;
85
- bottom: -3px;
86
- outline: none;
87
- }
77
+ // &:not(.dropdown-toggle):focus:after {
78
+ // border: 3px solid #6792f4;
79
+ // border-radius: .5rem;
80
+ // content: '';
81
+ // position: absolute;
82
+ // top: -3px;
83
+ // left: -3px;
84
+ // right: -3px;
85
+ // bottom: -3px;
86
+ // outline: none;
87
+ // }
88
88
  &.itf-button__block {
89
89
  display: block;
90
90
  width: 100%;
@@ -141,21 +141,39 @@
141
141
  }
142
142
 
143
143
  &.btn-default {
144
- border: 1px solid #0000001A;
145
- color: #222;
144
+ --bs-btn-color: #22222B;
145
+ --bs-btn-border-color: #e5e5e5;
146
+ --bs-btn-hover-color: var(--bs-btn-color);
147
+ --bs-btn-hover-border-color: var(--bs-btn-border-color);
148
+ --bs-btn-active-color: var(--bs-btn-color);
149
+ --bs-btn-active-border-color: var(--bs-btn-border-color);
150
+ --bs-btn-disabled-color: var(--bs-btn-color);
151
+ --bs-btn-disabled-bg: transparent;
152
+ --bs-btn-disabled-border-color: var(--bs-btn-border-color);
146
153
 
147
154
  .itf-icon {
148
- color: #8E97A5;
155
+ color: var(--bs-btn-color);
149
156
  }
150
157
 
151
- &.active, &:hover, &.show {
152
- border: 1px solid #1A4A974D;
153
- color: #1A4A97;
154
-
158
+ &:hover {
159
+ background-color: var(--bs-btn-border-color);
160
+ .itf-icon {
161
+ color: var(--bs-btn-hover-color);
162
+ }
163
+ }
164
+ &:active, &:focus {
165
+ background-color: color-mix(in srgb, black 5%, var(--bs-btn-border-color));
155
166
  .itf-icon {
156
- color: #1A4A97;
167
+ color: var(--bs-btn-active-color);
157
168
  }
158
169
  }
170
+
171
+ &.btn-white {
172
+ --bs-btn-color: #ffffff;
173
+ --bs-btn-border-color: rgba(255, 255, 255, 0.5);
174
+ --bs-btn-hover-color: #22222b;
175
+ --bs-btn-active-color: #22222b;
176
+ }
159
177
  }
160
178
 
161
179
  &.btn-secondary {
@@ -215,30 +233,4 @@
215
233
  border-color: color-mix(in srgb, black 20%, var(--bs-btn-bg));
216
234
  }
217
235
  }
218
-
219
- &.btn-outline-secondary {
220
- --bs-btn-color: #22222B;
221
- --bs-btn-border-color: #e5e5e5;
222
- --bs-btn-hover-color: var(--bs-btn-color);
223
- --bs-btn-hover-border-color: var(--bs-btn-border-color);
224
- --bs-btn-active-color: var(--bs-btn-color);
225
- --bs-btn-active-border-color: var(--bs-btn-border-color);
226
- --bs-btn-disabled-color: var(--bs-btn-color);
227
- --bs-btn-disabled-bg: transparent;
228
- --bs-btn-disabled-border-color: var(--bs-btn-border-color);
229
-
230
- &:hover {
231
- background-color: var(--bs-btn-border-color);
232
- }
233
- &:active, &:focus {
234
- background-color: color-mix(in srgb, black 5%, var(--bs-btn-border-color));
235
- }
236
-
237
- &.btn-outline-secondary--light {
238
- --bs-btn-color: #ffffff;
239
- --bs-btn-border-color: rgba(255, 255, 255, 0.5);
240
- --bs-btn-hover-color: #22222b;
241
- --bs-btn-active-color: #22222b;
242
- }
243
- }
244
236
  }
@@ -1,7 +1,7 @@
1
1
  @import '../variables';
2
2
 
3
3
  .itf-segmeneted-control {
4
- --itf-segmeneted-control--background: #{$input-bg};
4
+ --itf-segmeneted-control--background: #f5f6f8;
5
5
  --itf-segmeneted-control--border-radius: #{$border-radius};
6
6
  // --itf-segmeneted-control--shadow: 0 1px 3px rgba(0,0,0,0.1);
7
7
  --itf-segmeneted-control--shadow: none;
@@ -12,7 +12,7 @@
12
12
  background: var(--itf-segmeneted-control--background);
13
13
  border-radius: var(--itf-segmeneted-control--border-radius);
14
14
  margin: 0;
15
- padding: 3px;
15
+ padding: 4px;
16
16
  border: none;
17
17
  outline: none;
18
18
  display: inline-grid;
@@ -149,11 +149,11 @@
149
149
  }
150
150
  }
151
151
  .selection {
152
- background: rgba(255, 255, 255, 1);
153
- border: .5px solid rgba(0, 0, 0, 0.04);
152
+ background: var(--itf-segmeneted-control--selection-bg);
153
+ // border: .5px solid rgba(0, 0, 0, 0.04);
154
154
  box-shadow: var(--itf-segmeneted-control--shadow);
155
155
  /*box-shadow: 0 3px 8px 0 rgba(0,0,0,0.12), 0 3px 1px 0 rgba(0,0,0,0.04);*/
156
- border-radius: calc(var(--itf-segmeneted-control--border-radius) - 2px);
156
+ border-radius: var(--itf-segmeneted-control--border-radius);
157
157
  grid-column: 1;
158
158
  grid-row: 1;
159
159
  //z-index: 2;
@@ -12,8 +12,6 @@ class itfButton extends Vue {
12
12
  @Prop(Boolean) primary;
13
13
  @Prop(Boolean) default;
14
14
  @Prop(Boolean) secondary;
15
- @Prop(Boolean) secondaryOutline;
16
- @Prop(Boolean) secondaryOutlineLight;
17
15
  @Prop(Boolean) loading;
18
16
  @Prop(Boolean) small;
19
17
  @Prop(Boolean) large;
@@ -30,7 +28,7 @@ class itfButton extends Vue {
30
28
 
31
29
  render (createElement, { data, slots, children, props }) {
32
30
  const {
33
- to, href, target, disabled, color, block, loading, labeled, secondary, primary, secondaryOutline, secondaryOutlineLight, small, large, icon, loadingText, squircle, default: defaultStyle,
31
+ to, href, target, disabled, color, block, loading, labeled, secondary, primary, small, large, icon, loadingText, squircle, default: defaultStyle,
34
32
  class: classNames
35
33
  } = props;
36
34
  const component = to ? 'nuxt-link' : (props.href ? 'a' : 'button');
@@ -50,8 +48,6 @@ class itfButton extends Vue {
50
48
  'btn-default': defaultStyle,
51
49
  'btn-basic': !primary && !secondary && !color && !defaultStyle,
52
50
  'btn-secondary': secondary,
53
- 'btn-outline-secondary': secondaryOutline,
54
- 'btn-outline-secondary btn-outline-secondary--light': secondaryOutlineLight,
55
51
  // 'btn-squircle': squircle,
56
52
  'btn-sm': small,
57
53
  'btn-lg': large,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="itf-filter-panel d-flex flex-column align-items-start" :class="{'gap-3': !filtersOnly}">
2
+ <div class="itf-filter-panel d-flex flex-column align-items-start" :class="{'gap-3': !filtersOnly, 'd-none': !visible}">
3
3
  <div v-if="!filtersOnly" class="d-flex gap-2 justify-content-between w-100">
4
4
  <slot name="search">
5
5
  <div>
@@ -143,6 +143,7 @@ class FilterPanel extends Vue {
143
143
  @Prop({ type: Boolean, default: true }) showFilter;
144
144
  @Prop({ type: Boolean, default: false }) filtersOnly;
145
145
  @Prop(Boolean) mini;
146
+ @Prop({ type: Boolean, default: true }) visible;
146
147
  @Prop({ type: String, default: function() { return this.$t('components.filter.search'); } }) searchPlaceholder;
147
148
 
148
149
  filter = {};
@@ -4,6 +4,8 @@
4
4
  <itf-filter-panel
5
5
  :search-placeholder="searchPlaceholder"
6
6
  search
7
+ :visible="!noFilters"
8
+ :filters-only="filtersOnly"
7
9
  ref="filters"
8
10
  :mini="panel.isMultiple()"
9
11
  class="py-2 px-3"
@@ -121,6 +123,8 @@ class itfView extends Vue {
121
123
  @ModelSync('value', 'input') selectedIds;
122
124
 
123
125
  @Prop({ type: Boolean }) loading;
126
+ @Prop({ type: Boolean }) filtersOnly;
127
+ @Prop({ type: Boolean }) noFilters;
124
128
  @Prop({ type: Array }) filters;
125
129
  @Prop({ type: Object, required: true }) schema;
126
130
  // @Prop({ default: 20 }) size;
@@ -134,6 +138,7 @@ class itfView extends Vue {
134
138
  @Prop({ type: String, default: 'checkbox' }) indicatorType;
135
139
  @Prop({ type: String, default () { return this.$t('components.table.search'); } }) searchPlaceholder;
136
140
  @Prop() panel;
141
+ @Prop() hardFilter; // встановлює жорсткий фільтр, наприклад, треба завжди показувати лише по контрагенту
137
142
  @Prop(Boolean) showActions;
138
143
 
139
144
  page = 1;
@@ -177,7 +182,7 @@ class itfView extends Vue {
177
182
  const res = await this.$axios.$get(this.endpoint, {
178
183
  preventRaceCondition: true,
179
184
  params: {
180
- ...this.filter,
185
+ ...Object.assign(this.filter ?? {}, this.hardFilter ?? {}),
181
186
  page: this.page,
182
187
  size: this.size,
183
188
  sort: this.sorting