@weni/unnnic-system 3.12.2 → 3.12.3-alpha.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.
Files changed (211) hide show
  1. package/dist/components/Alert/Alert.vue.d.ts +3 -3
  2. package/dist/components/Alert/Version1dot1.vue.d.ts +1 -1
  3. package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +92 -18
  4. package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +184 -36
  5. package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +1 -1
  6. package/dist/components/Button/Button.vue.d.ts +2 -2
  7. package/dist/components/Card/AccountCard.vue.d.ts +2 -2
  8. package/dist/components/Card/Card.vue.d.ts +103 -29
  9. package/dist/components/Card/CardCompany.vue.d.ts +2 -2
  10. package/dist/components/Card/CardStatusesContainer.vue.d.ts +93 -19
  11. package/dist/components/Card/ContentCard.vue.d.ts +1 -1
  12. package/dist/components/Card/DashCard.vue.d.ts +2 -2
  13. package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
  14. package/dist/components/Card/MarketplaceCard.vue.d.ts +1 -1
  15. package/dist/components/Card/SimpleCard.vue.d.ts +92 -18
  16. package/dist/components/Card/StatusCard.vue.d.ts +1 -1
  17. package/dist/components/Card/TitleCard.vue.d.ts +92 -18
  18. package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
  19. package/dist/components/CardInformation/CardInformation.vue.d.ts +93 -19
  20. package/dist/components/CardProject/CardProject.vue.d.ts +2 -2
  21. package/dist/components/Carousel/Carousel.vue.d.ts +2 -2
  22. package/dist/components/Carousel/TagCarousel.vue.d.ts +2 -2
  23. package/dist/components/ChartBar/ChartBar.vue.d.ts +98 -24
  24. package/dist/components/ChartLine/ChartLine.vue.d.ts +92 -18
  25. package/dist/components/ChatText/ChatText.vue.d.ts +92 -18
  26. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
  27. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +92 -18
  28. package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +1 -1
  29. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
  30. package/dist/components/DataArea/DataArea.vue.d.ts +92 -18
  31. package/dist/components/DataTable/index.vue.d.ts +1 -1
  32. package/dist/components/DataTable/index.vue.d.ts.map +1 -1
  33. package/dist/components/DateFilter/DateFilter.vue.d.ts +94 -15
  34. package/dist/components/Drawer/Drawer.vue.d.ts +37 -207
  35. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  36. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
  37. package/dist/components/FormElement/FormElement.vue.d.ts +6 -6
  38. package/dist/components/ImportCard/ImportCard.vue.d.ts +6 -6
  39. package/dist/components/Input/BaseInput.vue.d.ts +22 -0
  40. package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
  41. package/dist/components/Input/Input.vue.d.ts +93 -14
  42. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  43. package/dist/components/Input/TextInput.vue.d.ts +54 -3
  44. package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
  45. package/dist/components/InputNext/InputNext.vue.d.ts +4 -4
  46. package/dist/components/Label/Label.vue.d.ts +1 -1
  47. package/dist/components/Label/Label.vue.d.ts.map +1 -1
  48. package/dist/components/Modal/Modal.vue.d.ts +1 -1
  49. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +209 -35
  50. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  51. package/dist/components/ModalNext/ModalNext.vue.d.ts +99 -20
  52. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
  53. package/dist/components/MoodRating/MoodRating.vue.d.ts +92 -18
  54. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +18 -18
  55. package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
  56. package/dist/components/Radio/Radio.vue.d.ts +6 -6
  57. package/dist/components/Select/index.vue.d.ts +44 -0
  58. package/dist/components/Select/index.vue.d.ts.map +1 -0
  59. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +63 -12
  60. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +2 -2
  61. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +5 -5
  62. package/dist/components/SelectTime/index.vue.d.ts +55 -4
  63. package/dist/components/Slider/Slider.vue.d.ts +92 -18
  64. package/dist/components/Switch/Switch.vue.d.ts +3 -3
  65. package/dist/components/Tab/Tab.vue.d.ts +92 -18
  66. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  67. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  68. package/dist/components/Tag/DefaultTag.vue.d.ts +1 -1
  69. package/dist/components/Tag/Tag.vue.d.ts +2 -2
  70. package/dist/components/TextArea/TextArea.vue.d.ts +8 -8
  71. package/dist/components/Toast/Toast.vue.d.ts +1 -1
  72. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  73. package/dist/components/ToolTip/ToolTip.vue.d.ts +92 -18
  74. package/dist/components/ToolTip/ToolTip.vue.d.ts.map +1 -1
  75. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  76. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  77. package/dist/components/UploadArea/UploadArea.vue.d.ts +6 -6
  78. package/dist/components/ui/dialog/Dialog.vue.d.ts +23 -0
  79. package/dist/components/ui/dialog/Dialog.vue.d.ts.map +1 -0
  80. package/dist/components/ui/dialog/DialogClose.vue.d.ts +19 -0
  81. package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +1 -0
  82. package/dist/components/ui/dialog/DialogContent.vue.d.ts +43 -0
  83. package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +1 -0
  84. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +25 -0
  85. package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +1 -0
  86. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +29 -0
  87. package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +1 -0
  88. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +23 -0
  89. package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +1 -0
  90. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +19 -0
  91. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +1 -0
  92. package/dist/components/ui/dialog/index.d.ts +8 -0
  93. package/dist/components/ui/dialog/index.d.ts.map +1 -0
  94. package/dist/components/ui/drawer/Drawer.vue.d.ts +35 -0
  95. package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -0
  96. package/dist/components/ui/drawer/DrawerClose.vue.d.ts +19 -0
  97. package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -0
  98. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +43 -0
  99. package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -0
  100. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +23 -0
  101. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -0
  102. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +22 -0
  103. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -0
  104. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +25 -0
  105. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -0
  106. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +8 -0
  107. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -0
  108. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +23 -0
  109. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -0
  110. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +19 -0
  111. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -0
  112. package/dist/components/ui/drawer/index.d.ts +11 -0
  113. package/dist/components/ui/drawer/index.d.ts.map +1 -0
  114. package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
  115. package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
  116. package/dist/components/ui/popover/PopoverOption.vue.d.ts +1 -1
  117. package/dist/components/ui/popover/PopoverOption.vue.d.ts.map +1 -1
  118. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +1 -1
  119. package/dist/components/ui/tooltip/Tooltip.vue.d.ts +23 -0
  120. package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +1 -0
  121. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +31 -0
  122. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +1 -0
  123. package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +19 -0
  124. package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +1 -0
  125. package/dist/components/ui/tooltip/index.d.ts +4 -0
  126. package/dist/components/ui/tooltip/index.d.ts.map +1 -0
  127. package/dist/{es-40d7aad6.mjs → es-59933601.mjs} +1 -1
  128. package/dist/{index-56b50ff8.mjs → index-4fe9253b.mjs} +99820 -96757
  129. package/dist/lib/layer-manager.d.ts +16 -0
  130. package/dist/lib/layer-manager.d.ts.map +1 -0
  131. package/dist/locales/en.json.d.ts +2 -1
  132. package/dist/locales/es.json.d.ts +2 -1
  133. package/dist/locales/pt_br.json.d.ts +2 -1
  134. package/dist/{pt-br-e6e2313f.mjs → pt-br-10db3200.mjs} +1 -1
  135. package/dist/style.css +1 -1
  136. package/dist/unnnic.mjs +234 -204
  137. package/dist/unnnic.umd.js +48 -44
  138. package/package.json +3 -2
  139. package/src/assets/scss/scheme-colors.scss +223 -223
  140. package/src/assets/scss/tailwind.scss +8 -0
  141. package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
  142. package/src/components/Checkbox/Checkbox.vue +1 -1
  143. package/src/components/Drawer/Drawer.vue +190 -269
  144. package/src/components/Drawer/__tests__/Drawer.spec.js +37 -46
  145. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
  146. package/src/components/Input/BaseInput.vue +21 -2
  147. package/src/components/Input/Input.scss +2 -3
  148. package/src/components/Input/Input.vue +19 -1
  149. package/src/components/Input/TextInput.vue +58 -22
  150. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +5 -1
  151. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +7 -1
  152. package/src/components/ModalDialog/ModalDialog.vue +64 -148
  153. package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
  154. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
  155. package/src/components/MultiSelectV2/MultSelectOption.vue +67 -0
  156. package/src/components/MultiSelectV2/__tests__/MultiSelect.spec.js +556 -0
  157. package/src/components/MultiSelectV2/__tests__/MultiSelectOption.spec.js +229 -0
  158. package/src/components/MultiSelectV2/__tests__/__snapshots__/MultiSelect.spec.js.snap +121 -0
  159. package/src/components/MultiSelectV2/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +51 -0
  160. package/src/components/MultiSelectV2/index.vue +224 -0
  161. package/src/components/Select/__tests__/Select.spec.js +422 -0
  162. package/src/components/Select/__tests__/SelectItem.spec.js +330 -0
  163. package/src/components/Select/__tests__/__snapshots__/Popover.spec.js.snap +8 -0
  164. package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +65 -0
  165. package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +15 -0
  166. package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +25 -0
  167. package/src/components/Select/__tests__/__snapshots__/SelectPopover.spec.js.snap +8 -0
  168. package/src/components/Select/index.vue +261 -0
  169. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
  170. package/src/components/Toast/Toast.vue +16 -9
  171. package/src/components/ToolTip/ToolTip.vue +25 -177
  172. package/src/components/ToolTip/__tests__/ToolTip.spec.js +339 -61
  173. package/src/components/index.ts +60 -4
  174. package/src/components/ui/dialog/Dialog.vue +19 -0
  175. package/src/components/ui/dialog/DialogClose.vue +29 -0
  176. package/src/components/ui/dialog/DialogContent.vue +140 -0
  177. package/src/components/ui/dialog/DialogFooter.vue +50 -0
  178. package/src/components/ui/dialog/DialogHeader.vue +83 -0
  179. package/src/components/ui/dialog/DialogTitle.vue +38 -0
  180. package/src/components/ui/dialog/DialogTrigger.vue +16 -0
  181. package/src/components/ui/dialog/index.ts +7 -0
  182. package/src/components/ui/drawer/Drawer.vue +27 -0
  183. package/src/components/ui/drawer/DrawerClose.vue +37 -0
  184. package/src/components/ui/drawer/DrawerContent.vue +111 -0
  185. package/src/components/ui/drawer/DrawerDescription.vue +40 -0
  186. package/src/components/ui/drawer/DrawerFooter.vue +38 -0
  187. package/src/components/ui/drawer/DrawerHeader.vue +57 -0
  188. package/src/components/ui/drawer/DrawerOverlay.vue +33 -0
  189. package/src/components/ui/drawer/DrawerTitle.vue +37 -0
  190. package/src/components/ui/drawer/DrawerTrigger.vue +31 -0
  191. package/src/components/ui/drawer/index.ts +10 -0
  192. package/src/components/ui/popover/PopoverContent.vue +4 -2
  193. package/src/components/ui/popover/PopoverOption.vue +4 -0
  194. package/src/components/ui/popover/PopoverTrigger.vue +5 -1
  195. package/src/components/ui/tooltip/Tooltip.vue +21 -0
  196. package/src/components/ui/tooltip/TooltipContent.vue +74 -0
  197. package/src/components/ui/tooltip/TooltipTrigger.vue +26 -0
  198. package/src/components/ui/tooltip/index.ts +3 -0
  199. package/src/lib/layer-manager.ts +84 -0
  200. package/src/locales/en.json +2 -1
  201. package/src/locales/es.json +2 -1
  202. package/src/locales/pt_br.json +2 -1
  203. package/src/stories/Dialog.stories.js +832 -0
  204. package/src/stories/Drawer.stories.js +1 -1
  205. package/src/stories/DrawerNext.stories.js +611 -0
  206. package/src/stories/LayerManager.docs.mdx +40 -0
  207. package/src/stories/LayerManager.stories.js +364 -0
  208. package/src/stories/ModalDialog.mdx +3 -0
  209. package/src/stories/ModalDialog.stories.js +1 -1
  210. package/src/stories/MultiSelectV2.stories.js +158 -0
  211. package/src/stories/Select.stories.js +158 -0
