@weni/unnnic-system 3.11.0 → 3.11.1-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 (179) 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 +109 -18
  4. package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +218 -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 +120 -29
  9. package/dist/components/Card/CardCompany.vue.d.ts +2 -2
  10. package/dist/components/Card/CardStatusesContainer.vue.d.ts +110 -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 +109 -18
  16. package/dist/components/Card/StatusCard.vue.d.ts +1 -1
  17. package/dist/components/Card/TitleCard.vue.d.ts +109 -18
  18. package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
  19. package/dist/components/CardInformation/CardInformation.vue.d.ts +110 -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 +115 -24
  24. package/dist/components/ChartLine/ChartLine.vue.d.ts +109 -18
  25. package/dist/components/ChatText/ChatText.vue.d.ts +109 -18
  26. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
  27. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +109 -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 +109 -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 +10 -10
  34. package/dist/components/DatePicker/DatePicker.vue.d.ts +6 -6
  35. package/dist/components/Drawer/Drawer.vue.d.ts +35 -207
  36. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  37. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
  38. package/dist/components/FormElement/FormElement.vue.d.ts +4 -4
  39. package/dist/components/ImportCard/ImportCard.vue.d.ts +6 -6
  40. package/dist/components/Input/Input.vue.d.ts +9 -9
  41. package/dist/components/Input/TextInput.vue.d.ts +2 -2
  42. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +15 -15
  43. package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
  44. package/dist/components/Modal/Modal.vue.d.ts +1 -1
  45. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +209 -35
  46. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  47. package/dist/components/ModalNext/ModalNext.vue.d.ts +15 -15
  48. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
  49. package/dist/components/MoodRating/MoodRating.vue.d.ts +109 -18
  50. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +18 -18
  51. package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
  52. package/dist/components/Radio/Radio.vue.d.ts +6 -6
  53. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +11 -11
  54. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +2 -2
  55. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +5 -5
  56. package/dist/components/SelectTime/index.vue.d.ts +3 -3
  57. package/dist/components/Slider/Slider.vue.d.ts +109 -18
  58. package/dist/components/Switch/Switch.vue.d.ts +2 -2
  59. package/dist/components/Tab/Tab.vue.d.ts +109 -18
  60. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  61. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  62. package/dist/components/Tag/DefaultTag.vue.d.ts +1 -1
  63. package/dist/components/Tag/Tag.vue.d.ts +2 -2
  64. package/dist/components/TextArea/TextArea.vue.d.ts +5 -5
  65. package/dist/components/Toast/Toast.vue.d.ts +1 -1
  66. package/dist/components/ToolTip/ToolTip.vue.d.ts +109 -18
  67. package/dist/components/ToolTip/ToolTip.vue.d.ts.map +1 -1
  68. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  69. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  70. package/dist/components/UploadArea/UploadArea.vue.d.ts +6 -6
  71. package/dist/components/index.d.ts +5537 -1862
  72. package/dist/components/index.d.ts.map +1 -1
  73. package/dist/components/ui/dialog/Dialog.vue.d.ts +23 -0
  74. package/dist/components/ui/dialog/Dialog.vue.d.ts.map +1 -0
  75. package/dist/components/ui/dialog/DialogClose.vue.d.ts +19 -0
  76. package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +1 -0
  77. package/dist/components/ui/dialog/DialogContent.vue.d.ts +43 -0
  78. package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +1 -0
  79. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +25 -0
  80. package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +1 -0
  81. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +29 -0
  82. package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +1 -0
  83. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +23 -0
  84. package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +1 -0
  85. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +19 -0
  86. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +1 -0
  87. package/dist/components/ui/dialog/index.d.ts +8 -0
  88. package/dist/components/ui/dialog/index.d.ts.map +1 -0
  89. package/dist/components/ui/drawer/Drawer.vue.d.ts +35 -0
  90. package/dist/components/ui/drawer/Drawer.vue.d.ts.map +1 -0
  91. package/dist/components/ui/drawer/DrawerClose.vue.d.ts +19 -0
  92. package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +1 -0
  93. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +42 -0
  94. package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +1 -0
  95. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +23 -0
  96. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +1 -0
  97. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +22 -0
  98. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +1 -0
  99. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +25 -0
  100. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +1 -0
  101. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +8 -0
  102. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +1 -0
  103. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +23 -0
  104. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +1 -0
  105. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +19 -0
  106. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +1 -0
  107. package/dist/components/ui/drawer/index.d.ts +11 -0
  108. package/dist/components/ui/drawer/index.d.ts.map +1 -0
  109. package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
  110. package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
  111. package/dist/components/ui/segmented-control/SegmentedControlList.vue.d.ts +26 -0
  112. package/dist/components/ui/segmented-control/SegmentedControlList.vue.d.ts.map +1 -0
  113. package/dist/components/ui/segmented-control/SegmentedControlTrigger.vue.d.ts +24 -0
  114. package/dist/components/ui/segmented-control/SegmentedControlTrigger.vue.d.ts.map +1 -0
  115. package/dist/components/ui/segmented-control/index.d.ts +5 -0
  116. package/dist/components/ui/segmented-control/index.d.ts.map +1 -0
  117. package/dist/components/ui/tabs/TabsTrigger.vue.d.ts.map +1 -1
  118. package/dist/components/ui/tooltip/Tooltip.vue.d.ts +23 -0
  119. package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +1 -0
  120. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +31 -0
  121. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +1 -0
  122. package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +19 -0
  123. package/dist/components/ui/tooltip/TooltipProvider.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 +5 -0
  127. package/dist/components/ui/tooltip/index.d.ts.map +1 -0
  128. package/dist/{es-e3248052.mjs → es-5af54117.mjs} +1 -1
  129. package/dist/{index-f67d5b30.mjs → index-eb28c19c.mjs} +99634 -96795
  130. package/dist/{pt-br-f6f53acd.mjs → pt-br-e0368966.mjs} +1 -1
  131. package/dist/style.css +1 -1
  132. package/dist/unnnic.mjs +218 -189
  133. package/dist/unnnic.umd.js +48 -44
  134. package/package.json +2 -1
  135. package/src/assets/scss/tailwind.scss +8 -0
  136. package/src/components/Drawer/Drawer.vue +174 -271
  137. package/src/components/Drawer/__tests__/Drawer.spec.js +32 -43
  138. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +18 -19
  139. package/src/components/ModalDialog/ModalDialog.vue +62 -148
  140. package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +11 -221
  141. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -22
  142. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +3 -1
  143. package/src/components/ToolTip/ToolTip.vue +41 -188
  144. package/src/components/ToolTip/__tests__/ToolTip.spec.js +345 -61
  145. package/src/components/index.ts +79 -12
  146. package/src/components/ui/dialog/Dialog.vue +15 -0
  147. package/src/components/ui/dialog/DialogClose.vue +25 -0
  148. package/src/components/ui/dialog/DialogContent.vue +133 -0
  149. package/src/components/ui/dialog/DialogFooter.vue +46 -0
  150. package/src/components/ui/dialog/DialogHeader.vue +79 -0
  151. package/src/components/ui/dialog/DialogTitle.vue +34 -0
  152. package/src/components/ui/dialog/DialogTrigger.vue +12 -0
  153. package/src/components/ui/dialog/index.ts +7 -0
  154. package/src/components/ui/drawer/Drawer.vue +23 -0
  155. package/src/components/ui/drawer/DrawerClose.vue +33 -0
  156. package/src/components/ui/drawer/DrawerContent.vue +98 -0
  157. package/src/components/ui/drawer/DrawerDescription.vue +36 -0
  158. package/src/components/ui/drawer/DrawerFooter.vue +34 -0
  159. package/src/components/ui/drawer/DrawerHeader.vue +53 -0
  160. package/src/components/ui/drawer/DrawerOverlay.vue +30 -0
  161. package/src/components/ui/drawer/DrawerTitle.vue +33 -0
  162. package/src/components/ui/drawer/DrawerTrigger.vue +27 -0
  163. package/src/components/ui/drawer/index.ts +10 -0
  164. package/src/components/ui/segmented-control/SegmentedControlList.vue +51 -0
  165. package/src/components/ui/segmented-control/SegmentedControlTrigger.vue +81 -0
  166. package/src/components/ui/segmented-control/index.ts +4 -0
  167. package/src/components/ui/tabs/TabsTrigger.vue +4 -20
  168. package/src/components/ui/tooltip/Tooltip.vue +15 -0
  169. package/src/components/ui/tooltip/TooltipContent.vue +73 -0
  170. package/src/components/ui/tooltip/TooltipProvider.vue +15 -0
  171. package/src/components/ui/tooltip/TooltipTrigger.vue +22 -0
  172. package/src/components/ui/tooltip/index.ts +4 -0
  173. package/src/stories/Dialog.stories.js +832 -0
  174. package/src/stories/Drawer.stories.js +1 -1
  175. package/src/stories/DrawerNext.stories.js +610 -0
  176. package/src/stories/ModalDialog.mdx +3 -0
  177. package/src/stories/ModalDialog.stories.js +1 -1
  178. package/src/stories/SegmentedControl.stories.js +253 -0
  179. package/src/stories/Tabs.stories.js +1 -1
