demoCodeExpansionPanel.js
12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
97
98
99
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
133
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
export const accordion = { ts: `<template>
<VExpansionPanels variant="accordion">
<VExpansionPanel
v-for="item in 4"
:key="item"
>
<VExpansionPanelTitle>
Accordion {{ item }}
</VExpansionPanelTitle>
<VExpansionPanelText>
Sweet roll ice cream chocolate bar. Ice cream croissant sugar plum I love cupcake gingerbread liquorice cake. Bonbon tart caramels marshmallow chocolate cake icing icing danish pie.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
`, js: `<template>
<VExpansionPanels variant="accordion">
<VExpansionPanel
v-for="item in 4"
:key="item"
>
<VExpansionPanelTitle>
Accordion {{ item }}
</VExpansionPanelTitle>
<VExpansionPanelText>
Sweet roll ice cream chocolate bar. Ice cream croissant sugar plum I love cupcake gingerbread liquorice cake. Bonbon tart caramels marshmallow chocolate cake icing icing danish pie.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
` }
export const basic = { ts: `<template>
<VExpansionPanels multiple>
<VExpansionPanel
v-for="i in 4"
:key="i"
>
<VExpansionPanelTitle>
Item {{ i }}
</VExpansionPanelTitle>
<VExpansionPanelText>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
`, js: `<template>
<VExpansionPanels multiple>
<VExpansionPanel
v-for="i in 4"
:key="i"
>
<VExpansionPanelTitle>
Item {{ i }}
</VExpansionPanelTitle>
<VExpansionPanelText>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
` }
export const customIcon = { ts: `<script setup lang="ts">
const panel = ref(0)
</script>
<template>
<VExpansionPanels v-model="panel">
<VExpansionPanel>
<VExpansionPanelTitle disable-icon-rotate>
Server Down
<template #actions>
<VIcon
icon="ri-error-warning-line"
color="error"
/>
</template>
</VExpansionPanelTitle>
<VExpansionPanelText>
Gummies biscuit dessert macaroon liquorice carrot cake oat cake jelly beans cake. Candy wafer tiramisu sugar plum sweet. Ice cream topping gummies biscuit soufflé marzipan topping brownie marshmallow. Chocolate cake cookie pudding gummies cotton candy ice cream. Pie liquorice marzipan cake carrot cake macaroon jelly toffee. Lollipop donut gummi bears caramels icing marzipan.
</VExpansionPanelText>
</VExpansionPanel>
<VExpansionPanel>
<VExpansionPanelTitle disable-icon-rotate>
Sales report generated
<template #actions>
<VIcon
icon="ri-check-line"
color="success"
/>
</template>
</VExpansionPanelTitle>
<VExpansionPanelText>
Bear claw ice cream icing gummies gingerbread cotton candy tootsie roll cupcake macaroon. Halvah brownie soufflé. Pie dragée macaroon. Tart tootsie roll chocolate bar biscuit jujubes lemon drops. Pudding cotton candy tart jelly-o bear claw lollipop. Jelly-o apple pie candy bonbon chupa chups cupcake cotton candy. Sweet roll cotton candy toffee caramels. Jelly-o chocolate cake toffee pastry halvah. Muffin tiramisu ice cream danish jelly-o brownie powde
</VExpansionPanelText>
</VExpansionPanel>
<VExpansionPanel>
<VExpansionPanelTitle disable-icon-rotate>
High Memory usage
<template #actions>
<VIcon
icon="ri-alert-line"
color="warning"
/>
</template>
</VExpansionPanelTitle>
<VExpansionPanelText>
Jelly beans wafer lemon drops macaroon muffin gummies muffin. Ice cream oat cake chocolate bar sesame snaps. Halvah macaroon caramels gummies. Marshmallow jelly beans danish. Cake chocolate cake tiramisu chocolate bar sugar plum biscuit jelly danish. Pudding gummi bears sesame snaps cake soufflé ice cream chocolate bar. Cotton candy ice cream danish chocolate cake topping ice cream. Brownie muffin gingerbread.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
`, js: `<script setup>
const panel = ref(0)
</script>
<template>
<VExpansionPanels v-model="panel">
<VExpansionPanel>
<VExpansionPanelTitle disable-icon-rotate>
Server Down
<template #actions>
<VIcon
icon="ri-error-warning-line"
color="error"
/>
</template>
</VExpansionPanelTitle>
<VExpansionPanelText>
Gummies biscuit dessert macaroon liquorice carrot cake oat cake jelly beans cake. Candy wafer tiramisu sugar plum sweet. Ice cream topping gummies biscuit soufflé marzipan topping brownie marshmallow. Chocolate cake cookie pudding gummies cotton candy ice cream. Pie liquorice marzipan cake carrot cake macaroon jelly toffee. Lollipop donut gummi bears caramels icing marzipan.
</VExpansionPanelText>
</VExpansionPanel>
<VExpansionPanel>
<VExpansionPanelTitle disable-icon-rotate>
Sales report generated
<template #actions>
<VIcon
icon="ri-check-line"
color="success"
/>
</template>
</VExpansionPanelTitle>
<VExpansionPanelText>
Bear claw ice cream icing gummies gingerbread cotton candy tootsie roll cupcake macaroon. Halvah brownie soufflé. Pie dragée macaroon. Tart tootsie roll chocolate bar biscuit jujubes lemon drops. Pudding cotton candy tart jelly-o bear claw lollipop. Jelly-o apple pie candy bonbon chupa chups cupcake cotton candy. Sweet roll cotton candy toffee caramels. Jelly-o chocolate cake toffee pastry halvah. Muffin tiramisu ice cream danish jelly-o brownie powde
</VExpansionPanelText>
</VExpansionPanel>
<VExpansionPanel>
<VExpansionPanelTitle disable-icon-rotate>
High Memory usage
<template #actions>
<VIcon
icon="ri-alert-line"
color="warning"
/>
</template>
</VExpansionPanelTitle>
<VExpansionPanelText>
Jelly beans wafer lemon drops macaroon muffin gummies muffin. Ice cream oat cake chocolate bar sesame snaps. Halvah macaroon caramels gummies. Marshmallow jelly beans danish. Cake chocolate cake tiramisu chocolate bar sugar plum biscuit jelly danish. Pudding gummi bears sesame snaps cake soufflé ice cream chocolate bar. Cotton candy ice cream danish chocolate cake topping ice cream. Brownie muffin gingerbread.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
` }
export const customizedAccordion = { ts: `<template>
<VExpansionPanels
variant="accordion"
class="customized-panels"
>
<VExpansionPanel
v-for="item in 4"
:key="item"
elevation="0"
>
<VExpansionPanelTitle
collapse-icon="ri-subtract-line"
expand-icon="ri-add-line"
>
Accordion {{ item }}
</VExpansionPanelTitle>
<VExpansionPanelText>
Sweet roll ice cream chocolate bar. Ice cream croissant sugar plum I love cupcake gingerbread liquorice cake. Bonbon tart caramels marshmallow chocolate cake icing icing danish pie.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
`, js: `<template>
<VExpansionPanels
variant="accordion"
class="customized-panels"
>
<VExpansionPanel
v-for="item in 4"
:key="item"
elevation="0"
>
<VExpansionPanelTitle
collapse-icon="ri-subtract-line"
expand-icon="ri-add-line"
>
Accordion {{ item }}
</VExpansionPanelTitle>
<VExpansionPanelText>
Sweet roll ice cream chocolate bar. Ice cream croissant sugar plum I love cupcake gingerbread liquorice cake. Bonbon tart caramels marshmallow chocolate cake icing icing danish pie.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
` }
export const inset = { ts: `<template>
<VExpansionPanels variant="inset">
<VExpansionPanel
v-for="item in 4"
:key="item"
>
<VExpansionPanelTitle>Inset {{ item }}</VExpansionPanelTitle>
<VExpansionPanelText>
Chocolate bar sweet roll chocolate cake pastry I love gummi bears pudding chocolate cake. I love brownie powder apple pie sugar plum I love cake candy canes wafer. Tiramisu I love oat cake oat cake danish icing. Dessert sugar plum sugar plum cookie donut chocolate cake oat cake I love gummi bears.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
`, js: `<template>
<VExpansionPanels variant="inset">
<VExpansionPanel
v-for="item in 4"
:key="item"
>
<VExpansionPanelTitle>Inset {{ item }}</VExpansionPanelTitle>
<VExpansionPanelText>
Chocolate bar sweet roll chocolate cake pastry I love gummi bears pudding chocolate cake. I love brownie powder apple pie sugar plum I love cake candy canes wafer. Tiramisu I love oat cake oat cake danish icing. Dessert sugar plum sugar plum cookie donut chocolate cake oat cake I love gummi bears.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
` }
export const model = { ts: `<script lang="ts" setup>
const openedPanels = ref<number[]>([])
const items = ref(5)
const all = () => {
// [...Array(5).keys()] => [0, 1, 2, 3, 4]
openedPanels.value = [...Array(items.value).keys()]
}
const none = () => {
openedPanels.value = []
}
</script>
<template>
<div>
<div class="mb-4">
<VBtn
class="me-4"
@click="all"
>
all
</VBtn>
<VBtn
color="error"
@click="none"
>
none
</VBtn>
<div class="mt-3">
<span class="font-weight-medium">Selected: </span>{{ openedPanels }}
</div>
</div>
<VExpansionPanels
v-model="openedPanels"
multiple
>
<VExpansionPanel
v-for="item in items"
:key="item"
>
<VExpansionPanelTitle>Header {{ item }}</VExpansionPanelTitle>
<VExpansionPanelText>
I love I love jujubes halvah cheesecake cookie macaroon sugar plum. Sugar plum I love bear claw marzipan wafer. Wafer sesame snaps danish candy cheesecake carrot cake tootsie roll.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</div>
</template>
`, js: `<script setup>
const openedPanels = ref([])
const items = ref(5)
const all = () => {
// [...Array(5).keys()] => [0, 1, 2, 3, 4]
openedPanels.value = [...Array(items.value).keys()]
}
const none = () => {
openedPanels.value = []
}
</script>
<template>
<div>
<div class="mb-4">
<VBtn
class="me-4"
@click="all"
>
all
</VBtn>
<VBtn
color="error"
@click="none"
>
none
</VBtn>
<div class="mt-3">
<span class="font-weight-medium">Selected: </span>{{ openedPanels }}
</div>
</div>
<VExpansionPanels
v-model="openedPanels"
multiple
>
<VExpansionPanel
v-for="item in items"
:key="item"
>
<VExpansionPanelTitle>Header {{ item }}</VExpansionPanelTitle>
<VExpansionPanelText>
I love I love jujubes halvah cheesecake cookie macaroon sugar plum. Sugar plum I love bear claw marzipan wafer. Wafer sesame snaps danish candy cheesecake carrot cake tootsie roll.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</div>
</template>
` }
export const popout = { ts: `<template>
<VExpansionPanels variant="popout">
<VExpansionPanel
v-for="item in 4"
:key="item"
>
<VExpansionPanelTitle>Popout {{ item }}</VExpansionPanelTitle>
<VExpansionPanelText>
Cupcake ipsum dolor sit amet. Candy canes cheesecake chocolate bar I love I love jujubes gummi bears ice cream. Cheesecake tiramisu toffee cheesecake sugar plum candy canes bonbon candy.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
`, js: `<template>
<VExpansionPanels variant="popout">
<VExpansionPanel
v-for="item in 4"
:key="item"
>
<VExpansionPanelTitle>Popout {{ item }}</VExpansionPanelTitle>
<VExpansionPanelText>
Cupcake ipsum dolor sit amet. Candy canes cheesecake chocolate bar I love I love jujubes gummi bears ice cream. Cheesecake tiramisu toffee cheesecake sugar plum candy canes bonbon candy.
</VExpansionPanelText>
</VExpansionPanel>
</VExpansionPanels>
</template>
` }