@weni/unnnic-system 3.11.3-alpha.2 → 3.12.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 (166) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/components/Alert/Alert.vue.d.ts +3 -3
  3. package/dist/components/Alert/Version1dot1.vue.d.ts +1 -1
  4. package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +18 -109
  5. package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +36 -218
  6. package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +1 -1
  7. package/dist/components/Button/Button.vue.d.ts +2 -2
  8. package/dist/components/Card/AccountCard.vue.d.ts +2 -2
  9. package/dist/components/Card/Card.vue.d.ts +29 -120
  10. package/dist/components/Card/CardCompany.vue.d.ts +2 -2
  11. package/dist/components/Card/CardStatusesContainer.vue.d.ts +19 -110
  12. package/dist/components/Card/ContentCard.vue.d.ts +1 -1
  13. package/dist/components/Card/DashCard.vue.d.ts +2 -2
  14. package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
  15. package/dist/components/Card/MarketplaceCard.vue.d.ts +1 -1
  16. package/dist/components/Card/SimpleCard.vue.d.ts +18 -109
  17. package/dist/components/Card/StatusCard.vue.d.ts +1 -1
  18. package/dist/components/Card/TitleCard.vue.d.ts +18 -109
  19. package/dist/components/CardImage/CardImage.vue.d.ts +5 -5
  20. package/dist/components/CardInformation/CardInformation.vue.d.ts +19 -110
  21. package/dist/components/CardProject/CardProject.vue.d.ts +2 -2
  22. package/dist/components/Carousel/Carousel.vue.d.ts +2 -2
  23. package/dist/components/Carousel/TagCarousel.vue.d.ts +2 -2
  24. package/dist/components/ChartBar/ChartBar.vue.d.ts +24 -115
  25. package/dist/components/ChartLine/ChartLine.vue.d.ts +18 -109
  26. package/dist/components/ChatText/ChatText.vue.d.ts +18 -109
  27. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +6 -6
  28. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +18 -109
  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/DataArea/DataArea.vue.d.ts +18 -109
  32. package/dist/components/DataTable/index.vue.d.ts +1 -1
  33. package/dist/components/DataTable/index.vue.d.ts.map +1 -1
  34. package/dist/components/DateFilter/DateFilter.vue.d.ts +10 -10
  35. package/dist/components/Drawer/Drawer.vue.d.ts +207 -37
  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/InputNext/InputNext.vue.d.ts +3 -3
  43. package/dist/components/Modal/Modal.vue.d.ts +1 -1
  44. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +35 -209
  45. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  46. package/dist/components/ModalNext/ModalNext.vue.d.ts +15 -15
  47. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +12 -12
  48. package/dist/components/MoodRating/MoodRating.vue.d.ts +18 -109
  49. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +18 -18
  50. package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
  51. package/dist/components/Radio/Radio.vue.d.ts +6 -6
  52. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +11 -11
  53. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +2 -2
  54. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +5 -5
  55. package/dist/components/SelectTime/index.vue.d.ts +3 -3
  56. package/dist/components/Slider/Slider.vue.d.ts +18 -109
  57. package/dist/components/Switch/Switch.vue.d.ts +2 -2
  58. package/dist/components/Tab/Tab.vue.d.ts +18 -109
  59. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  60. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  61. package/dist/components/Tag/DefaultTag.vue.d.ts +1 -1
  62. package/dist/components/Tag/Tag.vue.d.ts +2 -2
  63. package/dist/components/TextArea/TextArea.vue.d.ts +5 -5
  64. package/dist/components/Toast/Toast.vue.d.ts +1 -1
  65. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  66. package/dist/components/ToolTip/ToolTip.vue.d.ts +18 -109
  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/ui/popover/PopoverContent.vue.d.ts +2 -2
  72. package/dist/components/ui/popover/PopoverContent.vue.d.ts.map +1 -1
  73. package/dist/{es-99b102dc.mjs → es-9756db6d.mjs} +1 -1
  74. package/dist/{index-c20fa852.mjs → index-ab280280.mjs} +51987 -54801
  75. package/dist/{pt-br-b17e69b4.mjs → pt-br-55135cbc.mjs} +1 -1
  76. package/dist/style.css +1 -1
  77. package/dist/unnnic.mjs +203 -231
  78. package/dist/unnnic.umd.js +44 -48
  79. package/package.json +1 -2
  80. package/src/assets/scss/tailwind.scss +0 -8
  81. package/src/components/Drawer/Drawer.vue +269 -190
  82. package/src/components/Drawer/__tests__/Drawer.spec.js +46 -37
  83. package/src/components/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +19 -18
  84. package/src/components/ModalDialog/ModalDialog.vue +148 -64
  85. package/src/components/ModalDialog/__tests__/ModalDialog.spec.js +221 -11
  86. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +22 -1
  87. package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -3
  88. package/src/components/Toast/Toast.vue +8 -12
  89. package/src/components/ToolTip/ToolTip.vue +188 -41
  90. package/src/components/ToolTip/__tests__/ToolTip.spec.js +61 -345
  91. package/src/components/index.ts +19 -75
  92. package/src/components/ui/popover/PopoverContent.vue +2 -0
  93. package/src/stories/Drawer.stories.js +1 -1
  94. package/src/stories/ModalDialog.mdx +0 -3
  95. package/src/stories/ModalDialog.stories.js +1 -1
  96. package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -23
  97. package/dist/components/ui/dialog/Dialog.vue.d.ts.map +0 -1
  98. package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -19
  99. package/dist/components/ui/dialog/DialogClose.vue.d.ts.map +0 -1
  100. package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -43
  101. package/dist/components/ui/dialog/DialogContent.vue.d.ts.map +0 -1
  102. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -25
  103. package/dist/components/ui/dialog/DialogFooter.vue.d.ts.map +0 -1
  104. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -29
  105. package/dist/components/ui/dialog/DialogHeader.vue.d.ts.map +0 -1
  106. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -23
  107. package/dist/components/ui/dialog/DialogTitle.vue.d.ts.map +0 -1
  108. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -19
  109. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts.map +0 -1
  110. package/dist/components/ui/dialog/index.d.ts +0 -8
  111. package/dist/components/ui/dialog/index.d.ts.map +0 -1
  112. package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -35
  113. package/dist/components/ui/drawer/Drawer.vue.d.ts.map +0 -1
  114. package/dist/components/ui/drawer/DrawerClose.vue.d.ts +0 -19
  115. package/dist/components/ui/drawer/DrawerClose.vue.d.ts.map +0 -1
  116. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -42
  117. package/dist/components/ui/drawer/DrawerContent.vue.d.ts.map +0 -1
  118. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -23
  119. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts.map +0 -1
  120. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -22
  121. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts.map +0 -1
  122. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -25
  123. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts.map +0 -1
  124. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -8
  125. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts.map +0 -1
  126. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -23
  127. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts.map +0 -1
  128. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts +0 -19
  129. package/dist/components/ui/drawer/DrawerTrigger.vue.d.ts.map +0 -1
  130. package/dist/components/ui/drawer/index.d.ts +0 -11
  131. package/dist/components/ui/drawer/index.d.ts.map +0 -1
  132. package/dist/components/ui/tooltip/Tooltip.vue.d.ts +0 -23
  133. package/dist/components/ui/tooltip/Tooltip.vue.d.ts.map +0 -1
  134. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +0 -31
  135. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts.map +0 -1
  136. package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +0 -19
  137. package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts.map +0 -1
  138. package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +0 -19
  139. package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts.map +0 -1
  140. package/dist/components/ui/tooltip/index.d.ts +0 -5
  141. package/dist/components/ui/tooltip/index.d.ts.map +0 -1
  142. package/src/components/ui/dialog/Dialog.vue +0 -19
  143. package/src/components/ui/dialog/DialogClose.vue +0 -29
  144. package/src/components/ui/dialog/DialogContent.vue +0 -134
  145. package/src/components/ui/dialog/DialogFooter.vue +0 -50
  146. package/src/components/ui/dialog/DialogHeader.vue +0 -83
  147. package/src/components/ui/dialog/DialogTitle.vue +0 -38
  148. package/src/components/ui/dialog/DialogTrigger.vue +0 -16
  149. package/src/components/ui/dialog/index.ts +0 -7
  150. package/src/components/ui/drawer/Drawer.vue +0 -27
  151. package/src/components/ui/drawer/DrawerClose.vue +0 -37
  152. package/src/components/ui/drawer/DrawerContent.vue +0 -101
  153. package/src/components/ui/drawer/DrawerDescription.vue +0 -40
  154. package/src/components/ui/drawer/DrawerFooter.vue +0 -38
  155. package/src/components/ui/drawer/DrawerHeader.vue +0 -57
  156. package/src/components/ui/drawer/DrawerOverlay.vue +0 -33
  157. package/src/components/ui/drawer/DrawerTitle.vue +0 -37
  158. package/src/components/ui/drawer/DrawerTrigger.vue +0 -31
  159. package/src/components/ui/drawer/index.ts +0 -10
  160. package/src/components/ui/tooltip/Tooltip.vue +0 -15
  161. package/src/components/ui/tooltip/TooltipContent.vue +0 -73
  162. package/src/components/ui/tooltip/TooltipProvider.vue +0 -15
  163. package/src/components/ui/tooltip/TooltipTrigger.vue +0 -22
  164. package/src/components/ui/tooltip/index.ts +0 -4
  165. package/src/stories/Dialog.stories.js +0 -832
  166. package/src/stories/DrawerNext.stories.js +0 -610
