@weni/unnnic-system 3.12.2 → 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.
Files changed (199) 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/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue.d.ts.map +1 -1
  25. package/dist/components/ChartLine/ChartLine.vue.d.ts +92 -18
  26. package/dist/components/ChatText/ChatText.vue.d.ts +92 -18
  27. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
  28. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +92 -18
  29. package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +1 -1
  30. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
  31. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  32. package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -1
  33. package/dist/components/DataArea/DataArea.vue.d.ts +92 -18
  34. package/dist/components/DataTable/index.vue.d.ts +1 -1
  35. package/dist/components/DataTable/index.vue.d.ts.map +1 -1
  36. package/dist/components/DateFilter/DateFilter.vue.d.ts +13 -13
  37. package/dist/components/Drawer/Drawer.vue.d.ts +37 -207
  38. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  39. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
  40. package/dist/components/FormElement/FormElement.vue.d.ts +6 -6
  41. package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
  42. package/dist/components/ImportCard/ImportCard.vue.d.ts +6 -6
  43. package/dist/components/Input/Input.vue.d.ts +12 -12
  44. package/dist/components/Input/TextInput.vue.d.ts +2 -2
  45. package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
  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 +18 -18
  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/Radio/Radio.vue.d.ts.map +1 -1
  58. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +11 -11
  59. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +2 -2
  60. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +5 -5
  61. package/dist/components/SelectTime/index.vue.d.ts +3 -3
  62. package/dist/components/Slider/Slider.vue.d.ts +92 -18
  63. package/dist/components/Switch/Switch.vue.d.ts +3 -3
  64. package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
  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/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -1
  71. package/dist/components/TextArea/TextArea.vue.d.ts +8 -8
  72. package/dist/components/Toast/Toast.vue.d.ts +1 -1
  73. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  74. package/dist/components/ToolTip/ToolTip.vue.d.ts +92 -18
  75. package/dist/components/ToolTip/ToolTip.vue.d.ts.map +1 -1
  76. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  77. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  78. package/dist/components/UploadArea/UploadArea.vue.d.ts +6 -6
  79. package/dist/components/ui/dialog/Dialog.vue.d.ts +23 -0
  80. package/dist/components/ui/dialog/Dialog.vue.d.ts.map +1 -0
  81. package/dist/components/ui/dialog/DialogClose.vue.d.ts +19 -0
  82. package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +1 -0
  83. package/dist/components/ui/dialog/DialogContent.vue.d.ts +43 -0
  84. package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +1 -0
  85. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +25 -0
  86. package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +1 -0
  87. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +29 -0
  88. package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +1 -0
  89. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +23 -0
  90. package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +1 -0
  91. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +19 -0
  92. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +1 -0
  93. package/dist/components/ui/dialog/index.d.ts +8 -0
  94. package/dist/components/ui/dialog/index.d.ts.map +1 -0
  95. package/dist/components/ui/drawer/Drawer.vue.d.ts +35 -0
  96. package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -0
  97. package/dist/components/ui/drawer/DrawerClose.vue.d.ts +19 -0
  98. package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -0
  99. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +43 -0
  100. package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -0
  101. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +23 -0
  102. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -0
  103. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +22 -0
  104. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -0
  105. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +25 -0
  106. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -0
  107. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +8 -0
  108. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -0
  109. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +23 -0
  110. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -0
  111. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +19 -0
  112. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -0
  113. package/dist/components/ui/drawer/index.d.ts +11 -0
  114. package/dist/components/ui/drawer/index.d.ts.map +1 -0
  115. package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
  116. package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
  117. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts.map +1 -1
  118. package/dist/components/ui/popover/index.d.ts +0 -1
  119. package/dist/components/ui/popover/index.d.ts.map +1 -1
  120. package/dist/components/ui/tooltip/Tooltip.vue.d.ts +23 -0
  121. package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +1 -0
  122. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +31 -0
  123. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +1 -0
  124. package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +19 -0
  125. package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +1 -0
  126. package/dist/components/ui/tooltip/index.d.ts +4 -0
  127. package/dist/components/ui/tooltip/index.d.ts.map +1 -0
  128. package/dist/{es-40d7aad6.mjs → es-4aa88754.mjs} +1 -1
  129. package/dist/{index-56b50ff8.mjs → index-ec96f88a.mjs} +99538 -96746
  130. package/dist/lib/layer-manager.d.ts +16 -0
  131. package/dist/lib/layer-manager.d.ts.map +1 -0
  132. package/dist/{pt-br-e6e2313f.mjs → pt-br-ec1ec185.mjs} +1 -1
  133. package/dist/style.css +1 -1
  134. package/dist/unnnic.mjs +233 -207
  135. package/dist/unnnic.umd.js +48 -44
  136. package/package.json +3 -2
  137. package/src/assets/scss/tailwind.scss +8 -0
  138. package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +1 -1
  139. package/src/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue +2 -1
  140. package/src/components/ChartFunnel/SvgFunnel/ChartFunnelTwoRows.vue +61 -60
  141. package/src/components/Checkbox/Checkbox.vue +2 -8
  142. package/src/components/CheckboxGroup/CheckboxGroup.vue +5 -7
  143. package/src/components/Chip/Chip.vue +1 -1
  144. package/src/components/Drawer/Drawer.vue +180 -270
  145. package/src/components/Drawer/__tests__/Drawer.spec.js +32 -43
  146. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
  147. package/src/components/FormElement/FormElement.vue +87 -96
  148. package/src/components/Input/Input.vue +2 -2
  149. package/src/components/ModalDialog/ModalDialog.vue +64 -148
  150. package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
  151. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
  152. package/src/components/Radio/Radio.vue +6 -12
  153. package/src/components/Radio/__test__/Radio.spec.js +1 -3
  154. package/src/components/RadioGroup/RadioGroup.vue +10 -18
  155. package/src/components/Switch/Switch.vue +3 -10
  156. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
  157. package/src/components/TemplatePreview/TemplatePreview.vue +25 -28
  158. package/src/components/TemplatePreview/TemplatePreviewModal.vue +10 -10
  159. package/src/components/TemplatePreview/types.d.ts +3 -3
  160. package/src/components/Toast/Toast.vue +4 -1
  161. package/src/components/ToolTip/ToolTip.vue +25 -177
  162. package/src/components/ToolTip/__tests__/ToolTip.spec.js +339 -61
  163. package/src/components/index.ts +56 -0
  164. package/src/components/ui/dialog/Dialog.vue +19 -0
  165. package/src/components/ui/dialog/DialogClose.vue +29 -0
  166. package/src/components/ui/dialog/DialogContent.vue +140 -0
  167. package/src/components/ui/dialog/DialogFooter.vue +50 -0
  168. package/src/components/ui/dialog/DialogHeader.vue +83 -0
  169. package/src/components/ui/dialog/DialogTitle.vue +38 -0
  170. package/src/components/ui/dialog/DialogTrigger.vue +16 -0
  171. package/src/components/ui/dialog/index.ts +7 -0
  172. package/src/components/ui/drawer/Drawer.vue +27 -0
  173. package/src/components/ui/drawer/DrawerClose.vue +37 -0
  174. package/src/components/ui/drawer/DrawerContent.vue +111 -0
  175. package/src/components/ui/drawer/DrawerDescription.vue +40 -0
  176. package/src/components/ui/drawer/DrawerFooter.vue +38 -0
  177. package/src/components/ui/drawer/DrawerHeader.vue +57 -0
  178. package/src/components/ui/drawer/DrawerOverlay.vue +33 -0
  179. package/src/components/ui/drawer/DrawerTitle.vue +37 -0
  180. package/src/components/ui/drawer/DrawerTrigger.vue +31 -0
  181. package/src/components/ui/drawer/index.ts +10 -0
  182. package/src/components/ui/popover/PopoverContent.vue +4 -2
  183. package/src/components/ui/popover/PopoverTrigger.vue +5 -1
  184. package/src/components/ui/tooltip/Tooltip.vue +21 -0
  185. package/src/components/ui/tooltip/TooltipContent.vue +74 -0
  186. package/src/components/ui/tooltip/TooltipTrigger.vue +26 -0
  187. package/src/components/ui/tooltip/index.ts +3 -0
  188. package/src/lib/layer-manager.ts +92 -0
  189. package/src/stories/Dialog.stories.js +832 -0
  190. package/src/stories/Drawer.stories.js +1 -1
  191. package/src/stories/DrawerNext.stories.js +611 -0
  192. package/src/stories/LayerManager.docs.mdx +40 -0
  193. package/src/stories/LayerManager.stories.js +364 -0
  194. package/src/stories/ModalDialog.mdx +3 -0
  195. package/src/stories/ModalDialog.stories.js +1 -1
  196. package/src/stories/TemplatePreview.stories.js +27 -27
  197. package/src/stories/TemplatePreviewModal.stories.js +31 -31
  198. package/dist/components/ui/popover/PopoverOption.vue.d.ts +0 -18
  199. package/dist/components/ui/popover/PopoverOption.vue.d.ts.map +0 -1
