@weni/unnnic-system 3.2.7 → 3.2.9-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 (222) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
  3. package/dist/components/Alert/Alert.vue.d.ts +18 -119
  4. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  5. package/dist/components/Alert/Version1dot1.vue.d.ts +2 -38
  6. package/dist/components/Alert/Version1dot1.vue.d.ts.map +1 -1
  7. package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +2 -2
  8. package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
  9. package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +5 -5
  10. package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +2 -2
  11. package/dist/components/Banner/Banner.vue.d.ts +1 -1
  12. package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
  13. package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
  14. package/dist/components/Button/Button.vue.d.ts +2 -2
  15. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  16. package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
  17. package/dist/components/Button/types.d.ts +1 -1
  18. package/dist/components/Button/types.d.ts.map +1 -1
  19. package/dist/components/Card/AccountCard.vue.d.ts +3 -3
  20. package/dist/components/Card/BlankCard.vue.d.ts +1 -1
  21. package/dist/components/Card/Card.vue.d.ts +21 -21
  22. package/dist/components/Card/CardCompany.vue.d.ts +8 -8
  23. package/dist/components/Card/CardData.vue.d.ts +1 -1
  24. package/dist/components/Card/CardStatusesContainer.vue.d.ts +4 -4
  25. package/dist/components/Card/ContentCard.vue.d.ts +2 -2
  26. package/dist/components/Card/DashCard.vue.d.ts +4 -4
  27. package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
  28. package/dist/components/Card/MarketplaceCard.vue.d.ts +2 -2
  29. package/dist/components/Card/SimpleCard.vue.d.ts +3 -3
  30. package/dist/components/Card/StatusCard.vue.d.ts +2 -2
  31. package/dist/components/Card/TitleCard.vue.d.ts +2 -2
  32. package/dist/components/CardImage/CardImage.vue.d.ts +8 -8
  33. package/dist/components/CardInformation/CardInformation.vue.d.ts +4 -4
  34. package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
  35. package/dist/components/Carousel/Carousel.vue.d.ts +11 -11
  36. package/dist/components/Carousel/TagCarousel.vue.d.ts +9 -9
  37. package/dist/components/ChartBar/ChartBar.vue.d.ts +8 -8
  38. package/dist/components/ChartLine/ChartLine.vue.d.ts +1 -1
  39. package/dist/components/ChatText/ChatText.vue.d.ts +2 -2
  40. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +15 -15
  41. package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
  42. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
  43. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
  44. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +5 -5
  45. package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
  46. package/dist/components/ChatsMessage/ChatsMessageText.vue.d.ts.map +1 -1
  47. package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
  48. package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
  49. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
  50. package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
  51. package/dist/components/Comment/Comment.vue.d.ts +1 -1
  52. package/dist/components/DataArea/DataArea.vue.d.ts +2 -2
  53. package/dist/components/DataTable/index.vue.d.ts +1 -1
  54. package/dist/components/DataTable/index.vue.d.ts.map +1 -1
  55. package/dist/components/DateFilter/DateFilter.vue.d.ts +182 -27
  56. package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
  57. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  58. package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
  59. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  60. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
  61. package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
  62. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
  63. package/dist/components/Flag.vue.d.ts +2 -2
  64. package/dist/components/FormElement/FormElement.vue.d.ts +38 -32
  65. package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
  66. package/dist/components/Icon.vue.d.ts +1 -1
  67. package/dist/components/Icon.vue.d.ts.map +1 -1
  68. package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
  69. package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
  70. package/dist/components/Input/BaseInput.vue.d.ts +10 -1
  71. package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
  72. package/dist/components/Input/Input.vue.d.ts +182 -27
  73. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  74. package/dist/components/Input/TextInput.vue.d.ts +31 -13
  75. package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
  76. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +192 -37
  77. package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
  78. package/dist/components/Label/Label.vue.d.ts +9 -15
  79. package/dist/components/Label/Label.vue.d.ts.map +1 -1
  80. package/dist/components/Modal/Modal.vue.d.ts +2 -2
  81. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +9 -9
  82. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  83. package/dist/components/ModalNext/ModalNext.vue.d.ts +190 -35
  84. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +14 -14
  85. package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
  86. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +7 -7
  87. package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
  88. package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
  89. package/dist/components/Radio/Radio.vue.d.ts +2 -2
  90. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +45 -27
  91. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +8 -8
  92. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +4 -4
  93. package/dist/components/SelectTime/index.vue.d.ts +31 -13
  94. package/dist/components/SkeletonLoading/skeletonTheme.vue.d.ts +1 -1
  95. package/dist/components/Slider/Slider.vue.d.ts +2 -2
  96. package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
  97. package/dist/components/Switch/Switch.vue.d.ts +2 -2
  98. package/dist/components/Tab/Tab.vue.d.ts +2 -2
  99. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  100. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  101. package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
  102. package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
  103. package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
  104. package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
  105. package/dist/components/Tag/Tag.vue.d.ts +8 -8
  106. package/dist/components/Tag/TagNext.vue.d.ts.map +1 -1
  107. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +9 -0
  108. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -0
  109. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +15 -0
  110. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +1 -0
  111. package/dist/components/TextArea/TextArea.vue.d.ts +38 -32
  112. package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
  113. package/dist/components/Toast/Toast.vue.d.ts +16 -0
  114. package/dist/components/Toast/Toast.vue.d.ts.map +1 -0
  115. package/dist/components/Toast/ToastManager.d.ts +14 -0
  116. package/dist/components/Toast/ToastManager.d.ts.map +1 -0
  117. package/dist/components/Toast/types.d.ts +35 -0
  118. package/dist/components/Toast/types.d.ts.map +1 -0
  119. package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
  120. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  121. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  122. package/dist/components/UploadArea/UploadArea.vue.d.ts +7 -7
  123. package/dist/components/index.d.ts +2116 -1064
  124. package/dist/components/index.d.ts.map +1 -1
  125. package/dist/{es-57bb200f.mjs → es-2735a8fb.js} +1 -1
  126. package/dist/{index-5f770b98.mjs → index-e012fa52.js} +8428 -8113
  127. package/dist/{pt-br-dc8f4568.mjs → pt-br-f38a8b9c.js} +1 -1
  128. package/dist/style.css +1 -1
  129. package/dist/unnnic.js +188 -0
  130. package/dist/{unnnic.umd.js → unnnic.umd.cjs} +42 -41
  131. package/dist/utils/call.d.ts +2 -1
  132. package/dist/utils/call.d.ts.map +1 -1
  133. package/package.json +10 -9
  134. package/src/assets/icons/script-to-convert-svg-to-vue.js +4 -7
  135. package/src/assets/img/previews/doc-preview.png +0 -0
  136. package/src/assets/img/previews/image-preview.png +0 -0
  137. package/src/assets/img/previews/video-preview.png +0 -0
  138. package/src/assets/scss/scheme-colors.scss +131 -4
  139. package/src/assets/tokens/colors.json +2 -2
  140. package/src/components/Alert/Alert.vue +26 -135
  141. package/src/components/Alert/Version1dot1.vue +0 -36
  142. package/src/components/AudioRecorder/AudioRecorder.vue +3 -2
  143. package/src/components/Button/Button.vue +61 -109
  144. package/src/components/Button/__tests__/Button.spec.js +2 -2
  145. package/src/components/Button/types.ts +1 -2
  146. package/src/components/Card/Card.vue +4 -1
  147. package/src/components/ChartMultiLine/Line/Line.vue +2 -1
  148. package/src/components/ChatsContact/ChatsContact.vue +1 -1
  149. package/src/components/ChatsHeader/ChatsHeader.vue +4 -2
  150. package/src/components/ChatsMessage/ChatsMessageText.vue +5 -5
  151. package/src/components/Chip/Chip.vue +62 -57
  152. package/src/components/Chip/__tests__/Chip.spec.js +18 -18
  153. package/src/components/DataTable/index.vue +8 -5
  154. package/src/components/DatePicker/DatePicker.vue +29 -16
  155. package/src/components/Drawer/Drawer.vue +4 -1
  156. package/src/components/Drawer/__tests__/Drawer.spec.js +9 -3
  157. package/src/components/DropArea/DropArea.vue +1 -1
  158. package/src/components/Dropdown/__tests__/Dropdown.spec.js +17 -17
  159. package/src/components/EmojiPicker/EmojiPicker.vue +57 -48
  160. package/src/components/EmojiPicker/__tests__/EmojiPicker.spec.js +84 -23
  161. package/src/components/Flag.vue +0 -1
  162. package/src/components/FormElement/FormElement.vue +52 -92
  163. package/src/components/Icon/types.ts +2 -2
  164. package/src/components/Icon.vue +3 -1
  165. package/src/components/Input/BaseInput.vue +10 -12
  166. package/src/components/Input/Input.scss +17 -20
  167. package/src/components/Input/Input.vue +96 -28
  168. package/src/components/Input/TextInput.vue +28 -41
  169. package/src/components/Input/__test__/TextInput.spec.js +5 -5
  170. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +12 -3
  171. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
  172. package/src/components/InputDatePicker/InputDatePicker.vue +1 -1
  173. package/src/components/Label/Label.vue +52 -21
  174. package/src/components/Label/__tests__/Label.spec.js +1 -1
  175. package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +1 -1
  176. package/src/components/ModalDialog/ModalDialog.vue +1 -0
  177. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
  178. package/src/components/ModalNext/ModalNext.vue +2 -2
  179. package/src/components/SelectSmart/SelectSmart.vue +15 -4
  180. package/src/components/SelectSmart/__tests__/SelectSmart.spec.js +2 -2
  181. package/src/components/Switch/__tests__/Switch.spec.js +6 -2
  182. package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
  183. package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
  184. package/src/components/Tag/TagNext.vue +2 -8
  185. package/src/components/TemplatePreview/TemplatePreview.vue +252 -0
  186. package/src/components/TemplatePreview/TemplatePreviewModal.vue +51 -0
  187. package/src/components/TemplatePreview/types.d.ts +16 -0
  188. package/src/components/TextArea/TextArea.vue +13 -9
  189. package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +7 -2
  190. package/src/components/Toast/Toast.vue +236 -0
  191. package/src/components/Toast/ToastManager.ts +110 -0
  192. package/src/components/Toast/types.ts +57 -0
  193. package/src/components/Tour/TourPopover.vue +1 -1
  194. package/src/components/__tests__/Icon.spec.js +2 -2
  195. package/src/components/index.ts +105 -91
  196. package/src/index.ts +1 -1
  197. package/src/main.ts +1 -1
  198. package/src/stories/Alert.stories.js +6 -67
  199. package/src/stories/Button.stories.js +3 -18
  200. package/src/stories/ChatsHeader.stories.js +1 -1
  201. package/src/stories/ChatsMessage.stories.js +0 -1
  202. package/src/stories/Chip.stories.js +7 -4
  203. package/src/stories/Input.stories.js +16 -3
  204. package/src/stories/Label.stories.js +7 -0
  205. package/src/stories/SelectSmart.stories.js +1 -1
  206. package/src/stories/TableNext.stories.js +1 -1
  207. package/src/stories/TemplatePreview.stories.js +94 -0
  208. package/src/stories/TemplatePreviewModal.stories.js +110 -0
  209. package/src/stories/Toast.mdx +123 -0
  210. package/src/stories/Toast.stories.js +126 -0
  211. package/src/types/index.d.ts +2 -2
  212. package/src/types/scheme-colors.d.ts +121 -16
  213. package/src/types/unnnic-utils.d.ts +87 -87
  214. package/src/types/vue-shims.d.ts +1 -1
  215. package/src/types/vueuse-overrides.d.ts +2 -2
  216. package/src/utils/call.js +46 -18
  217. package/src/utils/plugins/i18n.js +0 -1
  218. package/dist/unnnic.mjs +0 -182
  219. package/src/components/Alert/AlertBanner.vue +0 -182
  220. package/src/components/Alert/AlertCaller.vue +0 -49
  221. package/src/components/Alert/__tests__/AlertBanner.spec.js +0 -89
  222. package/src/components/Alert/__tests__/AlertCaller.spec.js +0 -98
