@weni/unnnic-system 3.2.6 → 3.2.7-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.
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +5 -5
- package/dist/components/Alert/Version1dot1.vue.d.ts +2 -2
- 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 +3 -1
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +182 -27
- package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
- package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
- package/dist/components/DropArea/DropArea.vue.d.ts +2 -0
- package/dist/components/DropArea/DropArea.vue.d.ts.map +1 -1
- 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 +38 -32
- 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 +10 -1
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +182 -27
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +31 -13
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +192 -37
- package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
- package/dist/components/Modal/Modal.vue.d.ts +2 -2
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +10 -10
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +189 -34
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +20 -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 +45 -27
- 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 +31 -13
- 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 -2
- 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/TemplatePreview/TemplatePreview.vue.d.ts +9 -0
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -0
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +15 -0
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.vue.d.ts +38 -32
- 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 +13 -7
- package/dist/components/index.d.ts +2114 -810
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-abc8e9a2.mjs → es-a147ef18.mjs} +1 -1
- package/dist/{index-22520f9b.mjs → index-802ab669.mjs} +8021 -7824
- package/dist/{pt-br-a1f8d5de.mjs → pt-br-cdc64aa4.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +123 -119
- package/dist/unnnic.umd.js +42 -41
- package/package.json +2 -2
- 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/Button/Button.vue +57 -108
- package/src/components/Button/types.ts +0 -1
- package/src/components/DataTable/index.vue +26 -14
- package/src/components/DropArea/DropArea.vue +26 -2
- package/src/components/FormElement/FormElement.vue +50 -90
- package/src/components/Input/BaseInput.vue +10 -12
- package/src/components/Input/Input.scss +17 -20
- package/src/components/Input/Input.vue +86 -28
- package/src/components/Input/TextInput.vue +27 -35
- package/src/components/Input/__test__/TextInput.spec.js +5 -5
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +12 -3
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/ModalDialog/ModalDialog.vue +27 -29
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.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/TemplatePreview/TemplatePreview.vue +249 -0
- package/src/components/TemplatePreview/TemplatePreviewModal.vue +51 -0
- package/src/components/TemplatePreview/types.d.ts +16 -0
- package/src/components/TextArea/TextArea.vue +14 -9
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +7 -2
- package/src/components/index.ts +11 -3
- package/src/stories/Button.stories.js +1 -10
- package/src/stories/DataTable.stories.js +2 -2
- package/src/stories/Input.stories.js +17 -3
- package/src/stories/TemplatePreview.stories.js +94 -0
- package/src/stories/TemplatePreviewModal.stories.js +110 -0
|
@@ -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 5 types: Primary, Secondary, Tertiary, Warning, Attention.
|
|
12
12
|
Each of these types has its states.
|
|
13
13
|
<br/>
|
|
14
14
|
<br/>
|
|
@@ -40,7 +40,6 @@ export default {
|
|
|
40
40
|
'primary',
|
|
41
41
|
'secondary',
|
|
42
42
|
'tertiary',
|
|
43
|
-
'alternative',
|
|
44
43
|
'warning',
|
|
45
44
|
'attention',
|
|
46
45
|
],
|
|
@@ -114,14 +113,6 @@ export const OnlyIcon = {
|
|
|
114
113
|
},
|
|
115
114
|
};
|
|
116
115
|
|
|
117
|
-
export const Alternative = {
|
|
118
|
-
args: {
|
|
119
|
-
type: 'alternative',
|
|
120
|
-
iconLeft: 'add',
|
|
121
|
-
text: 'Text',
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
|
|
125
116
|
export const Warning = {
|
|
126
117
|
parameters: {
|
|
127
118
|
docs: {
|
|
@@ -76,8 +76,8 @@ export default {
|
|
|
76
76
|
UnnnicDataTable,
|
|
77
77
|
},
|
|
78
78
|
setup() {
|
|
79
|
-
const sort = ({ order, header }) => {
|
|
80
|
-
action('update:sort')({ order, header });
|
|
79
|
+
const sort = ({ order, header, itemKey }) => {
|
|
80
|
+
action('update:sort')({ order, header, itemKey });
|
|
81
81
|
if (order === 'asc')
|
|
82
82
|
args.items = args.items.sort((a, b) => a.id - b.id);
|
|
83
83
|
if (order === 'desc')
|
|
@@ -35,9 +35,7 @@ export default {
|
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
template: `
|
|
38
|
-
|
|
39
|
-
<unnnic-input v-model="value" @icon-right-click="click" v-bind="args" />
|
|
40
|
-
</unnnic-form-element>
|
|
38
|
+
<unnnic-input v-model="value" @icon-right-click="click" v-bind="args" label="Label" />
|
|
41
39
|
`,
|
|
42
40
|
}),
|
|
43
41
|
};
|
|
@@ -156,4 +154,20 @@ export const Mask = {
|
|
|
156
154
|
placeholder: 'Text',
|
|
157
155
|
mask: ['###.###.###-##', '##.###.###/####-##'],
|
|
158
156
|
},
|
|
157
|
+
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const LimitMaxLength = {
|
|
161
|
+
args: {
|
|
162
|
+
placeholder: 'Text',
|
|
163
|
+
maxlength: 10,
|
|
164
|
+
showMaxlengthCounter: true,
|
|
165
|
+
},
|
|
159
166
|
};
|
|
167
|
+
|
|
168
|
+
export const WithTooltip = {
|
|
169
|
+
args: {
|
|
170
|
+
placeholder: 'Text',
|
|
171
|
+
tooltip: 'Tooltip',
|
|
172
|
+
},
|
|
173
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import UnnnicTemplatePreview from "../components/TemplatePreview/TemplatePreview.vue";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "example/TemplatePreview",
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
component: UnnnicTemplatePreview,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => ({
|
|
10
|
+
components: { UnnnicTemplatePreview },
|
|
11
|
+
setup() {
|
|
12
|
+
return { args };
|
|
13
|
+
},
|
|
14
|
+
template: `
|
|
15
|
+
<unnnic-template-preview v-bind="args" />
|
|
16
|
+
`,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const bodyText =
|
|
20
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sem orci, ultrices id lectus non, vehicula suscipit libero. Ut vehicula libero a tempus fringilla. Nam tincidunt vestibulum maximus. Morbi vel pretium risus. Curabitur id quam lectus. Quisque dolor elit, auctor a lacus non, rutrum ullamcorper mi. Nulla et turpis sed eros pharetra ullamcorper fermentum ac nisl. Donec lacinia hendrerit tellus, sit amet suscipit velit vestibulum sed. Praesent gravida posuere metus, ut fringilla dolor euismod vel. Aenean vel ipsum magna. Integer metus mi, fermentum ut nulla at, facilisis lobortis metus. Ut vitae tortor posuere, dapibus leo quis, finibus neque.";
|
|
21
|
+
|
|
22
|
+
export const Default = Template.bind({});
|
|
23
|
+
Default.args = {
|
|
24
|
+
template: {
|
|
25
|
+
header: {
|
|
26
|
+
type: "TEXT",
|
|
27
|
+
text: "Hello, world!",
|
|
28
|
+
},
|
|
29
|
+
footer: "Weni by VTEX",
|
|
30
|
+
buttons: [
|
|
31
|
+
{
|
|
32
|
+
text: "Button 1",
|
|
33
|
+
type: "PHONE_NUMBER",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
text: "Button 2",
|
|
37
|
+
type: "URL",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
text: "Button 3",
|
|
41
|
+
type: "QUICK_REPLY",
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
body: bodyText,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const Image = Template.bind({});
|
|
49
|
+
Image.args = {
|
|
50
|
+
template: {
|
|
51
|
+
header: {
|
|
52
|
+
type: "MEDIA",
|
|
53
|
+
mediaType: "IMAGE",
|
|
54
|
+
},
|
|
55
|
+
footer: "Weni by VTEX",
|
|
56
|
+
body: bodyText,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const Video = Template.bind({});
|
|
61
|
+
Video.args = {
|
|
62
|
+
template: {
|
|
63
|
+
header: {
|
|
64
|
+
type: "MEDIA",
|
|
65
|
+
mediaType: "VIDEO",
|
|
66
|
+
},
|
|
67
|
+
buttons: [
|
|
68
|
+
{
|
|
69
|
+
text: "Button 1",
|
|
70
|
+
type: "PHONE_NUMBER",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
text: "Button 2",
|
|
74
|
+
type: "URL",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
text: "Button 3",
|
|
78
|
+
type: "QUICK_REPLY",
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const Document = Template.bind({});
|
|
85
|
+
Document.args = {
|
|
86
|
+
template: {
|
|
87
|
+
header: {
|
|
88
|
+
type: "MEDIA",
|
|
89
|
+
mediaType: "DOCUMENT",
|
|
90
|
+
},
|
|
91
|
+
footer: "Weni by VTEX",
|
|
92
|
+
body: bodyText,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import UnnnicTemplatePreviewModal from "../components/TemplatePreview/TemplatePreviewModal.vue";
|
|
2
|
+
|
|
3
|
+
import { action } from "@storybook/addon-actions";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "example/TemplatePreviewModal",
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
component: UnnnicTemplatePreviewModal,
|
|
9
|
+
argTypes: {
|
|
10
|
+
locale: {
|
|
11
|
+
control: { type: "select" },
|
|
12
|
+
options: ["pt-br", "en", "es"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const Template = (args) => ({
|
|
18
|
+
components: { UnnnicTemplatePreviewModal },
|
|
19
|
+
setup() {
|
|
20
|
+
const close = () => {
|
|
21
|
+
action("close")();
|
|
22
|
+
args.modelValue = false;
|
|
23
|
+
};
|
|
24
|
+
return { args, close };
|
|
25
|
+
},
|
|
26
|
+
template: `
|
|
27
|
+
<div>
|
|
28
|
+
<button @click="args.modelValue = true">Open Modal</button>
|
|
29
|
+
<unnnic-template-preview-modal v-bind="args" @close="close" />
|
|
30
|
+
</div>
|
|
31
|
+
`,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const bodyText =
|
|
35
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sem orci, ultrices id lectus non, vehicula suscipit libero. Ut vehicula libero a tempus fringilla. Nam tincidunt vestibulum maximus. Morbi vel pretium risus. Curabitur id quam lectus. Quisque dolor elit, auctor a lacus non, rutrum ullamcorper mi. Nulla et turpis sed eros pharetra ullamcorper fermentum ac nisl. Donec lacinia hendrerit tellus, sit amet suscipit velit vestibulum sed. Praesent gravida posuere metus, ut fringilla dolor euismod vel. Aenean vel ipsum magna. Integer metus mi, fermentum ut nulla at, facilisis lobortis metus. Ut vitae tortor posuere, dapibus leo quis, finibus neque.";
|
|
36
|
+
|
|
37
|
+
export const Default = Template.bind({});
|
|
38
|
+
Default.args = {
|
|
39
|
+
modelValue: false,
|
|
40
|
+
template: {
|
|
41
|
+
header: {
|
|
42
|
+
type: "TEXT",
|
|
43
|
+
text: "Hello, world!",
|
|
44
|
+
},
|
|
45
|
+
footer: "Weni by VTEX",
|
|
46
|
+
buttons: [
|
|
47
|
+
{
|
|
48
|
+
text: "Button 1",
|
|
49
|
+
type: "PHONE_NUMBER",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
text: "Button 2",
|
|
53
|
+
type: "URL",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
text: "Button 3",
|
|
57
|
+
type: "QUICK_REPLY",
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
body: bodyText,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const Image = Template.bind({});
|
|
65
|
+
Image.args = {
|
|
66
|
+
template: {
|
|
67
|
+
header: {
|
|
68
|
+
type: "MEDIA",
|
|
69
|
+
mediaType: "IMAGE",
|
|
70
|
+
},
|
|
71
|
+
footer: "Weni by VTEX",
|
|
72
|
+
body: bodyText,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const Video = Template.bind({});
|
|
77
|
+
Video.args = {
|
|
78
|
+
template: {
|
|
79
|
+
header: {
|
|
80
|
+
type: "MEDIA",
|
|
81
|
+
mediaType: "VIDEO",
|
|
82
|
+
},
|
|
83
|
+
buttons: [
|
|
84
|
+
{
|
|
85
|
+
text: "Button 1",
|
|
86
|
+
type: "PHONE_NUMBER",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
text: "Button 2",
|
|
90
|
+
type: "URL",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
text: "Button 3",
|
|
94
|
+
type: "QUICK_REPLY",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const Document = Template.bind({});
|
|
101
|
+
Document.args = {
|
|
102
|
+
template: {
|
|
103
|
+
header: {
|
|
104
|
+
type: "MEDIA",
|
|
105
|
+
mediaType: "DOCUMENT",
|
|
106
|
+
},
|
|
107
|
+
footer: "Weni by VTEX",
|
|
108
|
+
body: bodyText,
|
|
109
|
+
},
|
|
110
|
+
};
|