@meistrari/tela-build 1.0.0
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/README.md +75 -0
- package/app.config.ts +73 -0
- package/components/tela/animated/animated-calculating-number.vue +16 -0
- package/components/tela/animated/animated-number.mdx +248 -0
- package/components/tela/animated/animated-number.stories.ts +52 -0
- package/components/tela/animated/animated-number.vue +23 -0
- package/components/tela/animated/animated-text.vue +124 -0
- package/components/tela/animated/animated-value.vue +68 -0
- package/components/tela/avatar/avatar.mdx +117 -0
- package/components/tela/avatar/avatar.stories.ts +62 -0
- package/components/tela/avatar/avatar.vue +71 -0
- package/components/tela/avatar/group/avatar-group.stories.ts +78 -0
- package/components/tela/avatar/group/avatar-group.vue +46 -0
- package/components/tela/badge/badge.mdx +154 -0
- package/components/tela/badge/badge.stories.ts +82 -0
- package/components/tela/badge/badge.vue +41 -0
- package/components/tela/button/button.mdx +155 -0
- package/components/tela/button/button.stories.ts +202 -0
- package/components/tela/button/button.vue +107 -0
- package/components/tela/card.vue +30 -0
- package/components/tela/chart/chart-bar.vue +58 -0
- package/components/tela/chat/chat.mdx +268 -0
- package/components/tela/chat/chat.stories.ts +253 -0
- package/components/tela/chat/command/index.vue +41 -0
- package/components/tela/chat/command/mention/index.vue +138 -0
- package/components/tela/chat/index.vue +112 -0
- package/components/tela/chat/pure-text-input/chat-text-input.vue +190 -0
- package/components/tela/chat/text-input/chat-text-input.stories.ts +128 -0
- package/components/tela/chat/text-input/index.vue +217 -0
- package/components/tela/chat/text-message/chat-text-message.stories.ts +138 -0
- package/components/tela/chat/text-message/index.vue +355 -0
- package/components/tela/chat/types.ts +19 -0
- package/components/tela/checkbox/checkbox-card.vue +30 -0
- package/components/tela/checkbox/checkbox.mdx +164 -0
- package/components/tela/checkbox/checkbox.stories.ts +104 -0
- package/components/tela/checkbox/checkbox.vue +43 -0
- package/components/tela/collapsible/Collapsible.vue +15 -0
- package/components/tela/collapsible/CollapsibleContent.vue +59 -0
- package/components/tela/collapsible/CollapsibleTrigger.vue +12 -0
- package/components/tela/collapsible/collapsible.mdx +157 -0
- package/components/tela/collapsible-section/collapsible-section.mdx +180 -0
- package/components/tela/collapsible-section/collapsible-section.stories.ts +53 -0
- package/components/tela/collapsible-section/collapsible-section.vue +51 -0
- package/components/tela/collapsible-section-with-actions.vue +98 -0
- package/components/tela/combobox/combobox-anchor.vue +24 -0
- package/components/tela/combobox/combobox-empty.vue +19 -0
- package/components/tela/combobox/combobox-group.vue +24 -0
- package/components/tela/combobox/combobox-indicator.vue +22 -0
- package/components/tela/combobox/combobox-input.vue +31 -0
- package/components/tela/combobox/combobox-item.vue +28 -0
- package/components/tela/combobox/combobox-label.vue +24 -0
- package/components/tela/combobox/combobox-list.vue +90 -0
- package/components/tela/combobox/combobox-module-selector.vue +366 -0
- package/components/tela/combobox/combobox-root.vue +15 -0
- package/components/tela/combobox/combobox-trigger.vue +12 -0
- package/components/tela/combobox/combobox.mdx +285 -0
- package/components/tela/combobox/combobox.stories.ts +232 -0
- package/components/tela/combobox/combobox.vue +497 -0
- package/components/tela/command/command-dialog.vue +22 -0
- package/components/tela/command/command-empty.vue +25 -0
- package/components/tela/command/command-group.vue +46 -0
- package/components/tela/command/command-input.vue +38 -0
- package/components/tela/command/command-item.vue +78 -0
- package/components/tela/command/command-list.vue +78 -0
- package/components/tela/command/command-separator.vue +23 -0
- package/components/tela/command/command-shortcut.vue +13 -0
- package/components/tela/command/command.vue +88 -0
- package/components/tela/command/dialog-base.vue +15 -0
- package/components/tela/command/dialog-content.vue +50 -0
- package/components/tela/command/utils.ts +15 -0
- package/components/tela/complex-table/complex-table-cell.stories.ts +145 -0
- package/components/tela/complex-table/complex-table-cell.vue +45 -0
- package/components/tela/complex-table/complex-table-header-cell.stories.ts +103 -0
- package/components/tela/complex-table/complex-table-header-cell.vue +48 -0
- package/components/tela/complex-table/complex-table-header.stories.ts +89 -0
- package/components/tela/complex-table/complex-table-header.vue +70 -0
- package/components/tela/complex-table/complex-table-row.vue +199 -0
- package/components/tela/complex-table/complex-table-virtualized.vue +326 -0
- package/components/tela/complex-table/complex-table.stories.ts +358 -0
- package/components/tela/complex-table/complex-table.vue +237 -0
- package/components/tela/complex-table/composables/table-common.ts +93 -0
- package/components/tela/complex-table/composables/table-selection.ts +87 -0
- package/components/tela/complex-table/composables/virtual-scroll.ts +252 -0
- package/components/tela/complex-table/styles/table-shared.css +170 -0
- package/components/tela/complex-table/types.ts +63 -0
- package/components/tela/complex-table/utils.ts +35 -0
- package/components/tela/confirm-button/confirm-button.vue +137 -0
- package/components/tela/confirmation-modal/confirmation-modal.vue +72 -0
- package/components/tela/copy-button.vue +86 -0
- package/components/tela/date-range-picker.vue +221 -0
- package/components/tela/dialog/dialog.mdx +170 -0
- package/components/tela/dialog/dialog.vue +182 -0
- package/components/tela/disabled-area.vue +16 -0
- package/components/tela/disclaimer/disclaimer.mdx +238 -0
- package/components/tela/disclaimer/disclaimer.stories.ts +196 -0
- package/components/tela/disclaimer/disclaimer.vue +125 -0
- package/components/tela/dropdown-menu/DropdownMenu.vue +121 -0
- package/components/tela/dropdown-menu/DropdownMenuCheckboxItem.vue +40 -0
- package/components/tela/dropdown-menu/DropdownMenuContent.vue +75 -0
- package/components/tela/dropdown-menu/DropdownMenuGroup.vue +12 -0
- package/components/tela/dropdown-menu/DropdownMenuItem.vue +137 -0
- package/components/tela/dropdown-menu/DropdownMenuLabel.vue +26 -0
- package/components/tela/dropdown-menu/DropdownMenuRadioGroup.vue +18 -0
- package/components/tela/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/components/tela/dropdown-menu/DropdownMenuRoot.vue +15 -0
- package/components/tela/dropdown-menu/DropdownMenuSeparator.vue +21 -0
- package/components/tela/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/components/tela/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/components/tela/dropdown-menu/DropdownMenuSubContent.vue +30 -0
- package/components/tela/dropdown-menu/DropdownMenuSubTrigger.vue +35 -0
- package/components/tela/dropdown-menu/DropdownMenuTrigger.vue +14 -0
- package/components/tela/dropdown-menu/dropdown-menu.mdx +265 -0
- package/components/tela/dropdown-menu/dropdown-menu.stories.ts +156 -0
- package/components/tela/expandable-input.vue +96 -0
- package/components/tela/file-drop.vue +37 -0
- package/components/tela/file-upload/file-upload.mdx +189 -0
- package/components/tela/file-upload/file-upload.stories.ts +48 -0
- package/components/tela/file-upload/file-upload.vue +205 -0
- package/components/tela/filters/checkbox-filter.stories.ts +218 -0
- package/components/tela/filters/checkbox-filter.vue +165 -0
- package/components/tela/filters/date-filter.stories.ts +258 -0
- package/components/tela/filters/date-filter.vue +200 -0
- package/components/tela/filters/user-filter.stories.ts +344 -0
- package/components/tela/filters/user-filter.vue +271 -0
- package/components/tela/hover-card/hover-card.mdx +221 -0
- package/components/tela/hover-card/hover-card.stories.ts +87 -0
- package/components/tela/hover-card/hover-card.vue +61 -0
- package/components/tela/icon/custom.vue +319 -0
- package/components/tela/icon/spinner.vue +12 -0
- package/components/tela/icon-button/icon-button.vue +114 -0
- package/components/tela/icon.vue +37 -0
- package/components/tela/initials.vue +28 -0
- package/components/tela/inline-input.vue +77 -0
- package/components/tela/input/input.mdx +182 -0
- package/components/tela/input/input.stories.ts +153 -0
- package/components/tela/input/tela-input.vue +240 -0
- package/components/tela/kbd/kbd-return.vue +6 -0
- package/components/tela/kbd/kbd.mdx +238 -0
- package/components/tela/kbd/kbd.vue +18 -0
- package/components/tela/label/label.mdx +121 -0
- package/components/tela/label/label.stories.ts +37 -0
- package/components/tela/label/label.vue +25 -0
- package/components/tela/link-decoration/link-decoration.vue +19 -0
- package/components/tela/live-label.vue +32 -0
- package/components/tela/long-press-button.vue +98 -0
- package/components/tela/menubar/menubar-content.vue +77 -0
- package/components/tela/menubar/menubar-item.vue +32 -0
- package/components/tela/menubar/menubar-label.vue +14 -0
- package/components/tela/menubar/menubar-menu.vue +12 -0
- package/components/tela/menubar/menubar-root.vue +30 -0
- package/components/tela/menubar/menubar-separator.vue +17 -0
- package/components/tela/menubar/menubar-shortcut.vue +14 -0
- package/components/tela/menubar/menubar-sub-content.vue +36 -0
- package/components/tela/menubar/menubar-sub-trigger.vue +28 -0
- package/components/tela/menubar/menubar-sub.vue +20 -0
- package/components/tela/menubar/menubar-trigger.vue +27 -0
- package/components/tela/menubar/menubar.vue +298 -0
- package/components/tela/modal/modal.mdx +145 -0
- package/components/tela/modal/modal.vue +242 -0
- package/components/tela/multiple-select/multiple-select.mdx +274 -0
- package/components/tela/multiple-select/multiple-select.stories.ts +325 -0
- package/components/tela/multiple-select/multiple-select.vue +666 -0
- package/components/tela/pane.vue +110 -0
- package/components/tela/popover/popover-content.vue +48 -0
- package/components/tela/popover/popover-trigger.vue +12 -0
- package/components/tela/popover/popover.mdx +239 -0
- package/components/tela/popover/popover.stories.ts +150 -0
- package/components/tela/popover/popover.vue +15 -0
- package/components/tela/popover-list/popover-list-nested.vue +104 -0
- package/components/tela/popover-list/popover-list.stories.ts +330 -0
- package/components/tela/popover-list/popover-list.vue +191 -0
- package/components/tela/radio-button.vue +66 -0
- package/components/tela/radio-group/radio-group-item.vue +40 -0
- package/components/tela/radio-group/radio-group-root.vue +26 -0
- package/components/tela/radio-group/radio-group.mdx +78 -0
- package/components/tela/radio-group/radio-group.stories.ts +106 -0
- package/components/tela/radio-group/radio-group.vue +23 -0
- package/components/tela/range-calendar.stories.ts +110 -0
- package/components/tela/range-calendar.vue +109 -0
- package/components/tela/scroll-area/scroll-area.mdx +183 -0
- package/components/tela/scroll-area/scroll-area.vue +30 -0
- package/components/tela/scroll-area/scroll-bar.vue +31 -0
- package/components/tela/segment-toggle.stories.ts +114 -0
- package/components/tela/segment-toggle.vue +66 -0
- package/components/tela/select-menu/select-menu-content.vue +106 -0
- package/components/tela/select-menu/select-menu-down-button.vue +20 -0
- package/components/tela/select-menu/select-menu-group.vue +16 -0
- package/components/tela/select-menu/select-menu-item.vue +40 -0
- package/components/tela/select-menu/select-menu-root.vue +15 -0
- package/components/tela/select-menu/select-menu-trigger.vue +34 -0
- package/components/tela/select-menu/select-menu-up-button.vue +20 -0
- package/components/tela/select-menu/select-menu-value.vue +12 -0
- package/components/tela/select-menu/select-menu.mdx +221 -0
- package/components/tela/select-menu/select-menu.stories.ts +91 -0
- package/components/tela/select-menu/select-menu.vue +165 -0
- package/components/tela/selector/selector.vue +47 -0
- package/components/tela/sheet/sheet-close.vue +12 -0
- package/components/tela/sheet/sheet-content.vue +57 -0
- package/components/tela/sheet/sheet-description.vue +23 -0
- package/components/tela/sheet/sheet-footer.vue +18 -0
- package/components/tela/sheet/sheet-header.vue +15 -0
- package/components/tela/sheet/sheet-root.vue +18 -0
- package/components/tela/sheet/sheet-title.vue +23 -0
- package/components/tela/sheet/sheet-trigger.vue +12 -0
- package/components/tela/sheet/sheet.client.vue +150 -0
- package/components/tela/sheet/sheet.mdx +176 -0
- package/components/tela/sheet/sheet.stories.ts +201 -0
- package/components/tela/sheet/variants.ts +22 -0
- package/components/tela/side-sheet/side-sheet.mdx +131 -0
- package/components/tela/side-sheet/side-sheet.stories.ts +134 -0
- package/components/tela/side-sheet/side-sheet.vue +106 -0
- package/components/tela/skeleton/skeleton.mdx +165 -0
- package/components/tela/skeleton/skeleton.stories.ts +35 -0
- package/components/tela/skeleton/skeleton.vue +45 -0
- package/components/tela/skeleton-icon.vue +24 -0
- package/components/tela/span.vue +24 -0
- package/components/tela/star-button.vue +70 -0
- package/components/tela/status/status-lean.vue +30 -0
- package/components/tela/status/status.mdx +187 -0
- package/components/tela/status/status.stories.ts +160 -0
- package/components/tela/status/status.vue +420 -0
- package/components/tela/status-bar/status-bar.mdx +178 -0
- package/components/tela/status-bar/status-bar.stories.ts +64 -0
- package/components/tela/status-bar/status-bar.vue +56 -0
- package/components/tela/status-bar/types.ts +5 -0
- package/components/tela/switch/switch.mdx +118 -0
- package/components/tela/switch/switch.stories.ts +80 -0
- package/components/tela/switch/switch.vue +56 -0
- package/components/tela/table/table-body.vue +13 -0
- package/components/tela/table/table-caption.vue +13 -0
- package/components/tela/table/table-cell.vue +20 -0
- package/components/tela/table/table-empty.vue +37 -0
- package/components/tela/table/table-footer.vue +13 -0
- package/components/tela/table/table-head.vue +13 -0
- package/components/tela/table/table-header.vue +13 -0
- package/components/tela/table/table-row.vue +13 -0
- package/components/tela/table/table.mdx +230 -0
- package/components/tela/table/table.stories.ts +384 -0
- package/components/tela/table/table.vue +15 -0
- package/components/tela/tabs/tabs-content.vue +20 -0
- package/components/tela/tabs/tabs-indicator.vue +22 -0
- package/components/tela/tabs/tabs-list.vue +23 -0
- package/components/tela/tabs/tabs-root.vue +15 -0
- package/components/tela/tabs/tabs-trigger.vue +27 -0
- package/components/tela/tabs/tabs.mdx +138 -0
- package/components/tela/tabs/tabs.stories.ts +72 -0
- package/components/tela/tabs/tabs.vue +61 -0
- package/components/tela/tags/tags-select.mdx +318 -0
- package/components/tela/tags/tags-select.stories.ts +47 -0
- package/components/tela/tags/tags-select.vue +637 -0
- package/components/tela/tags/tags.mdx +151 -0
- package/components/tela/tags/tags.stories.ts +118 -0
- package/components/tela/tags/tags.vue +112 -0
- package/components/tela/textarea/textarea.mdx +102 -0
- package/components/tela/textarea/textarea.stories.ts +50 -0
- package/components/tela/textarea/textarea.vue +34 -0
- package/components/tela/toggle-group.vue +91 -0
- package/components/tela/tooltip/tooltip-content.vue +45 -0
- package/components/tela/tooltip/tooltip-provider.vue +12 -0
- package/components/tela/tooltip/tooltip-root.vue +15 -0
- package/components/tela/tooltip/tooltip-trigger.vue +12 -0
- package/components/tela/tooltip/tooltip.mdx +196 -0
- package/components/tela/tooltip/tooltip.stories.ts +200 -0
- package/components/tela/tooltip/tooltip.vue +91 -0
- package/components/tela/tooltip-group/tooltip-group-trigger.vue +92 -0
- package/components/tela/tooltip-group/tooltip-group.mdx +236 -0
- package/components/tela/tooltip-group/tooltip-group.stories.ts +465 -0
- package/components/tela/tooltip-group/tooltip-group.vue +35 -0
- package/components/tela/transparent-input.vue +151 -0
- package/components/tela/variable-icon.vue +28 -0
- package/components/tela/variable-input.vue +77 -0
- package/components/tela/wide-button/wide-button.vue +40 -0
- package/components.json +18 -0
- package/composables/status-toast.ts +67 -0
- package/css/reset.css +386 -0
- package/css/text.css +22 -0
- package/lib/doc-generator.ts +903 -0
- package/lib/extractors/volar-extract.ts +186 -0
- package/lib/type-resolver.ts +402 -0
- package/lib/utils.ts +6 -0
- package/modules/tela-build-docs/index.ts +139 -0
- package/nuxt.config.ts +80 -0
- package/package.json +84 -0
- package/plugins/test-id.ts +7 -0
- package/tsconfig.json +7 -0
- package/types/custom-icon.ts +1 -0
- package/types/index.ts +2 -0
- package/types/status.ts +1 -0
- package/unocss.config.ts +89 -0
- package/utils/component-utils.ts +30 -0
- package/utils/design-tokens.ts +431 -0
- package/utils/fold.ts +8 -0
- package/utils/select-menu.ts +10 -0
- package/utils/status.ts +1 -0
- package/utils/without-keys.ts +34 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as SheetStories from './sheet.stories.ts';
|
|
3
|
+
|
|
4
|
+
<Meta of={SheetStories} />
|
|
5
|
+
|
|
6
|
+
# TelaSheet
|
|
7
|
+
|
|
8
|
+
A slide-out sheet component that displays content in a side panel. Supports different widths, compact mode, custom overlays, and fullscreen mode. Includes slots for header, content, and footer. Useful for sidebars, settings panels, and detail views.
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
### With Title
|
|
13
|
+
|
|
14
|
+
<Canvas of={SheetStories.WithTitle} />
|
|
15
|
+
|
|
16
|
+
### Compact Mode
|
|
17
|
+
|
|
18
|
+
<Canvas of={SheetStories.CompactMode} />
|
|
19
|
+
|
|
20
|
+
### Custom Overlay
|
|
21
|
+
|
|
22
|
+
<Canvas of={SheetStories.CustomOverlay} />
|
|
23
|
+
|
|
24
|
+
### Fullscreen
|
|
25
|
+
|
|
26
|
+
<Canvas of={SheetStories.Fullscreen} />
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<script setup>
|
|
32
|
+
import { ref } from 'vue'
|
|
33
|
+
|
|
34
|
+
const isOpen = ref(false)
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<TelaButton @click="isOpen = true">
|
|
39
|
+
Open Sheet
|
|
40
|
+
</TelaButton>
|
|
41
|
+
|
|
42
|
+
<TelaSheet v-model="isOpen" title="Sheet Title">
|
|
43
|
+
<div class="p-4">
|
|
44
|
+
<p>Sheet content goes here</p>
|
|
45
|
+
</div>
|
|
46
|
+
</TelaSheet>
|
|
47
|
+
</template>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### With Title Code
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<TelaSheet v-model="isOpen" title="Settings">
|
|
54
|
+
<div class="p-4">
|
|
55
|
+
<h3>Settings Content</h3>
|
|
56
|
+
</div>
|
|
57
|
+
</TelaSheet>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Different Widths
|
|
61
|
+
|
|
62
|
+
```vue
|
|
63
|
+
<!-- Medium width (default) -->
|
|
64
|
+
<TelaSheet v-model="isOpen" modal-width="md" title="Medium Width">
|
|
65
|
+
<div class="p-4">Medium sheet</div>
|
|
66
|
+
</TelaSheet>
|
|
67
|
+
|
|
68
|
+
<!-- Large width -->
|
|
69
|
+
<TelaSheet v-model="isOpen" modal-width="lg" title="Large Width">
|
|
70
|
+
<div class="p-4">Large sheet</div>
|
|
71
|
+
</TelaSheet>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Compact Mode Code
|
|
75
|
+
|
|
76
|
+
```vue
|
|
77
|
+
<TelaSheet v-model="isOpen" compact title="Compact Sheet">
|
|
78
|
+
<div class="p-4">
|
|
79
|
+
Compact mode reduces padding and spacing
|
|
80
|
+
</div>
|
|
81
|
+
</TelaSheet>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### With Footer
|
|
85
|
+
|
|
86
|
+
```vue
|
|
87
|
+
<TelaSheet v-model="isOpen" title="With Footer">
|
|
88
|
+
<div class="p-4">
|
|
89
|
+
<p>Main content</p>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<template #footer>
|
|
93
|
+
<div class="flex gap-2">
|
|
94
|
+
<TelaButton variant="primary" @click="save">Save</TelaButton>
|
|
95
|
+
<TelaButton variant="secondary" @click="isOpen = false">Cancel</TelaButton>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
</TelaSheet>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Custom Overlay Code
|
|
102
|
+
|
|
103
|
+
```vue
|
|
104
|
+
<TelaSheet
|
|
105
|
+
v-model="isOpen"
|
|
106
|
+
title="Custom Overlay"
|
|
107
|
+
overlay-class="bg-blue-500/50"
|
|
108
|
+
>
|
|
109
|
+
<div class="p-4">Sheet with custom overlay</div>
|
|
110
|
+
</TelaSheet>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```vue
|
|
114
|
+
<TelaSheet v-model="isOpen" fullscreen>
|
|
115
|
+
<div class="p-4">
|
|
116
|
+
Fullscreen sheet covering entire viewport
|
|
117
|
+
</div>
|
|
118
|
+
</TelaSheet>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Hide Dividers
|
|
122
|
+
|
|
123
|
+
```vue
|
|
124
|
+
<TelaSheet v-model="isOpen" hide-dividers title="No Dividers">
|
|
125
|
+
<div class="p-4">
|
|
126
|
+
Sheet without divider lines
|
|
127
|
+
</div>
|
|
128
|
+
</TelaSheet>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Props
|
|
132
|
+
|
|
133
|
+
<ArgTypes />
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
type SheetProps = {
|
|
137
|
+
modelValue: boolean
|
|
138
|
+
title?: string
|
|
139
|
+
modalWidth?: 'md' | 'lg'
|
|
140
|
+
compact?: boolean
|
|
141
|
+
hideDividers?: boolean
|
|
142
|
+
overlayClass?: string
|
|
143
|
+
fullscreen?: boolean
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Slots
|
|
148
|
+
|
|
149
|
+
- `default` - Main content area of the sheet
|
|
150
|
+
- `header` - Custom header content (replaces title)
|
|
151
|
+
- `footer` - Footer content for actions/buttons
|
|
152
|
+
|
|
153
|
+
## Events
|
|
154
|
+
|
|
155
|
+
- `update:modelValue` - Emitted when sheet opens/closes with boolean value
|
|
156
|
+
- `close` - Emitted when sheet is closed
|
|
157
|
+
|
|
158
|
+
## Features
|
|
159
|
+
|
|
160
|
+
- **Slide Animation**: Smooth slide-in from the right
|
|
161
|
+
- **Overlay**: Semi-transparent backdrop
|
|
162
|
+
- **Multiple Widths**: Medium and large size options
|
|
163
|
+
- **Compact Mode**: Reduced spacing for dense layouts
|
|
164
|
+
- **Custom Header/Footer**: Slots for custom content
|
|
165
|
+
- **Fullscreen Mode**: Cover entire viewport
|
|
166
|
+
- **Close on Overlay Click**: Click outside to close
|
|
167
|
+
- **Escape Key**: Press Escape to close
|
|
168
|
+
- **Accessible**: Focus trap and keyboard navigation
|
|
169
|
+
|
|
170
|
+
## Accessibility
|
|
171
|
+
|
|
172
|
+
- Focus trapped within sheet when open
|
|
173
|
+
- Escape key to close
|
|
174
|
+
- Proper ARIA attributes
|
|
175
|
+
- Focus returns to trigger element on close
|
|
176
|
+
- Overlay backdrop for visual separation
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import Sheet from './sheet.client.vue'
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Sheet> = {
|
|
5
|
+
title: 'Core/Sheet',
|
|
6
|
+
component: Sheet,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: 'A slide-out sheet component that displays content in a side panel. Supports different widths, compact mode, custom overlays, and fullscreen mode. Includes slots for header, content, and footer. Useful for sidebars, settings panels, and detail views.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
modelValue: {
|
|
17
|
+
control: 'boolean',
|
|
18
|
+
description: 'Controls the open/closed state of the sheet (v-model).',
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
control: 'text',
|
|
22
|
+
description: 'Title displayed at the top of the sheet header.',
|
|
23
|
+
},
|
|
24
|
+
modalWidth: {
|
|
25
|
+
control: { type: 'select', options: ['md', 'lg'] },
|
|
26
|
+
description: 'Width variant of the sheet. "md" for medium width, "lg" for large width.',
|
|
27
|
+
},
|
|
28
|
+
compact: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Enable compact mode, reducing padding and spacing within the sheet.',
|
|
31
|
+
},
|
|
32
|
+
hideDividers: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
description: 'Hide divider lines between sections in the sheet content.',
|
|
35
|
+
},
|
|
36
|
+
overlayClass: {
|
|
37
|
+
control: 'text',
|
|
38
|
+
description: 'Custom CSS classes to apply to the overlay background.',
|
|
39
|
+
},
|
|
40
|
+
fullscreen: {
|
|
41
|
+
control: 'boolean',
|
|
42
|
+
description: 'Make the sheet fullscreen, covering the entire viewport.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default meta
|
|
48
|
+
type Story = StoryObj<typeof meta>
|
|
49
|
+
|
|
50
|
+
export const Default: Story = {
|
|
51
|
+
args: {
|
|
52
|
+
title: 'Default Sheet',
|
|
53
|
+
modalWidth: 'md',
|
|
54
|
+
compact: false,
|
|
55
|
+
hideDividers: false,
|
|
56
|
+
overlayClass: '',
|
|
57
|
+
},
|
|
58
|
+
render: args => ({
|
|
59
|
+
components: { Sheet },
|
|
60
|
+
setup() {
|
|
61
|
+
const isOpen = ref(false)
|
|
62
|
+
const handleClose = () => {
|
|
63
|
+
isOpen.value = false
|
|
64
|
+
}
|
|
65
|
+
return { args, isOpen, handleClose }
|
|
66
|
+
},
|
|
67
|
+
template: `
|
|
68
|
+
<div>
|
|
69
|
+
<button @click="isOpen = true">Open Sheet</button>
|
|
70
|
+
<Sheet v-model="isOpen" v-bind="args" @close="handleClose">
|
|
71
|
+
<div class="p-4">
|
|
72
|
+
<p>This is the default sheet content.</p>
|
|
73
|
+
</div>
|
|
74
|
+
</Sheet>
|
|
75
|
+
</div>
|
|
76
|
+
`,
|
|
77
|
+
}),
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const WithTitle: Story = {
|
|
81
|
+
args: {
|
|
82
|
+
title: 'Sheet with Title',
|
|
83
|
+
modalWidth: 'lg',
|
|
84
|
+
compact: false,
|
|
85
|
+
hideDividers: false,
|
|
86
|
+
overlayClass: '',
|
|
87
|
+
},
|
|
88
|
+
render: args => ({
|
|
89
|
+
components: { Sheet },
|
|
90
|
+
setup() {
|
|
91
|
+
const isOpen = ref(false)
|
|
92
|
+
const handleClose = () => {
|
|
93
|
+
isOpen.value = false
|
|
94
|
+
}
|
|
95
|
+
return { args, isOpen, handleClose }
|
|
96
|
+
},
|
|
97
|
+
template: `
|
|
98
|
+
<div>
|
|
99
|
+
<button @click="isOpen = true">Open Sheet</button>
|
|
100
|
+
<Sheet v-model="isOpen" v-bind="args" @close="handleClose">
|
|
101
|
+
<div class="p-4">
|
|
102
|
+
<p>This sheet has a custom title.</p>
|
|
103
|
+
<button @click="isOpen = false">Close</button>
|
|
104
|
+
</div>
|
|
105
|
+
<template #footer>
|
|
106
|
+
<button @click="isOpen = false">Footer Close</button>
|
|
107
|
+
</template>
|
|
108
|
+
</Sheet>
|
|
109
|
+
</div>
|
|
110
|
+
`,
|
|
111
|
+
}),
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const CompactMode: Story = {
|
|
115
|
+
args: {
|
|
116
|
+
title: 'Compact Sheet',
|
|
117
|
+
modalWidth: 'md',
|
|
118
|
+
compact: true,
|
|
119
|
+
hideDividers: false,
|
|
120
|
+
overlayClass: '',
|
|
121
|
+
},
|
|
122
|
+
render: args => ({
|
|
123
|
+
components: { Sheet },
|
|
124
|
+
setup() {
|
|
125
|
+
const isOpen = ref(false)
|
|
126
|
+
const handleClose = () => {
|
|
127
|
+
isOpen.value = false
|
|
128
|
+
}
|
|
129
|
+
return { args, isOpen, handleClose }
|
|
130
|
+
},
|
|
131
|
+
template: `
|
|
132
|
+
<div>
|
|
133
|
+
<button @click="isOpen = true">Open Compact Sheet</button>
|
|
134
|
+
<Sheet v-model="isOpen" v-bind="args" @close="handleClose">
|
|
135
|
+
<div class="p-4">
|
|
136
|
+
<p>This is a compact sheet.</p>
|
|
137
|
+
<button @click="isOpen = false">Close</button>
|
|
138
|
+
</div>
|
|
139
|
+
<template #footer>
|
|
140
|
+
<button @click="isOpen = false">Footer Close</button>
|
|
141
|
+
</template>
|
|
142
|
+
</Sheet>
|
|
143
|
+
</div>
|
|
144
|
+
`,
|
|
145
|
+
}),
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export const CustomOverlay: Story = {
|
|
149
|
+
args: {
|
|
150
|
+
title: 'Sheet with Custom Overlay',
|
|
151
|
+
modalWidth: 'lg',
|
|
152
|
+
compact: false,
|
|
153
|
+
hideDividers: false,
|
|
154
|
+
overlayClass: 'bg-blue-500/50',
|
|
155
|
+
},
|
|
156
|
+
render: args => ({
|
|
157
|
+
components: { Sheet },
|
|
158
|
+
setup() {
|
|
159
|
+
const isOpen = ref(false)
|
|
160
|
+
const handleClose = () => {
|
|
161
|
+
isOpen.value = false
|
|
162
|
+
}
|
|
163
|
+
return { args, isOpen, handleClose }
|
|
164
|
+
},
|
|
165
|
+
template: `
|
|
166
|
+
<div>
|
|
167
|
+
<button @click="isOpen = true">Open Custom Overlay Sheet</button>
|
|
168
|
+
<Sheet v-model="isOpen" v-bind="args" @close="handleClose">
|
|
169
|
+
<div class="p-4">
|
|
170
|
+
<p>This sheet has a custom overlay class.</p>
|
|
171
|
+
<button @click="isOpen = false">Close</button>
|
|
172
|
+
</div>
|
|
173
|
+
<template #footer>
|
|
174
|
+
<button @click="isOpen = false">Footer Close</button>
|
|
175
|
+
</template>
|
|
176
|
+
</Sheet>
|
|
177
|
+
</div>
|
|
178
|
+
`,
|
|
179
|
+
}),
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export const Fullscreen: Story = {
|
|
183
|
+
args: {
|
|
184
|
+
fullscreen: true,
|
|
185
|
+
},
|
|
186
|
+
render: args => ({
|
|
187
|
+
components: { Sheet },
|
|
188
|
+
setup() {
|
|
189
|
+
const isOpen = ref(false)
|
|
190
|
+
return { args, isOpen }
|
|
191
|
+
},
|
|
192
|
+
template: `
|
|
193
|
+
<div>
|
|
194
|
+
<button @click="isOpen = true">Open Sheet</button>
|
|
195
|
+
<Sheet v-model="isOpen" v-bind="args">
|
|
196
|
+
<div class="p-4">This is a fullscreen sheet.</div>
|
|
197
|
+
</Sheet>
|
|
198
|
+
</div>
|
|
199
|
+
`,
|
|
200
|
+
}),
|
|
201
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
+
|
|
3
|
+
export const sheetVariants = cva(
|
|
4
|
+
'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
side: {
|
|
8
|
+
top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
|
|
9
|
+
bottom:
|
|
10
|
+
'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
|
|
11
|
+
left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
|
|
12
|
+
right:
|
|
13
|
+
'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
side: 'right',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
export type SheetVariants = VariantProps<typeof sheetVariants>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as SideSheetStories from './side-sheet.stories.ts';
|
|
3
|
+
|
|
4
|
+
<Meta of={SideSheetStories} />
|
|
5
|
+
|
|
6
|
+
# TelaSideSheet
|
|
7
|
+
|
|
8
|
+
A side sheet component that slides in from the side of the viewport. Similar to a drawer or sidebar, it displays content in a panel that overlays the main content. Supports custom titles, overlay styling, and v-model binding for open/close state.
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
### Without Title
|
|
13
|
+
|
|
14
|
+
<Canvas of={SideSheetStories.WithoutTitle} />
|
|
15
|
+
|
|
16
|
+
### With Custom Content
|
|
17
|
+
|
|
18
|
+
<Canvas of={SideSheetStories.WithCustomContent} />
|
|
19
|
+
|
|
20
|
+
### Custom Overlay
|
|
21
|
+
|
|
22
|
+
<Canvas of={SideSheetStories.WithCustomOverlay} />
|
|
23
|
+
|
|
24
|
+
### Basic Usage
|
|
25
|
+
|
|
26
|
+
```vue
|
|
27
|
+
<script setup>
|
|
28
|
+
import { ref } from 'vue'
|
|
29
|
+
|
|
30
|
+
const isOpen = ref(false)
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<TelaButton @click="isOpen = true">
|
|
35
|
+
Open Side Sheet
|
|
36
|
+
</TelaButton>
|
|
37
|
+
|
|
38
|
+
<TelaSideSheet v-model="isOpen" title="Side Sheet">
|
|
39
|
+
<div class="p-4">
|
|
40
|
+
<p>Side sheet content goes here</p>
|
|
41
|
+
</div>
|
|
42
|
+
</TelaSideSheet>
|
|
43
|
+
</template>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### With Title
|
|
47
|
+
|
|
48
|
+
```vue
|
|
49
|
+
<TelaSideSheet v-model="isOpen" title="Navigation">
|
|
50
|
+
<div class="p-4">
|
|
51
|
+
<nav>
|
|
52
|
+
<a href="#home">Home</a>
|
|
53
|
+
<a href="#about">About</a>
|
|
54
|
+
<a href="#contact">Contact</a>
|
|
55
|
+
</nav>
|
|
56
|
+
</div>
|
|
57
|
+
</TelaSideSheet>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Without Title Code
|
|
61
|
+
|
|
62
|
+
```vue
|
|
63
|
+
<TelaSideSheet v-model="isOpen">
|
|
64
|
+
<div class="p-4">
|
|
65
|
+
<p>Side sheet without title</p>
|
|
66
|
+
</div>
|
|
67
|
+
</TelaSideSheet>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### With Custom Content Code
|
|
71
|
+
|
|
72
|
+
```vue
|
|
73
|
+
<TelaSideSheet v-model="isOpen" title="Form">
|
|
74
|
+
<div class="p-4">
|
|
75
|
+
<form>
|
|
76
|
+
<TelaInput label="Name" />
|
|
77
|
+
<TelaTextarea label="Message" />
|
|
78
|
+
<TelaButton type="submit">Submit</TelaButton>
|
|
79
|
+
</form>
|
|
80
|
+
</div>
|
|
81
|
+
</TelaSideSheet>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```vue
|
|
85
|
+
<TelaSideSheet
|
|
86
|
+
v-model="isOpen"
|
|
87
|
+
title="Custom Overlay"
|
|
88
|
+
overlay-class="bg-gray-900/50"
|
|
89
|
+
>
|
|
90
|
+
<div class="p-4">
|
|
91
|
+
Side sheet with custom overlay opacity
|
|
92
|
+
</div>
|
|
93
|
+
</TelaSideSheet>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Props
|
|
97
|
+
|
|
98
|
+
<ArgTypes />
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
type SideSheetProps = {
|
|
102
|
+
modelValue: boolean
|
|
103
|
+
title?: string
|
|
104
|
+
overlayClass?: string
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Events
|
|
109
|
+
|
|
110
|
+
- `update:modelValue` - Emitted when side sheet opens/closes with boolean value
|
|
111
|
+
- `close` - Emitted when side sheet is closed
|
|
112
|
+
|
|
113
|
+
## Features
|
|
114
|
+
|
|
115
|
+
- **Slide Animation**: Smooth slide-in from the side
|
|
116
|
+
- **Overlay**: Semi-transparent backdrop
|
|
117
|
+
- **Custom Styling**: Control overlay appearance
|
|
118
|
+
- **Close Button**: Built-in close button in header
|
|
119
|
+
- **Click Outside**: Click overlay to close
|
|
120
|
+
- **Escape Key**: Press Escape to close
|
|
121
|
+
- **Accessible**: Focus trap and keyboard navigation
|
|
122
|
+
- **Header**: Optional title with close button
|
|
123
|
+
|
|
124
|
+
## Accessibility
|
|
125
|
+
|
|
126
|
+
- Focus trapped within side sheet when open
|
|
127
|
+
- Escape key to close
|
|
128
|
+
- Proper ARIA attributes (role="dialog", aria-modal)
|
|
129
|
+
- Focus returns to trigger element on close
|
|
130
|
+
- Close button with accessible label
|
|
131
|
+
- Overlay backdrop for visual separation
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
|
|
3
|
+
import { fn } from '@storybook/test'
|
|
4
|
+
import SideSheet from './side-sheet.vue'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof SideSheet> = {
|
|
7
|
+
title: 'Core/SideSheet',
|
|
8
|
+
component: SideSheet,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: 'A side sheet component that slides in from the side of the viewport. Similar to a drawer or sidebar, it displays content in a panel that overlays the main content. Supports custom titles, overlay styling, and v-model binding for open/close state.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
modelValue: {
|
|
19
|
+
control: 'boolean',
|
|
20
|
+
description: 'Controls the open/closed state of the side sheet (v-model).',
|
|
21
|
+
},
|
|
22
|
+
title: {
|
|
23
|
+
control: 'text',
|
|
24
|
+
description: 'Title displayed at the top of the side sheet header.',
|
|
25
|
+
},
|
|
26
|
+
overlayClass: {
|
|
27
|
+
control: 'text',
|
|
28
|
+
description: 'Custom CSS classes to apply to the overlay background.',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
args: {
|
|
32
|
+
'onUpdate:modelValue': fn(),
|
|
33
|
+
'onClose': fn(),
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default meta
|
|
38
|
+
|
|
39
|
+
type Story = StoryObj<typeof meta>
|
|
40
|
+
|
|
41
|
+
export const Default: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
title: 'Side Sheet Title',
|
|
44
|
+
},
|
|
45
|
+
render: args => ({
|
|
46
|
+
components: { SideSheet },
|
|
47
|
+
setup() {
|
|
48
|
+
const isOpen = ref(false)
|
|
49
|
+
return { args, isOpen }
|
|
50
|
+
},
|
|
51
|
+
template: `
|
|
52
|
+
<div>
|
|
53
|
+
<SideSheet v-model="isOpen" v-bind="args">
|
|
54
|
+
<div class="p-4">
|
|
55
|
+
<p>This is the content of the side sheet.</p>
|
|
56
|
+
<p class="mt-4">You can put any content here.</p>
|
|
57
|
+
</div>
|
|
58
|
+
</SideSheet>
|
|
59
|
+
<button @click="isOpen = true">Open Side Sheet</button>
|
|
60
|
+
</div>
|
|
61
|
+
`,
|
|
62
|
+
}),
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const WithoutTitle: Story = {
|
|
66
|
+
render: args => ({
|
|
67
|
+
components: { SideSheet },
|
|
68
|
+
setup() {
|
|
69
|
+
const isOpen = ref(false)
|
|
70
|
+
return { args, isOpen }
|
|
71
|
+
},
|
|
72
|
+
template: `
|
|
73
|
+
<div>
|
|
74
|
+
<SideSheet v-model="isOpen" v-bind="args">
|
|
75
|
+
<div class="p-4">
|
|
76
|
+
<p>Side sheet without a title.</p>
|
|
77
|
+
</div>
|
|
78
|
+
</SideSheet>
|
|
79
|
+
<button @click="isOpen = true">Open Side Sheet</button>
|
|
80
|
+
</div>
|
|
81
|
+
`,
|
|
82
|
+
}),
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const WithCustomContent: Story = {
|
|
86
|
+
args: {
|
|
87
|
+
title: 'Custom Content',
|
|
88
|
+
},
|
|
89
|
+
render: args => ({
|
|
90
|
+
components: { SideSheet },
|
|
91
|
+
setup() {
|
|
92
|
+
const isOpen = ref(false)
|
|
93
|
+
return { args, isOpen }
|
|
94
|
+
},
|
|
95
|
+
template: `
|
|
96
|
+
<div>
|
|
97
|
+
<SideSheet v-model="isOpen" v-bind="args">
|
|
98
|
+
<div class="p-4">
|
|
99
|
+
<div class="flex flex-col gap-4">
|
|
100
|
+
<input type="text" placeholder="Enter some text" class="border-1px p-2 rounded" />
|
|
101
|
+
<textarea placeholder="Enter a longer text" class="border-1px p-2 rounded" rows="4"></textarea>
|
|
102
|
+
<button class="bg-blue-500 text-white p-2 rounded">Submit</button>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</SideSheet>
|
|
106
|
+
<button @click="isOpen = true">Open Side Sheet</button>
|
|
107
|
+
</div>
|
|
108
|
+
`,
|
|
109
|
+
}),
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export const WithCustomOverlay: Story = {
|
|
113
|
+
args: {
|
|
114
|
+
title: 'Custom Overlay',
|
|
115
|
+
overlayClass: 'bg-gray-900/50',
|
|
116
|
+
},
|
|
117
|
+
render: args => ({
|
|
118
|
+
components: { SideSheet },
|
|
119
|
+
setup() {
|
|
120
|
+
const isOpen = ref(false)
|
|
121
|
+
return { args, isOpen }
|
|
122
|
+
},
|
|
123
|
+
template: `
|
|
124
|
+
<div>
|
|
125
|
+
<SideSheet v-model="isOpen" v-bind="args">
|
|
126
|
+
<div class="p-4">
|
|
127
|
+
<p>Side sheet with custom overlay opacity.</p>
|
|
128
|
+
</div>
|
|
129
|
+
</SideSheet>
|
|
130
|
+
<button @click="isOpen = true">Open Side Sheet</button>
|
|
131
|
+
</div>
|
|
132
|
+
`,
|
|
133
|
+
}),
|
|
134
|
+
}
|