plugin-ui-for-kzt 0.0.22 → 0.0.23

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.
Files changed (35) hide show
  1. package/dist/components/BaseBadge/BaseBadge.vue.d.ts +1 -1
  2. package/dist/components/BaseButton/BaseButton.vue.d.ts +3 -3
  3. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +4 -4
  4. package/dist/components/BaseDropdown/BaseDropdown.vue.d.ts +3 -3
  5. package/dist/components/BaseField/BaseField.vue.d.ts +2 -2
  6. package/dist/components/BaseInput/BaseInput.vue.d.ts +6 -6
  7. package/dist/components/BaseInputCalendar/BaseInputCalendar.vue.d.ts +5 -5
  8. package/dist/components/BaseInputCurrency/BaseInputCurrency.vue.d.ts +6 -6
  9. package/dist/components/BaseInputEmail/BaseInputEmail.vue.d.ts +5 -5
  10. package/dist/components/BaseInputPhone/BaseInputPhone.vue.d.ts +5 -5
  11. package/dist/components/BaseOpenedListItem/BaseOpenedListItem.vue.d.ts +3 -3
  12. package/dist/components/BasePagination/BasePagination.vue.d.ts +1 -1
  13. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +4 -4
  14. package/dist/components/BaseSegmentedButtons/BaseSegmentedButtons.vue.d.ts +3 -3
  15. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -4
  16. package/dist/components/BaseTabs/BaseTabs.vue.d.ts +25 -0
  17. package/dist/components/BaseTag/BaseTag.vue.d.ts +1 -1
  18. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +5 -5
  19. package/dist/components/BaseToggle/BaseToggle.vue.d.ts +4 -4
  20. package/dist/components/BaseUpload/BaseUpload.vue.d.ts +11 -0
  21. package/dist/components/BaseUpload/CropModal.vue.d.ts +9 -0
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +1 -1
  24. package/dist/index.js.LICENSE.txt +15 -0
  25. package/example/App.vue +37 -31
  26. package/example/TestImage.vue +6 -0
  27. package/package.json +2 -1
  28. package/src/components/BaseCheckbox/BaseCheckbox.vue +76 -46
  29. package/src/components/BaseRadio/BaseRadio.vue +266 -233
  30. package/src/components/BaseTabs/BaseTabs.vue +193 -0
  31. package/src/components/BaseUpload/BaseUpload.vue +35 -1
  32. package/src/components/BaseUpload/CropModal.vue +210 -0
  33. package/src/index.ts +5 -2
  34. package/src/types/tab.d.ts +17 -0
  35. package/src/types/uploadedFile.d.ts +7 -0
@@ -4,27 +4,23 @@
4
4
  :class="classList"
5
5
  >
6
6
  <div class="base-radio__wrapper" @click="handleToggle">
7
-
8
- <div class="base-radio__input-wrapper">
9
- <input
10
- v-model="model"
11
- v-bind="inputAttrs"
12
- type="radio"
13
- class="base-radio__input"
14
- />
15
- </div>
16
-
17
- <div class="base-radio__icon" />
18
-
7
+ <div class="base-radio__input-wrapper">
8
+ <input
9
+ v-model="model"
10
+ v-bind="inputAttrs"
11
+ type="radio"
12
+ class="base-radio__input"
13
+ />
14
+ <div class="base-radio__icon" />
15
+ </div>
19
16
  <div class="base-radio__label-wrapper">
20
- <span v-if="label" class="base-radio__label">{{ label }}</span>
21
-
22
- <span v-if="subLabel" class="base-radio__sublabel">{{ subLabel }}</span>
23
- </div>
17
+ <span v-if="label" class="base-radio__label">{{ label }}</span>
18
+ <span v-if="subLabel" class="base-radio__sublabel">{{ subLabel }}</span>
19
+ </div>
24
20
  </div>
25
21
  </div>
26
22
  </template>
27
-
23
+
28
24
  <script setup lang="ts">
29
25
  import { computed, useAttrs } from 'vue';
30
26
  import type { IBaseRadioProps } from '../../types/checkbox-radio';
@@ -32,19 +28,19 @@ import { useKitSize } from '../../composables/kit/size'
32
28
  import { useKitState } from '../../composables/kit/state'
