Newer
Older

Дмитрий Малюгин
committed
<script setup lang="ts">
import Modal from '@stories/components/Modal/Modal.vue';
import ToggleSwitch from '@stories/components/ToggleSwitch/ToggleSwitch.vue';
import AnchorLinkIcon from '@stories/icons/Mono/AnchorLinkIcon.vue';
import SelectButton from '@stories/components/SelectButton/SelectButton.vue';
import Drawer from '@stories/components/Drawer/Drawer.vue';
import Slider from '@stories/components/Slider/Slider.vue';
import TrashIcon from '@stories/icons/Mono/TrashIcon.vue';
import CrossIcon from '@stories/icons/Mono/CrossIcon.vue';
import Button from '@stories/components/Button/Button.vue';
import MenuDial from '@stories/components/MenuDial/MenuDial.vue';
import Popup from '@stories/components/Popup/Popup.vue';
import Table from '@stories/components/Table/Table.vue';
import { ref } from 'vue';
import type { ISBOption, ISliderOptions, ITableColumn } from '@interfaces/componentsProp';
import Checkbox from '@stories/components/Checkbox/Checkbox.vue';
import Tag from '@stories/components/Tag/Tag.vue';

Дмитрий Малюгин
committed
import Select from '@stories/components/Select/Select.vue';
import AtIcon from '@stories/icons/Mono/AtIcon.vue';

Дмитрий Малюгин
committed
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
const visibleDrawer = ref(false);
const sliderOptions: ISliderOptions[] = [
{
label: 0,
value: 0,
color: 'red',
},
{
label: 2,
value: 2,
color: 'orange',
},
{
label: 4,
value: 4,
color: 'yellow',
},
{
label: 6,
value: 6,
color: 'green',
},
{
label: 8,
value: 8,
color: 'sky',
},
{
label: 10,
value: 10,
color: 'purple',
},
{
label: 12,
value: 12,
color: 'purple',
},
{
label: 14,
value: 14,
color: 'purple',
},
{
label: 16,
value: 16,
color: 'purple',
},
{
label: 18,
},
];
const options: ISBOption[] = [
{
label: 'First',
textStyle: 'bold',
iconPosition: 'top',
},
{
label: 'Second',
},
];
const visible = ref(false);
const onClose = () => console.log('close!');
const value = ref();
const active = ref(false);
const popupActive = ref(false);
const popupActive2 = ref(false);
const sliderValue = ref(1);
const tableColumns: ITableColumn[] = [
{
name: 'Name',
type: 'text',
},
{
name: 'Age',

Дмитрий Малюгин
committed
filterable: true,

Дмитрий Малюгин
committed
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
},
{
name: 'Hobbies',
type: 'text',
padding: '30px',
filterable: true,
sortable: true,
},
{
name: 'Country',
type: 'text',
},
];
const tableData = [
[
{
value: 'Pete',
},
{
value: '30',
},
{
value: 'Chess',
},
{
value: 'USA',
},
],
[
{
value: 'John',
},
{

Дмитрий Малюгин
committed
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
},
{
value: 'Football',
},
{
value: 'Canada',
},
],
[
{
value: 'Дима',
},
{
value: '22',
},
{
value: 'Frontend',
},
{
value: 'Russia',
},
],
[
{
value: 'Ксюша',
},
{
value: '32',
},
{
value: 'Frontend',
},
{
value: 'Russia',
},
],
[
{
value: 'Ксюша',
},
{
value: '32',
},
{
value: 'Backend',
},
{
value: 'Russia',
},
],
];

Дмитрий Малюгин
committed
const selectOptions = [
{
value: 'First',
},
{
value: 'Second',
},
];

Дмитрий Малюгин
committed
</script>
<template>
<h2 class="title gradient-text">Playground</h2>

Дмитрий Малюгин
committed
<Select :options="selectOptions" theme="sky">
<template #icon-left-First>
<AtIcon color="#3aa" size="20" />
</template>
</Select>
<Tag theme="sky">
<template #icon-right><TrashIcon color="#3333aa" size="18" /></template>
</Tag>
{{ activeCheckbox }}
<Checkbox v-model:active="activeCheckbox" size="small" />
<Checkbox v-model:active="activeCheckbox" />
<Checkbox v-model:active="activeCheckbox" size="large" />
<Checkbox v-model:active="activeCheckbox" size="huge" />
<Table
show-all-lines
:columns="tableColumns"
darknessTextColor="500"
:data="tableData"
fontSize="36px"
theme="black"
stripedRows
></Table>