@@ -0,0 +1,110 @@
1
+ import { createApp } from 'vue';
2
+ import Toast from './Toast.vue';
3
+ import type {
4
+ ToastProps,
5
+ ToastInstance,
6
+ ToastOptions,
7
+ ToastCall,
8
+ } from './types';
9
+
10
+ class ToastManager implements ToastManager {
11
+ private toasts: Map<string, ToastInstance> = new Map();
12
+ private container: HTMLElement | null = null;
13
+ private nextId = 0;
14
+
15
+ private createContainer(): HTMLElement {
16
+ if (this.container) {
17
+ return this.container;
18
+ }
19
+
20
+ this.container = document.createElement('div');
21
+ this.container.setAttribute('unnnic-toast-container', 'true');
22
+
23
+ document.body.appendChild(this.container);
24
+ return this.container;
25
+ }
26
+
27
+ private generateId(): string {
28
+ return `toast-${++this.nextId}`;
29
+ }
30
+
31
+ show(props: ToastProps): ToastInstance {
32
+ const id = this.generateId();
33
+ const container = this.createContainer();
34
+
35
+ const toastWrapper = document.createElement('div');
36
+
37
+ // Create promise that resolves when toast is destroyed
38
+ let resolvePromise: () => void;
39
+ const promise = new Promise<void>((resolve) => {
40
+ resolvePromise = resolve;
41
+ });
42
+
43
+ const app = createApp(Toast, {
44
+ ...props,
45
+ onClose: () => {
46
+ this.close(id);
47
+ },
48
+ onDestroy: () => {
49
+ app.unmount();
50
+ toastWrapper.remove();
51
+ resolvePromise(); // Resolve the promise when toast is destroyed
52
+ },
53
+ });
54
+
55
+ app.mount(toastWrapper);
56
+ container.appendChild(toastWrapper);
57
+
58
+ const toastInstance: ToastInstance = {
59
+ id,
60
+ props,
61
+ close: () => this.close(id),
62
+ promise,
63
+ };
64
+
65
+ this.toasts.set(id, toastInstance);
66
+ return toastInstance;
67
+ }
68
+
69
+ close(id: string): void {
70
+ const toast = this.toasts.get(id);
71
+ if (toast) {
72
+ this.toasts.delete(id);
73
+ }
74
+ }
75
+ }
76
+
77
+ const toastManager = new ToastManager();
78
+
79
+ export const toast: ToastCall = {
80
+ info: (title: string, description?: string, options?: ToastOptions) =>
81
+ toastManager.show({
82
+ title,
83
+ description,
84
+ ...options,
85
+ type: 'informational',
86
+ }).promise,
87
+ success: (title: string, description?: string, options?: ToastOptions) =>
88
+ toastManager.show({
89
+ title,
90
+ description,
91
+ ...options,
92
+ type: 'success',
93
+ }).promise,
94
+ attention: (title: string, description?: string, options?: ToastOptions) =>
95
+ toastManager.show({
96
+ title,
97
+ description,
98
+ ...options,
99
+ type: 'attention',
100
+ }).promise,
101
+ error: (title: string, description?: string, options?: ToastOptions) =>
102
+ toastManager.show({
103
+ title,
104
+ description,
105
+ ...options,
106
+ type: 'error',
107
+ }).promise,
108
+ };
109
+
110
+ export default toastManager;
@@ -0,0 +1,57 @@
1
+ export interface ToastManager {
2
+ show: (props: ToastProps) => ToastInstance;
3
+ close: (id: string) => void;
4
+ }
5
+
6
+ export interface ToastButton {
7
+ text: string;
8
+ action: () => void;
9
+ }
10
+
11
+ export type ToastType = 'informational' | 'attention' | 'success' | 'error';
12
+
13
+ export interface ToastProps extends ToastOptions {
14
+ title: string;
15
+ description?: string;
16
+ }
17
+
18
+ export interface ToastOptions {
19
+ type?: ToastType;
20
+ button?: ToastButton;
21
+ timeout?: number;
22
+ }
23
+
24
+ export interface ToastEmits {
25
+ close: [];
26
+ destroy: [];
27
+ }
28
+
29
+ export interface ToastInstance {
30
+ id: string;
31
+ props: ToastProps;
32
+ close: () => void;
33
+ promise: Promise<void>;
34
+ }
35
+
36
+ export interface ToastCall {
37
+ info: (
38
+ title: string,
39
+ description?: string,
40
+ options?: ToastOptions,
41
+ ) => Promise<void>;
42
+ success: (
43
+ title: string,
44
+ description?: string,
45
+ options?: ToastOptions,
46
+ ) => Promise<void>;
47
+ attention: (
48
+ title: string,
49
+ description?: string,
50
+ options?: ToastOptions,
51
+ ) => Promise<void>;
52
+ error: (
53
+ title: string,
54
+ description?: string,
55
+ options?: ToastOptions,
56
+ ) => Promise<void>;
57
+ }
@@ -128,7 +128,7 @@ export default {
128
128
  left: attachedTop - popoverHeight / 2 + attachedHeight / 2,
129
129
  };