@@ -0,0 +1,832 @@
1
+ import {
2
+ Dialog,
3
+ DialogContent,
4
+ DialogFooter,
5
+ DialogHeader,
6
+ DialogTitle,
7
+ DialogTrigger,
8
+ DialogClose,
9
+ } from '../components/ui/dialog';
10
+ import UnnnicButton from '../components/Button/Button.vue';
11
+
12
+ export default {
13
+ title: 'Feedback/Dialog',
14
+ component: Dialog,
15
+ tags: ['autodocs'],
16
+ parameters: {
17
+ docs: {
18
+ description: {
19
+ component: `A dialog component that displays content in a modal overlay.
20
+ <br/>
21
+ Built on top of Reka UI, it provides a modern and accessible way to display modal dialogs.
22
+ <br/>
23
+ Supports three sizes (small, medium, large) and four types (default, success, warning, attention).
24
+ <br/>
25
+ Can be controlled via the "open" prop for programmatic control.
26
+ <br/>
27
+ API reference: https://www.reka-ui.com/docs/components/dialog
28
+ `,
29
+ },
30
+ },
31
+ },
32
+ argTypes: {
33
+ size: {
34
+ control: { type: 'select' },
35
+ options: ['small', 'medium', 'large'],
36
+ defaultValue: {
37
+ summary: 'medium',
38
+ },
39
+ description: 'The size of the dialog',
40
+ },
41
+ type: {
42
+ control: { type: 'select' },
43
+ options: ['default', 'success', 'warning', 'attention'],
44
+ defaultValue: {
45
+ summary: 'default',
46
+ },
47
+ description: 'The type of the dialog (affects header icon)',
48
+ },
49
+ },
50
+ args: {
51
+ size: 'medium',
52
+ type: 'default',
53
+ },
54
+ };
55
+
56
+ export const Default = {
57
+ parameters: {
58
+ docs: {
59
+ description: {
60
+ story:
61
+ 'Default dialog with header, body content, and footer with action buttons.',
62
+ },
63
+ source: {
64
+ code: `<UnnnicDialog>
65
+ <UnnnicDialogTrigger>
66
+ <UnnnicButton text="Open Dialog" />
67
+ </UnnnicDialogTrigger>
68
+ <UnnnicDialogContent>
69
+ <UnnnicDialogHeader>
70
+ <UnnnicDialogTitle>Dialog Title</UnnnicDialogTitle>
71
+ </UnnnicDialogHeader>
72
+ <div style="padding: 24px;">
73
+ <p>This is the content of the dialog.</p>
74
+ </div>
75
+ <UnnnicDialogFooter>
76
+ <UnnnicDialogClose>
77
+ <UnnnicButton text="Cancel" type="tertiary" />
78
+ </UnnnicDialogClose>
79
+ <UnnnicButton text="Confirm" type="primary" />
80
+ </UnnnicDialogFooter>
81
+ </UnnnicDialogContent>
82
+ </UnnnicDialog>`,
83
+ },
84
+ },
85
+ },
86
+ render: (args) => ({
87
+ components: {
88
+ Dialog,
89
+ DialogContent,
90
+ DialogFooter,
91
+ DialogHeader,
92
+ DialogTitle,
93
+ DialogTrigger,
94
+ DialogClose,
95
+ UnnnicButton,
96
+ },
97
+ setup() {
98
+ return { args };
99
+ },
100
+ template: `
101
+
102
+ <div style="display: flex; justify-content: center; align-items: center;">
103
+ <Dialog>
104
+ <DialogTrigger>
105
+ <UnnnicButton text="Open Dialog" />
106
+ </DialogTrigger>
107
+ <DialogContent v-bind="args">
108
+ <DialogHeader :type="args.type">
109
+ <DialogTitle>Dialog Title</DialogTitle>
110
+ </DialogHeader>
111
+ <div style="padding: 24px;">
112
+ <p style="margin: 0; color: #67738B;">
113
+ This is the content of the dialog. You can add any content here, including forms,
114
+ text, images, or other components.
115
+ </p>
116
+ </div>
117
+ <DialogFooter>
118
+ <DialogClose>
119
+ <UnnnicButton text="Cancel" type="tertiary" />
120
+ </DialogClose>
121
+ <UnnnicButton text="Confirm" type="primary" />
122
+ </DialogFooter>
123
+ </DialogContent>
124
+ </Dialog>
125
+ </div>
126
+ `,
127
+ }),
128
+ };
129
+
130
+ export const Success = {
131
+ args: {
132
+ type: 'success',
133
+ },
134
+ parameters: {
135
+ docs: {
136
+ description: {
137
+ story:
138
+ 'Dialog with success type, displaying a success icon in the header.',
139
+ },
140
+ source: {
141
+ code: `<UnnnicDialog>
142
+ <UnnnicDialogTrigger>
143
+ <UnnnicButton text="Success Dialog" />
144
+ </UnnnicDialogTrigger>
145
+ <UnnnicDialogContent size="medium">
146
+ <UnnnicDialogHeader type="success">
147
+ <UnnnicDialogTitle>Operation Successful</UnnnicDialogTitle>
148
+ </UnnnicDialogHeader>
149
+ <div style="padding: 24px;">
150
+ <p>Your changes have been saved successfully.</p>
151
+ </div>
152
+ <UnnnicDialogFooter>
153
+ <UnnnicDialogClose>
154
+ <UnnnicButton text="Close" type="primary" />
155
+ </UnnnicDialogClose>
156
+ </UnnnicDialogFooter>
157
+ </UnnnicDialogContent>
158
+ </UnnnicDialog>`,
159
+ },
160
+ },
161
+ },
162
+ render: (args) => ({
163
+ components: {
164
+ Dialog,
165
+ DialogContent,
166
+ DialogFooter,
167
+ DialogHeader,
168
+ DialogTitle,
169
+ DialogTrigger,
170
+ DialogClose,
171
+ UnnnicButton,
172
+ },
173
+ setup() {
174
+ return { args };
175
+ },
176
+ template: `
177
+
178
+ <div style="display: flex; justify-content: center; align-items: center;">
179
+ <Dialog>
180
+ <DialogTrigger>
181
+ <UnnnicButton text="Success Dialog" />
182
+ </DialogTrigger>
183
+ <DialogContent v-bind="args">
184
+ <DialogHeader :type="args.type">
185
+ <DialogTitle>Operation Successful</DialogTitle>
186
+ </DialogHeader>
187
+ <div style="padding: 24px;">
188
+ <p style="margin: 0; color: #67738B;">
189
+ Your changes have been saved successfully. The system has been updated with your new settings.
190
+ </p>
191
+ </div>
192
+ <DialogFooter>
193
+ <DialogClose>
194
+ <UnnnicButton text="Close" type="primary" />
195
+ </DialogClose>
196
+ </DialogFooter>
197
+ </DialogContent>
198
+ </Dialog>
199
+ </div>
200
+ `,
201
+ }),
202
+ };
203
+
204
+ export const Warning = {
205
+ args: {
206
+ type: 'warning',
207
+ },
208
+ parameters: {
209
+ docs: {
210
+ description: {
211
+ story:
212
+ 'Dialog with warning type, useful for destructive actions or critical warnings.',
213
+ },
214
+ source: {
215
+ code: `<UnnnicDialog>
216
+ <UnnnicDialogTrigger>
217
+ <UnnnicButton text="Warning Dialog" type="warning" />
218
+ </UnnnicDialogTrigger>
219
+ <UnnnicDialogContent size="medium">
220
+ <UnnnicDialogHeader type="warning">
221
+ <UnnnicDialogTitle>Delete Item</UnnnicDialogTitle>
222
+ </UnnnicDialogHeader>
223
+ <div style="padding: 24px;">
224
+ <p>Are you sure you want to delete this item? This action cannot be undone.</p>
225
+ </div>
226
+ <UnnnicDialogFooter>
227
+ <UnnnicDialogClose>
228
+ <UnnnicButton text="Cancel" type="tertiary" />
229
+ </UnnnicDialogClose>
230
+ <UnnnicButton text="Delete" type="warning" />
231
+ </UnnnicDialogFooter>
232
+ </UnnnicDialogContent>
233
+ </UnnnicDialog>`,
234
+ },
235
+ },
236
+ },
237
+ render: (args) => ({
238
+ components: {
239
+ Dialog,
240
+ DialogContent,
241
+ DialogFooter,
242
+ DialogHeader,
243
+ DialogTitle,
244
+ DialogTrigger,
245
+ DialogClose,
246
+ UnnnicButton,
247
+ },
248
+ setup() {
249
+ return { args };
250
+ },
251
+ template: `
252
+
253
+ <div style="display: flex; justify-content: center; align-items: center;">
254
+ <Dialog>
255
+ <DialogTrigger>
256
+ <UnnnicButton text="Warning Dialog" type="warning" />
257
+ </DialogTrigger>
258
+ <DialogContent v-bind="args">
259
+ <DialogHeader :type="args.type">
260
+ <DialogTitle>Delete Item</DialogTitle>
261
+ </DialogHeader>
262
+ <div style="padding: 24px;">
263
+ <p style="margin: 0; color: #67738B;">
264
+ Are you sure you want to delete this item? This action cannot be undone and all associated data will be permanently removed.
265
+ </p>
266
+ </div>
267
+ <DialogFooter>
268
+ <DialogClose>
269
+ <UnnnicButton text="Cancel" type="tertiary" />
270
+ </DialogClose>
271
+ <UnnnicButton text="Delete" type="warning" />
272
+ </DialogFooter>
273
+ </DialogContent>
274
+ </Dialog>
275
+ </div>
276
+ `,
277
+ }),
278
+ };
279
+
280
+ export const Attention = {
281
+ args: {
282
+ type: 'attention',
283
+ },
284
+ parameters: {
285
+ docs: {
286
+ description: {
287
+ story:
288
+ 'Dialog with attention type, useful for important notices or alerts that require user attention.',
289
+ },
290
+ source: {
291
+ code: `<UnnnicDialog>
292
+ <UnnnicDialogTrigger>
293
+ <UnnnicButton text="Attention Dialog" type="attention" />
294
+ </UnnnicDialogTrigger>
295
+ <UnnnicDialogContent size="medium">
296
+ <UnnnicDialogHeader type="attention">
297
+ <UnnnicDialogTitle>Important Notice</UnnnicDialogTitle>
298
+ </UnnnicDialogHeader>
299
+ <div style="padding: 24px;">
300
+ <p>Please review the following information carefully before proceeding.</p>
301
+ </div>
302
+ <UnnnicDialogFooter>
303
+ <UnnnicDialogClose>
304
+ <UnnnicButton text="Cancel" type="tertiary" />
305
+ </UnnnicDialogClose>
306
+ <UnnnicButton text="Continue" type="attention" />
307
+ </UnnnicDialogFooter>
308
+ </UnnnicDialogContent>
309
+ </UnnnicDialog>`,
310
+ },
311
+ },
312
+ },
313
+ render: (args) => ({
314
+ components: {
315
+ Dialog,
316
+ DialogContent,
317
+ DialogFooter,
318
+ DialogHeader,
319
+ DialogTitle,
320
+ DialogTrigger,
321
+ DialogClose,
322
+ UnnnicButton,
323
+ },
324
+ setup() {
325
+ return { args };
326
+ },
327
+ template: `
328
+
329
+ <div style="display: flex; justify-content: center; align-items: center;">
330
+ <Dialog>
331
+ <DialogTrigger>
332
+ <UnnnicButton text="Attention Dialog" type="attention" />
333
+ </DialogTrigger>
334
+ <DialogContent v-bind="args">
335
+ <DialogHeader :type="args.type">
336
+ <DialogTitle>Important Notice</DialogTitle>
337
+ </DialogHeader>
338
+ <div style="padding: 24px;">
339
+ <p style="margin: 0; color: #67738B;">
340
+ Please review the following information carefully before proceeding. Your account settings will be affected by this change.
341
+ </p>
342
+ </div>
343
+ <DialogFooter>
344
+ <DialogClose>
345
+ <UnnnicButton text="Cancel" type="tertiary" />
346
+ </DialogClose>
347
+ <UnnnicButton text="Continue" type="attention" />
348
+ </DialogFooter>
349
+ </DialogContent>
350
+ </Dialog>
351
+ </div>
352
+ `,
353
+ }),
354
+ };
355
+
356
+ export const Sizes = {
357
+ parameters: {
358
+ docs: {
359
+ description: {
360
+ story:
361
+ 'Dialogs come in three sizes: small (360px), medium (560px), and large (800px).',
362
+ },
363
+ source: {
364
+ code: `<!-- Small Dialog -->
365
+ <UnnnicDialog>
366
+ ...
367
+ <UnnnicDialogContent size="small">
368
+ ...
369
+ </UnnnicDialog>
370
+
371
+ <!-- Medium Dialog -->
372
+ <UnnnicDialog>
373
+ ...
374
+ <UnnnicDialogContent size="medium">
375
+ ...
376
+ </UnnnicDialog>
377
+
378
+ <!-- Large Dialog -->
379
+ <UnnnicDialog>
380
+ ...
381
+ <UnnnicDialogContent size="large">
382
+ ...
383
+ </UnnnicDialog>`,
384
+ },
385
+ },
386
+ },
387
+ render: (args) => ({
388
+ components: {
389
+ Dialog,
390
+ DialogContent,
391
+ DialogFooter,
392
+ DialogHeader,
393
+ DialogTitle,
394
+ DialogTrigger,
395
+ UnnnicButton,
396
+ },
397
+ setup() {
398
+ return { args };
399
+ },
400
+ template: `
401
+
402
+ <div style="display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap;">
403
+ <Dialog>
404
+ <DialogTrigger>
405
+ <UnnnicButton text="Small Dialog" />
406
+ </DialogTrigger>
407
+ <DialogContent size="small">
408
+ <DialogHeader>
409
+ <DialogTitle>Small Dialog</DialogTitle>
410
+ </DialogHeader>
411
+ <div style="padding: 24px;">
412
+ <p style="margin: 0; color: #67738B;">
413
+ This is a small dialog (360px max width).
414
+ </p>
415
+ </div>
416
+ <DialogFooter>
417
+ <UnnnicButton text="Close" type="primary" />
418
+ </DialogFooter>
419
+ </DialogContent>
420
+ </Dialog>
421
+
422
+ <Dialog>
423
+ <DialogTrigger>
424
+ <UnnnicButton text="Medium Dialog" />
425
+ </DialogTrigger>
426
+ <DialogContent size="medium">
427
+ <DialogHeader>
428
+ <DialogTitle>Medium Dialog</DialogTitle>
429
+ </DialogHeader>
430
+ <div style="padding: 24px;">
431
+ <p style="margin: 0; color: #67738B;">
432
+ This is a medium dialog (560px max width). This is the default size for dialogs.
433
+ </p>
434
+ </div>
435
+ <DialogFooter>
436
+ <UnnnicButton text="Close" type="primary" />
437
+ </DialogFooter>
438
+ </DialogContent>
439
+ </Dialog>
440
+
441
+ <Dialog>
442
+ <DialogTrigger>
443
+ <UnnnicButton text="Large Dialog" />
444
+ </DialogTrigger>
445
+ <DialogContent size="large">
446
+ <DialogHeader>
447
+ <DialogTitle>Large Dialog</DialogTitle>
448
+ </DialogHeader>
449
+ <div style="padding: 24px;">
450
+ <p style="margin: 0; color: #67738B;">
451
+ This is a large dialog (800px max width). Use this size when you need more space for complex content or forms.
452
+ </p>
453
+ </div>
454
+ <DialogFooter>
455
+ <UnnnicButton text="Close" type="primary" />
456
+ </DialogFooter>
457
+ </DialogContent>
458
+ </Dialog>
459
+ </div>
460
+ `,
461
+ }),
462
+ };
463
+
464
+ export const WithoutHeader = {
465
+ parameters: {
466
+ docs: {
467
+ description: {
468
+ story:
469
+ 'Dialog without a header. Useful when you need full control over the content layout.',
470
+ },
471
+ source: {
472
+ code: `<UnnnicDialog>
473
+ <UnnnicDialogTrigger>
474
+ <UnnnicButton text="Dialog Without Header" />
475
+ </UnnnicDialogTrigger>
476
+ <UnnnicDialogContent>
477
+ <div style="padding: 24px;">
478
+ <h2>Custom Header Content</h2>
479
+ <p>This dialog doesn't use the DialogHeader component.</p>
480
+ </div>
481
+ <UnnnicDialogFooter>
482
+ <UnnnicButton text="Cancel" type="tertiary" />
483
+ <UnnnicButton text="Confirm" type="primary" />
484
+ </UnnnicDialogFooter>
485
+ </UnnnicDialogContent>
486
+ </UnnnicDialog>`,
487
+ },
488
+ },
489
+ },
490
+ render: (args) => ({
491
+ components: {
492
+ Dialog,
493
+ DialogContent,
494
+ DialogFooter,
495
+ DialogTrigger,
496
+ UnnnicButton,
497
+ },
498
+ setup() {
499
+ return { args };
500
+ },
501
+ template: `
502
+
503
+ <div style="display: flex; justify-content: center; align-items: center;">
504
+ <Dialog>
505
+ <DialogTrigger>
506
+ <UnnnicButton text="Dialog Without Header" />
507
+ </DialogTrigger>
508
+ <DialogContent v-bind="args">
509
+ <div style="padding: 24px;">
510
+ <h2 style="margin: 0 0 16px 0; font-size: 20px; font-weight: 700; color: #272B33;">
511
+ Custom Header Content
512
+ </h2>
513
+ <p style="margin: 0; color: #67738B;">
514
+ This dialog doesn't use the DialogHeader component, giving you full control over the content structure.
515
+ You can add any custom layout here.
516
+ </p>
517
+ </div>
518
+ <DialogFooter>
519
+ <UnnnicButton text="Cancel" type="tertiary" />
520
+ <UnnnicButton text="Confirm" type="primary" />
521
+ </DialogFooter>
522
+ </DialogContent>
523
+ </Dialog>
524
+ </div>
525
+ `,
526
+ }),
527
+ };
528
+
529
+ export const WithoutFooter = {
530
+ parameters: {
531
+ docs: {
532
+ description: {
533
+ story:
534
+ 'Dialog without a footer. Useful for informational dialogs or when actions are inline with content.',
535
+ },
536
+ source: {
537
+ code: `<UnnnicDialog>
538
+ <UnnnicDialogTrigger>
539
+ <UnnnicButton text="Dialog Without Footer" />
540
+ </UnnnicDialogTrigger>
541
+ <UnnnicDialogContent>
542
+ <UnnnicDialogHeader>
543
+ <UnnnicDialogTitle>Information</UnnnicDialogTitle>
544
+ </UnnnicDialogHeader>
545
+ <div style="padding: 24px;">
546
+ <p>This is an informational dialog without a footer.</p>
547
+ <p>The user can close it by clicking outside or pressing ESC.</p>
548
+ </div>
549
+ </UnnnicDialogContent>
550
+ </UnnnicDialog>`,
551
+ },
552
+ },
553
+ },
554
+ render: (args) => ({
555
+ components: {
556
+ Dialog,
557
+ DialogContent,
558
+ DialogHeader,
559
+ DialogTitle,
560
+ DialogTrigger,
561
+ UnnnicButton,
562
+ },
563
+ setup() {
564
+ return { args };
565
+ },
566
+ template: `
567
+
568
+ <div style="display: flex; justify-content: center; align-items: center;">
569
+ <Dialog>
570
+ <DialogTrigger>
571
+ <UnnnicButton text="Dialog Without Footer" />
572
+ </DialogTrigger>
573
+ <DialogContent v-bind="args">
574
+ <DialogHeader>
575
+ <DialogTitle>Information</DialogTitle>
576
+ </DialogHeader>
577
+ <div style="padding: 24px;">
578
+ <p style="margin: 0 0 16px 0; color: #67738B;">
579
+ This is an informational dialog without a footer. The user can close it by clicking outside or pressing ESC.
580
+ </p>
581
+ <p style="margin: 0; color: #67738B;">
582
+ This pattern is useful for simple notifications or information displays that don't require explicit actions.
583
+ </p>
584
+ </div>
585
+ </DialogContent>
586
+ </Dialog>
587
+ </div>
588
+ `,
589
+ }),
590
+ };
591
+
592
+ export const WithoutHeaderCloseButton = {
593
+ parameters: {
594
+ docs: {
595
+ description: {
596
+ story:
597
+ 'Dialog without a close button. Useful when you need to prevent the user from closing the dialog.',
598
+ },
599
+ source: {
600
+ code: `<UnnnicDialog>
601
+ <UnnnicDialogTrigger>
602
+ <UnnnicButton text="Dialog Without Header Close Button" />
603
+ </UnnnicDialogTrigger>
604
+ <UnnnicDialogContent>
605
+ <UnnnicDialogHeader :closeButton="false">
606
+ <UnnnicDialogTitle>Dialog Without Header Close Button</UnnnicDialogTitle>
607
+ </UnnnicDialogHeader>
608
+ <div style="padding: 24px;">
609
+ <p>This dialog doesn't have a header close button.</p>
610
+ </div>
611
+ <UnnnicDialogFooter>
612
+ <UnnnicButton text="Confirm" type="primary" />
613
+ </UnnnicDialogFooter>
614
+ </UnnnicDialogContent>
615
+ </UnnnicDialog>`,
616
+ },
617
+ },
618
+ },
619
+ args: {
620
+ closeButton: false,
621
+ },
622
+ render: (args) => ({
623
+ components: {
624
+ Dialog,
625
+ DialogContent,
626
+ DialogHeader,
627
+ DialogTitle,
628
+ DialogTrigger,
629
+ DialogFooter,
630
+ UnnnicButton,
631
+ },
632
+ setup() {
633
+ return { args };
634
+ },
635
+ template: `
636
+ <div style="display: flex; justify-content: center; align-items: center;">
637
+ <Dialog>
638
+ <DialogTrigger>
639
+ <UnnnicButton text="Dialog Without Header Close Button" />
640
+ </DialogTrigger>
641
+ <DialogContent v-bind="args">
642
+ <DialogHeader :closeButton="false">
643
+ <DialogTitle>Dialog Without Header Close Button</DialogTitle>
644
+ </DialogHeader>
645
+ <div style="padding: 24px;">
646
+ <p style="margin: 0; color: #67738B;">This dialog doesn't have a header close button.</p>
647
+ </div>
648
+ <DialogFooter>
649
+ <UnnnicButton text="Confirm" type="primary" />
650
+ </DialogFooter>
651
+ </DialogContent>
652
+ </Dialog>
653
+ </div>
654
+ `,
655
+ }),
656
+ };
657
+
658
+ export const ControlledOpen = {
659
+ parameters: {
660
+ docs: {
661
+ description: {
662
+ story: `Dialog controlled by the "open" prop. This allows you to programmatically open and close the dialog.
663
+ <br/>
664
+ Use v-model:open to bind the open state to a reactive variable in your component.`,
665
+ },
666
+ source: {
667
+ code: `<script setup>
668
+ import { ref } from 'vue';
669
+
670
+ const isOpen = ref(false);
671
+
672
+ const openDialog = () => {
673
+ isOpen.value = true;
674
+ };
675
+
676
+ const closeDialog = () => {
677
+ isOpen.value = false;
678
+ };
679
+ </script>
680
+
681
+ <template>
682
+ <div>
683
+ <UnnnicButton text="Open Dialog" @click="openDialog" />
684
+
685
+ <UnnnicDialog v-model:open="isOpen">
686
+ <UnnnicDialogContent>
687
+ <UnnnicDialogHeader>
688
+ <UnnnicDialogTitle>Controlled Dialog</UnnnicDialogTitle>
689
+ </UnnnicDialogHeader>
690
+ <div style="padding: 24px;">
691
+ <p>This dialog is controlled by the "open" prop.</p>
692
+ </div>
693
+ <UnnnicDialogFooter>
694
+ <UnnnicButton text="Close" type="tertiary" @click="closeDialog" />
695
+ <UnnnicButton text="Confirm" type="primary" @click="closeDialog" />
696
+ </UnnnicDialogFooter>
697
+ </UnnnicDialogContent>
698
+ </UnnnicDialog>
699
+ </div>
700
+ </template>`,
701
+ },
702
+ },
703
+ },
704
+ render: (args) => ({
705
+ components: {
706
+ Dialog,
707
+ DialogContent,
708
+ DialogFooter,
709
+ DialogHeader,
710
+ DialogTitle,
711
+ UnnnicButton,
712
+ },
713
+ setup() {
714
+ return { args };
715
+ },
716
+ data() {
717
+ return {
718
+ isOpen: false,
719
+ };
720
+ },
721
+ methods: {
722
+ openDialog() {
723
+ this.isOpen = true;
724
+ },
725
+ closeDialog() {
726
+ this.isOpen = false;
727
+ },
728
+ },
729
+ template: `
730
+ <div style="display: flex; justify-content: center; align-items: center; gap: 16px; flex-direction: column;">
731
+ <div style="display: flex; gap: 16px;">
732
+ <UnnnicButton text="Open Dialog" @click="openDialog" />
733
+ </div>
734
+
735
+ <p style="margin: 0; color: #67738B;">Dialog is currently: <strong>{{ isOpen ? 'OPEN' : 'CLOSED' }}</strong></p>
736
+
737
+ <Dialog v-model:open="isOpen">
738
+ <DialogContent v-bind="args">
739
+ <DialogHeader>
740
+ <DialogTitle>Controlled Dialog</DialogTitle>
741
+ </DialogHeader>
742
+ <div style="padding: 24px;">
743
+ <p style="margin: 0; color: #67738B;">
744
+ This dialog is controlled by the "open" prop. You can open and close it programmatically using the buttons above.
745
+ </p>
746
+ </div>
747
+ <DialogFooter>
748
+ <UnnnicButton text="Close" type="tertiary" @click="closeDialog" />
749
+ <UnnnicButton text="Confirm" type="primary" @click="closeDialog" />
750
+ </DialogFooter>
751
+ </DialogContent>
752
+ </Dialog>
753
+ </div>
754
+ `,
755
+ }),
756
+ };
757
+
758
+ export const LongContent = {
759
+ parameters: {
760
+ docs: {
761
+ description: {
762
+ story:
763
+ 'Dialog with scrollable content. The dialog body will scroll when content exceeds the viewport height.',
764
+ },
765
+ source: {
766
+ code: `<UnnnicDialog>
767
+ <UnnnicDialogTrigger>
768
+ <UnnnicButton text="Long Content Dialog" />
769
+ </UnnnicDialogTrigger>
770
+ <UnnnicDialogContent>
771
+ <UnnnicDialogHeader>
772
+ <UnnnicDialogTitle>Terms and Conditions</UnnnicDialogTitle>
773
+ </UnnnicDialogHeader>
774
+ <div style="padding: 24px; max-height: 400px; overflow-y: auto;">
775
+ <!-- Your long content here -->
776
+ <div v-for="i in 10" :key="i">
777
+ <h4>Section {{ i }}</h4>
778
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit...</p>
779
+ </div>
780
+ </div>
781
+ <UnnnicDialogFooter>
782
+ <UnnnicButton text="Decline" type="tertiary" />
783
+ <UnnnicButton text="Accept" type="primary" />
784
+ </UnnnicDialogFooter>
785
+ </UnnnicDialogContent>
786
+ </UnnnicDialog>`,
787
+ },
788
+ },
789
+ },
790
+ render: (args) => ({
791
+ components: {
792
+ Dialog,
793
+ DialogContent,
794
+ DialogFooter,
795
+ DialogHeader,
796
+ DialogTitle,
797
+ DialogTrigger,
798
+ UnnnicButton,
799
+ },
800
+ setup() {
801
+ return { args };
802
+ },
803
+ template: `
804
+
805
+ <div style="display: flex; justify-content: center; align-items: center;">
806
+ <Dialog>
807
+ <DialogTrigger>
808
+ <UnnnicButton text="Long Content Dialog" />
809
+ </DialogTrigger>
810
+ <DialogContent v-bind="args">
811
+ <DialogHeader>
812
+ <DialogTitle>Terms and Conditions</DialogTitle>
813
+ </DialogHeader>
814
+ <div style="padding: 24px; max-height: 400px; overflow-y: auto;">
815
+ <div v-for="i in 10" :key="i" style="margin-bottom: 16px;">
816
+ <h4 style="margin: 0 0 8px 0; color: #272B33;">Section {{ i }}</h4>
817
+ <p style="margin: 0; color: #67738B; line-height: 1.6;">
818
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
819
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
820
+ </p>
821
+ </div>
822
+ </div>
823
+ <DialogFooter>
824
+ <UnnnicButton text="Decline" type="tertiary" />
825
+ <UnnnicButton text="Accept" type="primary" />
826
+ </DialogFooter>
827
+ </DialogContent>
828
+ </Dialog>
829
+ </div>
830
+ `,
831
+ }),
832
+ };