33
29
 
34
30
  const props = withDefaults(defineProps<IBaseRadioProps>(), {
35
- size: 'medium',
31
+ size: 'medium',
36
32
  });
37
33
 
38
34
  const emit = defineEmits<{
39
- (e: 'update:modelValue', value: boolean): void;
35
+ (e: 'update:modelValue', value: boolean): void;
40
36
  }>();
41
37
 
42
38
  const { sizeClassList } = useKitSize(props);
43
39
  const { stateClassList, stateAttrs } = useKitState(props);
44
40
 
45
41
  const model = computed({
46
- get: () => props.modelValue,
47
- set: (val) => emit('update:modelValue', val),
42
+ get: () => props.modelValue,
43
+ set: (val) => emit('update:modelValue', val),
48
44
  });
49
45
 
50
46
  const attrs = useAttrs();
@@ -58,226 +54,263 @@ return {
58
54
  });
59
55
 
60
56
  function handleToggle() {
61
- model.value = !model.value;
57
+ model.value = !model.value;
62
58
  }
63
59
 
64
60
  const classList = computed(() => [
65
- sizeClassList.value,
66
- stateClassList.value,
67
- {
68
- '--is-active': model.value,
69
- '--is-readonly': props.readonly,
70
- },
61
+ sizeClassList.value,
62
+ stateClassList.value,
63
+ {
64
+ '--is-active': model.value,
65
+ '--is-readonly': props.readonly,
66
+ },
71
67
  ]);
72
68
  </script>
73
-
69
+
74
70
  <style scoped lang="scss">
75
71
  @import '../../styles/variables';
76
72
  @import '../../styles/root';
