@weni/unnnic-system 2.0.16 → 2.0.17

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 (69) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/unnnic.mjs +1044 -1033
  3. package/dist/unnnic.umd.js +18 -18
  4. package/package.json +3 -2
  5. package/src/components/AudioRecorder/AudioHandler.vue +2 -0
  6. package/src/components/AudioRecorder/AudioPlayer.vue +2 -0
  7. package/src/components/AudioRecorder/AudioRecorder.vue +6 -4
  8. package/src/components/Card/CardData.vue +2 -2
  9. package/src/components/CardProject/CardProject.vue +6 -6
  10. package/src/components/ChartRainbow/ChartRainbow.vue +4 -4
  11. package/src/components/ChatsMessage/ChatsMessage.vue +11 -2
  12. package/src/components/ChatsMessage/ChatsMessageStatusBackdrop.vue +1 -4
  13. package/src/components/DateFilter/DateFilter.vue +2 -2
  14. package/src/components/DatePicker/DatePicker.vue +2 -2
  15. package/src/components/Dropdown/LanguageSelect.vue +7 -7
  16. package/src/components/ImportCard/ImportCard.vue +2 -2
  17. package/src/components/ProgressBar/ProgressBar.vue +3 -3
  18. package/src/components/Sidebar/SidebarPrimary.vue +15 -5
  19. package/src/components/TabsExpanded/TabsExpanded.vue +1 -0
  20. package/src/stories/Accordion.stories.js +35 -40
  21. package/src/stories/Alert.stories.js +98 -83
  22. package/src/stories/Breadcrumb.stories.js +12 -23
  23. package/src/stories/ButtonIcon.stories.js +2 -2
  24. package/src/stories/CardCompany.stories.js +52 -58
  25. package/src/stories/CardData.stories.js +8 -26
  26. package/src/stories/CardImage.stories.js +49 -48
  27. package/src/stories/CardInformation.stories.js +33 -54
  28. package/src/stories/CardProject.stories.js +50 -52
  29. package/src/stories/Carousel.stories.js +32 -27
  30. package/src/stories/ChartBar.stories.js +82 -102
  31. package/src/stories/ChartLine.stories.js +42 -52
  32. package/src/stories/ChartMultiLine.stories.js +39 -49
  33. package/src/stories/ChartRainbow.stories.js +2 -2
  34. package/src/stories/ChatText.stories.js +38 -44
  35. package/src/stories/ChatsContact.stories.js +57 -54
  36. package/src/stories/ChatsDashboardTagLive.stories.js +1 -8
  37. package/src/stories/ChatsHeader.stories.js +63 -74
  38. package/src/stories/ChatsMessage.stories.js +208 -216
  39. package/src/stories/CircleProgressBar.stories.js +4 -20
  40. package/src/stories/Collapse.stories.js +49 -55
  41. package/src/stories/Comment.stories.js +57 -54
  42. package/src/stories/DataArea.stories.js +60 -65
  43. package/src/stories/DateFilter.stories.js +7 -12
  44. package/src/stories/DatePicker.stories.js +50 -68
  45. package/src/stories/Disclaimer.stories.js +12 -27
  46. package/src/stories/Drawer.stories.js +116 -110
  47. package/src/stories/Dropdown.stories.js +22 -12
  48. package/src/stories/FormElement.stories.js +18 -23
  49. package/src/stories/Grid.stories.js +4 -10
  50. package/src/stories/Icon.stories.js +2 -2
  51. package/src/stories/IconLoading.stories.js +5 -11
  52. package/src/stories/ImportCard.stories.js +12 -19
  53. package/src/stories/Indicator.stories.js +8 -13
  54. package/src/stories/InputDatePicker.stories.js +27 -32
  55. package/src/stories/LanguageSelect.stories.js +12 -16
  56. package/src/stories/Modal.stories.js +66 -40
  57. package/src/stories/MoodRating.stories.js +27 -32
  58. package/src/stories/MultiSelect.stories.js +56 -50
  59. package/src/stories/Pagination.stories.js +21 -29
  60. package/src/stories/ProgressBar.stories.js +19 -54
  61. package/src/stories/Radio.stories.js +36 -35
  62. package/src/stories/Sidebar.stories.js +29 -27
  63. package/src/stories/SidebarPrimary.stories.js +87 -80
  64. package/src/stories/SkeletonLoading.stories.js +12 -29
  65. package/src/stories/StarRating.stories.js +29 -33
  66. package/src/stories/Switch.stories.js +26 -19
  67. package/src/stories/TabsExpanded.stories.js +56 -58
  68. package/src/stories/TextArea.stories.js +29 -34
  69. package/src/stories/TransitionRipple.stories.js +19 -18