@@ -111,6 +111,20 @@ import {
111
111
  SegmentedControlContent,
112
112
  } from './ui/segmented-control';
113
113
  import PageHeader from './PageHeader/PageHeader.vue';
114
+ import Dialog from './ui/dialog/Dialog.vue';
115
+ import DialogContent from './ui/dialog/DialogContent.vue';
116
+ import DialogFooter from './ui/dialog/DialogFooter.vue';
117
+ import DialogHeader from './ui/dialog/DialogHeader.vue';
118
+ import DialogTitle from './ui/dialog/DialogTitle.vue';
119
+ import DialogTrigger from './ui/dialog/DialogTrigger.vue';
120
+ import DialogClose from './ui/dialog/DialogClose.vue';
121
+ import DrawerNext from './ui/drawer/Drawer.vue';
122
+ import DrawerContent from './ui/drawer/DrawerContent.vue';
123
+ import DrawerHeader from './ui/drawer/DrawerHeader.vue';
124
+ import DrawerFooter from './ui/drawer/DrawerFooter.vue';
125
+ import DrawerClose from './ui/drawer/DrawerClose.vue';
126
+ import DrawerTitle from './ui/drawer/DrawerTitle.vue';
127
+ import DrawerDescription from './ui/drawer/DrawerDescription.vue';
114
128
 