Дмитрий Малюгин
committed
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<Table
show-all-lines
:columns="tableColumns"
darknessTextColor="500"
:data="tableData"
fontSize="20px"
theme="black"
stripedRows
></Table>
<button class="testButton" @click="visibleDrawer = !visibleDrawer">Нажми меня</button>
<div class="hui" style="width: 500px; height: 500px; background-color: gray"></div>
<Popup v-model:active="popupActive" parentSelector=".hui" theme="sky">
<Button
@click="
() => {
popupActive = false;
visible = true;
}
"
label="Открыть модальное окно"
/>
</Popup>
<Popup v-model:active="popupActive2" theme="sky"
>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet fugiat harum maiores placeat soluta, vel velit
voluptas. Accusamus aut, error et minima neque praesentium, ratione, reprehenderit repudiandae saepe ut vero! Lorem
ipsum dolor sit amet, consectetur adipisicing elit. Amet fugiat harum maiores placeat soluta, vel velit voluptas.
Accusamus aut, error et minima neque praesentium, ratione, reprehenderit repudiandae saepe ut vero!</Popup
>
<Modal v-model:visible="visible" theme="red" @onClose="onClose"
><template #header>huuuuuuuuuuui</template>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque
explicabo, facere fuga hic id impedit magnam maiores minima necessitatibus, nemo nesciunt nihil officia, pariatu
nemo nesciunt nihil officia, pariatur praesentium quas quisquam repellat saepe temporibus? Lorem ipsum dolor sit
amet, consectetur adipisicing elit. Eaque explicabo, facere fuga hic id impedit magnam maiores minima
necessitatibus, nemo nesciunt nihil officia, pariatu nemo nesciunt nihil officia, pariatur praesentium quas quisquam
repellat saepe temporibus?</Modal
>
<MenuDial
v-model:active="active"
theme="sky"
direction="right"
darknessTheme="600"
:items="[
{
label: 'font-family',
theme: 'green',
color: 'red',
darknessColor: '500',
link: 'https://developer.mozilla.org/en-US/docs/Web/CSS/font-family',
linkBlank: true,
textStyle: 'bold',
},
{
label: 'Second',
theme: 'red',
color: 'sky',
darknessColor: '500',
darknessTheme: '600',
textStyle: 'italic',
},
]"
>
<template #1IconBefore>
<AnchorLinkIcon size="20" color="white" />
</template>
<template #2IconBefore>
<CrossIcon color="white" />
</template>
<template #2IconAfter>
<CrossIcon color="white" />
</template>
</MenuDial>
<Slider
v-model:value="sliderValue"
:options="sliderOptions"
width="400"
min="0"
max="18"
step="2"
backgroundColor="black"
theme="blue"
isSmooth
/>
<Button @click="visible = true" textColor="white" theme="sky" label="I'm a button"></Button>
<SelectButton :options="options" size="large" v-model:value="value">
<template #1Icon>
<TrashIcon />
</template>
</SelectButton>
<ToggleSwitch />
<Drawer v-model:visible="visibleDrawer" theme="sky" :dismissible="false" closeIcon="CropIcon">
<template #header>Это - Drawer</template>
<p>
pizdwertyuki lokl,kmjhgfwewesrdty ukilo,kmjngeartyukikdhgfgjhklj.,kga Lorem ipsum dolor sit amet, consectetur
adipisicing elit. Amet deleniti, esse in ipsam quis sapiente tempore voluptas. Aperiam dignissimos enim, fuga
fugit, modi, nam necessitatibus numquam obcaecati omnis recusandae voluptatibus! Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Atque blanditiis consectetur cum delectus ducimus eius est hic incidunt iusto
molestiae odio optio reiciendis reprehenderit saepe tempora vel, veniam veritatis voluptates. Lorem ipsum dolor
sit amet, consectetur adipisicing elit. Ducimus expedita laboriosam nesciunt voluptatum! Ab animi illum impedit
iusto libero magni maxime molestias nisi nobis possimus provident quia repellat, rerum suscipit. Lorem ipsum dolor
sit amet, consectetur adipisicing elit. Autem modi ratione reiciendis. Cupiditate deserunt eaque eum labore qui
rem? Consequatur corporis, dolorem doloremque eveniet facilis obcaecati quasi repellat vel velit. pizdwertyuki
lokl,kmjhgfwewesrdty ukilo,kmjngeartyukikdhgfgjhklj.,kga Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Amet deleniti, esse in ipsam quis sapiente tempore voluptas. Aperiam dignissimos enim, fuga fugit, modi, nam
necessitatibus numquam obcaecati omnis recusandae voluptatibus! Lorem ipsum dolor sit amet, consectetur
adipisicing elit. Atque blanditiis consectetur cum delectus ducimus eius est hic incidunt iusto molestiae odio
optio reiciendis reprehenderit saepe tempora vel, veniam veritatis voluptates. Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque explicabo, facere
fuga hic id impedit magnam maiores minima necessitatibus, nemo nesciunt nihil officia, pariatu nemo nesciunt nihil
officia, pariatur praesentium quas quisquam repellat saepe temporibus?
</p>
<template #footer> pizdwertyukilokl,kmjhgfw ewesrdtyukilo,kmjng eartyukikdhgfgjhklj.,kga</template></Drawer
>
</template>
<style scoped>
.title {
font-size: 48px;
width: max-content;
margin: 0 auto 40px auto;
}
.testButton {
background-color: red;
margin-bottom: 30px;
color: white;
padding: 10px;
border-radius: 5px;
}
.gradient-text {
background: linear-gradient(to right, hotpink, yellow, dodgerblue);
background-clip: text;
color: transparent;
}
</style>