@webitel/ui-sdk 0.9.65 → 1.0.2
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/CHANGELOG.md +42 -0
- package/dist/fonts/Montserrat-Black.27e3649b.ttf +0 -0
- package/dist/fonts/Montserrat-BlackItalic.d9b6ba59.ttf +0 -0
- package/dist/fonts/Montserrat-Bold.ade91f47.ttf +0 -0
- package/dist/fonts/Montserrat-BoldItalic.1b384149.ttf +0 -0
- package/dist/fonts/Montserrat-ExtraBold.19ba7aa5.ttf +0 -0
- package/dist/fonts/Montserrat-ExtraBoldItalic.52a50ca0.ttf +0 -0
- package/dist/fonts/Montserrat-ExtraLight.570a244c.ttf +0 -0
- package/dist/fonts/Montserrat-ExtraLightItalic.1170df55.ttf +0 -0
- package/dist/fonts/Montserrat-Italic.a7063e0c.ttf +0 -0
- package/dist/fonts/Montserrat-Light.409c7f79.ttf +0 -0
- package/dist/fonts/Montserrat-LightItalic.01c4560c.ttf +0 -0
- package/dist/fonts/Montserrat-Medium.c8b6e083.ttf +0 -0
- package/dist/fonts/Montserrat-MediumItalic.40a74702.ttf +0 -0
- package/dist/fonts/Montserrat-SemiBoldItalic.83c1ec1f.ttf +0 -0
- package/dist/fonts/Montserrat-Thin.43dd5b7a.ttf +0 -0
- package/dist/fonts/Montserrat-ThinItalic.3c2b290f.ttf +0 -0
- package/dist/ui-sdk.common.js +948 -929
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +948 -929
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +2 -2
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +5 -5
- package/src/components/atoms/wt-button/wt-button.vue +187 -150
- package/src/components/atoms/wt-chip/__tests__/WtChip.spec.js +19 -0
- package/src/components/atoms/wt-chip/wt-chip.vue +23 -0
- package/src/components/atoms/wt-context-menu/wt-context-menu.vue +1 -1
- package/src/components/atoms/wt-icon/wt-icon.vue +4 -0
- package/src/components/atoms/wt-indicator/wt-indicator.vue +39 -6
- package/src/components/atoms/wt-input-info/wt-input-info.vue +1 -1
- package/src/components/atoms/wt-loader/_internals/wt-loader--sm.vue +34 -153
- package/src/components/atoms/wt-loader/wt-loader.vue +2 -4
- package/src/components/atoms/wt-rounded-action/__tests__/WtRoundedAction.spec.js +0 -11
- package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +27 -179
- package/src/components/atoms/wt-tooltip/wt-tooltip.vue +2 -2
- package/src/components/index.js +2 -2
- package/src/components/molecules/wt-button-select/wt-button-select.vue +2 -1
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +59 -62
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +2 -7
- package/src/components/molecules/wt-input/wt-input.vue +4 -25
- package/src/components/molecules/wt-label/wt-label.vue +5 -2
- package/src/components/molecules/wt-notification/wt-notification.vue +3 -2
- package/src/components/molecules/wt-popup/__tests__/WtPopup.spec.js +1 -1
- package/src/components/molecules/wt-popup/wt-popup.vue +26 -28
- package/src/components/molecules/wt-progress-bar/wt-progress-bar.vue +3 -4
- package/src/components/molecules/wt-radio/wt-radio.vue +0 -2
- package/src/components/molecules/wt-search-bar/wt-search-bar.vue +4 -20
- package/src/components/molecules/wt-select/wt-select.vue +26 -28
- package/src/components/molecules/wt-tabs/wt-tabs.vue +6 -18
- package/src/components/molecules/wt-tags-input/wt-tags-input.vue +31 -25
- package/src/components/molecules/wt-textarea/wt-textarea.vue +6 -17
- package/src/components/molecules/wt-time-input/wt-time-input.vue +1 -3
- package/src/components/molecules/wt-timepicker/wt-timepicker.vue +0 -3
- package/src/components/organisms/wt-app-header/wt-app-header.vue +1 -0
- package/src/components/organisms/wt-app-header/wt-app-navigator.vue +32 -33
- package/src/components/organisms/wt-app-header/wt-header-actions.vue +145 -144
- package/src/components/organisms/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +3 -3
- package/src/components/organisms/wt-headline/wt-headline.vue +1 -2
- package/src/components/organisms/wt-navigation-bar/wt-navigation-bar.vue +8 -11
- package/src/components/organisms/wt-page-wrapper/wt-page-wrapper.vue +6 -14
- package/src/components/organisms/wt-pagination/wt-pagination.vue +5 -5
- package/src/components/organisms/wt-player/wt-player.vue +1 -1
- package/src/components/organisms/wt-status-select/wt-status-select.vue +24 -4
- package/src/components/organisms/wt-table/wt-table.vue +15 -12
- package/src/components/organisms/wt-table-actions/wt-table-actions.vue +2 -4
- package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +1 -1
- package/src/css/components/_components.scss +1 -1
- package/src/css/components/atoms/wt-button/_variables.scss +22 -24
- package/src/css/components/atoms/wt-chip/_variables.scss +7 -0
- package/src/css/components/atoms/{wt-badge/wt-badge.scss → wt-chip/wt-chip.scss} +12 -7
- package/src/css/components/atoms/wt-context-menu/_variables.scss +1 -1
- package/src/css/components/atoms/wt-indicator/_variables.scss +6 -2
- package/src/css/components/atoms/wt-label/_variables.scss +0 -1
- package/src/css/components/atoms/wt-rounded-action/_variables.scss +3 -26
- package/src/css/components/atoms/wt-tooltip/_variables.scss +7 -5
- package/src/css/components/molecules/wt-button-select/_variables.scss +5 -8
- package/src/css/components/molecules/wt-checkbox/_variables.scss +1 -1
- package/src/css/components/molecules/wt-datepicker/_variables.scss +15 -14
- package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +20 -31
- package/src/css/components/molecules/wt-datetimepicker/_variables.scss +5 -5
- package/src/css/components/molecules/wt-input/_variables.scss +3 -3
- package/src/css/components/molecules/wt-notification/_variables.scss +4 -4
- package/src/css/components/molecules/wt-popup/_variables.scss +16 -8
- package/src/css/components/molecules/wt-progress-bar/_variables.scss +3 -3
- package/src/css/components/molecules/wt-radio/_variables.scss +1 -1
- package/src/css/components/molecules/wt-search-bar/_variables.scss +5 -1
- package/src/css/components/molecules/wt-select/_variables.scss +49 -13
- package/src/css/components/molecules/wt-switcher/_variables.scss +1 -1
- package/src/css/components/molecules/wt-tabs/_variables.scss +2 -2
- package/src/css/components/molecules/wt-tags-input/_variables.scss +4 -5
- package/src/css/components/molecules/wt-textarea/_variables.scss +9 -1
- package/src/css/components/molecules/wt-timepicker/_variables.scss +1 -1
- package/src/css/components/organisms/wt-app-header/_variables.scss +13 -9
- package/src/css/components/organisms/wt-headline/_variables.scss +3 -4
- package/src/css/components/organisms/wt-navigation-bar/_variables.scss +10 -10
- package/src/css/components/organisms/wt-notifications-bar/_variables.scss +2 -2
- package/src/css/components/organisms/wt-page-wrapper/_variables.scss +3 -3
- package/src/css/components/organisms/wt-pagination/_variables.scss +1 -3
- package/src/css/components/organisms/wt-player/_variables.scss +2 -2
- package/src/css/components/organisms/wt-status-select/_variables.scss +3 -3
- package/src/css/components/organisms/wt-table/_variables.scss +9 -9
- package/src/css/components/organisms/wt-table-actions/_variables.scss +2 -1
- package/src/css/main.scss +7 -5
- package/src/css/styleguide/_styleguide.scss +8 -3
- package/src/css/styleguide/border-radius/_border-radius.scss +4 -0
- package/src/css/{colors → styleguide/colors}/_colors.scss +5 -7
- package/src/css/{display-helpers → styleguide/display-helpers}/_display-helpers.scss +2 -0
- package/src/css/styleguide/elevations/_elevations.scss +13 -0
- package/src/css/styleguide/fonts/_fonts.scss +126 -0
- package/src/css/styleguide/placeholder/_placeholder.scss +49 -0
- package/src/css/styleguide/spacings/_spacings.scss +15 -0
- package/src/css/styleguide/transitions/_transitions.scss +1 -0
- package/src/css/{transitions → styleguide/transitions}/fade/_fade.scss +0 -0
- package/src/css/styleguide/typography/_typography.scss +102 -0
- package/src/css/{sizes → styleguide/viewport-breakpoints}/_viewport-breakpoints.scss +0 -0
- package/src/locale/en/en.js +28 -3
- package/src/locale/ru/ru.js +26 -1
- package/src/locale/ua/ua.js +26 -1
- package/src/components/atoms/wt-badge/__tests__/WtBadge.spec.js +0 -19
- package/src/components/atoms/wt-badge/wt-badge.vue +0 -23
- package/src/css/components/atoms/wt-badge/_variables.scss +0 -7
- package/src/css/fonts/_fonts.scss +0 -9
- package/src/css/shadows/_shadows.scss +0 -7
- package/src/css/sizes/_sizes.scss +0 -2
- package/src/css/sizes/_spacing.scss +0 -33
- package/src/css/transitions/_transitions.scss +0 -1
- package/src/css/typography/_typography.scss +0 -72
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve-lib": "vue-cli-service serve",
|
|
7
|
-
"build": "vue-cli-service build",
|
|
7
|
+
"build": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
|
|
8
|
+
"build:app": "vue-cli-service build",
|
|
8
9
|
"test:unit": "vue-cli-service test:unit",
|
|
9
10
|
"lint": "vue-cli-service lint --fix",
|
|
10
|
-
"
|
|
11
|
-
"build-publish-lib": "npm run test:unit && npm run build-lib && npm publish --access public"
|
|
11
|
+
"publish": "npm run test:unit && npm run build && npm publish --access public"
|
|
12
12
|
},
|
|
13
13
|
"main": "./dist/@webitel/ui-sdk.common.js",
|
|
14
14
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"vue-observe-visibility": "^1.0.0",
|
|
42
42
|
"vue-router": "^3.2.0",
|
|
43
43
|
"vuejs-datepicker": "^1.6.2",
|
|
44
|
-
"webitel-sdk": "^0.1.
|
|
44
|
+
"webitel-sdk": "^0.1.91"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/jest-dom": "^5.11.4",
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
class="wt-button"
|
|
4
4
|
:class="[
|
|
5
5
|
colorClass,
|
|
6
|
+
`wt-button--size-${size}`,
|
|
6
7
|
{
|
|
7
8
|
'wt-button--outline': outline,
|
|
8
9
|
'wt-button--wide': wide,
|
|
9
|
-
'wt-button--
|
|
10
|
+
'wt-button--rounded': rounded,
|
|
10
11
|
'wt-button--disabled': disabled,
|
|
11
12
|
}
|
|
12
13
|
]"
|
|
@@ -14,198 +15,234 @@
|
|
|
14
15
|
:disabled="disabled"
|
|
15
16
|
@click="$emit('click', $event)"
|
|
16
17
|
>
|
|
17
|
-
<wt-loader
|
|
18
|
+
<wt-loader
|
|
19
|
+
v-if="loading"
|
|
20
|
+
size="sm"
|
|
21
|
+
:color="loaderColor"
|
|
22
|
+
></wt-loader>
|
|
18
23
|
<slot v-else></slot>
|
|
19
24
|
</button>
|
|
20
25
|
</template>
|
|
21
26
|
|
|
22
27
|
<script>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
disabled: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
outline: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false,
|
|
37
|
-
},
|
|
38
|
-
loading: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
large: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false,
|
|
45
|
-
},
|
|
46
|
-
wide: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
28
|
+
export default {
|
|
29
|
+
name: 'wt-button',
|
|
30
|
+
props: {
|
|
31
|
+
color: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'accent',
|
|
34
|
+
options: ['accent', 'secondary', 'success', 'danger', 'transfer'],
|
|
50
35
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return '';
|
|
55
|
-
},
|
|
56
|
-
loaderColor() {
|
|
57
|
-
if (['success', 'transfer', 'danger'].includes(this.color)) return 'main';
|
|
58
|
-
return 'contrast';
|
|
59
|
-
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
60
39
|
},
|
|
61
|
-
|
|
40
|
+
outline: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
loading: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'md',
|
|
51
|
+
options: ['sm', 'md'],
|
|
52
|
+
},
|
|
53
|
+
wide: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
rounded: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
computed: {
|
|
63
|
+
colorClass() {
|
|
64
|
+
if (!this.disabled) return `${this.color}`;
|
|
65
|
+
return '';
|
|
66
|
+
},
|
|
67
|
+
loaderColor() {
|
|
68
|
+
if (['success', 'transfer', 'danger'].includes(this.color)) return 'main';
|
|
69
|
+
return 'contrast';
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
62
73
|
</script>
|
|
63
74
|
|
|
64
75
|
<style lang="scss" scoped>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
.wt-button {
|
|
77
|
+
@extend %typo-button;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
position: relative;
|
|
80
|
+
display: inline-block;
|
|
81
|
+
min-width: var(--btn-min-width);
|
|
82
|
+
padding: var(--btn-padding);
|
|
83
|
+
color: var(--btn-dark-font-color);
|
|
84
|
+
background-color: var(--btn-accent-color);
|
|
85
|
+
background-clip: padding-box;
|
|
86
|
+
border-radius: var(--border-radius);
|
|
87
|
+
transition: var(--transition);
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
|
|
90
|
+
&--wide {
|
|
91
|
+
width: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&--rounded {
|
|
95
|
+
border-radius: var(--border-radius--pill);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--size {
|
|
99
|
+
&-sm {
|
|
100
|
+
padding: var(--btn-padding--size-sm);
|
|
80
101
|
}
|
|
81
102
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
padding: var(--btn-lg-padding); // 16px 30px - border
|
|
103
|
+
&-md {
|
|
104
|
+
padding: var(--btn-padding--size-md);
|
|
85
105
|
}
|
|
106
|
+
}
|
|
86
107
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
108
|
+
&:hover,
|
|
109
|
+
&:active {
|
|
110
|
+
background-color: var(--btn-accent--hover-color);
|
|
111
|
+
border-color: var(--btn-accent--hover-color);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.secondary {
|
|
115
|
+
color: var(--btn-dark-font-color);
|
|
116
|
+
border-color: var(--btn-secondary-color);
|
|
117
|
+
background-color: var(--btn-secondary-color);
|
|
118
|
+
|
|
119
|
+
&:hover,
|
|
120
|
+
&:active {
|
|
121
|
+
color: var(--btn-dark-font-color);
|
|
122
|
+
border-color: var(--btn-secondary--hover-color);
|
|
123
|
+
background-color: var(--btn-secondary--hover-color);
|
|
93
124
|
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.success {
|
|
128
|
+
color: var(--btn-light-font-color);
|
|
129
|
+
background-color: var(--btn-true-color);
|
|
130
|
+
border-color: var(--btn-true-color);
|
|
94
131
|
|
|
95
132
|
&:hover,
|
|
96
133
|
&:active {
|
|
97
|
-
background: var(--btn-
|
|
98
|
-
border-color: var(--btn-
|
|
134
|
+
background-color: var(--btn-true--hover-color);
|
|
135
|
+
border-color: var(--btn-true--hover-color);
|
|
99
136
|
}
|
|
137
|
+
}
|
|
100
138
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
background: var(--btn-secondary-color);
|
|
106
|
-
|
|
107
|
-
&:hover,
|
|
108
|
-
&:active {
|
|
109
|
-
color: var(--btn-dark-font-color);
|
|
110
|
-
border-color: var(--btn-secondary--hover-color);
|
|
111
|
-
background: var(--btn-secondary-color);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
139
|
+
&.transfer {
|
|
140
|
+
color: var(--btn-light-font-color);
|
|
141
|
+
background-color: var(--btn-transfer-color);
|
|
142
|
+
border-color: var(--btn-transfer-color);
|
|
114
143
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
144
|
+
&:hover,
|
|
145
|
+
&:active {
|
|
146
|
+
background-color: var(--btn-transfer--hover-color);
|
|
147
|
+
border-color: var(--btn-transfer--hover-color);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
119
150
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
}
|
|
151
|
+
&.danger {
|
|
152
|
+
color: var(--btn-light-font-color);
|
|
153
|
+
background-color: var(--btn-false-color);
|
|
154
|
+
border-color: var(--btn-false-color);
|
|
126
155
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
156
|
+
&:hover,
|
|
157
|
+
&:active {
|
|
158
|
+
background-color: var(--btn-false--hover-color);
|
|
159
|
+
border-color: var(--btn-false--hover-color);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
131
162
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
163
|
+
&.wt-button--outline {
|
|
164
|
+
border: var(--btn-border);
|
|
165
|
+
padding: var(--btn-padding--outline);
|
|
166
|
+
background-color: transparent;
|
|
167
|
+
color: var(--btn-accent-color);
|
|
168
|
+
border-color: var(--btn-accent-color);
|
|
169
|
+
|
|
170
|
+
&.wt-button--size {
|
|
171
|
+
&-sm {
|
|
172
|
+
padding: var(--btn-padding--size-sm--outline);
|
|
137
173
|
}
|
|
138
174
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
background: var(--btn-false-color);
|
|
142
|
-
border-color: var(--btn-false-color);
|
|
143
|
-
|
|
144
|
-
&:hover,
|
|
145
|
-
&:active {
|
|
146
|
-
background: var(--btn-false--hover-color);
|
|
147
|
-
border-color: var(--btn-false--hover-color);
|
|
148
|
-
}
|
|
175
|
+
&-md {
|
|
176
|
+
padding: var(--btn-padding--size-md--outline);
|
|
149
177
|
}
|
|
150
178
|
}
|
|
151
179
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
180
|
+
&:hover,
|
|
181
|
+
&:active {
|
|
182
|
+
color: var(--btn-accent--hover-color);
|
|
183
|
+
border-color: var(--btn-accent--hover-color);
|
|
184
|
+
background-color: transparent;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&.secondary {
|
|
188
|
+
color: var(--btn-dark-font-color);
|
|
189
|
+
border-color: var(--btn-secondary-color);
|
|
158
190
|
|
|
159
191
|
&:hover,
|
|
160
192
|
&:active {
|
|
161
|
-
color: var(--btn-
|
|
162
|
-
|
|
163
|
-
background: transparent;
|
|
193
|
+
border-color: var(--btn-secondary--hover-color);
|
|
194
|
+
background-color: transparent;
|
|
164
195
|
}
|
|
196
|
+
}
|
|
165
197
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
198
|
+
&.success {
|
|
199
|
+
color: var(--btn-true-color);
|
|
200
|
+
border-color: var(--btn-true-color);
|
|
169
201
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
202
|
+
&:hover,
|
|
203
|
+
&:active {
|
|
204
|
+
color: var(--btn-true--hover-color);
|
|
205
|
+
border-color: var(--btn-true--hover-color);
|
|
206
|
+
background-color: transparent;
|
|
175
207
|
}
|
|
208
|
+
}
|
|
176
209
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
210
|
+
&.transfer {
|
|
211
|
+
color: var(--btn-transfer-color);
|
|
212
|
+
border-color: var(--btn-transfer-color);
|
|
180
213
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
214
|
+
&:hover,
|
|
215
|
+
&:active {
|
|
216
|
+
color: var(--btn-transfer--hover-color);
|
|
217
|
+
border-color: var(--btn-transfer--hover-color);
|
|
218
|
+
background-color: transparent;
|
|
186
219
|
}
|
|
220
|
+
}
|
|
187
221
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
222
|
+
&.danger {
|
|
223
|
+
color: var(--btn-false-color);
|
|
224
|
+
border-color: var(--btn-false-color);
|
|
191
225
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
226
|
+
&:hover,
|
|
227
|
+
&:active {
|
|
228
|
+
color: var(--btn-false--hover-color);
|
|
229
|
+
border-color: var(--btn-false--hover-color);
|
|
230
|
+
background-color: transparent;
|
|
197
231
|
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
198
234
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
235
|
+
&.wt-button--disabled {
|
|
236
|
+
color: var(--btn-disabled-font-color);
|
|
237
|
+
background-color: var(--btn-disabled-color);
|
|
238
|
+
border-color: var(--btn-disabled-color);
|
|
239
|
+
cursor: auto;
|
|
240
|
+
pointer-events: none;
|
|
241
|
+
box-shadow: none;
|
|
242
|
+
}
|
|
202
243
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
color: var(--btn-false--hover-color);
|
|
206
|
-
border-color: var(--btn-false--hover-color);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
244
|
+
.wt-loader {
|
|
245
|
+
margin: auto;
|
|
210
246
|
}
|
|
247
|
+
}
|
|
211
248
|
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtChip from '../wt-chip.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtChip', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtChip);
|
|
7
|
+
expect(wrapper.classes('wt-chip')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders a chip content via default slot', () => {
|
|
11
|
+
const content = 'chip content';
|
|
12
|
+
const wrapper = shallowMount(WtChip, {
|
|
13
|
+
slots: {
|
|
14
|
+
default: content,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
expect(wrapper.find('.wt-chip').text()).toBe(content);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="wt-chip" :class="`wt-chip--${color}-color`">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</span>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'wt-chip',
|
|
10
|
+
props: {
|
|
11
|
+
color: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'main',
|
|
14
|
+
options: ['main', 'outline', 'accent', 'secondary', 'secondary-50', 'success', 'danger', 'transfer'],
|
|
15
|
+
notes: '"main" and "outline" are chip-specific colors',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
@import '../../../css/components/atoms/wt-chip/wt-chip';
|
|
23
|
+
</style>
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
|
|
40
40
|
<style lang="scss" scoped>
|
|
41
41
|
.wt-context-menu {
|
|
42
|
-
@extend %typo-body-
|
|
42
|
+
@extend %typo-body-2;
|
|
43
43
|
min-width: var(--context-menu-min-width);
|
|
44
44
|
max-width: var(--context-menu-max-width);
|
|
45
45
|
background-color: var(--context-menu-background-color);
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="wt-indicator"
|
|
4
|
+
:class="[
|
|
5
|
+
`wt-indicator--size-${size}`
|
|
6
|
+
]"
|
|
7
|
+
>
|
|
3
8
|
<span
|
|
4
9
|
class="wt-indicator__indicator"
|
|
5
|
-
:class="
|
|
10
|
+
:class="[
|
|
11
|
+
`wt-indicator__indicator--${color}`,
|
|
12
|
+
]"
|
|
6
13
|
></span>
|
|
7
14
|
<div v-if="isText" class="wt-indicator__text">
|
|
8
15
|
{{ text }}
|
|
@@ -19,10 +26,14 @@ export default {
|
|
|
19
26
|
default: 'secondary',
|
|
20
27
|
options: ['primary', 'secondary', 'disabled', 'success', 'danger', 'transfer', 'break-out'],
|
|
21
28
|
},
|
|
22
|
-
|
|
23
29
|
text: {
|
|
24
30
|
type: [String, Number],
|
|
25
31
|
},
|
|
32
|
+
size: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'md',
|
|
35
|
+
options: ['sm', 'md'],
|
|
36
|
+
},
|
|
26
37
|
},
|
|
27
38
|
|
|
28
39
|
computed: {
|
|
@@ -40,13 +51,14 @@ export default {
|
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
.wt-indicator__text {
|
|
43
|
-
@extend %typo-
|
|
54
|
+
@extend %typo-body-1;
|
|
44
55
|
margin-left: var(--indicator-text-margin);
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
.wt-indicator__indicator {
|
|
48
|
-
min-width: var(--indicator-size);
|
|
49
|
-
height: var(--indicator-size);
|
|
59
|
+
min-width: var(--indicator-dot-size);
|
|
60
|
+
height: var(--indicator-dot-size);
|
|
61
|
+
margin: var(--indicator-dot-offset);
|
|
50
62
|
background: var(--indicator-disabled-color);
|
|
51
63
|
border-radius: 50%;
|
|
52
64
|
|
|
@@ -78,4 +90,25 @@ export default {
|
|
|
78
90
|
background: var(--indicator-break-out-color);
|
|
79
91
|
}
|
|
80
92
|
}
|
|
93
|
+
|
|
94
|
+
.wt-indicator--size {
|
|
95
|
+
&-sm {
|
|
96
|
+
.wt-indicator__indicator {
|
|
97
|
+
min-width: var(--indicator-dot-size--size-sm);
|
|
98
|
+
height: var(--indicator-dot-size--size-sm);
|
|
99
|
+
}
|
|
100
|
+
.wt-indicator__text {
|
|
101
|
+
@extend %typo-caption;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
&-md {
|
|
105
|
+
.wt-indicator__indicator {
|
|
106
|
+
min-width: var(--indicator-dot-size--size-md);
|
|
107
|
+
height: var(--indicator-dot-size--size-md);
|
|
108
|
+
}
|
|
109
|
+
.wt-indicator__text {
|
|
110
|
+
@extend %typo-body-1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
81
114
|
</style>
|