@weni/unnnic-system 3.12.1 → 3.12.3-alpha-teleports.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/CHANGELOG.md +9 -0
- package/dist/components/Alert/Alert.vue.d.ts +3 -3
- package/dist/components/Alert/Version1dot1.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +92 -18
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +184 -36
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +2 -2
- package/dist/components/Card/AccountCard.vue.d.ts +2 -2
- package/dist/components/Card/Card.vue.d.ts +103 -29
- package/dist/components/Card/CardCompany.vue.d.ts +2 -2
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +93 -19
- package/dist/components/Card/ContentCard.vue.d.ts +1 -1
- package/dist/components/Card/DashCard.vue.d.ts +2 -2
- package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
- package/dist/components/Card/MarketplaceCard.vue.d.ts +1 -1
- package/dist/components/Card/SimpleCard.vue.d.ts +92 -18
- package/dist/components/Card/StatusCard.vue.d.ts +1 -1
- package/dist/components/Card/TitleCard.vue.d.ts +92 -18
- package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
- package/dist/components/CardInformation/CardInformation.vue.d.ts +93 -19
- package/dist/components/CardProject/CardProject.vue.d.ts +2 -2
- package/dist/components/Carousel/Carousel.vue.d.ts +2 -2
- package/dist/components/Carousel/TagCarousel.vue.d.ts +2 -2
- package/dist/components/ChartBar/ChartBar.vue.d.ts +98 -24
- package/dist/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue.d.ts.map +1 -1
- package/dist/components/ChartLine/ChartLine.vue.d.ts +92 -18
- package/dist/components/ChatText/ChatText.vue.d.ts +92 -18
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +92 -18
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/DataArea/DataArea.vue.d.ts +92 -18
- package/dist/components/DataTable/index.vue.d.ts +1 -1
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +13 -13
- package/dist/components/Drawer/Drawer.vue.d.ts +37 -207
- package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/components/FormElement/FormElement.vue.d.ts +6 -6
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +6 -6
- package/dist/components/Input/Input.vue.d.ts +12 -12
- package/dist/components/Input/TextInput.vue.d.ts +2 -2
- package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
- package/dist/components/Label/Label.vue.d.ts +1 -1
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +209 -35
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +18 -18
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
- package/dist/components/MoodRating/MoodRating.vue.d.ts +92 -18
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +18 -18
- package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/components/Radio/Radio.vue.d.ts +6 -6
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +11 -11
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +2 -2
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +5 -5
- package/dist/components/SelectTime/index.vue.d.ts +3 -3
- package/dist/components/Slider/Slider.vue.d.ts +92 -18
- package/dist/components/Switch/Switch.vue.d.ts +3 -3
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/Tab/Tab.vue.d.ts +92 -18
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
- package/dist/components/Tag/DefaultTag.vue.d.ts +1 -1
- package/dist/components/Tag/Tag.vue.d.ts +2 -2
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.vue.d.ts +8 -8
- package/dist/components/Toast/Toast.vue.d.ts +1 -1
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
- package/dist/components/ToolTip/ToolTip.vue.d.ts +92 -18
- package/dist/components/ToolTip/ToolTip.vue.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +6 -6
- package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
- package/dist/components/UploadArea/UploadArea.vue.d.ts +6 -6
- package/dist/components/ui/dialog/Dialog.vue.d.ts +23 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +43 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +29 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +23 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +19 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +8 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +35 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +43 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +22 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +25 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +8 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +23 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +19 -0
- package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/drawer/index.d.ts +11 -0
- package/dist/components/ui/drawer/index.d.ts.map +1 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +1 -1
- package/dist/components/ui/popover/index.d.ts +0 -1
- package/dist/components/ui/popover/index.d.ts.map +1 -1
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +31 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +19 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/{es-9756db6d.mjs → es-4aa88754.mjs} +1 -1
- package/dist/{index-ab280280.mjs → index-ec96f88a.mjs} +99532 -96697
- package/dist/lib/layer-manager.d.ts +16 -0
- package/dist/lib/layer-manager.d.ts.map +1 -0
- package/dist/{pt-br-55135cbc.mjs → pt-br-ec1ec185.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +231 -203
- package/dist/unnnic.umd.js +48 -44
- package/package.json +3 -2
- package/src/assets/scss/tailwind.scss +8 -0
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
- package/src/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue +2 -1
- package/src/components/ChartFunnel/SvgFunnel/ChartFunnelTwoRows.vue +61 -60
- package/src/components/Checkbox/Checkbox.vue +2 -8
- package/src/components/CheckboxGroup/CheckboxGroup.vue +5 -7
- package/src/components/Chip/Chip.vue +1 -1
- package/src/components/Drawer/Drawer.vue +180 -270
- package/src/components/Drawer/__tests__/Drawer.spec.js +32 -43
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
- package/src/components/FormElement/FormElement.vue +87 -96
- package/src/components/Input/Input.vue +2 -2
- package/src/components/ModalDialog/ModalDialog.vue +64 -148
- package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
- package/src/components/Radio/Radio.vue +6 -12
- package/src/components/Radio/__test__/Radio.spec.js +1 -3
- package/src/components/RadioGroup/RadioGroup.vue +10 -18
- package/src/components/Switch/Switch.vue +3 -10
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
- package/src/components/TemplatePreview/TemplatePreview.vue +25 -28
- package/src/components/TemplatePreview/TemplatePreviewModal.vue +10 -10
- package/src/components/TemplatePreview/types.d.ts +3 -3
- package/src/components/Toast/Toast.vue +4 -1
- package/src/components/ToolTip/ToolTip.vue +25 -177
- package/src/components/ToolTip/__tests__/ToolTip.spec.js +339 -61
- package/src/components/index.ts +62 -1
- package/src/components/ui/dialog/Dialog.vue +19 -0
- package/src/components/ui/dialog/DialogClose.vue +29 -0
- package/src/components/ui/dialog/DialogContent.vue +140 -0
- package/src/components/ui/dialog/DialogFooter.vue +50 -0
- package/src/components/ui/dialog/DialogHeader.vue +83 -0
- package/src/components/ui/dialog/DialogTitle.vue +38 -0
- package/src/components/ui/dialog/DialogTrigger.vue +16 -0
- package/src/components/ui/dialog/index.ts +7 -0
- package/src/components/ui/drawer/Drawer.vue +27 -0
- package/src/components/ui/drawer/DrawerClose.vue +37 -0
- package/src/components/ui/drawer/DrawerContent.vue +111 -0
- package/src/components/ui/drawer/DrawerDescription.vue +40 -0
- package/src/components/ui/drawer/DrawerFooter.vue +38 -0
- package/src/components/ui/drawer/DrawerHeader.vue +57 -0
- package/src/components/ui/drawer/DrawerOverlay.vue +33 -0
- package/src/components/ui/drawer/DrawerTitle.vue +37 -0
- package/src/components/ui/drawer/DrawerTrigger.vue +31 -0
- package/src/components/ui/drawer/index.ts +10 -0
- package/src/components/ui/popover/PopoverContent.vue +4 -2
- package/src/components/ui/popover/PopoverTrigger.vue +5 -1
- package/src/components/ui/tooltip/Tooltip.vue +21 -0
- package/src/components/ui/tooltip/TooltipContent.vue +74 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +26 -0
- package/src/components/ui/tooltip/index.ts +3 -0
- package/src/lib/layer-manager.ts +92 -0
- package/src/stories/Dialog.stories.js +832 -0
- package/src/stories/Drawer.stories.js +1 -1
- package/src/stories/DrawerNext.stories.js +611 -0
- package/src/stories/LayerManager.docs.mdx +40 -0
- package/src/stories/LayerManager.stories.js +364 -0
- package/src/stories/ModalDialog.mdx +3 -0
- package/src/stories/ModalDialog.stories.js +1 -1
- package/src/stories/TemplatePreview.stories.js +27 -27
- package/src/stories/TemplatePreviewModal.stories.js +31 -31
- package/dist/components/ui/popover/PopoverOption.vue.d.ts +0 -18
- package/dist/components/ui/popover/PopoverOption.vue.d.ts.map +0 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import UnnnicButton from '../components/Button/Button.vue';
|
|
3
|
+
import UnnnicToast from '../components/Toast/Toast.vue';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Dialog,
|
|
7
|
+
DialogTrigger,
|
|
8
|
+
DialogContent,
|
|
9
|
+
DialogHeader,
|
|
10
|
+
DialogTitle,
|
|
11
|
+
DialogFooter,
|
|
12
|
+
DialogClose,
|
|
13
|
+
} from '../components/ui/dialog';
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
Drawer,
|
|
17
|
+
DrawerTrigger,
|
|
18
|
+
DrawerContent,
|
|
19
|
+
DrawerHeader,
|
|
20
|
+
DrawerTitle,
|
|
21
|
+
DrawerDescription,
|
|
22
|
+
DrawerFooter,
|
|
23
|
+
DrawerClose,
|
|
24
|
+
} from '../components/ui/drawer';
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
Popover,
|
|
28
|
+
PopoverTrigger,
|
|
29
|
+
PopoverContent,
|
|
30
|
+
} from '../components/ui/popover';
|
|
31
|
+
|
|
32
|
+
import {
|
|
33
|
+
Tooltip,
|
|
34
|
+
TooltipTrigger,
|
|
35
|
+
TooltipContent,
|
|
36
|
+
} from '../components/ui/tooltip';
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
title: 'Utilities/Layer Manager',
|
|
40
|
+
parameters: {
|
|
41
|
+
docs: {
|
|
42
|
+
description: {
|
|
43
|
+
component:
|
|
44
|
+
'Minimal stories that prove the global layer manager keeps dialogs, drawers, tooltips, popovers and toasts in the right stacking order.',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const DialogWithTooltipAndPopover = {
|
|
51
|
+
name: 'Dialog + Tooltip + Popover',
|
|
52
|
+
render: () => ({
|
|
53
|
+
components: {
|
|
54
|
+
Dialog,
|
|
55
|
+
DialogTrigger,
|
|
56
|
+
DialogContent,
|
|
57
|
+
DialogHeader,
|
|
58
|
+
DialogTitle,
|
|
59
|
+
DialogFooter,
|
|
60
|
+
DialogClose,
|
|
61
|
+
Tooltip,
|
|
62
|
+
TooltipTrigger,
|
|
63
|
+
TooltipContent,
|
|
64
|
+
Popover,
|
|
65
|
+
PopoverTrigger,
|
|
66
|
+
PopoverContent,
|
|
67
|
+
UnnnicButton,
|
|
68
|
+
},
|
|
69
|
+
template: `
|
|
70
|
+
<Dialog>
|
|
71
|
+
<DialogTrigger>
|
|
72
|
+
<UnnnicButton text="Open dialog" type="primary" />
|
|
73
|
+
</DialogTrigger>
|
|
74
|
+
<DialogContent>
|
|
75
|
+
<DialogHeader>
|
|
76
|
+
<DialogTitle>Dialog surface</DialogTitle>
|
|
77
|
+
</DialogHeader>
|
|
78
|
+
|
|
79
|
+
<div style="padding: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;">
|
|
80
|
+
<Tooltip>
|
|
81
|
+
<TooltipTrigger>
|
|
82
|
+
<UnnnicButton text="Tooltip" type="secondary" />
|
|
83
|
+
</TooltipTrigger>
|
|
84
|
+
<TooltipContent>This tooltip should appear above the dialog.</TooltipContent>
|
|
85
|
+
</Tooltip>
|
|
86
|
+
|
|
87
|
+
<Popover>
|
|
88
|
+
<PopoverTrigger>
|
|
89
|
+
<UnnnicButton text="Popover" type="primary" />
|
|
90
|
+
</PopoverTrigger>
|
|
91
|
+
<PopoverContent>
|
|
92
|
+
<section style="padding: 16px;">
|
|
93
|
+
<p style="margin: 0; color: #67738B;">
|
|
94
|
+
Popover content should also float above.
|
|
95
|
+
</p>
|
|
96
|
+
</section>
|
|
97
|
+
</PopoverContent>
|
|
98
|
+
</Popover>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<DialogFooter>
|
|
102
|
+
<DialogClose>
|
|
103
|
+
<UnnnicButton text="Close" type="tertiary" />
|
|
104
|
+
</DialogClose>
|
|
105
|
+
</DialogFooter>
|
|
106
|
+
</DialogContent>
|
|
107
|
+
</Dialog>
|
|
108
|
+
`,
|
|
109
|
+
}),
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const DrawerWithTooltipAndPopover = {
|
|
113
|
+
name: 'Drawer + Tooltip + Popover',
|
|
114
|
+
render: () => ({
|
|
115
|
+
components: {
|
|
116
|
+
Drawer,
|
|
117
|
+
DrawerTrigger,
|
|
118
|
+
DrawerContent,
|
|
119
|
+
DrawerHeader,
|
|
120
|
+
DrawerTitle,
|
|
121
|
+
DrawerDescription,
|
|
122
|
+
DrawerFooter,
|
|
123
|
+
DrawerClose,
|
|
124
|
+
Tooltip,
|
|
125
|
+
TooltipTrigger,
|
|
126
|
+
TooltipContent,
|
|
127
|
+
Popover,
|
|
128
|
+
PopoverTrigger,
|
|
129
|
+
PopoverContent,
|
|
130
|
+
UnnnicButton,
|
|
131
|
+
},
|
|
132
|
+
template: `
|
|
133
|
+
<Drawer>
|
|
134
|
+
<DrawerTrigger>
|
|
135
|
+
<UnnnicButton text="Open drawer" type="primary" />
|
|
136
|
+
</DrawerTrigger>
|
|
137
|
+
<DrawerContent>
|
|
138
|
+
<DrawerHeader>
|
|
139
|
+
<DrawerTitle>Drawer surface</DrawerTitle>
|
|
140
|
+
<DrawerDescription>Interact with floating layers.</DrawerDescription>
|
|
141
|
+
</DrawerHeader>
|
|
142
|
+
|
|
143
|
+
<div style="padding: 24px; display: flex; flex-direction: column; gap: 16px;">
|
|
144
|
+
<Tooltip>
|
|
145
|
+
<TooltipTrigger>
|
|
146
|
+
<UnnnicButton text="Tooltip" type="secondary" />
|
|
147
|
+
</TooltipTrigger>
|
|
148
|
+
<TooltipContent>Tooltip should appear above the drawer.</TooltipContent>
|
|
149
|
+
</Tooltip>
|
|
150
|
+
|
|
151
|
+
<Popover>
|
|
152
|
+
<PopoverTrigger>
|
|
153
|
+
<UnnnicButton text="Popover" type="primary" />
|
|
154
|
+
</PopoverTrigger>
|
|
155
|
+
<PopoverContent>
|
|
156
|
+
<section style="padding: 16px;">
|
|
157
|
+
<p style="margin: 0; color: #67738B;">
|
|
158
|
+
Popover content should remain on top too.
|
|
159
|
+
</p>
|
|
160
|
+
</section>
|
|
161
|
+
</PopoverContent>
|
|
162
|
+
</Popover>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<DrawerFooter>
|
|
166
|
+
<DrawerClose>
|
|
167
|
+
<UnnnicButton text="Close drawer" type="tertiary" />
|
|
168
|
+
</DrawerClose>
|
|
169
|
+
</DrawerFooter>
|
|
170
|
+
</DrawerContent>
|
|
171
|
+
</Drawer>
|
|
172
|
+
`,
|
|
173
|
+
}),
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const DrawerNextToDialog = {
|
|
177
|
+
name: 'Drawer + Dialog',
|
|
178
|
+
render: () => ({
|
|
179
|
+
components: {
|
|
180
|
+
Drawer,
|
|
181
|
+
DrawerContent,
|
|
182
|
+
DrawerHeader,
|
|
183
|
+
DrawerTitle,
|
|
184
|
+
DrawerDescription,
|
|
185
|
+
DrawerFooter,
|
|
186
|
+
DrawerClose,
|
|
187
|
+
Dialog,
|
|
188
|
+
DialogContent,
|
|
189
|
+
DialogHeader,
|
|
190
|
+
DialogTitle,
|
|
191
|
+
DialogFooter,
|
|
192
|
+
DialogClose,
|
|
193
|
+
UnnnicButton,
|
|
194
|
+
},
|
|
195
|
+
setup() {
|
|
196
|
+
const drawerOpen = ref(false);
|
|
197
|
+
const dialogOpen = ref(false);
|
|
198
|
+
return { drawerOpen, dialogOpen };
|
|
199
|
+
},
|
|
200
|
+
template: `
|
|
201
|
+
<div>
|
|
202
|
+
<div style="display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;">
|
|
203
|
+
<UnnnicButton text="Open drawer" type="primary" @click="drawerOpen = true" />
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<Drawer v-model:open="drawerOpen">
|
|
207
|
+
<DrawerContent size="large">
|
|
208
|
+
<DrawerHeader>
|
|
209
|
+
<DrawerTitle>Drawer</DrawerTitle>
|
|
210
|
+
</DrawerHeader>
|
|
211
|
+
<div style="padding: 24px; color: #67738B; display: grid; gap: 16px;">
|
|
212
|
+
Keep this drawer open and toggle the dialog.
|
|
213
|
+
|
|
214
|
+
<UnnnicButton text="Open dialog" @click="dialogOpen = true" />
|
|
215
|
+
</div>
|
|
216
|
+
</DrawerContent>
|
|
217
|
+
</Drawer>
|
|
218
|
+
|
|
219
|
+
<Dialog v-model:open="dialogOpen">
|
|
220
|
+
<DialogContent>
|
|
221
|
+
<DialogHeader>
|
|
222
|
+
<DialogTitle>Dialog overlay</DialogTitle>
|
|
223
|
+
</DialogHeader>
|
|
224
|
+
<div style="padding: 24px; color: #67738B;">
|
|
225
|
+
This dialog must appear above the drawer and its overlay.
|
|
226
|
+
</div>
|
|
227
|
+
<DialogFooter>
|
|
228
|
+
<DialogClose>
|
|
229
|
+
<UnnnicButton text="Close dialog" type="tertiary" />
|
|
230
|
+
</DialogClose>
|
|
231
|
+
</DialogFooter>
|
|
232
|
+
</DialogContent>
|
|
233
|
+
</Dialog>
|
|
234
|
+
</div>
|
|
235
|
+
`,
|
|
236
|
+
}),
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export const NestedDialogs = {
|
|
240
|
+
name: 'Dialog nested',
|
|
241
|
+
render: () => ({
|
|
242
|
+
components: {
|
|
243
|
+
Dialog,
|
|
244
|
+
DialogTrigger,
|
|
245
|
+
DialogContent,
|
|
246
|
+
DialogHeader,
|
|
247
|
+
DialogTitle,
|
|
248
|
+
DialogFooter,
|
|
249
|
+
DialogClose,
|
|
250
|
+
Tooltip,
|
|
251
|
+
TooltipTrigger,
|
|
252
|
+
TooltipContent,
|
|
253
|
+
UnnnicButton,
|
|
254
|
+
},
|
|
255
|
+
setup() {
|
|
256
|
+
const parentOpen = ref(false);
|
|
257
|
+
const childOpen = ref(false);
|
|
258
|
+
return { parentOpen, childOpen };
|
|
259
|
+
},
|
|
260
|
+
template: `
|
|
261
|
+
<Dialog v-model:open="parentOpen">
|
|
262
|
+
<DialogTrigger>
|
|
263
|
+
<UnnnicButton text="Open parent dialog" type="primary" />
|
|
264
|
+
</DialogTrigger>
|
|
265
|
+
<DialogContent>
|
|
266
|
+
<DialogHeader>
|
|
267
|
+
<DialogTitle>Parent dialog</DialogTitle>
|
|
268
|
+
</DialogHeader>
|
|
269
|
+
<div style="padding: 24px; display: flex; flex-direction: column; gap: 12px;">
|
|
270
|
+
<p style="margin: 0; color: #67738B;">Open the child dialog to stack overlays.</p>
|
|
271
|
+
<UnnnicButton text="Open child dialog" type="primary" @click="childOpen = true" />
|
|
272
|
+
</div>
|
|
273
|
+
<DialogFooter>
|
|
274
|
+
<DialogClose>
|
|
275
|
+
<UnnnicButton text="Close parent" type="tertiary" />
|
|
276
|
+
</DialogClose>
|
|
277
|
+
</DialogFooter>
|
|
278
|
+
</DialogContent>
|
|
279
|
+
</Dialog>
|
|
280
|
+
|
|
281
|
+
<Dialog v-model:open="childOpen">
|
|
282
|
+
<DialogContent size="small">
|
|
283
|
+
<DialogHeader>
|
|
284
|
+
<DialogTitle>Child dialog</DialogTitle>
|
|
285
|
+
</DialogHeader>
|
|
286
|
+
<div style="padding: 24px; display: flex; flex-direction: column; gap: 8px;">
|
|
287
|
+
<Tooltip>
|
|
288
|
+
<TooltipTrigger>
|
|
289
|
+
<UnnnicButton text="Tooltip here" type="secondary" />
|
|
290
|
+
</TooltipTrigger>
|
|
291
|
+
<TooltipContent>Tooltip stays on top of both dialogs.</TooltipContent>
|
|
292
|
+
</Tooltip>
|
|
293
|
+
</div>
|
|
294
|
+
<DialogFooter>
|
|
295
|
+
<DialogClose>
|
|
296
|
+
<UnnnicButton text="Close child" type="primary" />
|
|
297
|
+
</DialogClose>
|
|
298
|
+
</DialogFooter>
|
|
299
|
+
</DialogContent>
|
|
300
|
+
</Dialog>
|
|
301
|
+
`,
|
|
302
|
+
}),
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
export const DialogWithToast = {
|
|
306
|
+
name: 'Dialog + Toast',
|
|
307
|
+
render: () => ({
|
|
308
|
+
components: {
|
|
309
|
+
Dialog,
|
|
310
|
+
DialogContent,
|
|
311
|
+
DialogHeader,
|
|
312
|
+
DialogTitle,
|
|
313
|
+
DialogFooter,
|
|
314
|
+
DialogClose,
|
|
315
|
+
UnnnicToast,
|
|
316
|
+
UnnnicButton,
|
|
317
|
+
},
|
|
318
|
+
setup() {
|
|
319
|
+
const dialogOpen = ref(false);
|
|
320
|
+
const toastVisible = ref(false);
|
|
321
|
+
const toastKey = ref(0);
|
|
322
|
+
|
|
323
|
+
const showToast = () => {
|
|
324
|
+
toastKey.value += 1;
|
|
325
|
+
toastVisible.value = true;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
return { dialogOpen, toastVisible, toastKey, showToast };
|
|
329
|
+
},
|
|
330
|
+
template: `
|
|
331
|
+
<div style="display: flex; gap: 16px;">
|
|
332
|
+
<UnnnicButton text="Open dialog" type="primary" @click="dialogOpen = true" />
|
|
333
|
+
<UnnnicButton text="Show toast" type="secondary" @click="showToast" />
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<Dialog v-model:open="dialogOpen">
|
|
337
|
+
<DialogContent>
|
|
338
|
+
<DialogHeader>
|
|
339
|
+
<DialogTitle>Dialog layer</DialogTitle>
|
|
340
|
+
</DialogHeader>
|
|
341
|
+
<div style="padding: 24px; color: #67738B;">
|
|
342
|
+
Use the buttons to compare dialog and toast layers.
|
|
343
|
+
</div>
|
|
344
|
+
<DialogFooter>
|
|
345
|
+
<DialogClose>
|
|
346
|
+
<UnnnicButton text="Close dialog" type="tertiary" />
|
|
347
|
+
</DialogClose>
|
|
348
|
+
<UnnnicButton text="Show toast" type="primary" @click="showToast" />
|
|
349
|
+
</DialogFooter>
|
|
350
|
+
</DialogContent>
|
|
351
|
+
</Dialog>
|
|
352
|
+
|
|
353
|
+
<UnnnicToast
|
|
354
|
+
v-if="toastVisible"
|
|
355
|
+
:key="toastKey"
|
|
356
|
+
title="Toast layer"
|
|
357
|
+
description="Toasts should always float above dialogs."
|
|
358
|
+
type="success"
|
|
359
|
+
:timeout="0"
|
|
360
|
+
@close="toastVisible = false"
|
|
361
|
+
/>
|
|
362
|
+
`,
|
|
363
|
+
}),
|
|
364
|
+
};
|
|
@@ -6,6 +6,9 @@ import * as ModalDialogStories from './ModalDialog.stories';
|
|
|
6
6
|
|
|
7
7
|
# ModalDialog
|
|
8
8
|
|
|
9
|
+
> **⚠️ DEPRECATED**: This component has been deprecated in favor of the new `Dialog` component. Please use `UnnnicDialog`
|
|
10
|
+
instead for new implementations. See the [Dialog documentation](?path=/docs/feedback-dialog--docs) for more information.
|
|
11
|
+
|
|
9
12
|
The ModalDialog was designed to inform the user about a specific task, request information, or involve other tasks.
|
|
10
13
|
|
|
11
14
|
<Source
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import UnnnicTemplatePreview from
|
|
1
|
+
import UnnnicTemplatePreview from "../components/TemplatePreview/TemplatePreview.vue";
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title:
|
|
5
|
-
tags: [
|
|
4
|
+
title: "example/TemplatePreview",
|
|
5
|
+
tags: ["autodocs"],
|
|
6
6
|
component: UnnnicTemplatePreview,
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -17,28 +17,28 @@ const Template = (args) => ({
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
const bodyText =
|
|
20
|
-
|
|
20
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sem orci, ultrices id lectus non, vehicula suscipit libero. Ut vehicula libero a tempus fringilla. Nam tincidunt vestibulum maximus. Morbi vel pretium risus. Curabitur id quam lectus. Quisque dolor elit, auctor a lacus non, rutrum ullamcorper mi. Nulla et turpis sed eros pharetra ullamcorper fermentum ac nisl. Donec lacinia hendrerit tellus, sit amet suscipit velit vestibulum sed. Praesent gravida posuere metus, ut fringilla dolor euismod vel. Aenean vel ipsum magna. Integer metus mi, fermentum ut nulla at, facilisis lobortis metus. Ut vitae tortor posuere, dapibus leo quis, finibus neque.";
|
|
21
21
|
|
|
22
22
|
export const Default = Template.bind({});
|
|
23
23
|
Default.args = {
|
|
24
24
|
template: {
|
|
25
25
|
header: {
|
|
26
|
-
type:
|
|
27
|
-
text:
|
|
26
|
+
type: "TEXT",
|
|
27
|
+
text: "Hello, world!",
|
|
28
28
|
},
|
|
29
|
-
footer:
|
|
29
|
+
footer: "Weni by VTEX",
|
|
30
30
|
buttons: [
|
|
31
31
|
{
|
|
32
|
-
text:
|
|
33
|
-
type:
|
|
32
|
+
text: "Button 1",
|
|
33
|
+
type: "PHONE_NUMBER",
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
text:
|
|
37
|
-
type:
|
|
36
|
+
text: "Button 2",
|
|
37
|
+
type: "URL",
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
text:
|
|
41
|
-
type:
|
|
40
|
+
text: "Button 3",
|
|
41
|
+
type: "QUICK_REPLY",
|
|
42
42
|
},
|
|
43
43
|
],
|
|
44
44
|
body: bodyText,
|
|
@@ -49,10 +49,10 @@ export const Image = Template.bind({});
|
|
|
49
49
|
Image.args = {
|
|
50
50
|
template: {
|
|
51
51
|
header: {
|
|
52
|
-
type:
|
|
53
|
-
mediaType:
|
|
52
|
+
type: "MEDIA",
|
|
53
|
+
mediaType: "IMAGE",
|
|
54
54
|
},
|
|
55
|
-
footer:
|
|
55
|
+
footer: "Weni by VTEX",
|
|
56
56
|
body: bodyText,
|
|
57
57
|
},
|
|
58
58
|
};
|
|
@@ -61,21 +61,21 @@ export const Video = Template.bind({});
|
|
|
61
61
|
Video.args = {
|
|
62
62
|
template: {
|
|
63
63
|
header: {
|
|
64
|
-
type:
|
|
65
|
-
mediaType:
|
|
64
|
+
type: "MEDIA",
|
|
65
|
+
mediaType: "VIDEO",
|
|
66
66
|
},
|
|
67
67
|
buttons: [
|
|
68
68
|
{
|
|
69
|
-
text:
|
|
70
|
-
type:
|
|
69
|
+
text: "Button 1",
|
|
70
|
+
type: "PHONE_NUMBER",
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
text:
|
|
74
|
-
type:
|
|
73
|
+
text: "Button 2",
|
|
74
|
+
type: "URL",
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
text:
|
|
78
|
-
type:
|
|
77
|
+
text: "Button 3",
|
|
78
|
+
type: "QUICK_REPLY",
|
|
79
79
|
},
|
|
80
80
|
],
|
|
81
81
|
},
|
|
@@ -85,10 +85,10 @@ export const Document = Template.bind({});
|
|
|
85
85
|
Document.args = {
|
|
86
86
|
template: {
|
|
87
87
|
header: {
|
|
88
|
-
type:
|
|
89
|
-
mediaType:
|
|
88
|
+
type: "MEDIA",
|
|
89
|
+
mediaType: "DOCUMENT",
|
|
90
90
|
},
|
|
91
|
-
footer:
|
|
91
|
+
footer: "Weni by VTEX",
|
|
92
92
|
body: bodyText,
|
|
93
93
|
},
|
|
94
94
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import UnnnicTemplatePreviewModal from
|
|
1
|
+
import UnnnicTemplatePreviewModal from "../components/TemplatePreview/TemplatePreviewModal.vue";
|
|
2
2
|
|
|
3
|
-
import { action } from
|
|
3
|
+
import { action } from "@storybook/addon-actions";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
7
|
-
tags: [
|
|
6
|
+
title: "example/TemplatePreviewModal",
|
|
7
|
+
tags: ["autodocs"],
|
|
8
8
|
component: UnnnicTemplatePreviewModal,
|
|
9
9
|
argTypes: {
|
|
10
10
|
locale: {
|
|
11
|
-
control: { type:
|
|
12
|
-
options: [
|
|
11
|
+
control: { type: "select" },
|
|
12
|
+
options: ["pt-br", "en", "es"],
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
};
|
|
@@ -18,7 +18,7 @@ const Template = (args) => ({
|
|
|
18
18
|
components: { UnnnicTemplatePreviewModal },
|
|
19
19
|
setup() {
|
|
20
20
|
const close = () => {
|
|
21
|
-
action(
|
|
21
|
+
action("close")();
|
|
22
22
|
args.modelValue = false;
|
|
23
23
|
};
|
|
24
24
|
return { args, close };
|
|
@@ -32,29 +32,29 @@ const Template = (args) => ({
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
const bodyText =
|
|
35
|
-
|
|
35
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sem orci, ultrices id lectus non, vehicula suscipit libero. Ut vehicula libero a tempus fringilla. Nam tincidunt vestibulum maximus. Morbi vel pretium risus. Curabitur id quam lectus. Quisque dolor elit, auctor a lacus non, rutrum ullamcorper mi. Nulla et turpis sed eros pharetra ullamcorper fermentum ac nisl. Donec lacinia hendrerit tellus, sit amet suscipit velit vestibulum sed. Praesent gravida posuere metus, ut fringilla dolor euismod vel. Aenean vel ipsum magna. Integer metus mi, fermentum ut nulla at, facilisis lobortis metus. Ut vitae tortor posuere, dapibus leo quis, finibus neque.";
|
|
36
36
|
|
|
37
37
|
export const Default = Template.bind({});
|
|
38
38
|
Default.args = {
|
|
39
39
|
modelValue: false,
|
|
40
40
|
template: {
|
|
41
41
|
header: {
|
|
42
|
-
type:
|
|
43
|
-
text:
|
|
42
|
+
type: "TEXT",
|
|
43
|
+
text: "Hello, world!",
|
|
44
44
|
},
|
|
45
|
-
footer:
|
|
45
|
+
footer: "Weni by VTEX",
|
|
46
46
|
buttons: [
|
|
47
47
|
{
|
|
48
|
-
text:
|
|
49
|
-
type:
|
|
48
|
+
text: "Button 1",
|
|
49
|
+
type: "PHONE_NUMBER",
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
text:
|
|
53
|
-
type:
|
|
52
|
+
text: "Button 2",
|
|
53
|
+
type: "URL",
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
|
-
text:
|
|
57
|
-
type:
|
|
56
|
+
text: "Button 3",
|
|
57
|
+
type: "QUICK_REPLY",
|
|
58
58
|
},
|
|
59
59
|
],
|
|
60
60
|
body: bodyText,
|
|
@@ -65,10 +65,10 @@ export const Image = Template.bind({});
|
|
|
65
65
|
Image.args = {
|
|
66
66
|
template: {
|
|
67
67
|
header: {
|
|
68
|
-
type:
|
|
69
|
-
mediaType:
|
|
68
|
+
type: "MEDIA",
|
|
69
|
+
mediaType: "IMAGE",
|
|
70
70
|
},
|
|
71
|
-
footer:
|
|
71
|
+
footer: "Weni by VTEX",
|
|
72
72
|
body: bodyText,
|
|
73
73
|
},
|
|
74
74
|
};
|
|
@@ -77,21 +77,21 @@ export const Video = Template.bind({});
|
|
|
77
77
|
Video.args = {
|
|
78
78
|
template: {
|
|
79
79
|
header: {
|
|
80
|
-
type:
|
|
81
|
-
mediaType:
|
|
80
|
+
type: "MEDIA",
|
|
81
|
+
mediaType: "VIDEO",
|
|
82
82
|
},
|
|
83
83
|
buttons: [
|
|
84
84
|
{
|
|
85
|
-
text:
|
|
86
|
-
type:
|
|
85
|
+
text: "Button 1",
|
|
86
|
+
type: "PHONE_NUMBER",
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
|
-
text:
|
|
90
|
-
type:
|
|
89
|
+
text: "Button 2",
|
|
90
|
+
type: "URL",
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
|
-
text:
|
|
94
|
-
type:
|
|
93
|
+
text: "Button 3",
|
|
94
|
+
type: "QUICK_REPLY",
|
|
95
95
|
},
|
|
96
96
|
],
|
|
97
97
|
},
|
|
@@ -101,10 +101,10 @@ export const Document = Template.bind({});
|
|
|
101
101
|
Document.args = {
|
|
102
102
|
template: {
|
|
103
103
|
header: {
|
|
104
|
-
type:
|
|
105
|
-
mediaType:
|
|
104
|
+
type: "MEDIA",
|
|
105
|
+
mediaType: "DOCUMENT",
|
|
106
106
|
},
|
|
107
|
-
footer:
|
|
107
|
+
footer: "Weni by VTEX",
|
|
108
108
|
body: bodyText,
|
|
109
109
|
},
|
|
110
110
|
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { SchemeColor } from '../../../types/scheme-colors';
|
|
2
|
-
interface PopoverOptionProps {
|
|
3
|
-
label: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
active?: boolean;
|
|
6
|
-
focused?: boolean;
|
|
7
|
-
scheme?: SchemeColor;
|
|
8
|
-
icon?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: import('vue').DefineComponent<PopoverOptionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PopoverOptionProps> & Readonly<{}>, {
|
|
11
|
-
icon: string;
|
|
12
|
-
scheme: SchemeColor;
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
active: boolean;
|
|
15
|
-
focused: boolean;
|
|
16
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
-
export default _default;
|
|
18
|
-
//# sourceMappingURL=PopoverOption.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverOption.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/popover/PopoverOption.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOzD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;;UADQ,MAAM;YADJ,WAAW;cAHT,OAAO;YACT,OAAO;aACN,OAAO;;AAwGnB,wBAQG"}
|