77
-
78
- .base-radio {
79
- $item: &;
80
-
81
- &__wrapper {
82
- display: flex;
83
- column-gap: 10px;
84
- width: 100%;
85
- height: 100%;
86
- cursor: pointer;
87
- }
88
-
89
- &__icon {
90
- position: relative;
91
- display: flex;
92
- flex-shrink: 0;
93
- background: var(--primary-black-white);
94
- border-radius: 50%;
95
- transition:
96
- border-color 0.3s ease,
97
- background-color 0.3s ease;
98
-
99
- &::before,
100
- &::after {
101
- position: absolute;
102
- top: 50%;
103
- left: 50%;
104
- width: 100%;
105
- height: 100%;
106
- content: '';
107
- border-radius: 50%;
108
- transform: translate3d(-50%, -50%, 0);
109
- }
110
-
111
- &::before {
112
- background: var(--primary-blue-50);
113
- opacity: 0;
114
- transition: opacity 0.3s ease;
115
- }
116
-
117
- &::after {
118
- background: var(--primary-blue);
119
- opacity: 0;
120
- transition:
121
- opacity 0.3s ease,
122
- transform 0.3s ease;
123
- transform: translate3d(-50%, -50%, 0) scale(0.4);
124
- }
125
- }
126
-
127
- &.--is-readonly {
128
- pointer-events: none;
129
- }
130
-
131
- &.--medium-size {
132
- #{$item} {
133
- &__wrapper {
134
- column-gap: var(--spacing-m);
135
- }
136
-
137
- &__label {
138
- font: var(--typography-text-m-medium);
139
- }
140
-
141
- &__sublabel {
142
- font: var(--typography-text-s-regular);
143
- }
144
-
145
- &__icon {
146
- width: 32px;
147
- height: 32px;
148
- border: 2px solid var(--primary-black-400);
149
-
150
- &::before {
151
- width: calc(100% - 4px);
152
- height: calc(100% - 4px);
153
- }
154
- }
155
- }
156
-
157
- &.--is-active {
158
- #{$item} {
159
- &__icon {
160
- &::after {
161
- width: 13px;
162
- height: 13px;
163
- }
164
- }
165
- }
166
- }
167
- }
168
-
169
- &.--small-size {
170
- #{$item} {
171
- &__wrapper {
172
- column-gap: var(--spacing-s);
173
- }
174
-
175
- &__label {
176
- font: var(--typography-text-s-medium);
177
- }
178
-
179
- &__sublabel {
180
- font: var(--typography-text-xs-regular);
181
- }
182
-
183
- &__icon {
184
- width: 24px;
185
- height: 24px;
186
- border: 1.5px solid var(--primary-black-400);
187
-
188
- &::before {
189
- width: calc(100% - 2px);
190
- height: calc(100% - 2px);
191
- }
192
- }
193
- }
194
-
195
- &.--is-active {
196
- #{$item} {
197
- &__icon {
198
- &::after {
199
- width: 9px;
200
- height: 9px;
201
- }
202
- }
203
- }
204
- }
205
- }
206
-
207
- &__input-wrapper {
208
- position: relative;
209
- cursor: pointer;
210
- transition: all 0.25s ease-out;
211
-
212
- @include focused {
213
- outline: 4px solid var(--effects-primary-focus);
214
- }
215
- }
216
-
217
- &__input {
218
- position: absolute;
219
- inset: 0;
220
- width: 100%;
221
- height: 100%;
222
- cursor: pointer;
223
- opacity: 0 !important;
224
- }
225
-
226
- &__label-wrapper {
227
- display: flex;
228
- flex-direction: column;
229
- justify-content: center;
230
- cursor: pointer;
231
- }
232
-
233
- &__label {
234
- color: var(--primary-text-primary);
235
- user-select: none;
236
- }
237
-
238
- &__sublabel {
239
- color: var(--primary-text-tertiary);
240
- user-select: none;
241
- }
242
-
243
- @include hover {
244
- #{$item} {
73
+
74
+ .base-radio {
75
+ $item: &;
76
+
77
+ &__wrapper {
78
+ display: flex;
79
+ column-gap: 10px;
80
+ width: 100%;
81
+ height: 100%;
82
+ cursor: pointer;
83
+ }
84
+
85
+ &__icon {
86
+ position: relative;
87
+ display: flex;
88
+ flex-shrink: 0;
89
+ background: var(--primary-black-white);
90
+ border-radius: 50%;
91
+ transition:
92
+ border-color 0.3s ease,
93
+ background-color 0.3s ease;
94
+
95
+ @include focused {
96
+ outline: 2px solid var(--effects-primary-focus);
97
+ }
98
+
99
+ &::before,
100
+ &::after {
101
+ position: absolute;
102
+ top: 50%;
103
+ left: 50%;
104
+ width: 100%;
105
+ height: 100%;
106
+ content: '';
107
+ border-radius: 50%;
108
+ transform: translate3d(-50%, -50%, 0);
109
+ }
110
+
111
+ &::before {
112
+ background: var(--primary-blue-50);
113
+ opacity: 0;
114
+ transition: opacity 0.3s ease;
115
+ }
116
+
117
+ &::after {
118
+ background: var(--primary-blue);
119
+ opacity: 0;
120
+ transition:
121
+ opacity 0.3s ease,
122
+ transform 0.3s ease;
123
+ transform: translate3d(-50%, -50%, 0) scale(0.4);
124
+ }
125
+ }
126
+
127
+ &.--is-readonly {
128
+ pointer-events: none;
129
+ }
130
+
131
+ &.--small-size {
132
+ #{$item} {
133
+ &__wrapper {
134
+ column-gap: var(--spacing-s);
135
+ }
136
+
137
+ &__label {
138
+ font: var(--typography-text-s-medium);
139
+ }
140
+
141
+ &__sublabel {
142
+ font: var(--typography-text-xs-regular);
143
+ }
144
+
145
+ &__icon {
146
+ width: 20px;
147
+ height: 20px;
148
+ border: 1.5px solid var(--primary-black-400);
149
+
150
+ &::before {
151
+ width: calc(100% - 2px);
152
+ height: calc(100% - 2px);
153
+ }
154
+ }
155
+ }
156
+
157
+ &.--is-active {
158
+ #{$item} {
159
+ &__icon {
160
+ &::after {
161
+ width: 7.5px;
162
+ height: 7.5px;
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+
169
+ &.--medium-size {
170
+ #{$item} {
171
+ &__wrapper {
172
+ column-gap: var(--spacing-m);
173
+ }
174
+
175
+ &__label {
176
+ font: var(--typography-text-s-medium);
177
+ }
178
+
179
+ &__sublabel {
180
+ font: var(--typography-text-xs-regular);
181
+ }
182
+
183
+ &__icon {
184
+ width: 24px;
185
+ height: 24px;
186
+ border: 1.5px solid var(--primary-black-400);
187
+
188
+ &::before {
189
+ width: calc(100% - 4px);
190
+ height: calc(100% - 4px);
191
+ }
192
+ }
193
+ }
194
+
195
+ &.--is-active {
196
+ #{$item} {
197
+ &__icon {
198
+ &::after {
199
+ width: 9px;
200
+ height: 9px;
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+
207
+ &.--large-size {
208
+ #{$item} {
209
+ &__wrapper {
210
+ column-gap: var(--spacing-l);
211
+ }
212
+
213
+ &__label {
214
+ font: var(--typography-text-m-medium);
215
+ }
216
+
217
+ &__sublabel {
218
+ font: var(--typography-text-s-regular);
219
+ }
220
+
245
221
  &__icon {
246
- background-color: var(--primary-blue-100);
222
+ width: 32px;
223
+ height: 32px;
224
+ border: 2px solid var(--primary-black-400);
225
+
226
+ &::before {
227
+ width: calc(100% - 2px);
228
+ height: calc(100% - 2px);
229
+ }
230
+ }
231
+ }
232
+
233
+ &.--is-active {
234
+ #{$item} {
235
+ &__icon {
236
+ &::after {
237
+ width: 12.8px;
238
+ height: 12.8px;
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+
245
+ &__input-wrapper {
246
+ position: relative;
247
+ cursor: pointer;
248
+ transition: all 0.25s ease-out;
249
+ }
250
+
251
+ &__input {
252
+ position: absolute;
253
+ inset: 0;
254
+ width: 100%;
255
+ height: 100%;
256
+ cursor: pointer;
257
+ opacity: 0 !important;
258
+ }
259
+
260
+ &__label-wrapper {
261
+ display: flex;
262
+ flex-direction: column;
263
+ justify-content: center;
264
+ cursor: pointer;
265
+ }
266
+
267
+ &__label {
268
+ color: var(--primary-text-primary);
269
+ user-select: none;
270
+ }
271
+
272
+ &__sublabel {
273
+ color: var(--primary-text-tertiary);
274
+ user-select: none;
275
+ }
276
+
277
+ @include hover {
278
+ #{$item} {
279
+ &__icon {
280
+ background-color: var(--primary-blue-100);
247
281
  border-color: var(--primary-blue-deep);
248
282
  }
249
- }
250
- }
251
-
252
- &.--is-active {
253
- #{$item} {
254
- &__icon {
255
- border: 2px solid var(--primary-blue);
256
-
257
- &::before {
258
- opacity: 1;
259
- }
260
-
261
- &::after {
262
- opacity: 1;
263
- transform: translate3d(-50%, -50%, 0) scale(1);
264
- }
265
- }
266
- }
267
- }
268
-
269
- @include is-disabled-state {
270
- #{$item} {
271
- &__icon {
272
- background: var(--primary-black-50);
273
- border: 1px solid var(--primary-black-300);
274
-
275
- &::after {
276
- background: var(--primary-black-300);
277
- }
278
- }
279
- }
280
- }
281
- }
282
- </style>
283
-
283
+ }
284
+ }
285
+
286
+ &.--is-active {
287
+ #{$item} {
288
+ &__icon {
289
+ border: 2px solid var(--primary-blue);
290
+
291
+ &::before {
292
+ opacity: 1;
293
+ }
294
+
295
+ &::after {
296
+ opacity: 1;
297
+ transform: translate3d(-50%, -50%, 0) scale(1);
298
+ }
299
+ }
300
+ }
301
+ }
302
+
303
+ @include is-disabled-state {
304
+ #{$item} {
305
+ &__icon {
306
+ background: var(--primary-black-50);
307
+ border: 1px solid var(--primary-black-300);
308
+
309
+ &::after {
310
+ background: var(--primary-black-300);
311
+ }
312
+ }
313
+ }
314
+ }
315
+ }
316
+ </style>