@weni/unnnic-system 3.2.9-alpha.9 → 3.2.9
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.
- package/CHANGELOG.md +2 -11
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +119 -18
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/Alert/Version1dot1.vue.d.ts +38 -2
- package/dist/components/Alert/Version1dot1.vue.d.ts.map +1 -1
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +2 -2
- package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +5 -5
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +2 -2
- package/dist/components/Banner/Banner.vue.d.ts +1 -1
- package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +2 -2
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
- package/dist/components/Button/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/AccountCard.vue.d.ts +3 -3
- package/dist/components/Card/BlankCard.vue.d.ts +1 -1
- package/dist/components/Card/Card.vue.d.ts +21 -21
- package/dist/components/Card/CardCompany.vue.d.ts +8 -8
- package/dist/components/Card/CardData.vue.d.ts +1 -1
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +4 -4
- package/dist/components/Card/ContentCard.vue.d.ts +2 -2
- package/dist/components/Card/DashCard.vue.d.ts +4 -4
- package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
- package/dist/components/Card/MarketplaceCard.vue.d.ts +2 -2
- package/dist/components/Card/SimpleCard.vue.d.ts +3 -3
- package/dist/components/Card/StatusCard.vue.d.ts +2 -2
- package/dist/components/Card/TitleCard.vue.d.ts +2 -2
- package/dist/components/CardImage/CardImage.vue.d.ts +8 -8
- package/dist/components/CardInformation/CardInformation.vue.d.ts +4 -4
- package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
- package/dist/components/Carousel/Carousel.vue.d.ts +11 -11
- package/dist/components/Carousel/TagCarousel.vue.d.ts +9 -9
- package/dist/components/ChartBar/ChartBar.vue.d.ts +8 -8
- package/dist/components/ChartLine/ChartLine.vue.d.ts +1 -1
- package/dist/components/ChatText/ChatText.vue.d.ts +2 -2
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +15 -15
- package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +5 -5
- package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
- package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/Comment/Comment.vue.d.ts +1 -1
- package/dist/components/DataArea/DataArea.vue.d.ts +2 -2
- package/dist/components/DataTable/index.vue.d.ts +1 -8
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +27 -149
- package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
- package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
- package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
- package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
- package/dist/components/Flag.vue.d.ts +2 -2
- package/dist/components/FormElement/FormElement.vue.d.ts +32 -38
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
- package/dist/components/Input/BaseInput.vue.d.ts +1 -28
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +27 -149
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +13 -67
- package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +37 -159
- package/dist/components/InputNext/InputNext.vue.d.ts +4 -4
- package/dist/components/Label/Label.vue.d.ts +15 -9
- package/dist/components/Label/Label.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +2 -2
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +9 -9
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +35 -157
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +14 -14
- package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +7 -7
- package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Radio/Radio.vue.d.ts +2 -2
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +27 -81
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +8 -8
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +4 -4
- package/dist/components/SelectTime/index.vue.d.ts +13 -67
- package/dist/components/SkeletonLoading/skeletonTheme.vue.d.ts +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +2 -2
- package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +2 -2
- package/dist/components/Tab/Tab.vue.d.ts +2 -13
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
- package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
- package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
- package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
- package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
- package/dist/components/Tag/Tag.vue.d.ts +8 -8
- package/dist/components/TextArea/TextArea.vue.d.ts +32 -38
- package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
- package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +6 -6
- package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
- package/dist/components/UploadArea/UploadArea.vue.d.ts +7 -7
- package/dist/components/index.d.ts +1079 -1889
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-d6005598.js → es-1ca6f2cf.mjs} +1 -1
- package/dist/{index-35640dc9.js → index-ca7d12b1.mjs} +8407 -8738
- package/dist/locales/en.json.d.ts +1 -2
- package/dist/locales/es.json.d.ts +1 -2
- package/dist/locales/pt_br.json.d.ts +1 -2
- package/dist/{pt-br-89c2c09d.js → pt-br-2d5000b1.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +182 -0
- package/dist/unnnic.umd.js +109 -0
- package/dist/utils/call.d.ts +1 -2
- package/dist/utils/call.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/assets/scss/scheme-colors.scss +4 -131
- package/src/assets/tokens/colors.json +2 -2
- package/src/components/Alert/Alert.vue +135 -26
- package/src/components/Alert/AlertBanner.vue +182 -0
- package/src/components/Alert/AlertCaller.vue +49 -0
- package/src/components/Alert/Version1dot1.vue +36 -0
- package/src/components/Alert/__tests__/AlertBanner.spec.js +89 -0
- package/src/components/Alert/__tests__/AlertCaller.spec.js +98 -0
- package/src/components/Alert/__tests__/__snapshots__/Alert.spec.js.snap +7 -11
- package/src/components/Alert/__tests__/__snapshots__/Version1dot1.spec.js.snap +2 -2
- package/src/components/Button/Button.vue +108 -60
- package/src/components/Button/types.ts +1 -0
- package/src/components/DataTable/index.vue +10 -25
- package/src/components/FormElement/FormElement.vue +91 -51
- package/src/components/Input/BaseInput.vue +14 -22
- package/src/components/Input/Input.scss +21 -19
- package/src/components/Input/Input.vue +29 -85
- package/src/components/Input/TextInput.vue +42 -39
- package/src/components/Input/__test__/TextInput.spec.js +5 -5
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +3 -12
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/Label/Label.vue +21 -52
- package/src/components/Label/__tests__/Label.spec.js +1 -1
- package/src/components/Label/__tests__/__snapshots__/Label.spec.js.snap +1 -1
- package/src/components/ModalDialog/ModalDialog.vue +0 -1
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
- package/src/components/Tab/Tab.vue +23 -37
- package/src/components/Tab/__test__/__snapshots__/Tab.spec.js.snap +1 -1
- package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
- package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
- package/src/components/TextArea/TextArea.vue +9 -13
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +2 -7
- package/src/components/index.ts +4 -18
- package/src/locales/en.json +1 -2
- package/src/locales/es.json +1 -2
- package/src/locales/pt_br.json +1 -2
- package/src/stories/Alert.stories.js +67 -6
- package/src/stories/Button.stories.js +17 -2
- package/src/stories/DataTable.stories.js +0 -60
- package/src/stories/Input.stories.js +3 -16
- package/src/stories/Label.stories.js +0 -7
- package/src/stories/Tab.stories.js +4 -11
- package/src/types/scheme-colors.d.ts +14 -120
- package/src/utils/call.js +18 -46
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +0 -9
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +0 -1
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +0 -15
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +0 -1
- package/dist/components/Toast/Toast.vue.d.ts +0 -16
- package/dist/components/Toast/Toast.vue.d.ts.map +0 -1
- package/dist/components/Toast/ToastManager.d.ts +0 -14
- package/dist/components/Toast/ToastManager.d.ts.map +0 -1
- package/dist/components/Toast/types.d.ts +0 -35
- package/dist/components/Toast/types.d.ts.map +0 -1
- package/dist/unnnic.js +0 -188
- package/dist/unnnic.umd.cjs +0 -110
- package/src/assets/img/previews/doc-preview.png +0 -0
- package/src/assets/img/previews/image-preview.png +0 -0
- package/src/assets/img/previews/video-preview.png +0 -0
- package/src/components/Popover/__tests__/Popover.spec.js +0 -147
- package/src/components/Popover/__tests__/__snapshots__/Popover.spec.js.snap +0 -8
- package/src/components/Popover/index.vue +0 -146
- package/src/components/Select/SelectOption.vue +0 -65
- package/src/components/Select/__tests__/Select.spec.js +0 -412
- package/src/components/Select/__tests__/SelectItem.spec.js +0 -330
- package/src/components/Select/__tests__/SelectOption.spec.js +0 -174
- package/src/components/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -93
- package/src/components/Select/__tests__/__snapshots__/SelectItem.spec.js.snap +0 -15
- package/src/components/Select/__tests__/__snapshots__/SelectOption.spec.js.snap +0 -25
- package/src/components/Select/index.vue +0 -243
- package/src/components/TemplatePreview/TemplatePreview.vue +0 -252
- package/src/components/TemplatePreview/TemplatePreviewModal.vue +0 -51
- package/src/components/TemplatePreview/types.d.ts +0 -16
- package/src/components/Toast/Toast.vue +0 -236
- package/src/components/Toast/ToastManager.ts +0 -110
- package/src/components/Toast/types.ts +0 -57
- package/src/stories/Popover.stories.js +0 -39
- package/src/stories/Select.stories.js +0 -91
- package/src/stories/TemplatePreview.stories.js +0 -94
- package/src/stories/TemplatePreviewModal.stories.js +0 -110
- package/src/stories/Toast.mdx +0 -123
- package/src/stories/Toast.stories.js +0 -126
package/src/components/index.ts
CHANGED
|
@@ -88,12 +88,8 @@ import ModalDialog from './ModalDialog/ModalDialog.vue';
|
|
|
88
88
|
import Tour from './Tour/Tour.vue';
|
|
89
89
|
import Navigator from './Navigator/index.vue';
|
|
90
90
|
import SelectTime from './SelectTime/index.vue';
|
|
91
|
-
import TemplatePreview from './TemplatePreview/TemplatePreview.vue';
|
|
92
|
-
import TemplatePreviewModal from './TemplatePreview/TemplatePreviewModal.vue';
|
|
93
91
|
import DataTable from './DataTable/index.vue';
|
|
94
92
|
import Chip from './Chip/Chip.vue';
|
|
95
|
-
import Toast from './Toast/Toast.vue';
|
|
96
|
-
import { toast } from './Toast/ToastManager';
|
|
97
93
|
|
|
98
94
|
type VueComponent = Component;
|
|
99
95
|
|
|
@@ -192,12 +188,8 @@ export const components: ComponentsMap = {
|
|
|
192
188
|
unnnicTour: Tour,
|
|
193
189
|
unnnicNavigator: Navigator,
|
|
194
190
|
unnnicSelectTime: SelectTime,
|
|
195
|
-
unnnicTemplatePreview: TemplatePreview,
|
|
196
|
-
unnnicTemplatePreviewModal: TemplatePreviewModal,
|
|
197
191
|
unnnicDataTable: DataTable,
|
|
198
192
|
unnnicChip: Chip,
|
|
199
|
-
unnnicToast: Toast,
|
|
200
|
-
unnnicToastManager: toast,
|
|
201
193
|
};
|
|
202
194
|
|
|
203
195
|
export const unnnicFontSize = fontSize;
|
|
@@ -249,7 +241,7 @@ export const unnnicAccordion = accordion;
|
|
|
249
241
|
export const unnnicIndicator = indicator;
|
|
250
242
|
export const unnnicSkeletonLoading = skeletonLoading;
|
|
251
243
|
export const unnnicCarousel = carousel;
|
|
252
|
-
export const unnnicLabel = label
|
|
244
|
+
export const unnnicLabel = label;
|
|
253
245
|
export const unnnicTab = tab;
|
|
254
246
|
export const unnnicTabsExpanded = tabsExpanded;
|
|
255
247
|
export const unnnicBanner = banner;
|
|
@@ -290,10 +282,8 @@ export const unnnicDrawer = Drawer;
|
|
|
290
282
|
export const unnnicTableNext = TableNext;
|
|
291
283
|
export const unnnicTour = Tour;
|
|
292
284
|
export const unnnicNavigator = Navigator;
|
|
293
|
-
export const unnnicSelectTime = SelectTime as VueComponent;
|
|
294
|
-
export const unnnicTemplatePreview = TemplatePreview as VueComponent;
|
|
295
|
-
export const unnnicTemplatePreviewModal = TemplatePreviewModal as VueComponent;
|
|
296
285
|
export const unnnicDataTable = DataTable as VueComponent;
|
|
286
|
+
export const unnnicSelectTime = SelectTime as VueComponent;
|
|
297
287
|
export const unnnicChip = Chip;
|
|
298
288
|
|
|
299
289
|
export const UnnnicFontSize = fontSize;
|
|
@@ -345,7 +335,7 @@ export const UnnnicAccordion = accordion;
|
|
|
345
335
|
export const UnnnicIndicator = indicator;
|
|
346
336
|
export const UnnnicSkeletonLoading = skeletonLoading;
|
|
347
337
|
export const UnnnicCarousel = carousel;
|
|
348
|
-
export const UnnnicLabel = label
|
|
338
|
+
export const UnnnicLabel = label;
|
|
349
339
|
export const UnnnicTab = tab;
|
|
350
340
|
export const UnnnicTabsExpanded = tabsExpanded;
|
|
351
341
|
export const UnnnicBanner = banner;
|
|
@@ -386,10 +376,6 @@ export const UnnnicDrawer = Drawer;
|
|
|
386
376
|
export const UnnnicTableNext = TableNext;
|
|
387
377
|
export const UnnnicTour = Tour;
|
|
388
378
|
export const UnnnicNavigator = Navigator;
|
|
389
|
-
export const UnnnicSelectTime = SelectTime as VueComponent;
|
|
390
|
-
export const UnnnicTemplatePreview = TemplatePreview as VueComponent;
|
|
391
|
-
export const UnnnicTemplatePreviewModal = TemplatePreviewModal as VueComponent;
|
|
392
379
|
export const UnnnicDataTable = DataTable as VueComponent;
|
|
380
|
+
export const UnnnicSelectTime = SelectTime as VueComponent;
|
|
393
381
|
export const UnnnicChip = Chip;
|
|
394
|
-
export const UnnnicToast = Toast;
|
|
395
|
-
export const UnnnicToastManager = toast;
|
package/src/locales/en.json
CHANGED
package/src/locales/es.json
CHANGED
package/src/locales/pt_br.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import AlertCaller from '../components/Alert/AlertCaller.vue';
|
|
1
2
|
import alert from '../utils/call';
|
|
2
3
|
import UnnnicAlert from '../components/Alert/Alert.vue';
|
|
4
|
+
import AlertBanner from '../components/Alert/AlertBanner.vue';
|
|
3
5
|
|
|
4
6
|
export default {
|
|
5
7
|
title: 'Feedback/Alert',
|
|
@@ -18,6 +20,9 @@ export default {
|
|
|
18
20
|
args: {
|
|
19
21
|
type: 'default',
|
|
20
22
|
text: 'Text',
|
|
23
|
+
linkHref: '',
|
|
24
|
+
linkText: '',
|
|
25
|
+
linkTarget: '',
|
|
21
26
|
},
|
|
22
27
|
argTypes: {
|
|
23
28
|
type: {
|
|
@@ -32,15 +37,42 @@ export default {
|
|
|
32
37
|
type: 'text',
|
|
33
38
|
},
|
|
34
39
|
},
|
|
35
|
-
|
|
40
|
+
|
|
41
|
+
linkHref: {
|
|
36
42
|
control: {
|
|
37
|
-
type: '
|
|
43
|
+
type: 'text',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
linkText: {
|
|
48
|
+
control: {
|
|
49
|
+
type: 'text',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
linkTarget: {
|
|
54
|
+
control: {
|
|
55
|
+
type: 'text',
|
|
38
56
|
},
|
|
39
|
-
|
|
57
|
+
},
|
|
58
|
+
position: {
|
|
59
|
+
if: { arg: 'version' },
|
|
60
|
+
},
|
|
61
|
+
version: {
|
|
62
|
+
control: false,
|
|
40
63
|
},
|
|
41
64
|
title: {
|
|
42
65
|
if: { arg: 'version' },
|
|
43
66
|
},
|
|
67
|
+
icon: {
|
|
68
|
+
if: { arg: 'version' },
|
|
69
|
+
},
|
|
70
|
+
closeText: {
|
|
71
|
+
if: { arg: 'version' },
|
|
72
|
+
},
|
|
73
|
+
scheme: {
|
|
74
|
+
if: { arg: 'version' },
|
|
75
|
+
},
|
|
44
76
|
},
|
|
45
77
|
};
|
|
46
78
|
|
|
@@ -63,7 +95,7 @@ export const Normal = {
|
|
|
63
95
|
},
|
|
64
96
|
},
|
|
65
97
|
render: (args) => ({
|
|
66
|
-
components: { UnnnicAlert },
|
|
98
|
+
components: { AlertCaller, UnnnicAlert },
|
|
67
99
|
setup() {
|
|
68
100
|
return { args };
|
|
69
101
|
},
|
|
@@ -85,7 +117,7 @@ export const Normal = {
|
|
|
85
117
|
|
|
86
118
|
export const InlineComponent = {
|
|
87
119
|
render: (args) => ({
|
|
88
|
-
components: { UnnnicAlert },
|
|
120
|
+
components: { AlertCaller, UnnnicAlert },
|
|
89
121
|
setup() {
|
|
90
122
|
return { args };
|
|
91
123
|
},
|
|
@@ -134,7 +166,7 @@ export const WithContainerRef = {
|
|
|
134
166
|
},
|
|
135
167
|
},
|
|
136
168
|
render: (args) => ({
|
|
137
|
-
components: { UnnnicAlert },
|
|
169
|
+
components: { AlertCaller, UnnnicAlert },
|
|
138
170
|
setup() {
|
|
139
171
|
return { args };
|
|
140
172
|
},
|
|
@@ -158,3 +190,32 @@ export const WithContainerRef = {
|
|
|
158
190
|
scheme: 'feedback-green',
|
|
159
191
|
},
|
|
160
192
|
};
|
|
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
|
|
11
|
+
It is divided into 6 types: Primary, Secondary, Tertiary, Alternative, Warning, Attention.
|
|
12
12
|
Each of these types has its states.
|
|
13
13
|
<br/>
|
|
14
14
|
<br/>
|
|
@@ -36,7 +36,14 @@ export default {
|
|
|
36
36
|
argTypes: {
|
|
37
37
|
type: {
|
|
38
38
|
control: { type: 'select' },
|
|
39
|
-
options: [
|
|
39
|
+
options: [
|
|
40
|
+
'primary',
|
|
41
|
+
'secondary',
|
|
42
|
+
'tertiary',
|
|
43
|
+
'alternative',
|
|
44
|
+
'warning',
|
|
45
|
+
'attention',
|
|
46
|
+
],
|
|
40
47
|
},
|
|
41
48
|
size: {
|
|
42
49
|
control: { type: 'select' },
|
|
@@ -107,6 +114,14 @@ export const OnlyIcon = {
|
|
|
107
114
|
},
|
|
108
115
|
};
|
|
109
116
|
|
|
117
|
+
export const Alternative = {
|
|
118
|
+
args: {
|
|
119
|
+
type: 'alternative',
|
|
120
|
+
iconLeft: 'add',
|
|
121
|
+
text: 'Text',
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
|
|
110
125
|
export const Warning = {
|
|
111
126
|
parameters: {
|
|
112
127
|
docs: {
|
|
@@ -330,63 +330,3 @@ export const Loading = {
|
|
|
330
330
|
isLoading: true,
|
|
331
331
|
},
|
|
332
332
|
};
|
|
333
|
-
|
|
334
|
-
export const ControlledSort = {
|
|
335
|
-
args: { headers, items },
|
|
336
|
-
render: (args) => ({
|
|
337
|
-
components: {
|
|
338
|
-
UnnnicDataTable,
|
|
339
|
-
},
|
|
340
|
-
setup() {
|
|
341
|
-
let sortState = {
|
|
342
|
-
header: 'ID',
|
|
343
|
-
itemKey: 'id',
|
|
344
|
-
order: 'asc',
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
const handleSort = ({ order, header, itemKey }) => {
|
|
348
|
-
action('update:sort')({ order, header, itemKey });
|
|
349
|
-
sortState = { header, itemKey, order };
|
|
350
|
-
|
|
351
|
-
if (order === 'asc') {
|
|
352
|
-
args.items = [...args.items].sort((a, b) => {
|
|
353
|
-
if (itemKey === 'id') return a.id - b.id;
|
|
354
|
-
return a[itemKey] > b[itemKey] ? 1 : -1;
|
|
355
|
-
});
|
|
356
|
-
} else if (order === 'desc') {
|
|
357
|
-
args.items = [...args.items].sort((a, b) => {
|
|
358
|
-
if (itemKey === 'id') return b.id - a.id;
|
|
359
|
-
return a[itemKey] < b[itemKey] ? 1 : -1;
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
const updatePage = (page) => {
|
|
365
|
-
action('update:page')(page);
|
|
366
|
-
args.page = page;
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
const itemClick = (item) => {
|
|
370
|
-
action('itemClick')(item);
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
return { args, sortState, handleSort, updatePage, itemClick };
|
|
374
|
-
},
|
|
375
|
-
template: `
|
|
376
|
-
<div>
|
|
377
|
-
<UnnnicDataTable
|
|
378
|
-
v-bind="args"
|
|
379
|
-
:headers="args.headers"
|
|
380
|
-
:items="args.items"
|
|
381
|
-
:pageTotal="125"
|
|
382
|
-
:pageInterval="5"
|
|
383
|
-
v-model:sort="sortState"
|
|
384
|
-
@update:sort="handleSort"
|
|
385
|
-
@update:page="updatePage"
|
|
386
|
-
@itemClick="itemClick"
|
|
387
|
-
>
|
|
388
|
-
</UnnnicDataTable>
|
|
389
|
-
</div>
|
|
390
|
-
`,
|
|
391
|
-
}),
|
|
392
|
-
};
|
|
@@ -35,7 +35,9 @@ export default {
|
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
template: `
|
|
38
|
-
|
|
38
|
+
<unnnic-form-element label="Label" message="Helper text">
|
|
39
|
+
<unnnic-input v-model="value" @icon-right-click="click" v-bind="args" />
|
|
40
|
+
</unnnic-form-element>
|
|
39
41
|
`,
|
|
40
42
|
}),
|
|
41
43
|
};
|
|
@@ -155,18 +157,3 @@ export const Mask = {
|
|
|
155
157
|
mask: ['###.###.###-##', '##.###.###/####-##'],
|
|
156
158
|
},
|
|
157
159
|
};
|
|
158
|
-
|
|
159
|
-
export const LimitMaxLength = {
|
|
160
|
-
args: {
|
|
161
|
-
placeholder: 'Text',
|
|
162
|
-
maxlength: 10,
|
|
163
|
-
showMaxlengthCounter: true,
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export const WithTooltip = {
|
|
168
|
-
args: {
|
|
169
|
-
placeholder: 'Text',
|
|
170
|
-
tooltip: 'Tooltip',
|
|
171
|
-
},
|
|
172
|
-
};
|
|
@@ -3,6 +3,9 @@ import unnnicTab from '../components/Tab/Tab.vue';
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'tabs/Tab',
|
|
5
5
|
component: unnnicTab,
|
|
6
|
+
argTypes: {
|
|
7
|
+
size: { control: { type: 'select', options: ['md', 'sm'] } },
|
|
8
|
+
},
|
|
6
9
|
render: (args) => ({
|
|
7
10
|
components: {
|
|
8
11
|
unnnicTab,
|
|
@@ -33,15 +36,6 @@ export default {
|
|
|
33
36
|
Second description
|
|
34
37
|
</p>
|
|
35
38
|
</template>
|
|
36
|
-
<template #tab-head-third>
|
|
37
|
-
Third
|
|
38
|
-
</template>
|
|
39
|
-
<template #tab-panel-third>
|
|
40
|
-
<h2 class="title">Third Content</h2>
|
|
41
|
-
<p class="description">
|
|
42
|
-
Third description
|
|
43
|
-
</p>
|
|
44
|
-
</template>
|
|
45
39
|
</unnnic-tab>
|
|
46
40
|
`,
|
|
47
41
|
}),
|
|
@@ -50,7 +44,6 @@ export default {
|
|
|
50
44
|
export const Default = {
|
|
51
45
|
args: {
|
|
52
46
|
initialTab: 'first',
|
|
53
|
-
tabs: ['first', 'second'
|
|
54
|
-
disabledTabs: ['third'],
|
|
47
|
+
tabs: ['first', 'second'],
|
|
55
48
|
},
|
|
56
49
|
};
|
|
@@ -1,122 +1,4 @@
|
|
|
1
1
|
export type SchemeColor =
|
|
2
|
-
| 'white'
|
|
3
|
-
| 'black'
|
|
4
|
-
| 'gray-50'
|
|
5
|
-
| 'gray-100'
|
|
6
|
-
| 'gray-200'
|
|
7
|
-
| 'gray-300'
|
|
8
|
-
| 'gray-400'
|
|
9
|
-
| 'gray-500'
|
|
10
|
-
| 'gray-600'
|
|
11
|
-
| 'gray-700'
|
|
12
|
-
| 'gray-800'
|
|
13
|
-
| 'gray-900'
|
|
14
|
-
| 'gray-950'
|
|
15
|
-
| 'teal-50'
|
|
16
|
-
| 'teal-100'
|
|
17
|
-
| 'teal-200'
|
|
18
|
-
| 'teal-300'
|
|
19
|
-
| 'teal-400'
|
|
20
|
-
| 'teal-500'
|
|
21
|
-
| 'teal-600'
|
|
22
|
-
| 'teal-700'
|
|
23
|
-
| 'teal-800'
|
|
24
|
-
| 'teal-900'
|
|
25
|
-
| 'teal-950'
|
|
26
|
-
| 'green-50'
|
|
27
|
-
| 'green-100'
|
|
28
|
-
| 'green-200'
|
|
29
|
-
| 'green-300'
|
|
30
|
-
| 'green-400'
|
|
31
|
-
| 'green-500'
|
|
32
|
-
| 'green-600'
|
|
33
|
-
| 'green-700'
|
|
34
|
-
| 'green-800'
|
|
35
|
-
| 'green-900'
|
|
36
|
-
| 'green-950'
|
|
37
|
-
| 'blue-50'
|
|
38
|
-
| 'blue-100'
|
|
39
|
-
| 'blue-200'
|
|
40
|
-
| 'blue-300'
|
|
41
|
-
| 'blue-400'
|
|
42
|
-
| 'blue-500'
|
|
43
|
-
| 'blue-600'
|
|
44
|
-
| 'blue-700'
|
|
45
|
-
| 'blue-800'
|
|
46
|
-
| 'blue-900'
|
|
47
|
-
| 'blue-950'
|
|
48
|
-
| 'purple-50'
|
|
49
|
-
| 'purple-100'
|
|
50
|
-
| 'purple-200'
|
|
51
|
-
| 'purple-300'
|
|
52
|
-
| 'purple-400'
|
|
53
|
-
| 'purple-500'
|
|
54
|
-
| 'purple-600'
|
|
55
|
-
| 'purple-700'
|
|
56
|
-
| 'purple-800'
|
|
57
|
-
| 'purple-900'
|
|
58
|
-
| 'purple-950'
|
|
59
|
-
| 'red-50'
|
|
60
|
-
| 'red-100'
|
|
61
|
-
| 'red-200'
|
|
62
|
-
| 'red-300'
|
|
63
|
-
| 'red-400'
|
|
64
|
-
| 'red-500'
|
|
65
|
-
| 'red-600'
|
|
66
|
-
| 'red-700'
|
|
67
|
-
| 'red-800'
|
|
68
|
-
| 'red-900'
|
|
69
|
-
| 'red-950'
|
|
70
|
-
| 'orange-50'
|
|
71
|
-
| 'orange-100'
|
|
72
|
-
| 'orange-200'
|
|
73
|
-
| 'orange-300'
|
|
74
|
-
| 'orange-400'
|
|
75
|
-
| 'orange-500'
|
|
76
|
-
| 'orange-600'
|
|
77
|
-
| 'orange-700'
|
|
78
|
-
| 'orange-800'
|
|
79
|
-
| 'orange-900'
|
|
80
|
-
| 'orange-950'
|
|
81
|
-
| 'yellow-50'
|
|
82
|
-
| 'yellow-100'
|
|
83
|
-
| 'yellow-200'
|
|
84
|
-
| 'yellow-300'
|
|
85
|
-
| 'yellow-400'
|
|
86
|
-
| 'yellow-500'
|
|
87
|
-
| 'yellow-600'
|
|
88
|
-
| 'yellow-700'
|
|
89
|
-
| 'yellow-800'
|
|
90
|
-
| 'yellow-900'
|
|
91
|
-
| 'yellow-950'
|
|
92
|
-
| 'bg-base'
|
|
93
|
-
| 'bg-soft'
|
|
94
|
-
| 'bg-muted'
|
|
95
|
-
| 'bg-active'
|
|
96
|
-
| 'bg-info'
|
|
97
|
-
| 'bg-success'
|
|
98
|
-
| 'bg-warning'
|
|
99
|
-
| 'bg-critical'
|
|
100
|
-
| 'fg-base'
|
|
101
|
-
| 'fg-muted'
|
|
102
|
-
| 'fg-emphasized'
|
|
103
|
-
| 'fg-inverted'
|
|
104
|
-
| 'fg-active'
|
|
105
|
-
| 'fg-info'
|
|
106
|
-
| 'fg-success'
|
|
107
|
-
| 'fg-warning'
|
|
108
|
-
| 'fg-critical'
|
|
109
|
-
| 'border-base'
|
|
110
|
-
| 'border-soft'
|
|
111
|
-
| 'border-muted'
|
|
112
|
-
| 'border-emphasized'
|
|
113
|
-
| 'border-active'
|
|
114
|
-
| 'border-info'
|
|
115
|
-
| 'border-success'
|
|
116
|
-
| 'border-warning'
|
|
117
|
-
| 'border-critical'
|
|
118
|
-
|
|
119
|
-
// Deprecated
|
|
120
2
|
| 'background-solo'
|
|
121
3
|
| 'background-sky'
|
|
122
4
|
| 'background-grass'
|
|
@@ -140,7 +22,6 @@ export type SchemeColor =
|
|
|
140
22
|
| 'feedback-yellow'
|
|
141
23
|
| 'feedback-blue'
|
|
142
24
|
| 'feedback-grey'
|
|
143
|
-
| 'fg-base'
|
|
144
25
|
| 'aux-blue'
|
|
145
26
|
| 'aux-purple'
|
|
146
27
|
| 'aux-orange'
|
|
@@ -204,4 +85,17 @@ export type SchemeColor =
|
|
|
204
85
|
| 'brand-weni-soft'
|
|
205
86
|
| 'brand-sec-dark'
|
|
206
87
|
| 'brand-sec-soft'
|
|
207
|
-
| 'brand-sec'
|
|
88
|
+
| 'brand-sec'
|
|
89
|
+
| 'bg-base'
|
|
90
|
+
| 'bg-soft'
|
|
91
|
+
| 'teal-50'
|
|
92
|
+
| 'teal-100'
|
|
93
|
+
| 'teal-200'
|
|
94
|
+
| 'teal-300'
|
|
95
|
+
| 'teal-400'
|
|
96
|
+
| 'teal-500'
|
|
97
|
+
| 'teal-600'
|
|
98
|
+
| 'teal-700'
|
|
99
|
+
| 'teal-800'
|
|
100
|
+
| 'teal-900'
|
|
101
|
+
| 'teal-950';
|
package/src/utils/call.js
CHANGED
|
@@ -1,58 +1,30 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
2
|
import Alert from '../components/Alert/Alert.vue';
|
|
3
3
|
import Modal from '../components/Modal/Modal.vue';
|
|
4
|
-
import ToastInstance from '../components/Toast/ToastManager';
|
|
5
4
|
import mitt from 'mitt';
|
|
6
5
|
|
|
7
6
|
const emitter = mitt();
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
|
|
8
|
+
const callAlert = ({ props, containerRef }) => {
|
|
9
|
+
const AlertComponent = createApp(Alert, {
|
|
10
|
+
...props,
|
|
11
|
+
onClose: () => {
|
|
12
|
+
instance.$el.remove();
|
|
13
|
+
},
|
|
14
|
+
created() {
|
|
15
|
+
emitter.on(['close'], () => {
|
|
15
16
|
instance.$el.remove();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
const element = document.createElement('div');
|
|
24
|
-
const instance = AlertComponent.mount(element);
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
const element = document.createElement('div');
|
|
21
|
+
const instance = AlertComponent.mount(element);
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} else {
|
|
30
|
-
document.body.appendChild(instance.$el);
|
|
31
|
-
}
|
|
23
|
+
if (containerRef) {
|
|
24
|
+
instance.$el.style.position = 'absolute';
|
|
25
|
+
containerRef.appendChild(instance.$el);
|
|
32
26
|
} else {
|
|
33
|
-
|
|
34
|
-
success: 'success',
|
|
35
|
-
error: 'error',
|
|
36
|
-
attention: 'attention',
|
|
37
|
-
default: 'informational',
|
|
38
|
-
'feedback-green': 'success',
|
|
39
|
-
'feedback-red': 'error',
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const toastProps = {
|
|
43
|
-
timeout: seconds ? seconds * 1000 : 5000,
|
|
44
|
-
type: typeMap[props.scheme || props.type] || typeMap.default,
|
|
45
|
-
|
|
46
|
-
onClose: () => {
|
|
47
|
-
emitter.emit(['close']);
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
ToastInstance.show({
|
|
52
|
-
title: props.text,
|
|
53
|
-
description: '',
|
|
54
|
-
...toastProps,
|
|
55
|
-
});
|
|
27
|
+
document.body.appendChild(instance.$el);
|
|
56
28
|
}
|
|
57
29
|
};
|
|
58
30
|
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Template } from './types';
|
|
2
|
-
interface Props {
|
|
3
|
-
template?: Template | null;
|
|
4
|
-
}
|
|
5
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
6
|
-
template: Template | null;
|
|
7
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
8
|
-
export default _default;
|
|
9
|
-
//# sourceMappingURL=TemplatePreview.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TemplatePreview.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TemplatePreview/TemplatePreview.vue"],"names":[],"mappings":"AAmGA;AAgQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQxC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B;;cADY,QAAQ,GAAG,IAAI;;AAkN5B,wBAQG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Template } from './types';
|
|
2
|
-
interface Props {
|
|
3
|
-
locale?: string;
|
|
4
|
-
template: Template;
|
|
5
|
-
modelValue: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
close: () => any;
|
|
9
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
10
|
-
onClose?: (() => any) | undefined;
|
|
11
|
-
}>, {
|
|
12
|
-
locale: string;
|
|
13
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
export default _default;
|
|
15
|
-
//# sourceMappingURL=TemplatePreviewModal.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TemplatePreviewModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TemplatePreview/TemplatePreviewModal.vue"],"names":[],"mappings":"AAWA;AAwDA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAUxC,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;;;;;;YAHU,MAAM;;AAgGjB,wBASG"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ToastProps } from './types';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<ToastProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
close: () => any;
|
|
4
|
-
destroy: () => any;
|
|
5
|
-
}, string, import('vue').PublicProps, Readonly<ToastProps> & Readonly<{
|
|
6
|
-
onClose?: (() => any) | undefined;
|
|
7
|
-
onDestroy?: (() => any) | undefined;
|
|
8
|
-
}>, {
|
|
9
|
-
type: import('./types').ToastType;
|
|
10
|
-
description: string;
|
|
11
|
-
button: import('./types').ToastButton;
|
|
12
|
-
title: string;
|
|
13
|
-
timeout: number;
|
|
14
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
export default _default;
|
|
16
|
-
//# sourceMappingURL=Toast.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.vue"],"names":[],"mappings":"AA4DA;AAmPA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,SAAS,CAAC;;;;;;;;;;;;;;AAmQtD,wBASG"}
|