@@ -1,19 +0,0 @@
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>
@@ -1,29 +0,0 @@
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>
@@ -1,134 +0,0 @@
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
- defineOptions({
15
- name: 'UnnnicDialogContent',
16
- });
17
-
18
- const props = withDefaults(
19
- defineProps<
20
- DialogContentProps & {
21
- parentClass?: HTMLAttributes['class'];
22
- class?: HTMLAttributes['class'];
23
- size?: 'small' | 'medium' | 'large';
24
- }
25
- >(),
26
- {
27
- size: 'medium',
28
- parentClass: '', // This class should be temporary, to be discontinued with the ModalDialog component
29
- class: '',
30
- },
31
- );
32
- const emits = defineEmits<DialogContentEmits>();
33
-
34
- const delegatedProps = reactiveOmit(props, 'class', 'parentClass');
35
-
36
- const forwarded = useForwardPropsEmits(delegatedProps, emits);
37
-
38
- const contentClasses = computed(() =>
39
- cn(
40
- 'unnnic-dialog-content',
41
- `unnnic-dialog-content--size-${props.size}`,
42
- '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%]',
43
- props.class,
44
- ),
45
- );
46
-
47
- // This component is used to wrap the DialogContent component in a section if the parentClass is provided
48
- // This is a temporary solution, to be discontinued with the ModalDialog component
49
- const ConditionalWrapper: Component = (_, { slots }) => {
50
- const content = slots.default?.();
51
- return props.parentClass
52
- ? h('section', { class: props.parentClass }, content)
53
- : content;
54
- };
55
- </script>
56
-
57
- <template>
58
- <DialogPortal>
59
- <DialogOverlay
60
- 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"
61
- />
62
-
63
- <ConditionalWrapper>
64
- <DialogContent
65
- v-bind="forwarded"
66
- :class="contentClasses"
67
- >
68
- <slot />
69
- </DialogContent>
70
- </ConditionalWrapper>
71
- </DialogPortal>
72
- </template>
73
-
74
- <style lang="scss" scoped>
75
- @use '@/assets/scss/unnnic' as *;
76
-
77
- .unnnic-dialog-overlay {
78
- position: fixed;
79
- top: 0;
80
- left: 0;
81
-
82
- width: 100vw;
83
- height: 100vh;
84
- background: rgba(53, 57, 69, 0.5);
85
- }
86
-
87
- .unnnic-dialog-content {
88
- position: fixed;
89
- top: 50%;
90
- left: 50%;
91
-
92
- overflow: hidden;
93
-
94
- transform: translate(-50%, -50%);
95
-
96
- width: 100%;
97
- max-height: calc(100% - $unnnic-space-20);
98
-
99
- display: flex;
100
- flex-direction: column;
101
-
102
- box-shadow: $unnnic-shadow-2;
103
- border-radius: $unnnic-radius-4;
104
- background-color: $unnnic-color-bg-base;
105
-
106
- &--size-small {
107
- max-width: 360px;
108
- }
109
-
110
- &--size-medium {
111
- max-width: 560px;
112
- }
113
-
114
- &--size-large {
115
- max-width: 800px;
116
- }
117
-
118
- > * {
119
- &::-webkit-scrollbar {
120
- width: $unnnic-spacing-inline-nano;
121
- }
122
-
123
- &::-webkit-scrollbar-thumb {
124
- background: $unnnic-color-neutral-cleanest;
125
- border-radius: $unnnic-border-radius-pill;
126
- }
127
-
128
- &::-webkit-scrollbar-track {
129
- background: $unnnic-color-neutral-soft;
130
- border-radius: $unnnic-border-radius-pill;
131
- }
132
- }
133
- }
134
- </style>
@@ -1,50 +0,0 @@
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>
@@ -1,83 +0,0 @@
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>
@@ -1,38 +0,0 @@
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>
@@ -1,16 +0,0 @@
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>
@@ -1,7 +0,0 @@
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';
@@ -1,27 +0,0 @@
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>
@@ -1,37 +0,0 @@
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>
@@ -1,101 +0,0 @@
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
- defineOptions({
11
- name: 'UnnnicDrawerContent',
12
- });
13
-
14
- const props = withDefaults(
15
- defineProps<
16
- DialogContentProps & {
17
- class?: HTMLAttributes['class'];
18
- size?: 'medium' | 'large' | 'extra-large' | 'giant';
19
- showOverlay?: boolean;
20
- }
21
- >(),
22
- {
23
- size: 'medium',
24
- showOverlay: true,
25
- },
26
- );
27
- const emits = defineEmits<DialogContentEmits>();
28
-
29
- const delegatedProps = reactiveOmit(props, 'class');
30
- const forwardedProps = useForwardPropsEmits(delegatedProps, emits);
31
- </script>
32
-
33
- <template>
34
- <DrawerPortal>
35
- <DrawerOverlay v-if="showOverlay" />
36
- <DrawerContent
37
- v-bind="forwardedProps"
38
- :class="
39
- cn(
40
- 'unnnic-drawer__content',
41
- `unnnic-drawer__content--${props.size}`,
42
- props.class,
43
- )
44
- "
45
- :style="{ '--initial-transform': 'calc(100% + 8px)' }"
46
- >
47
- <slot />
48
- </DrawerContent>
49
- </DrawerPortal>
50
- </template>
51
-
52
- <style lang="scss" scoped>
53
- @use '@/assets/scss/unnnic' as *;
54
-
55
- $drawer-space: $unnnic-space-2;
56
-
57
- .unnnic-drawer__content {
58
- -webkit-user-select: unset;
59
- user-select: unset;
60
- will-change: unset;
61
-
62
- &::after {
63
- display: none;
64
- }
65
-
66
- position: fixed;
67
- top: $drawer-space;
68
- right: $drawer-space;
69
-
70
- display: flex;
71
- flex-direction: column;
72
-
73
- height: calc(100% - $drawer-space * 2);
74
-
75
- border-radius: $unnnic-radius-4;
76
- border: 1px solid $unnnic-color-border-soft;
77
- background-color: $unnnic-color-bg-base;
78
-
79
- &--medium {
80
- width: calc(100% / 3);
81
- }
82
-
83
- &--large {
84
- width: 50%;
85
- }
86
-
87
- &--extra-large {
88
- width: 66%;
89
- }
90
-
91
- &--giant {
92
- width: 75%;
93
- }
94
-
95
- &__body {
96
- overflow-y: auto;
97
- padding: $unnnic-space-6;
98
- flex: 1 0 0;
99
- }
100
- }
101
- </style>
@@ -1,40 +0,0 @@
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>
@@ -1,38 +0,0 @@
1
- <script lang="ts" setup>
2
- import { type HTMLAttributes } from 'vue';
3
- import { cn } from '@/lib/utils';
4
-
5
- defineOptions({
6
- name: 'UnnnicDrawerFooter',
7
- });
8
-
9
- const props = defineProps<{
10
- class?: HTMLAttributes['class'];
11
- }>();
12
- </script>
13
-
14
- <template>
15
- <footer :class="cn('unnnic-drawer__footer', props.class)">
16
- <slot />
17
- </footer>
18
- </template>
19
-
20
- <style lang="scss" scoped>
21
- @use '@/assets/scss/unnnic' as *;
22
-
23
- .unnnic-drawer__footer {
24
- border-top: 1px solid $unnnic-color-border-soft;
25
-
26
- margin-top: auto;
27
- padding: $unnnic-space-6;
28
-
29
- display: flex;
30
- justify-content: center;
31
- align-items: center;
32
- gap: $unnnic-space-2;
33
-
34
- > * {
35
- width: 100%;
36
- }
37
- }
38
- </style>
@@ -1,57 +0,0 @@
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
- defineOptions({
8
- name: 'UnnnicDrawerHeader',
9
- });
10
-
11
- const props = defineProps<{
12
- class?: HTMLAttributes['class'];
13
- }>();
14
- </script>
15
-
16
- <template>
17
- <header :class="cn('unnnic-drawer__header', props.class)">
18
- <slot />
19
-
20
- <template v-if="$slots.close">
21
- <slot
22
- name="close"
23
- class="unnnic-drawer__close-button"
24
- />
25
- </template>
26
- <template v-else>
27
- <DrawerClose>
28
- <UnnnicButton
29
- iconCenter="close"
30
- size="small"
31
- type="tertiary"
32
- class="unnnic-drawer__close-button"
33
- />
34
- </DrawerClose>
35
- </template>
36
- </header>
37
- </template>
38
-
39
- <style lang="scss" scoped>
40
- @use '@/assets/scss/unnnic' as *;
41
-
42
- .unnnic-drawer__header {
43
- display: grid;
44
- align-items: center;
45
- grid-template-columns: 1fr auto;
46
- padding: $unnnic-space-6;
47
-
48
- gap: $unnnic-space-1;
49
-
50
- border-bottom: 1px solid $unnnic-color-border-soft;
51
- }
52
-
53
- .unnnic-drawer__close-button {
54
- grid-column: 2 / 3;
55
- grid-row: 1 / 2;
56
- }
57
- </style>