@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,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
@@ -7,7 +7,7 @@ import iconsList from '../utils/iconList';
7
7
  import colorsList from '../utils/colorsList';
8
8
 
9
9
  export default {
10
- title: 'Example/ModalDialog',
10
+ title: 'Feedback/ModalDialog',
11
11
  component: UnnnicModalDialog,
12
12
  argTypes: {
13
13
  type: {
@@ -0,0 +1,158 @@
1
+ import UnnnicMultiSelect from '../components/MultiSelectV2/index.vue';
2
+
3
+ const options = [
4
+ { label: 'Option 1', value: 'option1', altValue: 'alt_value_option1' },
5
+ { label: 'Option 2', value: 'option2', altValue: 'alt_value_option2' },
6
+ { label: 'Option 3', value: 'option3', altValue: 'alt_value_option3' },
7
+ { label: 'Option 4', value: 'option4', altValue: 'alt_value_option4' },
8
+ { label: 'Option 5', value: 'option5', altValue: 'alt_value_option5' },
9
+ { label: 'Option 6', value: 'option6', altValue: 'alt_value_option6' },
10
+ { label: 'Option 7', value: 'option7', altValue: 'alt_value_option7' },
11
+ { label: 'Option 8', value: 'option8', altValue: 'alt_value_option8' },
12
+ { label: 'Option 9', value: 'option9', altValue: 'alt_value_option9' },
13
+ { label: 'Option 10', value: 'option10', disabled: true },
14
+ ];
15
+
16
+ export default {
17
+ title: 'Form/MultiSelectV2',
18
+ component: UnnnicMultiSelect,
19
+ tags: ['autodocs'],
20
+ parameters: {
21
+ docs: {
22
+ description: {
23
+ component:
24
+ 'MultiSelect is designed to solve common problems related to multiple option selection.',
25
+ },
26
+ },
27
+ },
28
+ argTypes: {
29
+ options: {
30
+ description:
31
+ 'List of items to be displayed in the options. If an item has a `disabled` key set to `true`, that item will be disabled. By default, the component looks for the `label` and `value` keys to display and update the model, but these are not required if you wish to customize them using the `itemLabel` and `itemValue` props, respectively.',
32
+ },
33
+ placeholder: {
34
+ description: 'Text to be displayed in the placeholder.',
35
+ },
36
+ label: {
37
+ description: 'Text to be displayed in the label.',
38
+ },
39
+ modelValue: {
40
+ description:
41
+ 'Model variable. Its type will always match a list of the return type of the key specified by `itemValue`, or the entire options object when the `returnObject` property is set to `true`.',
42
+ },
43
+ returnObject: {
44
+ description:
45
+ 'Prop to indicate that the full option object should be returned in the v-model.',
46
+ },
47
+ itemLabel: {
48
+ description:
49
+ 'Field of the option item that should be used to render the option label.',
50
+ },
51
+ itemValue: {
52
+ description:
53
+ 'Field of the option item that should be used to return value to v-model.',
54
+ },
55
+ type: {
56
+ description: 'Select state type',
57
+ },
58
+ errors: {
59
+ description:
60
+ "Error message or messages. When it's an array, the messages will be separated by commas.",
61
+ },
62
+ message: {
63
+ description: 'Help or hint message.',
64
+ },
65
+ size: {
66
+ description: 'Select size',
67
+ },
68
+ optionsLines: {
69
+ description:
70
+ 'Number of options to display at most; if exceeded, scrolling will be enabled.',
71
+ },
72
+ enableSearch: {
73
+ description:
74
+ 'If true, enables a search field displayed inside the options popover. The `update:search` event is emitted on each input.',
75
+ },
76
+ search: {
77
+ description: 'Search value.',
78
+ },
79
+ locale: {
80
+ description: 'Locale for i18n translations.',
81
+ },
82
+ disabled: {
83
+ description: 'Disable the select.',
84
+ },
85
+ },
86
+ render: (args) => ({
87
+ components: { UnnnicMultiSelect },
88
+ setup() {
89
+ const handleSearch = (value) => {
90
+ args.search = value;
91
+ };
92
+ return { args, handleSearch };
93
+ },
94
+ data() {
95
+ return {
96
+ exampleValue: [],
97
+ };
98
+ },
99
+ template: `
100
+ <p>modelValue: {{ exampleValue }}</p>
101
+ <unnnic-multi-select v-model="exampleValue" v-bind="args" @update:search="handleSearch" />
102
+ `,
103
+ }),
104
+ };
105
+
106
+ export const Default = {
107
+ args: {
108
+ placeholder: 'Placeholder',
109
+ label: 'Label',
110
+ options,
111
+ },
112
+ };
113
+
114
+ export const ReturnObject = {
115
+ args: {
116
+ returnObject: true,
117
+ placeholder: 'Placeholder',
118
+ label: 'Label',
119
+ options,
120
+ },
121
+ };
122
+
123
+ export const AlternativeValueKey = {
124
+ args: {
125
+ itemValue: 'altValue',
126
+ placeholder: 'Placeholder',
127
+ label: 'Label',
128
+ options,
129
+ },
130
+ };
131
+
132
+ export const AlternativeValueLabel = {
133
+ args: {
134
+ itemLabel: 'altValue',
135
+ placeholder: 'Placeholder',
136
+ label: 'Label',
137
+ options,
138
+ },
139
+ };
140
+
141
+ export const Disabled = {
142
+ args: {
143
+ placeholder: 'Placeholder',
144
+ label: 'Label',
145
+ options,
146
+ disabled: true,
147
+ },
148
+ };
149
+
150
+ export const WithSearch = {
151
+ args: {
152
+ placeholder: 'Placeholder',
153
+ label: 'Label',
154
+ options,
155
+ enableSearch: true,
156
+ search: '',
157
+ },
158
+ };
@@ -0,0 +1,158 @@
1
+ import UnnnicSelect from '../components/Select/index.vue';
2
+
3
+ const options = [
4
+ { label: 'Option 1', value: 'option1', altValue: 'alt_value_option1' },
5
+ { label: 'Option 2', value: 'option2', altValue: 'alt_value_option2' },
6
+ { label: 'Option 3', value: 'option3', altValue: 'alt_value_option3' },
7
+ { label: 'Option 4', value: 'option4', altValue: 'alt_value_option4' },
8
+ { label: 'Option 5', value: 'option5', altValue: 'alt_value_option5' },
9
+ { label: 'Option 6', value: 'option6', altValue: 'alt_value_option6' },
10
+ { label: 'Option 7', value: 'option7', altValue: 'alt_value_option7' },
11
+ { label: 'Option 8', value: 'option8', altValue: 'alt_value_option8' },
12
+ { label: 'Option 9', value: 'option9', altValue: 'alt_value_option9' },
13
+ { label: 'Option 10', value: 'option10', disabled: true },
14
+ ];
15
+
16
+ export default {
17
+ title: 'Form/Select',
18
+ component: UnnnicSelect,
19
+ tags: ['autodocs'],
20
+ parameters: {
21
+ docs: {
22
+ description: {
23
+ component:
24
+ 'Select is designed to solve common problems related to option selection.',
25
+ },
26
+ },
27
+ },
28
+ argTypes: {
29
+ options: {
30
+ description:
31
+ 'List of items to be displayed in the options. If an item has a `disabled` key set to `true`, that item will be disabled. By default, the component looks for the `label` and `value` keys to display and update the model, but these are not required if you wish to customize them using the `itemLabel` and `itemValue` props, respectively.',
32
+ },
33
+ placeholder: {
34
+ description: 'Text to be displayed in the placeholder.',
35
+ },
36
+ label: {
37
+ description: 'Text to be displayed in the label.',
38
+ },
39
+ modelValue: {
40
+ description:
41
+ 'Model variable. Its type will always match the return type of the key specified by `itemValue`, or the entire options object when `returnObject` prop is set to `true`.',
42
+ },
43
+ returnObject: {
44
+ description:
45
+ 'Prop to indicate that the full option object should be returned in the v-model.',
46
+ },
47
+ itemLabel: {
48
+ description:
49
+ 'Field of the option item that should be used to render the option label.',
50
+ },
51
+ itemValue: {
52
+ description:
53
+ 'Field of the option item that should be used to return value to v-model.',
54
+ },
55
+ type: {
56
+ description: 'Select state type',
57
+ },
58
+ errors: {
59
+ description:
60
+ "Error message or messages. When it's an array, the messages will be separated by commas.",
61
+ },
62
+ message: {
63
+ description: 'Help or hint message.',
64
+ },
65
+ size: {
66
+ description: 'Select size',
67
+ },
68
+ optionsLines: {
69
+ description:
70
+ 'Number of options to display at most; if exceeded, scrolling will be enabled.',
71
+ },
72
+ enableSearch: {
73
+ description:
74
+ 'If true, enables a search field displayed inside the options popover. The `update:search` event is emitted on each input.',
75
+ },
76
+ search: {
77
+ description: 'Search value.',
78
+ },
79
+ locale: {
80
+ description: 'Locale for i18n translations.',
81
+ },
82
+ disabled: {
83
+ description: 'Disable the select.',
84
+ },
85
+ },
86
+ render: (args) => ({
87
+ components: { UnnnicSelect },
88
+ setup() {
89
+ const handleSearch = (value) => {
90
+ args.search = value;
91
+ };
92
+ return { args, handleSearch };
93
+ },
94
+ data() {
95
+ return {
96
+ exampleValue: null,
97
+ };
98
+ },
99
+ template: `
100
+ <p>modelValue: {{ exampleValue }}</p>
101
+ <unnnic-select v-model="exampleValue" v-bind="args" @update:search="handleSearch" />
102
+ `,
103
+ }),
104
+ };
105
+
106
+ export const Default = {
107
+ args: {
108
+ placeholder: 'Placeholder',
109
+ label: 'Label',
110
+ options,
111
+ },
112
+ };
113
+
114
+ export const ReturnObject = {
115
+ args: {
116
+ returnObject: true,
117
+ placeholder: 'Placeholder',
118
+ label: 'Label',
119
+ options,
120
+ },
121
+ };
122
+
123
+ export const AlternativeValueKey = {
124
+ args: {
125
+ itemValue: 'altValue',
126
+ placeholder: 'Placeholder',
127
+ label: 'Label',
128
+ options,
129
+ },
130
+ };
131
+
132
+ export const AlternativeValueLabel = {
133
+ args: {
134
+ itemLabel: 'altValue',
135
+ placeholder: 'Placeholder',
136
+ label: 'Label',
137
+ options,
138
+ },
139
+ };
140
+
141
+ export const Disabled = {
142
+ args: {
143
+ placeholder: 'Placeholder',
144
+ label: 'Label',
145
+ options,
146
+ disabled: true,
147
+ },
148
+ };
149
+
150
+ export const WithSearch = {
151
+ args: {
152
+ placeholder: 'Placeholder',
153
+ label: 'Label',
154
+ options,
155
+ enableSearch: true,
156
+ search: '',
157
+ },
158
+ };