@webitel/ui-sdk 2.1.22 → 2.1.24

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": "@webitel/ui-sdk",
3
- "version": "2.1.22",
3
+ "version": "2.1.24",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -34,6 +34,7 @@ import WtLabel from './molecules/wt-label/wt-label.vue';
34
34
  import WtButtonSelect from './molecules/wt-button-select/wt-button-select.vue';
35
35
  import WtHint from './molecules/wt-hint/wt-hint.vue';
36
36
  import WtCopyAction from './molecules/wt-copy-action/wt-copy-action.vue';
37
+ import WtLoadBar from './molecules/wt-load-bar/wt-load-bar.vue';
37
38
 
38
39
  import WtAppHeader from './organisms/wt-app-header/wt-app-header.vue';
39
40
  import WtAppNavigator from './organisms/wt-app-header/wt-app-navigator.vue';
@@ -103,6 +104,7 @@ const Components = {
103
104
  WtButtonSelect,
104
105
  WtContextMenu,
105
106
  WtCopyAction,
107
+ WtLoadBar,
106
108
  };
107
109
 
108
110
  Object.keys(Components).forEach((name) => {
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtLoadBar from '../wt-load-bar.vue';
3
+
4
+ describe('WtLoadBar', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtLoadBar);
7
+ expect(wrapper.exists()).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <div class="wt-load-bar">
3
+ <span :style="`width: ${this.progressWidth}%;`" class="wt-load-bar__progress"></span>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'wt-load-bar',
10
+ props: {
11
+ max: {
12
+ type: [Number, String],
13
+ default: 100,
14
+ },
15
+ value: {
16
+ type: [Number, String],
17
+ default: 0,
18
+ },
19
+ },
20
+ computed: {
21
+ progress() {
22
+ return (this.value * 100) / this.max;
23
+ },
24
+ progressWidth() {
25
+ return this.isOverflow ? 100 : this.progress;
26
+ },
27
+ },
28
+ };
29
+ </script>
30
+
31
+ <style lang="scss" scoped>
32
+ .wt-load-bar {
33
+ position: relative;
34
+ box-sizing: border-box;
35
+ width: 100%;
36
+ padding: var(--load-bar-padding);
37
+ line-height: 0;
38
+ border: 1px solid var(--accent-color);
39
+ border-radius: var(--border-radius);
40
+ }
41
+
42
+ .wt-load-bar__progress {
43
+ display: inline-block;
44
+ height: var(--load-bar-height);
45
+ transition: var(--transition);
46
+ border-radius: var(--load-bar-border-radius);
47
+ background: var(--accent-color);
48
+ will-change: width;
49
+ }
50
+ </style>
@@ -13,11 +13,11 @@ export default {
13
13
  name: 'wt-progress-bar',
14
14
  props: {
15
15
  max: {
16
- type: Number,
16
+ type: [Number, String],
17
17
  default: 100,
18
18
  },
19
19
  value: {
20
- type: Number,
20
+ type: [Number, String],
21
21
  default: 0,
22
22
  },
23
23
  color: {
@@ -30,6 +30,7 @@
30
30
  @import "molecules/wt-textarea/variables";
31
31
  @import "molecules/wt-timepicker/variables";
32
32
  @import "molecules/wt-button-select/variables";
33
+ @import "molecules/wt-load-bar/variables";
33
34
 
34
35
  @import "organisms/wt-headline/variables";
35
36
  @import "organisms/wt-headline-nav/variables";
@@ -0,0 +1,6 @@
1
+
2
+ :root {
3
+ --load-bar-height: 6px;
4
+ --load-bar-padding: 1px;
5
+ --load-bar-border-radius: 50px;
6
+ }
@@ -83,6 +83,9 @@
83
83
  --job-color: hsla(var(--_job-color), var(--_opacity--default));
84
84
  --job--hover-color: hsla(var(--_job-color), var(--_opacity--hover));
85
85
 
86
+ --link-color: hsla(205, 90%, 45%, 1);
87
+ --link--hover-color: hsla(205, 90%, 60%, 1);
88
+
86
89
  // SUBORDINATE COLORS
87
90
  --tag-bg-color: var(--accent-secondary-color);
88
91
 
@@ -66,6 +66,7 @@ export default {
66
66
  keys: 'Key | Keys',
67
67
  duration: 'Duration',
68
68
  reset: 'Reset',
69
+ errors: 'Error | Errors',
69
70
  },
70
71
  // date-related texts
71
72
  date: {
@@ -64,6 +64,7 @@ export default {
64
64
  keys: 'Ключ | Ключи',
65
65
  duration: 'Длительность',
66
66
  reset: 'Сбросить',
67
+ errors: 'Ошибка | Ошибки',
67
68
  },
68
69
  // date-related texts
69
70
  date: {
@@ -64,6 +64,7 @@ export default {
64
64
  values: 'Значення | Значення',
65
65
  keys: 'Ключ | Ключі',
66
66
  duration: 'Тривалість',
67
+ errors: 'Помилка | Помилки',
67
68
  },
68
69
  // date-related texts
69
70
  date: {