@@ -1,10 +1,10 @@
1
- import unnnicChatText from '../components/ChatText/ChatText.vue';
1
+ import UnnnicChatText from '../components/ChatText/ChatText.vue';
2
2
  import UnnnicButtonIcon from '../components/Button/ButtonIcon.vue';
3
3
  import colorsList from '../utils/colorsList';
4
4
 
5
5
  export default {
6
6
  title: 'example/ChatText',
7
- component: unnnicChatText,
7
+ component: UnnnicChatText,
8
8
  argTypes: {
9
9
  size: { control: { type: 'select', options: ['normal', 'small'] } },
10
10
  titleColor: {
@@ -14,49 +14,43 @@ export default {
14
14
  },
15
15
  },
16
16
  },
17
+ render: (args) => ({
18
+ components: {
19
+ UnnnicChatText,
20
+ UnnnicButtonIcon,
21
+ },
22
+ setup() {
23
+ return { args };
24
+ },
25
+ methods: {
26
+ click() {
27
+ console.log('clicked');
28
+ },
29
+ },
30
+ template: `
31
+ <div>
32
+ <unnnic-chat-text v-bind="args">
33
+ <template #actions>
34
+ <unnnic-button-icon
35
+ @click="click"
36
+ type="secondary"
37
+ size="small"
38
+ icon="pencil-write-1"
39
+ ></unnnic-button-icon>
40
+ </template>
41
+
42
+ <template #description>
43
+ <span class="intent">Lorem</span> Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
44
+ </template>
45
+ </unnnic-chat-text>
46
+ </div>
47
+ `,
48
+ }),
17
49
  };
18
50
 
