@webitel/ui-sdk 23.9.2 → 23.12.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/dist/ui-sdk.common.js +11155 -445
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +11307 -597
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +8 -8
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +9 -4
- package/src/components/wt-app-header/_variables.scss +1 -0
- package/src/components/wt-app-header/wt-app-header.vue +1 -1
- package/src/components/wt-button/Readme.md +23 -0
- package/src/components/wt-button/_variables.scss +53 -30
- package/src/components/wt-button/wt-button.vue +45 -147
- package/src/components/wt-button-select/Readme.md +13 -0
- package/src/components/wt-button-select/_variables.scss +0 -11
- package/src/components/wt-button-select/wt-button-select.vue +33 -92
- package/src/components/wt-checkbox/wt-checkbox.vue +8 -2
- package/src/components/wt-context-menu/wt-context-menu.vue +4 -1
- package/src/components/wt-datepicker/wt-datepicker.vue +9 -3
- package/src/components/wt-icon/Readme.md +327 -0
- package/src/components/wt-icon/_variables.scss +26 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
- package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
- package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
- package/src/components/wt-icon/wt-icon.vue +72 -87
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +0 -1
- package/src/components/wt-icon-btn/Readme.md +10 -0
- package/src/components/wt-icon-btn/_variables.scss +9 -0
- package/src/components/wt-icon-btn/wt-icon-btn.vue +27 -62
- package/src/components/wt-input/wt-input.vue +8 -5
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +2 -2
- package/src/components/wt-page-header/wt-page-header.vue +3 -3
- package/src/components/wt-pagination/__tests__/WtPagination.spec.js +2 -1
- package/src/components/wt-radio/wt-radio.vue +4 -1
- package/src/components/wt-rounded-action/Readme.md +68 -0
- package/src/components/wt-rounded-action/_variables.scss +42 -4
- package/src/components/wt-rounded-action/wt-rounded-action.vue +139 -107
- package/src/components/wt-select/wt-select.vue +15 -6
- package/src/components/wt-switcher/wt-switcher.vue +5 -2
- package/src/components/wt-tabs/wt-tabs.vue +4 -1
- package/src/components/wt-tags-input/wt-tags-input.vue +11 -5
- package/src/components/wt-textarea/wt-textarea.vue +5 -2
- package/src/components/wt-time-input/wt-time-input.vue +5 -2
- package/src/components/wt-timepicker/wt-timepicker.vue +1 -1
- package/src/css/styleguide/colors/_colors.scss +170 -148
- package/src/css/styleguide/colors/_deprecated.scss +151 -0
- package/src/css/styleguide/colors/_palette.scss +2 -2
- package/src/directives/clickaway/clickaway.js +2 -51
- package/src/directives/index.js +0 -1
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +1 -1
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +1 -1
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
<!-- eslint-disable -->
|
|
2
1
|
<template>
|
|
3
2
|
<i
|
|
4
3
|
class="wt-icon"
|
|
5
4
|
:class="[
|
|
6
5
|
`wt-icon--size-${size}`,
|
|
7
6
|
`wt-icon--color-${color}`,
|
|
8
|
-
{ 'wt-icon--disabled': disabled }
|
|
7
|
+
{ 'wt-icon--disabled': disabled },
|
|
9
8
|
]"
|
|
10
9
|
>
|
|
11
10
|
<svg class="wt-icon__icon">
|
|
@@ -14,54 +13,53 @@
|
|
|
14
13
|
</i>
|
|
15
14
|
</template>
|
|
16
15
|
|
|
17
|
-
<script>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'secondary-50',
|
|
45
|
-
'icon-secondary',
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
iconPrefix: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: '',
|
|
51
|
-
},
|
|
52
|
-
disabled: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: false,
|
|
55
|
-
},
|
|
16
|
+
<script setup>
|
|
17
|
+
|
|
18
|
+
import { computed } from 'vue';
|
|
19
|
+
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
/**
|
|
22
|
+
* Icon name
|
|
23
|
+
* @example '<wt-icon icon="close"></wt-icon>'
|
|
24
|
+
*/
|
|
25
|
+
icon: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* @values xs, sm (16px), md (24px), lg (32px), xl (40px), 2xl, 3xl
|
|
31
|
+
* @example '<wt-icon icon="close" size="sm"></wt-icon>'
|
|
32
|
+
*/
|
|
33
|
+
size: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'md',
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* @values 'default', 'disabled', 'error', 'success', 'warning', 'on-dark', 'on-light', 'on-primary', 'info', 'chat', 'transfer'
|
|
39
|
+
*/
|
|
40
|
+
color: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'default',
|
|
56
43
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
/**
|
|
45
|
+
* inserts icon name prefix between "icon" and actual icon name ("icon" prop).
|
|
46
|
+
* Useful for library icons extension with project-level icons with this prefix in name
|
|
47
|
+
*/
|
|
48
|
+
iconPrefix: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: '',
|
|
63
51
|
},
|
|
64
|
-
|
|
52
|
+
disabled: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const iconName = computed(() => {
|
|
59
|
+
let name = '#';
|
|
60
|
+
if (props.iconPrefix) name += `${props.iconPrefix}-`;
|
|
61
|
+
return `${name}${props.icon}`;
|
|
62
|
+
});
|
|
65
63
|
</script>
|
|
66
64
|
|
|
67
65
|
<style lang="scss">
|
|
@@ -90,58 +88,40 @@ svg {
|
|
|
90
88
|
&-default .wt-icon__icon {
|
|
91
89
|
fill: var(--icon-color);
|
|
92
90
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
fill: var(--icon-color-accent);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&-contrast .wt-icon__icon {
|
|
99
|
-
fill: var(--icon-color-contrast);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&-active .wt-icon__icon {
|
|
103
|
-
fill: var(--icon-color-active);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&-secondary .wt-icon__icon {
|
|
107
|
-
fill: var(--secondary-color);
|
|
91
|
+
&-error .wt-icon__icon {
|
|
92
|
+
fill: var(--icon-error-color);
|
|
108
93
|
}
|
|
109
|
-
|
|
110
94
|
&-success .wt-icon__icon {
|
|
111
|
-
fill: var(--icon-color
|
|
95
|
+
fill: var(--icon-success-color);
|
|
112
96
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
fill: var(--icon-color-danger);
|
|
97
|
+
&-warning .wt-icon__icon {
|
|
98
|
+
fill: var(--icon-warning-color);
|
|
116
99
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
fill: var(--icon-color-transfer);
|
|
100
|
+
&-on-dark .wt-icon__icon {
|
|
101
|
+
fill: var(--icon-on-dark-color);
|
|
120
102
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
fill: var(--job-color);
|
|
103
|
+
&-on-light .wt-icon__icon {
|
|
104
|
+
fill: var(--icon-on-light-color);
|
|
124
105
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
fill: var(--icon-color-hold);
|
|
106
|
+
&-on-primary .wt-icon__icon {
|
|
107
|
+
fill: var(--icon-on-primary-color);
|
|
128
108
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
fill: var(--icon-color-secondary-50);
|
|
109
|
+
&-info .wt-icon__icon {
|
|
110
|
+
fill: var(--icon-info-color);
|
|
132
111
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
112
|
+
&-chat .wt-icon__icon {
|
|
113
|
+
fill: var(--icon-chat-color);
|
|
114
|
+
}
|
|
115
|
+
&-transfer .wt-icon__icon {
|
|
116
|
+
fill: var(--icon-transfer-color);
|
|
136
117
|
}
|
|
137
|
-
|
|
138
118
|
&-disabled .wt-icon__icon {
|
|
139
|
-
fill: var(--icon-color
|
|
119
|
+
fill: var(--icon-disabled-color);
|
|
140
120
|
}
|
|
141
121
|
}
|
|
142
122
|
|
|
143
|
-
.wt-icon
|
|
144
|
-
fill: var(--icon-color
|
|
123
|
+
.wt-icon--disabled .wt-icon__icon {
|
|
124
|
+
fill: var(--icon-disabled-color);
|
|
145
125
|
}
|
|
146
126
|
|
|
147
127
|
.wt-icon--size {
|
|
@@ -174,5 +154,10 @@ svg {
|
|
|
174
154
|
width: var(--icon-sm-size);
|
|
175
155
|
height: var(--icon-sm-size);
|
|
176
156
|
}
|
|
157
|
+
|
|
158
|
+
&-xs {
|
|
159
|
+
width: var(--icon-xs-size);
|
|
160
|
+
height: var(--icon-xs-size);
|
|
161
|
+
}
|
|
177
162
|
}
|
|
178
163
|
</style>
|
|
@@ -1,81 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</button>
|
|
14
|
-
</div>
|
|
2
|
+
<button
|
|
3
|
+
class="wt-icon-btn"
|
|
4
|
+
:class="{ 'wt-icon-btn--disabled': disabled }"
|
|
5
|
+
type="button"
|
|
6
|
+
@click="emit('click', $event)"
|
|
7
|
+
>
|
|
8
|
+
<wt-icon
|
|
9
|
+
v-bind="$attrs"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
></wt-icon>
|
|
12
|
+
</button>
|
|
15
13
|
</template>
|
|
16
14
|
|
|
17
|
-
<script>
|
|
15
|
+
<script setup>
|
|
18
16
|
import WtIcon from '../wt-icon/wt-icon.vue';
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
icon: {
|
|
25
|
-
type: String,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
iconPrefix: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: '',
|
|
31
|
-
},
|
|
32
|
-
size: {
|
|
33
|
-
type: String,
|
|
34
|
-
},
|
|
35
|
-
disabled: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: false,
|
|
38
|
-
},
|
|
39
|
-
color: {
|
|
40
|
-
type: String,
|
|
41
|
-
},
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
disabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false,
|
|
42
22
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (this.disabled) return 'disabled';
|
|
47
|
-
return this.color;
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const emit = defineEmits(['click']);
|
|
51
26
|
</script>
|
|
52
27
|
|
|
28
|
+
<style lang="scss">
|
|
29
|
+
@import './variables.scss';
|
|
30
|
+
</style>
|
|
31
|
+
|
|
53
32
|
<style lang="scss" scoped>
|
|
54
33
|
.wt-icon-btn {
|
|
55
34
|
position: relative;
|
|
56
|
-
display:
|
|
57
|
-
|
|
58
|
-
.wt-icon {
|
|
59
|
-
display: flex;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// add hover style only for "default" icon color cause non-default already may have opacity 1
|
|
63
|
-
&:hover ::v-deep .wt-icon__icon.wt-icon__icon--color-default {
|
|
64
|
-
fill: var(--icon-color--hover);
|
|
65
|
-
}
|
|
35
|
+
display: block;
|
|
36
|
+
line-height: 0;
|
|
66
37
|
|
|
67
|
-
&:hover
|
|
68
|
-
fill: var(--icon-color);
|
|
38
|
+
&:hover .wt-icon--color-default :deep .wt-icon__icon {
|
|
39
|
+
fill: var(--icon-btn-hover-color);
|
|
69
40
|
}
|
|
70
41
|
|
|
71
|
-
// icon "disabled" color is set from iconColor computed
|
|
72
42
|
&--disabled {
|
|
73
43
|
pointer-events: none;
|
|
74
44
|
}
|
|
75
45
|
}
|
|
76
|
-
|
|
77
|
-
.wt-icon-btn,
|
|
78
|
-
.wt-icon-btn__button {
|
|
79
|
-
line-height: 0;
|
|
80
|
-
}
|
|
81
46
|
</style>
|
|
@@ -8,21 +8,24 @@
|
|
|
8
8
|
class="wt-input"
|
|
9
9
|
>
|
|
10
10
|
<wt-label
|
|
11
|
+
v-bind="labelProps"
|
|
11
12
|
v-if="hasLabel"
|
|
12
13
|
:disabled="disabled"
|
|
13
14
|
:for="name"
|
|
14
15
|
:invalid="invalid"
|
|
15
16
|
:outline="outline"
|
|
16
|
-
v-bind="labelProps"
|
|
17
17
|
>
|
|
18
18
|
<!-- @slot Custom input label -->
|
|
19
|
-
<slot
|
|
19
|
+
<slot
|
|
20
|
+
v-bind="{ label }"
|
|
21
|
+
name="label"
|
|
22
|
+
>{{ requiredLabel }}</slot>
|
|
20
23
|
</wt-label>
|
|
21
24
|
<div class="wt-input__wrapper">
|
|
22
25
|
<input
|
|
26
|
+
v-bind="$attrs"
|
|
23
27
|
:id="name"
|
|
24
28
|
ref="wt-input"
|
|
25
|
-
v-bind="$attrs"
|
|
26
29
|
:class="{
|
|
27
30
|
'wt-input--is-password': isPassword,
|
|
28
31
|
}"
|
|
@@ -44,12 +47,12 @@
|
|
|
44
47
|
name="after-input"
|
|
45
48
|
></slot>
|
|
46
49
|
<slot
|
|
47
|
-
v-if="isPassword"
|
|
48
|
-
name="show-password"
|
|
49
50
|
v-bind="{
|
|
50
51
|
isPasswordVisible,
|
|
51
52
|
switchVisibilityPassword,
|
|
52
53
|
}"
|
|
54
|
+
v-if="isPassword"
|
|
55
|
+
name="show-password"
|
|
53
56
|
>
|
|
54
57
|
<wt-icon-btn
|
|
55
58
|
:icon="showPasswordIcon"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
:class="{'wt-navigation-bar__nav-item-link--active': currentNav.nav === navItem.value}"
|
|
66
66
|
:to="navItem.route"
|
|
67
67
|
class="wt-navigation-bar__nav-item-link"
|
|
68
|
-
@click
|
|
68
|
+
@click="close"
|
|
69
69
|
> {{ navItem.name || navItem.value }}
|
|
70
70
|
</router-link>
|
|
71
71
|
</div>
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
:class="{'wt-navigation-bar__nav-item-link--active': currentNav.nav === subNavItem.value}"
|
|
100
100
|
:to="nestedRoute(subNavItem, navItem)"
|
|
101
101
|
class="wt-navigation-bar__nav-item-link wt-navigation-bar__nav-item-link--subnav"
|
|
102
|
-
@click
|
|
102
|
+
@click="close"
|
|
103
103
|
>{{ subNavItem.name || subNavItem.value }}
|
|
104
104
|
</router-link>
|
|
105
105
|
</div>
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<wt-headline>
|
|
3
3
|
<template v-slot:title-wrapper>
|
|
4
4
|
<slot>
|
|
5
|
-
<template slot="title">
|
|
6
|
-
<slot name="title"></slot>
|
|
7
|
-
</template>
|
|
8
5
|
</slot>
|
|
9
6
|
</template>
|
|
7
|
+
<template v-slot:title>
|
|
8
|
+
<slot name="title"></slot>
|
|
9
|
+
</template>
|
|
10
10
|
<template v-slot:actions>
|
|
11
11
|
<slot name="actions"></slot>
|
|
12
12
|
<slot
|
|
@@ -28,9 +28,10 @@ describe('WtPagination', () => {
|
|
|
28
28
|
const wrapper = mount(WtPagination, {
|
|
29
29
|
props: { isNext: true, page: 2 },
|
|
30
30
|
});
|
|
31
|
-
const pageControls = wrapper.findAllComponents('
|
|
31
|
+
const pageControls = wrapper.findAllComponents({ name: 'wt-icon-btn' });
|
|
32
32
|
pageControls.at(0).vm.$emit('click');
|
|
33
33
|
pageControls.at(1).vm.$emit('click');
|
|
34
|
+
console.info(wrapper.emitted());
|
|
34
35
|
expect(wrapper.emitted().prev.length).toBe(1);
|
|
35
36
|
expect(wrapper.emitted().next.length).toBe(1);
|
|
36
37
|
});
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
>
|
|
19
19
|
<wt-icon class="wt-radio__icon" :icon="radioIcon"></wt-icon>
|
|
20
20
|
<!-- @slot Custom input label -->
|
|
21
|
-
<slot
|
|
21
|
+
<slot
|
|
22
|
+
v-bind="{ label, isChecked, disabled }"
|
|
23
|
+
name="label"
|
|
24
|
+
>
|
|
22
25
|
<div v-if="label" class="wt-radio__label">{{ label }}</div>
|
|
23
26
|
</slot>
|
|
24
27
|
</wt-label>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
### Different colors
|
|
2
|
+
|
|
3
|
+
```vue
|
|
4
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
5
|
+
<wt-rounded-action icon="call" color="primary"></wt-rounded-action>
|
|
6
|
+
<wt-rounded-action icon="call" color="secondary"></wt-rounded-action>
|
|
7
|
+
<wt-rounded-action icon="call" disabled></wt-rounded-action>
|
|
8
|
+
<wt-rounded-action icon="call" color="success"></wt-rounded-action>
|
|
9
|
+
<wt-rounded-action icon="call" color="error"></wt-rounded-action>
|
|
10
|
+
<wt-rounded-action icon="call" color="transfer"></wt-rounded-action>
|
|
11
|
+
</div>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Active (pressed) buttons
|
|
15
|
+
```vue
|
|
16
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
17
|
+
<wt-rounded-action active icon="call" color="primary"></wt-rounded-action>
|
|
18
|
+
<wt-rounded-action active icon="call" color="secondary"></wt-rounded-action>
|
|
19
|
+
<wt-rounded-action active icon="call" disabled></wt-rounded-action>
|
|
20
|
+
<wt-rounded-action active icon="call" color="success"></wt-rounded-action>
|
|
21
|
+
<wt-rounded-action active icon="call" color="error"></wt-rounded-action>
|
|
22
|
+
<wt-rounded-action active icon="call" color="transfer"></wt-rounded-action>
|
|
23
|
+
</div>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Wide buttons
|
|
27
|
+
```vue
|
|
28
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
29
|
+
<wt-rounded-action wide icon="call" color="secondary"></wt-rounded-action>
|
|
30
|
+
<wt-rounded-action wide rounded icon="call" color="secondary"></wt-rounded-action>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Rounded buttons
|
|
35
|
+
```vue
|
|
36
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
37
|
+
<wt-rounded-action rounded icon="call" color="primary"></wt-rounded-action>
|
|
38
|
+
<wt-rounded-action rounded icon="call" color="secondary"></wt-rounded-action>
|
|
39
|
+
<wt-rounded-action rounded icon="call" disabled></wt-rounded-action>
|
|
40
|
+
<wt-rounded-action rounded icon="call" color="success"></wt-rounded-action>
|
|
41
|
+
<wt-rounded-action rounded icon="call" color="error"></wt-rounded-action>
|
|
42
|
+
<wt-rounded-action rounded icon="call" color="transfer"></wt-rounded-action>
|
|
43
|
+
</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Small (sm) buttons
|
|
47
|
+
```vue
|
|
48
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
49
|
+
<wt-rounded-action size="sm" icon="call" color="primary"></wt-rounded-action>
|
|
50
|
+
<wt-rounded-action size="sm" icon="call" color="secondary"></wt-rounded-action>
|
|
51
|
+
<wt-rounded-action size="sm" icon="call" disabled></wt-rounded-action>
|
|
52
|
+
<wt-rounded-action size="sm" icon="call" color="success"></wt-rounded-action>
|
|
53
|
+
<wt-rounded-action size="sm" icon="call" color="error"></wt-rounded-action>
|
|
54
|
+
<wt-rounded-action size="sm" icon="call" color="transfer"></wt-rounded-action>
|
|
55
|
+
</div>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Loading-state buttons
|
|
59
|
+
```vue
|
|
60
|
+
<div class="example-wrapper" style="display: flex; gap: var(--spacing-xs);">
|
|
61
|
+
<wt-rounded-action size="sm" icon="call" color="primary" loading></wt-rounded-action>
|
|
62
|
+
<wt-rounded-action size="sm" icon="call" color="secondary" loading></wt-rounded-action>
|
|
63
|
+
<wt-rounded-action size="sm" icon="call" disabled loading></wt-rounded-action>
|
|
64
|
+
<wt-rounded-action size="sm" icon="call" color="success" loading></wt-rounded-action>
|
|
65
|
+
<wt-rounded-action size="sm" icon="call" color="error" loading></wt-rounded-action>
|
|
66
|
+
<wt-rounded-action size="sm" icon="call" color="transfer" loading></wt-rounded-action>
|
|
67
|
+
</div>
|
|
68
|
+
```
|
|
@@ -1,7 +1,45 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--rounded-action-
|
|
2
|
+
--rounded-action-border-size: 1px;
|
|
3
|
+
--rounded-action-padding: calc(var(--spacing-xs) - var(--rounded-action-border-size));
|
|
3
4
|
|
|
4
|
-
--rounded-action-
|
|
5
|
+
--rounded-action-rounded-border-radius: var(--border-radius--pill);
|
|
5
6
|
|
|
6
|
-
--rounded-action-
|
|
7
|
-
|
|
7
|
+
--rounded-action-primary-color: var(--primary-color);
|
|
8
|
+
--rounded-action-primary-hover-color: var(--primary-hover-color);
|
|
9
|
+
|
|
10
|
+
--rounded-action-secondary-color: var(--dp-20-surface-color);
|
|
11
|
+
--rounded-action-secondary-hover-color: var(--dp-18-surface-color);
|
|
12
|
+
--rounded-action-secondary-active-color: var(--grey-lighten-1);
|
|
13
|
+
|
|
14
|
+
--rounded-action-success-color: var(--success-color);
|
|
15
|
+
--rounded-action-success-hover-color: var(--success-hover-color);
|
|
16
|
+
|
|
17
|
+
--rounded-action-error-color: var(--error-color);
|
|
18
|
+
--rounded-action-error-hover-color: var(--error-hover-color);
|
|
19
|
+
|
|
20
|
+
--rounded-action-transfer-color: var(--transfer-color);
|
|
21
|
+
--rounded-action-transfer-hover-color: var(--transfer-hover-color);
|
|
22
|
+
|
|
23
|
+
--rounded-action-disabled-color: var(--dp-18-surface-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:root.theme--dark {
|
|
27
|
+
--rounded-action-primary-color: var(--primary-color);
|
|
28
|
+
--rounded-action-primary-hover-color: var(--primary-hover-color);
|
|
29
|
+
|
|
30
|
+
--rounded-action-secondary-color: var(--dp-20-surface-color);
|
|
31
|
+
--rounded-action-secondary-hover-color: var(--dp-18-surface-color);
|
|
32
|
+
--rounded-action-secondary-active-color: var(--grey-darken-1);
|
|
33
|
+
|
|
34
|
+
--rounded-action-success-color: var(--success-color);
|
|
35
|
+
--rounded-action-success-hover-color: var(--success-hover-color);
|
|
36
|
+
|
|
37
|
+
--rounded-action-error-color: var(--error-color);
|
|
38
|
+
--rounded-action-error-hover-color: var(--error-hover-color);
|
|
39
|
+
|
|
40
|
+
--rounded-action-transfer-color: var(--transfer-color);
|
|
41
|
+
--rounded-action-transfer-hover-color: var(--transfer-hover-color);
|
|
42
|
+
|
|
43
|
+
--rounded-action-disabled-color: var(--dp-18-surface-color);
|
|
44
|
+
|
|
45
|
+
}
|