plugin-ui-for-kzt 0.0.57 → 0.0.59
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/components/BaseBadge/BaseBadge.vue.d.ts +1 -1
- package/dist/components/BaseButton/BaseButton.vue.d.ts +1 -1
- package/dist/components/BaseCalendar/BaseCalendar.vue.d.ts +5 -5
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +2 -2
- package/dist/components/BaseChips/BaseChips.vue.d.ts +2 -0
- package/dist/components/BaseDropdown/BaseDropdown.vue.d.ts +1 -1
- package/dist/components/BaseInput/BaseInput.vue.d.ts +12 -3
- package/dist/components/BaseInputCalendar/BaseInputCalendar.vue.d.ts +13 -6
- package/dist/components/BaseInputCurrency/BaseInputCurrency.vue.d.ts +11 -4
- package/dist/components/BaseInputEmail/BaseInputEmail.vue.d.ts +9 -2
- package/dist/components/BaseInputPhone/BaseInputPhone.vue.d.ts +9 -2
- package/dist/components/BaseInputWithSelector/BaseInputWithSelector.vue.d.ts +9 -0
- package/dist/components/BasePagination/BasePagination.vue.d.ts +1 -1
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +2 -2
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -4
- package/dist/components/BaseSiteInput/BaseSiteInput.vue.d.ts +7 -0
- package/dist/components/BaseTag/BaseTag.vue.d.ts +1 -1
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +9 -2
- package/dist/components/BaseToast/BaseToast.vue.d.ts +1 -1
- package/dist/components/BaseToggle/BaseToggle.vue.d.ts +2 -2
- package/dist/components/BaseTooltip/BaseTooltip.vue.d.ts +1 -1
- package/dist/index.js +1 -1
- package/example/App.vue +39 -2
- package/package.json +1 -1
- package/src/components/BaseChips/BaseChips.vue +233 -139
- package/src/components/BaseChips/README.md +8 -7
- package/src/components/BaseInput/BaseInput.vue +80 -37
- package/src/components/BaseInput/README.md +8 -1
- package/src/components/BaseInputWithSelector/BaseInputWithSelector.vue +3 -0
- package/src/components/BaseSelect/BaseSelect.vue +14 -1
- package/src/components/BaseUpload/BaseUpload.vue +1 -1
- package/src/types/chips.d.ts +1 -0
- package/src/types/input.d.ts +1 -0
package/example/App.vue
CHANGED
|
@@ -8,6 +8,20 @@
|
|
|
8
8
|
/>
|
|
9
9
|
</div>
|
|
10
10
|
<section>
|
|
11
|
+
<BaseInput
|
|
12
|
+
id="input-default"
|
|
13
|
+
v-model="demoValues.inputDefault"
|
|
14
|
+
placeholder="Default input"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<BaseInput
|
|
18
|
+
id="input-clearable"
|
|
19
|
+
v-model="demoValues.inputClearable"
|
|
20
|
+
placeholder="Clearable input"
|
|
21
|
+
size="small"
|
|
22
|
+
clearable
|
|
23
|
+
/>
|
|
24
|
+
|
|
11
25
|
<BaseInputCalendar
|
|
12
26
|
id="input-calendar"
|
|
13
27
|
v-model="demoValues.calendar"
|
|
@@ -38,7 +52,25 @@
|
|
|
38
52
|
placeholder="Поиск..."
|
|
39
53
|
>
|
|
40
54
|
<template #left-icon>
|
|
41
|
-
<BaseIcon name="search" size="
|
|
55
|
+
<BaseIcon name="search" size="large"/>
|
|
56
|
+
</template>
|
|
57
|
+
</BaseInputWithSelector>
|
|
58
|
+
|
|
59
|
+
<BaseInputWithSelector
|
|
60
|
+
v-model="clearableSearch"
|
|
61
|
+
v-model:selectedOptionId="clearableSearchType"
|
|
62
|
+
size="small"
|
|
63
|
+
clearable
|
|
64
|
+
:options="[
|
|
65
|
+
{ id: 'iin', name: 'ИИН', value: 'iin' },
|
|
66
|
+
{ id: 'bin', name: 'БИН', value: 'bin' },
|
|
67
|
+
{ id: 'number', name: '#', value: '#' },
|
|
68
|
+
]"
|
|
69
|
+
@search="handleSearch"
|
|
70
|
+
placeholder="Clearable search..."
|
|
71
|
+
>
|
|
72
|
+
<template #left-icon>
|
|
73
|
+
<BaseIcon name="search" size="large"/>
|
|
42
74
|
</template>
|
|
43
75
|
</BaseInputWithSelector>
|
|
44
76
|
</div>
|
|
@@ -51,11 +83,14 @@ import BaseInputCalendar from '../src/components/BaseInputCalendar/BaseInputCale
|
|
|
51
83
|
import MyCustomModal from './MyCustomModal.vue';
|
|
52
84
|
import BaseIcon from "../src/components/BaseIcon/BaseIcon.vue";
|
|
53
85
|
import BaseInputWithSelector from "../src/components/BaseInputWithSelector/BaseInputWithSelector.vue";
|
|
86
|
+
import BaseInput from "../src/components/BaseInput/BaseInput.vue";
|
|
54
87
|
|
|
55
88
|
const { open } = useModal();
|
|
56
89
|
|
|
57
90
|
const search = ref<string>( '' );
|
|
58
91
|
const searchType = ref<string | number>( "iin" );
|
|
92
|
+
const clearableSearch = ref<string>( 'Search text' );
|
|
93
|
+
const clearableSearchType = ref<string | number>( "bin" );
|
|
59
94
|
|
|
60
95
|
function handleSearch( { value, type }: { value: string; type: string | number } ) {
|
|
61
96
|
console.log( 'DEBOUNCED SEARCH:', value, type )
|
|
@@ -70,6 +105,8 @@ const iconOptions = [
|
|
|
70
105
|
|
|
71
106
|
const demoValues = ref( {
|
|
72
107
|
icons: iconOptions[0].id,
|
|
108
|
+
inputDefault: '',
|
|
109
|
+
inputClearable: 'Text to clear',
|
|
73
110
|
textarea: 'Тестовый текст',
|
|
74
111
|
calendar: new Date(),
|
|
75
112
|
calendarDisabled: new Date(),
|
|
@@ -125,4 +162,4 @@ const demoValues = ref( {
|
|
|
125
162
|
gap: var(--spacing-xs);
|
|
126
163
|
justify-content: flex-end;
|
|
127
164
|
}
|
|
128
|
-
</style>
|
|
165
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<div class="base-chips" :class="classList">
|
|
3
|
+
<button class="base-chips__wrapper">
|
|
4
|
+
<div class="base-chips__content">
|
|
5
|
+
<div v-if="iconName" class="base-chips__icon">
|
|
6
|
+
<base-icon
|
|
7
|
+
:name="iconName"
|
|
8
|
+
:size="props.size"
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="base-chips__text">{{ text }}</div>
|
|
12
|
+
<div v-if="count" class="base-chips__count">{{ count }}</div>
|
|
13
|
+
</div>
|
|
14
|
+
</button>
|
|
15
|
+
</div>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script setup lang="ts">
|
|
@@ -20,17 +20,20 @@ import type { ICoreChipsProps } from '../../types/chips';
|
|
|
20
20
|
import { useKitSize } from '../../composables/kit/size';
|
|
21
21
|
import BaseIcon from '../BaseIcon/BaseIcon.vue';
|
|
22
22
|
import { computed } from 'vue';
|
|
23
|
+
import { useKitColor } from "../../composables/kit/color";
|
|
23
24
|
|
|
24
|
-
const props = withDefaults(defineProps<ICoreChipsProps>(), {
|
|
25
|
-
|
|
26
|
-
});
|
|
25
|
+
const props = withDefaults( defineProps<ICoreChipsProps>(), {
|
|
26
|
+
size: 'medium',
|
|
27
|
+
} );
|
|
27
28
|
|
|
28
|
-
const { sizeClassList } = useKitSize(props);
|
|
29
|
+
const { sizeClassList } = useKitSize( props );
|
|
30
|
+
const { colorClassList } = useKitColor( props );
|
|
29
31
|
|
|
30
|
-
const classList = computed(() => [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const classList = computed( () => [
|
|
33
|
+
sizeClassList.value,
|
|
34
|
+
colorClassList.value,
|
|
35
|
+
{ '--is-active': props.active }
|
|
36
|
+
] );
|
|
34
37
|
</script>
|
|
35
38
|
|
|
36
39
|
<style lang="scss">
|
|
@@ -38,147 +41,238 @@ const classList = computed(() => [
|
|
|
38
41
|
@import '../../styles/root';
|
|
39
42
|
|
|
40
43
|
.base-chips {
|
|
41
|
-
|
|
44
|
+
$chip: &;
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
button {
|
|
47
|
+
border: none;
|
|
48
|
+
outline: none;
|
|
49
|
+
margin: 0;
|
|
50
|
+
padding: 0;
|
|
51
|
+
display: block;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__wrapper {
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
height: 100%;
|
|
58
|
+
width: 100%;
|
|
59
|
+
background: var(--primary-black-200);
|
|
60
|
+
color: var(--primary-black-800);
|
|
61
|
+
transition: all var(--transition);
|
|
62
|
+
|
|
63
|
+
@include hover {
|
|
64
|
+
background: var(--primary-black-300);
|
|
65
|
+
color: var(--primary-black-900);
|
|
49
66
|
}
|
|
50
67
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
68
|
+
@include focused {
|
|
69
|
+
background: var(--primary-black-200);
|
|
70
|
+
color: var(--primary-black-800);
|
|
71
|
+
outline-width: 4px;
|
|
72
|
+
outline-color: var(--effects-primary-focus);
|
|
73
|
+
outline-style: solid;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include pressed {
|
|
77
|
+
background: var(--primary-black-400);
|
|
78
|
+
color: var(--primary-black);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__content {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
&.--gray-color {
|
|
92
|
+
#{$chip} {
|
|
93
|
+
&__wrapper {
|
|
60
94
|
@include hover {
|
|
61
|
-
|
|
62
|
-
|
|
95
|
+
background: var(--primary-black-300);
|
|
96
|
+
color: var(--primary-black-900);
|
|
63
97
|
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&__content {
|
|
101
|
+
color: var(--primary-black-600);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&__wrapper {
|
|
105
|
+
border: 1px solid var(--primary-black-400);
|
|
106
|
+
background: var(--primary-black-white);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.--green-color {
|
|
112
|
+
#{$chip} {
|
|
64
113
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
outline-color: var(--effects-primary-focus);
|
|
70
|
-
outline-style: solid;
|
|
114
|
+
&__wrapper {
|
|
115
|
+
@include hover {
|
|
116
|
+
background: var(--primary-black-300);
|
|
117
|
+
color: var(--primary-black-900);
|
|
71
118
|
}
|
|
119
|
+
}
|
|
72
120
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
121
|
+
&__content {
|
|
122
|
+
color: var(--success-green);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&__wrapper {
|
|
126
|
+
border: 1px solid var(--success-green-light-02);
|
|
127
|
+
background: var(--primary-black-white);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.--red-color {
|
|
133
|
+
#{$chip} {
|
|
134
|
+
&__wrapper {
|
|
135
|
+
@include hover {
|
|
136
|
+
background: var(--primary-black-300);
|
|
137
|
+
color: var(--primary-black-900);
|
|
76
138
|
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&__content {
|
|
142
|
+
color: var(--secondary-text-negative);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&__wrapper {
|
|
146
|
+
border: 1px solid var(--error-red-light-02);
|
|
147
|
+
background: var(--primary-black-white);
|
|
148
|
+
}
|
|
77
149
|
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&.--warning-color {
|
|
153
|
+
#{$chip} {
|
|
154
|
+
&__wrapper {
|
|
155
|
+
@include hover {
|
|
156
|
+
background: var(--primary-black-300);
|
|
157
|
+
color: var(--primary-black-900);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&__content {
|
|
162
|
+
color: var(--warning-orange);
|
|
163
|
+
}
|
|
78
164
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
width: 100%;
|
|
84
|
-
height: 100%;
|
|
165
|
+
&__wrapper {
|
|
166
|
+
border: 1px solid var(--warning-orange-light-02);
|
|
167
|
+
background: var(--primary-black-white);
|
|
168
|
+
}
|
|
85
169
|
}
|
|
170
|
+
}
|
|
86
171
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
172
|
+
&.--is-active {
|
|
173
|
+
#{$chip} {
|
|
174
|
+
|
|
175
|
+
&__wrapper {
|
|
176
|
+
background: var(--primary-blue);
|
|
177
|
+
color: var(--primary-black-white);
|
|
178
|
+
border: none;
|
|
91
179
|
|
|
92
|
-
@include hover {
|
|
93
|
-
background: var(--primary-black-300);
|
|
94
|
-
color: var(--primary-black-900);
|
|
95
|
-
}
|
|
96
180
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
181
|
+
@include hover {
|
|
182
|
+
background: var(--primary-black-300);
|
|
183
|
+
color: var(--primary-black-900);
|
|
101
184
|
}
|
|
102
|
-
}
|
|
103
185
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
padding: var(--spacing-2s) var(--spacing-m);
|
|
108
|
-
gap: var(--spacing-xs);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&__wrapper {
|
|
112
|
-
height: 32px;
|
|
113
|
-
font: var(--typography-text-s-medium);
|
|
114
|
-
border-radius: var(--corner-radius-xl);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&__count {
|
|
118
|
-
transform: translateY(-3px);
|
|
119
|
-
font: var(--typography-text-xs-medium);
|
|
120
|
-
}
|
|
186
|
+
@include pressed {
|
|
187
|
+
background: var(--primary-black-400);
|
|
188
|
+
color: var(--primary-black);
|
|
121
189
|
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&__content {
|
|
193
|
+
color: var(--primary-black-white);
|
|
194
|
+
}
|
|
122
195
|
}
|
|
196
|
+
}
|
|
123
197
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
198
|
+
&.--extra-small-size {
|
|
199
|
+
#{$chip} {
|
|
200
|
+
&__content {
|
|
201
|
+
padding: var(--spacing-2s) var(--spacing-m);
|
|
202
|
+
gap: var(--spacing-xs);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&__wrapper {
|
|
206
|
+
height: 32px;
|
|
207
|
+
font: var(--typography-text-s-medium);
|
|
208
|
+
border-radius: var(--corner-radius-xl);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&__count {
|
|
212
|
+
transform: translateY(-3px);
|
|
213
|
+
font: var(--typography-text-xs-medium);
|
|
214
|
+
}
|
|
142
215
|
}
|
|
216
|
+
}
|
|
143
217
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
218
|
+
&.--small-size {
|
|
219
|
+
#{$chip} {
|
|
220
|
+
&__content {
|
|
221
|
+
padding: var(--spacing-s) var(--spacing-l);
|
|
222
|
+
gap: var(--spacing-s);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&__wrapper {
|
|
226
|
+
height: 40px;
|
|
227
|
+
font: var(--typography-text-m-medium);
|
|
228
|
+
border-radius: var(--corner-radius-xl);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&__count {
|
|
232
|
+
transform: translateY(-3px);
|
|
233
|
+
font: var(--typography-text-xs-medium);
|
|
234
|
+
}
|
|
162
235
|
}
|
|
236
|
+
}
|
|
163
237
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
238
|
+
&.--medium-size {
|
|
239
|
+
#{$chip} {
|
|
240
|
+
&__content {
|
|
241
|
+
padding: var(--spacing-2m) var(--spacing-l);
|
|
242
|
+
gap: var(--spacing-s);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&__wrapper {
|
|
246
|
+
height: 48px;
|
|
247
|
+
font: var(--typography-text-l-medium);
|
|
248
|
+
border-radius: var(--corner-radius-xl);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&__count {
|
|
252
|
+
transform: translateY(-4px);
|
|
253
|
+
font: var(--typography-text-s-medium);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&.--large-size {
|
|
259
|
+
#{$chip} {
|
|
260
|
+
&__content {
|
|
261
|
+
padding: var(--spacing-2l) var(--spacing-l);
|
|
262
|
+
gap: var(--spacing-s);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&__wrapper {
|
|
266
|
+
height: 56px;
|
|
267
|
+
font: var(--typography-text-l-medium);
|
|
268
|
+
border-radius: var(--corner-radius-2xl);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&__count {
|
|
272
|
+
transform: translateY(-5px);
|
|
273
|
+
font: var(--typography-text-s-medium);
|
|
274
|
+
}
|
|
182
275
|
}
|
|
276
|
+
}
|
|
183
277
|
}
|
|
184
278
|
</style>
|
|
@@ -15,13 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
## Свойства (Props)
|
|
17
17
|
|
|
18
|
-
| Свойство
|
|
19
|
-
|
|
20
|
-
| `text`
|
|
21
|
-
| `active`
|
|
22
|
-
| `iconName`
|
|
23
|
-
| `count`
|
|
24
|
-
| `size`
|
|
18
|
+
| Свойство | Тип | Значение по умолчанию | Описание |
|
|
19
|
+
|------------|----------------|--------|-------------------------------------------------------|
|
|
20
|
+
| `text` | `string` | Обязательно | Основной текст, отображаемый внутри чипа. |
|
|
21
|
+
| `active` | `boolean` | `false` | Определяет, находится ли чип в активном состоянии. |
|
|
22
|
+
| `iconName` | `string` | `undefined` | Название иконки для отображения (требуется BaseIcon). |
|
|
23
|
+
| `count` | `number` | `undefined` | Число для отображения в чипе. |
|
|
24
|
+
| `size` | `'extra-small' | 'small'| 'medium'| 'large'` | `medium` | Размер чипа (влияет на высоту, шрифт и отступы). |
|
|
25
|
+
| `color` | `'gray' | 'red' | 'green' | 'warning'` | `medium`|
|
|
25
26
|
|
|
26
27
|
## События (Events)
|
|
27
28
|
|