19
- const Template = (args, { argTypes }) => ({
20
- props: Object.keys(argTypes),
21
-
22
- components: {
23
- unnnicChatText,
24
- UnnnicButtonIcon,
25
- },
26
-
27
- data() {
28
- return {};
51
+ export const Default = {
52
+ args: {
53
+ title: 'Title',
54
+ info: 'Info',
29
55
  },
30
-
31
- template: `
32
- <div>
33
- <unnnic-chat-text v-bind="$props" @action="click">
34
- <template slot="actions">
35
- <unnnic-button-icon
36
- @click="click"
37
- type="secondary"
38
- size="small"
39
- icon="pencil-write-1"
40
- ></unnnic-button-icon>
41
- </template>
42
-
43
- <template slot="description">
44
- <span class="intent">Lorem</span> Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
45
- </template>
46
- </unnnic-chat-text>
47
- </div>
48
- `,
49
-
50
- methods: {
51
- click() {
52
- console.log('clicked');
53
- },
54
- },
55
- });
56
-
57
- export const Default = Template.bind({});
58
-
59
- Default.args = {
60
- title: 'Title',
61
- info: 'Info',
62
56
  };
@@ -11,27 +11,6 @@ export default {
11
11
  component: unnnicChatsContact,
12
12
  };
13
13
 
14
- const Template = (args, { argTypes }) => ({
15
- props: Object.keys(argTypes),
16
- components: { unnnicChatsContact },
17
- template: '<unnnic-chats-contact v-bind="$props"/>',
18
- });
19
-
20
- const TemplateList = (args, { argTypes }) => ({
21
- props: Object.keys(argTypes),
22
- components: { unnnicChatsContact },
23
- data() {
24
- return {
25
- selectedContact: 1,
26
- };
27
- },
28
- template: `
29
- <div style="display: grid; gap: 5px;">
30
- <unnnic-chats-contact v-for="index in 5" v-bind="$props" @click="selectedContact = index" :selected="selectedContact === index"/>
31
- </div>
32
- `,
33
- });
34
-
35
14
  const defaultArgs = {
36
15
  title: 'John Doe',
37
16
  lastMessage:
@@ -40,51 +19,75 @@ const defaultArgs = {
40
19
  const unreadMessages = 5;
41
20
  const waitingTime = 10;
42
21
 
43
- export const Default = Template.bind({});
44
- Default.args = {
45
- ...defaultArgs,
46
- unreadMessages,
22
+ export const Default = {
23
+ args: {
24
+ ...defaultArgs,
25
+ unreadMessages,
26
+ },
47
27
  };
48
28
 
49
- export const Selected = Template.bind({});
50
- Selected.args = {
51
- ...defaultArgs,
52
- selected: true,
29
+ export const Selected = {
30
+ args: {
31
+ ...defaultArgs,
32
+ selected: true,
33
+ },
53
34
  };
54
35
 
55
- export const SelectedWithCheckbox = Template.bind({});
56
- SelectedWithCheckbox.args = {
57
- ...defaultArgs,
58
- selected: true,
59
- checkboxWhenSelect: true,
36
+ export const SelectedWithCheckbox = {
37
+ args: {
38
+ ...defaultArgs,
39
+ selected: true,
40
+ checkboxWhenSelect: true,
41
+ },
60
42
  };
61
43
 
62
- export const Read = Template.bind({});
63
- Read.args = {
64
- ...defaultArgs,
44
+ export const Read = {
45
+ args: {
46
+ ...defaultArgs,
47
+ },
65
48
  };
66
49
 
67
- export const Waiting = Template.bind({});
68
- Waiting.args = {
69
- ...defaultArgs,
70
- waitingTime,
71
- unreadMessages,
50
+ export const Waiting = {
51
+ args: {
52
+ ...defaultArgs,
53
+ waitingTime,
54
+ unreadMessages,
55
+ },
72
56
  };
73
57
 
74
- export const WaitingRead = Template.bind({});
75
- WaitingRead.args = {
76
- ...defaultArgs,
77
- waitingTime,
58
+ export const WaitingRead = {
59
+ args: {
60
+ ...defaultArgs,
61
+ waitingTime,
62
+ },
78
63
  };
79
64
 
80
- export const Discussion = Template.bind({});
81
- Discussion.args = {
82
- ...defaultArgs,
83
- title: 'Lorem ipsum dolor sit amet',
84
- discussionGoal: 'John Doe',
65
+ export const Discussion = {
66
+ args: {
67
+ ...defaultArgs,
68
+ title: 'Lorem ipsum dolor sit amet',
69
+ discussionGoal: 'John Doe',
70
+ },
85
71
  };
86
72
 
87
- export const ContactList = TemplateList.bind({});
88
- ContactList.args = {
89
- ...defaultArgs,
73
+ export const ContactList = {
74
+ args: {
75
+ ...defaultArgs,
76
+ },
77
+ render: (args) => ({
78
+ setup() {
79
+ return { args };
80
+ },
81
+ components: { unnnicChatsContact },
82
+ data() {
83
+ return {
84
+ selectedContact: 1,
85
+ };
86
+ },
87
+ template: `
88
+ <div style="display: grid; gap: 5px;">
89
+ <unnnic-chats-contact v-for="index in 5" v-bind="args" @click="selectedContact = index" :selected="selectedContact === index"/>
90
+ </div>
91
+ `,
92
+ }),
90
93
  };
@@ -14,11 +14,4 @@ export default {
14
14
  },
15
15
  };
16
16
 
17
- const Template = (args, { argTypes }) => ({
18
- props: Object.keys(argTypes),
19
- components: { unnnicChatsDashboardTagLive },
20
- template: '<unnnic-chats-dashboard-tag-live v-bind="$props"/>',
21
- });
22
-
23
- export const Default = Template.bind({});
24
- Default.args = {};
17
+ export const Default = { args: {} };
@@ -1,93 +1,82 @@
1
1
  /* eslint-disable no-alert */
2
2
  import unnnicChatsHeader from '../components/ChatsHeader/ChatsHeader.vue';
3
3
  import unnnicChatsDashboardTagLive from '../components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue';
4
+ import { action } from '@storybook/addon-actions';
4
5
 
5
6
  export default {
6
7
  title: 'Chats/Header',
7
8
  component: unnnicChatsHeader,
9
+ args: {
10
+ onCrumbClick: action('crumb-click'),
11
+ back: action('back'),
12
+ close: action('close'),
13
+ titleClick: action('title-click'),
14
+ avatarClick: action('avatar-click'),
15
+ },
8
16
  };
9
17
 
10
- const Template = (args, { argTypes }) => ({
11
- props: Object.keys(argTypes),
12
- components: { unnnicChatsHeader },
13
- template: '<unnnic-chats-header v-bind="$props" @crumbClick="crumbClick"/>',
14
- });
15
-
16
- const DashboardTemplate = (args, { argTypes }) => ({
17
- props: Object.keys(argTypes),
18
- components: { unnnicChatsHeader, unnnicChatsDashboardTagLive },
19
- template: `<unnnic-chats-header v-bind="$props" @crumbClick="crumbClick">
20
- <unnnic-chats-dashboard-tag-live />
21
- </unnnic-chats-header>`,
22
- });
23
-
24
- const back = () => alert('back');
25
- const close = () => alert('close');
26
- const titleClick = () => alert('titleClick');
27
- const avatarClick = () => alert('avatarClick');
28
- const crumbClick = (event) => alert(JSON.stringify(event));
29
-
30
18
  const size = window.innerWidth < 600 ? 'small' : 'large';
31
19
 
32
- const defaultArgs = {
33
- back,
34
- close,
35
- titleClick,
36
- avatarClick,
37
- crumbClick,
38
- };
39
-
40
- export const Contact = Template.bind({});
41
- Contact.args = {
42
- ...defaultArgs,
43
- title: 'John Doe',
44
- titleClick,
45
- avatarName: 'John Doe',
46
- avatarClick,
20
+ export const Contact = {
21
+ args: {
22
+ title: 'John Doe',
23
+ avatarName: 'John Doe',
24
+ },
47
25
  };
48
26
 
49
- export const ContactInfos = Template.bind({});
50
- ContactInfos.args = {
51
- ...defaultArgs,
52
- title: 'Contact information',
53
- subtitle: 'John Doe',
54
- avatarName: 'John Doe',
27
+ export const ContactInfos = {
28
+ args: {
29
+ title: 'Contact information',
30
+ subtitle: 'John Doe',
31
+ avatarName: 'John Doe',
32
+ },
55
33
  };
56
34
 
57
- export const Dashboard = DashboardTemplate.bind({});
58
- Dashboard.args = {
59
- ...defaultArgs,
60
- title: size === 'large' ? 'Lorem Ipsum Inc.' : 'Dashboard',
61
- subtitle: size === 'large' ? 'Dashboard of project' : 'Lorem Ipsum Inc.',
62
- avatarIcon: 'graph-stats-1',
63
- crumbClick,
64
- crumbs: [
65
- {
66
- name: 'Chats',
67
- path: 'chats',
68
- },
69
- {
70
- name: 'Dashboard',
71
- path: 'dashboard',
35
+ export const Dashboard = {
36
+ args: {
37
+ title: size === 'large' ? 'Lorem Ipsum Inc.' : 'Dashboard',
38
+ subtitle: size === 'large' ? 'Dashboard of project' : 'Lorem Ipsum Inc.',
39
+ avatarIcon: 'graph-stats-1',
40
+ crumbs: [
41
+ {
42
+ name: 'Chats',
43
+ path: 'chats',
44
+ },
45
+ {
46
+ name: 'Dashboard',
47
+ path: 'dashboard',
48
+ },
49
+ ],
50
+ },
51
+ render: (args) => ({
52
+ setup() {
53
+ return { args };
72
54
  },
73
- ],
55
+ components: { unnnicChatsHeader, unnnicChatsDashboardTagLive },
56
+ template: `
57
+ <unnnic-chats-header
58
+ v-bind="args"
59
+ @crumbClick="crumbClick"
60
+ >
61
+ <unnnic-chats-dashboard-tag-live />
62
+ </unnnic-chats-header>`,
63
+ }),
74
64
  };
75
65
 
76
- export const History = Template.bind({});
77
- History.args = {
78
- ...defaultArgs,
79
- title: size === 'large' ? 'Lorem Ipsum Inc.' : 'History',
80
- subtitle: size === 'large' ? 'History of project' : 'Lorem Ipsum Inc.',
81
- avatarIcon: 'task-list-clock-1',
82
- crumbClick,
83
- crumbs: [
84
- {
85
- name: 'Chats',
86
- path: 'chats',
87
- },
88
- {
89
- name: 'History',
90
- path: 'history',
91
- },
92
- ],
66
+ export const History = {
67
+ args: {
68
+ title: size === 'large' ? 'Lorem Ipsum Inc.' : 'History',
69
+ subtitle: size === 'large' ? 'History of project' : 'Lorem Ipsum Inc.',
70
+ avatarIcon: 'task-list-clock-1',
71
+ crumbs: [
72
+ {
73
+ name: 'Chats',
74
+ path: 'chats',
75
+ },
76
+ {
77
+ name: 'History',
78
+ path: 'history',
79
+ },
80
+ ],
81
+ },
93
82
  };