115
129
  type VueComponent = Component;
116
130
 
@@ -230,6 +244,20 @@ export const components: ComponentsMap = {
230
244
  unnnicSegmentedControlTrigger: SegmentedControlTrigger,
231
245
  unnnicSegmentedControlContent: SegmentedControlContent,
232
246
  unnnicPageHeader: PageHeader,
247
+ unnnicDialog: Dialog,
248
+ unnnicDialogContent: DialogContent,
249
+ unnnicDialogFooter: DialogFooter,
250
+ unnnicDialogHeader: DialogHeader,
251
+ unnnicDialogTitle: DialogTitle,
252
+ unnnicDialogTrigger: DialogTrigger,
253
+ unnnicDialogClose: DialogClose,
254
+ unnnicDrawerNext: DrawerNext,
255
+ unnnicDrawerContent: DrawerContent,
256
+ unnnicDrawerHeader: DrawerHeader,
257
+ unnnicDrawerFooter: DrawerFooter,
258
+ unnnicDrawerClose: DrawerClose,
259
+ unnnicDrawerTitle: DrawerTitle,
260
+ unnnicDrawerDescription: DrawerDescription,
233
261
  };
234
262
 
235
263
  export const unnnicFontSize = fontSize;
@@ -344,6 +372,20 @@ export const unnnicSegmentedControlList = SegmentedControlList;
344
372
  export const unnnicSegmentedControlTrigger = SegmentedControlTrigger;
345
373
  export const unnnicSegmentedControlContent = SegmentedControlContent;
346
374
  export const unnnicPageHeader = PageHeader;
375
+ export const unnnicDialog = Dialog;
376
+ export const unnnicDialogContent = DialogContent;
377
+ export const unnnicDialogFooter = DialogFooter;
378
+ export const unnnicDialogHeader = DialogHeader;
379
+ export const unnnicDialogTitle = DialogTitle;
380
+ export const unnnicDialogTrigger = DialogTrigger;
381
+ export const unnnicDialogClose = DialogClose;
382
+ export const unnnicDrawerNext = DrawerNext;
383
+ export const unnnicDrawerContent = DrawerContent;
384
+ export const unnnicDrawerHeader = DrawerHeader;
385
+ export const unnnicDrawerFooter = DrawerFooter;
386
+ export const unnnicDrawerClose = DrawerClose;
387
+ export const unnnicDrawerTitle = DrawerTitle;
388
+ export const unnnicDrawerDescription = DrawerDescription;
347
389
 
