@itfin/components 1.2.11 → 1.2.14

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.2.11",
3
+ "version": "1.2.14",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -7,7 +7,8 @@
7
7
  </template>
8
8
  <strong class="me-auto" @click="collapsed = !collapsed">
9
9
  <slot name="title">
10
- {{ title }}
10
+ <span v-if="supportHtml" v-html="title"></span>
11
+ <span v-else>{{ title }}</span>
11
12
  </slot>
12
13
  </strong>
13
14
  <!-- <small>11 mins ago</small>-->
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <div class="itf-avatar">
3
- <svg role="none" :style="{ height: `${size}px`, width: `${size}px` }"
3
+ <div v-if="icon" class="feature-icon d-inline-flex align-items-center justify-content-center text-bg-primary bg-gradient fs-2">
4
+ <slot></slot>
5
+ </div>
6
+ <svg v-else role="none" :style="{ height: `${size}px`, width: `${size}px` }"
4
7
  xmlns="http://www.w3.org/2000/svg"
5
8
  xmlns:xlink="http://www.w3.org/1999/xlink">
6
9
  <mask :id="`itemphotomask${_uid}`">
@@ -15,7 +18,7 @@
15
18
  v-bind="{'xlink:href': src}"></image>
16
19
  <text v-else dominant-baseline="central"
17
20
  :x="halfSize" :y="halfSize" :font-size="size / 2"
18
- font-weight="bold" text-anchor="middle">{{ letters }}</text>
21
+ font-weight="bold" text-anchor="middle">{{ letters }}</text>
19
22
  <circle class="shadow" :cx="halfSize" :cy="halfSize" :r="halfSize"></circle>
20
23
  </g>
21
24
  </svg>
@@ -49,6 +52,18 @@
49
52
  border-radius: 50%;
50
53
  background-color: var(--positive);
51
54
  }
55
+
56
+ .feature-icon {
57
+ width: 3rem;
58
+ height: 3rem;
59
+ border-radius: 0.5rem;
60
+ overflow: hidden;
61
+
62
+ img {
63
+ max-width: 100%;
64
+ max-height: 100%;
65
+ }
66
+ }
52
67
  }
53
68
  </style>
54
69
  <script>
