plugin-ui-for-kzt 0.0.19 → 0.0.21

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/example/App.vue CHANGED
@@ -1,156 +1,43 @@
1
1
  <template>
2
2
  <div class="demo-page">
3
3
  <h1>Plugin UI KZT - Компоненты</h1>
4
- <p>Ниже представлены все компоненты библиотеки с примерами их использования.</p>
5
4
  <section>
6
- <base-site-input
7
- id="phone-input"
8
- v-model="phoneNumber"
9
- size="large"
10
- placeholder="Введите номер телефона"
11
- :error="phoneError"
12
- hint="Номер телефона должен быть не менее 5 символов"
13
- />
14
- </section>
15
- <section>
16
- <h2>BaseBadgeGroup.vue</h2>
17
-
18
- <base-badge-group
19
- size="medium"
20
- color="primary"
21
- badge-position="right"
22
- >
23
- <template #badge-text-container>
24
- New feature
25
- </template>
26
- <template #badge-text>
27
- We’ve just released a new feature
28
- </template>
29
- </base-badge-group>
30
- <base-badge-group
31
- size="large"
32
- color="gray"
33
- arrowRightIcon
34
- >
35
- <template #badge-text-container>
36
- New feature
37
- </template>
38
- <template #badge-text>
39
- We’ve just released a new feature
40
- </template>
41
- </base-badge-group>
42
- </section>
43
- <section>
44
- <h2>BaseBadge.vue</h2>
45
- <base-badge
5
+ <base-segmented-buttons
6
+ v-model="currentSlide"
7
+ :options="options"
46
8
  size="extra-small"
47
- color="primary"
48
- class="badge-example"
49
- closable
50
- >
51
- <template #text>Пример бейджа</template>
52
- </base-badge>
53
- <base-badge
9
+ />
10
+ <br/>
11
+ <base-segmented-buttons
12
+ v-model="currentSlide"
13
+ :options="options"
54
14
  size="small"
55
- color="gray"
56
- class="badge-example"
57
- has-dot
58
- >
59
- <template #text>Пример бейджа</template>
60
- </base-badge>
61
- <base-badge
15
+ />
16
+ <br/>
17
+ <base-segmented-buttons
18
+ v-model="currentSlide"
19
+ :options="options"
62
20
  size="medium"
63
- color="error"
64
- class="badge-example"
65
- arrow-up-icon
66
- >
67
- <template #text>Пример бейджа</template>
68
- </base-badge>
69
- <base-badge
70
- size="large"
71
- color="warning"
72
- class="badge-example"
73
- arrow-right-icon
74
- >
75
- <template #text>Пример бейджа</template>
76
- </base-badge>
77
- <base-badge
21
+ />
22
+ <br/>
23
+ <base-segmented-buttons
24
+ v-model="currentSlide"
25
+ :options="options"
78
26
  size="large"
79
- color="success"
80
- class="badge-example"
81
- >
82
- <template #text>
83
- <base-icon size="custom" name="help"></base-icon>
84
- </template>
85
- </base-badge>
86
- </section>
87
-
88
- <section>
89
- <h2>BaseUpload.vue</h2>
90
- <base-upload
91
- :accepted-formats="accept"
92
- >
93
- <template #title>my title</template>
94
- </base-upload>
95
- </section>
96
-
97
- <section>
98
- <div>
99
- <base-swiper
100
- :images="[
101
- 'https://i0.wp.com/vasilemovileanu.com/wp-content/uploads/2018/09/Autumn.-2001.-Oil-on-canvas-65-x-60-cm.jpg?fit=1231%2C1400&ssl=1',
102
- 'https://i.pinimg.com/originals/00/1b/7b/001b7bc4a4cd9132918accae2c7d5c23.png',
103
- 'https://i.pinimg.com/736x/90/71/bc/9071bcfb179dafd923d0f90653338ea1.jpg'
104
- ]"
105
- :paginationSettings="{ type: 'dotsWithBackground', color: 'primary' }"
106
- v-model:current-slide="currentSlide"
107
- />
108
- <!-- :autoplay="true"
109
- :autoplay-interval="2000" -->
110
- </div>
111
- <section>
112
- medium size
113
- <base-textarea class="text-area" size="medium" placeholder="test"></base-textarea>
114
- </section>
115
- </section>
116
- <section style="height: 300px;">
117
- <p></p>
118
- <base-textarea class="text-area" size="custom" placeholder="test"></base-textarea>
119
- </section>
120
-
121
- <section>
122
- <div>
123
- <base-button @click="openModal">Открыть модал</base-button>
124
- </div>
27
+ />
125
28
  </section>
126
29
  </div>
127
30
  </template>
128
31
  <script setup lang="ts">
129
- import { ref, watch } from 'vue';
130
- import { useModal } from '../src/composables/useModal';
131
- import MyCustomModal from './MyCustomModal.vue';
132
-
133
- const accept = ['.jpg', '.pdf']
134
- const phoneNumber = ref('');
135
- const phoneError = ref('');
136
- watch(phoneNumber, (newValue) => {
137
- console.log('Новый номер телефона:', newValue.length);
138
- if (newValue.length > 17) {
139
- console.log('Номер телефона должен быть не менее 5 символов');
140
- phoneError.value = 'Некорректный номер телефона';
141
- } else {
142
- console.log('Номер телефона корректен');
143
- phoneError.value = '';
144
- }
145
- });
146
-
147
- const modal = useModal();
32
+ import { ref } from 'vue';
148
33
 
149
- const openModal = () => {
150
- modal.open('myModal', { closable: true }, MyCustomModal);
151
- };
34
+ const options = [
35
+ { value: '0', label: 'Компоненты', disabled: true },
36
+ { value: '1', label: 'Композиции' },
37
+ { value: '2', label: 'Стили' },
38
+ ];
152
39
 
153
- const currentSlide = ref(0);
40
+ const currentSlide = ref('0');
154
41
  </script>
155
42
 
156
43
  <style lang="scss" scoped>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugin-ui-for-kzt",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "plugin-ui for kazaktelekom",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -5,6 +5,7 @@
5
5
  v-for="option in options"
6
6
  :key="option.value"
7
7
  v-bind="buttonAttrs"
8
+ :disabled="option.disabled"
8
9
  :color="modelValue === option.value ? 'primary' : 'secondary'"
9
10
  @click="handleClick(option.value)"
10
11
  >
@@ -5,6 +5,7 @@ export type ICoreButtonProps = ICoreSize & ICoreColor & ICoreInteractive & ICore
5
5
  interface IOptionButtonSegment {
6
6
  label: string;
7
7
  value: string;
8
+ disabled?: boolean;
8
9
  }
9
10
 
10
11
  export type TSegmentedButtonsProps = ICoreButtonProps & {