130
130
 
131
- let style = {
131
+ const style = {
132
132
  transform: `translate(${translateXMap[step.popoverPosition]}px, ${translateYMap[step.popoverPosition]}px)`,
133
133
  transition: 'transform .3s ease',
134
134
  };
@@ -35,8 +35,8 @@ const commonTests = async (wrapper) => {
35
35
  describe('Icon', () => {
36
36
  it('should accept valid lineHeight props', () => {
37
37
  const validValues = ['sm', 'md', 'lg', null];
38
-
39
- validValues.forEach(value => {
38
+
39
+ validValues.forEach((value) => {
40
40
  const wrapper = createWrapper({ lineHeight: value });
41
41
  expect(wrapper.exists()).toBe(true);
42
42
  });
@@ -1,95 +1,99 @@
1
- import type { Component } from "vue";
2
- import { unnnicFontSize as fontSize } from "./config";
3
- import formElement from "./FormElement/FormElement.vue";
4
- import input from "./Input/Input.vue";
5
- import inputNext from "./InputNext/InputNext.vue";
6
- import inputDatePicker from "./InputDatePicker/InputDatePicker.vue";
7
- import button from "./Button/Button.vue";
8
- import buttonIcon from "./Button/ButtonIcon.vue";
9
- import sidebar from "./Sidebar/index.vue";
10
- import sidebarItem from "./Sidebar/SidebarItem.vue";
11
- import table from "./Table/Table.vue";
12
- import tableRow from "./Table/TableRow.vue";
13
- import dropdown from "./Dropdown/Dropdown.vue";
14
- import dropdownItem from "./Dropdown/DropdownItem.vue";
15
- import avatarIcon from "./AvatarIcon/AvatarIcon.vue";
16
- import icon from "./Icon.vue";
17
- import iconLoading from "./IconLoading/IconLoading.vue";
18
- import toolTip from "./ToolTip/ToolTip.vue";
19
- import card from "./Card/Card.vue";
20
- import cardSimple from "./Card/SimpleCard.vue";
21
- import cardCompany from "./Card/CardCompany.vue";
22
- import cardData from "./Card/CardData.vue";
23
- import cardImage from "./CardImage/CardImage.vue";
1
+ import type { Component } from 'vue';
2
+ import { unnnicFontSize as fontSize } from './config';
3
+ import formElement from './FormElement/FormElement.vue';
4
+ import input from './Input/Input.vue';
5
+ import inputNext from './InputNext/InputNext.vue';
6
+ import inputDatePicker from './InputDatePicker/InputDatePicker.vue';
7
+ import button from './Button/Button.vue';
8
+ import buttonIcon from './Button/ButtonIcon.vue';
9
+ import sidebar from './Sidebar/index.vue';
10
+ import sidebarItem from './Sidebar/SidebarItem.vue';
11
+ import table from './Table/Table.vue';
12
+ import tableRow from './Table/TableRow.vue';
13
+ import dropdown from './Dropdown/Dropdown.vue';
14
+ import dropdownItem from './Dropdown/DropdownItem.vue';
15
+ import avatarIcon from './AvatarIcon/AvatarIcon.vue';
16
+ import icon from './Icon.vue';
17
+ import iconLoading from './IconLoading/IconLoading.vue';
18
+ import toolTip from './ToolTip/ToolTip.vue';
19
+ import card from './Card/Card.vue';
20
+ import cardSimple from './Card/SimpleCard.vue';
21
+ import cardCompany from './Card/CardCompany.vue';
22
+ import cardData from './Card/CardData.vue';
23
+ import cardImage from './CardImage/CardImage.vue';
24
24
  // import cardFlow from './CardFlow/CardFlow.vue';
25
- import cardProject from "./CardProject/CardProject.vue";
26
- import cardInformation from "./CardInformation/CardInformation.vue";
27
- import checkbox from "./Checkbox/Checkbox.vue";
28
- import collapse from "./Collapse/Collapse.vue";
29
- import radio from "./Radio/Radio.vue";
30
- import languageSelect from "./Dropdown/LanguageSelect.vue";
31
- import modal from "./Modal/Modal.vue";
32
- import modalUpload from "./ModalUpload/ModalUpload.vue";
33
- import { callAlert, callModal } from "../utils/call";
34
- import selectSmart from "./SelectSmart/SelectSmart.vue";
25
+ import cardProject from './CardProject/CardProject.vue';
26
+ import cardInformation from './CardInformation/CardInformation.vue';
27
+ import checkbox from './Checkbox/Checkbox.vue';
28
+ import collapse from './Collapse/Collapse.vue';
29
+ import radio from './Radio/Radio.vue';
30
+ import languageSelect from './Dropdown/LanguageSelect.vue';
31
+ import modal from './Modal/Modal.vue';
32
+ import modalUpload from './ModalUpload/ModalUpload.vue';
33
+ import { callAlert, callModal } from '../utils/call';
34
+ import selectSmart from './SelectSmart/SelectSmart.vue';
35
35
  // import select from './Select/Select.vue';
36
- import selectItem from "./Select/SelectItem.vue";
36
+ import selectItem from './Select/SelectItem.vue';
37
37
  // import selectListItem from './SelectListItem/SelectListItem.vue';
38
- import multiSelect from "./MultiSelect/MultiSelect.vue";
39
- import alert from "./Alert/Alert.vue";
38
+ import multiSelect from './MultiSelect/MultiSelect.vue';
39
+ import alert from './Alert/Alert.vue';
40
40
  // import autocomplete from './Input/Autocomplete.vue';
41
41
  // import autocompleteSelect from './AutocompleteSelect/AutocompleteSelect.vue';
42
- import tag from "./Tag/Tag.vue";
43
- import accordion from "./Accordion/Accordion.vue";
44
- import indicator from "./Indicator/Indicator.vue";
45
- import skeletonLoading from "./SkeletonLoading/SkeletonLoading.vue"; // TODO: Unbreak this component
46
- import carousel from "./Carousel/Carousel.vue";
47
- import label from "./Label/Label.vue";
48
- import tab from "./Tab/Tab.vue";
49
- import tabsExpanded from "./TabsExpanded/TabsExpanded.vue";
50
- import banner from "./Banner/Banner.vue";
51
- import comment from "./Comment/Comment.vue";
52
- import datePicker from "./DatePicker/DatePicker.vue";
53
- import breadcrumb from "./Breadcrumb/Breadcrumb.vue";
54
- import Switch from "./Switch/Switch.vue";
55
- import Slider from "./Slider/Slider.vue";
56
- import DataArea from "./DataArea/DataArea.vue";
57
- import Pagination from "./Pagination/Pagination.vue";
58
- import DropArea from "./DropArea/DropArea.vue";
59
- import UploadArea from "./UploadArea/UploadArea.vue";
60
- import ImportCard from "./ImportCard/ImportCard.vue";
61
- import DateFilter from "./DateFilter/DateFilter.vue";
62
- import ChatText from "./ChatText/ChatText.vue";
63
- import TextArea from "./TextArea/TextArea.vue";
64
- import CardNumber from "./CardNumber/CardNumber.vue";
65
- import chartRainbow from "./ChartRainbow/ChartRainbow.vue";
66
- import chartBar from "./ChartBar/ChartBar.vue";
67
- import chartLine from "./ChartLine/ChartLine.vue";
68
- import moodRating from "./MoodRating/MoodRating.vue";
69
- import starRating from "./StarRating/StarRating.vue";
70
- import audioRecorder from "./AudioRecorder/AudioRecorder.vue";
71
- import circleProgressBar from "./CircleProgressBar/CircleProgressBar.vue";
72
- import progressBar from "./ProgressBar/ProgressBar.vue";
73
- import ChatsContact from "./ChatsContact/ChatsContact.vue";
74
- import ChatsDashboardTagLive from "./ChatsDashboardTagLive/ChatsDashboardTagLive.vue";
75
- import ChatsHeader from "./ChatsHeader/ChatsHeader.vue";
76
- import ChatsMessage from "./ChatsMessage/ChatsMessage.vue";
77
- import ReplyMessage from "./ChatsMessage/ReplyMessage.vue";
78
- import ChatsNavbar from "./ChatsNavbar/ChatsNavbar.vue";
79
- import ChatsUserAvatar from "./ChatsUserAvatar/ChatsUserAvatar.vue";
80
- import ChartMultiLine from "./ChartMultiLine/ChartMultiLine.vue";
81
- import EmojiPicker from "./EmojiPicker/EmojiPicker.vue";
82
- import ChartFunnel from "./ChartFunnel/ChartFunnel.vue";
83
- import Disclaimer from "./Disclaimer/Disclaimer.vue";
84
- import Drawer from "./Drawer/Drawer.vue";
85
- import TableNext from "./TableNext/TableNext.vue";
86
- import ModalNext from "./ModalNext/ModalNext.vue";
87
- import ModalDialog from "./ModalDialog/ModalDialog.vue";
88
- import Tour from "./Tour/Tour.vue";
89
- import Navigator from "./Navigator/index.vue";
90
- import SelectTime from "./SelectTime/index.vue";
91
- import DataTable from "./DataTable/index.vue";
92
- import Chip from "./Chip/Chip.vue";
42
+ import tag from './Tag/Tag.vue';
43
+ import accordion from './Accordion/Accordion.vue';
44
+ import indicator from './Indicator/Indicator.vue';
45
+ import skeletonLoading from './SkeletonLoading/SkeletonLoading.vue'; // TODO: Unbreak this component
46
+ import carousel from './Carousel/Carousel.vue';
47
+ import label from './Label/Label.vue';
48
+ import tab from './Tab/Tab.vue';
49
+ import tabsExpanded from './TabsExpanded/TabsExpanded.vue';
50
+ import banner from './Banner/Banner.vue';
51
+ import comment from './Comment/Comment.vue';
52
+ import datePicker from './DatePicker/DatePicker.vue';
53
+ import breadcrumb from './Breadcrumb/Breadcrumb.vue';
54
+ import Switch from './Switch/Switch.vue';
55
+ import Slider from './Slider/Slider.vue';
56
+ import DataArea from './DataArea/DataArea.vue';
57
+ import Pagination from './Pagination/Pagination.vue';
58
+ import DropArea from './DropArea/DropArea.vue';
59
+ import UploadArea from './UploadArea/UploadArea.vue';
60
+ import ImportCard from './ImportCard/ImportCard.vue';
61
+ import DateFilter from './DateFilter/DateFilter.vue';
62
+ import ChatText from './ChatText/ChatText.vue';
63
+ import TextArea from './TextArea/TextArea.vue';
64
+ import CardNumber from './CardNumber/CardNumber.vue';
65
+ import chartRainbow from './ChartRainbow/ChartRainbow.vue';
66
+ import chartBar from './ChartBar/ChartBar.vue';
67
+ import chartLine from './ChartLine/ChartLine.vue';
68
+ import moodRating from './MoodRating/MoodRating.vue';
69
+ import starRating from './StarRating/StarRating.vue';
70
+ import audioRecorder from './AudioRecorder/AudioRecorder.vue';
71
+ import circleProgressBar from './CircleProgressBar/CircleProgressBar.vue';
72
+ import progressBar from './ProgressBar/ProgressBar.vue';
73
+ import ChatsContact from './ChatsContact/ChatsContact.vue';
74
+ import ChatsDashboardTagLive from './ChatsDashboardTagLive/ChatsDashboardTagLive.vue';
75
+ import ChatsHeader from './ChatsHeader/ChatsHeader.vue';
76
+ import ChatsMessage from './ChatsMessage/ChatsMessage.vue';
77
+ import ReplyMessage from './ChatsMessage/ReplyMessage.vue';
78
+ import ChatsNavbar from './ChatsNavbar/ChatsNavbar.vue';
79
+ import ChatsUserAvatar from './ChatsUserAvatar/ChatsUserAvatar.vue';
80
+ import ChartMultiLine from './ChartMultiLine/ChartMultiLine.vue';
81
+ import EmojiPicker from './EmojiPicker/EmojiPicker.vue';
82
+ import ChartFunnel from './ChartFunnel/ChartFunnel.vue';
83
+ import Disclaimer from './Disclaimer/Disclaimer.vue';
84
+ import Drawer from './Drawer/Drawer.vue';
85
+ import TableNext from './TableNext/TableNext.vue';
86
+ import ModalNext from './ModalNext/ModalNext.vue';
87
+ import ModalDialog from './ModalDialog/ModalDialog.vue';
88
+ import Tour from './Tour/Tour.vue';
89
+ import Navigator from './Navigator/index.vue';
90
+ import SelectTime from './SelectTime/index.vue';
91
+ import TemplatePreview from './TemplatePreview/TemplatePreview.vue';
92
+ import TemplatePreviewModal from './TemplatePreview/TemplatePreviewModal.vue';
93
+ import DataTable from './DataTable/index.vue';
94
+ import Chip from './Chip/Chip.vue';
95
+ import Toast from './Toast/Toast.vue';
96
+ import { toast } from './Toast/ToastManager';
93
97
 
94
98
  type VueComponent = Component;
95
99
 
@@ -188,8 +192,12 @@ export const components: ComponentsMap = {
188
192
  unnnicTour: Tour,
189
193
  unnnicNavigator: Navigator,
190
194
  unnnicSelectTime: SelectTime,
195
+ unnnicTemplatePreview: TemplatePreview,
196
+ unnnicTemplatePreviewModal: TemplatePreviewModal,
191
197
  unnnicDataTable: DataTable,
192
198
  unnnicChip: Chip,
199
+ unnnicToast: Toast,
200
+ unnnicToastManager: toast,
193
201
  };
194
202
 
195
203
  export const unnnicFontSize = fontSize;
@@ -241,7 +249,7 @@ export const unnnicAccordion = accordion;
241
249
  export const unnnicIndicator = indicator;
242
250
  export const unnnicSkeletonLoading = skeletonLoading;
243
251
  export const unnnicCarousel = carousel;
244
- export const unnnicLabel = label;
252
+ export const unnnicLabel = label as VueComponent;
245
253
  export const unnnicTab = tab;
246
254
  export const unnnicTabsExpanded = tabsExpanded;
247
255
  export const unnnicBanner = banner;
@@ -282,8 +290,10 @@ export const unnnicDrawer = Drawer;
282
290
  export const unnnicTableNext = TableNext;
283
291
  export const unnnicTour = Tour;
284
292
  export const unnnicNavigator = Navigator;
285
- export const unnnicDataTable = DataTable as VueComponent;
286
293
  export const unnnicSelectTime = SelectTime as VueComponent;
294
+ export const unnnicTemplatePreview = TemplatePreview as VueComponent;
295
+ export const unnnicTemplatePreviewModal = TemplatePreviewModal as VueComponent;
296
+ export const unnnicDataTable = DataTable as VueComponent;
287
297
  export const unnnicChip = Chip;
288
298
 
289
299
  export const UnnnicFontSize = fontSize;
@@ -335,7 +345,7 @@ export const UnnnicAccordion = accordion;
335
345
  export const UnnnicIndicator = indicator;
336
346
  export const UnnnicSkeletonLoading = skeletonLoading;
337
347
  export const UnnnicCarousel = carousel;
338
- export const UnnnicLabel = label;
348
+ export const UnnnicLabel = label as VueComponent;
339
349
  export const UnnnicTab = tab;
340
350
  export const UnnnicTabsExpanded = tabsExpanded;
341
351
  export const UnnnicBanner = banner;
@@ -376,6 +386,10 @@ export const UnnnicDrawer = Drawer;
376
386
  export const UnnnicTableNext = TableNext;
377
387
  export const UnnnicTour = Tour;
378
388
  export const UnnnicNavigator = Navigator;
379
- export const UnnnicDataTable = DataTable as VueComponent;
380
389
  export const UnnnicSelectTime = SelectTime as VueComponent;
390
+ export const UnnnicTemplatePreview = TemplatePreview as VueComponent;
391
+ export const UnnnicTemplatePreviewModal = TemplatePreviewModal as VueComponent;
392
+ export const UnnnicDataTable = DataTable as VueComponent;
381
393
  export const UnnnicChip = Chip;
394
+ export const UnnnicToast = Toast;
395
+ export const UnnnicToastManager = toast;
package/src/index.ts CHANGED
@@ -16,4 +16,4 @@ const Unnnic: UnnnicPlugin = {
16
16
  };
17
17
 
18
18
  export default Unnnic;
19
- export * from '@/components';
19
+ export * from '@/components';
package/src/main.ts CHANGED
@@ -5,4 +5,4 @@ import Unnnic from './index';
5
5
  const app = createApp(App);
6
6
 
7
7
  app.use(Unnnic);
8
- app.mount('#app');
8
+ app.mount('#app');
@@ -1,7 +1,5 @@
1
- import AlertCaller from '../components/Alert/AlertCaller.vue';
2
1
  import alert from '../utils/call';
3
2
  import UnnnicAlert from '../components/Alert/Alert.vue';
4
- import AlertBanner from '../components/Alert/AlertBanner.vue';
5
3
 
6
4
  export default {
7
5
  title: 'Feedback/Alert',
@@ -20,9 +18,6 @@ export default {
20
18
  args: {
21
19
  type: 'default',
22
20
  text: 'Text',
23
- linkHref: '',
24
- linkText: '',
25
- linkTarget: '',
26
21
  },
27
22
  argTypes: {
28
23
  type: {
@@ -37,42 +32,15 @@ export default {
37
32
  type: 'text',
38
33
  },
39
34
  },
40
-
41
- linkHref: {
42
- control: {
43
- type: 'text',
44
- },
45
- },
46
-
47
- linkText: {
48
- control: {
49
- type: 'text',
50
- },
51
- },
52
-
53
- linkTarget: {
35
+ version: {
54
36
  control: {
55
- type: 'text',
37
+ type: 'select',
56
38
  },
57
- },
58
- position: {
59
- if: { arg: 'version' },
60
- },
61
- version: {
62
- control: false,
39
+ options: ['1.1', '2.0'],
63
40
  },
64
41
  title: {
65
42
  if: { arg: 'version' },
66
43
  },
67
- icon: {
68
- if: { arg: 'version' },
69
- },
70
- closeText: {
71
- if: { arg: 'version' },
72
- },
73
- scheme: {
74
- if: { arg: 'version' },
75
- },
76
44
  },
77
45
  };
78
46
 
@@ -95,7 +63,7 @@ export const Normal = {
95
63
  },
96
64
  },
97
65
  render: (args) => ({
98
- components: { AlertCaller, UnnnicAlert },
66
+ components: { UnnnicAlert },
99
67
  setup() {
100
68
  return { args };
101
69
  },
@@ -117,7 +85,7 @@ export const Normal = {
117
85
 
118
86
  export const InlineComponent = {
119
87
  render: (args) => ({
120
- components: { AlertCaller, UnnnicAlert },
88
+ components: { UnnnicAlert },
121
89
  setup() {
122
90
  return { args };
123
91
  },
@@ -166,7 +134,7 @@ export const WithContainerRef = {
166
134
  },
167
135
  },
168
136
  render: (args) => ({
169
- components: { AlertCaller, UnnnicAlert },
137
+ components: { UnnnicAlert },
170
138
  setup() {
171
139
  return { args };
172
140
  },
@@ -190,32 +158,3 @@ export const WithContainerRef = {
190
158
  scheme: 'feedback-green',
191
159
  },
192
160
  };
193
-
194
- export const Banner = {
195
- parameters: {
196
- docs: {
197
- description: {
198
- story: `This variation has the additional prop ${'`showCloseButton`'}, false by default.`,
199
- },
200
- },
201
- },
202
- render: (args) => ({
203
- components: { AlertBanner },
204
- setup() {
205
- return { args };
206
- },
207
- methods: {
208
- unnnicCallAlert() {
209
- alert.callAlert({
210
- props: this.args,
211
- containerRef: this.$refs.divContainer,
212
- });
213
- },
214
- },
215
- template: '<alert-banner v-bind="args" />',
216
- }),
217
- args: {
218
- text: 'Text',
219
- showCloseButton: false,
220
- },
221
- };
@@ -8,7 +8,7 @@ export default {
8
8
  description: {
9
9
  component: `Allows users to perform an action or navigate to another page.
10
10
  It has styles for various needs and are ideal for directing the user's attention.
11
- It is divided into 6 types: Primary, Secondary, Tertiary, Alternative, Warning, Attention.
11
+ It is divided into 5 types: Primary, Secondary, Tertiary, Warning, Attention.
12
12
  Each of these types has its states.
13
13
  <br/>
14
14
  <br/>
@@ -36,14 +36,7 @@ export default {
36
36
  argTypes: {
37
37
  type: {
38
38
  control: { type: 'select' },
39
- options: [
40
- 'primary',
41
- 'secondary',
42
- 'tertiary',
43
- 'alternative',
44
- 'warning',
45
- 'attention',
46
- ],
39
+ options: ['primary', 'secondary', 'tertiary', 'warning', 'attention'],
47
40
  },
48
41
  size: {
49
42
  control: { type: 'select' },
@@ -104,7 +97,7 @@ export const FilledIcon = {
104
97
  args: {
105
98
  text: 'Button Text',
106
99
  iconLeft: 'play_arrow',
107
- iconsFilled: true,
100
+ iconsFilled: true,
108
101
  },
109
102
  };
110
103
 
@@ -114,14 +107,6 @@ export const OnlyIcon = {
114
107
  },
115
108
  };
116
109
 
117
- export const Alternative = {
118
- args: {
119
- type: 'alternative',
120
- iconLeft: 'add',
121
- text: 'Text',
122
- },
123
- };
124
-
125
110
  export const Warning = {
126
111
  parameters: {
127
112
  docs: {
@@ -51,7 +51,7 @@ export const ContactRightSlot = {
51
51
  </template>
52
52
  </UnnnicChatsHeader>`,
53
53
  }),
54
- }
54
+ };
55
55
 
56
56
  export const Dashboard = {
57
57
  args: {
@@ -103,7 +103,6 @@ export default {
103
103
 
104
104
  export const Default = { args: {} };
105
105
 
106
-
107
106
  export const Automatic = {
108
107
  args: {
109
108
  automatic: true,
@@ -25,7 +25,8 @@ export default {
25
25
  type: {
26
26
  control: { type: 'select' },
27
27
  options: ['single', 'multiple'],
28
- description: 'The type of chip - single for basic display, multiple for selection with icons',
28
+ description:
29
+ 'The type of chip - single for basic display, multiple for selection with icons',
29
30
  },
30
31
  text: {
31
32
  control: { type: 'text' },
@@ -33,7 +34,8 @@ export default {
33
34
  },
34
35
  isSelected: {
35
36
  control: { type: 'boolean' },
36
- description: 'Whether the chip is in selected state (affects styling and icons)',
37
+ description:
38
+ 'Whether the chip is in selected state (affects styling and icons)',
37
39
  },
38
40
  count: {
39
41
  control: { type: 'number' },
@@ -41,7 +43,8 @@ export default {
41
43
  },
42
44
  isClickable: {
43
45
  control: { type: 'boolean' },
44
- description: 'Whether the chip should show clickable styling (cursor pointer)',
46
+ description:
47
+ 'Whether the chip should show clickable styling (cursor pointer)',
45
48
  },
46
49
  },
47
50
  };
@@ -170,4 +173,4 @@ export const Interactive = {
170
173
  />
171
174
  `,
172
175
  }),
173
- };
176
+ };