@itfin/components 2.0.34 → 2.0.36

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.34",
3
+ "version": "2.0.36",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -36,7 +36,6 @@
36
36
 
37
37
  .option {
38
38
  position: relative;
39
- cursor: pointer;
40
39
 
41
40
  &:hover input:not(:checked) + label span,
42
41
  &:active input:not(:checked) + label span,
@@ -76,6 +75,10 @@
76
75
  background: rgba(255, 255, 255, 0);
77
76
  color: rgba(0, 0, 0, 1);
78
77
 
78
+ &.disabled {
79
+ cursor: not-allowed;
80
+ color: rgba(0, 0, 0, .25);
81
+ }
79
82
  &::before,
80
83
  &::after {
81
84
  content: '';
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div class="itf-checkbox form-check" :class="{ 'form-switch': this.switch, 'itf-checkbox__large': large, 'itf-checkbox__medium': medium }">
4
4
  <input class="form-check-input" ref="input" :id="id" type="checkbox" name="checkbox" v-model="isChecked" :disabled="isDisabled" />
5
- <label :for="id" class="form-check-label">
5
+ <label :for="id" class="form-check-label w-100" :class="{ 'disabled': isDisabled }">
6
6
  <slot name="label">
7
7
  {{label}}
8
8
  <slot name="icon"></slot>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="itf-radio-box form-check card" :class="{ 'itf-radio__large': large, 'itf-radio__medium': medium, 'active': isChecked, 'right': right, 'left': !right }">
2
+ <div class="itf-radio-box form-check card" :class="{ 'disabled': disabled, 'itf-radio__large': large, 'itf-radio__medium': medium, 'active': isChecked, 'right': right, 'left': !right }">
3
3
  <input class="form-check-input" :id="id" type="radio" :name="radioName" v-model="isChecked" :value="true" :disabled="disabled" />
4
4
  <label :for="id" slot="label" class="form-check-label card-body">
5
5
 
@@ -16,7 +16,17 @@
16
16
  padding: 0;
17
17
  margin-bottom: .5rem;
18
18
  position: relative;
19
- cursor: pointer;
19
+ &:not(.disabled) {
20
+ cursor: pointer;
21
+
22
+ .form-check-label {
23
+ cursor: pointer;
24
+ }
25
+ }
26
+
27
+ .form-check-label {
28
+ cursor: not-allowed;
29
+ }
20
30
 
21
31
  &.left {
22
32
  padding: 0 0 0 2.5rem;
@@ -38,13 +48,9 @@
38
48
  &.active {
39
49
  background-color: rgba(var(--bs-primary-rgb),.1) !important;
40
50
  }
41
- &:hover {
51
+ &:hover:not(.disabled) {
42
52
  background-color: rgba(0,0,0,.05);
43
53
  }
44
-
45
- .form-check-label {
46
- cursor: pointer;
47
- }
48
54
  }
49
55
  </style>
50
56
  <script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <itf-button icon small @click.stop="copy">
2
+ <itf-button :icon="icon" :small="small" @click.stop="copy" :disabled="disabled">
3
3
  <slot>
4
4
  <itf-icon name="clipboard_copy" />
5
5
  </slot>
@@ -18,6 +18,9 @@ export default @Component({
18
18
  })
19
19
  class CopyToClipboard extends Vue {
20
20
  @Prop(String) value;
21
+ @Prop({ type: Boolean, default: true }) small;
22
+ @Prop({ type: Boolean, default: true }) icon;
23
+ @Prop({ type: Boolean, default: false }) disabled;
21
24
 
22
25
  async copy () {
23
26
  const showSuccess = this.$showSuccess;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="itf-filter-panel d-flex flex-column gap-3 align-items-start">
2
+ <div class="itf-filter-panel d-flex flex-column align-items-start" :class="{'gap-3': !filtersOnly}">
3
3
  <div v-if="!filtersOnly" class="d-flex gap-2 justify-content-between w-100">
4
4
  <slot name="search">
5
5
  <div>
@@ -0,0 +1,4 @@
1
+ <template><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.6936 5.43799C14.8771 5.29535 15.1419 5.29656 15.3254 5.45362C15.5088 5.61084 15.5505 5.87237 15.4377 6.07569L15.3801 6.15869L8.95137 13.6587C8.85689 13.7689 8.71861 13.8328 8.57344 13.8335C8.42843 13.834 8.2899 13.7718 8.19453 13.6626L4.62324 9.57178L4.56465 9.48877C4.45006 9.28652 4.48917 9.02459 4.67109 8.86573C4.85306 8.70687 5.11798 8.70339 5.30293 8.84424L5.37715 8.91358L8.56758 12.5689L14.6203 5.5083L14.6936 5.43799Z" fill="currentColor"/>
3
+ </svg>
4
+ </template>
@@ -0,0 +1,4 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9 8.41421L9 15.5858C9 16.4767 10.0771 16.9229 10.7071 16.2929L14.2929 12.7071C14.6834 12.3166 14.6834 11.6834 14.2929 11.2929L10.7071 7.70711C10.0771 7.07714 9 7.52331 9 8.41421Z" fill="currentColor"/>
3
+ </svg>
4
+ </template>
@@ -0,0 +1,7 @@
1
+ <template><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path style="transform: translate(-9px, 9px)" d="M19 10V5.3C19 5.13431 18.8657 5 18.7 5H14" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path style="transform: translate(9px, -9px)" d="M5 14V18.7C5 18.8657 5.13431 19 5.3 19H10" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M5.5 18.5L9.5 14.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M14.5 9.5L18.5 5.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
7
+ </template>
@@ -0,0 +1,4 @@
1
+ <template><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M5.83325 10H14.1666" stroke="#7A818E" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
4
+ </template>