348
390
  export const UnnnicFontSize = fontSize;
349
391
  export const UnnnicFormElement = formElement;
@@ -457,3 +499,17 @@ export const UnnnicSegmentedControlList = SegmentedControlList;
457
499
  export const UnnnicSegmentedControlTrigger = SegmentedControlTrigger;
458
500
  export const UnnnicSegmentedControlContent = SegmentedControlContent;
459
501
  export const UnnnicPageHeader = PageHeader;
502
+ export const UnnnicDialog = Dialog;
503
+ export const UnnnicDialogContent = DialogContent;
504
+ export const UnnnicDialogFooter = DialogFooter;
505
+ export const UnnnicDialogHeader = DialogHeader;
506
+ export const UnnnicDialogTitle = DialogTitle;
507
+ export const UnnnicDialogTrigger = DialogTrigger;
508
+ export const UnnnicDialogClose = DialogClose;
509
+ export const UnnnicDrawerNext = DrawerNext;
510
+ export const UnnnicDrawerContent = DrawerContent;
511
+ export const UnnnicDrawerHeader = DrawerHeader;
512
+ export const UnnnicDrawerFooter = DrawerFooter;
513
+ export const UnnnicDrawerClose = DrawerClose;
514
+ export const UnnnicDrawerTitle = DrawerTitle;
515
+ export const UnnnicDrawerDescription = DrawerDescription;
@@ -0,0 +1,19 @@
1
+ <script setup lang="ts">
2
+ import type { DialogRootEmits, DialogRootProps } from 'reka-ui';
3
+ import { DialogRoot, useForwardPropsEmits } from 'reka-ui';
4
+
5
+ defineOptions({
6
+ name: 'UnnnicDialog',
7
+ });
8
+
9
+ const props = defineProps<DialogRootProps>();
10
+ const emits = defineEmits<DialogRootEmits>();
11
+
12
+ const forwarded = useForwardPropsEmits(props, emits);
13
+ </script>
14
+
15
+ <template>
16
+ <DialogRoot v-bind="forwarded">
17
+ <slot />
18
+ </DialogRoot>
19
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import type { DialogCloseProps } from 'reka-ui';
3
+ import { DialogClose } from 'reka-ui';
4
+
5
+ defineOptions({
6
+ name: 'UnnnicDialogClose',
7
+ });
8
+
9
+ const props = defineProps<DialogCloseProps>();
10
+ </script>
11
+
12
+ <template>
13
+ <DialogClose
14
+ class="unnnic-dialog-close"
15
+ v-bind="props"
16
+ >
17
+ <slot />
18
+ </DialogClose>
19
+ </template>
20
+
21
+ <style lang="scss" scoped>
22
+ @use '@/assets/scss/unnnic' as *;
23
+
24
+ .unnnic-dialog-close {
25
+ > * {
26
+ width: 100%;
27
+ }
28
+ }
29
+ </style>
@@ -0,0 +1,140 @@
1
+ <script setup lang="ts">
2
+ import type { DialogContentEmits, DialogContentProps } from 'reka-ui';
3
+ import type { HTMLAttributes, Component } from 'vue';
4
+ import { computed, h } from 'vue';
5
+ import { reactiveOmit } from '@vueuse/core';
6
+ import {
7
+ DialogContent,
8
+ DialogOverlay,
9
+ DialogPortal,
10
+ useForwardPropsEmits,
11
+ } from 'reka-ui';
12
+ import { cn } from '@/lib/utils';
13
+ import { useLayerZIndex } from '@/lib/layer-manager';
14
+
15
+ defineOptions({
16
+ name: 'UnnnicDialogContent',
17
+ });
18
+
19
+ const props = withDefaults(
20
+ defineProps<
21
+ DialogContentProps & {
22
+ parentClass?: HTMLAttributes['class'];
23
+ class?: HTMLAttributes['class'];
24
+ size?: 'small' | 'medium' | 'large';
25
+ }
26
+ >(),
27
+ {
28
+ size: 'medium',
29
+ parentClass: '', // This class should be temporary, to be discontinued with the ModalDialog component
30
+ class: '',
31
+ },
32
+ );
33
+ const emits = defineEmits<DialogContentEmits>();
34
+
35
+ const delegatedProps = reactiveOmit(props, 'class', 'parentClass');
36
+
37
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
38
+
39
+ const overlayZIndex = useLayerZIndex('modal', { offset: -2 });
40
+ const modalZIndex = useLayerZIndex('modal');
41
+
42
+ const contentClasses = computed(() =>
43
+ cn(
44
+ 'unnnic-dialog-content',
45
+ `unnnic-dialog-content--size-${props.size}`,
46
+ 'duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]',
47
+ props.class,
48
+ ),
49
+ );
50
+
51
+ // This component is used to wrap the DialogContent component in a section if the parentClass is provided
52
+ // This is a temporary solution, to be discontinued with the ModalDialog component
53
+ const ConditionalWrapper: Component = (_, { slots }) => {
54
+ const content = slots.default?.();
55
+ return props.parentClass
56
+ ? h('section', { class: props.parentClass }, content)
57
+ : content;
58
+ };
59
+ </script>
60
+
61
+ <template>
62
+ <DialogPortal>
63
+ <DialogOverlay
64
+ class="unnnic-dialog-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
65
+ :style="{ zIndex: overlayZIndex }"
66
+ />
67
+
68
+ <ConditionalWrapper>
69
+ <DialogContent
70
+ v-bind="forwarded"
71
+ :class="contentClasses"
72
+ :style="{ zIndex: modalZIndex }"
73
+ >
74
+ <slot />
75
+ </DialogContent>
76
+ </ConditionalWrapper>
77
+ </DialogPortal>
78
+ </template>
79
+
80
+ <style lang="scss" scoped>
81
+ @use '@/assets/scss/unnnic' as *;
82
+
83
+ .unnnic-dialog-overlay {
84
+ position: fixed;
85
+ top: 0;
86
+ left: 0;
87
+
88
+ width: 100vw;
89
+ height: 100vh;
90
+ background: rgba(53, 57, 69, 0.5);
91
+ }
92
+
93
+ .unnnic-dialog-content {
94
+ position: fixed;
95
+ top: 50%;
96
+ left: 50%;
97
+
98
+ overflow: hidden;
99
+
100
+ transform: translate(-50%, -50%);
101
+
102
+ width: 100%;
103
+ max-height: calc(100% - $unnnic-space-20);
104
+
105
+ display: flex;
106
+ flex-direction: column;
107
+
108
+ box-shadow: $unnnic-shadow-2;
109
+ border-radius: $unnnic-radius-4;
110
+ background-color: $unnnic-color-bg-base;
111
+
112
+ &--size-small {
113
+ max-width: 360px;
114
+ }
115
+
116
+ &--size-medium {
117
+ max-width: 560px;
118
+ }
119
+
120
+ &--size-large {
121
+ max-width: 800px;
122
+ }
123
+
124
+ > * {
125
+ &::-webkit-scrollbar {
126
+ width: $unnnic-spacing-inline-nano;
127
+ }
128
+
129
+ &::-webkit-scrollbar-thumb {
130
+ background: $unnnic-color-neutral-cleanest;
131
+ border-radius: $unnnic-border-radius-pill;
132
+ }
133
+
134
+ &::-webkit-scrollbar-track {
135
+ background: $unnnic-color-neutral-soft;
136
+ border-radius: $unnnic-border-radius-pill;
137
+ }
138
+ }
139
+ }
140
+ </style>
@@ -0,0 +1,50 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { cn } from '@/lib/utils';
4
+
5
+ defineOptions({
6
+ name: 'UnnnicDialogFooter',
7
+ });
8
+
9
+ const props = withDefaults(
10
+ defineProps<{ class?: HTMLAttributes['class']; divider?: boolean }>(),
11
+ {
12
+ divider: true,
13
+ },
14
+ );
15
+ </script>
16
+
17
+ <template>
18
+ <footer
19
+ :class="
20
+ cn(
21
+ 'unnnic-dialog-footer',
22
+ { 'unnnic-dialog-footer--with-divider': props.divider },
23
+ props.class,
24
+ )
25
+ "
26
+ >
27
+ <slot />
28
+ </footer>
29
+ </template>
30
+
31
+ <style lang="scss" scoped>
32
+ @use '@/assets/scss/unnnic' as *;
33
+
34
+ .unnnic-dialog-footer {
35
+ display: flex;
36
+ justify-content: center;
37
+ align-items: center;
38
+ gap: $unnnic-space-2;
39
+
40
+ padding: $unnnic-space-6;
41
+
42
+ &--with-divider {
43
+ border-top: 1px solid $unnnic-color-border-soft;
44
+ }
45
+
46
+ > * {
47
+ width: 100%;
48
+ }
49
+ }
50
+ </style>
@@ -0,0 +1,83 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { cn } from '@/lib/utils';
4
+ import UnnnicButton from '@/components/Button/Button.vue';
5
+ import DialogClose from './DialogClose.vue';
6
+ import UnnnicIcon, { SchemeColor } from '@/components/Icon.vue';
7
+
8
+ defineOptions({
9
+ name: 'UnnnicDialogHeader',
10
+ });
11
+
12
+ const props = withDefaults(
13
+ defineProps<{
14
+ class?: HTMLAttributes['class'];
15
+ divider?: boolean;
16
+ type?: 'default' | 'success' | 'warning' | 'attention';
17
+ closeButton?: boolean;
18
+ }>(),
19
+ {
20
+ divider: true,
21
+ closeButton: true,
22
+ type: 'default',
23
+ },
24
+ );
25
+
26
+ const iconsMapper = {
27
+ default: { icon: '', scheme: '' as SchemeColor },
28
+ success: { icon: 'check_circle', scheme: 'aux-green-500' as SchemeColor },
29
+ warning: { icon: 'warning', scheme: 'aux-red-500' as SchemeColor },
30
+ attention: { icon: 'error', scheme: 'aux-yellow-500' as SchemeColor },
31
+ };
32
+ </script>
33
+
34
+ <template>
35
+ <header
36
+ :class="
37
+ cn(
38
+ 'unnnic-dialog-header',
39
+ { 'unnnic-dialog-header--with-divider': props.divider },
40
+ props.class,
41
+ )
42
+ "
43
+ >
44
+ <UnnnicIcon
45
+ v-if="iconsMapper[props.type]?.icon"
46
+ :icon="iconsMapper[props.type]?.icon"
47
+ :scheme="iconsMapper[props.type]?.scheme"
48
+ size="md"
49
+ />
50
+ <slot />
51
+
52
+ <DialogClose
53
+ v-if="props.closeButton"
54
+ class="unnnic-dialog-header__close"
55
+ >
56
+ <UnnnicButton
57
+ type="tertiary"
58
+ iconCenter="close"
59
+ size="small"
60
+ />
61
+ </DialogClose>
62
+ </header>
63
+ </template>
64
+
65
+ <style lang="scss" scoped>
66
+ @use '@/assets/scss/unnnic' as *;
67
+
68
+ .unnnic-dialog-header {
69
+ display: flex;
70
+ align-items: center;
71
+ gap: $unnnic-space-2;
72
+
73
+ padding: $unnnic-space-6;
74
+
75
+ &--with-divider {
76
+ border-bottom: 1px solid $unnnic-color-border-soft;
77
+ }
78
+
79
+ &__close {
80
+ margin-left: auto;
81
+ }
82
+ }
83
+ </style>
@@ -0,0 +1,38 @@
1
+ <script setup lang="ts">
2
+ import type { DialogTitleProps } from 'reka-ui';
3
+ import type { HTMLAttributes } from 'vue';
4
+ import { reactiveOmit } from '@vueuse/core';
5
+ import { DialogTitle, useForwardProps } from 'reka-ui';
6
+ import { cn } from '@/lib/utils';
7
+
8
+ defineOptions({
9
+ name: 'UnnnicDialogTitle',
10
+ });
11
+
12
+ const props = defineProps<
13
+ DialogTitleProps & { class?: HTMLAttributes['class'] }
14
+ >();
15
+
16
+ const delegatedProps = reactiveOmit(props, 'class');
17
+
18
+ const forwardedProps = useForwardProps(delegatedProps);
19
+ </script>
20
+
21
+ <template>
22
+ <DialogTitle
23
+ v-bind="forwardedProps"
24
+ :class="cn('unnnic-dialog-title', props.class)"
25
+ >
26
+ <slot />
27
+ </DialogTitle>
28
+ </template>
29
+
30
+ <style lang="scss" scoped>
31
+ @use '@/assets/scss/unnnic' as *;
32
+
33
+ .unnnic-dialog-title {
34
+ font: $unnnic-font-display-2;
35
+ color: $unnnic-color-fg-emphasized;
36
+ margin: 0;
37
+ }
38
+ </style>
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ import type { DialogTriggerProps } from 'reka-ui';
3
+ import { DialogTrigger } from 'reka-ui';
4
+
5
+ defineOptions({
6
+ name: 'UnnnicDialogTrigger',
7
+ });
8
+
9
+ const props = defineProps<DialogTriggerProps>();
10
+ </script>
11
+
12
+ <template>
13
+ <DialogTrigger v-bind="props">
14
+ <slot />
15
+ </DialogTrigger>
16
+ </template>
@@ -0,0 +1,7 @@
1
+ export { default as Dialog } from './Dialog.vue';
2
+ export { default as DialogClose } from './DialogClose.vue';
3
+ export { default as DialogContent } from './DialogContent.vue';
4
+ export { default as DialogFooter } from './DialogFooter.vue';
5
+ export { default as DialogHeader } from './DialogHeader.vue';
6
+ export { default as DialogTitle } from './DialogTitle.vue';
7
+ export { default as DialogTrigger } from './DialogTrigger.vue';
@@ -0,0 +1,27 @@
1
+ <script lang="ts" setup>
2
+ import type { DrawerRootEmits, DrawerRootProps } from 'vaul-vue';
3
+ import { useForwardPropsEmits } from 'reka-ui';
4
+ import { DrawerRoot } from 'vaul-vue';
5
+
6
+ defineOptions({
7
+ name: 'UnnnicDrawerNext',
8
+ });
9
+
10
+ const props = withDefaults(defineProps<DrawerRootProps>(), {
11
+ shouldScaleBackground: true,
12
+ });
13
+
14
+ const emits = defineEmits<DrawerRootEmits>();
15
+
16
+ const forwarded = useForwardPropsEmits(props, emits);
17
+ </script>
18
+
19
+ <template>
20
+ <DrawerRoot
21
+ v-bind="forwarded"
22
+ direction="right"
23
+ handleOnly
24
+ >
25
+ <slot />
26
+ </DrawerRoot>
27
+ </template>
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ import type { DrawerCloseProps } from 'vaul-vue';
3
+ import { DrawerClose } from 'vaul-vue';
4
+
5
+ defineOptions({
6
+ name: 'UnnnicDrawerClose',
7
+ });
8
+
9
+ const props = defineProps<DrawerCloseProps>();
10
+ </script>
11
+
12
+ <template>
13
+ <DrawerClose
14
+ v-bind="props"
15
+ class="unnnic-drawer__close"
16
+ >
17
+ <slot />
18
+ </DrawerClose>
19
+ </template>
20
+
21
+ <style lang="scss" scoped>
22
+ @use '@/assets/scss/unnnic' as *;
23
+
24
+ .unnnic-drawer__close {
25
+ display: flex;
26
+
27
+ border: none;
28
+ background: none;
29
+ padding: 0;
30
+ margin: 0;
31
+ cursor: pointer;
32
+
33
+ > * {
34
+ width: 100%;
35
+ }
36
+ }
37
+ </style>
@@ -0,0 +1,111 @@
1
+ <script lang="ts" setup>
2
+ import type { DialogContentEmits, DialogContentProps } from 'reka-ui';
3
+ import { type HTMLAttributes } from 'vue';
4
+ import { reactiveOmit } from '@vueuse/core';
5
+ import { useForwardPropsEmits } from 'reka-ui';
6
+ import { DrawerContent, DrawerPortal } from 'vaul-vue';
7
+ import { cn } from '@/lib/utils';
8
+ import { useLayerZIndex } from '@/lib/layer-manager';
9
+ import DrawerOverlay from './DrawerOverlay.vue';
10
+
11
+ defineOptions({
12
+ name: 'UnnnicDrawerContent',
13
+ });
14
+
15
+ const props = withDefaults(
16
+ defineProps<
17
+ DialogContentProps & {
18
+ class?: HTMLAttributes['class'];
19
+ size?: 'medium' | 'large' | 'extra-large' | 'giant';
20
+ showOverlay?: boolean;
21
+ }
22
+ >(),
23
+ {
24
+ class: undefined,
25
+ size: 'medium',
26
+ showOverlay: true,
27
+ },
28
+ );
29
+ const emits = defineEmits<DialogContentEmits>();
30
+
31
+ const delegatedProps = reactiveOmit(props, 'class');
32
+ const forwardedProps = useForwardPropsEmits(delegatedProps, emits);
33
+
34
+ const layerZIndex = useLayerZIndex('drawer');
35
+ </script>
36
+
37
+ <template>
38
+ <DrawerPortal>
39
+ <DrawerOverlay
40
+ v-if="showOverlay"
41
+ :style="{ zIndex: layerZIndex - 2 }"
42
+ />
43
+ <DrawerContent
44
+ v-bind="forwardedProps"
45
+ :class="
46
+ cn(
47
+ 'unnnic-drawer__content',
48
+ `unnnic-drawer__content--${props.size}`,
49
+ props.class,
50
+ )
51
+ "
52
+ :style="{
53
+ '--initial-transform': 'calc(100% + 8px)',
54
+ zIndex: layerZIndex,
55
+ }"
56
+ >
57
+ <slot />
58
+ </DrawerContent>
59
+ </DrawerPortal>
60
+ </template>
61
+
62
+ <style lang="scss" scoped>
63
+ @use '@/assets/scss/unnnic' as *;
64
+
65
+ $drawer-space: $unnnic-space-2;
66
+
67
+ .unnnic-drawer__content {
68
+ -webkit-user-select: unset;
69
+ user-select: unset;
70
+ will-change: unset;
71
+
72
+ &::after {
73
+ display: none;
74
+ }
75
+
76
+ position: fixed;
77
+ top: $drawer-space;
78
+ right: $drawer-space;
79
+
80
+ display: flex;
81
+ flex-direction: column;
82
+
83
+ height: calc(100% - $drawer-space * 2);
84
+
85
+ border-radius: $unnnic-radius-4;
86
+ border: 1px solid $unnnic-color-border-soft;
87
+ background-color: $unnnic-color-bg-base;
88
+
89
+ &--medium {
90
+ width: calc(100% / 3);
91
+ }
92
+
93
+ &--large {
94
+ width: 50%;
95
+ }
96
+
97
+ &--extra-large {
98
+ width: 66%;
99
+ }
100
+
101
+ &--giant {
102
+ width: 75%;
103
+ }
104
+
105
+ &__body {
106
+ overflow-y: auto;
107
+ padding: $unnnic-space-6;
108
+ flex: 1 0 0;
109
+ }
110
+ }
111
+ </style>
@@ -0,0 +1,40 @@
1
+ <script lang="ts" setup>
2
+ import type { DrawerDescriptionProps } from 'vaul-vue';
3
+ import type { HTMLAttributes } from 'vue';
4
+ import { reactiveOmit } from '@vueuse/core';
5
+ import { DrawerDescription } from 'vaul-vue';
6
+ import { cn } from '@/lib/utils';
7
+
8
+ defineOptions({
9
+ name: 'UnnnicDrawerDescription',
10
+ });
11
+
12
+ const props = defineProps<
13
+ DrawerDescriptionProps & { class?: HTMLAttributes['class'] }
14
+ >();
15
+
16
+ const delegatedProps = reactiveOmit(props, 'class');
17
+ </script>
18
+
19
+ <template>
20
+ <DrawerDescription
21
+ v-bind="delegatedProps"
22
+ :class="cn('unnnic-drawer__description', props.class)"
23
+ >
24
+ <slot />
25
+ </DrawerDescription>
26
+ </template>
27
+
28
+ <style lang="scss" scoped>
29
+ @use '@/assets/scss/unnnic' as *;
30
+
31
+ .unnnic-drawer__description {
32
+ margin: 0;
33
+
34
+ font: $unnnic-font-body;
35
+ color: $unnnic-color-fg-base;
36
+
37
+ grid-column: 1 / 3;
38
+ grid-row: 2 / 3;
39
+ }
40
+ </style>