@primevue/mcp 4.5.5 → 5.0.0-rc.2
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/LICENSE.md +45 -21
- package/README.md +48 -250
- package/data/components.json +47269 -0
- package/data/llms/components/accordion.md +629 -0
- package/data/llms/components/animateonscroll.md +165 -0
- package/data/llms/components/autocomplete.md +995 -0
- package/data/llms/components/avatar.md +264 -0
- package/data/llms/components/badge.md +200 -0
- package/data/llms/components/blockui.md +99 -0
- package/data/llms/components/breadcrumb.md +269 -0
- package/data/llms/components/button.md +902 -0
- package/data/llms/components/card.md +209 -0
- package/data/llms/components/carousel.md +506 -0
- package/data/llms/components/cascadeselect.md +1207 -0
- package/data/llms/components/chart.md +1022 -0
- package/data/llms/components/checkbox.md +401 -0
- package/data/llms/components/chip.md +206 -0
- package/data/llms/components/colorpicker.md +213 -0
- package/data/llms/components/commandmenu.md +660 -0
- package/data/llms/components/compare.md +407 -0
- package/data/llms/components/confirmdialog.md +343 -0
- package/data/llms/components/confirmpopup.md +252 -0
- package/data/llms/components/contextmenu.md +522 -0
- package/data/llms/components/datatable.md +5266 -0
- package/data/llms/components/dataview.md +569 -0
- package/data/llms/components/datepicker.md +964 -0
- package/data/llms/components/deferredcontent.md +96 -0
- package/data/llms/components/dialog.md +702 -0
- package/data/llms/components/divider.md +152 -0
- package/data/llms/components/dock.md +488 -0
- package/data/llms/components/drawer.md +469 -0
- package/data/llms/components/dynamicdialog.md +214 -0
- package/data/llms/components/editor.md +205 -0
- package/data/llms/components/fieldset.md +253 -0
- package/data/llms/components/fileupload.md +459 -0
- package/data/llms/components/floatlabel.md +144 -0
- package/data/llms/components/fluid.md +104 -0
- package/data/llms/components/focustrap.md +59 -0
- package/data/llms/components/forms.md +344 -0
- package/data/llms/components/galleria.md +1119 -0
- package/data/llms/components/gallery.md +1003 -0
- package/data/llms/components/iconfield.md +283 -0
- package/data/llms/components/iftalabel.md +96 -0
- package/data/llms/components/image.md +179 -0
- package/data/llms/components/imagecompare.md +108 -0
- package/data/llms/components/inplace.md +183 -0
- package/data/llms/components/inputcolor.md +869 -0
- package/data/llms/components/inputgroup.md +419 -0
- package/data/llms/components/inputmask.md +345 -0
- package/data/llms/components/inputnumber.md +551 -0
- package/data/llms/components/inputotp.md +345 -0
- package/data/llms/components/inputpassword.md +738 -0
- package/data/llms/components/inputtags.md +432 -0
- package/data/llms/components/inputtext.md +569 -0
- package/data/llms/components/installation.md +1 -0
- package/data/llms/components/keyfilter.md +116 -0
- package/data/llms/components/knob.md +318 -0
- package/data/llms/components/label.md +151 -0
- package/data/llms/components/laravel.md +53 -0
- package/data/llms/components/listbox.md +636 -0
- package/data/llms/components/mask.md +203 -0
- package/data/llms/components/mcp.md +39 -0
- package/data/llms/components/megamenu.md +563 -0
- package/data/llms/components/menu.md +651 -0
- package/data/llms/components/menubar.md +446 -0
- package/data/llms/components/message.md +497 -0
- package/data/llms/components/metergroup.md +281 -0
- package/data/llms/components/multiselect.md +752 -0
- package/data/llms/components/orderlist.md +224 -0
- package/data/llms/components/organizationchart.md +418 -0
- package/data/llms/components/paginator.md +221 -0
- package/data/llms/components/panel.md +321 -0
- package/data/llms/components/panelmenu.md +703 -0
- package/data/llms/components/password.md +657 -0
- package/data/llms/components/picklist.md +286 -0
- package/data/llms/components/popover.md +145 -0
- package/data/llms/components/progressbar.md +242 -0
- package/data/llms/components/progressspinner.md +104 -0
- package/data/llms/components/radiobutton.md +427 -0
- package/data/llms/components/rating.md +312 -0
- package/data/llms/components/ripple.md +91 -0
- package/data/llms/components/scrollarea.md +700 -0
- package/data/llms/components/scrollpanel.md +131 -0
- package/data/llms/components/scrolltop.md +87 -0
- package/data/llms/components/select.md +1251 -0
- package/data/llms/components/selectbutton.md +268 -0
- package/data/llms/components/sidebar.md +2232 -0
- package/data/llms/components/skeleton.md +302 -0
- package/data/llms/components/slider.md +416 -0
- package/data/llms/components/speeddial.md +402 -0
- package/data/llms/components/splitbutton.md +840 -0
- package/data/llms/components/splitter.md +447 -0
- package/data/llms/components/stepper.md +551 -0
- package/data/llms/components/styleclass.md +226 -0
- package/data/llms/components/tabs.md +609 -0
- package/data/llms/components/tag.md +178 -0
- package/data/llms/components/terminal.md +123 -0
- package/data/llms/components/textarea.md +519 -0
- package/data/llms/components/tieredmenu.md +578 -0
- package/data/llms/components/timeline.md +494 -0
- package/data/llms/components/toast.md +472 -0
- package/data/llms/components/togglebutton.md +276 -0
- package/data/llms/components/toggleswitch.md +271 -0
- package/data/llms/components/toolbar.md +140 -0
- package/data/llms/components/tooltip.md +160 -0
- package/data/llms/components/tree.md +1076 -0
- package/data/llms/components/treeselect.md +660 -0
- package/data/llms/components/treetable.md +2493 -0
- package/data/llms/components/virtualscroller.md +265 -0
- package/data/llms/guides/autoimport.md +28 -0
- package/data/llms/guides/cdn.md +72 -0
- package/data/llms/guides/configuration.md +158 -0
- package/data/llms/guides/customicons.md +67 -0
- package/data/llms/guides/guides/accessibility.md +27 -0
- package/data/llms/guides/guides/animations.md +119 -0
- package/data/llms/guides/guides/rtl.md +7 -0
- package/data/llms/guides/icons.md +136 -0
- package/data/llms/guides/installation.md +3 -0
- package/data/llms/guides/laravel.md +66 -0
- package/data/llms/guides/llms.md +15 -0
- package/data/llms/guides/mcp.md +104 -0
- package/data/llms/guides/migration/v4.md +15 -0
- package/data/llms/guides/migration/v5.md +15 -0
- package/data/llms/guides/nuxt.md +141 -0
- package/data/llms/guides/passthrough.md +137 -0
- package/data/llms/guides/primeclt.md +43 -0
- package/data/llms/guides/tailwind.md +151 -0
- package/data/llms/guides/theming/styled.md +497 -0
- package/data/llms/guides/theming/unstyled.md +57 -0
- package/data/llms/guides/uikit.md +3 -0
- package/data/llms/guides/vite.md +90 -0
- package/data/llms/llms-full.txt +54465 -0
- package/data/llms/llms.txt +132 -0
- package/data/llms/pages/accessibility.md +27 -0
- package/data/llms/pages/animations.md +119 -0
- package/data/llms/pages/autoimport.md +28 -0
- package/data/llms/pages/cdn.md +72 -0
- package/data/llms/pages/configuration.md +158 -0
- package/data/llms/pages/contribution.md +31 -0
- package/data/llms/pages/customicons.md +67 -0
- package/data/llms/pages/designer.md +79 -0
- package/data/llms/pages/dynamicimports.md +7 -0
- package/data/llms/pages/forms.md +63 -0
- package/data/llms/pages/guides/accessibility.md +27 -0
- package/data/llms/pages/guides/animations.md +119 -0
- package/data/llms/pages/guides/rtl.md +7 -0
- package/data/llms/pages/icons.md +136 -0
- package/data/llms/pages/installation.md +3 -0
- package/data/llms/pages/introduction.md +23 -0
- package/data/llms/pages/laravel.md +66 -0
- package/data/llms/pages/llms.md +15 -0
- package/data/llms/pages/mcp.md +104 -0
- package/data/llms/pages/migration/v4.md +15 -0
- package/data/llms/pages/migration/v5.md +15 -0
- package/data/llms/pages/nuxt.md +141 -0
- package/data/llms/pages/passthrough.md +137 -0
- package/data/llms/pages/primeclt.md +43 -0
- package/data/llms/pages/rtl.md +7 -0
- package/data/llms/pages/setup.md +3 -0
- package/data/llms/pages/styled.md +497 -0
- package/data/llms/pages/tailwind.md +151 -0
- package/data/llms/pages/theming/styled.md +497 -0
- package/data/llms/pages/theming/unstyled.md +57 -0
- package/data/llms/pages/uikit.md +3 -0
- package/data/llms/pages/unstyled.md +57 -0
- package/data/llms/pages/v4.md +15 -0
- package/data/llms/pages/v5.md +15 -0
- package/data/llms/pages/vite.md +90 -0
- package/data/manifest.json +11117 -0
- package/data/mcp-data.json +55940 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +66066 -72541
- package/package.json +10 -12
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
# Drawer
|
|
2
|
+
|
|
3
|
+
Drawer is a panel component displayed as an overlay at the edges of the screen.
|
|
4
|
+
|
|
5
|
+
## Basic
|
|
6
|
+
|
|
7
|
+
A slide-in panel from the edge of the screen for contextual content.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex justify-center">
|
|
12
|
+
<Drawer v-model:visible="visible" header="Basic Drawer" class="w-full! md:w-80!">
|
|
13
|
+
<p>A slide-in panel from the edge of the screen for contextual content.</p>
|
|
14
|
+
</Drawer>
|
|
15
|
+
<Button @click="visible = true" iconOnly>
|
|
16
|
+
<Bars />
|
|
17
|
+
</Button>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import { ref } from 'vue';
|
|
23
|
+
import Bars from '@primeicons/vue/bars';
|
|
24
|
+
|
|
25
|
+
const visible = ref(false);
|
|
26
|
+
<\/script>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Position
|
|
30
|
+
|
|
31
|
+
The position of the drawer can be customized with the position property. The available values are left , right , top and bottom .
|
|
32
|
+
|
|
33
|
+
```vue
|
|
34
|
+
<template>
|
|
35
|
+
<div>
|
|
36
|
+
<Drawer v-model:visible="visibleLeft" header="Left Drawer" position="left" class="w-full! md:w-80!">
|
|
37
|
+
<p>The position of the drawer can be customized with the position property. The available values are left, right, top and bottom.</p>
|
|
38
|
+
</Drawer>
|
|
39
|
+
|
|
40
|
+
<Drawer v-model:visible="visibleRight" header="Right Drawer" position="right" class="w-full! md:w-80!">
|
|
41
|
+
<p>The position of the drawer can be customized with the position property. The available values are left, right, top and bottom.</p>
|
|
42
|
+
</Drawer>
|
|
43
|
+
|
|
44
|
+
<Drawer v-model:visible="visibleTop" header="Top Drawer" position="top" style="height: auto">
|
|
45
|
+
<p>The position of the drawer can be customized with the position property. The available values are left, right, top and bottom.</p>
|
|
46
|
+
</Drawer>
|
|
47
|
+
|
|
48
|
+
<Drawer v-model:visible="visibleBottom" header="Bottom Drawer" position="bottom" style="height: auto">
|
|
49
|
+
<p>The position of the drawer can be customized with the position property. The available values are left, right, top and bottom.</p>
|
|
50
|
+
</Drawer>
|
|
51
|
+
|
|
52
|
+
<div class="flex gap-2 justify-center">
|
|
53
|
+
<Button @click="visibleLeft = true" iconOnly>
|
|
54
|
+
<ArrowRight />
|
|
55
|
+
</Button>
|
|
56
|
+
<Button @click="visibleRight = true" iconOnly>
|
|
57
|
+
<ArrowLeft />
|
|
58
|
+
</Button>
|
|
59
|
+
<Button @click="visibleTop = true" iconOnly>
|
|
60
|
+
<ArrowDown />
|
|
61
|
+
</Button>
|
|
62
|
+
<Button @click="visibleBottom = true" iconOnly>
|
|
63
|
+
<ArrowUp />
|
|
64
|
+
</Button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script setup>
|
|
70
|
+
import { ref } from 'vue';
|
|
71
|
+
import ArrowDown from '@primeicons/vue/arrow-down';
|
|
72
|
+
import ArrowLeft from '@primeicons/vue/arrow-left';
|
|
73
|
+
import ArrowRight from '@primeicons/vue/arrow-right';
|
|
74
|
+
import ArrowUp from '@primeicons/vue/arrow-up';
|
|
75
|
+
|
|
76
|
+
const visibleLeft = ref(false);
|
|
77
|
+
const visibleRight = ref(false);
|
|
78
|
+
const visibleTop = ref(false);
|
|
79
|
+
const visibleBottom = ref(false);
|
|
80
|
+
<\/script>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Full Screen
|
|
84
|
+
|
|
85
|
+
The full screen mode is enabled when position property is set as full .
|
|
86
|
+
|
|
87
|
+
```vue
|
|
88
|
+
<template>
|
|
89
|
+
<div class="flex justify-center">
|
|
90
|
+
<Drawer v-model:visible="visible" header="Full Screen Drawer" position="full">
|
|
91
|
+
<p>The full screen mode is enabled when position property is set as full.</p>
|
|
92
|
+
</Drawer>
|
|
93
|
+
<Button @click="visible = true" iconOnly>
|
|
94
|
+
<WindowMaximize />
|
|
95
|
+
</Button>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script setup>
|
|
100
|
+
import { ref } from 'vue';
|
|
101
|
+
import WindowMaximize from '@primeicons/vue/window-maximize';
|
|
102
|
+
|
|
103
|
+
const visible = ref(false);
|
|
104
|
+
<\/script>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Responsive
|
|
108
|
+
|
|
109
|
+
The responsive mode can be enabled by adding class with responsive utilities.
|
|
110
|
+
|
|
111
|
+
```vue
|
|
112
|
+
<template>
|
|
113
|
+
<div class="flex justify-center">
|
|
114
|
+
<Drawer v-model:visible="visible" header="Responsive Drawer" class="w-full! sm:w-96! md:w-md! lg:w-120!">
|
|
115
|
+
<div class="flex flex-col gap-4">
|
|
116
|
+
<div class="flex flex-col gap-2">
|
|
117
|
+
<Label for="email" class="font-medium text-sm">Email</Label>
|
|
118
|
+
<InputText id="email" placeholder="Enter your email" class="w-full" />
|
|
119
|
+
</div>
|
|
120
|
+
<div class="flex flex-col gap-2">
|
|
121
|
+
<Label for="password" class="font-medium text-sm">Password</Label>
|
|
122
|
+
<Password input-id="password" placeholder="Enter your password" :feedback="false" class="w-full" :input-style="{ width: '100%' }" />
|
|
123
|
+
</div>
|
|
124
|
+
<div class="flex items-center gap-2">
|
|
125
|
+
<Checkbox v-model="remember" binary input-id="remember" />
|
|
126
|
+
<Label for="remember" class="text-sm">Remember me</Label>
|
|
127
|
+
</div>
|
|
128
|
+
<Button class="w-full">Sign In</Button>
|
|
129
|
+
</div>
|
|
130
|
+
</Drawer>
|
|
131
|
+
<Button @click="visible = true">Log in</Button>
|
|
132
|
+
</div>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<script setup>
|
|
136
|
+
import { ref } from 'vue';
|
|
137
|
+
|
|
138
|
+
const visible = ref(false);
|
|
139
|
+
const remember = ref(false);
|
|
140
|
+
<\/script>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Template
|
|
144
|
+
|
|
145
|
+
Drawer is customizable by header , content , footer templates.
|
|
146
|
+
|
|
147
|
+
```vue
|
|
148
|
+
<template>
|
|
149
|
+
<div class="flex justify-center">
|
|
150
|
+
<Drawer v-model:visible="visible" :closable="false">
|
|
151
|
+
<template #header>
|
|
152
|
+
<div class="flex items-center gap-2">
|
|
153
|
+
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
|
|
154
|
+
<span class="font-bold">Amy Elsner</span>
|
|
155
|
+
</div>
|
|
156
|
+
</template>
|
|
157
|
+
<p class="text-sm">
|
|
158
|
+
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
|
|
159
|
+
consequat.
|
|
160
|
+
</p>
|
|
161
|
+
<template #footer>
|
|
162
|
+
<div class="flex items-center gap-2">
|
|
163
|
+
<Button class="w-full" variant="outlined">
|
|
164
|
+
<User />
|
|
165
|
+
Account
|
|
166
|
+
</Button>
|
|
167
|
+
<Button class="w-full" severity="danger" text>
|
|
168
|
+
<SignOut />
|
|
169
|
+
Logout
|
|
170
|
+
</Button>
|
|
171
|
+
</div>
|
|
172
|
+
</template>
|
|
173
|
+
</Drawer>
|
|
174
|
+
<Button @click="visible = true" iconOnly>
|
|
175
|
+
<Plus />
|
|
176
|
+
</Button>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<script setup>
|
|
181
|
+
import { ref } from 'vue';
|
|
182
|
+
import Plus from '@primeicons/vue/plus';
|
|
183
|
+
import SignOut from '@primeicons/vue/sign-out';
|
|
184
|
+
import User from '@primeicons/vue/user';
|
|
185
|
+
|
|
186
|
+
const visible = ref(false);
|
|
187
|
+
<\/script>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Headless
|
|
191
|
+
|
|
192
|
+
Headless mode allows you to customize the entire user interface instead of the default elements.
|
|
193
|
+
|
|
194
|
+
```vue
|
|
195
|
+
<template>
|
|
196
|
+
<div class="flex justify-center">
|
|
197
|
+
<Drawer v-model:visible="visible">
|
|
198
|
+
<template #container="{ closeCallback }">
|
|
199
|
+
<div class="flex flex-col h-full">
|
|
200
|
+
<div class="flex items-center justify-between px-5 pt-3 shrink-0">
|
|
201
|
+
<span class="inline-flex items-center gap-2">
|
|
202
|
+
<svg width="35" height="40" viewBox="0 0 35 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
203
|
+
<path
|
|
204
|
+
d="M25.87 18.05L23.16 17.45L25.27 20.46V29.78L32.49 23.76V13.53L29.18 14.73L25.87 18.04V18.05ZM25.27 35.49L29.18 31.58V27.67L25.27 30.98V35.49ZM20.16 17.14H20.03H20.17H20.16ZM30.1 5.19L34.89 4.81L33.08 12.33L24.1 15.67L30.08 5.2L30.1 5.19ZM5.72 14.74L2.41 13.54V23.77L9.63 29.79V20.47L11.74 17.46L9.03 18.06L5.72 14.75V14.74ZM9.63 30.98L5.72 27.67V31.58L9.63 35.49V30.98ZM4.8 5.2L10.78 15.67L1.81 12.33L0 4.81L4.79 5.19L4.8 5.2ZM24.37 21.05V34.59L22.56 37.29L20.46 39.4H14.44L12.34 37.29L10.53 34.59V21.05L12.42 18.23L17.45 26.8L22.48 18.23L24.37 21.05ZM22.85 0L22.57 0.69L17.45 13.08L12.33 0.69L12.05 0H22.85Z"
|
|
205
|
+
fill="var(--p-primary-color)"
|
|
206
|
+
/>
|
|
207
|
+
<path
|
|
208
|
+
d="M30.69 4.21L24.37 4.81L22.57 0.69L22.86 0H26.48L30.69 4.21ZM23.75 5.67L22.66 3.08L18.05 14.24V17.14H19.7H20.03H20.16H20.2L24.1 15.7L30.11 5.19L23.75 5.67ZM4.21002 4.21L10.53 4.81L12.33 0.69L12.05 0H8.43002L4.22002 4.21H4.21002ZM21.9 17.4L20.6 18.2H14.3L13 17.4L12.4 18.2L12.42 18.23L17.45 26.8L22.48 18.23L22.5 18.2L21.9 17.4ZM4.79002 5.19L10.8 15.7L14.7 17.14H14.74H15.2H16.85V14.24L12.24 3.09L11.15 5.68L4.79002 5.2V5.19Z"
|
|
209
|
+
fill="var(--p-text-color)"
|
|
210
|
+
/>
|
|
211
|
+
</svg>
|
|
212
|
+
<span class="font-semibold text-xl text-primary">Your Logo</span>
|
|
213
|
+
</span>
|
|
214
|
+
<span>
|
|
215
|
+
<Button type="button" @click="closeCallback" rounded variant="outlined" iconOnly class="h-8 w-8">
|
|
216
|
+
<Times />
|
|
217
|
+
</Button>
|
|
218
|
+
</span>
|
|
219
|
+
</div>
|
|
220
|
+
<div class="overflow-y-auto">
|
|
221
|
+
<ul class="list-none p-3 m-0">
|
|
222
|
+
<li>
|
|
223
|
+
<div
|
|
224
|
+
v-ripple
|
|
225
|
+
v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'animate-slidedown', leaveToClass: 'hidden', leaveActiveClass: 'animate-slideup' }"
|
|
226
|
+
class="p-3 flex items-center justify-between text-surface-600 dark:text-surface-200 cursor-pointer p-ripple"
|
|
227
|
+
>
|
|
228
|
+
<span class="font-medium text-sm">FAVORITES</span>
|
|
229
|
+
<ChevronDown />
|
|
230
|
+
</div>
|
|
231
|
+
<ul class="list-none p-0 m-0 overflow-hidden">
|
|
232
|
+
<li>
|
|
233
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
234
|
+
<span class="mr-2"><Home /></span>
|
|
235
|
+
<span class="font-medium text-sm">Dashboard</span>
|
|
236
|
+
</a>
|
|
237
|
+
</li>
|
|
238
|
+
<li>
|
|
239
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
240
|
+
<span class="mr-2"><Bookmark /></span>
|
|
241
|
+
<span class="font-medium text-sm">Bookmarks</span>
|
|
242
|
+
</a>
|
|
243
|
+
</li>
|
|
244
|
+
<li>
|
|
245
|
+
<a
|
|
246
|
+
v-ripple
|
|
247
|
+
v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'animate-slidedown', leaveToClass: 'hidden', leaveActiveClass: 'animate-slideup' }"
|
|
248
|
+
class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple"
|
|
249
|
+
>
|
|
250
|
+
<span class="mr-2"><ChartLine /></span>
|
|
251
|
+
<span class="font-medium text-sm">Reports</span>
|
|
252
|
+
<span class="ml-auto"><ChevronDown /></span>
|
|
253
|
+
</a>
|
|
254
|
+
<ul class="list-none py-0 pl-4 pr-0 m-0 hidden overflow-y-hidden transition-all duration-[400ms] ease-in-out">
|
|
255
|
+
<li>
|
|
256
|
+
<a
|
|
257
|
+
v-ripple
|
|
258
|
+
v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'animate-slidedown', leaveToClass: 'hidden', leaveActiveClass: 'animate-slideup' }"
|
|
259
|
+
class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple"
|
|
260
|
+
>
|
|
261
|
+
<span class="mr-2"><ChartLine /></span>
|
|
262
|
+
<span class="font-medium text-sm">Revenue</span>
|
|
263
|
+
<span class="ml-auto"><ChevronDown /></span>
|
|
264
|
+
</a>
|
|
265
|
+
<ul class="list-none py-0 pl-4 pr-0 m-0 hidden overflow-y-hidden transition-all duration-[400ms] ease-in-out">
|
|
266
|
+
<li>
|
|
267
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
268
|
+
<span class="mr-2"><Table /></span>
|
|
269
|
+
<span class="font-medium text-sm">View</span>
|
|
270
|
+
</a>
|
|
271
|
+
</li>
|
|
272
|
+
<li>
|
|
273
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
274
|
+
<span class="mr-2"><Search /></span>
|
|
275
|
+
<span class="font-medium text-sm">Search</span>
|
|
276
|
+
</a>
|
|
277
|
+
</li>
|
|
278
|
+
</ul>
|
|
279
|
+
</li>
|
|
280
|
+
<li>
|
|
281
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
282
|
+
<span class="mr-2"><ChartLine /></span>
|
|
283
|
+
<span class="font-medium text-sm">Expenses</span>
|
|
284
|
+
</a>
|
|
285
|
+
</li>
|
|
286
|
+
</ul>
|
|
287
|
+
</li>
|
|
288
|
+
<li>
|
|
289
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
290
|
+
<span class="mr-2"><Users /></span>
|
|
291
|
+
<span class="font-medium text-sm">Team</span>
|
|
292
|
+
</a>
|
|
293
|
+
</li>
|
|
294
|
+
<li>
|
|
295
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
296
|
+
<span class="mr-2"><Comments /></span>
|
|
297
|
+
<span class="font-medium text-sm">Messages</span>
|
|
298
|
+
<span class="inline-flex items-center justify-center ml-auto bg-primary text-primary-contrast rounded-full text-sm" style="min-width: 1.4rem; height: 1.4rem">3</span>
|
|
299
|
+
</a>
|
|
300
|
+
</li>
|
|
301
|
+
<li>
|
|
302
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
303
|
+
<span class="mr-2"><CalendarIcon /></span>
|
|
304
|
+
<span class="font-medium text-sm">Calendar</span>
|
|
305
|
+
</a>
|
|
306
|
+
</li>
|
|
307
|
+
<li>
|
|
308
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
309
|
+
<span class="mr-2"><Cog /></span>
|
|
310
|
+
<span class="font-medium text-sm">Settings</span>
|
|
311
|
+
</a>
|
|
312
|
+
</li>
|
|
313
|
+
</ul>
|
|
314
|
+
</li>
|
|
315
|
+
</ul>
|
|
316
|
+
<ul class="list-none p-3 m-0">
|
|
317
|
+
<li>
|
|
318
|
+
<div
|
|
319
|
+
v-ripple
|
|
320
|
+
v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'animate-slidedown', leaveToClass: 'hidden', leaveActiveClass: 'animate-slideup' }"
|
|
321
|
+
class="p-3 flex items-center justify-between text-surface-600 dark:text-surface-200 cursor-pointer p-ripple"
|
|
322
|
+
>
|
|
323
|
+
<span class="font-medium text-sm">APPLICATION</span>
|
|
324
|
+
<ChevronDown />
|
|
325
|
+
</div>
|
|
326
|
+
<ul class="list-none p-0 m-0 overflow-hidden">
|
|
327
|
+
<li>
|
|
328
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
329
|
+
<span class="mr-2"><Folder /></span>
|
|
330
|
+
<span class="font-medium text-sm">Projects</span>
|
|
331
|
+
</a>
|
|
332
|
+
</li>
|
|
333
|
+
<li>
|
|
334
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
335
|
+
<span class="mr-2"><ChartBar /></span>
|
|
336
|
+
<span class="font-medium text-sm">Performance</span>
|
|
337
|
+
</a>
|
|
338
|
+
</li>
|
|
339
|
+
<li>
|
|
340
|
+
<a v-ripple class="flex items-center cursor-pointer p-3 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
341
|
+
<span class="mr-2"><Cog /></span>
|
|
342
|
+
<span class="font-medium text-sm">Settings</span>
|
|
343
|
+
</a>
|
|
344
|
+
</li>
|
|
345
|
+
</ul>
|
|
346
|
+
</li>
|
|
347
|
+
</ul>
|
|
348
|
+
</div>
|
|
349
|
+
<div class="mt-auto">
|
|
350
|
+
<hr class="mb-3 mx-3 border-t border-0 border-surface" />
|
|
351
|
+
<a v-ripple class="m-3 flex items-center cursor-pointer p-3 gap-2 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
|
|
352
|
+
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
|
|
353
|
+
<span class="font-bold text-sm">Amy Elsner</span>
|
|
354
|
+
</a>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
</template>
|
|
358
|
+
</Drawer>
|
|
359
|
+
<Button @click="visible = true" iconOnly>
|
|
360
|
+
<Bars />
|
|
361
|
+
</Button>
|
|
362
|
+
</div>
|
|
363
|
+
</template>
|
|
364
|
+
|
|
365
|
+
<script setup>
|
|
366
|
+
import { ref } from 'vue';
|
|
367
|
+
import Bars from '@primeicons/vue/bars';
|
|
368
|
+
import Bookmark from '@primeicons/vue/bookmark';
|
|
369
|
+
import CalendarIcon from '@primeicons/vue/calendar';
|
|
370
|
+
import ChartBar from '@primeicons/vue/chart-bar';
|
|
371
|
+
import ChartLine from '@primeicons/vue/chart-line';
|
|
372
|
+
import ChevronDown from '@primeicons/vue/chevron-down';
|
|
373
|
+
import Cog from '@primeicons/vue/cog';
|
|
374
|
+
import Comments from '@primeicons/vue/comments';
|
|
375
|
+
import Folder from '@primeicons/vue/folder';
|
|
376
|
+
import Home from '@primeicons/vue/home';
|
|
377
|
+
import Search from '@primeicons/vue/search';
|
|
378
|
+
import Table from '@primeicons/vue/table';
|
|
379
|
+
import Times from '@primeicons/vue/times';
|
|
380
|
+
import Users from '@primeicons/vue/users';
|
|
381
|
+
|
|
382
|
+
const visible = ref(false);
|
|
383
|
+
<\/script>
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
## Accessibility
|
|
387
|
+
|
|
388
|
+
Screen Reader Drawer component uses complementary role by default, since any attribute is passed to the root element aria role can be changed depending on your use case and additional attributes like aria-labelledby can be added. In addition aria-modal is added since focus is kept within the drawer when opened. It is recommended to use a trigger component that can be accessed with keyboard such as a button, if not adding tabIndex would be necessary. Trigger element also requires aria-expanded and aria-controls to be handled explicitly. Overlay Keyboard Support Key Function tab Moves focus to the next the focusable element within the drawer. shift + tab Moves focus to the previous the focusable element within the drawer. escape Closes the dialog if closeOnEscape is true. Close Button Keyboard Support Key Function enter Closes the drawer. space Closes the drawer.
|
|
389
|
+
|
|
390
|
+
```vue
|
|
391
|
+
<template>
|
|
392
|
+
<Button @click="visible = true" :aria-controls="visible ? 'sbar' : null" :aria-expanded="visible">
|
|
393
|
+
<ExternalLink />
|
|
394
|
+
Show
|
|
395
|
+
</Button>
|
|
396
|
+
|
|
397
|
+
<Drawer id="sbar" v-model:visible="visible" role="region" >
|
|
398
|
+
<p>Content</p>
|
|
399
|
+
</Drawer>
|
|
400
|
+
</template>
|
|
401
|
+
|
|
402
|
+
<script setup>
|
|
403
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
404
|
+
<\/script>
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
## Drawer API
|
|
408
|
+
|
|
409
|
+
### Props
|
|
410
|
+
|
|
411
|
+
| Name |Type |Default |Description |
|
|
412
|
+
| --- | --- | --- | --- |
|
|
413
|
+
| visible | boolean | false | Specifies the visibility of the dialog. |
|
|
414
|
+
| position | HintedString<"left" \| "right" \| "top" \| "bottom" \| "full"> | left | Specifies the position of the drawer. |
|
|
415
|
+
| header | string | - | Title content of the dialog. |
|
|
416
|
+
| baseZIndex | number | 0 | Base zIndex value to use in layering. |
|
|
417
|
+
| autoZIndex | boolean | true | Whether to automatically manage layering. |
|
|
418
|
+
| dismissable | boolean | true | Whether clicking outside closes the panel. |
|
|
419
|
+
| showCloseIcon | boolean | true | Whether to display a close icon inside the panel. |
|
|
420
|
+
| closeButtonProps | object | - | Used to pass the custom value to read for the button inside the component. |
|
|
421
|
+
| closeIcon | string | - | Icon to display in the drawer close button. |
|
|
422
|
+
| modal | boolean | true | Whether to a modal layer behind the drawer. |
|
|
423
|
+
| blockScroll | boolean | false | Whether background scroll should be blocked when drawer is visible. |
|
|
424
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
425
|
+
| pt | PassThrough<DrawerPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
426
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
427
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
428
|
+
| closeOnEscape | boolean | true | Specifies if pressing escape key should hide the drawer. |
|
|
429
|
+
|
|
430
|
+
### Pass Through Options
|
|
431
|
+
|
|
432
|
+
| Name |Type |Description |
|
|
433
|
+
| --- | --- | --- |
|
|
434
|
+
| root | DrawerPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
435
|
+
| header | DrawerPassThroughOptionType | Used to pass attributes to the header's DOM element. |
|
|
436
|
+
| title | DrawerPassThroughOptionType | Used to pass attributes to the header content's DOM element. |
|
|
437
|
+
| pcCloseButton | any | Used to pass attributes to the close button's DOM element. |
|
|
438
|
+
| content | DrawerPassThroughOptionType | Used to pass attributes to the content's DOM element. |
|
|
439
|
+
| footer | DrawerPassThroughOptionType | Used to pass attributes to the footer's DOM element. |
|
|
440
|
+
| mask | DrawerPassThroughOptionType | Used to pass attributes to the mask's DOM element. |
|
|
441
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
442
|
+
| transition | DrawerPassThroughTransitionType | Used to control Vue Transition API. |
|
|
443
|
+
|
|
444
|
+
### Theming
|
|
445
|
+
|
|
446
|
+
### CSS Classes
|
|
447
|
+
|
|
448
|
+
| Class |Description |
|
|
449
|
+
| --- | --- |
|
|
450
|
+
| p-drawer-mask | Class name of the mask element |
|
|
451
|
+
| p-drawer | Class name of the root element |
|
|
452
|
+
| p-drawer-header | Class name of the header element |
|
|
453
|
+
| p-drawer-title | Class name of the title element |
|
|
454
|
+
| p-drawer-close-button | Class name of the close button element |
|
|
455
|
+
| p-drawer-content | Class name of the content element |
|
|
456
|
+
|
|
457
|
+
### Design Tokens
|
|
458
|
+
|
|
459
|
+
| Token |CSS Variable |Description |
|
|
460
|
+
| --- | --- | --- |
|
|
461
|
+
| drawer.background | --p-drawer-background | Background of root |
|
|
462
|
+
| drawer.border.color | --p-drawer-border-color | Border color of root |
|
|
463
|
+
| drawer.color | --p-drawer-color | Color of root |
|
|
464
|
+
| drawer.shadow | --p-drawer-shadow | Shadow of root |
|
|
465
|
+
| drawer.header.padding | --p-drawer-header-padding | Padding of header |
|
|
466
|
+
| drawer.title.font.size | --p-drawer-title-font-size | Font size of title |
|
|
467
|
+
| drawer.title.font.weight | --p-drawer-title-font-weight | Font weight of title |
|
|
468
|
+
| drawer.content.padding | --p-drawer-content-padding | Padding of content |
|
|
469
|
+
| drawer.footer.padding | --p-drawer-footer-padding | Padding of footer |
|