@@ -66,6 +81,8 @@ class itfAvatar extends Vue {
66
81
 
67
82
  @Prop({ type: Boolean }) statusBadge;
68
83
 
84
+ @Prop({ type: Boolean }) icon;
85
+
69
86
  isImageLoaded = false;
70
87
 
71
88
  mounted() {
@@ -33,7 +33,7 @@
33
33
  display: inline-block !important;
34
34
  }
35
35
 
36
- @media (prefers-color-scheme: notdark) {
36
+ [data-theme="dark"] & {
37
37
  .btn-outline-primary {
38
38
  &.active {
39
39
  color: $dark-body-bg;
@@ -99,7 +99,7 @@
99
99
  .form-control.focused, .form-control.focused input.form-control {
100
100
  background-color: $input-focus-border-color;
101
101
  }
102
- @media (prefers-color-scheme: notdark) {
102
+ [data-theme="dark"] & {
103
103
  &__dropdown {
104
104
  box-shadow: 0 0 0 2px $dark-input-focus-border;
105
105
  }
@@ -29,7 +29,7 @@
29
29
  .itf-datepicker-inline {
30
30
  display: inline-flex;
31
31
 
32
- @media (prefers-color-scheme: notdark) {
32
+ [data-theme="dark"] & {
33
33
  .btn-outline-primary {
34
34
  &.active {
35
35
  color: $dark-body-bg;
@@ -57,7 +57,7 @@
57
57
  box-shadow: $input-btn-focus-box-shadow;
58
58
  }
59
59
 
60
- @media (prefers-color-scheme: notdark) {
60
+ [data-theme="dark"] & {
61
61
  background-color: $dark-body-bg;
62
62
  border-color: $dark-border-color;
63
63
  box-shadow: 0 0 0 2px $dark-input-focus-border;
@@ -157,7 +157,7 @@
157
157
  box-shadow: $input-btn-focus-box-shadow;
158
158
  }
159
159
 
160
- @media (prefers-color-scheme: notdark) {
160
+ [data-theme="dark"] & {
161
161
  background-color: $dark-body-bg;
162
162
  border-color: $dark-border-color;
163
163
  box-shadow: 0 0 0 2px $dark-input-focus-border;
@@ -61,7 +61,7 @@
61
61
  left: 0;
62
62
  right: 0;
63
63
  bottom: 0;
64
- background-color: rgba(255, 255, 255);
64
+ background-color: rgb(255, 255, 255);
65
65
  transition: opacity .25s;
66
66
 
67
67
  @supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
@@ -71,6 +71,15 @@
71
71
  }
72
72
  }
73
73
  }
74
+ [data-theme="dark"] {
75
+ .itf-sensitive-overlay__cover {
76
+ background-color: rgb(46, 49, 54);
77
+
78
+ @supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
79
+ background-color: rgba(46, 49, 54, 0.5);
80
+ }
81
+ }
82
+ }
74
83
  </style>
75
84
  <script>
76
85
  import { Vue, Prop, Component } from 'vue-property-decorator';
@@ -1336,7 +1336,7 @@ html {
1336
1336
  }
1337
1337
  }
1338
1338
 
1339
- @media (prefers-color-scheme: notdark) {
1339
+ @media (prefers-color-scheme: dark) {
1340
1340
  html {
1341
1341
  content: "dark";
1342
1342
  }
@@ -26,7 +26,7 @@
26
26
  display: inline-block;
27
27
  }
28
28
 
29
- @media (prefers-color-scheme: notdark) {
29
+ [data-theme="dark"] {
30
30
  .itf-popover {
31
31
  .border-right {
32
32
  border-color: $dark-border-color;
@@ -245,6 +245,7 @@ class itfAirSelect extends Vue {
245
245
  </script>
246
246
 
247
247
  <style lang="scss" scoped>
248
+ @import '../../assets/scss/variables';
248
249
  .select {
249
250
  position: relative;
250
251
  border-radius: 4px;
@@ -325,6 +326,11 @@ class itfAirSelect extends Vue {
325
326
  margin-right: 2px;
326
327
  }
327
328
  }
329
+
330
+ [data-theme="dark"] .select.normal {
331
+ border-color: $dark-input-focus-border-color;
332
+ background: $dark-input-focus-border-color;
333
+ }
328
334
  .select.normal {
329
335
  width: 100%;
330
336
  padding-left: 0.5rem;
@@ -140,7 +140,6 @@ class itfDropdown extends Vue {
140
140
  const optionLabelToCreate = $active.getAttribute(
141
141
  'data-create-option-label',
142
142
  );
143
- console.info($active, optionValueToSelect);
144
143
  if (optionValueToSelect) {
145
144
  this.selectOptionValue(optionValueToSelect);
146
145
  } else if (optionLabelToCreate) {
@@ -218,6 +217,7 @@ class itfDropdown extends Vue {
218
217
  </script>
219
218
 
220
219
  <style scoped lang="scss">
220
+ @import '../../assets/scss/variables';
221
221
  .dropdown {
222
222
  z-index: 101;
223
223
  position: absolute;
@@ -230,6 +230,16 @@ class itfDropdown extends Vue {
230
230
  width: 100%;
231
231
  }
232
232
 
233
+ [data-theme="dark"] .dropdown {
234
+ background: $dark-input-focus-border-color;
235
+
236
+ .option {
237
+ &.select-option-is-active {
238
+ background: $dark-border-color;
239
+ }
240
+ }
241
+ }
242
+
233
243
  .dropdownInput {
234
244
  padding: 10px 14px 8px;
235
245
  width: 100%;
@@ -8,7 +8,7 @@ const LINKED_IN_REGEXP = /(http(s)?:\/\/)?([\w]+\.)?linkedin\.com\/(pub|in|profi
8
8
  const SPECIAL_CHARS_REGEXP = /^[\w_\-+~,/\\:'"().&*|[\]?# ]+$/i;
9
9
  const GREETINGS_REGEXP = /\b(dr|mr|mister|mrs|ms|miss|sir|hello|hi)\b/i;
10
10
  const PHONE_REGEXP = /(\+?\(?\+?[0-9]{1,3}\)?[-. ]+([0-9]{2,4})[-. ]?([0-9]{3,5}))|\+?[0-9]{7,}/gi;
11
- const DOUBLE_REGEXP = /^-?\d{0,11}(\.\d{0,2}){0,1}$/;
11
+ const DOUBLE_REGEXP = /^-?\d{0,11}(\.\d{0,4}){0,1}$/;
12
12
  const EMAIL_REGEXP = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/g;
13
13
  const EMAIL_LIST_REGEXP = /^(\w+((-\w+)|(\.\w+))*@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]{2,4}\s*?,?\s*?)+$/g;
14
14
  const HEX_REGEXP = /[0-9A-Fa-f]{6}/;