@@ -0,0 +1,133 @@
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
+
14
+ const props = withDefaults(
15
+ defineProps<
16
+ DialogContentProps & {
17
+ parentClass?: HTMLAttributes['class'];
18
+ class?: HTMLAttributes['class'];
19
+ size?: 'small' | 'medium' | 'large';
20
+ }
21
+ >(),
22
+ {
23
+ size: 'medium',
24
+ parentClass: '', // This class should be temporary, to be discontinued with the ModalDialog component
25
+ class: '',
26
+ },
27
+ );
28
+ const emits = defineEmits<DialogContentEmits>();
29
+
30
+ const delegatedProps = reactiveOmit(props, 'class', 'parentClass');
31
+
32
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
33
+
34
+ const contentClasses = computed(() =>
35
+ cn(
36
+ 'unnnic-dialog-content',
37
+ `unnnic-dialog-content--size-${props.size}`,
38
+ '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%]',
39
+ props.class,
40
+ ),
41
+ );
42
+
43
+ // This component is used to wrap the DialogContent component in a section if the parentClass is provided
44
+ // This is a temporary solution, to be discontinued with the ModalDialog component
45
+ const ConditionalWrapper: Component = (_, { slots }) => {
46
+ const content = slots.default?.();
47
+ return props.parentClass
48
+ ? h('section', { class: props.parentClass }, content)
49
+ : content;
50
+ };
51
+ </script>
52
+
53
+ <template>
54
+ <DialogPortal>
55
+ <DialogOverlay
56
+ 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"
57
+ />
58
+
59
+ <ConditionalWrapper>
60
+ <DialogContent
61
+ v-bind="forwarded"
62
+ :class="contentClasses"
63
+ >
64
+ <slot />
65
+ </DialogContent>
66
+ </ConditionalWrapper>
67
+ </DialogPortal>
68
+ </template>
69
+
70
+ <style lang="scss" scoped>
71
+ @use '@/assets/scss/unnnic' as *;
72
+
73
+ .unnnic-dialog-overlay {
74
+ position: fixed;
75
+ top: 0;
76
+ left: 0;
77
+ z-index: 9999;
78
+
79
+ width: 100vw;
80
+ height: 100vh;
81
+ background: rgba(53, 57, 69, 0.5);
82
+ }
83
+
84
+ .unnnic-dialog-content {
85
+ z-index: 10000;
86
+
87
+ position: fixed;
88
+ top: 50%;
89
+ left: 50%;
90
+
91
+ overflow: hidden;
92
+
93
+ transform: translate(-50%, -50%);
94
+
95
+ width: 100%;
96
+ max-height: calc(100% - $unnnic-space-20);
97
+
98
+ display: flex;
99
+ flex-direction: column;
100
+
101
+ box-shadow: $unnnic-shadow-2;
102
+ border-radius: $unnnic-radius-4;
103
+ background-color: $unnnic-color-bg-base;
104
+
105
+ &--size-small {
106
+ max-width: 360px;
107
+ }
108
+
109
+ &--size-medium {
110
+ max-width: 560px;
111
+ }
112
+
113
+ &--size-large {
114
+ max-width: 800px;
115
+ }
116
+
117
+ > * {
118
+ &::-webkit-scrollbar {
119
+ width: $unnnic-spacing-inline-nano;
120
+ }
121
+
122
+ &::-webkit-scrollbar-thumb {
123
+ background: $unnnic-color-neutral-cleanest;
124
+ border-radius: $unnnic-border-radius-pill;
125
+ }
126
+
127
+ &::-webkit-scrollbar-track {
128
+ background: $unnnic-color-neutral-soft;
129
+ border-radius: $unnnic-border-radius-pill;
130
+ }
131
+ }
132
+ }
133
+ </style>
@@ -0,0 +1,46 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { cn } from '@/lib/utils';
4
+
5
+ const props = withDefaults(
6
+ defineProps<{ class?: HTMLAttributes['class']; divider?: boolean }>(),
7
+ {
8
+ divider: true,
9
+ },
10
+ );
11
+ </script>
12
+
13
+ <template>
14
+ <footer
15
+ :class="
16
+ cn(
17
+ 'unnnic-dialog-footer',
18
+ { 'unnnic-dialog-footer--with-divider': props.divider },
19
+ props.class,
20
+ )
21
+ "
22
+ >
23
+ <slot />
24
+ </footer>
25
+ </template>
26
+
27
+ <style lang="scss" scoped>
28
+ @use '@/assets/scss/unnnic' as *;
29
+
30
+ .unnnic-dialog-footer {
31
+ display: flex;
32
+ justify-content: center;
33
+ align-items: center;
34
+ gap: $unnnic-space-2;
35
+
36
+ padding: $unnnic-space-6;
37
+
38
+ &--with-divider {
39
+ border-top: 1px solid $unnnic-color-border-soft;
40
+ }
41
+
42
+ > * {
43
+ width: 100%;
44
+ }
45
+ }
46
+ </style>
@@ -0,0 +1,79 @@
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
+ const props = withDefaults(
9
+ defineProps<{
10
+ class?: HTMLAttributes['class'];
11
+ divider?: boolean;
12
+ type?: 'default' | 'success' | 'warning' | 'attention';
13
+ closeButton?: boolean;
14
+ }>(),
15
+ {
16
+ divider: true,
17
+ closeButton: true,
18
+ type: 'default',
19
+ },
20
+ );
21
+
22
+ const iconsMapper = {
23
+ default: { icon: '', scheme: '' as SchemeColor },
24
+ success: { icon: 'check_circle', scheme: 'aux-green-500' as SchemeColor },
25
+ warning: { icon: 'warning', scheme: 'aux-red-500' as SchemeColor },
26
+ attention: { icon: 'error', scheme: 'aux-yellow-500' as SchemeColor },
27
+ };
28
+ </script>
29
+
30
+ <template>
31
+ <header
32
+ :class="
33
+ cn(
34
+ 'unnnic-dialog-header',
35
+ { 'unnnic-dialog-header--with-divider': props.divider },
36
+ props.class,
37
+ )
38
+ "
39
+ >
40
+ <UnnnicIcon
41
+ v-if="iconsMapper[props.type]?.icon"
42
+ :icon="iconsMapper[props.type]?.icon"
43
+ :scheme="iconsMapper[props.type]?.scheme"
44
+ size="md"
45
+ />
46
+ <slot />
47
+
48
+ <DialogClose
49
+ v-if="props.closeButton"
50
+ class="unnnic-dialog-header__close"
51
+ >
52
+ <UnnnicButton
53
+ type="tertiary"
54
+ iconCenter="close"
55
+ size="small"
56
+ />
57
+ </DialogClose>
58
+ </header>
59
+ </template>
60
+
61
+ <style lang="scss" scoped>
62
+ @use '@/assets/scss/unnnic' as *;
63
+
64
+ .unnnic-dialog-header {
65
+ display: flex;
66
+ align-items: center;
67
+ gap: $unnnic-space-2;
68
+
69
+ padding: $unnnic-space-6;
70
+
71
+ &--with-divider {
72
+ border-bottom: 1px solid $unnnic-color-border-soft;
73
+ }
74
+
75
+ &__close {
76
+ margin-left: auto;
77
+ }
78
+ }
79
+ </style>
@@ -0,0 +1,34 @@
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
+ const props = defineProps<
9
+ DialogTitleProps & { class?: HTMLAttributes['class'] }
10
+ >();
11
+
12
+ const delegatedProps = reactiveOmit(props, 'class');
13
+
14
+ const forwardedProps = useForwardProps(delegatedProps);
15
+ </script>
16
+
17
+ <template>
18
+ <DialogTitle
19
+ v-bind="forwardedProps"
20
+ :class="cn('unnnic-dialog-title', props.class)"
21
+ >
22
+ <slot />
23
+ </DialogTitle>
24
+ </template>
25
+
26
+ <style lang="scss" scoped>
27
+ @use '@/assets/scss/unnnic' as *;
28
+
29
+ .unnnic-dialog-title {
30
+ font: $unnnic-font-display-2;
31
+ color: $unnnic-color-fg-emphasized;
32
+ margin: 0;
33
+ }
34
+ </style>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { DialogTriggerProps } from 'reka-ui';
3
+ import { DialogTrigger } from 'reka-ui';
4
+
5
+ const props = defineProps<DialogTriggerProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <DialogTrigger v-bind="props">
10
+ <slot />
11
+ </DialogTrigger>
12
+ </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,23 @@
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
+ const props = withDefaults(defineProps<DrawerRootProps>(), {
7
+ shouldScaleBackground: true,
8
+ });
9
+
10
+ const emits = defineEmits<DrawerRootEmits>();
11
+
12
+ const forwarded = useForwardPropsEmits(props, emits);
13
+ </script>
14
+
15
+ <template>
16
+ <DrawerRoot
17
+ v-bind="forwarded"
18
+ direction="right"
19
+ handleOnly
20
+ >
21
+ <slot />
22
+ </DrawerRoot>
23
+ </template>
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import type { DrawerCloseProps } from 'vaul-vue';
3
+ import { DrawerClose } from 'vaul-vue';
4
+
5
+ const props = defineProps<DrawerCloseProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <DrawerClose
10
+ v-bind="props"
11
+ class="unnnic-drawer__close"
12
+ >
13
+ <slot />
14
+ </DrawerClose>
15
+ </template>
16
+
17
+ <style lang="scss" scoped>
18
+ @use '@/assets/scss/unnnic' as *;
19
+
20
+ .unnnic-drawer__close {
21
+ display: flex;
22
+
23
+ border: none;
24
+ background: none;
25
+ padding: 0;
26
+ margin: 0;
27
+ cursor: pointer;
28
+
29
+ > * {
30
+ width: 100%;
31
+ }
32
+ }
33
+ </style>
@@ -0,0 +1,98 @@
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 DrawerOverlay from './DrawerOverlay.vue';
9
+
10
+ const props = withDefaults(
11
+ defineProps<
12
+ DialogContentProps & {
13
+ class?: HTMLAttributes['class'];
14
+ size?: 'medium' | 'large' | 'extra-large' | 'giant';
15
+ showOverlay?: boolean;
16
+ }
17
+ >(),
18
+ {
19
+ size: 'medium',
20
+ showOverlay: true,
21
+ },
22
+ );
23
+ const emits = defineEmits<DialogContentEmits>();
24
+
25
+ const delegatedProps = reactiveOmit(props, 'class');
26
+ const forwardedProps = useForwardPropsEmits(delegatedProps, emits);
27
+ </script>
28
+
29
+ <template>
30
+ <DrawerPortal>
31
+ <DrawerOverlay v-if="showOverlay" />
32
+ <DrawerContent
33
+ v-bind="forwardedProps"
34
+ :class="
35
+ cn(
36
+ 'unnnic-drawer__content',
37
+ `unnnic-drawer__content--${props.size}`,
38
+ props.class,
39
+ )
40
+ "
41
+ :style="{ '--initial-transform': 'calc(100% + 8px)' }"
42
+ >
43
+ <slot />
44
+ </DrawerContent>
45
+ </DrawerPortal>
46
+ </template>
47
+
48
+ <style lang="scss" scoped>
49
+ @use '@/assets/scss/unnnic' as *;
50
+
51
+ $drawer-space: $unnnic-space-2;
52
+
53
+ .unnnic-drawer__content {
54
+ -webkit-user-select: unset;
55
+ user-select: unset;
56
+ will-change: unset;
57
+
58
+ &::after {
59
+ display: none;
60
+ }
61
+
62
+ position: fixed;
63
+ top: $drawer-space;
64
+ right: $drawer-space;
65
+ z-index: 50;
66
+
67
+ display: flex;
68
+ flex-direction: column;
69
+
70
+ height: calc(100% - $drawer-space * 2);
71
+
72
+ border-radius: $unnnic-radius-4;
73
+ border: 1px solid $unnnic-color-border-soft;
74
+ background-color: $unnnic-color-bg-base;
75
+
76
+ &--medium {
77
+ width: calc(100% / 3);
78
+ }
79
+
80
+ &--large {
81
+ width: 50%;
82
+ }
83
+
84
+ &--extra-large {
85
+ width: 66%;
86
+ }
87
+
88
+ &--giant {
89
+ width: 75%;
90
+ }
91
+
92
+ &__body {
93
+ overflow-y: auto;
94
+ padding: $unnnic-space-6;
95
+ flex: 1 0 0;
96
+ }
97
+ }
98
+ </style>
@@ -0,0 +1,36 @@
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
+ const props = defineProps<
9
+ DrawerDescriptionProps & { class?: HTMLAttributes['class'] }
10
+ >();
11
+
12
+ const delegatedProps = reactiveOmit(props, 'class');
13
+ </script>
14
+
15
+ <template>
16
+ <DrawerDescription
17
+ v-bind="delegatedProps"
18
+ :class="cn('unnnic-drawer__description', props.class)"
19
+ >
20
+ <slot />
21
+ </DrawerDescription>
22
+ </template>
23
+
24
+ <style lang="scss" scoped>
25
+ @use '@/assets/scss/unnnic' as *;
26
+
27
+ .unnnic-drawer__description {
28
+ margin: 0;
29
+
30
+ font: $unnnic-font-body;
31
+ color: $unnnic-color-fg-base;
32
+
33
+ grid-column: 1 / 3;
34
+ grid-row: 2 / 3;
35
+ }
36
+ </style>
@@ -0,0 +1,34 @@
1
+ <script lang="ts" setup>
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { cn } from '@/lib/utils';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <footer :class="cn('unnnic-drawer__footer', props.class)">
12
+ <slot />
13
+ </footer>
14
+ </template>
15
+
16
+ <style lang="scss" scoped>
17
+ @use '@/assets/scss/unnnic' as *;
18
+
19
+ .unnnic-drawer__footer {
20
+ border-top: 1px solid $unnnic-color-border-soft;
21
+
22
+ margin-top: auto;
23
+ padding: $unnnic-space-6;
24
+
25
+ display: flex;
26
+ justify-content: center;
27
+ align-items: center;
28
+ gap: $unnnic-space-2;
29
+
30
+ > * {
31
+ width: 100%;
32
+ }
33
+ }
34
+ </style>
@@ -0,0 +1,53 @@
1
+ <script lang="ts" setup>
2
+ import type { HTMLAttributes } from 'vue';
3
+ import { cn } from '@/lib/utils';
4
+ import UnnnicButton from '@/components/Button/Button.vue';
5
+ import DrawerClose from './DrawerClose.vue';
6
+
7
+ const props = defineProps<{
8
+ class?: HTMLAttributes['class'];
9
+ }>();
10
+ </script>
11
+
12
+ <template>
13
+ <header :class="cn('unnnic-drawer__header', props.class)">
14
+ <slot />
15
+
16
+ <template v-if="$slots.close">
17
+ <slot
18
+ name="close"
19
+ class="unnnic-drawer__close-button"
20
+ />
21
+ </template>
22
+ <template v-else>
23
+ <DrawerClose>
24
+ <UnnnicButton
25
+ iconCenter="close"
26
+ size="small"
27
+ type="tertiary"
28
+ class="unnnic-drawer__close-button"
29
+ />
30
+ </DrawerClose>
31
+ </template>
32
+ </header>
33
+ </template>
34
+
35
+ <style lang="scss" scoped>
36
+ @use '@/assets/scss/unnnic' as *;
37
+
38
+ .unnnic-drawer__header {
39
+ display: grid;
40
+ align-items: center;
41
+ grid-template-columns: 1fr auto;
42
+ padding: $unnnic-space-6;
43
+
44
+ gap: $unnnic-space-1;
45
+
46
+ border-bottom: 1px solid $unnnic-color-border-soft;
47
+ }
48
+
49
+ .unnnic-drawer__close-button {
50
+ grid-column: 2 / 3;
51
+ grid-row: 1 / 2;
52
+ }
53
+ </style>
@@ -0,0 +1,30 @@
1
+ <script lang="ts" setup>
2
+ import type { DialogOverlayProps } from 'reka-ui';
3
+ import type { HTMLAttributes } from 'vue';
4
+ import { reactiveOmit } from '@vueuse/core';
5
+ import { DrawerOverlay } from 'vaul-vue';
6
+ import { cn } from '@/lib/utils';
7
+
8
+ const props = defineProps<
9
+ DialogOverlayProps & { class?: HTMLAttributes['class'] }
10
+ >();
11
+
12
+ const delegatedProps = reactiveOmit(props, 'class');
13
+ </script>
14
+
15
+ <template>
16
+ <DrawerOverlay
17
+ v-bind="delegatedProps"
18
+ :class="cn('unnnic-drawer__overlay', props.class)"
19
+ />
20
+ </template>
21
+
22
+ <style lang="scss" scoped>
23
+ .unnnic-drawer__overlay {
24
+ position: fixed;
25
+ inset: 0;
26
+ z-index: 50;
27
+
28
+ background: rgba(53, 57, 69, 0.65);
29
+ }
30
+ </style>
@@ -0,0 +1,33 @@
1
+ <script lang="ts" setup>
2
+ import type { DrawerTitleProps } from 'vaul-vue';
3
+ import type { HTMLAttributes } from 'vue';
4
+ import { reactiveOmit } from '@vueuse/core';
5
+ import { DrawerTitle } from 'vaul-vue';
6
+ import { cn } from '@/lib/utils';
7
+
8
+ const props = defineProps<
9
+ DrawerTitleProps & { class?: HTMLAttributes['class'] }
10
+ >();
11
+
12
+ const delegatedProps = reactiveOmit(props, 'class');
13
+ </script>
14
+
15
+ <template>
16
+ <DrawerTitle
17
+ v-bind="delegatedProps"
18
+ :class="cn('unnnic-drawer__title', props.class)"
19
+ >
20
+ <slot />
21
+ </DrawerTitle>
22
+ </template>
23
+
24
+ <style lang="scss" scoped>
25
+ @use '@/assets/scss/unnnic' as *;
26
+
27
+ .unnnic-drawer__title {
28
+ margin: 0;
29
+
30
+ color: $unnnic-color-fg-emphasized;
31
+ font: $unnnic-font-display-2;
32
+ }
33
+ </style>
@@ -0,0 +1,27 @@
1
+ <script setup lang="ts">
2
+ import type { DrawerTriggerProps } from 'vaul-vue';
3
+ import { DrawerTrigger } from 'vaul-vue';
4
+
5
+ const props = defineProps<DrawerTriggerProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <DrawerTrigger
10
+ v-bind="props"
11
+ class="unnnic-drawer__trigger"
12
+ >
13
+ <slot />
14
+ </DrawerTrigger>
15
+ </template>
16
+
17
+ <style lang="scss" scoped>
18
+ @use '@/assets/scss/unnnic' as *;
19
+
20
+ .unnnic-drawer__trigger {
21
+ border: none;
22
+ background: none;
23
+ padding: 0;
24
+ margin: 0;
25
+ cursor: pointer;
26
+ }
27
+ </style>