@itfin/components 1.2.5 → 1.2.8
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 +1 -1
- package/src/assets/scss/_dark-theme.scss +31 -33
- package/src/assets/scss/components/_search-input.scss +2 -2
- package/src/assets/scss/components/_selected.scss +2 -2
- package/src/assets/scss/directives/loading.scss +6 -8
- package/src/assets/scss/directives/tooltip.scss +4 -6
- package/src/assets/scss/main.scss +5 -7
- package/src/components/app/App.vue +1 -1
- package/src/components/button/Button.vue +32 -34
- package/src/components/datepicker/DatePicker.vue +2 -2
- package/src/components/datepicker/datepicker.scss +2 -2
- package/src/components/pdf-viewer/styles/_colors.scss +2 -2
- package/src/components/segmented-control/SegmentedControl.vue +3 -3
- package/src/components/select/Select.vue +23 -22
- package/src/components/table/Table.vue +8 -10
- package/src/components/tabs/Tab.vue +6 -2
- package/src/components/tabs/TabContent.vue +2 -1
package/package.json
CHANGED
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
color: $dark-body-color !important;
|
|
1
|
+
body[data-theme="dark"] {
|
|
2
|
+
background-color: $dark-body-bg !important;
|
|
3
|
+
color: $dark-body-color !important;
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
&:focus, &:active {
|
|
12
|
-
background-color: #3d3d3d;
|
|
13
|
-
border-color: #3d3d3d;
|
|
14
|
-
color: $dark-body-color;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
5
|
+
.form-control {
|
|
6
|
+
background-color: $dark-input-bg;
|
|
7
|
+
border-color: $dark-input-bg;
|
|
8
|
+
color: $dark-body-color;
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
.modal-content {
|
|
23
|
-
background-color: $dark-body-bg;
|
|
10
|
+
&:focus, &:active {
|
|
11
|
+
background-color: #3d3d3d;
|
|
12
|
+
border-color: #3d3d3d;
|
|
24
13
|
color: $dark-body-color;
|
|
25
14
|
}
|
|
26
|
-
|
|
27
|
-
border-color: $dark-input-bg;
|
|
28
|
-
color: $dark-body-color;
|
|
29
|
-
}
|
|
30
|
-
.btn {
|
|
31
|
-
color: $dark-body-color;
|
|
15
|
+
}
|
|
32
16
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
17
|
+
// Modals
|
|
18
|
+
.btn-close {
|
|
19
|
+
background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23eee'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat
|
|
20
|
+
}
|
|
21
|
+
.modal-content {
|
|
22
|
+
background-color: $dark-body-bg;
|
|
23
|
+
color: $dark-body-color;
|
|
24
|
+
}
|
|
25
|
+
.modal-header, .modal-footer {
|
|
26
|
+
border-color: $dark-input-bg;
|
|
27
|
+
color: $dark-body-color;
|
|
28
|
+
}
|
|
29
|
+
.btn {
|
|
30
|
+
color: $dark-body-color;
|
|
31
|
+
|
|
32
|
+
&:hover, &:active, &:focus {
|
|
33
|
+
color: $dark-body-color;
|
|
39
34
|
}
|
|
40
35
|
}
|
|
36
|
+
.modal-backdrop {
|
|
37
|
+
background-color: #000;
|
|
38
|
+
}
|
|
41
39
|
}
|
|
@@ -41,8 +41,8 @@ $font-size: 1em;
|
|
|
41
41
|
.vs__search::placeholder {
|
|
42
42
|
color: mix($body-color, $body-bg, 50%);
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
.
|
|
44
|
+
[data-theme="dark"] {
|
|
45
|
+
.vs__search::placeholder {
|
|
46
46
|
color: mix($dark-body-color, $dark-body-bg, 50%);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -9,14 +9,12 @@
|
|
|
9
9
|
--itf-loading-bg-color: rgba(255, 255, 255, .4);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
--itf-loading-bg-color: rgba($dark-body-bg, .75);
|
|
19
|
-
}
|
|
12
|
+
[data-theme="dark"] {
|
|
13
|
+
--itf-spinner-border-color: rgba(158, 158, 158, 0.29);
|
|
14
|
+
--itf-spinner-main-color: rgb(155, 155, 155);
|
|
15
|
+
--itf-spinner-white-border-color: rgba(97, 97, 97, 0.29);
|
|
16
|
+
--itf-spinner-white-main-color: rgb(100, 100, 100);
|
|
17
|
+
--itf-loading-bg-color: rgba($dark-body-bg, .75);
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
.itf-spinner {
|
|
@@ -9,12 +9,10 @@ $dark-tooltip-color: #7b52eb;
|
|
|
9
9
|
--itf-tooltip-bg-color: $tooltip-color;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--itf-tooltip-bg-color: $dark-tooltip-color;
|
|
17
|
-
}
|
|
12
|
+
[data-theme="dark"] {
|
|
13
|
+
--itf-tooltip-shadow: 0 0 20px 4px rgba(87, 78, 101, 0.15), 0 4px 80px -8px rgba(211, 208, 219, 0.25), 0 4px 4px -2px rgba(156, 150, 164, 0.15);
|
|
14
|
+
--itf-tooltip-color: $dark-body-color;
|
|
15
|
+
--itf-tooltip-bg-color: $dark-tooltip-color;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
.tippy-box[data-theme~=itfin] {
|
|
@@ -22,14 +22,12 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
color: $dark-btn-primary-color;
|
|
25
|
+
[data-theme="dark"] {
|
|
26
|
+
a {
|
|
27
|
+
color: $dark-btn-primary-color;
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
29
|
+
&:hover {
|
|
30
|
+
color: darken($dark-btn-primary-color, 10%);
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
33
|
}
|
|
@@ -5,44 +5,42 @@
|
|
|
5
5
|
--itf-button-basic-bg-color: rgba(9, 30, 66, 0.08);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
--itf-button-basic-bg-color: rgba(246, 225, 189, 0.08);
|
|
8
|
+
[data-theme="dark"] {
|
|
9
|
+
--itf-button-basic-bg-color: rgba(246, 225, 189, 0.08);
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
.itf-button.btn {
|
|
12
|
+
&.btn-secondary {
|
|
13
|
+
&, &.disabled {
|
|
14
|
+
background-color: $dark-btn-secondary-color;
|
|
15
|
+
border-color: $dark-btn-secondary-color;
|
|
16
|
+
}
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
&:active, &:focus {
|
|
19
|
+
background-color: lighten($dark-btn-secondary-color, 5%);
|
|
20
|
+
border-color: lighten($dark-btn-secondary-color, 5%);
|
|
21
|
+
}
|
|
22
|
+
&:hover {
|
|
23
|
+
background-color: lighten($dark-btn-secondary-color, 10%);
|
|
24
|
+
border-color: lighten($dark-btn-secondary-color, 10%);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
&.btn-primary {
|
|
28
|
+
&, &.disabled {
|
|
29
|
+
background-color: $dark-btn-primary-color;
|
|
30
|
+
border-color: $dark-btn-primary-color;
|
|
31
|
+
color: $body-color;
|
|
27
32
|
}
|
|
28
|
-
&.btn-primary {
|
|
29
|
-
&, &.disabled {
|
|
30
|
-
background-color: $dark-btn-primary-color;
|
|
31
|
-
border-color: $dark-btn-primary-color;
|
|
32
|
-
color: $body-color;
|
|
33
|
-
}
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
34
|
+
&:active, &:focus {
|
|
35
|
+
color: $body-color;
|
|
36
|
+
background-color: darken($dark-btn-primary-color, 5%);
|
|
37
|
+
border-color: darken($dark-btn-primary-color, 5%);
|
|
38
|
+
box-shadow: 0 0 0 0.125rem mix($dark-btn-primary-color, $dark-body-bg, 50%);
|
|
39
|
+
}
|
|
40
|
+
&:hover {
|
|
41
|
+
color: $body-color;
|
|
42
|
+
background-color: darken($dark-btn-primary-color, 10%);
|
|
43
|
+
border-color: darken($dark-btn-primary-color, 10%);
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
}
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
@import '../../assets/scss/directives/tooltip';
|
|
55
55
|
@import '../../assets/scss/input-addon';
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
.
|
|
57
|
+
[data-theme="dark"] {
|
|
58
|
+
.itf-datepicker {
|
|
59
59
|
&__dropdown {
|
|
60
60
|
background-color: $dark-body-bg;
|
|
61
61
|
border-color: $dark-border-color;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
.
|
|
5
|
+
[data-theme="dark"] {
|
|
6
|
+
.air-datepicker {
|
|
7
7
|
--adp-background-color: #{$dark-body-bg};
|
|
8
8
|
--adp-color-current-date: #{$dark-primary};
|
|
9
9
|
--adp-cell-background-color-selected: #{$dark-primary};
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
--pdf-button-hover-bg-color: #{mix($primary, $body-bg, 50%)};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
.
|
|
38
|
+
[data-theme="dark"] {
|
|
39
|
+
.pdf-app {
|
|
40
40
|
--pdf-app-background-color: #{$pdf-app-background-color-light};
|
|
41
41
|
--pdf-sidebar-content-color: #{$pdf-sidebar-content-color-light};
|
|
42
42
|
--pdf-toolbar-sidebar-color: #{$pdf-toolbar-sidebar-color-light};
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
@import '../../assets/scss/variables';
|
|
23
23
|
|
|
24
24
|
.itf-segmeneted-control {
|
|
25
|
-
--itf-segmeneted-control--
|
|
25
|
+
--itf-segmeneted-control--background: #{$input-bg};
|
|
26
26
|
--itf-segmeneted-control--border-radius: #{$border-radius};
|
|
27
27
|
--itf-segmeneted-control--shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
28
28
|
|
|
29
29
|
cursor: pointer;
|
|
30
|
-
background: var(--itf-segmeneted-control--
|
|
30
|
+
background: var(--itf-segmeneted-control--background);
|
|
31
31
|
border-radius: var(--itf-segmeneted-control--border-radius);
|
|
32
32
|
margin: 0;
|
|
33
33
|
padding: 2px;
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
}
|
|
131
131
|
&:checked + label::before,
|
|
132
132
|
&:checked + label::after {
|
|
133
|
-
background: var(--itf-segmeneted-control--
|
|
133
|
+
background: var(--itf-segmeneted-control--background);
|
|
134
134
|
z-index: 1;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -160,6 +160,29 @@
|
|
|
160
160
|
@import '../../assets/scss/components/search-input';
|
|
161
161
|
@import '../../assets/scss/components/spinner';
|
|
162
162
|
|
|
163
|
+
[data-theme="dark"] {
|
|
164
|
+
.itf-select {
|
|
165
|
+
&.vs--open .form-control {
|
|
166
|
+
box-shadow: 0 0 0 0.125rem $dark-input-focus-border;
|
|
167
|
+
border-color: $dark-input-focus-border-color;
|
|
168
|
+
background: $dark-input-focus-border-color;
|
|
169
|
+
}
|
|
170
|
+
&__dropdown-menu {
|
|
171
|
+
background-color: $dark-body-bg;
|
|
172
|
+
border-color: $dark-input-focus-border;
|
|
173
|
+
|
|
174
|
+
.dropdown-item {
|
|
175
|
+
color: $dark-body-color;
|
|
176
|
+
|
|
177
|
+
&.active, &:active {
|
|
178
|
+
background-color: $dark-primary;
|
|
179
|
+
color: $dark-body-bg;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
163
186
|
.itf-select {
|
|
164
187
|
cursor: pointer;
|
|
165
188
|
|
|
@@ -184,12 +207,6 @@
|
|
|
184
207
|
box-shadow: 0 0 0 0.125rem $input-focus-border;
|
|
185
208
|
border-color: $body-bg;
|
|
186
209
|
background: $body-bg;
|
|
187
|
-
|
|
188
|
-
@media (prefers-color-scheme: notdark) {
|
|
189
|
-
box-shadow: 0 0 0 0.125rem $dark-input-focus-border;
|
|
190
|
-
border-color: $dark-input-focus-border-color;
|
|
191
|
-
background: $dark-input-focus-border-color;
|
|
192
|
-
}
|
|
193
210
|
}
|
|
194
211
|
&__dropdown-menu {
|
|
195
212
|
background-color: $body-bg;
|
|
@@ -201,22 +218,6 @@
|
|
|
201
218
|
right: -2px;
|
|
202
219
|
width: auto;
|
|
203
220
|
box-shadow: rgb(9 30 66 / 25%) 0px 4px 8px -2px, rgb(9 30 66 / 31%) 0px 0px 1px;
|
|
204
|
-
|
|
205
|
-
@media (prefers-color-scheme: notdark) {
|
|
206
|
-
background-color: $dark-body-bg;
|
|
207
|
-
border-color: $dark-input-focus-border;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.dropdown-item {
|
|
211
|
-
@media (prefers-color-scheme: notdark) {
|
|
212
|
-
color: $dark-body-color;
|
|
213
|
-
|
|
214
|
-
&.active, &:active {
|
|
215
|
-
background-color: $dark-primary;
|
|
216
|
-
color: $dark-body-bg;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
221
|
}
|
|
221
222
|
}
|
|
222
223
|
</style>
|
|
@@ -84,16 +84,14 @@
|
|
|
84
84
|
--itf-table-sticky-shadow2: rgb(0 0 0 / 23%);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
--itf-table-sticky-shadow2: rgb(255 255 255 / 23%);
|
|
96
|
-
}
|
|
87
|
+
[data-theme="dark"] {
|
|
88
|
+
--itf-table-background-color: #{$dark-body-bg};
|
|
89
|
+
--itf-table-border-color: #666;
|
|
90
|
+
--itf-table-hover-color: #111;
|
|
91
|
+
--itf-table-strip-color: #222;
|
|
92
|
+
--itf-table-sorted-color: #444;
|
|
93
|
+
--itf-table-sticky-shadow1: rgb(255 255 255 / 16%);
|
|
94
|
+
--itf-table-sticky-shadow2: rgb(255 255 255 / 23%);
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
.itf-table {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a :href="href" class="itf-tab" :data-test="`itf-tab-${id || _uid}`" @click="setActive" :class="{ active }">
|
|
2
|
+
<a :href="href" class="itf-tab" :data-test="`itf-tab-${id || _uid}`" @click="setActive" :class="{ 'active': isActive }">
|
|
3
3
|
<span><slot /></span>
|
|
4
4
|
</a>
|
|
5
5
|
</template>
|
|
@@ -20,6 +20,7 @@ class itfTab extends Vue {
|
|
|
20
20
|
@Inject() tabsManager;
|
|
21
21
|
@Prop() id;
|
|
22
22
|
@Prop() to;
|
|
23
|
+
@Prop({ type: Boolean, default: undefined }) active;
|
|
23
24
|
|
|
24
25
|
get href() {
|
|
25
26
|
if (this.to) {
|
|
@@ -29,7 +30,10 @@ class itfTab extends Vue {
|
|
|
29
30
|
return 'javascript:;';
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
get
|
|
33
|
+
get isActive() {
|
|
34
|
+
if (this.active === true || this.active === false) {
|
|
35
|
+
return this.active;
|
|
36
|
+
}
|
|
33
37
|
if (this.to) {
|
|
34
38
|
const route = this.$router.resolve(this.to);
|
|
35
39
|
return this.$route.fullPath === (route && route.href);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="tabsManager && tabsManager.getValue() === id" :class="{ filled }" class="itf-tab-content" :data-test="`itf-tab-content-${id || _uid}`">
|
|
2
|
+
<div v-if="active || (tabsManager && tabsManager.getValue() === id)" :class="{ filled }" class="itf-tab-content" :data-test="`itf-tab-content-${id || _uid}`">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -20,5 +20,6 @@ class itfTabContent extends Vue {
|
|
|
20
20
|
@Inject({ default: null }) tabsManager;
|
|
21
21
|
@Prop() id;
|
|
22
22
|
@Prop(Boolean) filled;
|
|
23
|
+
@Prop(Boolean) active;
|
|
23
24
|
}
|
|
24
25
|
</script>
|