plugin-ui-for-kzt 0.0.20 → 0.0.22

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,198 +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
- <BaseField
7
- size="large"
8
- id="BaseInputEmail"
9
- label="BaseInputEmail"
10
- :focusable="false"
11
- :tabIndex="8"
12
- :error="errorValue"
13
- >
14
- <template #default="data">
15
- <BaseInputEmail
16
- id="BaseInputEmail"
17
- v-model="calendarModel"
18
- label="Select date hereBaseInputEmail"
19
- placeholder="Select date"
20
- :error="data.error"
21
- :size="data.size"
22
- />
23
- </template>
24
- </BaseField>
25
- <BaseField
26
- size="small"
27
- id="calendar-input"
28
- label="calendar Input"
29
- :tabIndex="7"
30
- :error="errorValue"
31
- >
32
- <template #default="data">
33
- <base-input-calendar
34
- id="calendar"
35
- v-model="calendarModel"
36
- label="Select date here"
37
- :size="data.size"
38
- placeholder="Select date"
39
- :error="data.error"
40
- :min-date="new Date()"
41
- @validationError="handleError"
42
- />
43
- </template>
44
- </BaseField>
45
- <BaseField
46
- size="medium"
47
- id="textarea-input"
48
- label="text Input"
49
- :tabIndex="6"
50
- :error="errorValue"
51
- >
52
- <template #default="data">
53
- <BaseTextarea
54
- :size="data.size"
55
- v-model="inputValue"
56
- id="textarea-input"
57
- :error="data.error"
58
- >
59
- </BaseTextarea>
60
- </template>
61
- </BaseField>
62
- <BaseField
63
- size="medium"
64
- id="select-input"
65
- label="select input"
66
- :tabIndex="5"
67
- :error="errorValue"
68
- >
69
- <template #default="data">
70
- <BaseSelect
71
- :size="data.size"
72
- v-model="selectValue"
73
- :options="options"
74
- id="select-input"
75
- :error="data.error"
76
- >
77
- <template #left-icon>
78
- <BaseIcon name="star" />
79
- </template>
80
- <template #right-icon>
81
- <BaseIcon name="close" />
82
- </template>
83
- </BaseSelect>
84
- </template>
85
- </BaseField>
86
- <BaseField
87
- size="medium"
88
- id="BaseInput "
89
- label="BaseInput "
90
- :tabIndex="0"
91
- :error="errorValue"
92
- >
93
- <template #default="data">
94
- <BaseInput
95
- :size="data.size"
96
- v-model="inputValue"
97
- type="text"
98
- placeholder="Type here"
99
- id="BaseInput "
100
- :error="data.error"
101
- >
102
- <template #left-icon>
103
- <BaseIcon name="star" />
104
- </template>
105
- <template #right-icon>
106
- <BaseIcon name="close" />
107
- </template>
108
- </BaseInput>
109
- </template>
110
- </BaseField>
111
- <BaseField
112
- size="medium"
113
- id="input-phone"
114
- label="input-phone"
115
- :tabIndex="1"
116
- :error="errorValue"
117
- >
118
- <template #default="data">
119
- <BaseInputPhone
120
- :size="data.size"
121
- v-model="inputValue4"
122
- type="text"
123
- placeholder="Type here"
124
- id="phone-input"
125
- :error="`${data.error}`"
126
- :focusable="false"
127
- />
128
- </template>
129
- </BaseField>
130
-
131
- <BaseField
132
- size="medium"
133
- id="BaseInputCurrency"
134
- label="BaseInputCurrency"
135
- :tabIndex="2"
136
- :error="errorValue"
137
- >
138
- <template #default="data">
139
- <BaseInputCurrency
140
- :size="data.size"
141
- v-model="inputValue3"
142
- type="text"
143
- placeholder="Type here"
144
- id="BaseInputCurrency"
145
- :error="`${data.error}`"
146
- />
147
- </template>
148
- </BaseField>
149
-
150
- <BaseField
151
- size="medium"
152
- id="BaseSiteInput"
153
- label="BaseSiteInput"
154
- :tabIndex="3"
155
- :focusable="false"
156
- :error="errorValue"
157
- >
158
- <template #default="data">
159
- <BaseSiteInput
160
- :size="data.size"
161
- v-model="inputValue3"
162
- placeholder="write site url"
163
- id="BaseSiteInput"
164
- :error="`${data.error}`"
165
- />
166
- </template>
167
- </BaseField>
168
-
5
+ <base-segmented-buttons
6
+ v-model="currentSlide"
7
+ :options="options"
8
+ size="extra-small"
9
+ />
10
+ <br/>
11
+ <base-segmented-buttons
12
+ v-model="currentSlide"
13
+ :options="options"
14
+ size="small"
15
+ />
16
+ <br/>
17
+ <base-segmented-buttons
18
+ v-model="currentSlide"
19
+ :options="options"
20
+ size="medium"
21
+ />
22
+ <br/>
23
+ <base-segmented-buttons
24
+ v-model="currentSlide"
25
+ :options="options"
26
+ size="large"
27
+ />
169
28
  </section>
170
29
  </div>
171
30
  </template>
172
31
  <script setup lang="ts">
173
- import { ref, watch } from 'vue';
32
+ import { ref } from 'vue';
174
33
 
175
- const inputValue = ref('as');
176
- const selectValue = ref('');
177
- const options = ref([
178
- { id: '1', name: 'Option 1', value: 'option1' },
179
- { id: '2', name: 'Option 2', value: 'option2' },
180
- { id: '3', name: 'Option 3', value: 'option3' },
181
- ]);
182
- const inputValue3 = ref('');
183
- const calendarModel = ref('');
184
- const inputValue4 = ref('');
185
- const errorValue = ref('');
186
- errorValue.value = errorValue.value.length < 3 ? 'Input must be at least 3 characters long' : '';
187
- watch(inputValue, (newValue) => {
188
- console.log('Input 1 value changed:', newValue);
189
- errorValue.value = newValue.length < 3 ? 'Input must be at least 3 characters long' : '';
190
- });
34
+ const options = [
35
+ { value: '0', label: 'Компоненты', disabled: true },
36
+ { value: '1', label: 'Композиции' },
37
+ { value: '2', label: 'Стили' },
38
+ ];
191
39
 
192
- const handleError = (value: string) => {
193
- console.error('Validation error:', value);
194
- errorValue.value = value;
195
- };
40
+ const currentSlide = ref('0');
196
41
  </script>
197
42
 
198
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.20",
3
+ "version": "0.0.22",
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 & {